summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Anthony Giusti <kgiusti@apache.org>2011-09-19 15:13:18 +0000
committerKenneth Anthony Giusti <kgiusti@apache.org>2011-09-19 15:13:18 +0000
commit69ae049561adde6b053c5906d0514c375814cae7 (patch)
tree11974930517338c66148a246a212c8eb6e00d486
parent2b6022a4eecaf48f44b5a4031d5b9f25b84adb1f (diff)
downloadqpid-python-69ae049561adde6b053c5906d0514c375814cae7.tar.gz
QPID-3346: merge in latest from trunk (r1172628)
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-3346@1172657 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/KEYS55
-rw-r--r--qpid/LICENSE2
-rw-r--r--qpid/NOTICE2
-rw-r--r--qpid/README.txt14
-rw-r--r--qpid/cpp/INSTALL20
-rw-r--r--qpid/cpp/Makefile.am4
-rw-r--r--qpid/cpp/bindings/qmf2/examples/cpp/Makefile.am5
-rw-r--r--qpid/cpp/bindings/qmf2/examples/cpp/event_driven_list_agents.cpp107
-rw-r--r--qpid/cpp/bindings/qpid/dotnet/configure-windows.ps1108
-rw-r--r--qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/Properties/AssemblyInfo.cs16
-rw-r--r--qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/Properties/AssemblyInfo.cs16
-rw-r--r--qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/Properties/AssemblyInfo.cs12
-rw-r--r--qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs2
-rw-r--r--qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/Properties/AssemblyInfo.cs16
-rw-r--r--qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/Properties/AssemblyInfo.cs16
-rw-r--r--qpid/cpp/bindings/qpid/dotnet/examples/visualbasic.example.client/MyProject/AssemblyInfo.vb30
-rw-r--r--qpid/cpp/bindings/qpid/dotnet/org.apache.qpid.messaging.sessionreceiver.sln6
-rw-r--r--qpid/cpp/bindings/qpid/dotnet/test/messaging.test/Properties/AssemblyInfo.cs16
-rw-r--r--qpid/cpp/bindings/qpid/python/python.i338
-rw-r--r--qpid/cpp/bindings/qpid/ruby/README.rdoc27
-rw-r--r--qpid/cpp/bindings/qpid/ruby/Rakefile74
-rw-r--r--qpid/cpp/bindings/qpid/ruby/examples/client.rb50
-rw-r--r--qpid/cpp/bindings/qpid/ruby/examples/drain.rb111
-rw-r--r--qpid/cpp/bindings/qpid/ruby/examples/hello_world.rb49
-rw-r--r--qpid/cpp/bindings/qpid/ruby/examples/map_receiver.rb63
-rw-r--r--qpid/cpp/bindings/qpid/ruby/examples/map_sender.rb (renamed from qpid/ruby/lib/qpid/fields.rb)61
-rw-r--r--qpid/cpp/bindings/qpid/ruby/examples/server.rb51
-rw-r--r--qpid/cpp/bindings/qpid/ruby/examples/spout.rb126
-rw-r--r--qpid/cpp/bindings/qpid/ruby/lib/qpid.rb (renamed from qpid/java/broker/etc/passwdVhost)12
-rw-r--r--qpid/cpp/bindings/qpid/ruby/lib/qpid/address.rb125
-rw-r--r--qpid/cpp/bindings/qpid/ruby/lib/qpid/connection.rb134
-rw-r--r--qpid/cpp/bindings/qpid/ruby/lib/qpid/duration.rb63
-rw-r--r--qpid/cpp/bindings/qpid/ruby/lib/qpid/encoding.rb56
-rw-r--r--[-rwxr-xr-x]qpid/cpp/bindings/qpid/ruby/lib/qpid/errors.rb (renamed from qpid/dotnet/build-mono)13
-rw-r--r--qpid/cpp/bindings/qpid/ruby/lib/qpid/message.rb157
-rw-r--r--qpid/cpp/bindings/qpid/ruby/lib/qpid/receiver.rb102
-rw-r--r--qpid/cpp/bindings/qpid/ruby/lib/qpid/sender.rb82
-rw-r--r--qpid/cpp/bindings/qpid/ruby/lib/qpid/session.rb186
-rw-r--r--qpid/cpp/bindings/qpid/ruby/lib/qpid/version.rb (renamed from qpid/java/tools/bin/run_sub.sh)14
-rw-r--r--qpid/cpp/bindings/qpid/ruby/test/lib/setup.rb (renamed from qpid/ruby/ext/sasl/extconf.rb)17
-rw-r--r--qpid/cpp/bindings/qpid/ruby/test/test_address.rb (renamed from qpid/ruby/lib/qpid/test.rb)24
-rw-r--r--qpid/cpp/bindings/qpid/ruby/test/test_connection.rb257
-rw-r--r--qpid/cpp/bindings/qpid/ruby/test/test_encoding.rb146
-rw-r--r--qpid/cpp/bindings/qpid/ruby/test/test_message.rb353
-rw-r--r--qpid/cpp/bindings/qpid/ruby/test/test_receiver.rb238
-rw-r--r--qpid/cpp/bindings/qpid/ruby/test/test_sender.rb183
-rw-r--r--qpid/cpp/bindings/qpid/ruby/test/test_session.rb445
-rw-r--r--qpid/cpp/bindings/qpid/ruby/test/ts_bindings.rb30
-rw-r--r--qpid/cpp/bindings/swig_python_typemaps.i56
-rw-r--r--qpid/cpp/design_docs/hot-standby-design.txt239
-rw-r--r--qpid/cpp/docs/api/doxygen_mainpage.h41
-rw-r--r--qpid/cpp/examples/messaging/drain.cpp2
-rw-r--r--qpid/cpp/include/qmf/AgentSession.h6
-rw-r--r--qpid/cpp/include/qmf/ConsoleSession.h5
-rw-r--r--qpid/cpp/include/qmf/DataAddr.h3
-rw-r--r--qpid/cpp/include/qmf/posix/EventNotifier.h63
-rw-r--r--qpid/cpp/include/qpid/Msg.h1
-rw-r--r--qpid/cpp/include/qpid/framing/FieldTable.h4
-rw-r--r--qpid/cpp/include/qpid/framing/List.h1
-rw-r--r--qpid/cpp/include/qpid/messaging/Session.h45
-rw-r--r--qpid/cpp/include/qpid/messaging/exceptions.h68
-rwxr-xr-xqpid/cpp/include/qpid/sys/windows/IntegerTypes.h2
-rw-r--r--qpid/cpp/managementgen/Makefile.am1
-rwxr-xr-xqpid/cpp/rubygen/amqpgen.rb3
-rw-r--r--qpid/cpp/src/CMakeLists.txt26
-rw-r--r--qpid/cpp/src/Makefile.am6
-rw-r--r--qpid/cpp/src/qmf.mk4
-rw-r--r--qpid/cpp/src/qmf/Agent.cpp29
-rw-r--r--qpid/cpp/src/qmf/AgentImpl.h1
-rw-r--r--qpid/cpp/src/qmf/AgentSession.cpp222
-rw-r--r--qpid/cpp/src/qmf/AgentSessionImpl.h176
-rw-r--r--qpid/cpp/src/qmf/ConsoleSession.cpp99
-rw-r--r--qpid/cpp/src/qmf/ConsoleSessionImpl.h22
-rw-r--r--qpid/cpp/src/qmf/DataAddr.cpp6
-rw-r--r--qpid/cpp/src/qmf/DataAddrImpl.h4
-rw-r--r--qpid/cpp/src/qmf/EventNotifierImpl.cpp56
-rw-r--r--qpid/cpp/src/qmf/EventNotifierImpl.h (renamed from qpid/dotnet/Qpid.Common/AMQInvalidRoutingKeyException.cs)54
-rw-r--r--qpid/cpp/src/qmf/PosixEventNotifier.cpp65
-rw-r--r--qpid/cpp/src/qmf/PosixEventNotifierImpl.cpp112
-rw-r--r--qpid/cpp/src/qmf/PosixEventNotifierImpl.h61
-rw-r--r--qpid/cpp/src/qpid/Address.cpp8
-rw-r--r--qpid/cpp/src/qpid/Url.cpp23
-rw-r--r--qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp19
-rw-r--r--qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp5
-rw-r--r--qpid/cpp/src/qpid/amqp_0_10/SessionHandler.h2
-rw-r--r--qpid/cpp/src/qpid/broker/Bridge.cpp6
-rw-r--r--qpid/cpp/src/qpid/broker/Bridge.h2
-rw-r--r--qpid/cpp/src/qpid/broker/Broker.cpp20
-rw-r--r--qpid/cpp/src/qpid/broker/Connection.cpp11
-rw-r--r--qpid/cpp/src/qpid/broker/ConnectionHandler.cpp11
-rw-r--r--qpid/cpp/src/qpid/broker/DeliveryRecord.cpp2
-rw-r--r--qpid/cpp/src/qpid/broker/DeliveryRecord.h2
-rw-r--r--qpid/cpp/src/qpid/broker/DirectExchange.cpp3
-rw-r--r--qpid/cpp/src/qpid/broker/DtxAck.cpp4
-rw-r--r--qpid/cpp/src/qpid/broker/DtxAck.h35
-rw-r--r--qpid/cpp/src/qpid/broker/DtxBuffer.cpp22
-rw-r--r--qpid/cpp/src/qpid/broker/DtxBuffer.h53
-rw-r--r--qpid/cpp/src/qpid/broker/DtxManager.cpp40
-rw-r--r--qpid/cpp/src/qpid/broker/DtxManager.h26
-rw-r--r--qpid/cpp/src/qpid/broker/DtxTimeout.cpp2
-rw-r--r--qpid/cpp/src/qpid/broker/DtxTimeout.h10
-rw-r--r--qpid/cpp/src/qpid/broker/DtxWorkRecord.cpp40
-rw-r--r--qpid/cpp/src/qpid/broker/DtxWorkRecord.h14
-rw-r--r--qpid/cpp/src/qpid/broker/Exchange.cpp4
-rw-r--r--qpid/cpp/src/qpid/broker/LegacyLVQ.cpp6
-rw-r--r--qpid/cpp/src/qpid/broker/Link.cpp15
-rw-r--r--qpid/cpp/src/qpid/broker/Message.cpp84
-rw-r--r--qpid/cpp/src/qpid/broker/Message.h35
-rw-r--r--qpid/cpp/src/qpid/broker/Queue.cpp7
-rw-r--r--qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp17
-rw-r--r--qpid/cpp/src/qpid/broker/SemanticState.cpp23
-rw-r--r--qpid/cpp/src/qpid/broker/SemanticState.h29
-rw-r--r--qpid/cpp/src/qpid/broker/SessionState.cpp5
-rw-r--r--qpid/cpp/src/qpid/broker/SessionState.h10
-rw-r--r--qpid/cpp/src/qpid/broker/TxBuffer.cpp2
-rw-r--r--qpid/cpp/src/qpid/broker/TxPublish.h91
-rw-r--r--qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp1
-rw-r--r--qpid/cpp/src/qpid/broker/windows/SslProtocolFactory.cpp44
-rw-r--r--qpid/cpp/src/qpid/client/ConnectionHandler.cpp4
-rw-r--r--qpid/cpp/src/qpid/client/ConnectionImpl.cpp2
-rw-r--r--qpid/cpp/src/qpid/client/SessionImpl.cpp1
-rw-r--r--qpid/cpp/src/qpid/client/SslConnector.cpp2
-rw-r--r--qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp39
-rw-r--r--qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp20
-rw-r--r--qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp45
-rw-r--r--qpid/cpp/src/qpid/client/amqp0_10/SimpleUrlParser.cpp79
-rw-r--r--qpid/cpp/src/qpid/client/amqp0_10/SimpleUrlParser.h42
-rw-r--r--qpid/cpp/src/qpid/cluster/Cluster.cpp25
-rw-r--r--qpid/cpp/src/qpid/cluster/Cluster.h34
-rw-r--r--qpid/cpp/src/qpid/cluster/Connection.cpp157
-rw-r--r--qpid/cpp/src/qpid/cluster/Connection.h20
-rw-r--r--qpid/cpp/src/qpid/cluster/Multicaster.cpp3
-rw-r--r--qpid/cpp/src/qpid/cluster/SecureConnectionFactory.cpp8
-rw-r--r--qpid/cpp/src/qpid/cluster/UpdateClient.cpp118
-rw-r--r--qpid/cpp/src/qpid/cluster/UpdateClient.h10
-rw-r--r--qpid/cpp/src/qpid/cluster/UpdateExchange.cpp8
-rw-r--r--qpid/cpp/src/qpid/cluster/UpdateReceiver.h14
-rw-r--r--qpid/cpp/src/qpid/framing/AMQFrame.cpp5
-rw-r--r--qpid/cpp/src/qpid/framing/AMQFrame.h5
-rw-r--r--qpid/cpp/src/qpid/framing/FieldTable.cpp4
-rw-r--r--qpid/cpp/src/qpid/framing/List.cpp6
-rw-r--r--qpid/cpp/src/qpid/log/Statement.cpp5
-rw-r--r--qpid/cpp/src/qpid/log/posix/SinkOptions.cpp2
-rw-r--r--qpid/cpp/src/qpid/management/ManagementAgent.cpp2
-rw-r--r--qpid/cpp/src/qpid/messaging/AddressParser.cpp3
-rw-r--r--qpid/cpp/src/qpid/messaging/Message.cpp7
-rw-r--r--qpid/cpp/src/qpid/replication/ReplicatingEventListener.cpp7
-rw-r--r--qpid/cpp/src/qpid/replication/ReplicationExchange.cpp9
-rw-r--r--qpid/cpp/src/qpid/store/StorageProvider.h2
-rw-r--r--qpid/cpp/src/qpid/sys/CopyOnWriteArray.h6
-rw-r--r--qpid/cpp/src/qpid/sys/PollableQueue.h21
-rw-r--r--qpid/cpp/src/qpid/sys/Socket.h7
-rw-r--r--qpid/cpp/src/qpid/sys/SocketAddress.h10
-rw-r--r--qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp55
-rw-r--r--qpid/cpp/src/qpid/sys/TimerWarnings.cpp6
-rw-r--r--qpid/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp1
-rw-r--r--qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp7
-rw-r--r--qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp24
-rw-r--r--qpid/cpp/src/qpid/sys/posix/Socket.cpp63
-rw-r--r--qpid/cpp/src/qpid/sys/posix/SocketAddress.cpp74
-rw-r--r--qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp47
-rwxr-xr-xqpid/cpp/src/qpid/sys/windows/AsynchIoResult.h4
-rw-r--r--[-rwxr-xr-x]qpid/cpp/src/qpid/sys/windows/Socket.cpp128
-rw-r--r--qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp121
-rw-r--r--qpid/cpp/src/qpid/sys/windows/SslAsynchIO.h3
-rwxr-xr-xqpid/cpp/src/qpid/sys/windows/Thread.cpp285
-rw-r--r--qpid/cpp/src/qpid/types/Variant.cpp1
-rw-r--r--qpid/cpp/src/tests/BrokerFixture.h32
-rw-r--r--qpid/cpp/src/tests/CMakeLists.txt11
-rw-r--r--qpid/cpp/src/tests/ClientSessionTest.cpp26
-rw-r--r--qpid/cpp/src/tests/ExchangeTest.cpp2
-rw-r--r--qpid/cpp/src/tests/Makefile.am7
-rw-r--r--qpid/cpp/src/tests/MessageReplayTracker.cpp4
-rw-r--r--qpid/cpp/src/tests/MessagingSessionTests.cpp36
-rw-r--r--qpid/cpp/src/tests/Qmf2.cpp104
-rw-r--r--qpid/cpp/src/tests/QueueEvents.cpp4
-rw-r--r--qpid/cpp/src/tests/QueuePolicyTest.cpp14
-rw-r--r--qpid/cpp/src/tests/QueueTest.cpp60
-rw-r--r--qpid/cpp/src/tests/ReplicationTest.cpp2
-rw-r--r--qpid/cpp/src/tests/SessionState.cpp8
-rw-r--r--qpid/cpp/src/tests/SocketProxy.h183
-rw-r--r--qpid/cpp/src/tests/TxPublishTest.cpp3
-rw-r--r--qpid/cpp/src/tests/Url.cpp26
-rw-r--r--qpid/cpp/src/tests/XmlClientSessionTest.cpp2
-rwxr-xr-xqpid/cpp/src/tests/allhosts4
-rw-r--r--qpid/cpp/src/tests/brokertest.py33
-rw-r--r--qpid/cpp/src/tests/cluster_python_tests_failing.txt28
-rwxr-xr-xqpid/cpp/src/tests/cluster_test_logs.py1
-rwxr-xr-xqpid/cpp/src/tests/cluster_tests.py387
-rw-r--r--qpid/cpp/src/tests/exception_test.cpp14
-rwxr-xr-xqpid/cpp/src/tests/federated_topic_test27
-rwxr-xr-xqpid/cpp/src/tests/federation.py85
-rwxr-xr-xqpid/cpp/src/tests/federation_sys.py1900
-rwxr-xr-xqpid/cpp/src/tests/ipv6_test150
-rwxr-xr-xqpid/cpp/src/tests/qpid-cpp-benchmark3
-rw-r--r--qpid/cpp/src/tests/qpid-perftest.cpp7
-rwxr-xr-xqpid/cpp/src/tests/run_federation_sys_tests97
-rwxr-xr-xqpid/cpp/src/tests/run_federation_tests2
-rw-r--r--qpid/cpp/src/tests/run_long_federation_sys_tests (renamed from qpid/java/broker/etc/access)43
-rw-r--r--qpid/cpp/src/tests/run_store_tests.ps12
-rwxr-xr-xqpid/cpp/src/tests/sasl_test_setup.sh1
-rw-r--r--qpid/cpp/src/windows/resources/template-resource.rc2
-rw-r--r--qpid/cpp/xml/cluster.xml25
-rw-r--r--qpid/dotnet/Consumer/Program.cs30
-rw-r--r--qpid/dotnet/Consumer/default.build47
-rw-r--r--qpid/dotnet/LICENSE.txt757
-rw-r--r--qpid/dotnet/NOTICE.txt32
-rw-r--r--qpid/dotnet/Producer/Program.cs30
-rw-r--r--qpid/dotnet/Producer/default.build47
-rw-r--r--qpid/dotnet/Program.cs30
-rw-r--r--qpid/dotnet/Qpid.Buffer.Tests/Properties/AssemblyInfo.cs56
-rw-r--r--qpid/dotnet/Qpid.Buffer.Tests/Qpid.Buffer.Tests.csproj83
-rw-r--r--qpid/dotnet/Qpid.Buffer.Tests/SimpleByteBufferTests.cs333
-rw-r--r--qpid/dotnet/Qpid.Buffer.Tests/SlicedByteBufferTests.cs133
-rw-r--r--qpid/dotnet/Qpid.Buffer.Tests/default.build48
-rw-r--r--qpid/dotnet/Qpid.Buffer/ByteBuffer.cs982
-rw-r--r--qpid/dotnet/Qpid.Buffer/ByteBufferHexDumper.cs79
-rw-r--r--qpid/dotnet/Qpid.Buffer/IByteBufferAllocator.cs50
-rw-r--r--qpid/dotnet/Qpid.Buffer/Properties/AssemblyInfo.cs53
-rw-r--r--qpid/dotnet/Qpid.Buffer/Qpid.Buffer.csproj77
-rw-r--r--qpid/dotnet/Qpid.Buffer/SimpleByteBuffer.cs120
-rw-r--r--qpid/dotnet/Qpid.Buffer/SimpleByteBufferAllocator.cs58
-rw-r--r--qpid/dotnet/Qpid.Buffer/SlicedByteBuffer.cs86
-rw-r--r--qpid/dotnet/Qpid.Buffer/default.build46
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/App.config34
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/BrokerDetails/BrokerDetailsTest.cs65
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/Channel/ChannelMessageCreationTests.cs79
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/Messages/MessageFactoryRegistryTests.cs114
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/Properties/AssemblyInfo.cs53
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/Qpid.Client.Tests.csproj158
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/Security/CallbackHandlerRegistryTests.cs66
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/default.build64
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/interop/Consumer.cs56
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/interop/Producer.cs55
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/interop/TopicListener.cs229
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/interop/TopicPublisher.cs208
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/lib/nunit/nunit-licence.txt23
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/lib/nunit/nunit.framework.dllbin45056 -> 0 bytes
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/log4net.config68
-rw-r--r--qpid/dotnet/Qpid.Client.Tests/url/ConnectionUrlTest.cs446
-rw-r--r--qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs135
-rw-r--r--qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketTransport.cs121
-rw-r--r--qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/ByteChannel.cs63
-rw-r--r--qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Properties/AssemblyInfo.cs53
-rw-r--r--qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.csproj92
-rw-r--r--qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.mdp50
-rw-r--r--qpid/dotnet/Qpid.Client/Client/AMQAuthenticationException.cs39
-rw-r--r--qpid/dotnet/Qpid.Client/Client/AMQConnection.cs873
-rw-r--r--qpid/dotnet/Qpid.Client/Client/AMQConnectionException.cs38
-rw-r--r--qpid/dotnet/Qpid.Client/Client/AMQDestination.cs234
-rw-r--r--qpid/dotnet/Qpid.Client/Client/AMQNoConsumersException.cs45
-rw-r--r--qpid/dotnet/Qpid.Client/Client/AMQNoRouteException.cs46
-rw-r--r--qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs322
-rw-r--r--qpid/dotnet/Qpid.Client/Client/AmqChannel.cs1241
-rw-r--r--qpid/dotnet/Qpid.Client/Client/BasicMessageConsumer.cs485
-rw-r--r--qpid/dotnet/Qpid.Client/Client/BasicMessageProducer.cs405
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Closeable.cs83
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Configuration/AuthenticationConfigurationSectionHandler.cs84
-rw-r--r--qpid/dotnet/Qpid.Client/Client/ConnectionTuneParameters.cs83
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Failover/FailoverException.cs42
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Failover/FailoverHandler.cs175
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Failover/FailoverState.cs31
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Failover/FailoverSupport.cs55
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Handler/BasicDeliverMethodHandler.cs42
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Handler/BasicReturnMethodHandler.cs44
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Handler/ChannelCloseMethodHandler.cs68
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Handler/ConnectionCloseMethodHandler.cs68
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Handler/ConnectionCloseOkHandler.cs41
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Handler/ConnectionOpenOkMethodHandler.cs35
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs68
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Handler/ConnectionSecureMethodHandler.cs60
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Handler/ConnectionStartMethodHandler.cs144
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Handler/ConnectionTuneMethodHandler.cs63
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Handler/QueueDeleteOkMethodHandler.cs44
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Handler/QueuePurgeOkMethodHandler.cs44
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Message/AMQMessage.cs58
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Message/AMQMessageFactory.cs73
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Message/AbstractQmsMessage.cs694
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Message/IMessageFactory.cs52
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Message/MessageFactoryRegistry.cs129
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Message/QpidBytesMessage.cs353
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Message/QpidBytesMessageFactory.cs75
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Message/QpidHeaders.cs233
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Message/QpidTextMessage.cs115
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Message/QpidTextMessageFactory.cs40
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Message/UnexpectedBodyReceivedException.cs57
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Message/UnprocessedMessage.cs57
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Protocol/AMQMethodEvent.cs76
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Protocol/AMQProtocolListener.cs318
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs267
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Protocol/DefaultTimeouts.cs47
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Protocol/IConnectionCloser.cs27
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Protocol/IProtocolListener.cs36
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Protocol/Listener/BlockingMethodFrameListener.cs110
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Protocol/Listener/IAMQMethodListener.cs46
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Protocol/Listener/SpecificMethodFrameListener.cs42
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Protocol/ProtocolWriter.cs107
-rw-r--r--qpid/dotnet/Qpid.Client/Client/QpidConnectionInfo.cs504
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Security/CallbackHandlerRegistry.cs129
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Security/IAMQCallbackHandler.cs35
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Security/UsernamePasswordCallbackHandler.cs56
-rw-r--r--qpid/dotnet/Qpid.Client/Client/SslOptions.cs81
-rw-r--r--qpid/dotnet/Qpid.Client/Client/State/AMQState.cs35
-rw-r--r--qpid/dotnet/Qpid.Client/Client/State/AMQStateChangedEvent.cs52
-rw-r--r--qpid/dotnet/Qpid.Client/Client/State/AMQStateManager.cs251
-rw-r--r--qpid/dotnet/Qpid.Client/Client/State/IAMQStateListener.cs29
-rw-r--r--qpid/dotnet/Qpid.Client/Client/State/IStateAwareMethodListener.cs31
-rw-r--r--qpid/dotnet/Qpid.Client/Client/State/IStateListener.cs33
-rw-r--r--qpid/dotnet/Qpid.Client/Client/State/IllegalStateTransitionException.cs74
-rw-r--r--qpid/dotnet/Qpid.Client/Client/State/StateWaiter.cs121
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/AMQProtocolProvider.cs47
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/AmqpChannel.cs111
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/IByteChannel.cs71
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/IProtocolChannel.cs32
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/IProtocolWriter.cs29
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/IStreamFilter.cs38
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/ITransport.cs32
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/IoHandler.cs322
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/ProtocolDecoderOutput.cs60
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/SingleProtocolEncoderOutput.cs40
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/BlockingSocketTransport.cs150
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/ByteChannel.cs92
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/ISocketConnector.cs34
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/SocketConnector.cs71
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/SslSocketConnector.cs107
-rw-r--r--qpid/dotnet/Qpid.Client/Client/Util/FlowControlQueue.cs98
-rw-r--r--qpid/dotnet/Qpid.Client/Properties/AssemblyInfo.cs52
-rw-r--r--qpid/dotnet/Qpid.Client/Qpid.Client.csproj102
-rw-r--r--qpid/dotnet/Qpid.Client/default.build52
-rw-r--r--qpid/dotnet/Qpid.Client/qms/BrokerInfo.cs55
-rw-r--r--qpid/dotnet/Qpid.Client/qms/ConnectionInfo.cs63
-rw-r--r--qpid/dotnet/Qpid.Client/qms/FailoverPolicy.cs315
-rw-r--r--qpid/dotnet/Qpid.Client/qms/UrlSyntaxException.cs134
-rw-r--r--qpid/dotnet/Qpid.Client/qms/failover/FailoverMethod.cs78
-rw-r--r--qpid/dotnet/Qpid.Client/qms/failover/FailoverRoundRobin.cs255
-rw-r--r--qpid/dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs147
-rw-r--r--qpid/dotnet/Qpid.Codec/CumulativeProtocolDecoder.cs152
-rw-r--r--qpid/dotnet/Qpid.Codec/Demux/DemuxingProtocolCodecFactory.cs387
-rw-r--r--qpid/dotnet/Qpid.Codec/Demux/IMessageDecoder.cs56
-rw-r--r--qpid/dotnet/Qpid.Codec/Demux/IMessageDecoderFactory.cs32
-rw-r--r--qpid/dotnet/Qpid.Codec/Demux/IMessageEncoder.cs48
-rw-r--r--qpid/dotnet/Qpid.Codec/Demux/IMessageEncoderFactory.cs32
-rw-r--r--qpid/dotnet/Qpid.Codec/Demux/MessageDecoderResult.cs29
-rw-r--r--qpid/dotnet/Qpid.Codec/IProtocolCodecFactory.cs37
-rw-r--r--qpid/dotnet/Qpid.Codec/IProtocolDecoder.cs41
-rw-r--r--qpid/dotnet/Qpid.Codec/IProtocolDecoderOutput.cs35
-rw-r--r--qpid/dotnet/Qpid.Codec/IProtocolEncoder.cs41
-rw-r--r--qpid/dotnet/Qpid.Codec/IProtocolEncoderOutput.cs37
-rw-r--r--qpid/dotnet/Qpid.Codec/Properties/AssemblyInfo.cs53
-rw-r--r--qpid/dotnet/Qpid.Codec/ProtocolDecoderException.cs70
-rw-r--r--qpid/dotnet/Qpid.Codec/ProtocolEncoderException.cs49
-rw-r--r--qpid/dotnet/Qpid.Codec/Qpid.Codec.csproj82
-rw-r--r--qpid/dotnet/Qpid.Codec/Support/SimpleProtocolDecoderOutput.cs44
-rw-r--r--qpid/dotnet/Qpid.Codec/Support/SimpleProtocolEncoderOutput.cs43
-rw-r--r--qpid/dotnet/Qpid.Codec/default.build47
-rw-r--r--qpid/dotnet/Qpid.Common.Tests/Properties/AssemblyInfo.cs54
-rw-r--r--qpid/dotnet/Qpid.Common.Tests/Qpid.Common.Tests.csproj87
-rw-r--r--qpid/dotnet/Qpid.Common.Tests/Qpid/Collections/TestConsumerProducerQueue.cs85
-rw-r--r--qpid/dotnet/Qpid.Common.Tests/Qpid/Collections/TestLinkedHashtable.cs83
-rw-r--r--qpid/dotnet/Qpid.Common.Tests/Qpid/Framing/TestAMQType.cs270
-rw-r--r--qpid/dotnet/Qpid.Common.Tests/Qpid/Framing/TestEncodingUtils.cs60
-rw-r--r--qpid/dotnet/Qpid.Common.Tests/default.build52
-rw-r--r--qpid/dotnet/Qpid.Common/AMQChannelClosedException.cs40
-rw-r--r--qpid/dotnet/Qpid.Common/AMQConnectionClosedException.cs51
-rw-r--r--qpid/dotnet/Qpid.Common/AMQDisconnectedException.cs45
-rw-r--r--qpid/dotnet/Qpid.Common/AMQException.cs149
-rw-r--r--qpid/dotnet/Qpid.Common/AMQInvalidArgumentException.cs46
-rw-r--r--qpid/dotnet/Qpid.Common/AMQUndeliveredException.cs59
-rw-r--r--qpid/dotnet/Qpid.Common/AssemblySettings.cs160
-rw-r--r--qpid/dotnet/Qpid.Common/Collections/BlockingQueue.cs95
-rw-r--r--qpid/dotnet/Qpid.Common/Collections/ConsumerProducerQueue.cs113
-rw-r--r--qpid/dotnet/Qpid.Common/Collections/LinkedBlockingQueue.cs384
-rw-r--r--qpid/dotnet/Qpid.Common/Collections/LinkedHashtable.cs327
-rw-r--r--qpid/dotnet/Qpid.Common/Collections/SynchronousQueue.cs375
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs155
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/AMQDataBlockEncoder.cs65
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/AMQFrame.cs107
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/AMQFrameDecodingException.cs59
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/AMQMethodBody.cs93
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/AMQMethodBodyFactory.cs45
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/AMQProtocolHeaderException.cs39
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/AMQType.cs700
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/AMQTypeMap.cs75
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/AMQTypedValue.cs76
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/BasicContentHeaderProperties.cs290
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/CompositeAMQDataBlock.cs85
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/ContentBody.cs100
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/ContentBodyFactory.cs53
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/ContentHeaderBody.cs118
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/ContentHeaderBodyFactory.cs53
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/ContentHeaderPropertiesFactory.cs63
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/EncodingUtils.cs460
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/FieldTable.cs633
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/HeartbeatBody.cs64
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/HeartbeatBodyFactory.cs32
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/IBody.cs63
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/IBodyFactory.cs38
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/IContentHeaderProperties.cs65
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/IDataBlock.cs47
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/IEncodableAMQDataBlock.cs31
-rw-r--r--qpid/dotnet/Qpid.Common/Framing/ProtocolInitiation.cs158
-rw-r--r--qpid/dotnet/Qpid.Common/Properties/AssemblyInfo.cs52
-rw-r--r--qpid/dotnet/Qpid.Common/Protocol/AMQConstant.cs100
-rw-r--r--qpid/dotnet/Qpid.Common/Qpid.Common.csproj104
-rw-r--r--qpid/dotnet/Qpid.Common/amqp.xml3929
-rw-r--r--qpid/dotnet/Qpid.Common/build.xml95
-rw-r--r--qpid/dotnet/Qpid.Common/default.build49
-rw-r--r--qpid/dotnet/Qpid.Common/lib/log4net/log4net-licence.txt201
-rw-r--r--qpid/dotnet/Qpid.Common/lib/log4net/log4net.dllbin266240 -> 0 bytes
-rw-r--r--qpid/dotnet/Qpid.Common/lib/log4net/log4net.xml28676
-rw-r--r--qpid/dotnet/Qpid.Common/lib/saxon/saxon-licence.txt471
-rw-r--r--qpid/dotnet/Qpid.Common/lib/saxon/saxon8.jarbin3118502 -> 0 bytes
-rw-r--r--qpid/dotnet/Qpid.Common/lib/seclib-1.0.0/Org.Mentalis.Security.dllbin184320 -> 0 bytes
-rw-r--r--qpid/dotnet/Qpid.Common/lib/seclib-1.0.0/seclib-license.txt13
-rw-r--r--qpid/dotnet/Qpid.Common/resources/registry.template24
-rw-r--r--qpid/dotnet/Qpid.Common/stylesheets/csharp.xsl251
-rw-r--r--qpid/dotnet/Qpid.Common/stylesheets/framing.xsl65
-rw-r--r--qpid/dotnet/Qpid.Common/stylesheets/java.xsl230
-rw-r--r--qpid/dotnet/Qpid.Common/stylesheets/prepare1.xsl109
-rw-r--r--qpid/dotnet/Qpid.Common/stylesheets/prepare2.xsl68
-rw-r--r--qpid/dotnet/Qpid.Common/stylesheets/prepare3.xsl64
-rw-r--r--qpid/dotnet/Qpid.Common/stylesheets/readme.txt52
-rw-r--r--qpid/dotnet/Qpid.Common/stylesheets/registry.xsl33
-rw-r--r--qpid/dotnet/Qpid.Common/stylesheets/utils.xsl185
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/Properties/AssemblyInfo.cs53
-rwxr-xr-xqpid/dotnet/Qpid.Integration.Tests/Qpid.Integration.Tests.csproj124
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/README.txt3
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/default.build69
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/Assertion.cs39
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/Assertion.csx39
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/AssertionBase.csx65
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/BrokerLifecycleAware.csx67
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/CauseFailure.csx41
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/CauseFailureUserPrompt.csx63
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/Circuit.cs102
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/Circuit.csx103
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/CircuitEnd.csx86
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/CircuitEndBase.csx146
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/ExceptionMonitor.csx184
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/FrameworkBaseCase.cs282
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/FrameworkBaseCase.csx272
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/LocalCircuitFactory.csx301
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/MessageMonitor.csx102
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/MessagingTestConfigProperties.csx652
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/NotApplicableAssertion.csx111
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/Publisher.cs65
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/Publisher.csx72
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/README.txt3
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/Receiver.cs80
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/Receiver.csx88
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/TestClientDetails.cs84
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/TestClientDetails.csx82
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/TestModel.cs657
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/TestUtils.csx188
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/alljava.csx7851
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/ClockSynchFailureException.csx45
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/ClockSynchThread.csx117
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/ClockSynchronizer.csx66
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/LocalClockSynchronizer.csx70
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/UDPClockSynchronizer.csx453
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/distributedcircuit/TestClient.csx493
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/distributedcircuit/TestClientCircuitEnd.csx312
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/distributedcircuit/TestClientControlledTest.csx104
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/localcircuit/LocalCircuitImpl.csx290
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/localcircuit/LocalPublisherImpl.csx164
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/localcircuit/LocalReceiverImpl.csx137
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/sequencers/BaseCircuitFactory.csx128
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/sequencers/CircuitFactory.cs85
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/framework/sequencers/CircuitFactory.csx99
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/interactive/FailoverTest.cs397
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/interactive/SendReceiveTest.cs181
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/interop/InteropClientTestCase.cs87
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase1DummyRun.cs89
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase2BasicP2P.cs205
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase3BasicPubSub.cs244
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase4P2PMessageSize.cs244
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase5PubSubMessageSize.cs252
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/interop/TestClient.cs381
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/log4net.config69
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/old/ServiceProvidingClient.tmp150
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/old/ServiceRequestingClient.tmp182
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs280
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/testcases/ChannelQueueTest.cs237
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs261
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/testcases/ConnectionTest.cs73
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs166
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/testcases/HeadersExchangeTest.cs282
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/testcases/MandatoryMessageTest.cs149
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/testcases/ProducerMultiConsumerTest.cs167
-rwxr-xr-xqpid/dotnet/Qpid.Integration.Tests/testcases/Qpid.Integration.Tests.csproj64
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/testcases/QueueBrowsingTest.cs121
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/testcases/SslConnectionTest.cs64
-rw-r--r--qpid/dotnet/Qpid.Integration.Tests/testcases/SustainedTest.cs109
-rw-r--r--qpid/dotnet/Qpid.Messaging/AcknowledgeMode.cs42
-rw-r--r--qpid/dotnet/Qpid.Messaging/ChannelLimitReachedException.cs60
-rw-r--r--qpid/dotnet/Qpid.Messaging/DeliveryMode.cs28
-rw-r--r--qpid/dotnet/Qpid.Messaging/ExchangeClassConstants.cs29
-rw-r--r--qpid/dotnet/Qpid.Messaging/ExchangeNameDefaults.cs42
-rw-r--r--qpid/dotnet/Qpid.Messaging/IBytesMessage.cs63
-rw-r--r--qpid/dotnet/Qpid.Messaging/IChannel.cs280
-rw-r--r--qpid/dotnet/Qpid.Messaging/ICloseable.cs38
-rw-r--r--qpid/dotnet/Qpid.Messaging/IConnection.cs55
-rw-r--r--qpid/dotnet/Qpid.Messaging/IConnectionFactory.cs28
-rw-r--r--qpid/dotnet/Qpid.Messaging/IConnectionListener.cs59
-rw-r--r--qpid/dotnet/Qpid.Messaging/IFieldTable.cs42
-rw-r--r--qpid/dotnet/Qpid.Messaging/IHeaders.cs67
-rw-r--r--qpid/dotnet/Qpid.Messaging/IMessage.cs97
-rw-r--r--qpid/dotnet/Qpid.Messaging/IMessageConsumer.cs79
-rw-r--r--qpid/dotnet/Qpid.Messaging/IMessagePublisher.cs92
-rw-r--r--qpid/dotnet/Qpid.Messaging/ITextMessage.cs27
-rw-r--r--qpid/dotnet/Qpid.Messaging/MessageConsumerBuilder.cs113
-rw-r--r--qpid/dotnet/Qpid.Messaging/MessageNotReadableException.cs39
-rw-r--r--qpid/dotnet/Qpid.Messaging/MessageNotWritableException.cs38
-rw-r--r--qpid/dotnet/Qpid.Messaging/MessagePublisherBuilder.cs91
-rw-r--r--qpid/dotnet/Qpid.Messaging/Properties/AssemblyInfo.cs56
-rw-r--r--qpid/dotnet/Qpid.Messaging/Qpid.Messaging.csproj115
-rw-r--r--qpid/dotnet/Qpid.Messaging/QpidException.cs43
-rw-r--r--qpid/dotnet/Qpid.Messaging/ResourceAllocationException.cs39
-rw-r--r--qpid/dotnet/Qpid.Messaging/default.build45
-rw-r--r--qpid/dotnet/Qpid.NET.FxCop16775
-rw-r--r--qpid/dotnet/Qpid.NET.sln116
-rw-r--r--qpid/dotnet/Qpid.Sasl.Tests/App.config33
-rw-r--r--qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/AnonymousSaslClientTests.cs72
-rw-r--r--qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/CramMD5SaslClientTests.cs90
-rw-r--r--qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/DigestSaslClientTests.cs249
-rw-r--r--qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/ExternalSaslClientTests.cs71
-rw-r--r--qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/PlainSaslClientTests.cs88
-rw-r--r--qpid/dotnet/Qpid.Sasl.Tests/Properties/AssemblyInfo.cs56
-rw-r--r--qpid/dotnet/Qpid.Sasl.Tests/Qpid.Sasl.Tests.csproj86
-rw-r--r--qpid/dotnet/Qpid.Sasl.Tests/SaslTests.cs133
-rw-r--r--qpid/dotnet/Qpid.Sasl.Tests/TestClientFactory.cs75
-rw-r--r--qpid/dotnet/Qpid.Sasl.Tests/default.build52
-rw-r--r--qpid/dotnet/Qpid.Sasl/Callbacks.cs139
-rw-r--r--qpid/dotnet/Qpid.Sasl/Configuration/SaslConfiguration.cs90
-rw-r--r--qpid/dotnet/Qpid.Sasl/Configuration/SaslConfigurationSectionHandler.cs84
-rw-r--r--qpid/dotnet/Qpid.Sasl/DefaultClientFactory.cs99
-rw-r--r--qpid/dotnet/Qpid.Sasl/ISaslCallbackHandler.cs35
-rw-r--r--qpid/dotnet/Qpid.Sasl/ISaslClient.cs42
-rw-r--r--qpid/dotnet/Qpid.Sasl/ISaslClientFactory.cs40
-rw-r--r--qpid/dotnet/Qpid.Sasl/MD5HMAC.cs115
-rw-r--r--qpid/dotnet/Qpid.Sasl/Mechanisms/AnonymousSaslClient.cs69
-rw-r--r--qpid/dotnet/Qpid.Sasl/Mechanisms/CramMD5HexSaslClient.cs93
-rw-r--r--qpid/dotnet/Qpid.Sasl/Mechanisms/CramMD5SaslClient.cs91
-rw-r--r--qpid/dotnet/Qpid.Sasl/Mechanisms/DigestSaslClient.cs576
-rw-r--r--qpid/dotnet/Qpid.Sasl/Mechanisms/ExternalSaslClient.cs69
-rw-r--r--qpid/dotnet/Qpid.Sasl/Mechanisms/PlainSaslClient.cs81
-rw-r--r--qpid/dotnet/Qpid.Sasl/Properties/AssemblyInfo.cs57
-rw-r--r--qpid/dotnet/Qpid.Sasl/Qpid.Sasl.csproj73
-rw-r--r--qpid/dotnet/Qpid.Sasl/Sasl.cs115
-rw-r--r--qpid/dotnet/Qpid.Sasl/SaslClient.cs145
-rw-r--r--qpid/dotnet/Qpid.Sasl/SaslException.cs56
-rw-r--r--qpid/dotnet/Qpid.Sasl/SaslProperties.cs42
-rw-r--r--qpid/dotnet/Qpid.Sasl/default.build45
-rw-r--r--qpid/dotnet/README.txt90
-rw-r--r--qpid/dotnet/RELEASE_NOTES.txt11
-rw-r--r--qpid/dotnet/TestClient/Program.cs30
-rw-r--r--qpid/dotnet/TestClient/Properties/AssemblyInfo.cs53
-rw-r--r--qpid/dotnet/TestClient/TestClient.csproj115
-rw-r--r--qpid/dotnet/TestClient/default.build47
-rw-r--r--qpid/dotnet/TopicListener/Program.cs30
-rw-r--r--qpid/dotnet/TopicListener/Properties/AssemblyInfo.cs53
-rw-r--r--qpid/dotnet/TopicListener/TopicListener.csproj115
-rw-r--r--qpid/dotnet/TopicListener/default.build47
-rw-r--r--qpid/dotnet/TopicPublisher/Program.cs30
-rw-r--r--qpid/dotnet/TopicPublisher/Properties/AssemblyInfo.cs53
-rw-r--r--qpid/dotnet/TopicPublisher/TopicPublisher.csproj111
-rw-r--r--qpid/dotnet/TopicPublisher/default.build47
-rw-r--r--qpid/dotnet/build-framing.bat23
-rw-r--r--qpid/dotnet/build-msbuild.bat22
-rw-r--r--qpid/dotnet/build-nant.bat22
-rw-r--r--qpid/dotnet/client-010/App.config34
-rw-r--r--qpid/dotnet/client-010/LICENSE.txt757
-rw-r--r--qpid/dotnet/client-010/NOTICE.txt32
-rw-r--r--qpid/dotnet/client-010/README.txt69
-rw-r--r--qpid/dotnet/client-010/addins/ExcelAddIn/Excel.exe.config12
-rw-r--r--qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.cs290
-rw-r--r--qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.csproj89
-rw-r--r--qpid/dotnet/client-010/addins/ExcelAddIn/Properties/AssemblyInfo.cs56
-rw-r--r--qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/ExcelAddInMessageProcessor.csproj86
-rw-r--r--qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/Processor.cs44
-rw-r--r--qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/Properties/AssemblyInfo.cs56
-rw-r--r--qpid/dotnet/client-010/addins/ExcelAddInProducer/ExcelAddInProducer.csproj83
-rw-r--r--qpid/dotnet/client-010/addins/ExcelAddInProducer/Program.cs62
-rw-r--r--qpid/dotnet/client-010/addins/ExcelAddInProducer/Properties/AssemblyInfo.cs54
-rw-r--r--qpid/dotnet/client-010/addins/README.txt29
-rw-r--r--qpid/dotnet/client-010/client/Client.csproj242
-rw-r--r--qpid/dotnet/client-010/client/Properties/AssemblyInfo.cs56
-rw-r--r--qpid/dotnet/client-010/client/client.sln129
-rw-r--r--qpid/dotnet/client-010/client/client.suobin572415 -> 0 bytes
-rw-r--r--qpid/dotnet/client-010/client/client/Client.cs195
-rw-r--r--qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs128
-rw-r--r--qpid/dotnet/client-010/client/client/ClientInterface.cs59
-rw-r--r--qpid/dotnet/client-010/client/client/ClientSession.cs109
-rw-r--r--qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs55
-rw-r--r--qpid/dotnet/client-010/client/client/ClosedListenerInterface.cs29
-rw-r--r--qpid/dotnet/client-010/client/client/ErrorCode.cs140
-rw-r--r--qpid/dotnet/client-010/client/client/IClient.cs82
-rw-r--r--qpid/dotnet/client-010/client/client/IClientSession.cs39
-rw-r--r--qpid/dotnet/client-010/client/client/IClosedListener.cs29
-rw-r--r--qpid/dotnet/client-010/client/client/IMessage.cs48
-rw-r--r--qpid/dotnet/client-010/client/client/IMessageListener.cs31
-rw-r--r--qpid/dotnet/client-010/client/client/Message.cs131
-rw-r--r--qpid/dotnet/client-010/client/default.build46
-rw-r--r--qpid/dotnet/client-010/client/transport/Binary.cs129
-rw-r--r--qpid/dotnet/client-010/client/transport/Binding.cs34
-rw-r--r--qpid/dotnet/client-010/client/transport/Channel.cs174
-rw-r--r--qpid/dotnet/client-010/client/transport/ChannelDelegate.cs41
-rw-r--r--qpid/dotnet/client-010/client/transport/ClientDelegate.cs35
-rw-r--r--qpid/dotnet/client-010/client/transport/Connection.cs168
-rw-r--r--qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs108
-rw-r--r--qpid/dotnet/client-010/client/transport/Field.cs74
-rw-r--r--qpid/dotnet/client-010/client/transport/Future.cs38
-rw-r--r--qpid/dotnet/client-010/client/transport/Header.cs83
-rw-r--r--qpid/dotnet/client-010/client/transport/IBinding.cs34
-rw-r--r--qpid/dotnet/client-010/client/transport/IFuture.cs38
-rw-r--r--qpid/dotnet/client-010/client/transport/IProtocolDelegate.cs37
-rw-r--r--qpid/dotnet/client-010/client/transport/IProtocolEvent.cs42
-rw-r--r--qpid/dotnet/client-010/client/transport/IReceiver.cs38
-rw-r--r--qpid/dotnet/client-010/client/transport/ISender.cs32
-rw-r--r--qpid/dotnet/client-010/client/transport/ISession.cs73
-rw-r--r--qpid/dotnet/client-010/client/transport/Method.cs150
-rw-r--r--qpid/dotnet/client-010/client/transport/ProtocolDelegate.cs37
-rw-r--r--qpid/dotnet/client-010/client/transport/ProtocolError.cs85
-rw-r--r--qpid/dotnet/client-010/client/transport/ProtocolEvent.cs42
-rw-r--r--qpid/dotnet/client-010/client/transport/ProtocolHeader.cs124
-rw-r--r--qpid/dotnet/client-010/client/transport/Range.cs117
-rw-r--r--qpid/dotnet/client-010/client/transport/RangeSet.cs150
-rw-r--r--qpid/dotnet/client-010/client/transport/ReceivedPayload.cs43
-rw-r--r--qpid/dotnet/client-010/client/transport/Receiver.cs38
-rw-r--r--qpid/dotnet/client-010/client/transport/Sender.cs32
-rw-r--r--qpid/dotnet/client-010/client/transport/Session.cs522
-rw-r--r--qpid/dotnet/client-010/client/transport/SessionDelegate.cs126
-rw-r--r--qpid/dotnet/client-010/client/transport/Struct.cs121
-rw-r--r--qpid/dotnet/client-010/client/transport/codec/AbstractDecoder.cs399
-rw-r--r--qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs590
-rw-r--r--qpid/dotnet/client-010/client/transport/codec/Decoder.cs72
-rw-r--r--qpid/dotnet/client-010/client/transport/codec/Encodable.cs37
-rw-r--r--qpid/dotnet/client-010/client/transport/codec/Encoder.cs70
-rw-r--r--qpid/dotnet/client-010/client/transport/codec/IDecoder.cs72
-rw-r--r--qpid/dotnet/client-010/client/transport/codec/IEncodable.cs37
-rw-r--r--qpid/dotnet/client-010/client/transport/codec/IEncoder.cs70
-rw-r--r--qpid/dotnet/client-010/client/transport/codec/MSDecoder.cs110
-rw-r--r--qpid/dotnet/client-010/client/transport/codec/MSEncoder.cs172
-rw-r--r--qpid/dotnet/client-010/client/transport/exception/ConnectionException.cs49
-rw-r--r--qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs41
-rw-r--r--qpid/dotnet/client-010/client/transport/exception/ProtocolVersionException.cs59
-rw-r--r--qpid/dotnet/client-010/client/transport/exception/SessionClosedException.cs38
-rw-r--r--qpid/dotnet/client-010/client/transport/exception/SessionException.cs45
-rw-r--r--qpid/dotnet/client-010/client/transport/exception/TransportException.cs46
-rw-r--r--qpid/dotnet/client-010/client/transport/network/Assembler.cs254
-rw-r--r--qpid/dotnet/client-010/client/transport/network/Disassembler.cs222
-rw-r--r--qpid/dotnet/client-010/client/transport/network/Frame.cs143
-rw-r--r--qpid/dotnet/client-010/client/transport/network/IIoSender.cs28
-rw-r--r--qpid/dotnet/client-010/client/transport/network/INetworkDelegate.cs40
-rw-r--r--qpid/dotnet/client-010/client/transport/network/INetworkEvent.cs32
-rw-r--r--qpid/dotnet/client-010/client/transport/network/InputHandler.cs266
-rw-r--r--qpid/dotnet/client-010/client/transport/network/NetworkDelegate.cs40
-rw-r--r--qpid/dotnet/client-010/client/transport/network/NetworkEvent.cs32
-rw-r--r--qpid/dotnet/client-010/client/transport/network/io/IIoSender.cs28
-rw-r--r--qpid/dotnet/client-010/client/transport/network/io/IIoTransport.cs57
-rw-r--r--qpid/dotnet/client-010/client/transport/network/io/IoReceiver.cs185
-rw-r--r--qpid/dotnet/client-010/client/transport/network/io/IoSSLTransport.cs227
-rw-r--r--qpid/dotnet/client-010/client/transport/network/io/IoSender.cs137
-rw-r--r--qpid/dotnet/client-010/client/transport/network/io/IoTransport.cs141
-rw-r--r--qpid/dotnet/client-010/client/transport/util/ByteEncoder.cs218
-rw-r--r--qpid/dotnet/client-010/client/transport/util/CircularBuffer.cs132
-rw-r--r--qpid/dotnet/client-010/client/transport/util/Functions.cs41
-rw-r--r--qpid/dotnet/client-010/client/transport/util/Logger.cs114
-rw-r--r--qpid/dotnet/client-010/client/transport/util/ResultFuture.cs80
-rw-r--r--qpid/dotnet/client-010/client/transport/util/Serial.cs94
-rw-r--r--qpid/dotnet/client-010/client/transport/util/UUID.cs129
-rw-r--r--qpid/dotnet/client-010/default.build275
-rw-r--r--qpid/dotnet/client-010/demo/Demo.csproj110
-rw-r--r--qpid/dotnet/client-010/demo/Program.cs126
-rw-r--r--qpid/dotnet/client-010/demo/Properties/AssemblyInfo.cs54
-rw-r--r--qpid/dotnet/client-010/demo/Properties/Resources.Designer.cs84
-rw-r--r--qpid/dotnet/client-010/demo/Properties/Resources.resx137
-rw-r--r--qpid/dotnet/client-010/demo/Properties/Settings.Designer.cs47
-rw-r--r--qpid/dotnet/client-010/demo/Properties/Settings.settings27
-rw-r--r--qpid/dotnet/client-010/demo/default.build48
-rw-r--r--qpid/dotnet/client-010/examples/direct/example-direct-Listener/Listener.cs117
-rw-r--r--qpid/dotnet/client-010/examples/direct/example-direct-Listener/Properties/AssemblyInfo.cs54
-rw-r--r--qpid/dotnet/client-010/examples/direct/example-direct-Listener/default.build48
-rw-r--r--qpid/dotnet/client-010/examples/direct/example-direct-Listener/example-direct-Listener.csproj85
-rw-r--r--qpid/dotnet/client-010/examples/direct/example-direct-producer/Producer.cs92
-rw-r--r--qpid/dotnet/client-010/examples/direct/example-direct-producer/Properties/AssemblyInfo.cs54
-rw-r--r--qpid/dotnet/client-010/examples/direct/example-direct-producer/default.build48
-rw-r--r--qpid/dotnet/client-010/examples/direct/example-direct-producer/example-direct-producer.csproj85
-rw-r--r--qpid/dotnet/client-010/examples/direct/verify37
-rw-r--r--qpid/dotnet/client-010/examples/direct/verify.in14
-rw-r--r--qpid/dotnet/client-010/examples/direct/verify_cpp_dotnet29
-rw-r--r--qpid/dotnet/client-010/examples/direct/verify_cpp_dotnet.in14
-rw-r--r--qpid/dotnet/client-010/examples/direct/verify_dotnet_cpp29
-rw-r--r--qpid/dotnet/client-010/examples/direct/verify_dotnet_cpp.in15
-rw-r--r--qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Listener.cs126
-rw-r--r--qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Properties/AssemblyInfo.cs54
-rw-r--r--qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/default.build48
-rw-r--r--qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/example-fanout-Listener.csproj85
-rw-r--r--qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Producer.cs89
-rw-r--r--qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Properties/AssemblyInfo.cs54
-rw-r--r--qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/default.build48
-rw-r--r--qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/example-fanout-Producer.csproj85
-rw-r--r--qpid/dotnet/client-010/examples/fanout/verify36
-rw-r--r--qpid/dotnet/client-010/examples/fanout/verify.in14
-rw-r--r--qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet30
-rw-r--r--qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet.in14
-rw-r--r--qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp31
-rw-r--r--qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp.in15
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/Listener.cs143
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/Properties/AssemblyInfo.cs54
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/default.build48
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/example-pub-sub-Listener.csproj85
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/Properties/AssemblyInfo.cs54
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/Publisher.cs98
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/default.build48
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/example-pub-sub-Publisher.csproj85
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/verify36
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/verify.in95
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/verify_cpp_dotnet31
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/verify_cpp_dotnet.in55
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/verify_dotnet_cpp30
-rw-r--r--qpid/dotnet/client-010/examples/pub-sub/verify_dotnet_cpp.in99
-rw-r--r--qpid/dotnet/client-010/examples/request-response/example-request-response-Client/Properties/AssemblyInfo.cs54
-rw-r--r--qpid/dotnet/client-010/examples/request-response/example-request-response-Client/RequestResponseClient.cs142
-rw-r--r--qpid/dotnet/client-010/examples/request-response/example-request-response-Client/default.build48
-rw-r--r--qpid/dotnet/client-010/examples/request-response/example-request-response-Client/example-request-response-Client.csproj85
-rw-r--r--qpid/dotnet/client-010/examples/request-response/example-request-response-Server/Properties/AssemblyInfo.cs54
-rw-r--r--qpid/dotnet/client-010/examples/request-response/example-request-response-Server/Server.cs141
-rw-r--r--qpid/dotnet/client-010/examples/request-response/example-request-response-Server/default.build48
-rw-r--r--qpid/dotnet/client-010/examples/request-response/example-request-response-Server/example-request-response-Server.csproj85
-rw-r--r--qpid/dotnet/client-010/examples/request-response/verify36
-rw-r--r--qpid/dotnet/client-010/examples/request-response/verify.in16
-rw-r--r--qpid/dotnet/client-010/examples/request-response/verify_cpp_dotnet31
-rw-r--r--qpid/dotnet/client-010/examples/request-response/verify_cpp_dotnet.in17
-rw-r--r--qpid/dotnet/client-010/examples/request-response/verify_dotnet_cpp31
-rw-r--r--qpid/dotnet/client-010/examples/request-response/verify_dotnet_cpp.in18
-rw-r--r--qpid/dotnet/client-010/gentool/Composite.tpl291
-rw-r--r--qpid/dotnet/client-010/gentool/Enum.tpl59
-rw-r--r--qpid/dotnet/client-010/gentool/IInvoker.tpl57
-rw-r--r--qpid/dotnet/client-010/gentool/Invoker.tpl67
-rw-r--r--qpid/dotnet/client-010/gentool/StructFactory.tpl64
-rw-r--r--qpid/dotnet/client-010/gentool/Type.tpl103
-rw-r--r--qpid/dotnet/client-010/gentool/build.xml52
-rw-r--r--qpid/dotnet/client-010/gentool/codegen86
-rw-r--r--qpid/dotnet/client-010/gentool/dotnetgenutil.py271
-rw-r--r--qpid/dotnet/client-010/lib/log4net/log4net-licence.txt201
-rw-r--r--qpid/dotnet/client-010/lib/log4net/log4net.dllbin266240 -> 0 bytes
-rw-r--r--qpid/dotnet/client-010/lib/log4net/log4net.xml28676
-rw-r--r--qpid/dotnet/client-010/lib/nunit/nunit-licence.txt23
-rw-r--r--qpid/dotnet/client-010/lib/nunit/nunit.framework.dllbin45056 -> 0 bytes
-rw-r--r--qpid/dotnet/client-010/lib/plossum/C5-License.txt27
-rw-r--r--qpid/dotnet/client-010/lib/plossum/C5.dllbin274432 -> 0 bytes
-rw-r--r--qpid/dotnet/client-010/lib/plossum/Plossum CommandLine.dllbin98304 -> 0 bytes
-rw-r--r--qpid/dotnet/client-010/lib/plossum/license.txt28
-rw-r--r--qpid/dotnet/client-010/log.xml46
-rw-r--r--qpid/dotnet/client-010/management/console/AbstractConsole.cs45
-rw-r--r--qpid/dotnet/client-010/management/console/Agent.cs75
-rw-r--r--qpid/dotnet/client-010/management/console/Broker.cs351
-rw-r--r--qpid/dotnet/client-010/management/console/BrokerURL.cs71
-rw-r--r--qpid/dotnet/client-010/management/console/ClassKey.cs107
-rw-r--r--qpid/dotnet/client-010/management/console/Console.cs46
-rw-r--r--qpid/dotnet/client-010/management/console/MethodResult.cs67
-rw-r--r--qpid/dotnet/client-010/management/console/ObjectID.cs88
-rw-r--r--qpid/dotnet/client-010/management/console/QMFEvent.cs74
-rw-r--r--qpid/dotnet/client-010/management/console/QMFObject.cs294
-rw-r--r--qpid/dotnet/client-010/management/console/SchemaArgument.cs59
-rw-r--r--qpid/dotnet/client-010/management/console/SchemaClass.cs141
-rw-r--r--qpid/dotnet/client-010/management/console/SchemaMethod.cs66
-rw-r--r--qpid/dotnet/client-010/management/console/SchemaProperty.cs59
-rw-r--r--qpid/dotnet/client-010/management/console/SchemaStatistic.cs54
-rw-r--r--qpid/dotnet/client-010/management/console/SchemaVariable.cs84
-rw-r--r--qpid/dotnet/client-010/management/console/SequenceManager.cs62
-rw-r--r--qpid/dotnet/client-010/management/console/Session.cs796
-rw-r--r--qpid/dotnet/client-010/management/console/Util.cs150
-rw-r--r--qpid/dotnet/client-010/management/console/XMLUtil.cs127
-rw-r--r--qpid/dotnet/client-010/management/console/console.csproj101
-rw-r--r--qpid/dotnet/client-010/management/console/console.sln46
-rw-r--r--qpid/dotnet/client-010/management/console/default.build54
-rw-r--r--qpid/dotnet/client-010/perftest/PerfTest.cs715
-rw-r--r--qpid/dotnet/client-010/perftest/Properties/AssemblyInfo.cs54
-rw-r--r--qpid/dotnet/client-010/perftest/README.txt38
-rw-r--r--qpid/dotnet/client-010/perftest/default.build50
-rw-r--r--qpid/dotnet/client-010/perftest/perftest.csproj92
-rw-r--r--qpid/dotnet/client-010/test/Helpers/ConfigHelpers.cs65
-rw-r--r--qpid/dotnet/client-010/test/Properties/AssemblyInfo.cs56
-rw-r--r--qpid/dotnet/client-010/test/Qpid Test.dll.config31
-rw-r--r--qpid/dotnet/client-010/test/Test.csproj102
-rw-r--r--qpid/dotnet/client-010/test/default.build55
-rw-r--r--qpid/dotnet/client-010/test/interop/Admin.cs90
-rw-r--r--qpid/dotnet/client-010/test/interop/ApplicationHeaders.cs83
-rw-r--r--qpid/dotnet/client-010/test/interop/ConnectionTests.cs80
-rw-r--r--qpid/dotnet/client-010/test/interop/Message.cs180
-rw-r--r--qpid/dotnet/client-010/test/interop/TestCase.cs96
-rw-r--r--qpid/dotnet/client-010/test/transport/util/ByteEncoderTest.cs106
-rw-r--r--qpid/dotnet/client-010/test/transport/util/CircularBufferTest.cs89
-rw-r--r--qpid/dotnet/client-010/test/transport/util/ResultFutureTest.cs103
-rw-r--r--qpid/dotnet/client-010/test/transport/util/SerialTest.cs75
-rw-r--r--qpid/dotnet/client-010/test/transport/util/UUIDTest.cs64
-rw-r--r--qpid/dotnet/client-010/wcf/Properties/AssemblyInfo.cs57
-rw-r--r--qpid/dotnet/client-010/wcf/demo/ConfigDemo.suobin23552 -> 0 bytes
-rw-r--r--qpid/dotnet/client-010/wcf/demo/Demo.suobin33280 -> 0 bytes
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Form1.Designer.cs185
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Form1.cs96
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Form1.resx143
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Program.cs41
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/AssemblyInfo.cs57
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Resources.Designer.cs92
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Resources.resx137
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Settings.Designer.cs51
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Settings.settings27
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingClient/wcBookingClient.csproj123
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Booking.cs62
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingServer/IBooking.cs43
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Order.cs45
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Program.cs98
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Properties/AssemblyInfo.cs57
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Receipt.cs46
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfBookingServer/wcfBookingServer.csproj97
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfHelloClient/App.config56
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfHelloClient/HelloClient.cs36
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfHelloClient/IHelloService.cs33
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfHelloClient/Program.cs48
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfHelloClient/Properties/AssemblyInfo.cs57
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfHelloClient/wcfHelloClient.csproj85
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfHelloServer/App.config64
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfHelloServer/HelloService.cs34
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfHelloServer/IHelloService.cs32
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfHelloServer/Program.cs47
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfHelloServer/Properties/AssemblyInfo.cs57
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfHelloServer/wcfHelloServer.csproj87
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfRPC/IUpperCase.cs31
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfRPC/Program.cs113
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfRPC/Properties/AssemblyInfo.cs57
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfRPC/QpidBindingConfigurationElement.cs205
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfRPC/UpperCase.cs33
-rw-r--r--qpid/dotnet/client-010/wcf/demo/wcfRPC/wcfRPC.csproj93
-rw-r--r--qpid/dotnet/client-010/wcf/model/CommunicationOperation.cs31
-rw-r--r--qpid/dotnet/client-010/wcf/model/QpidBinding.cs185
-rw-r--r--qpid/dotnet/client-010/wcf/model/QpidChannelBase.cs167
-rw-r--r--qpid/dotnet/client-010/wcf/model/QpidChannelFactory.cs74
-rw-r--r--qpid/dotnet/client-010/wcf/model/QpidChannelListener.cs79
-rw-r--r--qpid/dotnet/client-010/wcf/model/QpidChannelListenerBase.cs111
-rw-r--r--qpid/dotnet/client-010/wcf/model/QpidInputChannel.cs218
-rw-r--r--qpid/dotnet/client-010/wcf/model/QpidInputChannelBase.cs101
-rw-r--r--qpid/dotnet/client-010/wcf/model/QpidOutputChannel.cs89
-rw-r--r--qpid/dotnet/client-010/wcf/model/QpidOutputChannelBase.cs77
-rw-r--r--qpid/dotnet/client-010/wcf/model/QpidTransportBindingElement.cs186
-rw-r--r--qpid/dotnet/client-010/wcf/model/QpidTransportElement.cs183
-rw-r--r--qpid/dotnet/client-010/wcf/wcf.csproj79
-rw-r--r--qpid/dotnet/client-010/wcf/wcf.sln70
-rw-r--r--qpid/dotnet/client-010/wcf/wcf.suobin105984 -> 0 bytes
-rw-r--r--qpid/dotnet/default.build255
-rw-r--r--qpid/extras/qmf/src/py/qmf/console.py24
-rw-r--r--qpid/gentools/build.xml2
-rw-r--r--qpid/java/broker-plugins/access-control/MANIFEST.MF1
-rw-r--r--qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleSet.java361
-rw-r--r--qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControl.java15
-rw-r--r--qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/AccessControlTest.java281
-rw-r--r--qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/PlainConfigurationTest.java194
-rw-r--r--qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java229
-rw-r--r--qpid/java/broker-plugins/experimental/info/src/main/java/org/apache/qpid/info/AppInfo.java2
-rw-r--r--qpid/java/broker-plugins/extras/src/test/java/org/apache/qpid/server/plugins/ExtrasTest.java2
-rw-r--r--qpid/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallConfigurationTest.java15
-rw-r--r--qpid/java/broker/etc/config.xml18
-rw-r--r--qpid/java/broker/etc/qpid-server.conf.jpp3
-rw-r--r--qpid/java/broker/etc/virtualhosts.xml2
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java11
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java45
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java117
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java48
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java222
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java126
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java12
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java11
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java2
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/Exchange.java10
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/headers/HeadersParser.java126
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/federation/Bridge.java5
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/federation/BrokerLink.java1
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java31
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionCloseMethodHandler.java2
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionSecureOkMethodHandler.java9
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java11
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java4
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/ManagementActor.java62
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Exchange_logmessages.properties3
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/ManagementConsole_logmessages.properties2
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/logging/subjects/ChannelLogSubject.java2
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/logging/subjects/ConnectionLogSubject.java6
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java29
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java27
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData.java72
-rwxr-xr-xqpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_0_10.java10
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_8/ProtocolOutputConverterImpl.java263
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_9/ProtocolOutputConverterImpl.java72
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_9_1/ProtocolOutputConverterImpl.java73
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/OsgiSystemPackageUtil.java91
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/OsgiSystemPackages.properties93
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/Plugin.java2
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java294
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQConnectionModel.java4
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java235
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngineFactory.java49
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSession.java12
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java2
-rwxr-xr-xqpid/java/broker/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java96
-rwxr-xr-xqpid/java/broker/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactory.java34
-rwxr-xr-xqpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_0_10.java37
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java6
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/queue/IncomingMessage.java4
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntry.java4
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java15
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java32
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java84
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ConfigurationFileApplicationRegistry.java8
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java3
-rwxr-xr-xqpid/java/broker/src/main/java/org/apache/qpid/server/security/AuthorizationHolder.java53
-rwxr-xr-xqpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java34
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/ObjectProperties.java4
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/ConfigurationFilePrincipalDatabaseManager.java190
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PrincipalDatabaseManager.java35
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabaseManager.java49
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/management/AMQUserManagementMBean.java27
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/AuthenticationManager.java24
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/AuthenticationManagerPluginFactory.java (renamed from qpid/dotnet/client-010/gentool/Constant.tpl)19
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java348
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/AuthenticationProviderInitialiser.java21
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/GroupPrincipal.java99
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/JCAProvider.java3
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/amqplain/AmqPlainSaslServer.java5
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/anonymous/AnonymousSaslServer.java12
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/signal/SignalHandlerTask.java89
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/state/AMQStateManager.java2
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java11
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionFactory.java27
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionFactoryImpl.java46
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionImpl.java54
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionList.java213
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/Subscription_0_10.java39
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnection.java78
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnectionDelegate.java127
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java65
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java210
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/util/ByteBufferInputStream.java87
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/util/ByteBufferOutputStream.java (renamed from qpid/dotnet/Qpid.Buffer/BufferUnderflowException.cs)40
-rwxr-xr-xqpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostConfigRecoveryHandler.java12
-rw-r--r--qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java81
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/BrokerOptionsTest.java28
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java153
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java186
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/VirtualHostConfigurationTest.java21
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java17
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/logging/UnitTestMessageLogger.java16
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/logging/actors/ManagementActorTest.java44
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/logging/messages/ExchangeMessagesTest.java18
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/management/AMQUserManagementMBeanTest.java34
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/MockPluginManager.java56
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/OsgiSystemPackageUtilTest.java93
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/PluginTest.java2
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/InternalTestProtocolSession.java20
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactoryTest.java146
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java11
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java12
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java12
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockQueueEntry.java9
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/queue/QueueEntryImplTest.java34
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java2
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManagerTest.java143
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/rmi/RMIPasswordAuthenticatorTest.java12
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/sasl/GroupPrincipalTest.java86
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/sasl/TestPrincipalUtils.java (renamed from qpid/dotnet/Qpid.Codec/ProtocolCodecException.cs)48
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/signal/SignalHandlerTaskTest.java118
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/subscription/SubscriptionFactoryImplTest.java84
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/subscription/SubscriptionListTest.java429
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java9
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/util/TestApplicationRegistry.java47
-rw-r--r--qpid/java/broker/src/test/java/org/apache/qpid/server/virtualhost/VirtualHostImplTest.java214
-rw-r--r--qpid/java/build.deps44
-rw-r--r--qpid/java/build.xml6
-rw-r--r--qpid/java/client-plugins/.gitignore0
-rw-r--r--qpid/java/client-plugins/README.txt (renamed from qpid/java/tools/bin/run_pub.sh)7
-rw-r--r--qpid/java/client/README.txt2
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java118
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java130
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java4
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java150
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java45
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java280
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java121
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java31
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java15
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java35
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java21
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java36
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java14
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/SSLConfiguration.java61
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/XAConnectionImpl.java4
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/XAResourceImpl.java35
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/XASessionImpl.java2
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/failover/FailoverRetrySupport.java4
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java46
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegateFactory.java5
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java78
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_8.java1
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedMapMessage.java25
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedMapMessageFactory.java13
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractBytesMessage.java124
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractBytesTypedMessage.java760
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessage.java103
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessageFactory.java17
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSBytesMessage.java169
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSBytesMessageFactory.java3
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSHeaderAdapter.java31
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSMapMessage.java71
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSMapMessageFactory.java8
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessage.java217
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessageFactory.java8
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessage.java129
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessageFactory.java5
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSTextMessage.java161
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSTextMessageFactory.java2
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/QpidMessageProperties.java (renamed from qpid/dotnet/client-010/gentool/MethodDelegate.tpl)21
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/TypedBytesCodes.java (renamed from qpid/dotnet/client-010/gentool/Option.tpl)42
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/TypedBytesContentReader.java674
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/TypedBytesContentWriter.java370
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/message/UnprocessedMessage_0_8.java4
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java189
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/protocol/ProtocolBufferMonitorFilter.java115
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/security/CallbackHandlerRegistry.java256
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/security/CallbackHandlerRegistry.properties18
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java168
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/util/ClassLoadingAwareObjectInputStream.java134
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java8
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/jms/failover/FailoverExchangeMethod.java1
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java21
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/JNDIBindConnectionFactory.java185
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/JNDIBindQueue.java213
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/JNDIBindTopic.java212
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/README.txt11
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/cluster/Client.java129
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/codec/BasicDeliverTest.java277
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/codec/Client.java133
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/codec/Server.java103
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/config/AMQConnectionFactoryInitialiser.java35
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/config/AbstractConfig.java69
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/config/ConnectionFactoryInitialiser.java29
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/config/Connector.java40
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/config/ConnectorConfig.java28
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/config/JBossConnectionFactoryInitialiser.java117
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/flow/ChannelFlowTest.java112
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/fragmentation/TestLargePublisher.java196
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/fragmentation/TestLargeSubscriber.java167
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/headers/Listener.java117
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/headers/MessageFactory.java175
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/headers/Publisher.java133
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/jndi/referenceable/Bind.java273
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/jndi/referenceable/Lookup.java196
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/jndi/referenceable/Unbind.java166
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/latency/LatencyTest.java153
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/mina/AcceptorTest.java102
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/mina/BlockingAcceptorTest.java93
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/mina/WriterTest.java271
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/multiconsumer/AMQTest.java269
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/pubsub1/TestPublisher.java176
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/pubsub1/TestSubscriber.java122
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/test/unit/client/connection/TestManyConnections.java95
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/test/unit/jndi/PropertiesFileInitialContextFactoryTest.java153
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/test/unit/jndi/example.properties38
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/topic/Config.java243
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/topic/Listener.java141
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/topic/MessageFactory.java155
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/topic/Publisher.java175
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Config.java110
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Ping.java45
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Pong.java45
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Relay.java127
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Start.java44
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/weblogic/ServiceProvider.java151
-rw-r--r--qpid/java/client/src/old_test/java/org/apache/qpid/weblogic/ServiceRequestingClient.java185
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/client/AMQSession_0_10Test.java765
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/client/MockAMQConnection.java31
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/client/message/TestMessageHelper.java5
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/client/protocol/MockIoSession.java312
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/client/security/CallbackHandlerRegistryTest.java185
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/client/util/ClassLoadingAwareObjectInputStreamTest.java86
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/message/ObjectMessageUnitTest.java105
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/ConnectionFactoryTest.java18
-rw-r--r--qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java19
-rw-r--r--qpid/java/common.xml2
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/codec/AMQCodecFactory.java17
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java334
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/codec/AMQEncoder.java66
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java42
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/AMQBody.java8
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlock.java26
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockDecoder.java57
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockEncoder.java61
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrame.java42
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java8
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java7
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyImpl.java86
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyInstanceFactory.java5
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodFactory.java90
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java36
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/AMQType.java81
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/AMQTypedValue.java13
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java374
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/BodyFactory.java5
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/CompositeAMQDataBlock.java5
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBody.java59
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBodyFactory.java5
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java46
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBodyFactory.java5
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderProperties.java12
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderPropertiesFactory.java7
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/DeferredDataBlock.java50
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/EncodingUtils.java229
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java215
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTableFactory.java5
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBody.java15
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBodyFactory.java4
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java37
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/SmallCompositeAMQDataBlock.java5
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/VersionSpecificRegistry.java5
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ContentChunk.java4
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ProtocolVersionMethodConverter.java4
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_0_9/MethodConverter_0_9.java13
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_0_91/MethodConverter_0_91.java10
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/MethodConverter_8_0.java11
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/pool/Job.java253
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java2
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolEngine.java5
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolEngineFactory.java2
-rw-r--r--[-rwxr-xr-x]qpid/java/common/src/main/java/org/apache/qpid/protocol/ServerProtocolEngine.java (renamed from qpid/java/broker/src/main/java/org/apache/qpid/server/security/PrincipalHolder.java)12
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/security/AMQPCallbackHandler.java28
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/security/UsernamePasswordCallbackHandler.java60
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/ssl/SSLContextFactory.java216
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/thread/QpidThreadExecutor.java2
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/ClientDelegate.java139
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java90
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionDelegate.java3
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java2
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/SenderClosedException.java (renamed from qpid/dotnet/Qpid.Buffer/BufferOverflowException.cs)43
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java69
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java89
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java12
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/SocketConnectorFactory.java8
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/IncomingNetworkTransport.java5
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkConnection.java2
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkTransport.java6
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/OutgoingNetworkTransport.java7
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/Transport.java108
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkConnection.java8
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkTransport.java158
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java19
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoSender.java13
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoTransport.java165
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaNetworkConnection.java81
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaNetworkHandler.java149
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaNetworkTransport.java219
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaSender.java79
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SSLStatus.java (renamed from qpid/java/broker/src/test/java/org/apache/qpid/util/MockChannel.java)35
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SecurityLayer.java153
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SecurityLayerFactory.java161
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/QpidClientX509KeyManager.java4
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLReceiver.java63
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLSender.java56
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java37
-rw-r--r--qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java23
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/codec/AMQDecoderTest.java32
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/framing/BasicContentHeaderPropertiesTest.java11
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java30
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/session/TestSession.java277
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/ssl/SSLContextFactoryTest.java84
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/test/utils/QpidTestCase.java198
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java107
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/transport/SessionTimeoutTest.java81
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/transport/TestNetworkConnection.java22
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/transport/network/TransportTest.java157
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/transport/network/io/IoAcceptor.java2
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/transport/network/io/IoTransport.java91
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/transport/network/mina/MinaNetworkHandlerTest.java8
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java82
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/util/default.properties2
-rw-r--r--qpid/java/common/src/test/java/org/apache/qpid/util/mydefaults.properties2
-rw-r--r--qpid/java/common/templates/method/version/MethodBodyClass.vm10
-rw-r--r--qpid/java/common/templates/model/MethodRegistryClass.vm9
-rw-r--r--qpid/java/common/templates/model/version/MethodRegistryClass.vm95
-rw-r--r--qpid/java/ivy.xml2
-rw-r--r--qpid/java/lib/backport-util-concurrent-2.2.jarbin326319 -> 0 bytes
-rwxr-xr-xqpid/java/lib/mina-core-1.0.1.jarbin313338 -> 0 bytes
-rwxr-xr-xqpid/java/lib/mina-filter-ssl-1.0.1.jarbin28950 -> 0 bytes
-rw-r--r--qpid/java/lib/poms/backport-util-concurrent-2.2.xml22
-rw-r--r--qpid/java/lib/poms/mina-core-1.0.1.xml22
-rw-r--r--qpid/java/lib/poms/mina-filter-ssl-1.0.1.xml22
-rw-r--r--qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java103
-rw-r--r--qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/LegacySupportingUserManagement.java132
-rw-r--r--qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java199
-rw-r--r--qpid/java/module.xml3
-rw-r--r--qpid/java/perftests/src/main/java/org/apache/qpid/client/message/TestMessageFactory.java3
-rw-r--r--qpid/java/perftests/src/main/java/org/apache/qpid/config/AMQConnectionFactoryInitialiser.java14
-rw-r--r--qpid/java/resources/NOTICE7
-rw-r--r--qpid/java/systests/build.xml2
-rw-r--r--qpid/java/systests/etc/config-systests-ServerConfigurationTest-New.xml73
-rw-r--r--qpid/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml88
-rw-r--r--qpid/java/systests/etc/config-systests-firewall-2.xml13
-rw-r--r--qpid/java/systests/etc/config-systests-firewall-3.xml13
-rw-r--r--qpid/java/systests/etc/config-systests-settings.xml11
-rw-r--r--qpid/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml45
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java159
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/jms/xa/XAResourceTest.java116
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagementActorLoggingTest.java55
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/MessageStatisticsDeliveryTest.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/failover/FailoverMethodTest.java49
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/failover/MessageDisappearWithIOExceptionTest.java6
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java51
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java5
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/ExternalACLTest.java42
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java4
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java127
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/testcases/TTLTest.java154
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ack/QuickAcking.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/BytesMessageTest.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/FieldTableMessageTest.java15
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java219
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQSSLConnectionTest.java57
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/CloseAfterConnectionFailureTest.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java26
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionFactoryTest.java41
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java79
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ExceptionListenerTest.java6
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java1
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java13
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/StreamMessageTest.java45
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java51
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutConfigurationTest.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutDisabledTest.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTestCase.java2
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java119
-rw-r--r--qpid/java/systests/src/main/java/org/apache/qpid/test/utils/protocol/TestIoSession.java104
-rwxr-xr-xqpid/java/test-profiles/CPPExcludes22
-rw-r--r--qpid/java/test-profiles/Excludes10
-rwxr-xr-xqpid/java/test-profiles/Java010Excludes43
-rw-r--r--qpid/java/test-profiles/JavaExcludes56
-rw-r--r--qpid/java/test-profiles/JavaPre010Excludes24
-rw-r--r--qpid/java/test-profiles/cpp.ssl.excludes7
-rw-r--r--qpid/java/test-profiles/cpp.ssl.testprofile4
-rw-r--r--qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile2
-rw-r--r--qpid/java/test-profiles/java-dby.0-9-1.testprofile2
-rw-r--r--qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile2
-rw-r--r--qpid/java/test-profiles/java-mms.0-9-1.testprofile2
-rw-r--r--qpid/java/test-profiles/log4j-test.xml4
-rw-r--r--qpid/java/test-profiles/python_tests/Java010PythonExcludes22
-rw-r--r--qpid/java/test-profiles/test_resources/ssl/java_broker.crt15
-rw-r--r--qpid/java/test-profiles/test_resources/ssl/java_broker.req10
-rw-r--r--qpid/java/test-profiles/test_resources/ssl/java_broker_keystore.jksbin0 -> 2475 bytes
-rw-r--r--qpid/java/test-profiles/test_resources/ssl/java_client_keystore.jks (renamed from qpid/java/test-profiles/test_resources/ssl/keystore.jks)bin4296 -> 4296 bytes
-rw-r--r--qpid/java/test-profiles/test_resources/ssl/java_client_truststore.jks (renamed from qpid/java/test-profiles/test_resources/ssl/certstore.jks)bin591 -> 591 bytes
-rw-r--r--qpid/java/test-profiles/testprofile.defaults2
-rwxr-xr-xqpid/java/tools/bin/Profile-run-from-source71
-rwxr-xr-xqpid/java/tools/bin/check-qpid-java-env (renamed from qpid/dotnet/build-nant-release)28
-rw-r--r--qpid/java/tools/bin/controller132
-rwxr-xr-xqpid/java/tools/bin/perf-report (renamed from qpid/java/tools/bin/perf_report.sh)45
-rwxr-xr-x[-rw-r--r--]qpid/java/tools/bin/qpid-bench16
-rwxr-xr-xqpid/java/tools/bin/qpid-python-testkit11
-rwxr-xr-xqpid/java/tools/bin/run-pub28
-rwxr-xr-x[-rw-r--r--]qpid/java/tools/bin/run-sub (renamed from qpid/ruby/lib/qpid/packer.rb)25
-rw-r--r--qpid/java/tools/bin/set-testkit-env.sh88
-rw-r--r--qpid/java/tools/bin/setenv.sh49
-rw-r--r--qpid/java/tools/bin/start-consumers119
-rw-r--r--qpid/java/tools/bin/start-producers136
-rw-r--r--qpid/java/tools/etc/perf-report.gnu42
-rw-r--r--qpid/java/tools/src/main/java/org/apache/qpid/tools/Clock.java92
-rw-r--r--qpid/java/tools/src/main/java/org/apache/qpid/tools/LatencyTest.java12
-rw-r--r--qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfBase.java166
-rw-r--r--qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfConsumer.java224
-rw-r--r--qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfProducer.java229
-rw-r--r--qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfTestController.java422
-rw-r--r--qpid/java/tools/src/main/java/org/apache/qpid/tools/TestParams.java45
-rw-r--r--qpid/python/qpid/client.py2
-rw-r--r--qpid/python/qpid/util.py54
-rwxr-xr-xqpid/ruby/LICENSE.txt203
-rw-r--r--qpid/ruby/Makefile47
-rw-r--r--qpid/ruby/NOTICE.txt19
-rw-r--r--qpid/ruby/README.txt26
-rw-r--r--qpid/ruby/RELEASE_NOTES10
-rw-r--r--qpid/ruby/Rakefile116
-rwxr-xr-xqpid/ruby/examples/hello-world.rb61
-rw-r--r--qpid/ruby/examples/qmf-libvirt.rb80
-rw-r--r--qpid/ruby/ext/sasl/sasl.c472
-rw-r--r--qpid/ruby/lib/qpid.rb41
-rw-r--r--qpid/ruby/lib/qpid/assembler.rb148
-rw-r--r--qpid/ruby/lib/qpid/client.rb136
-rw-r--r--qpid/ruby/lib/qpid/codec.rb457
-rw-r--r--qpid/ruby/lib/qpid/codec08.rb265
-rw-r--r--qpid/ruby/lib/qpid/config.rb32
-rw-r--r--qpid/ruby/lib/qpid/connection.rb222
-rw-r--r--qpid/ruby/lib/qpid/connection08.rb252
-rw-r--r--qpid/ruby/lib/qpid/datatypes.rb353
-rw-r--r--qpid/ruby/lib/qpid/delegates.rb237
-rw-r--r--qpid/ruby/lib/qpid/framer.rb212
-rw-r--r--qpid/ruby/lib/qpid/invoker.rb65
-rw-r--r--qpid/ruby/lib/qpid/peer.rb289
-rw-r--r--qpid/ruby/lib/qpid/qmf.rb1957
-rw-r--r--qpid/ruby/lib/qpid/queue.rb101
-rw-r--r--qpid/ruby/lib/qpid/session.rb458
-rw-r--r--qpid/ruby/lib/qpid/spec.rb183
-rw-r--r--qpid/ruby/lib/qpid/spec010.rb485
-rw-r--r--qpid/ruby/lib/qpid/spec08.rb190
-rw-r--r--qpid/ruby/lib/qpid/specs/amqp.0-10-qpid-errata.xml6654
-rw-r--r--qpid/ruby/lib/qpid/specs/amqp.0-10.dtd246
-rw-r--r--qpid/ruby/lib/qpid/traverse.rb64
-rw-r--r--qpid/ruby/lib/qpid/util.rb75
-rw-r--r--qpid/ruby/tests/assembler.rb78
-rw-r--r--qpid/ruby/tests/codec010.rb122
-rw-r--r--qpid/ruby/tests/connection.rb246
-rw-r--r--qpid/ruby/tests/datatypes.rb224
-rw-r--r--qpid/ruby/tests/framer.rb99
-rw-r--r--qpid/ruby/tests/qmf.rb248
-rw-r--r--qpid/ruby/tests/queue.rb80
-rw-r--r--qpid/ruby/tests/spec010.rb80
-rw-r--r--qpid/ruby/tests/util.rb72
-rw-r--r--qpid/ruby/tests_0-8/basic.rb69
-rw-r--r--qpid/ruby/tests_0-8/channel.rb48
-rw-r--r--qpid/specs/management-schema.xml12
-rw-r--r--qpid/tests/src/py/qpid_tests/broker_0_10/dtx.py102
-rw-r--r--qpid/tests/src/py/qpid_tests/broker_0_10/exchange.py27
-rw-r--r--qpid/tests/src/py/qpid_tests/broker_0_10/message.py41
-rwxr-xr-xqpid/tools/src/py/qpid-config27
-rwxr-xr-xqpid/tools/src/py/qpid-route6
-rwxr-xr-xqpid/tools/src/py/qpid-tool2
1335 files changed, 24401 insertions, 189780 deletions
diff --git a/qpid/KEYS b/qpid/KEYS
index 98e057984d..8fb029ba20 100644
--- a/qpid/KEYS
+++ b/qpid/KEYS
@@ -371,3 +371,58 @@ EAAKCRCFx21QqdfQx+2MAKDPilVZy0YNhW5fIvA/3Tz0/UvjgQCfUQuSqdXNgZaT
jvJP5xcF6/EBpys=
=Wc+j
-----END PGP PUBLIC KEY BLOCK-----
+pub 4096R/C6B459DB 2011-07-18
+uid Justin Ross (CODE SIGNING KEY) <jross@apache.org>
+sub 4096R/95BB2C1A 2011-07-18
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+mQINBE4kjewBEADSfPSpx+dZqdopNR8h/QG6jFDL9stuTQkLN0y9VEo+PEX4wzR6
+npzxcjVZF0ZBGOZl6DT3/SgmOZtFtnH5nb3ebpFEaalktyC9K4rFad4QW3mez7+x
+Slsb6DEx0l6PFU9FM97RI7MLMfkkYuAsWqO1kDdLaY7XeFg0a05OA0d/i7qCl5fR
+rAmCKM80SDM23DToWWEVP3Pw8ZYl8KNjc2aTiov/2VdMRZgldJr4EpAkPWk88qGu
+s9otP5tKu+aQA/ub6myF295uBtdycvq2DkLUSStSPripADjBcsNswBfITr5inuuQ
+g4mIF8pzkRajud4ahZe8mi1hE4K2eyPc2a5Yj1gXM6MPsuNSieSiwlIfj3u+0dRX
+74PZzCbPPmmveVWXBFbHBPZs9BwDUBint+1QRk5b0xi3uV/YUuciHQPdjXBcFo8y
+fPeZv6vkPHlozXW+wnS7XZqz06fObFPGjpOsTXSiFzd/+9Ecav3tDY7z6UvzRqpN
+dU7x0SskEBaU3CS6Av2as5mJ4psaYspSk8goo71JrGZS8hZdALkn6Q6exb1BSEXL
+O06N6niNxEf97KAbKvdByfmGMCuombF7My/CwkD6tbhIFO+mGga0AHYkE/F9s3o+
+gWEk/Rfx0jgkiMZWaQqJUYM6XRkNiKjR/QYjbo3eIibCxX8PfKg2iG/tdQARAQAB
+tDFKdXN0aW4gUm9zcyAoQ09ERSBTSUdOSU5HIEtFWSkgPGpyb3NzQGFwYWNoZS5v
+cmc+iQI4BBMBAgAiBQJOJI3sAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAK
+CRBkio5XxrRZ2xBpEACS45v7yMgqFzMEAdTb7uOZ6ibZSBD83Xhgraq0Deygt5aZ
+zglcegfHufVKC7jmGtWcKYrJ5zwPcclmAut4mc7akPUZYmeSKAcDPhysswvf4vm9
+lNxzwnT83S2bCALK67kj1M2K+U56hP49jCYWCYhoAIb2yRffO/x8EZDmN388Z3ki
+6wuD/bfhGKXig04njeWhdJz4asKifbORec4z8R2wIqiOfBy+ObZzQjtXq8CWb2VR
+cz0vVQGUCLdD3W2XKryxgzWoJlybCF2+XAx1GJ/zQ/6TDLm2P1kVX285/pcOVAUM
+Ca1IHf70z1SOjAI7KfH9ewgZoMJMqIauDxf2YNejntj9tyd5i4i1h1upeDD7mI79
+c1kBZfYDDJhqlbgPfSnBX46xEXY2Vh9hHmIeLzNpaMQhGgFVwLKQdNOjDN4WcaoV
+pKQf/ZZ6dzBkzTZni7j11DxIgCIu64qgzqlBI2xYmxNzkF/1hVVkHsrZ82TpFcKM
+ejmq3NKtQMvt9TeJwRe+NVdF19bpszk7FnxYWfiokP7SJcjBDnuXah8ScEk2Fa3D
+Q41Rpg3q6e3Gc7ehfhZsUNlstQ/zEVfg3Dj9lkkMm2Jx13S+bHobgXbNIG23Kv+N
+vfKqtoRKrJwujgdy0KgyeMUSTYKVxgjK9nbOZtNbFMn0rYTnKjdTt//DzZ5We7kC
+DQROJI3sARAA2wHTgOEYWLHhJPOzuM5nEnPTMTTSymo31dePqUEGM/5Gxcl+GXwK
+0RCvV4Hlaju7fR8SB2wbVqZDRACqynw7aSGxr327ebvCOKc/9d5R9aK2qRisoN9b
+wIq2IzboLDC8PKEZsFyOUcEirt0q8k05cC8S9nx5LG5ddeIcIyXwKUYLLgOeUgre
+Drzm2R+6N28C1AcXL7V8pDEfy5sd1tslMsV9khtF1hqxaW9nRKt/7qGsI+ALmwyz
+QwV54GPLs1LUJX7vlEbl3gUbmrgdCk1eYP/KloZJFMlwgB+EUoWFrboy+BAxUBwJ
+xk4y+Dqu9GLnNYo8MrTvL6QAFdoscAPFThZRndQ/MfOvCNz/0Yima7AKOPoQXDFB
+zhjR8lv8A12mmnegHpkV9P4isT6c5Tc5TPbCBqnOId2buLm2V7f3kgH5dPgPEO0z
+P3SPe39mJNSLWtrqpi89EQI+cD/JhyemgTNJOYqjLnnrsyaPXYClVR05nW3g7Bmh
+9UO/5L82Mi8LFZXFO23L/JRvpvh529f7fPpMv4KiJiU5Gc2LJ3/HAYDIp/4q3ETF
+TboPEAP7WW0BLVkl37LkhJ/uD7/COFlTolgsNqtIZtRr6m8/PeLPYXfOwKNSmhz2
+CqW7RSIiyqwdFtyfyR0RpDAYissaRpMgqU/6r49OsZIOLImkJI33M7sAEQEAAYkC
+HwQYAQIACQUCTiSN7AIbDAAKCRBkio5XxrRZ20o4EACnL2xNHpRZQm4L+qB/Lanz
+2GONIKqdFzRls/6WlqOS+/loylorF3hVo8aJe13bJtf8LIoBTViFUq8BCBEb1Q3S
+qmmlzfiMeTZtCK9WbfqC07iEe/KUNmxjA/ZR6sE9x8Pe+QI0mnXZBKHexLsjdpav
+hdwHi5EmAE8gEiY7PwbJmxq+JXxKWrhyPscn3TIQrs6F+0KMs61XVPsflN0Tfzvf
+7hJ8Zn7HGjGsa+g6XmiEoZMDWwZDQVZby+g95EE9iyAwT6tlNqNGgHS8QKL9zFo0
+cxCntJYMQhYHKsd744Tfq01i3EEFIUMqGc/md0Ra/E5bG563VfbvBOpDobiX1KX1
+wRIMo5StjjFVzZj7Zyj73ALSQ5mfSvzJqsXRYpoPdy6bHJj3nSBrswpjpl+WsVOR
+oe6o73mM3CB6r10YMITa+aEmSQGAFSwajpDAfqbSQRbIGq0K+hqyCMzZ7qqv2b0+
+U1N6jUaWBFLMNiti+jw6TRUcdQstagb6qYqpF5MQ+NU7ddxNgIiRByeoFR9vMIfT
+wFtVHi7IN8OM6rvshjc/rmOEiSPCULSvpI1vq14MfRAWfyeqkxrvuklbdMOeJwSP
+U6nOKyS2R4/y+0s1J85amn4YHTUhOHYRnQAEckX8DB0UtCP15FSmrN3aOBp7hbvm
+MxumwmEHVDFpDpKCCnJa9A==
+=Uryx
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/qpid/LICENSE b/qpid/LICENSE
index 5f84a6564b..cd0c8d0a8b 100644
--- a/qpid/LICENSE
+++ b/qpid/LICENSE
@@ -1,7 +1,5 @@
Please see the individual LICENSE files for each language
cpp/LICENSE
-dotnet/LICENSE.txt
gentools/lib/LICENSE
java/resources/LICENSE
python/LICENSE.txt
-ruby/LICENSE.txt
diff --git a/qpid/NOTICE b/qpid/NOTICE
index ff65d299a9..5691e0e1ac 100644
--- a/qpid/NOTICE
+++ b/qpid/NOTICE
@@ -1,8 +1,6 @@
Please see the individual NOTICE files for each language:
cpp/NOTICE
-dotnet/NOTICE.txt
gentools/lib/NOTICE
java/resources/NOTICE
python/NOTICE.txt
-ruby/NOTICE.txt
diff --git a/qpid/README.txt b/qpid/README.txt
index 00a56bdc3d..ccd92c757b 100644
--- a/qpid/README.txt
+++ b/qpid/README.txt
@@ -36,22 +36,10 @@ Python Client Libraries
./python
-Ruby Client Libraries
-
- ./ruby
-
-.NET Client Libraries
-
- ./dotnet
-
WCF Support
./wcf
-Messaging Client (implemented in Ruby):
-
- ./ruby
-
Management Tools (implemented in Python):
./tools
@@ -66,4 +54,4 @@ Documentation:
Further information about the organization of Qpid source components may
-be found in ./doc/dev-readme/QPID-0.8-Component-README.pdf.
+be found in ./doc/dev-readme/QPID-Component-README.pdf.
diff --git a/qpid/cpp/INSTALL b/qpid/cpp/INSTALL
index 6483d7de4e..dbd41c7cc1 100644
--- a/qpid/cpp/INSTALL
+++ b/qpid/cpp/INSTALL
@@ -47,9 +47,9 @@ Redhat Linux 3, will almost certainly require some packages to be upgraded.
====================
The following libraries and header files must be installed to build
a source distribution:
- * boost <http://www.boost.org> (1.35)(*)
- * e2fsprogs <http://e2fsprogs.sourceforge.net/> (1.39)
- * pkgconfig <http://pkgconfig.freedesktop.org/wiki/> (0.21)
+ * boost <http://www.boost.org> (1.35)(*)
+ * libuuid <http://kernel.org/~kzak/util-linux/> (2.19)
+ * pkgconfig <http://pkgconfig.freedesktop.org/wiki/> (0.21)
(*) earlier versions of boost e.g. 1.33 also work and there is a patch
to get 1.32 working in the svn tree though that is only recommended as
@@ -96,12 +96,12 @@ the following must also be installed:
* python-devel
* swig <http://www.swig.org> (1.3.35)
-UUID problems:
-In some later Linux releases (such as Fedora 12), the uuid/uuid.h file has been
-moved from e2fsprogs-devel into libuuid-devel. If you are using a newer Linux
-release and run into a problem during configure in which uuid.h cannot be found,
-look for and install the libuuid-devel package.
-
+UUID problems:
+In some earlier Linux releases (such as Fedora 11), the uuid/uuid.h
+file is located in the e2fsprogs-devel package instead of
+libuuid-devel. If you are using an older Linux release and run into a
+problem during configure in which uuid.h cannot be found, install the
+e2fsprogs-devel package.
2.2. How to Install
===================
@@ -112,7 +112,7 @@ look for and install the libuuid-devel package.
On linux most packages can be installed using your distribution's
package management tool. For example on Fedora:
- # yum install boost-devel e2fsprogs-devel pkgconfig gcc-c++ make autoconf automake ruby libtool help2man doxygen graphviz
+ # yum install boost-devel libuuid-devel pkgconfig gcc-c++ make autoconf automake ruby libtool help2man doxygen graphviz
The optional clustering packages changed name in Fedora 10. On Fedora 9 or earlier:
# yum install openais-devel cman-devel
diff --git a/qpid/cpp/Makefile.am b/qpid/cpp/Makefile.am
index 01b8507454..9f4b8e2082 100644
--- a/qpid/cpp/Makefile.am
+++ b/qpid/cpp/Makefile.am
@@ -33,3 +33,7 @@ SUBDIRS = managementgen etc src docs/api docs/man examples bindings/qmf bindings
# Update libtool, if needed.
libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
+
+check-long: all
+ $(MAKE) -C src/tests check-long
+ \ No newline at end of file
diff --git a/qpid/cpp/bindings/qmf2/examples/cpp/Makefile.am b/qpid/cpp/bindings/qmf2/examples/cpp/Makefile.am
index 84207d43c4..062fbd0a85 100644
--- a/qpid/cpp/bindings/qmf2/examples/cpp/Makefile.am
+++ b/qpid/cpp/bindings/qmf2/examples/cpp/Makefile.am
@@ -21,7 +21,7 @@ INCLUDE = -I$(top_srcdir)/include
AM_CPPFLAGS = $(INCLUDE)
-noinst_PROGRAMS=agent list_agents print_events
+noinst_PROGRAMS=agent event_driven_list_agents list_agents print_events
agent_SOURCES=agent.cpp
agent_LDADD=$(top_builddir)/src/libqmf2.la
@@ -29,5 +29,8 @@ agent_LDADD=$(top_builddir)/src/libqmf2.la
list_agents_SOURCES=list_agents.cpp
list_agents_LDADD=$(top_builddir)/src/libqmf2.la
+event_driven_list_agents_SOURCES=event_driven_list_agents.cpp
+event_driven_list_agents_LDADD=$(top_builddir)/src/libqmf2.la
+
print_events_SOURCES=print_events.cpp
print_events_LDADD=$(top_builddir)/src/libqmf2.la
diff --git a/qpid/cpp/bindings/qmf2/examples/cpp/event_driven_list_agents.cpp b/qpid/cpp/bindings/qmf2/examples/cpp/event_driven_list_agents.cpp
new file mode 100644
index 0000000000..c288aa6bdd
--- /dev/null
+++ b/qpid/cpp/bindings/qmf2/examples/cpp/event_driven_list_agents.cpp
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <sys/select.h>
+#include <time.h>
+
+#include <qpid/messaging/Connection.h>
+#include <qpid/messaging/Duration.h>
+#include <qmf/Agent.h>
+#include <qmf/ConsoleEvent.h>
+#include <qmf/ConsoleSession.h>
+#include <qpid/types/Variant.h>
+#include "qmf/posix/EventNotifier.h"
+
+#include <string>
+#include <iostream>
+
+using namespace std;
+using namespace qmf;
+using qpid::types::Variant;
+using qpid::messaging::Duration;
+
+int main(int argc, char** argv)
+{
+ string url("localhost");
+ string connectionOptions;
+ string sessionOptions;
+
+ if (argc > 1)
+ url = argv[1];
+ if (argc > 2)
+ connectionOptions = argv[2];
+ if (argc > 3)
+ sessionOptions = argv[3];
+
+ qpid::messaging::Connection connection(url, connectionOptions);
+ connection.open();
+
+ ConsoleSession session(connection, sessionOptions);
+ session.open();
+ session.setAgentFilter("");
+
+ posix::EventNotifier notifier(session);
+
+ int fd(notifier.getHandle());
+ time_t lastUpdate;
+ bool ftl = false;
+
+ time(&lastUpdate);
+
+ while (true) {
+ fd_set rfds;
+ struct timeval tv;
+ int nfds, retval;
+
+ FD_ZERO(&rfds);
+ FD_SET(fd, &rfds);
+ nfds = fd + 1;
+ tv.tv_sec = 10;
+ tv.tv_usec = 0;
+
+ retval = select(nfds, &rfds, NULL, NULL, &tv);
+
+ if (retval > 0 && FD_ISSET(fd, &rfds)) {
+ ConsoleEvent event;
+ while (session.nextEvent(event, Duration::IMMEDIATE)) {
+ string eventType = "";
+ switch(event.getType()) {
+ case CONSOLE_AGENT_ADD: eventType = "Added"; break;
+ case CONSOLE_AGENT_DEL: eventType = "Deleted"; break;
+ case CONSOLE_AGENT_RESTART: eventType = "Restarted"; break;
+ case CONSOLE_AGENT_SCHEMA_UPDATE: eventType = "Schema Updated"; break;
+ case CONSOLE_AGENT_SCHEMA_RESPONSE: eventType = "Schema Response"; break;
+ case CONSOLE_EVENT: eventType = "Event"; break;
+ case CONSOLE_QUERY_RESPONSE: eventType = "Query Response"; break;
+ case CONSOLE_METHOD_RESPONSE: eventType = "Method Response"; break;
+ case CONSOLE_EXCEPTION: eventType = "Exception"; break;
+ case CONSOLE_SUBSCRIBE_ADD: eventType = "Subscription Added"; break;
+ case CONSOLE_SUBSCRIBE_UPDATE: eventType = "Subscription Updated"; break;
+ case CONSOLE_SUBSCRIBE_DEL: eventType = "Subscription Deleted" ; break;
+ case CONSOLE_THREAD_FAILED: eventType = "Thread Failure"; break;
+ default: eventType = "[UNDEFINED]";
+ }
+ cout << "Agent " << eventType << ": " << event.getAgent().getName() << endl;
+ }
+ } else {
+ cout << "No message received within waiting period." << endl;
+ }
+ }
+}
+
diff --git a/qpid/cpp/bindings/qpid/dotnet/configure-windows.ps1 b/qpid/cpp/bindings/qpid/dotnet/configure-windows.ps1
index 34395911b9..23fc742e07 100644
--- a/qpid/cpp/bindings/qpid/dotnet/configure-windows.ps1
+++ b/qpid/cpp/bindings/qpid/dotnet/configure-windows.ps1
@@ -24,29 +24,32 @@
# This script configures a qpid\cpp developer build environment under Windows
# to enable working with cpp\bindings\qpid\dotnet binding source code.
#
+# * Supports multiple versions of Visual Studio (VS2008, VS2010) as CMake
+# generator.
+#
# * Supports 32-bit and/or 64-bit development platforms.
#
# * User chooses in-source or out-of-source build directories.
#
# - 'In-source' builds happen when CMake is run from directory qpid\cpp.
-# Hundreds of CMake-generated output files are placed in qpid\cpp\src.
+# Hundreds of CMake-generated output files are placed in qpid\cpp\src.
# These files go right on top of files that are part of the source tree
# in qpid\cpp\src.
-# In-source builds support only one platform.
+# In-source builds support only one platform.
# Choose only a 32-bit or a 64-bit platform but not both.
#
# - Out-of-source builds happen when the user chooses another directory
# under qpid in which to run CMake. Out-of-source builds are required
-# in order to build both x86 and x64 targets using the same source tree.
+# in order to build both x86 and x64 targets using the same source tree.
# For each build platform (32-bit x86 or Win32, or 64-bit x64) the user
-# specifies a build directory and a specific version of Boost.
+# specifies a build directory and a specific version of Boost.
# Many platform/Boost-version directories may reside side by side.
#
# * User chooses to run CMake or not.
#
# - When a new build directory is created then the user is given the
-# option of running CMake in that directory. Running CMake is a
-# necessary step as CMake creates important source, solution, and
+# option of running CMake in that directory. Running CMake is a
+# necessary step as CMake creates important source, solution, and
# project files.
#
# - If a directory "looks like" is has already had CMake run in it
@@ -63,7 +66,7 @@
# 3. CMake 2.8 (or later) must be installed. The cmake\bin directory
# must be in the user's path.
# 4. Boost library specifications may or may not be in the user's path.
-# The script author recommeds not to have Boost in the path and only
+# The script author recommeds not to have Boost in the path and only
# allow the Boost path to be specified by generated command procedures.
# 5. Visual Studio build environment must be installed.
#
@@ -90,7 +93,7 @@
# In this example the build dirs are new. The script will prompt
# asking if CMake is to run in the build directories. User chooses Yes.
#
-# Now this script runs CMake twice, once each with the 32-bit and 64-bit
+# Now this script runs CMake twice, once each with the 32-bit and 64-bit
# generators.
# * This step creates qpid-cpp.sln and related project files.
# C:\svn\qpid\build32\qpid-cpp.sln
@@ -107,7 +110,7 @@
# C:\svn\qpid\build64\setenv-messaging-x64-64bit.bat
#
# Next the user compiles solution qpid\build32\qpid-cpp.sln.
-#
+#
# Using the generated scripts:
#
# Case 1. Run an executable in 32-bit mode.
@@ -142,6 +145,11 @@ $global:txtPath = '$env:PATH'
$global:txtQR = '$env:QPID_BUILD_ROOT'
$global:txtWH = 'Write-Host'
+#############################
+# Visual Studio version selection dialog items and choice
+#
+[array]$global:VsVersionCmakeChoiceList = "Visual Studio 10", "Visual Studio 9 2008"
+$global:cmakeGenerator = ''
#############################
# Select-Folder
@@ -168,7 +176,7 @@ function AskYesOrNo ($Question="No question?", $Title="No Title?")
[Windows.Forms.MessageBoxIcon]::Question)
$result = $dlg -eq [Windows.Forms.DialogResult]::Yes
-
+
$result
}
@@ -188,7 +196,7 @@ function SanityCheckBoostPath ($path=0)
$toTest = ('include', 'lib')
foreach ($pattern in $toTest) {
- $target = Join-Path $path $pattern
+ $target = Join-Path $path $pattern
if (!(Test-Path -path $target)) {
$result = $false
}
@@ -196,7 +204,7 @@ function SanityCheckBoostPath ($path=0)
} else {
$result = $false
}
-
+
if (! $result) {
Write-Host "The path ""$displayPath"" does not appear to be a Boost root path."
}
@@ -219,7 +227,7 @@ function SanityCheckBuildPath ($path=0)
$toTest = ('CMakeFiles', 'docs', 'etc', 'examples', 'include',
'managementgen', 'src')
foreach ($pattern in $toTest) {
- $target = Join-Path $path $pattern
+ $target = Join-Path $path $pattern
if (!(Test-Path -path $target)) {
$result = $false
}
@@ -313,7 +321,7 @@ function WriteDotnetBindingEnvSetupBat
$out = @("@ECHO OFF
REM
-REM Call this command procedure from a command prompt to set up a $vsPlatform ($nBits-bit)
+REM Call this command procedure from a command prompt to set up a $vsPlatform ($nBits-bit)
REM $slnName environment
REM
REM > call $outfileName
@@ -329,6 +337,56 @@ ECHO Environment set for $slnName $vsPlatform $nBits-bit development.
$out | Out-File "$buildRoot\$outfileName" -encoding ASCII
}
+#############################
+# Return the SelectedItem from the dropdown list and close the form.
+#
+function Return-DropDown {
+ if ($DropDown.SelectedItem -ne $null) {
+ $global:cmakeGenerator = $DropDown.SelectedItem.ToString()
+ $Form.Close()
+ Write-Host "Selected generator: $global:cmakeGenerator"
+ }
+}
+
+#############################
+# Create the CMake generator form and launch it
+#
+function SelectCMakeGenerator {
+
+ $Form = New-Object System.Windows.Forms.Form
+
+ $Form.width = 350
+ $Form.height = 150
+ $Form.Text = ”Select CMake Generator”
+
+ $DropDown = new-object System.Windows.Forms.ComboBox
+ $DropDown.Location = new-object System.Drawing.Size(120,10)
+ $DropDown.Size = new-object System.Drawing.Size(150,30)
+
+ ForEach ($Item in $global:VsVersionCmakeChoiceList) {
+ $DropDown.Items.Add($Item)
+ }
+ $DropDown.SelectedIndex = 0
+
+ $Form.Controls.Add($DropDown)
+
+ $DropDownLabel = new-object System.Windows.Forms.Label
+ $DropDownLabel.Location = new-object System.Drawing.Size(10,10)
+ $DropDownLabel.size = new-object System.Drawing.Size(100,20)
+ $DropDownLabel.Text = "CMake generators"
+ $Form.Controls.Add($DropDownLabel)
+
+ $Button = new-object System.Windows.Forms.Button
+ $Button.Location = new-object System.Drawing.Size(120,50)
+ $Button.Size = new-object System.Drawing.Size(120,20)
+ $Button.Text = "Select a generator"
+ $Button.Add_Click({Return-DropDown})
+ $form.Controls.Add($Button)
+
+ $Form.Add_Shown({$Form.Activate()})
+ $Form.ShowDialog()
+}
+
#############################
# Main
@@ -341,6 +399,12 @@ ECHO Environment set for $slnName $vsPlatform $nBits-bit development.
[string] $cppDir = Resolve-Path (Join-Path $curDir "..\..\..")
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
+[System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | Out-Null
+
+#############################
+# User dialog to select a version of Visual Studio as CMake generator
+#
+SelectCMakeGenerator
#############################
# User dialog to get optional 32-bit boost and build paths
@@ -412,7 +476,7 @@ if ($make32) {
$env:BOOST_ROOT = "$boost32"
cd "$build32"
Write-Host "Running 32-bit CMake in $build32 ..."
- CMake -G "Visual Studio 9 2008" "-DCMAKE_INSTALL_PREFIX=install_x86" $cppDir
+ CMake -G "$global:cmakeGenerator" "-DCMAKE_INSTALL_PREFIX=install_x86" $cppDir
} else {
Write-Host "Skipped 32-bit CMake."
}
@@ -424,7 +488,7 @@ if ($make64) {
$env:BOOST_ROOT = "$boost64"
cd "$build64"
Write-Host "Running 64-bit CMake in $build64"
- CMake -G "Visual Studio 9 2008 Win64" "-DCMAKE_INSTALL_PREFIX=install_x64" $cppDir
+ CMake -G "$global:cmakeGenerator Win64" "-DCMAKE_INSTALL_PREFIX=install_x64" $cppDir
} else {
Write-Host "Skipped 64-bit CMake."
}
@@ -437,7 +501,7 @@ if ($make64) {
if ($defined32) {
Write-Host "Writing 32-bit scripts..."
-
+
###########
# Powershell script to launch org.apache.qpid.messaging.sln
#
@@ -448,8 +512,8 @@ if ($defined32) {
-vsPlatform "x86" `
-nBits "32" `
-outfileName "start-devenv-messaging-x86-32bit.ps1"
-
-
+
+
###########
# Batch script (that you doubleclick) to launch powershell script
# that launches org.apache.qpid.messaging.sln.
@@ -482,7 +546,7 @@ if ($defined32) {
if ($defined64) {
Write-Host "Writing 64-bit scripts..."
-
+
###########
# Powershell script to launch org.apache.qpid.messaging.sln
#
@@ -493,8 +557,8 @@ if ($defined64) {
-vsPlatform "x64" `
-nBits "64" `
-outfileName "start-devenv-messaging-x64-64bit.ps1"
-
-
+
+
###########
# Batch script (that you doubleclick) to launch powershell script
# that launches org.apache.qpid.messaging.sln.
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/Properties/AssemblyInfo.cs
index abe35cf053..6976be5d02 100644
--- a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/Properties/AssemblyInfo.cs
+++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.receiver/Properties/AssemblyInfo.cs
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -23,7 +23,7 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("csharp.direct.receiver")]
@@ -31,12 +31,12 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("csharp.direct.receiver")]
-[assembly: AssemblyCopyright("Copyright © 2010")]
+[assembly: AssemblyCopyright("Copyright 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@@ -46,11 +46,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/Properties/AssemblyInfo.cs
index 18502a0666..12368def8e 100644
--- a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/Properties/AssemblyInfo.cs
+++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.direct.sender/Properties/AssemblyInfo.cs
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -23,7 +23,7 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("csharp.direct.sender")]
@@ -31,12 +31,12 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("csharp.direct.sender")]
-[assembly: AssemblyCopyright("Copyright © 2010")]
+[assembly: AssemblyCopyright("Copyright 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@@ -46,11 +46,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/Properties/AssemblyInfo.cs
index a87f92ccdf..459130ec6c 100644
--- a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/Properties/AssemblyInfo.cs
+++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/Properties/AssemblyInfo.cs
@@ -20,7 +20,7 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("csharp.map.callback.receiver")]
@@ -28,12 +28,12 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("csharp.map.callback.receiver")]
-[assembly: AssemblyCopyright("Copyright © 2010")]
+[assembly: AssemblyCopyright("Copyright 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@@ -43,11 +43,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs
index e633f76673..2be4011f19 100644
--- a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs
+++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs
@@ -28,7 +28,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("csharp.map.callback.sender")]
-[assembly: AssemblyCopyright("Copyright © 2010")]
+[assembly: AssemblyCopyright("Copyright 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/Properties/AssemblyInfo.cs
index 694d6b9ce1..f11ce8c220 100644
--- a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/Properties/AssemblyInfo.cs
+++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.receiver/Properties/AssemblyInfo.cs
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -23,7 +23,7 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("csharp.map.receiver")]
@@ -31,12 +31,12 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("csharp.map.receiver")]
-[assembly: AssemblyCopyright("Copyright © 2010")]
+[assembly: AssemblyCopyright("Copyright 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@@ -46,11 +46,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/Properties/AssemblyInfo.cs
index ea29ac2417..ee09057f18 100644
--- a/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/Properties/AssemblyInfo.cs
+++ b/qpid/cpp/bindings/qpid/dotnet/examples/csharp.map.sender/Properties/AssemblyInfo.cs
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -23,7 +23,7 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("csharp.map.sender")]
@@ -31,12 +31,12 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("csharp.map.sender")]
-[assembly: AssemblyCopyright("Copyright © 2010")]
+[assembly: AssemblyCopyright("Copyright 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@@ -46,11 +46,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/dotnet/examples/visualbasic.example.client/MyProject/AssemblyInfo.vb b/qpid/cpp/bindings/qpid/dotnet/examples/visualbasic.example.client/MyProject/AssemblyInfo.vb
index d0727fe9fa..469d6ed5cf 100644
--- a/qpid/cpp/bindings/qpid/dotnet/examples/visualbasic.example.client/MyProject/AssemblyInfo.vb
+++ b/qpid/cpp/bindings/qpid/dotnet/examples/visualbasic.example.client/MyProject/AssemblyInfo.vb
@@ -6,9 +6,9 @@
' to you under the Apache License, Version 2.0 (the
' "License"); you may not use this file except in compliance
' with the License. You may obtain a copy of the License at
-'
+'
' http://www.apache.org/licenses/LICENSE-2.0
-'
+'
' Unless required by applicable law or agreed to in writing,
' software distributed under the License is distributed on an
' "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -21,34 +21,34 @@ Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
-' General Information about an assembly is controlled through the following
+' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.
' Review the values of the assembly attributes
-<Assembly: AssemblyTitle("visualbasic.example.client")>
-<Assembly: AssemblyDescription("")>
-<Assembly: AssemblyCompany("Microsoft")>
-<Assembly: AssemblyProduct("visualbasic.example.client")>
-<Assembly: AssemblyCopyright("Copyright © Microsoft 2010")>
-<Assembly: AssemblyTrademark("")>
+<Assembly: AssemblyTitle("visualbasic.example.client")>
+<Assembly: AssemblyDescription("")>
+<Assembly: AssemblyCompany("")>
+<Assembly: AssemblyProduct("visualbasic.example.client")>
+<Assembly: AssemblyCopyright("Copyright 2011")>
+<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'The following GUID is for the ID of the typelib if this project is exposed to COM
-<Assembly: Guid("ec9df8cf-c1d4-4938-9e72-93fb81d55700")>
+<Assembly: Guid("ec9df8cf-c1d4-4938-9e72-93fb81d55700")>
' Version information for an assembly consists of the following four values:
'
' Major Version
-' Minor Version
+' Minor Version
' Build Number
' Revision
'
-' You can specify all the values or you can default the Build and Revision Numbers
+' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
-' <Assembly: AssemblyVersion("1.0.*")>
+' <Assembly: AssemblyVersion("1.0.*")>
-<Assembly: AssemblyVersion("1.0.0.0")>
-<Assembly: AssemblyFileVersion("1.0.0.0")>
+<Assembly: AssemblyVersion("1.0.0.0")>
+<Assembly: AssemblyFileVersion("1.0.0.0")>
diff --git a/qpid/cpp/bindings/qpid/dotnet/org.apache.qpid.messaging.sessionreceiver.sln b/qpid/cpp/bindings/qpid/dotnet/org.apache.qpid.messaging.sessionreceiver.sln
index 90e98a4bbe..edf8af4808 100644
--- a/qpid/cpp/bindings/qpid/dotnet/org.apache.qpid.messaging.sessionreceiver.sln
+++ b/qpid/cpp/bindings/qpid/dotnet/org.apache.qpid.messaging.sessionreceiver.sln
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
-#
+#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -8,9 +8,9 @@ Microsoft Visual Studio Solution File, Format Version 10.00
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
diff --git a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/Properties/AssemblyInfo.cs b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/Properties/AssemblyInfo.cs
index cf50e88200..81a89ce393 100644
--- a/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/Properties/AssemblyInfo.cs
+++ b/qpid/cpp/bindings/qpid/dotnet/test/messaging.test/Properties/AssemblyInfo.cs
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -23,7 +23,7 @@ using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("messaging.test")]
@@ -31,12 +31,12 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("messaging.test")]
-[assembly: AssemblyCopyright("Copyright © 2010")]
+[assembly: AssemblyCopyright("Copyright 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@@ -46,11 +46,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
diff --git a/qpid/cpp/bindings/qpid/python/python.i b/qpid/cpp/bindings/qpid/python/python.i
index bf61cb10b7..9d45bf54ee 100644
--- a/qpid/cpp/bindings/qpid/python/python.i
+++ b/qpid/cpp/bindings/qpid/python/python.i
@@ -21,21 +21,357 @@
%include "std_string.i"
%include "../../swig_python_typemaps.i"
+/* Needed for get/setPriority methods. Surprising SWIG 1.3.40 doesn't
+ * convert uint8_t by default. */
+%apply unsigned char { uint8_t };
+
+
+/*
+ * Exceptions
+ *
+ * The convention below is that exceptions in _cqpid.so have the same
+ * names as in the C++ library. They get renamed to their Python
+ * equivalents when brought into the Python wrapping
+ */
+%{
+static PyObject* pNoMessageAvailable;
+static PyObject* pTargetCapacityExceeded;
+static PyObject* pNotFound;
+static PyObject* pTransportFailure;
+%}
+
+%init %{
+ pNoMessageAvailable = PyErr_NewException(
+ "_cqpid.NoMessageAvailable", NULL, NULL);
+ Py_INCREF(pNoMessageAvailable);
+ PyModule_AddObject(m, "NoMessageAvailable", pNoMessageAvailable);
+
+ pTargetCapacityExceeded = PyErr_NewException(
+ "_cqpid.TargetCapacityExceeded", NULL, NULL);
+ Py_INCREF(pTargetCapacityExceeded);
+ PyModule_AddObject(m, "TargetCapacityExceeded", pTargetCapacityExceeded);
+
+ pNotFound = PyErr_NewException(
+ "_cqpid.NotFound", NULL, NULL);
+ Py_INCREF(pNotFound);
+ PyModule_AddObject(m, "NotFound", pNotFound);
+
+ pTransportFailure = PyErr_NewException(
+ "_cqpid.TransportFailure", NULL, NULL);
+ Py_INCREF(pTransportFailure);
+ PyModule_AddObject(m, "TransportFailure", pTransportFailure);
+%}
+
+%pythoncode %{
+ Empty = _cqpid.NoMessageAvailable
+ TargetCapacityExceeded = _cqpid.TargetCapacityExceeded
+ NotFound = _cqpid.NotFound
+ ConnectError = _cqpid.TransportFailure
+%}
+
/* Define the general-purpose exception handling */
%exception {
+ PyObject * pExceptionType = NULL;
std::string error;
Py_BEGIN_ALLOW_THREADS;
try {
$action
+ } catch (qpid::messaging::NoMessageAvailable & ex) {
+ pExceptionType = pNoMessageAvailable;
+ error = ex.what();
+ } catch (qpid::messaging::TargetCapacityExceeded & ex) {
+ pExceptionType = pTargetCapacityExceeded;
+ error = ex.what();
+ } catch (qpid::messaging::NotFound & ex) {
+ pExceptionType = pNotFound;
+ error = ex.what();
+ } catch (qpid::messaging::TransportFailure & ex) {
+ pExceptionType = pTransportFailure;
+ error = ex.what();
} catch (qpid::types::Exception& ex) {
+ pExceptionType = PyExc_RuntimeError;
error = ex.what();
}
Py_END_ALLOW_THREADS;
if (!error.empty()) {
- PyErr_SetString(PyExc_RuntimeError, error.c_str());
+ PyErr_SetString(pExceptionType, error.c_str());
return NULL;
}
}
+
+/* This only renames the non-const version (I believe). Then again, I
+ * don't even know why there is a non-const version of the method. */
+%rename(opened) qpid::messaging::Connection::isOpen();
+%rename(receiver) qpid::messaging::Session::createReceiver;
+%rename(sender) qpid::messaging::Session::createSender;
+%rename(_acknowledge_all) qpid::messaging::Session::acknowledge(bool);
+%rename(_acknowledge_msg) qpid::messaging::Session::acknowledge(
+ Message &, bool);
+
+%rename(_fetch) qpid::messaging::Receiver::fetch;
+%rename(unsettled) qpid::messaging::Receiver::getUnsettled;
+%rename(available) qpid::messaging::Receiver::getAvailable;
+
+%rename(unsettled) qpid::messaging::Sender::getUnsettled;
+%rename(available) qpid::messaging::Sender::getAvailable;
+%rename(_send) qpid::messaging::Sender::send;
+
+%rename(_getReplyTo) qpid::messaging::Message::getReplyTo;
+%rename(_setReplyTo) qpid::messaging::Message::setReplyTo;
+%rename(_getTtl) qpid::messaging::Message::getTtl;
+%rename(_setTtl) qpid::messaging::Message::setTtl;
+
+
%include "../qpid.i"
+%extend qpid::messaging::Connection {
+ %pythoncode %{
+ # Handle the different options by converting underscores to hyphens.
+ # Also, the sasl_mechanisms option in Python has no direct
+ # equivalent in C++, so we will translate them to sasl_mechanism
+ # when possible.
+ def __init__(self, url=None, **options):
+ args = [url] if url else []
+ if options :
+ if "sasl_mechanisms" in options :
+ if ' ' in options.get("sasl_mechanisms",'') :
+ raise Exception(
+ "C++ Connection objects are unable to handle "
+ "multiple sasl-mechanisms")
+ options["sasl_mechanism"] = options.pop("sasl_mechanisms")
+ args.append(options)
+ this = _cqpid.new_Connection(*args)
+ try: self.this.append(this)
+ except: self.this = this
+ %}
+
+ /* Return a pre-existing session with the given name, if one
+ * exists, otherwise return a new one. (Note that if a
+ * pre-existing session exists, the transactional argument is
+ * ignored, and the returned session might not satisfy the desired
+ * setting. */
+ qpid::messaging::Session _session(const std::string & name,
+ bool transactional) {
+ if (!name.empty()) {
+ try {
+ return self->getSession(name);
+ }
+ catch (const qpid::messaging::KeyError &) {
+ }
+ }
+ if (transactional) {
+ return self->createTransactionalSession(name);
+ }
+ else {
+ return self->createSession(name);
+ }
+ }
+
+ %pythoncode %{
+ def session(self, name=None, transactional=False) :
+ if name is None :
+ name = ''
+ return self._session(name, transactional)
+ %}
+
+ %pythoncode %{
+ @staticmethod
+ def establish(url=None, **options) :
+ conn = Connection(url, **options)
+ conn.open()
+ return conn
+ %}
+}
+
+%extend qpid::messaging::Session {
+ %pythoncode %{
+ def acknowledge(self, message=None, disposition=None, sync=True) :
+ if disposition :
+ raise Exception("SWIG does not support dispositions yet. Use "
+ "Session.reject and Session.release instead")
+ if message :
+ self._acknowledge_msg(message, sync)
+ else :
+ self._acknowledge_all(sync)
+
+ __swig_getmethods__["connection"] = getConnection
+ if _newclass: connection = _swig_property(getConnection)
+ %}
+}
+
+
+%extend qpid::messaging::Receiver {
+ %pythoncode %{
+ __swig_getmethods__["capacity"] = getCapacity
+ __swig_setmethods__["capacity"] = setCapacity
+ if _newclass: capacity = _swig_property(getCapacity, setCapacity)
+
+ __swig_getmethods__["session"] = getSession
+ if _newclass: session = _swig_property(getSession)
+ %}
+
+ %pythoncode %{
+ def fetch(self, timeout=None) :
+ if timeout is None :
+ return self._fetch()
+ else :
+ # Python API uses timeouts in seconds,
+ # but C++ API uses milliseconds
+ return self._fetch(Duration(int(1000*timeout)))
+ %}
+}
+
+%extend qpid::messaging::Sender {
+ %pythoncode %{
+ def send(self, object, sync=True) :
+ if isinstance(object, Message):
+ message = object
+ else:
+ message = Message(object)
+ return self._send(message, sync)
+
+ __swig_getmethods__["capacity"] = getCapacity
+ __swig_setmethods__["capacity"] = setCapacity
+ if _newclass: capacity = _swig_property(getCapacity, setCapacity)
+
+ __swig_getmethods__["session"] = getSession
+ if _newclass: session = _swig_property(getSession)
+ %}
+}
+
+
+%extend qpid::messaging::Message {
+ %pythoncode %{
+ # UNSPECIFIED was module level before, but I do not
+ # know how to insert python code at the top of the module.
+ # (A bare "%pythoncode" inserts at the end.
+ UNSPECIFIED=object()
+ def __init__(self, content=None, content_type=UNSPECIFIED, id=None,
+ subject=None, user_id=None, reply_to=None,
+ correlation_id=None, durable=None, priority=None,
+ ttl=None, properties=None):
+ this = _cqpid.new_Message('')
+ try: self.this.append(this)
+ except: self.this = this
+ if content :
+ self.content = content
+ if content_type != UNSPECIFIED :
+ self.content_type = content_type
+ if id is not None :
+ self.id = id
+ if subject is not None :
+ self.subject = subject
+ if user_id is not None :
+ self.user_id = user_id
+ if reply_to is not None :
+ self.reply_to = reply_to
+ if correlation_id is not None :
+ self.correlation_id = correlation_id
+ if durable is not None :
+ self.durable = durable
+ if priority is not None :
+ self.priority = priority
+ if ttl is not None :
+ self.ttl = ttl
+ if properties is not None :
+ # Can't set properties via (inst).getProperties, because
+ # the typemaps make a copy of the underlying properties.
+ # Instead, set via setProperty for the time-being
+ for k, v in properties.iteritems() :
+ self.setProperty(k, v)
+
+ def _get_content(self) :
+ if self.content_type == "amqp/list" :
+ return decodeList(self)
+ if self.content_type == "amqp/map" :
+ return decodeMap(self)
+ return self.getContent()
+ def _set_content(self, content) :
+ if isinstance(content, basestring) :
+ self.setContent(content)
+ elif isinstance(content, list) or isinstance(content, dict) :
+ encode(content, self)
+ else :
+ # Not a type we can handle. Try setting it anyway,
+ # although this will probably lead to a swig error
+ self.setContent(content)
+ __swig_getmethods__["content"] = _get_content
+ __swig_setmethods__["content"] = _set_content
+ if _newclass: content = _swig_property(_get_content, _set_content)
+
+ __swig_getmethods__["content_type"] = getContentType
+ __swig_setmethods__["content_type"] = setContentType
+ if _newclass: content_type = _swig_property(getContentType,
+ setContentType)
+
+ __swig_getmethods__["id"] = getMessageId
+ __swig_setmethods__["id"] = setMessageId
+ if _newclass: id = _swig_property(getMessageId, setMessageId)
+
+ __swig_getmethods__["subject"] = getSubject
+ __swig_setmethods__["subject"] = setSubject
+ if _newclass: subject = _swig_property(getSubject, setSubject)
+
+ __swig_getmethods__["priority"] = getPriority
+ __swig_setmethods__["priority"] = setPriority
+ if _newclass: priority = _swig_property(getPriority, setPriority)
+
+ def getTtl(self) :
+ return self._getTtl().getMilliseconds()/1000.0
+ def setTtl(self, duration) :
+ self._setTtl(Duration(int(1000*duration)))
+ __swig_getmethods__["ttl"] = getTtl
+ __swig_setmethods__["ttl"] = setTtl
+ if _newclass: ttl = _swig_property(getTtl, setTtl)
+
+ __swig_getmethods__["user_id"] = getUserId
+ __swig_setmethods__["user_id"] = setUserId
+ if _newclass: user_id = _swig_property(getUserId, setUserId)
+
+ __swig_getmethods__["correlation_id"] = getCorrelationId
+ __swig_setmethods__["correlation_id"] = setCorrelationId
+ if _newclass: correlation_id = _swig_property(getCorrelationId,
+ setCorrelationId)
+
+ __swig_getmethods__["redelivered"] = getRedelivered
+ __swig_setmethods__["redelivered"] = setRedelivered
+ if _newclass: redelivered = _swig_property(getRedelivered,
+ setRedelivered)
+
+ __swig_getmethods__["durable"] = getDurable
+ __swig_setmethods__["durable"] = setDurable
+ if _newclass: durable = _swig_property(getDurable, setDurable)
+
+ __swig_getmethods__["properties"] = getProperties
+ if _newclass: properties = _swig_property(getProperties)
+
+ def getReplyTo(self) :
+ return self._getReplyTo().str()
+ def setReplyTo(self, address_str) :
+ self._setReplyTo(Address(address_str))
+ __swig_getmethods__["reply_to"] = getReplyTo
+ __swig_setmethods__["reply_to"] = setReplyTo
+ if _newclass: reply_to = _swig_property(getReplyTo, setReplyTo)
+
+ def __repr__(self):
+ args = []
+ for name in ["id", "subject", "user_id", "reply_to",
+ "correlation_id", "priority", "ttl",
+ "durable", "redelivered", "properties",
+ "content_type"] :
+ value = getattr(self, name)
+ if value : args.append("%s=%r" % (name, value))
+ if self.content is not None:
+ if args:
+ args.append("content=%r" % self.content)
+ else:
+ args.append(repr(self.content))
+ return "Message(%s)" % ", ".join(args)
+ %}
+}
+
+%pythoncode %{
+# Bring into module scope
+UNSPECIFIED = Message.UNSPECIFIED
+%}
diff --git a/qpid/cpp/bindings/qpid/ruby/README.rdoc b/qpid/cpp/bindings/qpid/ruby/README.rdoc
new file mode 100644
index 0000000000..960fdf6107
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/README.rdoc
@@ -0,0 +1,27 @@
+= Qpid - Open Source AMQP Messaging
+
+Qpid is an cross-platform enterprise messaging system.
+
+Version :: 0.10.0.alpha.0
+
+= Links
+
+Documents :: http://qpid.apache.org/
+
+= Installation
+
+You can install Qpid with the following command.
+
+ $ gem install qpid
+
+== Examples
+
+Take a look at the integration tests for examples on how to leverage
+the messaging capabilities of Qpid in your Ruby applications.
+
+== License
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor licensing agreements.
+
+
diff --git a/qpid/cpp/bindings/qpid/ruby/Rakefile b/qpid/cpp/bindings/qpid/ruby/Rakefile
new file mode 100644
index 0000000000..ef2b158eba
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/Rakefile
@@ -0,0 +1,74 @@
+# Rakefile for Qpid -*- ruby -*-
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+task :noop
+
+require 'rubygems'
+require 'rake/clean'
+require 'rake/rdoctask'
+require 'rake/testtask'
+
+CLOBBER.include('pkg')
+
+load './lib/qpid/version.rb'
+
+desc 'Default: run all tests.'
+task :default => :'test:all'
+
+#---------------
+# Testing tasks.
+#---------------
+
+desc 'Run all tests (alias for test:all).'
+task :test => :'test:all'
+
+namespace :test do
+ desc "Run all tests (default)."
+ task :all => [:units, :integrations]
+
+ desc "Run unit tests."
+ Rake::TestTask.new(:units) do |t|
+ t.libs << '.'
+ t.pattern = 'test/test*.rb'
+ t.verbose = true
+ end
+
+ desc "Run integration tests."
+ Rake::TestTask.new(:integrations) do |t|
+ t.libs << '.'
+ t.pattern = 'test/integration/*.rb'
+ t.verbose = true
+ end
+
+end
+
+#---------------------
+# Documentation tasks.
+#---------------------
+
+Rake::RDocTask.new(
+ :rdoc => 'rdoc',
+ :clobber_rdoc => 'rdoc:clean',
+ :rerdoc => 'rdoc:force'
+ ) do |rd|
+ rd.main = 'README.rdoc'
+ rd.options << '--all'
+ rd.rdoc_files.include('README.rdoc', 'lib/**/*.rb')
+end
diff --git a/qpid/cpp/bindings/qpid/ruby/examples/client.rb b/qpid/cpp/bindings/qpid/ruby/examples/client.rb
new file mode 100644
index 0000000000..f42f25cfc9
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/examples/client.rb
@@ -0,0 +1,50 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'qpid'
+
+if __FILE__ == $0
+ broker = ARGV[1] || "amqp:tcp:localhost:5672"
+ options = ARGV[2] || ""
+
+ connection = Qpid::Messaging::Connection.new broker, options
+ connection.open
+ session = connection.create_session
+ sender = session.create_sender "service_queue"
+ response_queue = Qpid::Messaging::Address.new("#response-queue", "",
+ :create => :always,
+ :delete => :always)
+ receiver = session.create_receiver response_queue
+
+ ["Twas brillig, and the slithy toves",
+ "Did gire and gymble in the wabe.",
+ "All mimsy were the borogroves,",
+ "And the mome raths outgrabe."].each do |line|
+ request = Qpid::Messaging::Message.new :content => line
+ request.reply_to = response_queue
+ sender.send request
+ response = receiver.fetch
+ puts "#{request.content} -> #{response.content}"
+ end
+
+ connection.close
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/examples/drain.rb b/qpid/cpp/bindings/qpid/ruby/examples/drain.rb
new file mode 100644
index 0000000000..a6cf35e189
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/examples/drain.rb
@@ -0,0 +1,111 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'qpid'
+require 'optparse'
+
+options = {
+ :broker => "localhost",
+ :timeout => Qpid::Messaging::Duration::IMMEDIATE,
+ :count => 1,
+ :forever => false,
+ :connection_options => ""
+}
+
+opts = OptionParser.new do |opts|
+ opts.banner = "Usage: drain.rb [OPTIONS] ADDRESS"
+
+ opts.separator ""
+ opts.separator "Drains messages from the specified address"
+ opts.separator ""
+
+ opts.on("-h", "--help",
+ "show this message") do
+ puts opts
+ exit
+ end
+
+ opts.on("-b", "--broker VALUE",
+ "url of broker to connect to") do |broker|
+ options[:broker] = broker
+ end
+
+ opts.on("-t", "--timeout VALUE", Integer,
+ "timeout in seconds to wait before exiting") do |timeout|
+ options[:timeout] = Qpid::Messaging::Duration.new timeout * 1000
+ end
+
+ opts.on("-f", "--forever",
+ "ignore timeout and wait forever") do
+ options[:forever] = true
+ end
+
+ opts.on("--connection-options VALUE",
+ "connection options string in the form {name1:value,name2:value2}") do |conopts|
+ options[:connection_options] = conopts
+ end
+
+ opts.on("-c", "--count VALUE", Integer,
+ "number of messages to read before exiting") do |count|
+ options[:count] = count
+ end
+end
+
+opts.parse!(ARGV)
+
+options[:address] = ARGV[0] || ""
+
+connection = Qpid::Messaging::Connection.new options[:broker], options[:connection_options]
+connection.open
+
+def render_map map
+ print "{"
+ map.keys.sort.each_with_index {|key,index| print "#{index > 0 ? ', ' : ''}#{key}:#{map[key]}"}
+ print "}"
+end
+
+begin
+ session = connection.create_session
+ receiver = session.create_receiver options[:address]
+ done = false
+ count = 0
+ options[:timeout] = Qpid::Messaging::Duration::FOREVER if options[:forever]
+
+ while !done && (count < options[:count])
+ message = receiver.fetch(options[:timeout])
+ print "Message(properties="
+ render_map message.properties
+ print ", content="
+ if message.content_type == "amqp/map"
+ print "'#{render_map message.content}')"
+ else
+ print "'#{message.content}'"
+ end
+ print ")\n"
+ session.acknowledge message
+ count += 1
+ end
+rescue Exception => error
+ puts "Exception: #{error.to_s}"
+end
+
+connection.close
+
diff --git a/qpid/cpp/bindings/qpid/ruby/examples/hello_world.rb b/qpid/cpp/bindings/qpid/ruby/examples/hello_world.rb
new file mode 100644
index 0000000000..703febeba1
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/examples/hello_world.rb
@@ -0,0 +1,49 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'qpid'
+
+# This is your classic Hello World application, written in
+# Ruby, that uses Qpid. It demonstrates how to send and
+# also receive messages.
+#
+if __FILE__ == $0
+ broker = ARGV[0] || "localhost:5672"
+ address = ARGV[1] || "amq.topic"
+ options = ARGV[2] || ""
+
+ connection = Qpid::Messaging::Connection.new broker
+ connection.open
+ session = connection.create_session
+ receiver = session.create_receiver address
+ sender = session.create_sender address
+
+ # Send a simple message
+ sender.send Qpid::Messaging::Message.new :content => "Hello world!"
+
+ # Now receive the message
+ message = receiver.fetch Qpid::Messaging::Duration::SECOND
+ puts "#{message.content}"
+ session.acknowledge
+
+ connection.close
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/examples/map_receiver.rb b/qpid/cpp/bindings/qpid/ruby/examples/map_receiver.rb
new file mode 100644
index 0000000000..805943a0a4
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/examples/map_receiver.rb
@@ -0,0 +1,63 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'qpid'
+
+broker = ARGV[0] || "amqp:tcp:127.0.0.1:5672"
+address = ARGV[1] || "message_queue; {create: always}"
+options = ARGV[2] || ""
+
+connection = Qpid::Messaging::Connection.new broker, options
+connection.open
+
+def display_value value
+ case value
+ when Array
+ result = ""
+ value.each_with_index {|element, index| result += "#{', ' if index > 0}#{element}"}
+ return "[#{result}]"
+ end
+
+ value.to_s
+end
+
+begin
+ session = connection.create_session
+ receiver = session.create_receiver address
+
+ message = receiver.fetch
+ content = message.content
+
+ print "content-type:#{message.content_type}"
+ print "{"
+ content.keys.sort.each_with_index do |key, index|
+ print "#{', ' if index > 0}#{key}:#{display_value content[key]}"
+ end
+ print "}\n"
+
+ session.acknowledge
+
+rescue Exception => error
+ puts "Exception: #{error.message}"
+end
+
+connection.close
+
diff --git a/qpid/ruby/lib/qpid/fields.rb b/qpid/cpp/bindings/qpid/ruby/examples/map_sender.rb
index cc87d07529..fa0c6e4562 100644
--- a/qpid/ruby/lib/qpid/fields.rb
+++ b/qpid/cpp/bindings/qpid/ruby/examples/map_sender.rb
@@ -17,33 +17,36 @@
# under the License.
#
-class Class
- def fields(*fields)
- module_eval {
- def initialize(*args, &block)
- args = init_fields(*args)
-
- if respond_to? :init
- init(*args) {|*a| yield(*a)}
- elsif args.any?
- raise ArgumentError, "extra arguments: #{args.inspect}"
- end
- end
- }
-
- vars = fields.map {|f| :"@#{f.to_s().chomp("?")}"}
-
- define_method(:init_fields) {|*args|
- vars.each {|v|
- instance_variable_set(v, args.shift())
- }
- args
- }
-
- vars.each_index {|i|
- define_method(fields[i]) {
- instance_variable_get(vars[i])
- }
- }
- end
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'qpid'
+
+broker = ARGV[0] || "amqp:tcp:127.0.0.1:5672"
+address = ARGV[1] || "message_queue; {create: always}"
+options = ARGV[2] || []
+
+connection = Qpid::Messaging::Connection.new broker, options
+connection.open
+
+begin
+ session = connection.create_session
+ sender = session.create_sender address
+ message = Qpid::Messaging::Message.new
+
+ content = {
+ :id => 987654321,
+ :name => "Widget",
+ :percent => 0.99,
+ :colors => ["red", "green", "blue"]
+ }
+
+ message.content = content
+
+ sender.send message
+
+rescue Exception => error
+ puts "Exception: #{error.message}"
end
+
+connection.close
+
diff --git a/qpid/cpp/bindings/qpid/ruby/examples/server.rb b/qpid/cpp/bindings/qpid/ruby/examples/server.rb
new file mode 100644
index 0000000000..ead9d58472
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/examples/server.rb
@@ -0,0 +1,51 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'qpid'
+
+if __FILE__ == $0
+ broker = ARGV[0] || "amqp:tcp:localhost:5672"
+ options = ARGV[1] || ""
+
+ connection = Qpid::Messaging::Connection.new broker, options
+ connection.open
+ session = connection.create_session
+ receiver = session.create_receiver "service_queue; {create:always}"
+
+ loop do
+ request = receiver.fetch
+ address = request.reply_to
+
+ if !address.nil?
+ sender = session.create_sender address
+ response = Qpid::Messaging::Message.new :content => request.content.upcase
+ sender.send response
+ puts "Processed request: #{request.content} -> #{response.content}"
+ session.acknowledge
+ else
+ puts "Error: no reply address specified for request: #{request.content}"
+ session.reject request
+ end
+ end
+
+ connection.close
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/examples/spout.rb b/qpid/cpp/bindings/qpid/ruby/examples/spout.rb
new file mode 100644
index 0000000000..c012e31f9d
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/examples/spout.rb
@@ -0,0 +1,126 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'qpid'
+require 'optparse'
+
+options = {
+ :broker => "127.0.0.1",
+ :address => "",
+ :timeout => 0,
+ :count => 1,
+ :properties => {},
+ :content => nil,
+ :mapped => {}
+}
+
+opts = OptionParser.new do |opts|
+ opts.banner = "Usage: spout.rb [OPTIONS] ADDRESS"
+
+ opts.on("-h", "--help",
+ "show this message") do |help|
+ puts opts
+ exit
+ end
+
+ opts.on("-b","--broker VALUE",
+ "url of broker to connect to ") do |broker|
+ options[:broker] = broker
+ end
+
+ opts.on("-t", "--timeout VALUE", Integer,
+ "exit after the specified time") do |timeout|
+ options[:timeout] = Qpid::Messaging::Duration.new timeout * 1000
+ end
+
+ opts.on("-c", "--count VALUE", Integer,
+ "stop after count messages have been sent, zero disables") do |count|
+ options[:count] = count
+ end
+
+ opts.on("-i", "--id VALUE",
+ "use the supplied id instead of generating one") do |id|
+ options[:id] = id
+ end
+
+ opts.on("--reply-to VALUE",
+ "specify reply-to address") do |replyto|
+ options[:replyto] = replyto
+ end
+
+ opts.on("-P", "--property VALUE",
+ "specify message property") do |property|
+ name = property.split(/=/)[0]
+ value = property.split(/=/)[1]
+ options[:properties][name] = value
+ end
+
+ opts.on("-M", "--map VALUE",
+ "specify entry for map content") do |mapped|
+ name = mapped.split(/=/)[0]
+ value = mapped.split(/=/)[1]
+ options[:mapped][name] = value
+ end
+
+ opts.on("--content VALUE",
+ "specify textual content") do |content|
+ options[:content] = content
+ end
+
+ opts.on(nil, "--connection-options VALUE",
+ "connection options string in the form {name1:value1, name2:value2}") do |conopts|
+ options[:connection_options] = conopts
+ end
+end
+
+begin
+ opts.parse!(ARGV)
+rescue => error
+ opts.parse(["-h"])
+end
+
+# now get the non-arg options
+options[:address] = ARGV[0] unless ARGV[0].nil?
+
+connection = Qpid::Messaging::Connection.new options[:broker], options[:connection_options]
+connection.open
+session = connection.create_session
+sender = session.create_sender options[:address]
+message = Qpid::Messaging::Message.new
+
+options[:properties].each_key {|key| message.properties[key] = options[:properties][key]}
+
+(1..options[:count]).each do |count|
+ if !options[:mapped].keys.empty?
+ message.content = options[:mapped]
+ elsif options[:content]
+ message.content = options[:content]
+ end
+ message.content = options[:content] unless options[:content].nil?
+ message.properties["spout-id"] = "#{count}"
+ message.reply_to = options[:replyto] unless options[:replyto].nil? || options[:replyto].empty?
+ sender.send message
+end
+
+# session.sync
+
+connection.close
+
diff --git a/qpid/java/broker/etc/passwdVhost b/qpid/cpp/bindings/qpid/ruby/lib/qpid.rb
index 48ce8299b6..1f00c136c1 100644
--- a/qpid/java/broker/etc/passwdVhost
+++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid.rb
@@ -16,4 +16,14 @@
# specific language governing permissions and limitations
# under the License.
#
-guest:guest:localhost,test
+
+require 'qpid/errors'
+require 'qpid/duration'
+require 'qpid/address'
+require 'qpid/encoding'
+require 'qpid/message'
+require 'qpid/sender'
+require 'qpid/receiver'
+require 'qpid/session'
+require 'qpid/connection'
+
diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid/address.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid/address.rb
new file mode 100644
index 0000000000..73b61bb1c7
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid/address.rb
@@ -0,0 +1,125 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require 'cqpid'
+
+module Qpid
+
+ module Messaging
+
+ # Address represents an address to which messages can be sent or from
+ # which they can be received.
+ #
+ # An Address can be described using the following pattern:
+ #
+ # <address> [ / <subject> ] ; [ { <key> : <value> , ... } ]
+ #
+ # where *address* is a simple name and *subject* is a subject or subject
+ # pattern.
+ #
+ # The options, enclosed in curly braces, are key:value pairs delimited by
+ # a comma. The values can be nested maps also enclosed in curly braces.
+ # Or they can be lists of values, where they are contained within square
+ # brackets but still comma delimited, such as:
+ #
+ # [value1,value2,value3]
+ #
+ # The following are the list of supported options:
+ #
+ # create:: Indicates if the address should be created; values are *always*,
+ # *never*, *sender* or *reciever*.
+ #
+ # assert:: Indicates whether or not to assert any specified node properties;
+ # values are *always*, *never*, *sender* or *receiver*.
+ #
+ # delete:: Indicates whether or not to delete the addressed node when a
+ # sender or receiver is cancelled; values are *always*, *never*,
+ # *sender* or *receiver*.
+ #
+ # node:: A nested map describing properties for the addressed node.
+ # Properties are *type* (*topic* or *queue*), *durable* (a boolean),
+ # *x-declare* (a nested map of amqp 0.10-specific options) and
+ # *x-bindings*. (nested list which specifies a queue, exchange or
+ # a binding key and arguments.
+ #
+ # link:: A nested map through which properties of the link can be specified;
+ # properties are *durable*, *reliability*, *x-declare*, *x-subscribe*
+ # and *x-bindings*.
+ #
+ # mode:: (*For receivers only*) indicates whether the receiver should consume
+ # or browse messages; values are *consume* (the default) and *browse*.
+ class Address
+
+ def initialize(name, subject, options = {}, _type = "", address_impl = nil)
+ @address_impl = address_impl || Cqpid::Address.new(name, subject, convert_options(options), _type)
+ end
+
+ def address_impl # :nodoc:
+ @address_impl
+ end
+
+ # Returns the name.
+ def name; @address_impl.getName; end
+
+ # Sets the name.
+ def name=(name); @address_impl.setName name; end
+
+ # Returns the subject.
+ def subject; @address_impl.getSubject; end
+
+ # Sets the subject.
+ def subject=(subject); @address_impl.setSubject(subject); end
+
+ # Returns the type.
+ #---
+ # We cannot use "type" since that clashes with the Ruby object.type
+ # identifier.
+ def _type; @address_impl.getType; end
+
+ # Sets the type.
+ #
+ # The type of the address determines how Sender and Receiver objects
+ # are constructed for it. If no type is specified then it will be
+ # determined by querying the broker.
+ def _type=(_type); @address_impl.setType(_type); end
+
+ # Returns the options.
+ def options; @address_impl.getOptions; end
+
+ # Sets the options for the address.
+ # Any symbols are converted to strings.
+ def options=(options); @address_impl.setOptions(convert_options(options)); end
+
+ def to_s; @address_impl.str; end
+
+ private
+
+ def convert_options(options)
+ result = {}
+ options.each_pair {|key, value| result[key.to_s] = value.to_s}
+
+ return result
+ end
+
+ end
+
+ end
+
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid/connection.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid/connection.rb
new file mode 100644
index 0000000000..5c56c1f5d0
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid/connection.rb
@@ -0,0 +1,134 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require 'cqpid'
+
+module Qpid
+
+ module Messaging
+
+ # Connection allows for establishing connections to a remote endpoint.
+ class Connection
+
+ # The following general options are supported (as strings or symbols):
+ #
+ # username::
+ # password::
+ # heartbeat::
+ # tcp_nodelay::
+ # sasl_mechanism::
+ # sasl_service::
+ # sasl_min_ssf::
+ # sasl_max_ssf::
+ # transport::
+ #
+ # The following options specifically control reconnection behavior:
+ #
+ # reconnect:: *true* or *false*; indicates whether to attempt reconnections
+ # reconnect_timeout:: the number of seconds to attempt reconnecting
+ # reconnect_limit:: the number of retries before reporting failure
+ # reconnect_interval_min:: initial delay, in seconds, before attempting a reconnecting
+ # reconnect_interval_max:: number of seconds to wait before additional reconnect attempts
+ # reconnect_interval:: shorthand for setting box min and max values
+ # reconnect_urls:: a list of alternate URLs to use for reconnection attempts
+ def initialize(url, options = {}, connection_impl = nil)
+ @url = url
+ @connection_impl = connection_impl
+ @options = options
+ end
+
+ def connection_impl # :nodoc:
+ @connection_impl
+ end
+
+ # Opens the connection.
+ def open
+ @connection_impl = Cqpid::Connection.new(@url, convert_options)
+ @connection_impl.open
+ end
+
+ # Reports whether the connection is open.
+ def open?; false || (@connection_impl.isOpen if @connection_impl); end
+
+ # Closes the connection.
+ def close; @connection_impl.close if open?; end
+
+ # Creates a new session.
+ #
+ # If :transactional => true then a transactional session is created.
+ # Otherwise a standard session is created.
+ def create_session(args = {})
+ name = args[:name] || ""
+ if open?
+ if args[:transactional]
+ session = @connection_impl.createTransactionalSession name
+ else
+ session = @connection_impl.createSession name
+ end
+ return Session.new(session)
+ else
+ raise RuntimeError.new "No connection available."
+ end
+ end
+
+ # Returns a session for the specified session name.
+ def session name
+ session_impl = @connection_impl.getSession name
+ Qpid::Messaging::Session.new session_impl if session_impl
+ end
+
+ # Returns the username used to authenticate with the connection.
+ def authenticated_username; @connection_impl.getAuthenticatedUsername if open?; end
+
+ # inherited from Handle
+
+ # Returns whether the underlying handle is valid; i.e., not null.
+ def valid?
+ @connection_impl.isValid
+ end
+
+ # Returns whether the underlying handle is null.
+ def null?
+ @connection_impl.isNull
+ end
+
+ # Swaps the underlying connection handle.
+ def swap connection
+ @connection_impl.swap connection.connection_impl
+ end
+
+ private
+
+ def convert_options
+ result = {}
+ # map only those options defined in the C++ layer
+ # TODO when new options are added, this needs to be updated.
+ unless @options.nil? || @options.empty?
+ @options.each_pair {|key, value| result[key.to_s] = value.to_s}
+ end
+
+ return result
+ end
+
+ end
+
+ end
+
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid/duration.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid/duration.rb
new file mode 100644
index 0000000000..c1f44e9281
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid/duration.rb
@@ -0,0 +1,63 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require 'cqpid'
+
+module Qpid
+
+ module Messaging
+
+ # A Duration represents a period of time in milliseconds
+ #
+ # It defines the following named values as symbols:
+ #
+ # :FOREVER :: the maximum integer value for the platform
+ # :IMMEDIATE :: an alias for 0
+ # :SECOND :: 1,000ms
+ # :MINUTE :: 60,000ms
+ class Duration
+
+ def initialize duration # :nodoc:
+ @duration_impl = Cqpid::Duration.new duration
+ end
+
+ def duration_impl # :nodoc:
+ @duration_impl
+ end
+
+ def self.add_item(key, value) # :nodoc:
+ @hash ||= {}
+ @hash[key] = Duration.new value
+ end
+
+ def self.const_missing(key) # :nodoc:
+ @hash[key]
+ end
+
+ self.add_item :FOREVER, Cqpid::Duration.FOREVER.getMilliseconds
+ self.add_item :IMMEDIATE, Cqpid::Duration.IMMEDIATE.getMilliseconds
+ self.add_item :SECOND, Cqpid::Duration.SECOND.getMilliseconds
+ self.add_item :MINUTE, Cqpid::Duration.MINUTE.getMilliseconds
+
+ end
+
+ end
+
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid/encoding.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid/encoding.rb
new file mode 100644
index 0000000000..c8b843b597
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid/encoding.rb
@@ -0,0 +1,56 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require 'cqpid'
+
+module Qpid
+
+ module Messaging
+
+ # Encodes the supplied content into the given message.
+ def self.encode content, message, encoding = nil
+ prepared = content
+ case content
+ when Hash
+ prepared = {}
+ content.each_pair do |key,value|
+ prepared[key.to_s] = value.to_s
+ end
+ Cqpid::encode prepared, message.message_impl
+ when Array
+ prepared = []
+ content.each {|value| prepared << value.to_s}
+ Cqpid::encode prepared, message.message_impl
+ end
+ end
+
+ # Decodes and returns the message's content.
+ def self.decode(message, content_type = nil)
+ content_type = message.content_type unless content_type
+
+ case content_type
+ when "amqp/map": Cqpid.decodeMap message.message_impl
+ when "amqp/list": Cqpid.decodeList message.message_impl
+ end
+ end
+
+ end
+
+end
+
diff --git a/qpid/dotnet/build-mono b/qpid/cpp/bindings/qpid/ruby/lib/qpid/errors.rb
index 71d94ad268..7a16d08d84 100755..100644
--- a/qpid/dotnet/build-mono
+++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid/errors.rb
@@ -1,4 +1,3 @@
-#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -18,4 +17,14 @@
# under the License.
#
-nant -t:mono-2.0 "$@"
+module Qpid
+
+ module Messaging
+
+ class KeyError < RuntimeError
+ end
+
+ end
+
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid/message.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid/message.rb
new file mode 100644
index 0000000000..9b1b68c7c3
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid/message.rb
@@ -0,0 +1,157 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require 'cqpid'
+
+module Qpid
+
+ module Messaging
+
+ # Message represents a message.
+ class Message
+
+ def initialize(args = {}, message_impl = nil)
+ @message_impl = message_impl
+ @message_impl = Cqpid::Message.new if @message_impl.nil?
+ @message_impl.setContent args[:content].to_s if args[:content]
+ @content = nil
+ end
+
+ def message_impl # :nodoc:
+ @message_impl
+ end
+
+ # Assigns the reply to address.
+ # The address must be an instance of Address.
+ def reply_to=(address); @message_impl.setReplyTo address.address_impl; end
+
+ # Returns the reply to address for the message as an instance of +Address+.
+ def reply_to
+ address_impl = @message_impl.getReplyTo
+ # only return an address if a reply to was specified
+ Qpid::Messaging::Address.new(nil, nil, nil, nil, address_impl) if address_impl
+ end
+
+ # Sets the subject.
+ def subject=(subject); @message_impl.setSubject subject; end
+
+ # Returns the subject.
+ def subject; @message_impl.getSubject; end
+
+ # Sets the content type.
+ def content_type=(content_type); @message_impl.setContentType content_type; end
+
+ # Returns the content type.
+ def content_type; @message_impl.getContentType; end
+
+ # Sets the message id.
+ def message_id=(message_id); @message_impl.setMessageId message_id.to_s; end
+
+ # Returns the message id.
+ def message_id; @message_impl.getMessageId; end
+
+ # Sets the user id.
+ def user_id=(user_id); @message_impl.setUserId user_id; end
+
+ # Returns the user id.
+ def user_id; @message_impl.getUserId; end
+
+ # Sets the correlation id.
+ def correlation_id=(correlation_id); @message_impl.setCorrelationId correlation_id; end
+
+ # Returns the correlation id.
+ def correlation_id; @message_impl.getCorrelationId; end
+
+ # Sets the priority.
+ def priority=(priority); @message_impl.setPriority priority; end
+
+ # Returns the priority.
+ def priority; @message_impl.getPriority; end
+
+ # Sets the time-to-live in milliseconds.
+ def ttl=(duration); @message_impl.setTtl duration; end
+
+ # Returns the time-to-live in milliseconds.
+ def ttl; @message_impl.getTtl; end
+
+ # Sets the durability.
+ def durable=(durable); @message_impl.setDurable durable; end
+
+ # Returns the durability.
+ def durable; @message_impl.getDurable; end
+
+ # Allows marking the message as redelivered.
+ def redelivered=(redelivered); @message_impl.setRedelivered redelivered; end
+
+ # Returns if the message was redelivered.
+ def redelivered; @message_impl.getRedelivered; end
+
+ # Returns all named properties.
+ # *NOTE:* It is recommended to use the +foo[key]+ method for
+ # retrieving properties.
+ def properties; @message_impl.getProperties; end
+
+ # Returns the value for the named property.
+ def [](key); self.properties[key.to_s]; end
+
+ # Assigns a value to the named property.
+ def []=(key, value); @message_impl.setProperty(key.to_s, value.to_s); end
+
+ # Sets the content.
+ def content=(content)
+ content_type = nil
+ @content = content
+ case @content
+ when Hash
+ content_type = "amqp/map"
+ when Array
+ content_type = "amqp/list"
+ end
+ if content_type.nil?
+ @message_impl.setContent @content
+ else
+ Qpid::Messaging.encode @content, self, content_type
+ end
+ end
+
+ # Returns the content.
+ def content
+ if @content.nil?
+ @content = @message_impl.getContent
+
+ # decode the content is necessary if it
+ # has an encoded content type
+ if ["amqp/list", "amqp/map"].include? @message_impl.getContentType
+ @content = Qpid::Messaging.decode(self,
+ @message_impl.getContentType)
+ end
+
+ end
+ @content
+ end
+
+ # Returns the content's size.
+ def content_size; @message_impl.getContentSize; end
+
+ end
+
+ end
+
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid/receiver.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid/receiver.rb
new file mode 100644
index 0000000000..d498aa922b
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid/receiver.rb
@@ -0,0 +1,102 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require 'cqpid'
+
+require 'qpid/duration'
+
+module Qpid
+
+ module Messaging
+
+ # Receiver defines a type for receiving messages.
+ class Receiver
+
+ def initialize(receiver_impl) # :nodoc:
+ @receiver_impl = receiver_impl
+ end
+
+ def receiver_impl # :nodoc:
+ @receiver_impl
+ end
+
+ # Retrieves a message from the receiver's local queue, or waits
+ # for up to the duration specified for one to become available.
+ def get(duration = Qpid::Messaging::Duration::FOREVER)
+ message_impl = @receiver_impl.get duration.duration_impl
+ create_message_wrapper message_impl unless message_impl.nil?
+ end
+
+ # Retrieves a message from the receiver's subscription, or waits
+ # for up to the duration specified for one to become available.
+ def fetch(duration = Qpid::Messaging::Duration::FOREVER)
+ message_impl = @receiver_impl.fetch duration.duration_impl
+ create_message_wrapper message_impl unless message_impl.nil?
+ end
+
+ # Sets the capacity.
+ #
+ # The capacity for a receiver determines the number of messages that
+ # can be held in the receiver before being fetched.
+ def capacity=(capacity); @receiver_impl.setCapacity capacity; end
+
+ # Returns the capacity.
+ def capacity; @receiver_impl.getCapacity; end
+
+ # Returns the number of available messages waiting to be fetched.
+ def available; @receiver_impl.getAvailable; end
+
+ # Returns the number of messages that have been received and acknowledged
+ # but whose acknowledgements have not been confirmed by the sender.
+ def unsettled; @receiver_impl.getUnsettled; end
+
+ # Cancels the reciever.
+ def close; @receiver_impl.close; end
+
+ # Returns whether the receiver is closed.
+ def closed?; @receiver_impl.isClosed; end
+
+ # Returns the name of the receiver
+ def name; @receiver_impl.getName; end
+
+ # Returns the Session for this receiver.
+ def session; Qpid::Messaging::Session.new(@receiver_impl.getSession); end
+
+ # Returns whether the underlying handle is valid.
+ def valid?; @receiver_impl.isValid; end
+
+ # Returns whether the underlying handle is null.
+ def null?; @receiver_impl.isNull; end
+
+ def swap receiver
+ @receiver_impl.swap receiver.receiver_impl
+ end
+
+ private
+
+ def create_message_wrapper message_impl
+ Qpid::Messaging::Message.new({}, message_impl)
+ end
+
+ end
+
+ end
+
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid/sender.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid/sender.rb
new file mode 100644
index 0000000000..5d59c20d7e
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid/sender.rb
@@ -0,0 +1,82 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+module Qpid
+
+ module Messaging
+
+ # Sender defines a type for sending messages.
+ class Sender
+
+ def initialize(sender_impl) # :nodoc:
+ @sender_impl = sender_impl
+ end
+
+ def sender_impl # :nodoc:
+ @sender_impl
+ end
+
+ # Sends a message.
+ def send(message, args = {})
+ block = args[:block] || false
+ @sender_impl.send message.message_impl, block
+ end
+
+ # Closes the sender.
+ def close; @sender_impl.close; end
+
+ # Returns the name for the sender.
+ def name; @sender_impl.getName; end
+
+ # Sets the capacity for the sender, which is the number of outgoing
+ # messages that can be held pending confirmation or receipt by
+ # the broker.
+ def capacity=(capacity); @sender_impl.setCapacity capacity; end
+
+ # Returns the capacity.
+ def capacity; @sender_impl.getCapacity; end
+
+ # Returns the number of messages sent that are pending receipt
+ # confirmation by the broker.
+ def unsettled; @sender_impl.getUnsettled; end
+
+ # Returns the available capacity for sending messages.
+ def available
+ @sender_impl.getAvailable
+ end
+
+ # Returns the Session for this sender.
+ def session; Qpid::Messaging::Session.new @sender_impl.getSession; end
+
+ # Returns if the underlying sender is valid.
+ def valid?; @sender_impl.isValid; end
+
+ # Returns if the underlying sender is null.
+ def null?; @sender_impl.isNull; end
+
+ def swap sender
+ @sender_impl.swap sender.sender_impl
+ end
+
+ end
+
+ end
+
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/lib/qpid/session.rb b/qpid/cpp/bindings/qpid/ruby/lib/qpid/session.rb
new file mode 100644
index 0000000000..543c26cc70
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid/session.rb
@@ -0,0 +1,186 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+require 'cqpid'
+
+require 'qpid/errors'
+
+module Qpid
+
+ module Messaging
+
+ # A Session represents a distinct conversation between end points.
+ class Session
+
+ def initialize(session) # :nodoc:
+ @session_impl = session
+ end
+
+ def session_impl # :nodoc:
+ @session_impl
+ end
+
+ # Returns the +Connection+ for the +Session+.
+ def connection
+ connection_impl = @session_impl.getConnection
+ Qpid::Messaging::Connection.new "", {}, connection_impl
+ end
+
+ # Creates a new endpoint for sending messages.
+ def create_sender(address)
+ _address = address
+
+ if address.class == Qpid::Messaging::Address
+ _address = address.address_impl
+ end
+
+ Qpid::Messaging::Sender.new(@session_impl.createSender(_address))
+ end
+
+ # Retrieves the +Sender+ with the specified name.
+ def sender(name)
+ result = nil
+
+ begin
+ sender_impl = @session_impl.getSender name
+ result = Sender.for_impl sender_impl
+ rescue
+ # treat any error as a key error
+ end
+
+ raise Qpid::Messaging::KeyError, "No such sender: #{name}" if result.nil?
+ result
+ end
+
+ # Retrieves the +Receiver+ with the specified name.
+ def receiver(name)
+ result = nil
+
+ begin
+ receiver_impl = @session_impl.getReceiver name
+ result = Receiver.for_impl receiver_impl
+ rescue
+ # treat any error as a key error
+ end
+
+ raise Qpid::Messaging::KeyError, "No such receiver: #{name}" if result.nil?
+ result
+ end
+
+ # Creates a new endpoint for receiving messages.
+ def create_receiver(address)
+ result = nil
+
+ if address.class == Qpid::Messaging::Address
+ address_impl = address.address_impl
+ result = Qpid::Messaging::Receiver.new(@session_impl.createReceiver(address_impl))
+ else
+ result = Qpid::Messaging::Receiver.new(@session_impl.createReceiver(address))
+ end
+
+ return result
+ end
+
+ # Closes the Session and all associated Senders and Receivers.
+ # All Sessions are closed when the associated Connection is closed.
+ def close; @session_impl.close; end
+
+ # Commits any pending transactions for a transactional session.
+ def commit; @session_impl.commit; end
+
+ # Rolls back any uncommitted transactions on a transactional session.
+ def rollback; @session_impl.rollback; end
+
+ # Acknowledges one or more outstanding messages that have been received
+ # on this session.
+ #
+ # If a message is submitted (:message => something_message) then only
+ # that message is acknowledged. Otherwise all messsages are acknowledged.
+ #
+ # If :sync => true then the call will block until the server completes
+ # processing the acknowledgements.
+ # If :sync => true then the call will block until processed by the server (def. false)
+ def acknowledge(args = {})
+ sync = args[:sync] || false
+ message = args[:message] if args[:message]
+
+ unless message.nil?
+ @session_impl.acknowledge message.message_impl, sync
+ else
+ @session_impl.acknowledge sync
+ end
+ end
+
+ # Rejects the specified message. A rejected message will not be redelivered.
+ #
+ # NOTE: A message cannot be rejected once it has been acknowledged.
+ def reject(message); @session_impl.reject message.message_impl; end
+
+ # Releases the message, which allows the broker to attempt to
+ # redeliver it.
+ #
+ # NOTE: A message connot be released once it has been acknowled.
+ def release(message); @session_impl.release message.message_impl; end
+
+ # Requests synchronization with the server.
+ #
+ # If :block => true then the call will block until the server acknowledges.
+ #
+ # If :block => false (default) then the call will complete and the server
+ # will send notification on completion.
+ def sync(args = {})
+ block = args[:block] || false
+ @session_impl.sync block
+ end
+
+ # Returns the total number of receivable messages, and messages already received,
+ # by Receivers associated with this session.
+ def receivable; @session_impl.getReceivable; end
+
+ # Returns the number of messages that have been acknowledged by this session
+ # whose acknowledgements have not been confirmed as processed by the server.
+ def unsettled_acks; @session_impl.getUnsettledAcks; end
+
+ # Fetches the receiver for the next message.
+ def next_receiver(timeout = Qpid::Messaging::Duration::FOREVER)
+ receiver_impl = @session_impl.nextReceiver(timeout.duration_impl)
+ Qpid::Messaging::Receiver.new receiver_impl
+ end
+
+ # Returns whether there are errors on this session.
+ def error?; @session_impl.hasError; end
+
+ def check_error; @session_impl.checkError; end
+
+ # Returns if the underlying session is valid.
+ def valid?; @session_impl.isValid; end
+
+ # Returns if the underlying session is null.
+ def null?; @session_impl.isNull; end
+
+ def swap session
+ @session_impl.swap session.session_impl
+ end
+
+ end
+
+ end
+
+end
+
diff --git a/qpid/java/tools/bin/run_sub.sh b/qpid/cpp/bindings/qpid/ruby/lib/qpid/version.rb
index c9ad2fed74..a791b1638c 100644
--- a/qpid/java/tools/bin/run_sub.sh
+++ b/qpid/cpp/bindings/qpid/ruby/lib/qpid/version.rb
@@ -1,4 +1,3 @@
-#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -18,8 +17,15 @@
# under the License.
#
-. $QPID_TEST_HOME/bin/setenv.sh
+module Qpid
-echo "$@"
-$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.tools.PerfConsumer
+ module Version
+ NUMBERS = [MAJOR = 0,
+ MINOR = 10,
+ BUILD = 0]
+ end
+
+ VERSION = Version::NUMBERS.join('.')
+
+end
diff --git a/qpid/ruby/ext/sasl/extconf.rb b/qpid/cpp/bindings/qpid/ruby/test/lib/setup.rb
index 56841f34e3..c4901ed907 100644
--- a/qpid/ruby/ext/sasl/extconf.rb
+++ b/qpid/cpp/bindings/qpid/ruby/test/lib/setup.rb
@@ -6,9 +6,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -16,13 +16,14 @@
# specific language governing permissions and limitations
# under the License.
#
-require 'mkmf'
-extension_name = 'sasl'
-have_library("c", "main")
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'qpid'
-unless have_library("sasl2")
- raise "Package cyrus-sasl-devel not found"
+def create_session url, session_name
+ conn = Qpid::Messaging::Connection.new url
+ conn.open
+ conn.create_session session_name
end
-create_makefile(extension_name)
diff --git a/qpid/ruby/lib/qpid/test.rb b/qpid/cpp/bindings/qpid/ruby/test/test_address.rb
index 2e643f4348..f54e93aa3d 100644
--- a/qpid/ruby/lib/qpid/test.rb
+++ b/qpid/cpp/bindings/qpid/ruby/test/test_address.rb
@@ -1,3 +1,4 @@
+#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -16,20 +17,23 @@
# under the License.
#
-require "qpid/spec08"
-require "qpid/client"
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'test/unit'
+require 'flexmock/test_unit'
-module Qpid08
+require 'cqpid'
+require 'qpid/address'
- module Test
+class TestAddress < Test::Unit::TestCase
- def connect()
- spec = Spec.load("../specs/amqp.0-8.xml")
- c = Client.new("0.0.0.0", 5672, spec)
- c.start({"LOGIN" => "guest", "PASSWORD" => "guest"})
- return c
- end
+ def test_constructor
+ result = Qpid::Messaging::Address.new "name", "subject", {:foo => :bar}, "type"
+ assert_equal "name", result.name
+ assert_equal "subject", result.subject
+ assert_equal "type", result._type
end
end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/test/test_connection.rb b/qpid/cpp/bindings/qpid/ruby/test/test_connection.rb
new file mode 100644
index 0000000000..648fb0588a
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/test/test_connection.rb
@@ -0,0 +1,257 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'test/unit'
+require 'flexmock/test_unit'
+
+require 'cqpid'
+require 'qpid/connection'
+
+class TestConnection < Test::Unit::TestCase
+
+ def setup
+ @connection_impl = flexmock("connection_impl")
+ @other_connection = flexmock("other_connection")
+ @other_connection_impl = flexmock("other_connection_impl")
+ @cqpid_connection = flexmock(Cqpid::Connection)
+
+ @session = flexmock("session")
+ @session_name = "test-session"
+
+ @url = "localhost"
+ @options = {}
+
+ @connection = Qpid::Messaging::Connection.new(@url, @options, @connection_impl)
+ end
+
+ def test_create_with_username_and_password
+ @cqpid_connection.
+ should_receive(:new).
+ once.with("localhost",
+ {"username" => "username",
+ "password" => "password"}).
+ and_return(@connection_impl)
+ @connection_impl.
+ should_receive(:open).
+ once
+
+ result = Qpid::Messaging::Connection.new("localhost",
+ :username => "username",
+ :password => "password")
+ result.open
+
+ assert_same @connection_impl, result.connection_impl
+ end
+
+ def test_create_with_hostname
+ result = Qpid::Messaging::Connection.new("localhost")
+
+ assert_not_nil result
+ end
+
+ def test_open
+ @cqpid_connection.
+ should_receive(:new).
+ once.
+ with(@url, {}).
+ and_return(@connection_impl)
+ @connection_impl.
+ should_receive(:open).
+ once
+
+ @connection.open
+
+ assert_same @connection_impl, @connection.connection_impl
+ end
+
+ def test_check_open_when_open
+ @connection_impl.
+ should_receive(:isOpen).
+ once.
+ and_return(true)
+
+ assert @connection.open?
+ end
+
+ def test_check_open_before_connection
+ result = Qpid::Messaging::Connection.new("hostname")
+
+ assert !result.open?
+ end
+
+ def test_check_open_when_closed
+ @connection_impl.
+ should_receive(:isOpen).
+ once.
+ and_return(false)
+
+ assert !@connection.open?
+ end
+
+ def test_close_an_unopened_session
+ @connection_impl.
+ should_receive(:isOpen).
+ once.
+ and_return(false)
+
+ @connection.close
+ end
+
+ def test_close
+ @connection_impl.
+ should_receive(:isOpen).
+ once.
+ and_return(true).
+ should_receive(:close).
+ once
+
+ @connection.close
+ end
+
+ def test_create_session_without_name
+ @connection_impl.
+ should_receive(:isOpen).
+ once.
+ and_return(true).
+ should_receive(:createSession).
+ once.
+ with("").
+ and_return(@session)
+
+ result = @connection.create_session
+
+ assert_not_nil result
+ assert_same @session, result.session_impl
+ end
+
+ def test_create_session
+ @connection_impl.
+ should_receive(:isOpen).
+ once.
+ and_return(true).
+ should_receive(:createSession).
+ once.
+ with(@session_name).
+ and_return(@session)
+
+ result = @connection.create_session :name => @session_name
+
+ assert_not_nil result
+ assert_same @session, result.session_impl
+ end
+
+ def test_create_session_raises_exception_when_closed
+ @connection_impl.
+ should_receive(:isOpen).
+ once.
+ and_return(false)
+
+ assert_raise(RuntimeError) {@connection.create_session @session_name}
+ end
+
+ def test_create_transactional_session
+ @connection_impl.
+ should_receive(:isOpen).
+ once.
+ and_return(true).
+ should_receive(:createTransactionalSession).
+ once.
+ with("").
+ and_return(@session)
+
+ result = @connection.create_session :transactional => true
+
+ assert_not_nil result
+ assert_same @session, result.session_impl
+ end
+
+ def test_authenticated_username_when_not_connected
+ @connection_impl.
+ should_receive(:isOpen).
+ once.
+ and_return(false)
+
+ result = @connection.authenticated_username
+
+ assert_nil result
+ end
+
+ def test_authenticated_username
+ @connection_impl.
+ should_receive(:isOpen).
+ once.
+ and_return(true).
+ should_receive(:getAuthenticatedUsername).
+ once.
+ and_return("farkle")
+
+ result = @connection.authenticated_username
+
+ assert_equal "farkle", result
+ end
+
+ def test_get_session_with_invalid_name
+ @connection_impl.
+ should_receive(:getSession).
+ once.
+ with(@session_name).
+ and_return(nil)
+
+ result = @connection.session @session_name
+
+ assert_nil result
+ end
+
+ # APIs inherited from Handle
+
+ def test_is_valid
+ @connection_impl.
+ should_receive(:isValid).
+ once.
+ and_return(true)
+
+ assert @connection.valid?
+ end
+
+ def test_is_null
+ @connection_impl.
+ should_receive(:isNull).
+ once.
+ and_return(false)
+
+ assert !@connection.null?
+ end
+
+ def test_swap
+ @other_connection.
+ should_receive(:connection_impl).
+ once.
+ and_return(@other_connection_impl)
+ @connection_impl.
+ should_receive(:swap).
+ once.
+ with(@other_connection_impl)
+
+ @connection.swap @other_connection
+ end
+
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/test/test_encoding.rb b/qpid/cpp/bindings/qpid/ruby/test/test_encoding.rb
new file mode 100644
index 0000000000..060975a1d5
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/test/test_encoding.rb
@@ -0,0 +1,146 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'test/unit'
+require 'flexmock/test_unit'
+
+require 'cqpid'
+require 'qpid/encoding'
+
+class TestEncoding < Test::Unit::TestCase
+
+ def setup
+ @cqpid = flexmock(Cqpid)
+
+ @message = flexmock("message")
+ @message_impl = flexmock("message_impl")
+
+ @encoded = {"foo" => "bar"}
+ end
+
+ def test_encode_map_with_symbols
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(@message_impl)
+ @cqpid.
+ should_receive(:encode).
+ once.
+ with({"foo" => "bar"}, @message_impl).
+ and_return(@encoded)
+
+ result = Qpid::Messaging.encode({:foo => :bar}, @message)
+
+ assert_same @encoded, result
+ end
+
+ def test_encode_list_with_symbols
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(@message_impl)
+ @cqpid.
+ should_receive(:encode).
+ once.
+ with(["foo", "bar"], @message_impl).
+ and_return(@encoded)
+
+ result = Qpid::Messaging.encode([:foo, :bar], @message)
+
+ assert_same @encoded, result
+ end
+
+ def test_encode_with_content_type
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(@message_impl)
+ @cqpid.
+ should_receive(:encode).
+ once.
+ with({"foo" => "bar"}, @message_impl).
+ and_return(@encoded)
+
+ result = Qpid::Messaging.encode({:foo => :bar}, @message)
+
+ assert_same @encoded, result
+ end
+
+ def test_encode
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(@message_impl)
+ @cqpid.
+ should_receive(:encode).
+ once.
+ with({"foo" => "bar"}, @message_impl).
+ and_return(@encoded)
+
+ result = Qpid::Messaging.encode({"foo" => "bar"}, @message)
+
+ assert_same @encoded, result
+ end
+
+ def test_decode_for_map
+ decoded = {"foo" => "bar"}
+ @message.
+ should_receive(:content_type).
+ once.
+ and_return("amqp/map")
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(@message_impl)
+ @cqpid.
+ should_receive(:decodeMap).
+ once.
+ with(@message_impl).
+ and_return(decoded)
+
+ result = Qpid::Messaging.decode(@message)
+
+ assert_same decoded, result
+ end
+
+ def test_decode_for_list
+ decoded = ["foo", "bar"]
+ @message.
+ should_receive(:content_type).
+ once.
+ and_return("amqp/list")
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(@message_impl)
+ @cqpid.
+ should_receive(:decodeList).
+ once.
+ with(@message_impl).
+ and_return(decoded)
+
+ result = Qpid::Messaging.decode(@message)
+
+ assert_same decoded, result
+ end
+
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/test/test_message.rb b/qpid/cpp/bindings/qpid/ruby/test/test_message.rb
new file mode 100644
index 0000000000..3fc705bf7e
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/test/test_message.rb
@@ -0,0 +1,353 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'test/unit'
+require 'flexmock/test_unit'
+
+require 'qpid'
+
+class TestMessage < Test::Unit::TestCase
+
+ def setup
+ @address = flexmock("address")
+ @address_impl = flexmock("address_impl")
+
+ @messaging = flexmock(Qpid::Messaging)
+ @message_impl = flexmock("message")
+ @message = Qpid::Messaging::Message.new({}, @message_impl)
+ end
+
+ def test_message_impl
+ assert_same @message_impl, @message.message_impl
+ end
+
+ def test_set_reply_to
+ @address.
+ should_receive(:address_impl).
+ once.
+ and_return(@address_impl)
+ @message_impl.
+ should_receive(:setReplyTo).
+ once.
+ with(@address_impl)
+
+ @message.reply_to = @address
+ end
+
+ def test_get_reply_to
+ @message_impl.
+ should_receive(:getReplyTo).
+ once.
+ and_return(@address_impl)
+
+ result = @message.reply_to
+
+ assert_not_nil result
+ assert_same @address_impl, result.address_impl
+ end
+
+ def test_set_subject
+ @message_impl.
+ should_receive(:setSubject).
+ once.
+ with("New Subject")
+
+ @message.subject = "New Subject"
+ end
+
+ def test_get_subject
+ @message_impl.
+ should_receive(:getSubject).
+ once.
+ and_return("Old Subject")
+
+ assert_equal "Old Subject", @message.subject
+ end
+
+ def test_set_content_type
+ @message_impl.
+ should_receive(:setContentType).
+ once.
+ and_return("amqp/map")
+
+ @message.content_type = "amqp/map"
+ end
+
+ def test_get_content_type
+ @message_impl.
+ should_receive(:getContentType).
+ once.
+ and_return("amqp/list")
+
+ assert_equal "amqp/list", @message.content_type
+ end
+
+ def test_set_message_id
+ @message_impl.
+ should_receive(:setMessageId).
+ once.
+ with("717")
+
+ @message.message_id = "717"
+ end
+
+ def test_get_message_id
+ @message_impl.
+ should_receive(:getMessageId).
+ once.
+ and_return("1965")
+
+ assert_equal "1965", @message.message_id
+ end
+
+ def test_set_user_id
+ @message_impl.
+ should_receive(:setUserId).
+ once.
+ with("129")
+
+ @message.user_id = "129"
+ end
+
+ def test_get_user_id
+ @message_impl.
+ should_receive(:getUserId).
+ once.
+ and_return("1971")
+
+ assert_equal "1971", @message.user_id
+ end
+
+ def test_set_correlation_id
+ @message_impl.
+ should_receive(:setCorrelationId).
+ once.
+ with("320")
+
+ @message.correlation_id = "320"
+ end
+
+ def test_get_correlation_id
+ @message_impl.
+ should_receive(:getCorrelationId).
+ once.
+ and_return("1996")
+
+ assert_equal "1996", @message.correlation_id
+ end
+
+ def test_set_priority
+ @message_impl.
+ should_receive(:setPriority).
+ once.
+ with(9)
+
+ @message.priority = 9
+ end
+
+ def test_get_priority
+ @message_impl.
+ should_receive(:getPriority).
+ once.
+ and_return(21)
+
+ assert_equal 21, @message.priority
+ end
+
+ def test_set_ttl
+ @message_impl.
+ should_receive(:setTtl).
+ once.
+ with(Qpid::Messaging::Duration::FOREVER)
+
+ @message.ttl = Qpid::Messaging::Duration::FOREVER
+ end
+
+ def test_get_ttl
+ @message_impl.
+ should_receive(:getTtl).
+ once.
+ and_return(Qpid::Messaging::Duration::SECOND)
+
+ assert_equal Qpid::Messaging::Duration::SECOND, @message.ttl
+ end
+
+ def test_set_durable
+ @message_impl.
+ should_receive(:setDurable).
+ once.
+ with(true)
+
+ @message.durable = true
+ end
+
+ def test_set_not_durable
+ @message_impl.
+ should_receive(:setDurable).
+ once.
+ with(false)
+
+ @message.durable = false
+ end
+
+ def test_get_durable
+ @message_impl.
+ should_receive(:getDurable).
+ once.
+ and_return(true)
+
+ assert @message.durable
+ end
+
+ def test_set_redelivered
+ @message_impl.
+ should_receive(:setRedelivered).
+ once.
+ with(true)
+
+ @message.redelivered = true
+ end
+
+ def test_set_not_redelivered
+ @message_impl.
+ should_receive(:setRedelivered).
+ once.
+ with(false)
+
+ @message.redelivered = false
+ end
+
+ def test_get_redelivered
+ @message_impl.
+ should_receive(:getRedelivered).
+ once.
+ and_return(false)
+
+ assert !@message.redelivered
+ end
+
+ def test_get_properties
+ properties = {"foo" => "bar"}
+ @message_impl.
+ should_receive(:getProperties).
+ once.
+ and_return(properties)
+
+ result = @message.properties
+
+ assert_equal properties, result
+ end
+
+ def test_get_property
+ @message_impl.
+ should_receive(:getProperties).
+ once.
+ and_return({"foo" => "bar"})
+
+ result = @message["foo"]
+
+ assert_equal "bar", result
+ end
+
+ def test_set_property
+ @message_impl.
+ should_receive(:setProperty).
+ once.
+ with("foo", "bar")
+
+ @message["foo"] = "bar"
+ end
+
+ def test_set_content
+ @message_impl.
+ should_receive(:setContent).
+ once.
+ with("foo")
+
+ @message.content = "foo"
+ assert_equal "foo", @message.content
+ end
+
+ def test_set_content_with_array
+ content = ["one", "two", "three"]
+
+ @messaging.
+ should_receive(:encode).
+ once.
+ with(content, @message, "amqp/list")
+
+ @message.content = content
+ assert_same content, @message.content
+ end
+
+ def test_set_content_with_map
+ content = {:foo => "bar", :dog => "cat"}
+
+ @messaging.
+ should_receive(:encode).
+ once.
+ with(content, @message, "amqp/map")
+
+ @message.content = content
+ assert_same content, @message.content
+ end
+
+ def test_get_content
+ @message_impl.
+ should_receive(:getContent).
+ and_return("foo")
+ @message_impl.
+ should_receive(:getContentType).
+ and_return(String)
+
+ assert_equal "foo", @message.content
+ end
+
+ def test_get_content_with_array
+ decoded = ["foo", "bar"]
+
+ @message_impl.
+ should_receive(:getContent).
+ and_return("[foo,bar]")
+ @message_impl.
+ should_receive(:getContentType).
+ and_return("amqp/list")
+ @messaging.
+ should_receive(:decode).
+ once.
+ with(@message, "amqp/list").
+ and_return(decoded)
+
+ result = @message.content
+ assert_same decoded, result
+ end
+
+ def test_get_content_size
+ @message_impl.
+ should_receive(:getContentSize).
+ once.
+ and_return(68)
+
+ assert_equal 68, @message.content_size
+ end
+
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/test/test_receiver.rb b/qpid/cpp/bindings/qpid/ruby/test/test_receiver.rb
new file mode 100644
index 0000000000..61a4db17f2
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/test/test_receiver.rb
@@ -0,0 +1,238 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'test/unit'
+require 'flexmock/test_unit'
+
+require 'qpid/receiver'
+
+class TestReceiver < Test::Unit::TestCase
+
+ def setup
+ @session_impl = flexmock("session")
+
+ @Message_class = flexmock(Qpid::Messaging::Message)
+ @Messaging_module = flexmock(Qpid::Messaging)
+ @message_impl = flexmock("message_impl")
+ @message = flexmock("message")
+
+ @receiver_impl = flexmock("receiver")
+ @other_receiver = flexmock("other_receiver")
+ @other_receiver_impl = flexmock("other_receiver_impl")
+ @receiver = Qpid::Messaging::Receiver.new @receiver_impl
+ end
+
+ def test_receiver_impl
+ assert_same @receiver_impl, @receiver.receiver_impl
+ end
+
+ def test_get
+ @receiver_impl.
+ should_receive(:get).
+ once.
+ with_any_args.
+ and_return(@message_impl)
+
+ result = @receiver.get
+
+ assert_not_nil result
+ assert_same @message_impl, result.message_impl
+ end
+
+ def test_get_with_duration
+ @receiver_impl.
+ should_receive(:get).
+ once.
+ with_any_args.
+ and_return(@message_impl)
+
+ result = @receiver.get Qpid::Messaging::Duration::MINUTE
+
+ assert_not_nil result
+ assert_same @message_impl, result.message_impl
+ end
+
+ def test_get_with_no_message_received
+ @receiver_impl.
+ should_receive(:get).
+ once.
+ with_any_args.
+ and_return(nil)
+
+ result = @receiver.get Qpid::Messaging::Duration::SECOND
+
+ assert_nil result
+ end
+
+ def test_fetch
+ @receiver_impl.
+ should_receive(:fetch).
+ once.
+ with_any_args.
+ and_return(@message_impl)
+
+ result = @receiver.fetch
+
+ assert_not_nil result
+ assert_same @message_impl, result.message_impl
+ end
+
+ def test_fetch_with_duration
+ @receiver_impl.
+ should_receive(:fetch).
+ once.
+ with_any_args.
+ and_return(@message_impl)
+
+ result = @receiver.fetch Qpid::Messaging::Duration::MINUTE
+
+ assert_not_nil result
+ assert_same @message_impl, result.message_impl
+ end
+
+ def test_fetch_with_no_message_received
+ @receiver_impl.
+ should_receive(:fetch).
+ once.
+ with_any_args.
+ and_return(nil)
+
+ result = @receiver.fetch Qpid::Messaging::Duration::SECOND
+
+ assert_nil result
+ end
+
+ def test_set_capacity
+ @receiver_impl.
+ should_receive(:setCapacity).
+ once.
+ with(15)
+
+ @receiver.capacity = 15
+ end
+
+ def test_get_capacity
+ @receiver_impl.
+ should_receive(:getCapacity).
+ once.
+ and_return(17)
+
+ assert_equal 17, @receiver.capacity
+ end
+
+ def test_get_available
+ @receiver_impl.
+ should_receive(:getAvailable).
+ once.
+ and_return(2)
+
+ assert_equal 2, @receiver.available
+ end
+
+ def test_get_unsettled
+ @receiver_impl.
+ should_receive(:getUnsettled).
+ once.
+ and_return(12)
+
+ assert_equal 12, @receiver.unsettled
+ end
+
+ def test_close
+ @receiver_impl.
+ should_receive(:close).
+ once
+
+ @receiver.close
+ end
+
+ def test_closed_when_open
+ @receiver_impl.
+ should_receive(:isClosed).
+ once.
+ and_return(false)
+
+ assert !@receiver.closed?
+ end
+
+ def test_closed
+ @receiver_impl.
+ should_receive(:isClosed).
+ once.
+ and_return(true)
+
+ assert @receiver.closed?
+ end
+
+ def test_get_name
+ @receiver_impl.
+ should_receive(:getName).
+ once.
+ and_return("my-queue")
+
+ assert_equal "my-queue", @receiver.name
+ end
+
+ def test_get_session
+ @receiver_impl.
+ should_receive(:getSession).
+ once.
+ and_return(@session_impl)
+
+ result = @receiver.session
+
+ assert_not_nil result
+ assert_same @session_impl, result.session_impl
+ end
+
+ def test_is_valid
+ @receiver_impl.
+ should_receive(:isValid).
+ once.
+ and_return(false)
+
+ assert !@receiver.valid?
+ end
+
+ def test_is_null
+ @receiver_impl.
+ should_receive(:isNull).
+ once.
+ and_return(true)
+
+ assert @receiver.null?
+ end
+
+ def test_swap
+ @other_receiver.
+ should_receive(:receiver_impl).
+ once.
+ and_return(@other_receiver_impl)
+ @receiver_impl.
+ should_receive(:swap).
+ once.
+ with(@other_receiver_impl)
+
+ @receiver.swap @other_receiver
+ end
+
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/test/test_sender.rb b/qpid/cpp/bindings/qpid/ruby/test/test_sender.rb
new file mode 100644
index 0000000000..64348b9f72
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/test/test_sender.rb
@@ -0,0 +1,183 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'test/unit'
+require 'flexmock/test_unit'
+
+require 'qpid/sender'
+
+class TestSender < Test::Unit::TestCase
+
+ def setup
+ @messaging = flexmock(Qpid::Messaging)
+ @message = flexmock("message")
+
+ @session_impl = flexmock("session_impl")
+
+ @sender_impl = flexmock("sender_impl")
+ @other_sender_impl = flexmock("other_sender_impl")
+ @sender = Qpid::Messaging::Sender.new @sender_impl
+ @other_sender = flexmock("other_sender")
+ end
+
+ def test_send
+ message_impl = "message_impl"
+ content = {:foo => :bar}
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(message_impl)
+ @sender_impl.
+ should_receive(:send).
+ once.
+ with(message_impl, false)
+
+ @sender.send @message
+ end
+
+ def test_send_and_dont_block
+ message_impl = "message_impl"
+ content = {:foo => :bar}
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(message_impl)
+ @sender_impl.
+ should_receive(:send).
+ once.
+ with(message_impl, false)
+
+ @sender.send @message, :block => false
+ end
+
+ def test_send_and_block
+ message_impl = "message_impl"
+ content = {:foo => :bar}
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(message_impl)
+ @sender_impl.
+ should_receive(:send).
+ once.
+ with(message_impl, true)
+
+ @sender.send @message, :block => true
+ end
+
+ def test_close
+ @sender_impl.
+ should_receive(:close).
+ once
+
+ @sender.close
+ end
+
+ def test_set_capacity
+ @sender_impl.
+ should_receive(:setCapacity).
+ once.
+ with(17)
+
+ @sender.capacity = 17
+ end
+
+ def test_get_capacity
+ @sender_impl.
+ should_receive(:getCapacity).
+ once.
+ and_return(12)
+
+ assert_equal 12, @sender.capacity
+ end
+
+ def test_unsettled
+ @sender_impl.
+ should_receive(:getUnsettled).
+ once.
+ and_return(5)
+
+ assert_equal 5, @sender.unsettled
+ end
+
+ def test_available
+ @sender_impl.
+ should_receive(:getAvailable).
+ once.
+ and_return(15)
+
+ assert_equal 15, @sender.available
+ end
+
+ def test_name
+ @sender_impl.
+ should_receive(:getName).
+ once.
+ and_return("myname")
+
+ assert_equal "myname", @sender.name
+ end
+
+ def test_session
+ @sender_impl.
+ should_receive(:getSession).
+ once.
+ and_return(@session_impl)
+
+ result = @sender.session
+
+ assert_not_nil result
+ assert_same @session_impl, result.session_impl
+ end
+
+ def test_is_valid
+ @sender_impl.
+ should_receive(:isValid).
+ once.
+ and_return(true)
+
+ assert @sender.valid?
+ end
+
+ def test_is_null
+ @sender_impl.
+ should_receive(:isNull).
+ once.
+ and_return(false)
+
+ assert !@sender.null?
+ end
+
+ def test_swap
+ @other_sender.
+ should_receive(:sender_impl).
+ once.
+ and_return(@other_sender_impl)
+ @sender_impl.
+ should_receive(:swap).
+ once.
+ with(@other_sender_impl)
+
+ @sender.swap @other_sender
+ end
+
+end
+
diff --git a/qpid/cpp/bindings/qpid/ruby/test/test_session.rb b/qpid/cpp/bindings/qpid/ruby/test/test_session.rb
new file mode 100644
index 0000000000..20f055967b
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/test/test_session.rb
@@ -0,0 +1,445 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'test/unit'
+require 'flexmock/test_unit'
+
+require 'qpid/errors'
+require 'qpid/duration'
+require 'qpid/session'
+
+class TestSession < Test::Unit::TestCase
+
+ def setup
+ @session_impl = flexmock("session_impl")
+ @other_session = flexmock("other_session")
+ @other_session_impl = flexmock("other_session_impl")
+ @sender = flexmock("sender")
+
+ @Connection_class = flexmock(Qpid::Messaging::Connection)
+ @connection_impl = flexmock("connection_impl")
+ @connection = flexmock("connection")
+
+ @Receiver_class = flexmock(Qpid::Messaging::Receiver)
+ @receiver = flexmock("receiver")
+ @receiver_impl = flexmock("receiver_impl")
+
+ @address = flexmock("address")
+ @address_impl = flexmock("address_impl")
+
+ @Sender_class = flexmock(Qpid::Messaging::Sender)
+ @sender = flexmock("sender")
+ @sender_impl = flexmock("sender_impl")
+
+ @message = flexmock("message")
+ @message_impl = flexmock("message_impl")
+
+ @duration = flexmock("duration")
+ @duration_impl = flexmock("duration_impl")
+
+ @session = Qpid::Messaging::Session.new(@session_impl)
+ end
+
+ def test_create_sender_with_Address
+ @address.
+ should_receive(:class).
+ once.
+ and_return(Qpid::Messaging::Address).
+ should_receive(:address_impl).
+ once.
+ and_return(@address_impl)
+ @session_impl.
+ should_receive(:createSender).
+ once.
+ with(@address_impl).
+ and_return(@sender_impl)
+
+ result = @session.create_sender @address
+
+ assert_not_nil result
+ end
+
+ def test_create_sender
+ @session_impl.
+ should_receive(:createSender).
+ once.
+ with_any_args.
+ and_return(@sender_impl)
+
+ result = @session.create_sender("my-queue")
+
+ assert_not_nil result
+ end
+
+ def test_create_sender_with_address_string
+ @session_impl.
+ should_receive(:createSender).
+ once.
+ with("my-queue;{create:always}").
+ and_return(@sender_impl)
+
+ result = @session.create_sender "my-queue;{create:always}"
+
+ assert_same @sender_impl, result.sender_impl
+ end
+
+ def test_create_receiver
+ @address.
+ should_receive(:class).
+ once.
+ and_return(Qpid::Messaging::Address).
+ should_receive(:address_impl).
+ once.
+ and_return(@address_impl)
+ @session_impl.
+ should_receive(:createReceiver).
+ once.
+ with(@address_impl).
+ and_return(@receiver_impl)
+
+ result = @session.create_receiver(@address)
+
+ assert_equal @receiver_impl, result.receiver_impl
+ end
+
+ def test_create_receiver_with_address_string
+ @session_impl.
+ should_receive(:createReceiver).
+ once.
+ with("my-queue").
+ and_return(@receiver_impl)
+
+ result = @session.create_receiver("my-queue")
+
+ assert_same @receiver_impl, result.receiver_impl
+ end
+
+ def test_close
+ @session_impl.
+ should_receive(:close).
+ once
+
+ @session.close
+ end
+
+ def test_commit
+ @session_impl.
+ should_receive(:commit).
+ once
+
+ @session.commit
+ end
+
+ def test_rollback
+ @session_impl.
+ should_receive(:rollback).
+ once
+
+ @session.rollback
+ end
+
+ def test_acknowledge_with_no_args
+ @session_impl.
+ should_receive(:acknowledge).
+ once.
+ with(false)
+
+ @session.acknowledge
+ end
+
+ def test_acknowledge_and_sync
+ @session_impl.
+ should_receive(:acknowledge).
+ once.
+ with(true)
+
+ @session.acknowledge :sync => true
+ end
+
+ def test_acknowledge_and_dont_sync
+ @session_impl.
+ should_receive(:acknowledge).
+ once.
+ with(false)
+
+ @session.acknowledge :sync => false
+ end
+
+ def test_acknowledge_message_without_sync
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(@message_impl)
+ @session_impl.
+ should_receive(:acknowledge).
+ once.
+ with(@message_impl, false)
+
+ @session.acknowledge :message => @message
+ end
+
+ def test_acknowledge_message_and_sync
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(@message_impl)
+ @session_impl.
+ should_receive(:acknowledge).
+ once.
+ with(@message_impl, true)
+
+ @session.acknowledge :message => @message, :sync => true
+ end
+
+ def test_acknowledge_message_and_dont_sync
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(@message_impl)
+ @session_impl.
+ should_receive(:acknowledge).
+ once.
+ with(@message_impl, false)
+
+ @session.acknowledge :message => @message, :sync => false
+ end
+
+ def test_reject_message
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(@message_impl)
+ @session_impl.
+ should_receive(:reject).
+ once.
+ with(@message_impl)
+
+ @session.reject @message
+ end
+
+ def test_release_message
+ @message.
+ should_receive(:message_impl).
+ once.
+ and_return(@message_impl)
+ @session_impl.
+ should_receive(:release).
+ once.
+ with(@message_impl)
+
+ @session.release @message
+ end
+
+ def test_sync_without_block
+ @session_impl.
+ should_receive(:sync).
+ once
+
+ @session.sync
+ end
+
+ def test_sync_and_block
+ @session_impl.
+ should_receive(:sync).
+ once.
+ with(true)
+
+ @session.sync :block => true
+ end
+
+ def test_sync_and_dont_block
+ @session_impl.
+ should_receive(:sync).
+ once.
+ with(false)
+
+ @session.sync :block => false
+ end
+
+ def test_receivable
+ @session_impl.
+ should_receive(:getReceivable).
+ once.
+ and_return(5)
+
+ assert_equal 5, @session.receivable
+ end
+
+ def test_unsettled_acks
+ @session_impl.
+ should_receive(:getUnsettledAcks).
+ once.
+ and_return(17)
+
+ assert_equal 17, @session.unsettled_acks
+ end
+
+ def test_next_receiver_with_no_duration
+ @session_impl.
+ should_receive(:nextReceiver).
+ once.
+ with(Qpid::Messaging::Duration::FOREVER.duration_impl).
+ and_return(@receiver_impl)
+
+ result = @session.next_receiver
+
+ assert_same @receiver_impl, result.receiver_impl
+ end
+
+ def test_next_receiver_with_duration
+ @duration.
+ should_receive(:duration_impl).
+ once.
+ and_return(@duration_impl)
+ @session_impl.
+ should_receive(:nextReceiver).
+ once.
+ with(@duration_impl).
+ and_return(@receiver_impl)
+
+ result = @session.next_receiver @duration
+
+ assert_same @receiver_impl, result.receiver_impl
+ end
+
+ def test_sender
+ @session_impl.
+ should_receive(:getSender).
+ once.
+ with("farkle").
+ and_return(@sender_impl)
+ @Sender_class.
+ should_receive(:for_impl).
+ once.
+ with(@sender_impl).
+ and_return(@sender)
+
+ result = @session.sender "farkle"
+
+ assert_same @sender, result
+ end
+
+ def test_sender_with_invalid_name
+ @session_impl.
+ should_receive(:getSender).
+ once.
+ with("farkle").
+ and_throw(RuntimeError)
+
+ assert_raise(Qpid::Messaging::KeyError) {@session.sender "farkle"}
+ end
+
+ def test_receiver
+ @session_impl.
+ should_receive(:getReceiver).
+ once.
+ with("farkle").
+ and_return(@receiver_impl)
+ @Receiver_class.
+ should_receive(:for_impl).
+ once.
+ with(@receiver_impl).
+ and_return(@receiver)
+
+ result = @session.receiver "farkle"
+
+ assert_same @receiver, result
+ end
+
+ def test_receiver_with_invalid_name
+ @session_impl.
+ should_receive(:getReceiver).
+ once.
+ with("farkle").
+ and_throw(RuntimeError)
+
+ assert_raise(Qpid::Messaging::KeyError) {@session.receiver "farkle"}
+ end
+
+ def test_connection
+ @session_impl.
+ should_receive(:getConnection).
+ once.
+ and_return(@connection_impl)
+
+ result = @session.connection
+
+ assert_same @connection_impl, result.connection_impl
+ end
+
+ def test_error_with_none
+ @session_impl.
+ should_receive(:hasError).
+ once.
+ and_return(false)
+
+ assert !@session.error?
+ end
+
+ def test_error
+ @session_impl.
+ should_receive(:hasError).
+ once.
+ and_return(true)
+
+ assert @session.error?
+ end
+
+ def test_check_error
+ @session_impl.
+ should_receive(:checkError).
+ once
+
+ @session.check_error
+ end
+
+ def test_is_valid
+ @session_impl.
+ should_receive(:isValid).
+ once.
+ and_return(false)
+
+ assert !@session.valid?
+ end
+
+ def test_is_null
+ @session_impl.
+ should_receive(:isNull).
+ once.
+ and_return(false)
+
+ assert !@session.null?
+ end
+
+ def test_swap
+ @other_session.
+ should_receive(:session_impl).
+ once.
+ and_return(@other_session_impl)
+ @session_impl.
+ should_receive(:swap).
+ once.
+ with(@other_session_impl)
+
+ @session.swap @other_session
+ end
+
+end
diff --git a/qpid/cpp/bindings/qpid/ruby/test/ts_bindings.rb b/qpid/cpp/bindings/qpid/ruby/test/ts_bindings.rb
new file mode 100644
index 0000000000..7aa410c8f8
--- /dev/null
+++ b/qpid/cpp/bindings/qpid/ruby/test/ts_bindings.rb
@@ -0,0 +1,30 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
+
+require 'test/unit'
+require 'test_encoding'
+require 'test_address'
+require 'test_message'
+require 'test_sender'
+require 'test_receiver'
+require 'test_session'
+require 'test_connection'
+
diff --git a/qpid/cpp/bindings/swig_python_typemaps.i b/qpid/cpp/bindings/swig_python_typemaps.i
index b69784a6de..18bfd48f72 100644
--- a/qpid/cpp/bindings/swig_python_typemaps.i
+++ b/qpid/cpp/bindings/swig_python_typemaps.i
@@ -17,6 +17,25 @@
* under the License.
*/
+/* For UUID objects, to convert them to Python uuid.UUID objects,
+ * we'll need a reference to the uuid module.
+ */
+%{
+static PyObject* pUuidModule;
+%}
+
+%init %{
+ pUuidModule = PyImport_ImportModule("uuid");
+
+ /* Although it is not required, we'll publish the uuid module in our
+ * module, as if this module was a python module and we called
+ * "import uuid"
+ */
+ Py_INCREF(pUuidModule);
+ PyModule_AddObject(m, "uuid", pUuidModule);
+%}
+
+
%wrapper %{
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
@@ -28,6 +47,7 @@ typedef int Py_ssize_t;
PyObject* MapToPy(const qpid::types::Variant::Map*);
PyObject* ListToPy(const qpid::types::Variant::List*);
+ PyObject* UuidToPy(const qpid::types::Uuid*);
void PyToMap(PyObject*, qpid::types::Variant::Map*);
void PyToList(PyObject*, qpid::types::Variant::List*);
@@ -104,6 +124,9 @@ typedef int Py_ssize_t;
break;
}
case qpid::types::VAR_UUID : {
+ qpid::types::Uuid uuid = v->asUuid();
+ result = UuidToPy(&uuid);
+ break;
}
}
} catch (qpid::types::Exception& ex) {
@@ -143,6 +166,30 @@ typedef int Py_ssize_t;
return result;
}
+ PyObject* UuidToPy(const qpid::types::Uuid * uuid) {
+ PyObject* pUuidClass = PyObject_GetAttrString(pUuidModule, "UUID");
+ if (!pUuidClass) {
+ // Failed to get UUID class
+ return 0;
+ }
+
+ PyObject* pArgs = PyTuple_New(0);
+ PyObject* pKw = PyDict_New();
+ PyObject* pData = PyString_FromStringAndSize(
+ (const char*)(uuid->data()), 16);
+ PyDict_SetItemString(pKw, "bytes", pData);
+
+ PyObject* result = PyObject_Call(pUuidClass, pArgs, pKw);
+
+ Py_DECREF(pData);
+ Py_DECREF(pKw);
+ Py_DECREF(pArgs);
+ Py_DECREF(pUuidClass);
+
+ return result;
+ }
+
+
void PyToMap(PyObject* obj, qpid::types::Variant::Map* map) {
map->clear();
Py_ssize_t iter(0);
@@ -304,6 +351,15 @@ typedef int Py_ssize_t;
Py_INCREF($result);
}
+/*
+ * UUID type: C++ --> Python
+ */
+%typemap(out) qpid::types::UUID & {
+ $result = UuidToPy($1);
+ if ($result)
+ Py_INCREF($result);
+}
+
/*
* Variant types: Ruby --> C++
diff --git a/qpid/cpp/design_docs/hot-standby-design.txt b/qpid/cpp/design_docs/hot-standby-design.txt
new file mode 100644
index 0000000000..99a5dc0199
--- /dev/null
+++ b/qpid/cpp/design_docs/hot-standby-design.txt
@@ -0,0 +1,239 @@
+-*-org-*-
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+* Another new design for Qpid clustering.
+
+For background see [[./new-cluster-design.txt]] which describes the issues
+with the old design and a new active-active design that could replace it.
+
+This document describes an alternative hot-standby approach.
+
+** Delivery guarantee
+
+We guarantee N-way redundant, at least once delivey. Once a message
+from a client has been acknowledged by the broker, it will be
+delivered even if N-1 brokers subsequently fail. There may be
+duplicates in the event of a failure. We don't make duplicates
+during normal operation (i.e when no brokers have failed)
+
+This is the same guarantee as the old cluster and the alternative
+active-active design.
+
+** Active-active vs. hot standby (aka primary-backup)
+
+An active-active cluster allows clients to connect to any broker in
+the cluster. If a broker fails, clients can fail-over to any other
+live broker.
+
+A hot-standby cluster has only one active broker at a time (the
+"primary") and one or more brokers on standby (the "backups"). Clients
+are only served by the leader, clients that connect to a backup are
+redirected to the leader. The backpus are kept up-to-date in real time
+by the primary, if the primary fails a backup is elected to be the new
+primary.
+
+Aside: A cold-standby cluster is possible using a standalone broker,
+CMAN and shared storage. In this scenario only one broker runs at a
+time writing to a shared store. If it fails, another broker is started
+(by CMAN) and recovers from the store. This bears investigation but
+the store recovery time is probably too long for failover.
+
+** Why hot standby?
+
+Active-active has some advantages:
+- Finding a broker on startup or failover is simple, just pick any live broker.
+- All brokers are always running in active mode, there's no
+- Distributing clients across brokers gives better performance, but see [1].
+- A broker failure affects only clients connected to that broker.
+
+The main problem with active-active is co-ordinating consumers of the
+same queue on multiple brokers such that there are no duplicates in
+normal operation. There are 2 approaches:
+
+Predictive: each broker predicts which messages others will take. This
+the main weakness of the old design so not appealing.
+
+Locking: brokers "lock" a queue in order to take messages. This is
+complex to implement, its not straighforward to determine the most
+performant strategie for passing the lock.
+
+Hot-standby removes this problem. Only the primary can modify queues
+so it just has to tell the backups what it is doing, there's no
+locking.
+
+The primary can enqueue messages and replicate asynchronously -
+exactly like the store does, but it "writes" to the replicas over the
+network rather than writing to disk.
+
+** Failover in a hot-standby cluster.
+
+Hot-standby has some potential performance issues around failover:
+
+- Failover "spike": when the primary fails every client will fail over
+ at the same time, putting strain on the system.
+
+- Until a new primary is elected, cluster cannot serve any clients or
+ redirect clients to the primary.
+
+We want to minimize the number of re-connect attempts that clients
+have to make. The cluster can use a well-known algorithm to choose the
+new primary (e.g. round robin on a known sequence of brokers) so that
+clients can guess the new primary correctly in most cases.
+
+Even if clients do guess correctly it may be that the new primary is
+not yet aware of the death of the old primary, which is may to cause
+multiple failed connect attempts before clients eventually get
+connected. We will need to prototype to see how much this happens in
+reality and how we can best get clients redirected.
+
+** Threading and performance.
+
+The primary-backup cluster operates analogously to the way the disk store does now:
+- use the same MessageStore interface as the store to interact with the broker
+- use the same asynchronous-completion model for replicating messages.
+- use the same recovery interfaces (?) for new backups joining.
+
+Re-using the well-established store design gives credibility to the new cluster design.
+
+The single CPG dispatch thread was a severe performance bottleneck for the old cluster.
+
+The primary has the same threading model as a a standalone broker with
+a store, which we know that this performs well.
+
+If we use CPG for replication of messages, the backups will receive
+messages in the CPG dispatch thread. To get more concurency, the CPG
+thread can dump work onto internal PollableQueues to be processed in
+parallel.
+
+Messages from the same broker queue need to go onto the same
+PollableQueue. There could be a separate PollableQueue for each broker
+queue. If that's too resource intensive we can use a fixed set of
+PollableQueues and assign broker queues to PollableQueues via hashing
+or round robin.
+
+Another possible optimization is to use multiple CPG queues: one per
+queue or a hashed set, to get more concurrency in the CPG layer. The
+old cluster is not able to keep CPG busy.
+
+TODO: Transactions pose a challenge with these concurrent models: how
+to co-ordinate multiple messages being added (commit a publish or roll
+back an accept) to multiple queues so that all replicas end up with
+the same message sequence while respecting atomicity.
+
+** Use of CPG
+
+CPG provides several benefits in the old cluster:
+- tracking membership (essential for determining the primary)
+- handling "spit brain" (integrates with partition support from CMAN)
+- reliable multicast protocol to distribute messages.
+
+I believe we still need CPG for membership and split brain. We could
+experiment with sending the bulk traffic over AMQP conections.
+
+** Flow control
+
+Need to ensure that
+1) In-memory internal queues used by the cluster don't overflow.
+2) The backups don't fall too far behind on processing CPG messages
+
+** Recovery
+When a new backup joins an active cluster it must get a snapshot
+from one of the other backups, or the primary if there are none. In
+store terms this is "recovery" (old cluster called it an "update)
+
+Compared to old cluster we only replidate well defined data set of the store.
+This is the crucial sore spot of old cluster.
+
+We can also replicated it more efficiently by recovering queues in
+reverse (LIFO) order. That means as clients actively consume messages
+from the front of the queue, they are redeucing the work we have to do
+in recovering from the back. (NOTE: this may not be compatible with
+using the same recovery interfaces as the store.)
+
+** Selective replication
+In this model it's easy to support selective replication of individual queues via
+configuration.
+- Explicit exchange/queue declare argument and message boolean: x-qpid-replicate.
+ Treated analogously to persistent/durable properties for the store.
+- if not explicitly marked, provide a choice of default
+ - default is replicate (replicated message on replicated queue)
+ - default is don't replicate
+ - default is replicate persistent/durable messages.
+
+** Inconsistent errors
+
+The new design eliminates most sources of inconsistent errors in the
+old design (connections, sessions, security, management etc.) and
+eliminates the need to stall the whole cluster till an error is
+resolved. We still have to handle inconsistent store errors when store
+and cluster are used together.
+
+We also have to include error handling in the async completion loop to
+guarantee N-way at least once: we should only report success to the
+client when we know the message was replicated and stored on all N-1
+backups.
+
+TODO: We have a lot more options than the old cluster, need to figure
+out the best approach, or possibly allow mutliple approaches. Need to
+go thru the various failure cases. We may be able to do recovery on a
+per-queue basis rather than restarting an entire node.
+
+** New members joining
+
+We should be able to catch up much faster than the the old design. A
+new backup can catch up ("recover") the current cluster state on a
+per-queue basis.
+- queues can be updated in parallel
+- "live" updates avoid the the "endless chase"
+
+During a "live" update several things are happening on a queue:
+- clients are publishing messages to the back of the queue, replicated to the backup
+- clients are consuming messages from the front of the queue, replicated to the backup.
+- the primary is sending pre-existing messages to the new backup.
+
+The primary sends pre-existing messages in LIFO order - starting from
+the back of the queue, at the same time clients are consuming from the front.
+The active consumers actually reduce the amount of work to be done, as there's
+no need to replicate messages that are no longer on the queue.
+
+* Steps to get there
+
+** Baseline replication
+Validate the overall design get initial notion of performance. Just
+message+wiring replication, no update/recovery for new members joining,
+single CPG dispatch thread on backups, no failover, no transactions.
+
+** Failover
+Electing primary, backups redirect to primary. Measure failover time
+for large # clients. Strategies to minimise number of retries after a
+failure.
+
+** Flow Control
+Keep internal queues from over-flowing. Similar to internal flow control in old cluster.
+Needed for realistic performance/stress tests
+
+** Concurrency
+Experiment with multiple threads on backups, multiple CPG groups.
+
+** Recovery/new member joining
+Initial status handshake for new member. Recovering queues from the back.
+
+** Transactions
+TODO: How to implement transactions with concurrency. Worst solution:
+a global --cluster-use-transactions flag that forces single thread
+mode. Need to find a better solution.
diff --git a/qpid/cpp/docs/api/doxygen_mainpage.h b/qpid/cpp/docs/api/doxygen_mainpage.h
index cb36d7edb0..9acae52da4 100644
--- a/qpid/cpp/docs/api/doxygen_mainpage.h
+++ b/qpid/cpp/docs/api/doxygen_mainpage.h
@@ -266,7 +266,46 @@
* else
* session.rollback();
* </pre>
- *
+ *
+ * <h3>Exceptions</h3>
+ *
+ * All exceptions for the messaging API have MessagingException as
+ * their base class.
+
+ * A common class of exception are those related to processing
+ * addresses used to create senders and/or receivers. These all have
+ * AddressError as their base class.
+ *
+ * Where there is a syntax error in the address itself, a
+ * MalformedAddress will be thrown. Where the address is valid, but
+ * there is an error in interpreting (i.e. resolving) it, a
+ * ResolutionError - or a sub-class of it - will be thrown. If the
+ * address has assertions enabled for a given context and the asserted
+ * node properties are not in fact correct then AssertionFailed will
+ * be thrown. If the node is not found, NotFound will be thrown.
+ *
+ * The loss of the underlying connection (e.g. the TCP connection)
+ * results in TransportFailure being thrown. If automatic reconnect is
+ * enabled, this will be caught be the library which will then try to
+ * reconnect. If reconnection - as configured by the connection
+ * options - fails, then TransportFailure will be thrown. This can
+ * occur on any call to the messaging API.
+ *
+ * Sending a message may also result in an exception
+ * (e.g. TargetCapacityExceeded if a queue to which the message is
+ * delivered cannot enqueue it due to lack of capacity). For
+ * asynchronous send the exception may not be thrown on the send
+ * invocation that actually triggers it, but on a subsequent method
+ * call on the API.
+ *
+ * Certain exceptions may render the session invalid; once these
+ * occur, subsequent calls on the session will throw the same class of
+ * exception. This is not an intrinsic property of the class of
+ * exception, but is a result of the current mapping of the API to the
+ * underlying AMQP 0-10 protocol. You can test whether the session is
+ * valid at any time using the hasError() and/or checkError() methods
+ * on Session.
+ *
* <h3>Logging</h3>
*
* The Qpidd broker and C++ clients can both use environment variables to
diff --git a/qpid/cpp/examples/messaging/drain.cpp b/qpid/cpp/examples/messaging/drain.cpp
index 7700244fa8..563e5e5060 100644
--- a/qpid/cpp/examples/messaging/drain.cpp
+++ b/qpid/cpp/examples/messaging/drain.cpp
@@ -45,7 +45,7 @@ struct Options : OptionParser
url("127.0.0.1"),
timeout(0),
forever(false),
- count(1)
+ count(0)
{
add("broker,b", url, "url of broker to connect to");
add("timeout,t", timeout, "timeout in seconds to wait before exiting");
diff --git a/qpid/cpp/include/qmf/AgentSession.h b/qpid/cpp/include/qmf/AgentSession.h
index 1eeb252143..589d364bcc 100644
--- a/qpid/cpp/include/qmf/AgentSession.h
+++ b/qpid/cpp/include/qmf/AgentSession.h
@@ -71,6 +71,11 @@ namespace qmf {
* 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]
+ * max-thread-wait-time:N - Time (in seconds) the session thread will wait for messages from the network between
+ * periodic background processing passes. [default: 5]
+ * Must not be greater than 'interval'. Larger numbers will cause fewer wake-ups but will
+ * increase the time it takes to shut down the process. This setting will not affect the
+ * agent's response time for queries or method invocation.
*/
QMF_EXTERN AgentSession(qpid::messaging::Connection& conn, const std::string& options="");
@@ -183,6 +188,7 @@ namespace qmf {
#ifndef SWIG
private:
friend class qmf::PrivateImplRef<AgentSession>;
+ friend struct AgentSessionImplAccess;
#endif
};
diff --git a/qpid/cpp/include/qmf/ConsoleSession.h b/qpid/cpp/include/qmf/ConsoleSession.h
index 6008036eec..022485cfa7 100644
--- a/qpid/cpp/include/qmf/ConsoleSession.h
+++ b/qpid/cpp/include/qmf/ConsoleSession.h
@@ -61,6 +61,10 @@ namespace qmf {
* 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]
+ * max-thread-wait-time:N - Time (in seconds) the session thread will wait for messages from the network between
+ * periodic background processing passes.
+ * Must not be greater than 60. Larger numbers will cause fewer wake-ups but will
+ * increase the time it takes to shut down the process. [default: 5]
*/
QMF_EXTERN ConsoleSession(qpid::messaging::Connection& conn, const std::string& options="");
@@ -119,6 +123,7 @@ namespace qmf {
#ifndef SWIG
private:
friend class qmf::PrivateImplRef<ConsoleSession>;
+ friend struct ConsoleSessionImplAccess;
#endif
};
diff --git a/qpid/cpp/include/qmf/DataAddr.h b/qpid/cpp/include/qmf/DataAddr.h
index 63d309cc4b..20c469081e 100644
--- a/qpid/cpp/include/qmf/DataAddr.h
+++ b/qpid/cpp/include/qmf/DataAddr.h
@@ -51,6 +51,9 @@ namespace qmf {
QMF_EXTERN uint32_t getAgentEpoch() const;
QMF_EXTERN qpid::types::Variant::Map asMap() const;
+ QMF_EXTERN bool operator==(const DataAddr&) const;
+ QMF_EXTERN bool operator<(const DataAddr&) const;
+
#ifndef SWIG
private:
friend class qmf::PrivateImplRef<DataAddr>;
diff --git a/qpid/cpp/include/qmf/posix/EventNotifier.h b/qpid/cpp/include/qmf/posix/EventNotifier.h
new file mode 100644
index 0000000000..ebc1cb5364
--- /dev/null
+++ b/qpid/cpp/include/qmf/posix/EventNotifier.h
@@ -0,0 +1,63 @@
+#ifndef __QMF_POSIX_EVENT_NOTIFIER_H
+#define __QMF_POSIX_EVENT_NOTIFIER_H
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include <qmf/ImportExport.h>
+#include "qmf/Handle.h"
+#include "qmf/AgentSession.h"
+#include "qmf/ConsoleSession.h"
+
+namespace qmf {
+
+ class PosixEventNotifierImpl;
+ class PosixEventNotifierImplAccess;
+
+namespace posix {
+
+#ifndef SWIG
+ template <class> class PrivateImplRef;
+#endif
+
+ class QMF_CLASS_EXTERN EventNotifier : public qmf::Handle<qmf::PosixEventNotifierImpl> {
+ public:
+ QMF_EXTERN EventNotifier(PosixEventNotifierImpl* impl = 0);
+ QMF_EXTERN EventNotifier(::qmf::AgentSession& agentSession);
+ QMF_EXTERN EventNotifier(::qmf::ConsoleSession& consoleSession);
+ QMF_EXTERN EventNotifier(const EventNotifier& that);
+
+ QMF_EXTERN ~EventNotifier();
+
+ QMF_EXTERN EventNotifier& operator=(const EventNotifier& that);
+
+ QMF_EXTERN int getHandle() const;
+
+#ifndef SWIG
+ private:
+ friend class qmf::PrivateImplRef<EventNotifier>;
+ friend struct qmf::PosixEventNotifierImplAccess;
+#endif
+
+ };
+
+}}
+
+#endif
+
diff --git a/qpid/cpp/include/qpid/Msg.h b/qpid/cpp/include/qpid/Msg.h
index e1837c29e5..5f0b11bc60 100644
--- a/qpid/cpp/include/qpid/Msg.h
+++ b/qpid/cpp/include/qpid/Msg.h
@@ -24,6 +24,7 @@
#include <sstream>
#include <iostream>
+#include "qpid/types/ImportExport.h"
namespace qpid {
diff --git a/qpid/cpp/include/qpid/framing/FieldTable.h b/qpid/cpp/include/qpid/framing/FieldTable.h
index e8ec524863..bdcef6d7fd 100644
--- a/qpid/cpp/include/qpid/framing/FieldTable.h
+++ b/qpid/cpp/include/qpid/framing/FieldTable.h
@@ -65,8 +65,8 @@ class FieldTable
QPID_COMMON_EXTERN void decode(Buffer& buffer);
QPID_COMMON_EXTERN int count() const;
- QPID_COMMON_EXTERN size_t size() const { return values.size(); }
- QPID_COMMON_EXTERN bool empty() { return size() == 0; }
+ QPID_COMMON_INLINE_EXTERN size_t size() const { return values.size(); }
+ QPID_COMMON_INLINE_EXTERN bool empty() { return size() == 0; }
QPID_COMMON_EXTERN void set(const std::string& name, const ValuePtr& value);
QPID_COMMON_EXTERN ValuePtr get(const std::string& name) const;
QPID_COMMON_INLINE_EXTERN bool isSet(const std::string& name) const { return get(name).get() != 0; }
diff --git a/qpid/cpp/include/qpid/framing/List.h b/qpid/cpp/include/qpid/framing/List.h
index 417fd4bffb..681445947c 100644
--- a/qpid/cpp/include/qpid/framing/List.h
+++ b/qpid/cpp/include/qpid/framing/List.h
@@ -40,6 +40,7 @@ class QPID_COMMON_CLASS_EXTERN List
{
public:
typedef boost::shared_ptr<FieldValue> ValuePtr;
+ typedef ValuePtr value_type;
typedef std::list<ValuePtr> Values;
typedef Values::const_iterator const_iterator;
typedef Values::iterator iterator;
diff --git a/qpid/cpp/include/qpid/messaging/Session.h b/qpid/cpp/include/qpid/messaging/Session.h
index 428f8aa491..e8d6efb35d 100644
--- a/qpid/cpp/include/qpid/messaging/Session.h
+++ b/qpid/cpp/include/qpid/messaging/Session.h
@@ -62,6 +62,12 @@ class QPID_MESSAGING_CLASS_EXTERN Session : public qpid::messaging::Handle<Sessi
*/
QPID_MESSAGING_EXTERN void close();
+ /**
+ * Commits the sessions transaction.
+ *
+ * @exception TransactionAborted if the original session is lost
+ * forcing an automatic rollback.
+ */
QPID_MESSAGING_EXTERN void commit();
QPID_MESSAGING_EXTERN void rollback();
@@ -139,25 +145,51 @@ class QPID_MESSAGING_CLASS_EXTERN Session : public qpid::messaging::Handle<Sessi
/**
* Create a new sender through which messages can be sent to the
* specified address.
+ *
+ * @exception ResolutionError if there is an error in resolving
+ * the address
*/
QPID_MESSAGING_EXTERN Sender createSender(const Address& address);
+ /**
+ * Create a new sender through which messages can be sent to the
+ * specified address.
+ *
+ * @exception ResolutionError if there is an error in resolving
+ * the address
+ *
+ * @exception MalformedAddress if the syntax of address is not
+ * valid
+ */
QPID_MESSAGING_EXTERN Sender createSender(const std::string& address);
/**
* Create a new receiver through which messages can be received
* from the specified address.
+ *
+ * @exception ResolutionError if there is an error in resolving
+ * the address
*/
QPID_MESSAGING_EXTERN Receiver createReceiver(const Address& address);
+ /**
+ * Create a new receiver through which messages can be received
+ * from the specified address.
+ *
+ * @exception ResolutionError if there is an error in resolving
+ * the address
+ *
+ * @exception MalformedAddress if the syntax of address is not
+ * valid
+ */
QPID_MESSAGING_EXTERN Receiver createReceiver(const std::string& address);
/**
* Returns the sender with the specified name.
- *@exception KeyError if there is none for that name.
+ * @exception KeyError if there is none for that name.
*/
QPID_MESSAGING_EXTERN Sender getSender(const std::string& name) const;
/**
* Returns the receiver with the specified name.
- *@exception KeyError if there is none for that name.
+ * @exception KeyError if there is none for that name.
*/
QPID_MESSAGING_EXTERN Receiver getReceiver(const std::string& name) const;
/**
@@ -166,7 +198,16 @@ class QPID_MESSAGING_CLASS_EXTERN Session : public qpid::messaging::Handle<Sessi
*/
QPID_MESSAGING_EXTERN Connection getConnection() const;
+ /**
+ * @returns true if the session has been rendered invalid by some
+ * exception, false if it is valid for use.
+ */
QPID_MESSAGING_EXTERN bool hasError();
+ /**
+ * If the session has been rendered invalid by some exception,
+ * this method will result in that exception being thrown on
+ * calling this method.
+ */
QPID_MESSAGING_EXTERN void checkError();
#ifndef SWIG
diff --git a/qpid/cpp/include/qpid/messaging/exceptions.h b/qpid/cpp/include/qpid/messaging/exceptions.h
index 07d1dc414b..31e2488d91 100644
--- a/qpid/cpp/include/qpid/messaging/exceptions.h
+++ b/qpid/cpp/include/qpid/messaging/exceptions.h
@@ -10,9 +10,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -29,23 +29,36 @@
namespace qpid {
namespace messaging {
-/** \ingroup messaging
+/** \ingroup messaging
*/
-struct QPID_MESSAGING_CLASS_EXTERN MessagingException : public qpid::types::Exception
+/**
+ * This is the base class for all messaging related exceptions thrown
+ * by this API.
+ */
+struct QPID_MESSAGING_CLASS_EXTERN MessagingException : public qpid::types::Exception
{
QPID_MESSAGING_EXTERN MessagingException(const std::string& msg);
QPID_MESSAGING_EXTERN virtual ~MessagingException() throw();
-
+
qpid::types::Variant::Map detail;
//TODO: override what() to include detail if present
};
-struct QPID_MESSAGING_CLASS_EXTERN InvalidOptionString : public MessagingException
+/**
+ * Thrown when the syntax of the option string used to configure a
+ * connection in not valid
+ */
+struct QPID_MESSAGING_CLASS_EXTERN InvalidOptionString : public MessagingException
{
QPID_MESSAGING_EXTERN InvalidOptionString(const std::string& msg);
};
+/**
+ * Thrown to indicate a failed lookup of some local object. For
+ * example when attempting to retrieve a session, sender or receiver
+ * by name.
+ */
struct QPID_MESSAGING_CLASS_EXTERN KeyError : public MessagingException
{
QPID_MESSAGING_EXTERN KeyError(const std::string&);
@@ -65,25 +78,33 @@ struct QPID_MESSAGING_CLASS_EXTERN AddressError : public LinkError
* Thrown when a syntactically correct address cannot be resolved or
* used.
*/
-struct QPID_MESSAGING_CLASS_EXTERN ResolutionError : public AddressError
+struct QPID_MESSAGING_CLASS_EXTERN ResolutionError : public AddressError
{
QPID_MESSAGING_EXTERN ResolutionError(const std::string& msg);
};
-struct QPID_MESSAGING_CLASS_EXTERN AssertionFailed : public ResolutionError
+/**
+ * Thrown when creating a sender or receiver for an address for which
+ * some asserted property of the node is not matched.
+ */
+struct QPID_MESSAGING_CLASS_EXTERN AssertionFailed : public ResolutionError
{
QPID_MESSAGING_EXTERN AssertionFailed(const std::string& msg);
};
-struct QPID_MESSAGING_CLASS_EXTERN NotFound : public ResolutionError
+/**
+ * Thrown on attempts to create a sender or receiver to a non-existent
+ * node.
+ */
+struct QPID_MESSAGING_CLASS_EXTERN NotFound : public ResolutionError
{
QPID_MESSAGING_EXTERN NotFound(const std::string& msg);
};
/**
- * Thrown when an address string with inalid sytanx is used.
+ * Thrown when an address string with invalid syntax is used.
*/
-struct QPID_MESSAGING_CLASS_EXTERN MalformedAddress : public AddressError
+struct QPID_MESSAGING_CLASS_EXTERN MalformedAddress : public AddressError
{
QPID_MESSAGING_EXTERN MalformedAddress(const std::string& msg);
};
@@ -98,6 +119,11 @@ struct QPID_MESSAGING_CLASS_EXTERN FetchError : public ReceiverError
QPID_MESSAGING_EXTERN FetchError(const std::string&);
};
+/**
+ * Thrown by Receiver::fetch(), Receiver::get() and
+ * Session::nextReceiver() to indicate that there no message was
+ * available before the timeout specified.
+ */
struct QPID_MESSAGING_CLASS_EXTERN NoMessageAvailable : public FetchError
{
QPID_MESSAGING_EXTERN NoMessageAvailable();
@@ -113,6 +139,11 @@ struct QPID_MESSAGING_CLASS_EXTERN SendError : public SenderError
QPID_MESSAGING_EXTERN SendError(const std::string&);
};
+/**
+ * Thrown to indicate that the sender attempted to send a message that
+ * would result in the target node on the peer exceeding a
+ * preconfigured capacity.
+ */
struct QPID_MESSAGING_CLASS_EXTERN TargetCapacityExceeded : public SendError
{
QPID_MESSAGING_EXTERN TargetCapacityExceeded(const std::string&);
@@ -128,11 +159,19 @@ struct QPID_MESSAGING_CLASS_EXTERN TransactionError : public SessionError
QPID_MESSAGING_EXTERN TransactionError(const std::string&);
};
+/**
+ * Thrown on Session::commit() if reconnection results in the
+ * transaction being automatically aborted.
+ */
struct QPID_MESSAGING_CLASS_EXTERN TransactionAborted : public TransactionError
{
QPID_MESSAGING_EXTERN TransactionAborted(const std::string&);
};
+/**
+ * Thrown to indicate that the application attempted to do something
+ * for which it was not authorised by its peer.
+ */
struct QPID_MESSAGING_CLASS_EXTERN UnauthorizedAccess : public SessionError
{
QPID_MESSAGING_EXTERN UnauthorizedAccess(const std::string&);
@@ -143,6 +182,13 @@ struct QPID_MESSAGING_CLASS_EXTERN ConnectionError : public MessagingException
QPID_MESSAGING_EXTERN ConnectionError(const std::string&);
};
+/**
+ * Thrown to indicate loss of underlying connection. When
+ * auto-reconnect is used this will be caught by the library and used
+ * to trigger reconnection attempts. If reconnection fails (according
+ * to whatever settings have been configured), then an instnace of
+ * this class will be thrown to signal that.
+ */
struct QPID_MESSAGING_CLASS_EXTERN TransportFailure : public MessagingException
{
QPID_MESSAGING_EXTERN TransportFailure(const std::string&);
diff --git a/qpid/cpp/include/qpid/sys/windows/IntegerTypes.h b/qpid/cpp/include/qpid/sys/windows/IntegerTypes.h
index fff320bc96..28b82da1a0 100755
--- a/qpid/cpp/include/qpid/sys/windows/IntegerTypes.h
+++ b/qpid/cpp/include/qpid/sys/windows/IntegerTypes.h
@@ -27,7 +27,7 @@ typedef short int16_t;
typedef unsigned int uint32_t;
typedef int int32_t;
#if defined(_MSC_VER)
-typedef char int8_t;
+typedef signed char int8_t;
typedef unsigned __int64 uint64_t;
typedef __int64 int64_t;
#else
diff --git a/qpid/cpp/managementgen/Makefile.am b/qpid/cpp/managementgen/Makefile.am
index e10dd63c87..4fc5edcad4 100644
--- a/qpid/cpp/managementgen/Makefile.am
+++ b/qpid/cpp/managementgen/Makefile.am
@@ -32,6 +32,7 @@ pkgpyexec_qmfgentmpl_PYTHON = \
qmfgen/templates/Args.h \
qmfgen/templates/Class.cpp \
qmfgen/templates/Class.h \
+ qmfgen/templates/CMakeLists.cmake \
qmfgen/templates/Event.cpp \
qmfgen/templates/Event.h \
qmfgen/templates/Makefile.mk \
diff --git a/qpid/cpp/rubygen/amqpgen.rb b/qpid/cpp/rubygen/amqpgen.rb
index 20aac35194..88720cad5f 100755
--- a/qpid/cpp/rubygen/amqpgen.rb
+++ b/qpid/cpp/rubygen/amqpgen.rb
@@ -191,7 +191,8 @@ class AmqpElement
"command-fragments" => "session.command-fragment",
"in-doubt" => "dtx.xid",
"tx-publish" => "str-8",
- "queues" => "str-8"
+ "queues" => "str-8",
+ "prepared" => "str-8"
}
def array_type(name)
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt
index 11554b1034..d8496c5122 100644
--- a/qpid/cpp/src/CMakeLists.txt
+++ b/qpid/cpp/src/CMakeLists.txt
@@ -580,6 +580,15 @@ include (ssl.cmake)
check_symbol_exists (LOG_AUTHPRIV "sys/syslog.h" HAVE_LOG_AUTHPRIV)
check_symbol_exists (LOG_FTP "sys/syslog.h" HAVE_LOG_FTP)
+# Allow MSVC user to select 'WinXP-SP3/Windows Server 2003' as build target version
+set (win32_winnt_default OFF)
+if (CMAKE_SYSTEM_NAME STREQUAL Windows)
+ if (MSVC)
+ set (win32_winnt_default ON)
+ endif (MSVC)
+endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
+option(SET_WIN32_WINNT "In Windows-MSVC build: define _WIN32_WINNT=0x0502 to select target version: Windows XP with SP3" ${win32_winnt_default})
+
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
if (MSVC)
add_definitions(
@@ -590,9 +599,9 @@ if (CMAKE_SYSTEM_NAME STREQUAL Windows)
/wd4800
/wd4355
)
- if (MSVC80)
- add_definitions(/D "_WIN32_WINNT=0x0501")
- endif (MSVC80)
+ if (SET_WIN32_WINNT)
+ add_definitions(/D "_WIN32_WINNT=0x0502")
+ endif (SET_WIN32_WINNT)
# set the RelWithDebInfo compile/link switches to equal Release
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /O2 /Ob2 /D NDEBUG")
@@ -914,8 +923,6 @@ set (qpidmessaging_SOURCES
qpid/client/amqp0_10/SessionImpl.cpp
qpid/client/amqp0_10/SenderImpl.h
qpid/client/amqp0_10/SenderImpl.cpp
- qpid/client/amqp0_10/SimpleUrlParser.h
- qpid/client/amqp0_10/SimpleUrlParser.cpp
)
add_msvc_version (qpidmessaging library dll)
@@ -937,7 +944,7 @@ if (NOT QPID_GENERATED_HEADERS_IN_SOURCE)
endif (NOT QPID_GENERATED_HEADERS_IN_SOURCE)
-if (_MSC_VER)
+if (MSVC)
# Install the DtcPlugin project and call it qpidxarm.
set(AMQP_WCF_DIR ${qpid-cpp_SOURCE_DIR}/../wcf)
set(qpidxarm_SOURCES ${AMQP_WCF_DIR}/src/Apache/Qpid/DtcPlugin/DtcPlugin.cpp)
@@ -950,7 +957,7 @@ if (_MSC_VER)
COMPONENT ${QPID_COMPONENT_CLIENT})
install_pdb (qpidxarm ${QPID_COMPONENT_CLIENT})
endif (EXISTS ${qpidxarm_SOURCES})
-endif (_MSC_VER)
+endif (MSVC)
set (qpidbroker_SOURCES
${mgen_broker_cpp}
@@ -1093,6 +1100,7 @@ if(NOT WIN32)
../include/qmf/exceptions.h
../include/qmf/Handle.h
../include/qmf/ImportExport.h
+ ../include/qmf/posix/EventNotifier.h
../include/qmf/Query.h
../include/qmf/Schema.h
../include/qmf/SchemaId.h
@@ -1122,6 +1130,10 @@ if(NOT WIN32)
qmf/DataAddrImpl.h
qmf/Data.cpp
qmf/DataImpl.h
+ qmf/EventNotifierImpl.h
+ qmf/EventNotifierImpl.cpp
+ qmf/PosixEventNotifier.cpp
+ qmf/PosixEventNotifierImpl.cpp
qmf/exceptions.cpp
qmf/Expression.cpp
qmf/Expression.h
diff --git a/qpid/cpp/src/Makefile.am b/qpid/cpp/src/Makefile.am
index 9533053473..2f1bd47dd8 100644
--- a/qpid/cpp/src/Makefile.am
+++ b/qpid/cpp/src/Makefile.am
@@ -89,7 +89,7 @@ rgen_cmd=ruby -I $(rgen_dir) $(rgen_dir)/generate . ../include $(specs) all
$(rgen_srcs) $(srcdir)/rubygen.mk: rgen.timestamp
rgen.timestamp: $(rgen_generator) $(specs)
- $(rgen_cmd) $(srcdir)/rubygen.mk; touch $@
+ $(rgen_cmd) $(srcdir)/rubygen.mk && touch $@
$(rgen_generator):
# The CMake version is needed for dist
@@ -793,9 +793,7 @@ libqpidmessaging_la_SOURCES = \
qpid/client/amqp0_10/SessionImpl.h \
qpid/client/amqp0_10/SessionImpl.cpp \
qpid/client/amqp0_10/SenderImpl.h \
- qpid/client/amqp0_10/SenderImpl.cpp \
- qpid/client/amqp0_10/SimpleUrlParser.h \
- qpid/client/amqp0_10/SimpleUrlParser.cpp
+ qpid/client/amqp0_10/SenderImpl.cpp
QPIDMESSAGING_VERSION_INFO = 2:0:0
libqpidmessaging_la_LDFLAGS = -version-info $(QPIDMESSAGING_VERSION_INFO)
diff --git a/qpid/cpp/src/qmf.mk b/qpid/cpp/src/qmf.mk
index f3462f1a93..4da8470f2f 100644
--- a/qpid/cpp/src/qmf.mk
+++ b/qpid/cpp/src/qmf.mk
@@ -43,6 +43,7 @@ QMF2_API = \
../include/qmf/ConsoleSession.h \
../include/qmf/DataAddr.h \
../include/qmf/Data.h \
+ ../include/qmf/posix/EventNotifier.h \
../include/qmf/exceptions.h \
../include/qmf/Handle.h \
../include/qmf/ImportExport.h \
@@ -104,6 +105,9 @@ libqmf2_la_SOURCES = \
qmf/DataAddrImpl.h \
qmf/Data.cpp \
qmf/DataImpl.h \
+ qmf/EventNotifierImpl.cpp \
+ qmf/PosixEventNotifier.cpp \
+ qmf/PosixEventNotifierImpl.cpp \
qmf/exceptions.cpp \
qmf/Expression.cpp \
qmf/Expression.h \
diff --git a/qpid/cpp/src/qmf/Agent.cpp b/qpid/cpp/src/qmf/Agent.cpp
index 915f2a1c88..684f8e4fba 100644
--- a/qpid/cpp/src/qmf/Agent.cpp
+++ b/qpid/cpp/src/qmf/Agent.cpp
@@ -72,7 +72,7 @@ Schema Agent::getSchema(const SchemaId& s, Duration t) { return impl->getSchema(
AgentImpl::AgentImpl(const std::string& n, uint32_t e, ConsoleSessionImpl& s) :
name(n), directSubject(n), epoch(e), session(s), touched(true), untouchedCount(0), capability(0),
- sender(session.directSender), nextCorrelator(1), schemaCache(s.schemaCache)
+ sender(session.directSender), schemaCache(s.schemaCache)
{
}
@@ -102,12 +102,11 @@ const Variant& AgentImpl::getAttribute(const string& k) const
ConsoleEvent AgentImpl::query(const Query& query, Duration timeout)
{
boost::shared_ptr<SyncContext> context(new SyncContext());
- uint32_t correlator;
+ uint32_t correlator(session.correlator());
ConsoleEvent result;
{
qpid::sys::Mutex::ScopedLock l(lock);
- correlator = nextCorrelator++;
contextMap[correlator] = context;
}
try {
@@ -151,12 +150,7 @@ ConsoleEvent AgentImpl::query(const string& text, Duration timeout)
uint32_t AgentImpl::queryAsync(const Query& query)
{
- uint32_t correlator;
-
- {
- qpid::sys::Mutex::ScopedLock l(lock);
- correlator = nextCorrelator++;
- }
+ uint32_t correlator(session.correlator());
sendQuery(query, correlator);
return correlator;
@@ -172,12 +166,11 @@ uint32_t AgentImpl::queryAsync(const string& text)
ConsoleEvent AgentImpl::callMethod(const string& method, const Variant::Map& args, const DataAddr& addr, Duration timeout)
{
boost::shared_ptr<SyncContext> context(new SyncContext());
- uint32_t correlator;
+ uint32_t correlator(session.correlator());
ConsoleEvent result;
{
qpid::sys::Mutex::ScopedLock l(lock);
- correlator = nextCorrelator++;
contextMap[correlator] = context;
}
try {
@@ -213,12 +206,7 @@ ConsoleEvent AgentImpl::callMethod(const string& method, const Variant::Map& arg
uint32_t AgentImpl::callMethodAsync(const string& method, const Variant::Map& args, const DataAddr& addr)
{
- uint32_t correlator;
-
- {
- qpid::sys::Mutex::ScopedLock l(lock);
- correlator = nextCorrelator++;
- }
+ uint32_t correlator(session.correlator());
sendMethod(method, args, addr, correlator);
return correlator;
@@ -596,12 +584,7 @@ void AgentImpl::sendMethod(const string& method, const Variant::Map& args, const
void AgentImpl::sendSchemaRequest(const SchemaId& id)
{
- uint32_t correlator;
-
- {
- qpid::sys::Mutex::ScopedLock l(lock);
- correlator = nextCorrelator++;
- }
+ uint32_t correlator(session.correlator());
if (capability >= AGENT_CAPABILITY_V2_SCHEMA) {
Query query(QUERY_SCHEMA, id);
diff --git a/qpid/cpp/src/qmf/AgentImpl.h b/qpid/cpp/src/qmf/AgentImpl.h
index 7fa4f4373a..09754a3a7e 100644
--- a/qpid/cpp/src/qmf/AgentImpl.h
+++ b/qpid/cpp/src/qmf/AgentImpl.h
@@ -99,7 +99,6 @@ namespace qmf {
uint32_t capability;
qpid::messaging::Sender sender;
qpid::types::Variant::Map attributes;
- uint32_t nextCorrelator;
std::map<uint32_t, boost::shared_ptr<SyncContext> > contextMap;
boost::shared_ptr<SchemaCache> schemaCache;
mutable std::set<std::string> packageSet;
diff --git a/qpid/cpp/src/qmf/AgentSession.cpp b/qpid/cpp/src/qmf/AgentSession.cpp
index 71d369325f..251c25fd44 100644
--- a/qpid/cpp/src/qmf/AgentSession.cpp
+++ b/qpid/cpp/src/qmf/AgentSession.cpp
@@ -19,133 +19,7 @@
*
*/
-#include "qpid/RefCounted.h"
-#include "qmf/PrivateImplRef.h"
-#include "qmf/exceptions.h"
-#include "qmf/AgentSession.h"
-#include "qmf/AgentEventImpl.h"
-#include "qmf/SchemaIdImpl.h"
-#include "qmf/SchemaImpl.h"
-#include "qmf/DataAddrImpl.h"
-#include "qmf/DataImpl.h"
-#include "qmf/QueryImpl.h"
-#include "qmf/agentCapability.h"
-#include "qmf/constants.h"
-#include "qpid/sys/Mutex.h"
-#include "qpid/sys/Condition.h"
-#include "qpid/sys/Thread.h"
-#include "qpid/sys/Runnable.h"
-#include "qpid/log/Statement.h"
-#include "qpid/messaging/Connection.h"
-#include "qpid/messaging/Session.h"
-#include "qpid/messaging/Receiver.h"
-#include "qpid/messaging/Sender.h"
-#include "qpid/messaging/Message.h"
-#include "qpid/messaging/AddressParser.h"
-#include "qpid/management/Buffer.h"
-#include <queue>
-#include <map>
-#include <set>
-#include <iostream>
-#include <memory>
-
-using namespace std;
-using namespace qpid::messaging;
-using namespace qmf;
-using qpid::types::Variant;
-
-namespace qmf {
- class AgentSessionImpl : public virtual qpid::RefCounted, public qpid::sys::Runnable {
- public:
- ~AgentSessionImpl();
-
- //
- // Methods from API handle
- //
- AgentSessionImpl(Connection& c, const string& o);
- void setDomain(const string& d) { checkOpen(); domain = d; }
- void setVendor(const string& v) { checkOpen(); attributes["_vendor"] = v; }
- void setProduct(const string& p) { checkOpen(); attributes["_product"] = p; }
- void setInstance(const string& i) { checkOpen(); attributes["_instance"] = i; }
- void setAttribute(const string& k, const qpid::types::Variant& v) { checkOpen(); attributes[k] = v; }
- const string& getName() const { return agentName; }
- void open();
- void close();
- bool nextEvent(AgentEvent& e, Duration t);
- int pendingEvents() const;
-
- void registerSchema(Schema& s);
- DataAddr addData(Data& d, const string& n, bool persist);
- void delData(const DataAddr&);
-
- void authAccept(AgentEvent& e);
- void authReject(AgentEvent& e, const string& m);
- void raiseException(AgentEvent& e, const string& s);
- void raiseException(AgentEvent& e, const Data& d);
- void response(AgentEvent& e, const Data& d);
- 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;
- typedef map<SchemaId, Schema, SchemaIdCompare> SchemaMap;
-
- mutable qpid::sys::Mutex lock;
- qpid::sys::Condition cond;
- Connection connection;
- Session session;
- Sender directSender;
- Sender topicSender;
- string domain;
- Variant::Map attributes;
- Variant::Map options;
- string agentName;
- bool opened;
- queue<AgentEvent> eventQueue;
- qpid::sys::Thread* thread;
- bool threadCanceled;
- uint32_t bootSequence;
- uint32_t interval;
- uint64_t lastHeartbeat;
- uint64_t lastVisit;
- bool forceHeartbeat;
- bool externalStorage;
- bool autoAllowQueries;
- bool autoAllowMethods;
- uint32_t maxSubscriptions;
- uint32_t minSubInterval;
- uint32_t subLifetime;
- bool publicEvents;
- bool listenOnDirect;
- bool strictSecurity;
- uint64_t schemaUpdateTime;
- string directBase;
- string topicBase;
-
- SchemaMap schemata;
- DataIndex globalIndex;
- map<SchemaId, DataIndex, SchemaIdCompareNoHash> schemaIndex;
-
- void checkOpen();
- void setAgentName();
- void enqueueEvent(const AgentEvent&);
- void handleLocateRequest(const Variant::List& content, const Message& msg);
- void handleMethodRequest(const Variant::Map& content, const Message& msg);
- void handleQueryRequest(const Variant::Map& content, const Message& msg);
- void handleSchemaRequest(AgentEvent&);
- void handleV1SchemaRequest(qpid::management::Buffer&, uint32_t, const Message&);
- void dispatch(Message);
- void sendHeartbeat();
- void send(Message, const Address&);
- void flushResponses(AgentEvent&, bool);
- void periodicProcessing(uint64_t);
- void run();
- };
-}
-
-typedef qmf::PrivateImplRef<AgentSession> PI;
+#include "qmf/AgentSessionImpl.h"
AgentSession::AgentSession(AgentSessionImpl* impl) { PI::ctor(*this, impl); }
AgentSession::AgentSession(const AgentSession& s) : qmf::Handle<AgentSessionImpl>() { PI::copy(*this, s); }
@@ -181,11 +55,11 @@ void AgentSession::raiseEvent(const Data& d, int s) { impl->raiseEvent(d, s); }
//========================================================================================
AgentSessionImpl::AgentSessionImpl(Connection& c, const string& options) :
- connection(c), domain("default"), opened(false), thread(0), threadCanceled(false),
+ connection(c), domain("default"), opened(false), eventNotifier(0), thread(0), threadCanceled(false),
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),
+ listenOnDirect(true), strictSecurity(false), maxThreadWaitTime(5),
schemaUpdateTime(uint64_t(qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now())))
{
//
@@ -246,7 +120,14 @@ AgentSessionImpl::AgentSessionImpl(Connection& c, const string& options) :
iter = optMap.find("strict-security");
if (iter != optMap.end())
strictSecurity = iter->second.asBool();
+
+ iter = optMap.find("max-thread-wait-time");
+ if (iter != optMap.end())
+ maxThreadWaitTime = iter->second.asUint32();
}
+
+ if (maxThreadWaitTime > interval)
+ maxThreadWaitTime = interval;
}
@@ -254,6 +135,11 @@ AgentSessionImpl::~AgentSessionImpl()
{
if (opened)
close();
+
+ if (thread) {
+ thread->join();
+ delete thread;
+ }
}
@@ -262,6 +148,12 @@ void AgentSessionImpl::open()
if (opened)
throw QmfException("The session is already open");
+ // If the thread exists, join and delete it before creating a new one.
+ if (thread) {
+ thread->join();
+ delete thread;
+ }
+
const string addrArgs(";{create:never,node:{type:topic}}");
const string routableAddr("direct-agent.route." + qpid::types::Uuid(true).str());
attributes["_direct_subject"] = routableAddr;
@@ -299,34 +191,47 @@ void AgentSessionImpl::open()
}
-void AgentSessionImpl::close()
+void AgentSessionImpl::closeAsync()
{
if (!opened)
return;
- // Stop and join the receiver thread
+ // Stop the receiver thread. Don't join it until the destructor is called or open() is called.
threadCanceled = true;
- thread->join();
- delete thread;
-
- // Close the AMQP session
- session.close();
opened = false;
}
+void AgentSessionImpl::close()
+{
+ closeAsync();
+
+ if (thread) {
+ thread->join();
+ delete thread;
+ thread = 0;
+ }
+}
+
+
bool AgentSessionImpl::nextEvent(AgentEvent& event, Duration timeout)
{
uint64_t milliseconds = timeout.getMilliseconds();
qpid::sys::Mutex::ScopedLock l(lock);
- if (eventQueue.empty() && milliseconds > 0)
- cond.wait(lock, qpid::sys::AbsTime(qpid::sys::now(),
- qpid::sys::Duration(milliseconds * qpid::sys::TIME_MSEC)));
+ if (eventQueue.empty() && milliseconds > 0) {
+ int64_t nsecs(qpid::sys::TIME_INFINITE);
+ if ((uint64_t)(nsecs / 1000000) > milliseconds)
+ nsecs = (int64_t) milliseconds * 1000000;
+ qpid::sys::Duration then(nsecs);
+ cond.wait(lock, qpid::sys::AbsTime(qpid::sys::now(), then));
+ }
if (!eventQueue.empty()) {
event = eventQueue.front();
eventQueue.pop();
+ if (eventQueue.empty())
+ alertEventNotifierLH(false);
return true;
}
@@ -341,6 +246,19 @@ int AgentSessionImpl::pendingEvents() const
}
+void AgentSessionImpl::setEventNotifier(EventNotifierImpl* notifier)
+{
+ qpid::sys::Mutex::ScopedLock l(lock);
+ eventNotifier = notifier;
+}
+
+EventNotifierImpl* AgentSessionImpl::getEventNotifier() const
+{
+ qpid::sys::Mutex::ScopedLock l(lock);
+ return eventNotifier;
+}
+
+
void AgentSessionImpl::registerSchema(Schema& schema)
{
if (!schema.isFinalized())
@@ -596,8 +514,10 @@ void AgentSessionImpl::enqueueEvent(const AgentEvent& event)
qpid::sys::Mutex::ScopedLock l(lock);
bool notify = eventQueue.empty();
eventQueue.push(event);
- if (notify)
+ if (notify) {
cond.notify();
+ alertEventNotifierLH(true);
+ }
}
@@ -1041,6 +961,13 @@ void AgentSessionImpl::periodicProcessing(uint64_t seconds)
}
+void AgentSessionImpl::alertEventNotifierLH(bool readable)
+{
+ if (eventNotifier)
+ eventNotifier->setReadable(readable);
+}
+
+
void AgentSessionImpl::run()
{
QPID_LOG(debug, "AgentSession thread started for agent " << agentName);
@@ -1050,7 +977,7 @@ void AgentSessionImpl::run()
periodicProcessing((uint64_t) qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now()) / qpid::sys::TIME_SEC);
Receiver rx;
- bool valid = session.nextReceiver(rx, Duration::SECOND);
+ bool valid = session.nextReceiver(rx, Duration::SECOND * maxThreadWaitTime);
if (threadCanceled)
break;
if (valid) {
@@ -1067,6 +994,19 @@ void AgentSessionImpl::run()
enqueueEvent(AgentEvent(new AgentEventImpl(AGENT_THREAD_FAILED)));
}
+ session.close();
QPID_LOG(debug, "AgentSession thread exiting for agent " << agentName);
}
+
+AgentSessionImpl& AgentSessionImplAccess::get(AgentSession& session)
+{
+ return *session.impl;
+}
+
+
+const AgentSessionImpl& AgentSessionImplAccess::get(const AgentSession& session)
+{
+ return *session.impl;
+}
+
diff --git a/qpid/cpp/src/qmf/AgentSessionImpl.h b/qpid/cpp/src/qmf/AgentSessionImpl.h
new file mode 100644
index 0000000000..9039a5985f
--- /dev/null
+++ b/qpid/cpp/src/qmf/AgentSessionImpl.h
@@ -0,0 +1,176 @@
+#ifndef __QMF_AGENT_SESSION_IMPL_H
+#define __QMF_AGENT_SESSION_IMPL_H
+
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+#include "qpid/RefCounted.h"
+#include "qmf/PrivateImplRef.h"
+#include "qmf/exceptions.h"
+#include "qmf/AgentSession.h"
+#include "qmf/AgentEventImpl.h"
+#include "qmf/EventNotifierImpl.h"
+#include "qpid/messaging/Connection.h"
+#include "qpid/sys/Runnable.h"
+#include "qpid/sys/Mutex.h"
+#include "qpid/sys/Condition.h"
+#include "qpid/sys/Thread.h"
+#include "qpid/sys/Runnable.h"
+#include "qpid/log/Statement.h"
+#include "qpid/messaging/Connection.h"
+#include "qpid/messaging/Session.h"
+#include "qpid/messaging/Receiver.h"
+#include "qpid/messaging/Sender.h"
+#include "qpid/messaging/Message.h"
+#include "qpid/messaging/AddressParser.h"
+#include "qpid/management/Buffer.h"
+#include "qpid/RefCounted.h"
+#include "qmf/PrivateImplRef.h"
+#include "qmf/AgentSession.h"
+#include "qmf/exceptions.h"
+#include "qmf/AgentSession.h"
+#include "qmf/SchemaIdImpl.h"
+#include "qmf/SchemaImpl.h"
+#include "qmf/DataAddrImpl.h"
+#include "qmf/DataImpl.h"
+#include "qmf/QueryImpl.h"
+#include "qmf/agentCapability.h"
+#include "qmf/constants.h"
+
+#include <queue>
+#include <map>
+#include <iostream>
+#include <memory>
+
+using namespace std;
+using namespace qpid::messaging;
+using namespace qmf;
+using qpid::types::Variant;
+using namespace boost;
+
+typedef qmf::PrivateImplRef<AgentSession> PI;
+
+namespace qmf {
+ class AgentSessionImpl : public virtual qpid::RefCounted, public qpid::sys::Runnable {
+ public:
+ ~AgentSessionImpl();
+
+ //
+ // Methods from API handle
+ //
+ AgentSessionImpl(Connection& c, const string& o);
+ void setDomain(const string& d) { checkOpen(); domain = d; }
+ void setVendor(const string& v) { checkOpen(); attributes["_vendor"] = v; }
+ void setProduct(const string& p) { checkOpen(); attributes["_product"] = p; }
+ void setInstance(const string& i) { checkOpen(); attributes["_instance"] = i; }
+ void setAttribute(const string& k, const qpid::types::Variant& v) { checkOpen(); attributes[k] = v; }
+ const string& getName() const { return agentName; }
+ void open();
+ void closeAsync();
+ void close();
+ bool nextEvent(AgentEvent& e, Duration t);
+ int pendingEvents() const;
+
+ void setEventNotifier(EventNotifierImpl* eventNotifier);
+ EventNotifierImpl* getEventNotifier() const;
+
+ void registerSchema(Schema& s);
+ DataAddr addData(Data& d, const string& n, bool persist);
+ void delData(const DataAddr&);
+
+ void authAccept(AgentEvent& e);
+ void authReject(AgentEvent& e, const string& m);
+ void raiseException(AgentEvent& e, const string& s);
+ void raiseException(AgentEvent& e, const Data& d);
+ void response(AgentEvent& e, const Data& d);
+ 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;
+ typedef map<SchemaId, Schema, SchemaIdCompare> SchemaMap;
+
+ mutable qpid::sys::Mutex lock;
+ qpid::sys::Condition cond;
+ Connection connection;
+ Session session;
+ Sender directSender;
+ Sender topicSender;
+ string domain;
+ Variant::Map attributes;
+ Variant::Map options;
+ string agentName;
+ bool opened;
+ queue<AgentEvent> eventQueue;
+ EventNotifierImpl* eventNotifier;
+ qpid::sys::Thread* thread;
+ bool threadCanceled;
+ uint32_t bootSequence;
+ uint32_t interval;
+ uint64_t lastHeartbeat;
+ uint64_t lastVisit;
+ bool forceHeartbeat;
+ bool externalStorage;
+ bool autoAllowQueries;
+ bool autoAllowMethods;
+ uint32_t maxSubscriptions;
+ uint32_t minSubInterval;
+ uint32_t subLifetime;
+ bool publicEvents;
+ bool listenOnDirect;
+ bool strictSecurity;
+ uint32_t maxThreadWaitTime;
+ uint64_t schemaUpdateTime;
+ string directBase;
+ string topicBase;
+
+ SchemaMap schemata;
+ DataIndex globalIndex;
+ map<SchemaId, DataIndex, SchemaIdCompareNoHash> schemaIndex;
+
+ void checkOpen();
+ void setAgentName();
+ void enqueueEvent(const AgentEvent&);
+ void alertEventNotifierLH(bool readable);
+ void handleLocateRequest(const Variant::List& content, const Message& msg);
+ void handleMethodRequest(const Variant::Map& content, const Message& msg);
+ void handleQueryRequest(const Variant::Map& content, const Message& msg);
+ void handleSchemaRequest(AgentEvent&);
+ void handleV1SchemaRequest(qpid::management::Buffer&, uint32_t, const Message&);
+ void dispatch(Message);
+ void sendHeartbeat();
+ void send(Message, const Address&);
+ void flushResponses(AgentEvent&, bool);
+ void periodicProcessing(uint64_t);
+ void run();
+ };
+
+ struct AgentSessionImplAccess {
+ static AgentSessionImpl& get(AgentSession& session);
+ static const AgentSessionImpl& get(const AgentSession& session);
+ };
+}
+
+
+#endif
+
diff --git a/qpid/cpp/src/qmf/ConsoleSession.cpp b/qpid/cpp/src/qmf/ConsoleSession.cpp
index 5df0d83f12..2dfc894c58 100644
--- a/qpid/cpp/src/qmf/ConsoleSession.cpp
+++ b/qpid/cpp/src/qmf/ConsoleSession.cpp
@@ -66,9 +66,9 @@ Subscription ConsoleSession::subscribe(const string& q, const string& f, const s
//========================================================================================
ConsoleSessionImpl::ConsoleSessionImpl(Connection& c, const string& options) :
- connection(c), domain("default"), maxAgentAgeMinutes(5), listenOnDirect(true), strictSecurity(false),
- opened(false), thread(0), threadCanceled(false), lastVisit(0), lastAgePass(0),
- connectedBrokerInAgentList(false), schemaCache(new SchemaCache())
+ connection(c), domain("default"), maxAgentAgeMinutes(5), listenOnDirect(true), strictSecurity(false), maxThreadWaitTime(5),
+ opened(false), eventNotifier(0), thread(0), threadCanceled(false), lastVisit(0), lastAgePass(0),
+ connectedBrokerInAgentList(false), schemaCache(new SchemaCache()), nextCorrelator(1)
{
if (!options.empty()) {
qpid::messaging::AddressParser parser(options);
@@ -92,7 +92,14 @@ ConsoleSessionImpl::ConsoleSessionImpl(Connection& c, const string& options) :
iter = optMap.find("strict-security");
if (iter != optMap.end())
strictSecurity = iter->second.asBool();
+
+ iter = optMap.find("max-thread-wait-time");
+ if (iter != optMap.end())
+ maxThreadWaitTime = iter->second.asUint32();
}
+
+ if (maxThreadWaitTime > 60)
+ maxThreadWaitTime = 60;
}
@@ -100,6 +107,11 @@ ConsoleSessionImpl::~ConsoleSessionImpl()
{
if (opened)
close();
+
+ if (thread) {
+ thread->join();
+ delete thread;
+ }
}
@@ -154,6 +166,12 @@ void ConsoleSessionImpl::open()
if (opened)
throw QmfException("The session is already open");
+ // If the thread exists, join and delete it before creating a new one.
+ if (thread) {
+ thread->join();
+ delete thread;
+ }
+
// Establish messaging addresses
directBase = "qmf." + domain + ".direct";
topicBase = "qmf." + domain + ".topic";
@@ -182,45 +200,57 @@ void ConsoleSessionImpl::open()
// Start the receiver thread
threadCanceled = false;
+ opened = true;
thread = new qpid::sys::Thread(*this);
// Send an agent_locate to direct address 'broker' to identify the connected-broker-agent.
sendBrokerLocate();
if (agentQuery)
sendAgentLocate();
-
- opened = true;
}
-void ConsoleSessionImpl::close()
+void ConsoleSessionImpl::closeAsync()
{
if (!opened)
throw QmfException("The session is already closed");
- // Stop and join the receiver thread
+ // Stop the receiver thread. Don't join it until the destructor is called or open() is called.
threadCanceled = true;
- thread->join();
- delete thread;
-
- // Close the AMQP session
- session.close();
opened = false;
}
+void ConsoleSessionImpl::close()
+{
+ closeAsync();
+
+ if (thread) {
+ thread->join();
+ delete thread;
+ thread = 0;
+ }
+}
+
+
bool ConsoleSessionImpl::nextEvent(ConsoleEvent& event, Duration timeout)
{
uint64_t milliseconds = timeout.getMilliseconds();
qpid::sys::Mutex::ScopedLock l(lock);
- if (eventQueue.empty() && milliseconds > 0)
- cond.wait(lock, qpid::sys::AbsTime(qpid::sys::now(),
- qpid::sys::Duration(milliseconds * qpid::sys::TIME_MSEC)));
+ if (eventQueue.empty() && milliseconds > 0) {
+ int64_t nsecs(qpid::sys::TIME_INFINITE);
+ if ((uint64_t)(nsecs / 1000000) > milliseconds)
+ nsecs = (int64_t) milliseconds * 1000000;
+ qpid::sys::Duration then(nsecs);
+ cond.wait(lock, qpid::sys::AbsTime(qpid::sys::now(), then));
+ }
if (!eventQueue.empty()) {
event = eventQueue.front();
eventQueue.pop();
+ if (eventQueue.empty())
+ alertEventNotifierLH(false);
return true;
}
@@ -235,6 +265,20 @@ int ConsoleSessionImpl::pendingEvents() const
}
+void ConsoleSessionImpl::setEventNotifier(EventNotifierImpl* notifier)
+{
+ qpid::sys::Mutex::ScopedLock l(lock);
+ eventNotifier = notifier;
+}
+
+
+EventNotifierImpl* ConsoleSessionImpl::getEventNotifier() const
+{
+ qpid::sys::Mutex::ScopedLock l(lock);
+ return eventNotifier;
+}
+
+
uint32_t ConsoleSessionImpl::getAgentCount() const
{
qpid::sys::Mutex::ScopedLock l(lock);
@@ -276,8 +320,10 @@ void ConsoleSessionImpl::enqueueEventLH(const ConsoleEvent& event)
{
bool notify = eventQueue.empty();
eventQueue.push(event);
- if (notify)
+ if (notify) {
cond.notify();
+ alertEventNotifierLH(true);
+ }
}
@@ -586,6 +632,13 @@ void ConsoleSessionImpl::periodicProcessing(uint64_t seconds)
}
+void ConsoleSessionImpl::alertEventNotifierLH(bool readable)
+{
+ if (eventNotifier)
+ eventNotifier->setReadable(readable);
+}
+
+
void ConsoleSessionImpl::run()
{
QPID_LOG(debug, "ConsoleSession thread started");
@@ -596,7 +649,7 @@ void ConsoleSessionImpl::run()
qpid::sys::TIME_SEC);
Receiver rx;
- bool valid = session.nextReceiver(rx, Duration::SECOND);
+ bool valid = session.nextReceiver(rx, Duration::SECOND * maxThreadWaitTime);
if (threadCanceled)
break;
if (valid) {
@@ -613,6 +666,18 @@ void ConsoleSessionImpl::run()
enqueueEvent(ConsoleEvent(new ConsoleEventImpl(CONSOLE_THREAD_FAILED)));
}
+ session.close();
QPID_LOG(debug, "ConsoleSession thread exiting");
}
+
+ConsoleSessionImpl& ConsoleSessionImplAccess::get(ConsoleSession& session)
+{
+ return *session.impl;
+}
+
+
+const ConsoleSessionImpl& ConsoleSessionImplAccess::get(const ConsoleSession& session)
+{
+ return *session.impl;
+}
diff --git a/qpid/cpp/src/qmf/ConsoleSessionImpl.h b/qpid/cpp/src/qmf/ConsoleSessionImpl.h
index 411b3f016a..2f1f631715 100644
--- a/qpid/cpp/src/qmf/ConsoleSessionImpl.h
+++ b/qpid/cpp/src/qmf/ConsoleSessionImpl.h
@@ -27,6 +27,7 @@
#include "qmf/SchemaId.h"
#include "qmf/Schema.h"
#include "qmf/ConsoleEventImpl.h"
+#include "qmf/EventNotifierImpl.h"
#include "qmf/SchemaCache.h"
#include "qmf/Query.h"
#include "qpid/sys/Mutex.h"
@@ -41,9 +42,14 @@
#include "qpid/messaging/Address.h"
#include "qpid/management/Buffer.h"
#include "qpid/types/Variant.h"
+
+#include <boost/shared_ptr.hpp>
#include <map>
#include <queue>
+using namespace boost;
+using namespace std;
+
namespace qmf {
class ConsoleSessionImpl : public virtual qpid::RefCounted, public qpid::sys::Runnable {
public:
@@ -56,9 +62,14 @@ namespace qmf {
void setDomain(const std::string& d) { domain = d; }
void setAgentFilter(const std::string& f);
void open();
+ void closeAsync();
void close();
bool nextEvent(ConsoleEvent& e, qpid::messaging::Duration t);
int pendingEvents() const;
+
+ void setEventNotifier(EventNotifierImpl* notifier);
+ EventNotifierImpl* getEventNotifier() const;
+
uint32_t getAgentCount() const;
Agent getAgent(uint32_t i) const;
Agent getConnectedBrokerAgent() const { return connectedBrokerAgent; }
@@ -76,9 +87,11 @@ namespace qmf {
uint32_t maxAgentAgeMinutes;
bool listenOnDirect;
bool strictSecurity;
+ uint32_t maxThreadWaitTime;
Query agentQuery;
bool opened;
std::queue<ConsoleEvent> eventQueue;
+ EventNotifierImpl* eventNotifier;
qpid::sys::Thread* thread;
bool threadCanceled;
uint64_t lastVisit;
@@ -90,6 +103,8 @@ namespace qmf {
std::string directBase;
std::string topicBase;
boost::shared_ptr<SchemaCache> schemaCache;
+ qpid::sys::Mutex corrlock;
+ uint32_t nextCorrelator;
void enqueueEvent(const ConsoleEvent&);
void enqueueEventLH(const ConsoleEvent&);
@@ -99,10 +114,17 @@ namespace qmf {
void handleAgentUpdate(const std::string&, const qpid::types::Variant::Map&, const qpid::messaging::Message&);
void handleV1SchemaResponse(qpid::management::Buffer&, uint32_t, const qpid::messaging::Message&);
void periodicProcessing(uint64_t);
+ void alertEventNotifierLH(bool readable);
void run();
+ uint32_t correlator() { qpid::sys::Mutex::ScopedLock l(corrlock); return nextCorrelator++; }
friend class AgentImpl;
};
+
+ struct ConsoleSessionImplAccess {
+ static ConsoleSessionImpl& get(ConsoleSession& session);
+ static const ConsoleSessionImpl& get(const ConsoleSession& session);
+ };
}
#endif
diff --git a/qpid/cpp/src/qmf/DataAddr.cpp b/qpid/cpp/src/qmf/DataAddr.cpp
index fb51d5787f..d16e12062e 100644
--- a/qpid/cpp/src/qmf/DataAddr.cpp
+++ b/qpid/cpp/src/qmf/DataAddr.cpp
@@ -36,7 +36,9 @@ DataAddr::~DataAddr() { PI::dtor(*this); }
DataAddr& DataAddr::operator=(const DataAddr& s) { return PI::assign(*this, s); }
bool DataAddr::operator==(const DataAddr& o) { return *impl == *o.impl; }
+bool DataAddr::operator==(const DataAddr& o) const { return *impl == *o.impl; }
bool DataAddr::operator<(const DataAddr& o) { return *impl < *o.impl; }
+bool DataAddr::operator<(const DataAddr& o) const { return *impl < *o.impl; }
DataAddr::DataAddr(const qpid::types::Variant::Map& m) { PI::ctor(*this, new DataAddrImpl(m)); }
DataAddr::DataAddr(const string& n, const string& a, uint32_t e) { PI::ctor(*this, new DataAddrImpl(n, a, e)); }
@@ -45,7 +47,7 @@ const string& DataAddr::getAgentName() const { return impl->getAgentName(); }
uint32_t DataAddr::getAgentEpoch() const { return impl->getAgentEpoch(); }
Variant::Map DataAddr::asMap() const { return impl->asMap(); }
-bool DataAddrImpl::operator==(const DataAddrImpl& other)
+bool DataAddrImpl::operator==(const DataAddrImpl& other) const
{
return
agentName == other.agentName &&
@@ -54,7 +56,7 @@ bool DataAddrImpl::operator==(const DataAddrImpl& other)
}
-bool DataAddrImpl::operator<(const DataAddrImpl& other)
+bool DataAddrImpl::operator<(const DataAddrImpl& other) const
{
if (agentName < other.agentName) return true;
if (agentName > other.agentName) return false;
diff --git a/qpid/cpp/src/qmf/DataAddrImpl.h b/qpid/cpp/src/qmf/DataAddrImpl.h
index 3f9cae9453..11d512f0c4 100644
--- a/qpid/cpp/src/qmf/DataAddrImpl.h
+++ b/qpid/cpp/src/qmf/DataAddrImpl.h
@@ -38,8 +38,8 @@ namespace qmf {
//
// Methods from API handle
//
- bool operator==(const DataAddrImpl&);
- bool operator<(const DataAddrImpl&);
+ bool operator==(const DataAddrImpl&) const;
+ bool operator<(const DataAddrImpl&) const;
DataAddrImpl(const qpid::types::Variant::Map&);
DataAddrImpl(const std::string& _name, const std::string& _agentName, uint32_t _agentEpoch=0) :
agentName(_agentName), name(_name), agentEpoch(_agentEpoch) {}
diff --git a/qpid/cpp/src/qmf/EventNotifierImpl.cpp b/qpid/cpp/src/qmf/EventNotifierImpl.cpp
new file mode 100644
index 0000000000..20114aaa5e
--- /dev/null
+++ b/qpid/cpp/src/qmf/EventNotifierImpl.cpp
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "qmf/EventNotifierImpl.h"
+#include "qmf/AgentSessionImpl.h"
+#include "qmf/ConsoleSessionImpl.h"
+
+EventNotifierImpl::EventNotifierImpl(AgentSession& agentSession)
+ : readable(false), agent(agentSession)
+{
+ AgentSessionImplAccess::get(agent).setEventNotifier(this);
+}
+
+
+EventNotifierImpl::EventNotifierImpl(ConsoleSession& consoleSession)
+ : readable(false), console(consoleSession)
+{
+ ConsoleSessionImplAccess::get(console).setEventNotifier(this);
+}
+
+
+EventNotifierImpl::~EventNotifierImpl()
+{
+ if (agent.isValid())
+ AgentSessionImplAccess::get(agent).setEventNotifier(NULL);
+ if (console.isValid())
+ ConsoleSessionImplAccess::get(console).setEventNotifier(NULL);
+}
+
+void EventNotifierImpl::setReadable(bool readable)
+{
+ update(readable);
+ this->readable = readable;
+}
+
+
+bool EventNotifierImpl::isReadable() const
+{
+ return this->readable;
+}
diff --git a/qpid/dotnet/Qpid.Common/AMQInvalidRoutingKeyException.cs b/qpid/cpp/src/qmf/EventNotifierImpl.h
index a3ce813d1b..d85f9979d2 100644
--- a/qpid/dotnet/Qpid.Common/AMQInvalidRoutingKeyException.cs
+++ b/qpid/cpp/src/qmf/EventNotifierImpl.h
@@ -1,5 +1,7 @@
+#ifndef __QMF_EVENT_NOTIFIER_IMPL_H
+#define __QMF_EVENT_NOTIFIER_IMPL_H
+
/*
- *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -7,40 +9,40 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
*/
-using System;
-using System.Runtime.Serialization;
-
-using Apache.Qpid.Protocol;
+#include "qmf/AgentSession.h"
+#include "qmf/ConsoleSession.h"
-namespace Apache.Qpid
+namespace qmf
{
- /// <summary>
- /// Thrown when an invalid routing key was sent to the broker
- /// </summary>
- [Serializable]
- public class AMQInvalidRoutingKeyException : AMQException
- {
- public AMQInvalidRoutingKeyException(string message)
- : base(AMQConstant.INVALID_ROUTING_KEY.Code, message, null)
- {
- }
-
- protected AMQInvalidRoutingKeyException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
-
- }
+ class EventNotifierImpl {
+ private:
+ bool readable;
+ AgentSession agent;
+ ConsoleSession console;
+
+ public:
+ EventNotifierImpl(AgentSession& agentSession);
+ EventNotifierImpl(ConsoleSession& consoleSession);
+ virtual ~EventNotifierImpl();
+
+ void setReadable(bool readable);
+ bool isReadable() const;
+
+ protected:
+ virtual void update(bool readable) = 0;
+ };
}
+
+#endif
+
diff --git a/qpid/cpp/src/qmf/PosixEventNotifier.cpp b/qpid/cpp/src/qmf/PosixEventNotifier.cpp
new file mode 100644
index 0000000000..a364cc155d
--- /dev/null
+++ b/qpid/cpp/src/qmf/PosixEventNotifier.cpp
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "qmf/posix/EventNotifier.h"
+#include "qmf/PosixEventNotifierImpl.h"
+#include "qmf/PrivateImplRef.h"
+
+using namespace qmf;
+using namespace std;
+
+typedef qmf::PrivateImplRef<posix::EventNotifier> PI;
+
+posix::EventNotifier::EventNotifier(PosixEventNotifierImpl* impl) { PI::ctor(*this, impl); }
+
+posix::EventNotifier::EventNotifier(AgentSession& agentSession)
+{
+ PI::ctor(*this, new PosixEventNotifierImpl(agentSession));
+}
+
+
+posix::EventNotifier::EventNotifier(ConsoleSession& consoleSession)
+{
+ PI::ctor(*this, new PosixEventNotifierImpl(consoleSession));
+}
+
+
+posix::EventNotifier::EventNotifier(const posix::EventNotifier& that)
+ : Handle<PosixEventNotifierImpl>()
+{
+ PI::copy(*this, that);
+}
+
+
+posix::EventNotifier::~EventNotifier()
+{
+ PI::dtor(*this);
+}
+
+posix::EventNotifier& posix::EventNotifier::operator=(const posix::EventNotifier& that)
+{
+ return PI::assign(*this, that);
+}
+
+
+int posix::EventNotifier::getHandle() const
+{
+ return impl->getHandle();
+}
+
diff --git a/qpid/cpp/src/qmf/PosixEventNotifierImpl.cpp b/qpid/cpp/src/qmf/PosixEventNotifierImpl.cpp
new file mode 100644
index 0000000000..011dbcc214
--- /dev/null
+++ b/qpid/cpp/src/qmf/PosixEventNotifierImpl.cpp
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "PosixEventNotifierImpl.h"
+#include "qpid/log/Statement.h"
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+#define BUFFER_SIZE 10
+
+using namespace qmf;
+
+PosixEventNotifierImpl::PosixEventNotifierImpl(AgentSession& agentSession)
+ : EventNotifierImpl(agentSession)
+{
+ openHandle();
+}
+
+
+PosixEventNotifierImpl::PosixEventNotifierImpl(ConsoleSession& consoleSession)
+ : EventNotifierImpl(consoleSession)
+{
+ openHandle();
+}
+
+
+PosixEventNotifierImpl::~PosixEventNotifierImpl()
+{
+ closeHandle();
+}
+
+
+void PosixEventNotifierImpl::update(bool readable)
+{
+ char buffer[BUFFER_SIZE];
+
+ if(readable && !this->isReadable()) {
+ if (::write(myHandle, "1", 1) == -1)
+ QPID_LOG(error, "PosixEventNotifierImpl::update write failed: " << errno);
+ }
+ else if(!readable && this->isReadable()) {
+ if (::read(yourHandle, buffer, BUFFER_SIZE) == -1)
+ QPID_LOG(error, "PosixEventNotifierImpl::update read failed: " << errno);
+ }
+}
+
+
+void PosixEventNotifierImpl::openHandle()
+{
+ int pair[2];
+
+ if(::pipe(pair) == -1)
+ throw QmfException("Unable to open event notifier handle.");
+
+ yourHandle = pair[0];
+ myHandle = pair[1];
+
+ int flags;
+
+ flags = ::fcntl(yourHandle, F_GETFL);
+ if((::fcntl(yourHandle, F_SETFL, flags | O_NONBLOCK)) == -1)
+ throw QmfException("Unable to make remote handle non-blocking.");
+
+ flags = ::fcntl(myHandle, F_GETFL);
+ if((::fcntl(myHandle, F_SETFL, flags | O_NONBLOCK)) == -1)
+ throw QmfException("Unable to make local handle non-blocking.");
+}
+
+
+void PosixEventNotifierImpl::closeHandle()
+{
+ if(myHandle > 0) {
+ ::close(myHandle);
+ myHandle = -1;
+ }
+
+ if(yourHandle > 0) {
+ ::close(yourHandle);
+ yourHandle = -1;
+ }
+}
+
+
+PosixEventNotifierImpl& PosixEventNotifierImplAccess::get(posix::EventNotifier& notifier)
+{
+ return *notifier.impl;
+}
+
+
+const PosixEventNotifierImpl& PosixEventNotifierImplAccess::get(const posix::EventNotifier& notifier)
+{
+ return *notifier.impl;
+}
+
diff --git a/qpid/cpp/src/qmf/PosixEventNotifierImpl.h b/qpid/cpp/src/qmf/PosixEventNotifierImpl.h
new file mode 100644
index 0000000000..c8a7446bd5
--- /dev/null
+++ b/qpid/cpp/src/qmf/PosixEventNotifierImpl.h
@@ -0,0 +1,61 @@
+#ifndef __QMF_POSIX_EVENT_NOTIFIER_IMPL_H
+#define __QMF_POSIX_EVENT_NOTIFIER_IMPL_H
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#include "qmf/posix/EventNotifier.h"
+#include "qmf/EventNotifierImpl.h"
+#include "qpid/RefCounted.h"
+
+namespace qmf
+{
+ class AgentSession;
+ class ConsoleSession;
+
+ class PosixEventNotifierImpl : public EventNotifierImpl, public virtual qpid::RefCounted
+ {
+ public:
+ PosixEventNotifierImpl(AgentSession& agentSession);
+ PosixEventNotifierImpl(ConsoleSession& consoleSession);
+ virtual ~PosixEventNotifierImpl();
+
+ int getHandle() const { return yourHandle; }
+
+ private:
+ int myHandle;
+ int yourHandle;
+
+ void openHandle();
+ void closeHandle();
+
+ protected:
+ void update(bool readable);
+ };
+
+ struct PosixEventNotifierImplAccess
+ {
+ static PosixEventNotifierImpl& get(posix::EventNotifier& notifier);
+ static const PosixEventNotifierImpl& get(const posix::EventNotifier& notifier);
+ };
+
+}
+
+#endif
+
diff --git a/qpid/cpp/src/qpid/Address.cpp b/qpid/cpp/src/qpid/Address.cpp
index e2b2dfbcdf..bed3d592df 100644
--- a/qpid/cpp/src/qpid/Address.cpp
+++ b/qpid/cpp/src/qpid/Address.cpp
@@ -28,7 +28,13 @@ namespace qpid {
const string Address::TCP("tcp");
ostream& operator<<(ostream& os, const Address& a) {
- return os << a.protocol << ":" << a.host << ":" << a.port;
+ // If the host is an IPv6 literal we need to print "[]" around it
+ // (we detect IPv6 literals because they contain ":" which is otherwise illegal)
+ if (a.host.find(':') != string::npos) {
+ return os << a.protocol << ":[" << a.host << "]:" << a.port;
+ } else {
+ return os << a.protocol << ":" << a.host << ":" << a.port;
+ }
}
bool operator==(const Address& x, const Address& y) {
diff --git a/qpid/cpp/src/qpid/Url.cpp b/qpid/cpp/src/qpid/Url.cpp
index ab796f4642..f699b60c17 100644
--- a/qpid/cpp/src/qpid/Url.cpp
+++ b/qpid/cpp/src/qpid/Url.cpp
@@ -156,11 +156,12 @@ class UrlParser {
return false;
}
- // TODO aconway 2008-11-20: this does not fully implement
- // http://www.ietf.org/rfc/rfc3986.txt. Works for DNS names and
- // ipv4 literals but won't handle ipv6.
+ // A liberal interpretation of http://www.ietf.org/rfc/rfc3986.txt.
+ // Works for DNS names and and ipv4 and ipv6 literals
//
bool host(string& h) {
+ if (ip6literal(h)) return true;
+
const char* start=i;
while (unreserved() || pctEncoded())
;
@@ -169,6 +170,22 @@ class UrlParser {
return true;
}
+ // This is a bit too liberal for IPv6 literal addresses, but probably good enough
+ bool ip6literal(string& h) {
+ if (literal("[")) {
+ const char* start = i;
+ while (hexDigit() || literal(":") || literal("."))
+ ;
+ const char* end = i;
+ if ( end-start < 2 ) return false; // Smallest valid address is "::"
+ if (literal("]")) {
+ h.assign(start, end);
+ return true;
+ }
+ }
+ return false;
+ }
+
bool unreserved() { return (::isalnum(*i) || ::strchr("-._~", *i)) && advance(); }
bool pctEncoded() { return literal("%") && hexDigit() && hexDigit(); }
diff --git a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp b/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp
index 633401ef5b..f183ff8e0c 100644
--- a/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp
+++ b/qpid/cpp/src/qpid/agent/ManagementAgentImpl.cpp
@@ -1378,13 +1378,26 @@ bool ManagementAgentImpl::ConnectionThread::isSleeping() const
void ManagementAgentImpl::PublishThread::run()
{
- uint16_t totalSleep;
+ uint16_t totalSleep;
+ uint16_t sleepTime;
while (!shutdown) {
agent.periodicProcessing();
totalSleep = 0;
- while (totalSleep++ < agent.getInterval() && !shutdown) {
- ::sleep(1);
+
+ //
+ // Calculate a sleep time that is no greater than 5 seconds and
+ // no less than 1 second.
+ //
+ sleepTime = agent.getInterval();
+ if (sleepTime > 5)
+ sleepTime = 5;
+ else if (sleepTime == 0)
+ sleepTime = 1;
+
+ while (totalSleep < agent.getInterval() && !shutdown) {
+ ::sleep(sleepTime);
+ totalSleep += sleepTime;
}
}
}
diff --git a/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp b/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp
index 97281a8d8c..578598a146 100644
--- a/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp
+++ b/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.cpp
@@ -188,9 +188,10 @@ void SessionHandler::detach(const std::string& name) {
void SessionHandler::detached(const std::string& name, uint8_t code) {
CHECK_NAME(name, "session.detached");
awaitingDetached = false;
- if (code != session::DETACH_CODE_NORMAL)
+ if (code != session::DETACH_CODE_NORMAL) {
+ sendReady = receiveReady = false;
channelException(convert(code), "session.detached from peer.");
- else {
+ } else {
handleDetach();
}
}
diff --git a/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.h b/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.h
index b5b0fe5ee0..8b072fa05c 100644
--- a/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.h
+++ b/qpid/cpp/src/qpid/amqp_0_10/SessionHandler.h
@@ -66,7 +66,7 @@ class QPID_COMMON_CLASS_EXTERN SessionHandler : public framing::AMQP_AllOperatio
QPID_COMMON_EXTERN void handleException(const qpid::SessionException& e);
/** True if the handler is ready to send and receive */
- bool ready() const;
+ QPID_COMMON_EXTERN bool ready() const;
// Protocol methods
QPID_COMMON_EXTERN void attach(const std::string& name, bool force);
diff --git a/qpid/cpp/src/qpid/broker/Bridge.cpp b/qpid/cpp/src/qpid/broker/Bridge.cpp
index 7fbbf4e2c4..c709606c17 100644
--- a/qpid/cpp/src/qpid/broker/Bridge.cpp
+++ b/qpid/cpp/src/qpid/broker/Bridge.cpp
@@ -164,6 +164,12 @@ void Bridge::destroy()
listener(this);
}
+bool Bridge::isSessionReady() const
+{
+ SessionHandler& sessionHandler = conn->getChannel(id);
+ return sessionHandler.ready();
+}
+
void Bridge::setPersistenceId(uint64_t pId) const
{
persistenceId = pId;
diff --git a/qpid/cpp/src/qpid/broker/Bridge.h b/qpid/cpp/src/qpid/broker/Bridge.h
index a846254c57..8b4559a871 100644
--- a/qpid/cpp/src/qpid/broker/Bridge.h
+++ b/qpid/cpp/src/qpid/broker/Bridge.h
@@ -59,6 +59,8 @@ public:
void destroy();
bool isDurable() { return args.i_durable; }
+ bool isSessionReady() const;
+
management::ManagementObject* GetManagementObject() const;
management::Manageable::status_t ManagementMethod(uint32_t methodId,
management::Args& args,
diff --git a/qpid/cpp/src/qpid/broker/Broker.cpp b/qpid/cpp/src/qpid/broker/Broker.cpp
index 14861ec3df..b02b9fa818 100644
--- a/qpid/cpp/src/qpid/broker/Broker.cpp
+++ b/qpid/cpp/src/qpid/broker/Broker.cpp
@@ -435,8 +435,9 @@ Manageable::status_t Broker::ManagementMethod (uint32_t methodId,
_qmf::ArgsBrokerConnect& hp=
dynamic_cast<_qmf::ArgsBrokerConnect&>(args);
- QPID_LOG (debug, "Broker::connect()");
string transport = hp.i_transport.empty() ? TCP_TRANSPORT : hp.i_transport;
+ QPID_LOG (debug, "Broker::connect() " << hp.i_host << ":" << hp.i_port << "; transport=" << transport <<
+ "; durable=" << (hp.i_durable?"T":"F") << "; authMech=\"" << hp.i_authMechanism << "\"");
if (!getProtocolFactory(transport)) {
QPID_LOG(error, "Transport '" << transport << "' not supported");
return Manageable::STATUS_NOT_IMPLEMENTED;
@@ -455,7 +456,7 @@ Manageable::status_t Broker::ManagementMethod (uint32_t methodId,
QPID_LOG (debug, "Broker::queueMoveMessages()");
if (queueMoveMessages(moveArgs.i_srcQueue, moveArgs.i_destQueue, moveArgs.i_qty, moveArgs.i_filter))
status = Manageable::STATUS_OK;
- else
+ else
return Manageable::STATUS_PARAMETER_INVALID;
break;
}
@@ -804,6 +805,7 @@ bool Broker::deferDeliveryImpl(const std::string& ,
void Broker::setClusterTimer(std::auto_ptr<sys::Timer> t) {
clusterTimer = t;
queueCleaner.setTimer(clusterTimer.get());
+ dtxManager.setTimer(*clusterTimer.get());
}
const std::string Broker::TCP_TRANSPORT("tcp");
@@ -941,6 +943,9 @@ void Broker::deleteExchange(const std::string& name, const std::string& userId,
throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied exchange delete request from " << userId));
}
+ if (name.empty()) {
+ throw framing::InvalidArgumentException(QPID_MSG("Delete not allowed for default exchange"));
+ }
Exchange::shared_ptr exchange(exchanges.get(name));
if (!exchange) throw framing::NotFoundException(QPID_MSG("Delete failed. No such exchange: " << name));
if (exchange->inUseAsAlternate()) throw framing::NotAllowedException(QPID_MSG("Exchange in use as alternate-exchange."));
@@ -968,6 +973,9 @@ void Broker::bind(const std::string& queueName,
if (!acl->authorise(userId,acl::ACT_BIND,acl::OBJ_EXCHANGE,exchangeName,&params))
throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied exchange bind request from " << userId));
}
+ if (exchangeName.empty()) {
+ throw framing::InvalidArgumentException(QPID_MSG("Bind not allowed for default exchange"));
+ }
Queue::shared_ptr queue = queues.find(queueName);
Exchange::shared_ptr exchange = exchanges.get(exchangeName);
@@ -998,13 +1006,15 @@ void Broker::unbind(const std::string& queueName,
if (!acl->authorise(userId,acl::ACT_UNBIND,acl::OBJ_EXCHANGE,exchangeName,&params) )
throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied exchange unbind request from " << userId));
}
-
+ if (exchangeName.empty()) {
+ throw framing::InvalidArgumentException(QPID_MSG("Unbind not allowed for default exchange"));
+ }
Queue::shared_ptr queue = queues.find(queueName);
Exchange::shared_ptr exchange = exchanges.get(exchangeName);
if (!queue) {
- throw framing::NotFoundException(QPID_MSG("Bind failed. No such queue: " << queueName));
+ throw framing::NotFoundException(QPID_MSG("Unbind failed. No such queue: " << queueName));
} else if (!exchange) {
- throw framing::NotFoundException(QPID_MSG("Bind failed. No such exchange: " << exchangeName));
+ throw framing::NotFoundException(QPID_MSG("Unbind failed. No such exchange: " << exchangeName));
} else {
if (exchange->unbind(queue, key, 0)) {
if (exchange->isDurable() && queue->isDurable()) {
diff --git a/qpid/cpp/src/qpid/broker/Connection.cpp b/qpid/cpp/src/qpid/broker/Connection.cpp
index 8362a9782c..0b3059d26c 100644
--- a/qpid/cpp/src/qpid/broker/Connection.cpp
+++ b/qpid/cpp/src/qpid/broker/Connection.cpp
@@ -156,16 +156,7 @@ Connection::~Connection()
void Connection::received(framing::AMQFrame& frame) {
// Received frame on connection so delay timeout
restartTimeout();
-
- if (frame.getChannel() == 0 && frame.getMethod()) {
- adapter.handle(frame);
- } else {
- if (adapter.isOpen())
- getChannel(frame.getChannel()).in(frame);
- else
- close(connection::CLOSE_CODE_FRAMING_ERROR, "Connection not yet open, invalid frame received.");
- }
-
+ adapter.handle(frame);
if (isLink) //i.e. we are acting as the client to another broker
recordFromServer(frame);
else
diff --git a/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp b/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
index 270711705e..015002a70c 100644
--- a/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
+++ b/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
@@ -68,8 +68,15 @@ void ConnectionHandler::handle(framing::AMQFrame& frame)
AMQMethodBody* method=frame.getBody()->getMethod();
Connection::ErrorListener* errorListener = handler->connection.getErrorListener();
try{
- if (!invoke(static_cast<AMQP_AllOperations::ConnectionHandler&>(*handler.get()), *method)) {
+ if (method && invoke(
+ static_cast<AMQP_AllOperations::ConnectionHandler&>(*handler), *method)) {
+ // This is a connection control frame, nothing more to do.
+ } else if (isOpen()) {
handler->connection.getChannel(frame.getChannel()).in(frame);
+ } else {
+ handler->proxy.close(
+ connection::CLOSE_CODE_FRAMING_ERROR,
+ "Connection not yet open, invalid frame received.");
}
}catch(ConnectionException& e){
if (errorListener) errorListener->connectionError(e.what());
@@ -185,7 +192,7 @@ void ConnectionHandler::Handler::secureOk(const string& response)
void ConnectionHandler::Handler::tuneOk(uint16_t /*channelmax*/,
uint16_t framemax, uint16_t heartbeat)
{
- connection.setFrameMax(framemax);
+ if (framemax) connection.setFrameMax(framemax);
connection.setHeartbeatInterval(heartbeat);
}
diff --git a/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp b/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp
index 17ecef60d9..0b8fe95d5e 100644
--- a/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp
+++ b/qpid/cpp/src/qpid/broker/DeliveryRecord.cpp
@@ -75,7 +75,7 @@ void DeliveryRecord::deliver(framing::FrameHandler& h, DeliveryId deliveryId, ui
{
id = deliveryId;
if (msg.payload->getRedelivered()){
- msg.payload->getProperties<framing::DeliveryProperties>()->setRedelivered(true);
+ msg.payload->setRedelivered();
}
msg.payload->adjustTtl();
diff --git a/qpid/cpp/src/qpid/broker/DeliveryRecord.h b/qpid/cpp/src/qpid/broker/DeliveryRecord.h
index 4465825d7f..5a331357be 100644
--- a/qpid/cpp/src/qpid/broker/DeliveryRecord.h
+++ b/qpid/cpp/src/qpid/broker/DeliveryRecord.h
@@ -90,7 +90,7 @@ class DeliveryRecord
bool isAcquired() const { return acquired; }
bool isComplete() const { return completed; }
- bool isRedundant() const { return ended && (!windowing || completed); } // msg no longer needed - can discard
+ bool isRedundant() const { return ended && (!windowing || completed || cancelled); }
bool isCancelled() const { return cancelled; }
bool isAccepted() const { return !acceptExpected; }
bool isEnded() const { return ended; }
diff --git a/qpid/cpp/src/qpid/broker/DirectExchange.cpp b/qpid/cpp/src/qpid/broker/DirectExchange.cpp
index 060f80f60d..5591539853 100644
--- a/qpid/cpp/src/qpid/broker/DirectExchange.cpp
+++ b/qpid/cpp/src/qpid/broker/DirectExchange.cpp
@@ -139,6 +139,9 @@ bool DirectExchange::unbind(Queue::shared_ptr queue, const string& routingKey, c
if (mgmtExchange != 0) {
mgmtExchange->dec_bindingCount();
}
+ if (bk.queues.empty()) {
+ bindings.erase(routingKey);
+ }
} else {
return false;
}
diff --git a/qpid/cpp/src/qpid/broker/DtxAck.cpp b/qpid/cpp/src/qpid/broker/DtxAck.cpp
index bca3f90bbe..c558681d62 100644
--- a/qpid/cpp/src/qpid/broker/DtxAck.cpp
+++ b/qpid/cpp/src/qpid/broker/DtxAck.cpp
@@ -32,6 +32,10 @@ DtxAck::DtxAck(const qpid::framing::SequenceSet& acked, DeliveryRecords& unacked
not1(bind2nd(mem_fun_ref(&DeliveryRecord::coveredBy), &acked)));
}
+DtxAck::DtxAck(DeliveryRecords& unacked) {
+ pending = unacked;
+}
+
bool DtxAck::prepare(TransactionContext* ctxt) throw()
{
try{
diff --git a/qpid/cpp/src/qpid/broker/DtxAck.h b/qpid/cpp/src/qpid/broker/DtxAck.h
index 166147e58d..16c3ff8ba0 100644
--- a/qpid/cpp/src/qpid/broker/DtxAck.h
+++ b/qpid/cpp/src/qpid/broker/DtxAck.h
@@ -1,3 +1,6 @@
+#ifndef QPID_BROKER_DTXACK_H
+#define QPID_BROKER_DTXACK_H
+
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
@@ -18,9 +21,6 @@
* under the License.
*
*/
-#ifndef _DtxAck_
-#define _DtxAck_
-
#include <algorithm>
#include <functional>
#include <list>
@@ -29,20 +29,21 @@
#include "qpid/broker/TxOp.h"
namespace qpid {
- namespace broker {
- class DtxAck : public TxOp{
- DeliveryRecords pending;
+namespace broker {
+class DtxAck : public TxOp{
+ DeliveryRecords pending;
- public:
- DtxAck(const framing::SequenceSet& acked, DeliveryRecords& unacked);
- virtual bool prepare(TransactionContext* ctxt) throw();
- virtual void commit() throw();
- virtual void rollback() throw();
- virtual ~DtxAck(){}
- virtual void accept(TxOpConstVisitor& visitor) const { visitor(*this); }
- };
- }
-}
+ public:
+ DtxAck(const framing::SequenceSet& acked, DeliveryRecords& unacked);
+ DtxAck(DeliveryRecords& unacked);
+ virtual bool prepare(TransactionContext* ctxt) throw();
+ virtual void commit() throw();
+ virtual void rollback() throw();
+ virtual ~DtxAck(){}
+ virtual void accept(TxOpConstVisitor& visitor) const { visitor(*this); }
+ const DeliveryRecords& getPending() const { return pending; }
+};
+}} // qpid::broker
-#endif
+#endif /*!QPID_BROKER_DTXACK_H*/
diff --git a/qpid/cpp/src/qpid/broker/DtxBuffer.cpp b/qpid/cpp/src/qpid/broker/DtxBuffer.cpp
index f1b8169cf7..13177d3b72 100644
--- a/qpid/cpp/src/qpid/broker/DtxBuffer.cpp
+++ b/qpid/cpp/src/qpid/broker/DtxBuffer.cpp
@@ -23,8 +23,11 @@
using namespace qpid::broker;
using qpid::sys::Mutex;
-DtxBuffer::DtxBuffer(const std::string& _xid)
- : xid(_xid), ended(false), suspended(false), failed(false), expired(false) {}
+DtxBuffer::DtxBuffer(
+ const std::string& _xid,
+ bool ended_, bool suspended_, bool failed_, bool expired_)
+ : xid(_xid), ended(ended_), suspended(suspended_), failed(failed_), expired(expired_)
+{}
DtxBuffer::~DtxBuffer() {}
@@ -34,7 +37,7 @@ void DtxBuffer::markEnded()
ended = true;
}
-bool DtxBuffer::isEnded()
+bool DtxBuffer::isEnded() const
{
Mutex::ScopedLock locker(lock);
return ended;
@@ -45,7 +48,7 @@ void DtxBuffer::setSuspended(bool isSuspended)
suspended = isSuspended;
}
-bool DtxBuffer::isSuspended()
+bool DtxBuffer::isSuspended() const
{
return suspended;
}
@@ -58,13 +61,13 @@ void DtxBuffer::fail()
ended = true;
}
-bool DtxBuffer::isRollbackOnly()
+bool DtxBuffer::isRollbackOnly() const
{
Mutex::ScopedLock locker(lock);
return failed;
}
-const std::string& DtxBuffer::getXid()
+std::string DtxBuffer::getXid() const
{
return xid;
}
@@ -76,8 +79,13 @@ void DtxBuffer::timedout()
fail();
}
-bool DtxBuffer::isExpired()
+bool DtxBuffer::isExpired() const
{
Mutex::ScopedLock locker(lock);
return expired;
}
+
+bool DtxBuffer::isFailed() const
+{
+ return failed;
+}
diff --git a/qpid/cpp/src/qpid/broker/DtxBuffer.h b/qpid/cpp/src/qpid/broker/DtxBuffer.h
index 1511cb032f..cabd37647a 100644
--- a/qpid/cpp/src/qpid/broker/DtxBuffer.h
+++ b/qpid/cpp/src/qpid/broker/DtxBuffer.h
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -26,31 +26,34 @@
#include "qpid/sys/Mutex.h"
namespace qpid {
- namespace broker {
- class DtxBuffer : public TxBuffer{
- sys::Mutex lock;
- const std::string xid;
- bool ended;
- bool suspended;
- bool failed;
- bool expired;
+namespace broker {
+class DtxBuffer : public TxBuffer{
+ mutable sys::Mutex lock;
+ const std::string xid;
+ bool ended;
+ bool suspended;
+ bool failed;
+ bool expired;
- public:
- typedef boost::shared_ptr<DtxBuffer> shared_ptr;
+ public:
+ typedef boost::shared_ptr<DtxBuffer> shared_ptr;
- QPID_BROKER_EXTERN DtxBuffer(const std::string& xid = "");
- QPID_BROKER_EXTERN ~DtxBuffer();
- QPID_BROKER_EXTERN void markEnded();
- bool isEnded();
- void setSuspended(bool suspended);
- bool isSuspended();
- void fail();
- bool isRollbackOnly();
- void timedout();
- bool isExpired();
- const std::string& getXid();
- };
- }
+ QPID_BROKER_EXTERN DtxBuffer(
+ const std::string& xid = "",
+ bool ended=false, bool suspended=false, bool failed=false, bool expired=false);
+ QPID_BROKER_EXTERN ~DtxBuffer();
+ QPID_BROKER_EXTERN void markEnded();
+ bool isEnded() const;
+ void setSuspended(bool suspended);
+ bool isSuspended() const;
+ void fail();
+ bool isRollbackOnly() const;
+ void timedout();
+ bool isExpired() const;
+ bool isFailed() const;
+ std::string getXid() const;
+};
+}
}
diff --git a/qpid/cpp/src/qpid/broker/DtxManager.cpp b/qpid/cpp/src/qpid/broker/DtxManager.cpp
index 3caa41c3f4..febd547478 100644
--- a/qpid/cpp/src/qpid/broker/DtxManager.cpp
+++ b/qpid/cpp/src/qpid/broker/DtxManager.cpp
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -34,7 +34,7 @@ using qpid::ptr_map_ptr;
using namespace qpid::broker;
using namespace qpid::framing;
-DtxManager::DtxManager(qpid::sys::Timer& t) : store(0), timer(t) {}
+DtxManager::DtxManager(qpid::sys::Timer& t) : store(0), timer(&t) {}
DtxManager::~DtxManager() {}
@@ -53,8 +53,8 @@ void DtxManager::recover(const std::string& xid, std::auto_ptr<TPCTransactionCon
createWork(xid)->recover(txn, ops);
}
-bool DtxManager::prepare(const std::string& xid)
-{
+bool DtxManager::prepare(const std::string& xid)
+{
QPID_LOG(debug, "preparing: " << xid);
try {
return getWork(xid)->prepare();
@@ -64,8 +64,8 @@ bool DtxManager::prepare(const std::string& xid)
}
}
-bool DtxManager::commit(const std::string& xid, bool onePhase)
-{
+bool DtxManager::commit(const std::string& xid, bool onePhase)
+{
QPID_LOG(debug, "committing: " << xid);
try {
bool result = getWork(xid)->commit(onePhase);
@@ -77,8 +77,8 @@ bool DtxManager::commit(const std::string& xid, bool onePhase)
}
}
-void DtxManager::rollback(const std::string& xid)
-{
+void DtxManager::rollback(const std::string& xid)
+{
QPID_LOG(debug, "rolling back: " << xid);
try {
getWork(xid)->rollback();
@@ -91,7 +91,7 @@ void DtxManager::rollback(const std::string& xid)
DtxWorkRecord* DtxManager::getWork(const std::string& xid)
{
- Mutex::ScopedLock locker(lock);
+ Mutex::ScopedLock locker(lock);
WorkMap::iterator i = work.find(xid);
if (i == work.end()) {
throw NotFoundException(QPID_MSG("Unrecognised xid " << xid));
@@ -99,9 +99,14 @@ DtxWorkRecord* DtxManager::getWork(const std::string& xid)
return ptr_map_ptr(i);
}
+bool DtxManager::exists(const std::string& xid) {
+ Mutex::ScopedLock locker(lock);
+ return work.find(xid) != work.end();
+}
+
void DtxManager::remove(const std::string& xid)
{
- Mutex::ScopedLock locker(lock);
+ Mutex::ScopedLock locker(lock);
WorkMap::iterator i = work.find(xid);
if (i == work.end()) {
throw NotFoundException(QPID_MSG("Unrecognised xid " << xid));
@@ -110,14 +115,15 @@ void DtxManager::remove(const std::string& xid)
}
}
-DtxWorkRecord* DtxManager::createWork(std::string xid)
+DtxWorkRecord* DtxManager::createWork(const std::string& xid)
{
- Mutex::ScopedLock locker(lock);
+ Mutex::ScopedLock locker(lock);
WorkMap::iterator i = work.find(xid);
if (i != work.end()) {
throw NotAllowedException(QPID_MSG("Xid " << xid << " is already known (use 'join' to add work to an existing xid)"));
} else {
- return ptr_map_ptr(work.insert(xid, new DtxWorkRecord(xid, store)).first);
+ std::string ncxid = xid; // Work around const correctness problems in ptr_map.
+ return ptr_map_ptr(work.insert(ncxid, new DtxWorkRecord(ncxid, store)).first);
}
}
@@ -131,7 +137,7 @@ void DtxManager::setTimeout(const std::string& xid, uint32_t secs)
}
timeout = intrusive_ptr<DtxTimeout>(new DtxTimeout(secs, *this, xid));
record->setTimeout(timeout);
- timer.add(timeout);
+ timer->add(timeout);
}
uint32_t DtxManager::getTimeout(const std::string& xid)
@@ -142,7 +148,7 @@ uint32_t DtxManager::getTimeout(const std::string& xid)
void DtxManager::timedout(const std::string& xid)
{
- Mutex::ScopedLock locker(lock);
+ Mutex::ScopedLock locker(lock);
WorkMap::iterator i = work.find(xid);
if (i == work.end()) {
QPID_LOG(warning, "Transaction timeout failed: no record for xid");
@@ -153,7 +159,7 @@ void DtxManager::timedout(const std::string& xid)
}
}
-DtxManager::DtxCleanup::DtxCleanup(uint32_t _timeout, DtxManager& _mgr, const std::string& _xid)
+DtxManager::DtxCleanup::DtxCleanup(uint32_t _timeout, DtxManager& _mgr, const std::string& _xid)
: TimerTask(qpid::sys::Duration(_timeout * qpid::sys::TIME_SEC),"DtxCleanup"), mgr(_mgr), xid(_xid) {}
void DtxManager::DtxCleanup::fire()
diff --git a/qpid/cpp/src/qpid/broker/DtxManager.h b/qpid/cpp/src/qpid/broker/DtxManager.h
index 680b62eeb2..11895695a3 100644
--- a/qpid/cpp/src/qpid/broker/DtxManager.h
+++ b/qpid/cpp/src/qpid/broker/DtxManager.h
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -26,8 +26,8 @@
#include "qpid/broker/DtxWorkRecord.h"
#include "qpid/broker/TransactionalStore.h"
#include "qpid/framing/amqp_types.h"
-#include "qpid/sys/Timer.h"
#include "qpid/sys/Mutex.h"
+#include "qpid/ptr_map.h"
namespace qpid {
namespace broker {
@@ -39,22 +39,21 @@ class DtxManager{
{
DtxManager& mgr;
const std::string& xid;
-
- DtxCleanup(uint32_t timeout, DtxManager& mgr, const std::string& xid);
+
+ DtxCleanup(uint32_t timeout, DtxManager& mgr, const std::string& xid);
void fire();
};
WorkMap work;
TransactionalStore* store;
qpid::sys::Mutex lock;
- qpid::sys::Timer& timer;
+ qpid::sys::Timer* timer;
void remove(const std::string& xid);
- DtxWorkRecord* getWork(const std::string& xid);
- DtxWorkRecord* createWork(std::string xid);
+ DtxWorkRecord* createWork(const std::string& xid);
public:
- DtxManager(qpid::sys::Timer&);
+ DtxManager(sys::Timer&);
~DtxManager();
void start(const std::string& xid, DtxBuffer::shared_ptr work);
void join(const std::string& xid, DtxBuffer::shared_ptr work);
@@ -66,6 +65,15 @@ public:
uint32_t getTimeout(const std::string& xid);
void timedout(const std::string& xid);
void setStore(TransactionalStore* store);
+ void setTimer(sys::Timer& t) { timer = &t; }
+
+ // Used by cluster for replication.
+ template<class F> void each(F f) const {
+ for (WorkMap::const_iterator i = work.begin(); i != work.end(); ++i)
+ f(*ptr_map_ptr(i));
+ }
+ DtxWorkRecord* getWork(const std::string& xid);
+ bool exists(const std::string& xid);
};
}
diff --git a/qpid/cpp/src/qpid/broker/DtxTimeout.cpp b/qpid/cpp/src/qpid/broker/DtxTimeout.cpp
index c4c52ec40a..58700846ef 100644
--- a/qpid/cpp/src/qpid/broker/DtxTimeout.cpp
+++ b/qpid/cpp/src/qpid/broker/DtxTimeout.cpp
@@ -25,7 +25,7 @@
using namespace qpid::broker;
DtxTimeout::DtxTimeout(uint32_t _timeout, DtxManager& _mgr, const std::string& _xid)
- : TimerTask(qpid::sys::Duration(_timeout * qpid::sys::TIME_SEC),"DtxTimeout"), timeout(_timeout), mgr(_mgr), xid(_xid)
+ : TimerTask(qpid::sys::Duration(_timeout * qpid::sys::TIME_SEC),"DtxTimeout-"+_xid), timeout(_timeout), mgr(_mgr), xid(_xid)
{
}
diff --git a/qpid/cpp/src/qpid/broker/DtxTimeout.h b/qpid/cpp/src/qpid/broker/DtxTimeout.h
index 680a210e4f..1fcb4cee2a 100644
--- a/qpid/cpp/src/qpid/broker/DtxTimeout.h
+++ b/qpid/cpp/src/qpid/broker/DtxTimeout.h
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -29,7 +29,9 @@ namespace broker {
class DtxManager;
-struct DtxTimeoutException : public Exception {};
+struct DtxTimeoutException : public Exception {
+ DtxTimeoutException(const std::string& msg=std::string()) : Exception(msg) {}
+};
struct DtxTimeout : public sys::TimerTask
{
@@ -37,7 +39,7 @@ struct DtxTimeout : public sys::TimerTask
DtxManager& mgr;
const std::string xid;
- DtxTimeout(uint32_t timeout, DtxManager& mgr, const std::string& xid);
+ DtxTimeout(uint32_t timeout, DtxManager& mgr, const std::string& xid);
void fire();
};
diff --git a/qpid/cpp/src/qpid/broker/DtxWorkRecord.cpp b/qpid/cpp/src/qpid/broker/DtxWorkRecord.cpp
index 9f33e698db..a413fe418d 100644
--- a/qpid/cpp/src/qpid/broker/DtxWorkRecord.cpp
+++ b/qpid/cpp/src/qpid/broker/DtxWorkRecord.cpp
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -28,19 +28,19 @@ using qpid::sys::Mutex;
using namespace qpid::broker;
using namespace qpid::framing;
-DtxWorkRecord::DtxWorkRecord(const std::string& _xid, TransactionalStore* const _store) :
+DtxWorkRecord::DtxWorkRecord(const std::string& _xid, TransactionalStore* const _store) :
xid(_xid), store(_store), completed(false), rolledback(false), prepared(false), expired(false) {}
-DtxWorkRecord::~DtxWorkRecord()
+DtxWorkRecord::~DtxWorkRecord()
{
- if (timeout.get()) {
+ if (timeout.get()) {
timeout->cancel();
}
}
bool DtxWorkRecord::prepare()
{
- Mutex::ScopedLock locker(lock);
+ Mutex::ScopedLock locker(lock);
if (check()) {
txn = store->begin(xid);
if (prepare(txn.get())) {
@@ -68,7 +68,7 @@ bool DtxWorkRecord::prepare(TransactionContext* _txn)
bool DtxWorkRecord::commit(bool onePhase)
{
- Mutex::ScopedLock locker(lock);
+ Mutex::ScopedLock locker(lock);
if (check()) {
if (prepared) {
//already prepared i.e. 2pc
@@ -78,13 +78,13 @@ bool DtxWorkRecord::commit(bool onePhase)
store->commit(*txn);
txn.reset();
-
+
std::for_each(work.begin(), work.end(), mem_fn(&TxBuffer::commit));
return true;
} else {
//1pc commit optimisation, don't need a 2pc transaction context:
if (!onePhase) {
- throw IllegalStateException(QPID_MSG("Branch with xid " << xid << " has not been prepared, one-phase option required!"));
+ throw IllegalStateException(QPID_MSG("Branch with xid " << xid << " has not been prepared, one-phase option required!"));
}
std::auto_ptr<TransactionContext> localtxn = store->begin();
if (prepare(localtxn.get())) {
@@ -107,16 +107,16 @@ bool DtxWorkRecord::commit(bool onePhase)
void DtxWorkRecord::rollback()
{
- Mutex::ScopedLock locker(lock);
+ Mutex::ScopedLock locker(lock);
check();
abort();
}
void DtxWorkRecord::add(DtxBuffer::shared_ptr ops)
{
- Mutex::ScopedLock locker(lock);
+ Mutex::ScopedLock locker(lock);
if (expired) {
- throw DtxTimeoutException();
+ throw DtxTimeoutException(QPID_MSG("Branch with xid " << xid << " has timed out."));
}
if (completed) {
throw CommandInvalidException(QPID_MSG("Branch with xid " << xid << " has been completed!"));
@@ -163,7 +163,7 @@ void DtxWorkRecord::recover(std::auto_ptr<TPCTransactionContext> _txn, DtxBuffer
void DtxWorkRecord::timedout()
{
- Mutex::ScopedLock locker(lock);
+ Mutex::ScopedLock locker(lock);
expired = true;
rolledback = true;
if (!completed) {
@@ -175,3 +175,17 @@ void DtxWorkRecord::timedout()
}
abort();
}
+
+size_t DtxWorkRecord::indexOf(const DtxBuffer::shared_ptr& buf) {
+ Work::iterator i = std::find(work.begin(), work.end(), buf);
+ if (i == work.end()) throw NotFoundException(
+ QPID_MSG("Can't find DTX buffer for xid: " << buf->getXid()));
+ return i - work.begin();
+}
+
+DtxBuffer::shared_ptr DtxWorkRecord::operator[](size_t i) const {
+ if (i > work.size())
+ throw NotFoundException(
+ QPID_MSG("Can't find DTX buffer " << i << " for xid: " << xid));
+ return work[i];
+}
diff --git a/qpid/cpp/src/qpid/broker/DtxWorkRecord.h b/qpid/cpp/src/qpid/broker/DtxWorkRecord.h
index aec2d2aed4..331e42fefd 100644
--- a/qpid/cpp/src/qpid/broker/DtxWorkRecord.h
+++ b/qpid/cpp/src/qpid/broker/DtxWorkRecord.h
@@ -73,9 +73,19 @@ public:
void timedout();
void setTimeout(boost::intrusive_ptr<DtxTimeout> t) { timeout = t; }
boost::intrusive_ptr<DtxTimeout> getTimeout() { return timeout; }
+ std::string getXid() const { return xid; }
+ bool isCompleted() const { return completed; }
+ bool isRolledback() const { return rolledback; }
+ bool isPrepared() const { return prepared; }
+ bool isExpired() const { return expired; }
+
+ // Used by cluster update;
+ size_t size() const { return work.size(); }
+ DtxBuffer::shared_ptr operator[](size_t i) const;
+ uint32_t getTimeout() const { return timeout? timeout->timeout : 0; }
+ size_t indexOf(const DtxBuffer::shared_ptr&);
};
-}
-}
+}} // qpid::broker
#endif
diff --git a/qpid/cpp/src/qpid/broker/Exchange.cpp b/qpid/cpp/src/qpid/broker/Exchange.cpp
index 622cc81002..d68845062d 100644
--- a/qpid/cpp/src/qpid/broker/Exchange.cpp
+++ b/qpid/cpp/src/qpid/broker/Exchange.cpp
@@ -58,7 +58,7 @@ Exchange::PreRoute::PreRoute(Deliverable& msg, Exchange* _p):parent(_p) {
if (parent->sequence){
parent->sequenceNo++;
- msg.getMessage().getProperties<MessageProperties>()->getApplicationHeaders().setInt64(qpidMsgSequence,parent->sequenceNo);
+ msg.getMessage().insertCustomProperty(qpidMsgSequence,parent->sequenceNo);
}
if (parent->ive) {
parent->lastMsg = &( msg.getMessage());
@@ -390,7 +390,7 @@ bool Exchange::MatchQueue::operator()(Exchange::Binding::shared_ptr b)
}
void Exchange::setProperties(const boost::intrusive_ptr<Message>& msg) {
- msg->getProperties<DeliveryProperties>()->setExchange(getName());
+ msg->setExchange(getName());
}
bool Exchange::routeWithAlternate(Deliverable& msg)
diff --git a/qpid/cpp/src/qpid/broker/LegacyLVQ.cpp b/qpid/cpp/src/qpid/broker/LegacyLVQ.cpp
index a811a86492..3262e343a3 100644
--- a/qpid/cpp/src/qpid/broker/LegacyLVQ.cpp
+++ b/qpid/cpp/src/qpid/broker/LegacyLVQ.cpp
@@ -93,11 +93,7 @@ void LegacyLVQ::removeIf(Predicate p)
//purging of an LVQ is not enabled if the broker is clustered
//(expired messages will be removed on delivery and consolidated
//by key as part of normal LVQ operation).
-
- //TODO: Is there a neater way to check whether broker is
- //clustered? Here we assume that if the clustered timer is the
- //same as the regular timer, we are not clustered:
- if (!broker || &(broker->getClusterTimer()) == &(broker->getTimer()))
+ if (!broker || !broker->isInCluster())
MessageMap::removeIf(p);
}
diff --git a/qpid/cpp/src/qpid/broker/Link.cpp b/qpid/cpp/src/qpid/broker/Link.cpp
index 9ab4379a69..8010bf43e7 100644
--- a/qpid/cpp/src/qpid/broker/Link.cpp
+++ b/qpid/cpp/src/qpid/broker/Link.cpp
@@ -248,6 +248,19 @@ void Link::ioThreadProcessing()
return;
QPID_LOG(debug, "Link::ioThreadProcessing()");
+ // check for bridge session errors and recover
+ if (!active.empty()) {
+ Bridges::iterator removed = std::remove_if(
+ active.begin(), active.end(), !boost::bind(&Bridge::isSessionReady, _1));
+ for (Bridges::iterator i = removed; i != active.end(); ++i) {
+ Bridge::shared_ptr bridge = *i;
+ bridge->closed();
+ bridge->cancel(*connection);
+ created.push_back(bridge);
+ }
+ active.erase(removed, active.end());
+ }
+
//process any pending creates and/or cancellations
if (!created.empty()) {
for (Bridges::iterator i = created.begin(); i != created.end(); ++i) {
@@ -296,7 +309,7 @@ void Link::maintenanceVisit ()
}
}
}
- else if (state == STATE_OPERATIONAL && (!created.empty() || !cancellations.empty()) && connection != 0)
+ else if (state == STATE_OPERATIONAL && (!active.empty() || !created.empty() || !cancellations.empty()) && connection != 0)
connection->requestIOProcessing (boost::bind(&Link::ioThreadProcessing, this));
}
diff --git a/qpid/cpp/src/qpid/broker/Message.cpp b/qpid/cpp/src/qpid/broker/Message.cpp
index d694d1eafd..992a94f92e 100644
--- a/qpid/cpp/src/qpid/broker/Message.cpp
+++ b/qpid/cpp/src/qpid/broker/Message.cpp
@@ -30,6 +30,7 @@
#include "qpid/framing/SendContent.h"
#include "qpid/framing/SequenceNumber.h"
#include "qpid/framing/TypeFilter.h"
+#include "qpid/framing/reply_exceptions.h"
#include "qpid/log/Statement.h"
#include <time.h>
@@ -51,18 +52,9 @@ Message::Message(const framing::SequenceNumber& id) :
frames(id), persistenceId(0), redelivered(false), loaded(false),
staged(false), forcePersistentPolicy(false), publisher(0), adapter(0),
expiration(FAR_FUTURE), dequeueCallback(0),
- inCallback(false), requiredCredit(0), isManagementMessage(false)
+ inCallback(false), requiredCredit(0), isManagementMessage(false), copyHeaderOnWrite(false)
{}
-Message::Message(const Message& original) :
- PersistableMessage(), frames(original.frames), persistenceId(0), redelivered(false), loaded(false),
- staged(false), forcePersistentPolicy(false), publisher(0), adapter(0),
- expiration(original.expiration), dequeueCallback(0),
- inCallback(false), requiredCredit(0)
-{
- setExpiryPolicy(original.expiryPolicy);
-}
-
Message::~Message() {}
void Message::forcePersistent()
@@ -288,6 +280,9 @@ void Message::sendHeader(framing::FrameHandler& out, uint16_t /*maxFrameSize*/)
sys::Mutex::ScopedLock l(lock);
Relay f(out);
frames.map_if(f, TypeFilter<HEADER_BODY>());
+ //as frame (and pointer to body) has now been passed to handler,
+ //subsequent modifications should use a copy
+ copyHeaderOnWrite = true;
}
// TODO aconway 2007-11-09: Obsolete, remove. Was used to cover over
@@ -342,11 +337,30 @@ bool Message::isExcluded(const std::vector<std::string>& excludes) const
return false;
}
+class CloneHeaderBody
+{
+public:
+ void operator()(AMQFrame& f)
+ {
+ f.cloneBody();
+ }
+};
+
+AMQHeaderBody* Message::getHeaderBody()
+{
+ if (copyHeaderOnWrite) {
+ CloneHeaderBody f;
+ frames.map_if(f, TypeFilter<HEADER_BODY>());
+ copyHeaderOnWrite = false;
+ }
+ return frames.getHeaders();
+}
+
void Message::addTraceId(const std::string& id)
{
sys::Mutex::ScopedLock l(lock);
if (isA<MessageTransferBody>()) {
- FieldTable& headers = getProperties<MessageProperties>()->getApplicationHeaders();
+ FieldTable& headers = getModifiableProperties<MessageProperties>()->getApplicationHeaders();
std::string trace = headers.getAsString(X_QPID_TRACE);
if (trace.empty()) {
headers.setString(X_QPID_TRACE, id);
@@ -360,7 +374,8 @@ void Message::addTraceId(const std::string& id)
void Message::setTimestamp(const boost::intrusive_ptr<ExpiryPolicy>& e)
{
- DeliveryProperties* props = getProperties<DeliveryProperties>();
+ sys::Mutex::ScopedLock l(lock);
+ DeliveryProperties* props = getModifiableProperties<DeliveryProperties>();
if (props->getTtl()) {
// AMQP requires setting the expiration property to be posix
// time_t in seconds. TTL is in milliseconds
@@ -382,9 +397,9 @@ void Message::setTimestamp(const boost::intrusive_ptr<ExpiryPolicy>& e)
void Message::adjustTtl()
{
- DeliveryProperties* props = getProperties<DeliveryProperties>();
+ sys::Mutex::ScopedLock l(lock);
+ DeliveryProperties* props = getModifiableProperties<DeliveryProperties>();
if (props->getTtl()) {
- sys::Mutex::ScopedLock l(lock);
if (expiration < FAR_FUTURE) {
sys::AbsTime current(
expiryPolicy ? expiryPolicy->getCurrentTime() : sys::AbsTime::now());
@@ -395,6 +410,42 @@ void Message::adjustTtl()
}
}
+void Message::setRedelivered()
+{
+ sys::Mutex::ScopedLock l(lock);
+ getModifiableProperties<framing::DeliveryProperties>()->setRedelivered(true);
+}
+
+void Message::insertCustomProperty(const std::string& key, int64_t value)
+{
+ sys::Mutex::ScopedLock l(lock);
+ getModifiableProperties<MessageProperties>()->getApplicationHeaders().setInt64(key,value);
+}
+
+void Message::insertCustomProperty(const std::string& key, const std::string& value)
+{
+ sys::Mutex::ScopedLock l(lock);
+ getModifiableProperties<MessageProperties>()->getApplicationHeaders().setString(key,value);
+}
+
+void Message::removeCustomProperty(const std::string& key)
+{
+ sys::Mutex::ScopedLock l(lock);
+ getModifiableProperties<MessageProperties>()->getApplicationHeaders().erase(key);
+}
+
+void Message::setExchange(const std::string& exchange)
+{
+ sys::Mutex::ScopedLock l(lock);
+ getModifiableProperties<DeliveryProperties>()->setExchange(exchange);
+}
+
+void Message::clearApplicationHeadersFlag()
+{
+ sys::Mutex::ScopedLock l(lock);
+ getModifiableProperties<MessageProperties>()->clearApplicationHeadersFlag();
+}
+
void Message::setExpiryPolicy(const boost::intrusive_ptr<ExpiryPolicy>& e) {
expiryPolicy = e;
}
@@ -442,11 +493,6 @@ uint8_t Message::getPriority() const {
return getAdapter().getPriority(frames);
}
-framing::FieldTable& Message::getOrInsertHeaders()
-{
- return getProperties<MessageProperties>()->getApplicationHeaders();
-}
-
bool Message::getIsManagementMessage() const { return isManagementMessage; }
void Message::setIsManagementMessage(bool b) { isManagementMessage = b; }
diff --git a/qpid/cpp/src/qpid/broker/Message.h b/qpid/cpp/src/qpid/broker/Message.h
index e1d6c60a80..2a23a25d06 100644
--- a/qpid/cpp/src/qpid/broker/Message.h
+++ b/qpid/cpp/src/qpid/broker/Message.h
@@ -29,13 +29,17 @@
#include "qpid/sys/Monitor.h"
#include "qpid/sys/Time.h"
#include <boost/function.hpp>
+#include <boost/intrusive_ptr.hpp>
#include <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
#include <vector>
namespace qpid {
namespace framing {
+class AMQBody;
+class AMQHeaderBody;
class FieldTable;
class SequenceNumber;
}
@@ -53,7 +57,6 @@ public:
typedef boost::function<void (const boost::intrusive_ptr<Message>&)> MessageCallback;
QPID_BROKER_EXTERN Message(const framing::SequenceNumber& id = framing::SequenceNumber());
- QPID_BROKER_EXTERN Message(const Message&);
QPID_BROKER_EXTERN ~Message();
uint64_t getPersistenceId() const { return persistenceId; }
@@ -75,7 +78,6 @@ public:
bool isImmediate() const;
QPID_BROKER_EXTERN const framing::FieldTable* getApplicationHeaders() const;
QPID_BROKER_EXTERN std::string getAppId() const;
- framing::FieldTable& getOrInsertHeaders();
QPID_BROKER_EXTERN bool isPersistent() const;
bool requiresAccept();
@@ -85,18 +87,19 @@ public:
sys::AbsTime getExpiration() const { return expiration; }
void setExpiration(sys::AbsTime exp) { expiration = exp; }
void adjustTtl();
+ void setRedelivered();
+ QPID_BROKER_EXTERN void insertCustomProperty(const std::string& key, int64_t value);
+ QPID_BROKER_EXTERN void insertCustomProperty(const std::string& key, const std::string& value);
+ QPID_BROKER_EXTERN void removeCustomProperty(const std::string& key);
+ void setExchange(const std::string&);
+ void clearApplicationHeadersFlag();
framing::FrameSet& getFrames() { return frames; }
const framing::FrameSet& getFrames() const { return frames; }
- template <class T> T* getProperties() {
- qpid::framing::AMQHeaderBody* p = frames.getHeaders();
- return p->get<T>(true);
- }
-
template <class T> const T* getProperties() const {
const qpid::framing::AMQHeaderBody* p = frames.getHeaders();
- return p->get<T>(true);
+ return p->get<T>();
}
template <class T> const T* hasProperties() const {
@@ -156,9 +159,8 @@ public:
bool isExcluded(const std::vector<std::string>& excludes) const;
void addTraceId(const std::string& id);
- void forcePersistent();
- bool isForcedPersistent();
-
+ void forcePersistent();
+ bool isForcedPersistent();
/** Call cb when dequeue is complete, may call immediately. Holds cb by reference. */
void setDequeueCompleteCallback(MessageCallback& cb);
@@ -178,7 +180,7 @@ public:
bool redelivered;
bool loaded;
bool staged;
- bool forcePersistentPolicy; // used to force message as durable, via a broker policy
+ bool forcePersistentPolicy; // used to force message as durable, via a broker policy
ConnectionToken* publisher;
mutable MessageAdapter* adapter;
qpid::sys::AbsTime expiration;
@@ -194,6 +196,15 @@ public:
uint32_t requiredCredit;
bool isManagementMessage;
+ mutable bool copyHeaderOnWrite;
+
+ /**
+ * Expects lock to be held
+ */
+ template <class T> T* getModifiableProperties() {
+ return getHeaderBody()->get<T>(true);
+ }
+ qpid::framing::AMQHeaderBody* getHeaderBody();
};
}}
diff --git a/qpid/cpp/src/qpid/broker/Queue.cpp b/qpid/cpp/src/qpid/broker/Queue.cpp
index 224446adb2..d4140f3505 100644
--- a/qpid/cpp/src/qpid/broker/Queue.cpp
+++ b/qpid/cpp/src/qpid/broker/Queue.cpp
@@ -702,7 +702,7 @@ void Queue::push(boost::intrusive_ptr<Message>& msg, bool isRecovery){
{
Mutex::ScopedLock locker(messageLock);
QueuedMessage qm(this, msg, ++sequence);
- if (insertSeqNo) msg->getOrInsertHeaders().setInt64(seqNoKey, sequence);
+ if (insertSeqNo) msg->insertCustomProperty(seqNoKey, sequence);
dequeueRequired = messages->push(qm, removed);
listeners.populate(copy);
@@ -805,11 +805,6 @@ bool Queue::enqueue(TransactionContext* ctxt, boost::intrusive_ptr<Message>& msg
}
if (traceId.size()) {
- //copy on write: take deep copy of message before modifying it
- //as the frames may already be available for delivery on other
- //threads
- boost::intrusive_ptr<Message> copy(new Message(*msg));
- msg = copy;
msg->addTraceId(traceId);
}
diff --git a/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp b/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp
index acdb4934d4..12a13ccfe6 100644
--- a/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp
+++ b/qpid/cpp/src/qpid/broker/SaslAuthenticator.cpp
@@ -381,13 +381,17 @@ void CyrusAuthenticator::start(const string& mechanism, const string& response)
const char *challenge;
unsigned int challenge_len;
- QPID_LOG(debug, "SASL: Starting authentication with mechanism: " << mechanism);
+ // This should be at same debug level as mech list in getMechanisms().
+ QPID_LOG(info, "SASL: Starting authentication with mechanism: " << mechanism);
int code = sasl_server_start(sasl_conn,
mechanism.c_str(),
- response.c_str(), response.length(),
+ response.size() ? response.c_str() : 0, response.length(),
&challenge, &challenge_len);
processAuthenticationStep(code, challenge, challenge_len);
+ qmf::org::apache::qpid::broker::Connection* cnxMgmt = connection.getMgmtObject();
+ if ( cnxMgmt )
+ cnxMgmt->set_saslMechanism(mechanism);
}
void CyrusAuthenticator::step(const string& response)
@@ -424,10 +428,12 @@ void CyrusAuthenticator::processAuthenticationStep(int code, const char *challen
client.secure(challenge_str);
} else {
std::string uid;
+ //save error detail before trying to retrieve username as error in doing so will overwrite it
+ std::string errordetail = sasl_errdetail(sasl_conn);
if (!getUsername(uid)) {
- QPID_LOG(info, "SASL: Authentication failed (no username available):" << sasl_errdetail(sasl_conn));
+ QPID_LOG(info, "SASL: Authentication failed (no username available yet):" << errordetail);
} else {
- QPID_LOG(info, "SASL: Authentication failed for " << uid << ":" << sasl_errdetail(sasl_conn));
+ QPID_LOG(info, "SASL: Authentication failed for " << uid << ":" << errordetail);
}
// TODO: Change to more specific exceptions, when they are
@@ -459,6 +465,9 @@ std::auto_ptr<SecurityLayer> CyrusAuthenticator::getSecurityLayer(uint16_t maxFr
if (ssf) {
securityLayer = std::auto_ptr<SecurityLayer>(new CyrusSecurityLayer(sasl_conn, maxFrameSize));
}
+ qmf::org::apache::qpid::broker::Connection* cnxMgmt = connection.getMgmtObject();
+ if ( cnxMgmt )
+ cnxMgmt->set_saslSsf(ssf);
return securityLayer;
}
diff --git a/qpid/cpp/src/qpid/broker/SemanticState.cpp b/qpid/cpp/src/qpid/broker/SemanticState.cpp
index 52aad75748..94d0cc87f7 100644
--- a/qpid/cpp/src/qpid/broker/SemanticState.cpp
+++ b/qpid/cpp/src/qpid/broker/SemanticState.cpp
@@ -132,6 +132,10 @@ bool SemanticState::cancel(const string& tag)
//should cancel all unacked messages for this consumer so that
//they are not redelivered on recovery
for_each(unacked.begin(), unacked.end(), boost::bind(&DeliveryRecord::cancel, _1, tag));
+ //can also remove any records that are now redundant
+ DeliveryRecords::iterator removed =
+ remove_if(unacked.begin(), unacked.end(), bind(&DeliveryRecord::isRedundant, _1));
+ unacked.erase(removed, unacked.end());
return true;
} else {
return false;
@@ -177,8 +181,8 @@ void SemanticState::startDtx(const std::string& xid, DtxManager& mgr, bool join)
if (!dtxSelected) {
throw CommandInvalidException(QPID_MSG("Session has not been selected for use with dtx"));
}
- dtxBuffer = DtxBuffer::shared_ptr(new DtxBuffer(xid));
- txBuffer = boost::static_pointer_cast<TxBuffer>(dtxBuffer);
+ dtxBuffer.reset(new DtxBuffer(xid));
+ txBuffer = dtxBuffer;
if (join) {
mgr.join(xid, dtxBuffer);
} else {
@@ -246,7 +250,7 @@ void SemanticState::resumeDtx(const std::string& xid)
checkDtxTimeout();
dtxBuffer->setSuspended(false);
- txBuffer = boost::static_pointer_cast<TxBuffer>(dtxBuffer);
+ txBuffer = dtxBuffer;
}
void SemanticState::checkDtxTimeout()
@@ -284,6 +288,7 @@ SemanticState::ConsumerImpl::ConsumerImpl(SemanticState* _parent,
acquire(_acquire),
blocked(true),
windowing(true),
+ windowActive(false),
exclusive(_exclusive),
resumeId(_resumeId),
tag(_tag),
@@ -534,7 +539,7 @@ void SemanticState::ConsumerImpl::complete(DeliveryRecord& delivery)
{
if (!delivery.isComplete()) {
delivery.complete();
- if (windowing) {
+ if (windowing && windowActive) {
if (msgCredit != 0xFFFFFFFF) msgCredit++;
if (byteCredit != 0xFFFFFFFF) byteCredit += delivery.getCredit();
}
@@ -641,6 +646,7 @@ void SemanticState::ConsumerImpl::setCreditMode()
void SemanticState::ConsumerImpl::addByteCredit(uint32_t value)
{
assertClusterSafe();
+ if (windowing) windowActive = true;
if (byteCredit != 0xFFFFFFFF) {
if (value == 0xFFFFFFFF) byteCredit = value;
else byteCredit += value;
@@ -650,6 +656,7 @@ void SemanticState::ConsumerImpl::addByteCredit(uint32_t value)
void SemanticState::ConsumerImpl::addMessageCredit(uint32_t value)
{
assertClusterSafe();
+ if (windowing) windowActive = true;
if (msgCredit != 0xFFFFFFFF) {
if (value == 0xFFFFFFFF) msgCredit = value;
else msgCredit += value;
@@ -670,7 +677,8 @@ void SemanticState::ConsumerImpl::flush()
{
while(haveCredit() && queue->dispatch(shared_from_this()))
;
- stop();
+ msgCredit = 0;
+ byteCredit = 0;
}
void SemanticState::ConsumerImpl::stop()
@@ -678,6 +686,7 @@ void SemanticState::ConsumerImpl::stop()
assertClusterSafe();
msgCredit = 0;
byteCredit = 0;
+ windowActive = false;
}
Queue::shared_ptr SemanticState::getQueue(const string& name) const {
@@ -711,6 +720,10 @@ void SemanticState::release(DeliveryId first, DeliveryId last, bool setRedeliver
DeliveryRecords::reverse_iterator start(range.end);
DeliveryRecords::reverse_iterator end(range.start);
for_each(start, end, boost::bind(&DeliveryRecord::release, _1, setRedelivered));
+
+ DeliveryRecords::iterator removed =
+ remove_if(range.start, range.end, bind(&DeliveryRecord::isRedundant, _1));
+ unacked.erase(removed, range.end);
}
void SemanticState::reject(DeliveryId first, DeliveryId last)
diff --git a/qpid/cpp/src/qpid/broker/SemanticState.h b/qpid/cpp/src/qpid/broker/SemanticState.h
index 1cff46f369..12ccc75f11 100644
--- a/qpid/cpp/src/qpid/broker/SemanticState.h
+++ b/qpid/cpp/src/qpid/broker/SemanticState.h
@@ -65,7 +65,7 @@ class SessionContext;
*
* Message delivery is driven by ConsumerImpl::doOutput(), which is
* called when a client's socket is ready to write data.
- *
+ *
*/
class SemanticState : private boost::noncopyable {
public:
@@ -80,6 +80,7 @@ class SemanticState : private boost::noncopyable {
const bool acquire;
bool blocked;
bool windowing;
+ bool windowActive;
bool exclusive;
std::string resumeId;
const std::string tag; // <destination> from AMQP 0-10 Message.subscribe command
@@ -106,9 +107,9 @@ class SemanticState : private boost::noncopyable {
uint64_t resumeTtl, const framing::FieldTable& arguments);
~ConsumerImpl();
OwnershipToken* getSession();
- bool deliver(QueuedMessage& msg);
- bool filter(boost::intrusive_ptr<Message> msg);
- bool accept(boost::intrusive_ptr<Message> msg);
+ bool deliver(QueuedMessage& msg);
+ bool filter(boost::intrusive_ptr<Message> msg);
+ bool accept(boost::intrusive_ptr<Message> msg);
void disableNotify();
void enableNotify();
@@ -123,7 +124,7 @@ class SemanticState : private boost::noncopyable {
void addMessageCredit(uint32_t value);
void flush();
void stop();
- void complete(DeliveryRecord&);
+ void complete(DeliveryRecord&);
boost::shared_ptr<Queue> getQueue() const { return queue; }
bool isBlocked() const { return blocked; }
bool setBlocked(bool set) { std::swap(set, blocked); return set; }
@@ -148,9 +149,10 @@ class SemanticState : private boost::noncopyable {
management::Manageable::status_t ManagementMethod (uint32_t methodId, management::Args& args, std::string& text);
};
+ typedef std::map<std::string, DtxBuffer::shared_ptr> DtxBufferMap;
+
private:
typedef std::map<std::string, ConsumerImpl::shared_ptr> ConsumerImplMap;
- typedef std::map<std::string, DtxBuffer::shared_ptr> DtxBufferMap;
SessionContext& session;
DeliveryAdapter& deliveryAdapter;
@@ -181,6 +183,7 @@ class SemanticState : private boost::noncopyable {
void disable(ConsumerImpl::shared_ptr);
public:
+
SemanticState(DeliveryAdapter&, SessionContext&);
~SemanticState();
@@ -189,7 +192,7 @@ class SemanticState : private boost::noncopyable {
const ConsumerImpl::shared_ptr find(const std::string& destination) const;
bool find(const std::string& destination, ConsumerImpl::shared_ptr&) const;
-
+
/**
* Get named queue, never returns 0.
* @return: named queue
@@ -197,11 +200,11 @@ class SemanticState : private boost::noncopyable {
* @exception: ConnectionException if name="" and session has no default.
*/
boost::shared_ptr<Queue> getQueue(const std::string& name) const;
-
+
bool exists(const std::string& consumerTag);
- void consume(const std::string& destination,
- boost::shared_ptr<Queue> queue,
+ void consume(const std::string& destination,
+ boost::shared_ptr<Queue> queue,
bool ackRequired, bool acquire, bool exclusive,
const std::string& resumeId=std::string(), uint64_t resumeTtl=0,
const framing::FieldTable& = framing::FieldTable());
@@ -219,12 +222,13 @@ class SemanticState : private boost::noncopyable {
void commit(MessageStore* const store);
void rollback();
void selectDtx();
+ bool getDtxSelected() const { return dtxSelected; }
void startDtx(const std::string& xid, DtxManager& mgr, bool join);
void endDtx(const std::string& xid, bool fail);
void suspendDtx(const std::string& xid);
void resumeDtx(const std::string& xid);
void recover(bool requeue);
- void deliver(DeliveryRecord& message, bool sync);
+ void deliver(DeliveryRecord& message, bool sync);
void acquire(DeliveryId first, DeliveryId last, DeliveryIds& acquired);
void release(DeliveryId first, DeliveryId last, bool setRedelivered);
void reject(DeliveryId first, DeliveryId last);
@@ -245,9 +249,12 @@ class SemanticState : private boost::noncopyable {
DeliveryRecords& getUnacked() { return unacked; }
framing::SequenceSet getAccumulatedAck() const { return accumulatedAck; }
TxBuffer::shared_ptr getTxBuffer() const { return txBuffer; }
+ DtxBuffer::shared_ptr getDtxBuffer() const { return dtxBuffer; }
void setTxBuffer(const TxBuffer::shared_ptr& txb) { txBuffer = txb; }
+ void setDtxBuffer(const DtxBuffer::shared_ptr& dtxb) { dtxBuffer = dtxb; txBuffer = dtxb; }
void setAccumulatedAck(const framing::SequenceSet& s) { accumulatedAck = s; }
void record(const DeliveryRecord& delivery);
+ DtxBufferMap& getSuspendedXids() { return suspendedXids; }
};
}} // namespace qpid::broker
diff --git a/qpid/cpp/src/qpid/broker/SessionState.cpp b/qpid/cpp/src/qpid/broker/SessionState.cpp
index ee9646931e..742dbe9be8 100644
--- a/qpid/cpp/src/qpid/broker/SessionState.cpp
+++ b/qpid/cpp/src/qpid/broker/SessionState.cpp
@@ -445,8 +445,6 @@ void SessionState::addPendingExecutionSync()
boost::intrusive_ptr<AsyncCompletion::Callback>
SessionState::IncompleteIngressMsgXfer::clone()
{
- boost::intrusive_ptr<SessionState::IncompleteIngressMsgXfer> cb(new SessionState::IncompleteIngressMsgXfer(session, msg));
-
// Optimization: this routine is *only* invoked when the message needs to be asynchronously completed.
// If the client is pending the message.transfer completion, flush now to force immediate write to journal.
if (requiresSync)
@@ -457,7 +455,8 @@ SessionState::IncompleteIngressMsgXfer::clone()
pending = true;
completerContext->addPendingMessage(msg);
}
- return cb;
+
+ return boost::intrusive_ptr<SessionState::IncompleteIngressMsgXfer>(new SessionState::IncompleteIngressMsgXfer(*this));
}
diff --git a/qpid/cpp/src/qpid/broker/SessionState.h b/qpid/cpp/src/qpid/broker/SessionState.h
index b43df0c0aa..506af85c47 100644
--- a/qpid/cpp/src/qpid/broker/SessionState.h
+++ b/qpid/cpp/src/qpid/broker/SessionState.h
@@ -256,7 +256,15 @@ class SessionState : public qpid::SessionState,
requiresAccept(m->requiresAccept()),
requiresSync(m->getFrames().getMethod()->isSync()),
pending(false) {}
- virtual ~IncompleteIngressMsgXfer() {};
+ IncompleteIngressMsgXfer( const IncompleteIngressMsgXfer& x )
+ : AsyncCommandContext(x.session, x.msg->getCommandId()),
+ session(x.session),
+ msg(x.msg),
+ requiresAccept(x.requiresAccept),
+ requiresSync(x.requiresSync),
+ pending(x.pending) {}
+
+ virtual ~IncompleteIngressMsgXfer() {};
virtual void completed(bool);
virtual boost::intrusive_ptr<AsyncCompletion::Callback> clone();
diff --git a/qpid/cpp/src/qpid/broker/TxBuffer.cpp b/qpid/cpp/src/qpid/broker/TxBuffer.cpp
index b509778e89..d92e6ace48 100644
--- a/qpid/cpp/src/qpid/broker/TxBuffer.cpp
+++ b/qpid/cpp/src/qpid/broker/TxBuffer.cpp
@@ -76,5 +76,5 @@ bool TxBuffer::commitLocal(TransactionalStore* const store)
}
void TxBuffer::accept(TxOpConstVisitor& v) const {
- std::for_each(ops.begin(), ops.end(), boost::bind(&TxOp::accept, _1, boost::ref(v)));
+ std::for_each(ops.begin(), ops.end(), boost::bind(&TxOp::accept, _1, boost::ref(v)));
}
diff --git a/qpid/cpp/src/qpid/broker/TxPublish.h b/qpid/cpp/src/qpid/broker/TxPublish.h
index f0b9c0a302..dba7878af2 100644
--- a/qpid/cpp/src/qpid/broker/TxPublish.h
+++ b/qpid/cpp/src/qpid/broker/TxPublish.h
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -34,57 +34,58 @@
#include <boost/intrusive_ptr.hpp>
namespace qpid {
- namespace broker {
- /**
- * Defines the behaviour for publish operations on a
- * transactional channel. Messages are routed through
- * exchanges when received but are not at that stage delivered
- * to the matching queues, rather the queues are held in an
- * instance of this class. On prepare() the message is marked
- * enqueued to the relevant queues in the MessagesStore. On
- * commit() the messages will be passed to the queue for
- * dispatch or to be added to the in-memory queue.
- */
- class QPID_BROKER_CLASS_EXTERN TxPublish : public TxOp, public Deliverable{
+namespace broker {
+/**
+ * Defines the behaviour for publish operations on a
+ * transactional channel. Messages are routed through
+ * exchanges when received but are not at that stage delivered
+ * to the matching queues, rather the queues are held in an
+ * instance of this class. On prepare() the message is marked
+ * enqueued to the relevant queues in the MessagesStore. On
+ * commit() the messages will be passed to the queue for
+ * dispatch or to be added to the in-memory queue.
+ */
+class QPID_BROKER_CLASS_EXTERN TxPublish : public TxOp, public Deliverable{
- class Commit{
- boost::intrusive_ptr<Message>& msg;
- public:
- Commit(boost::intrusive_ptr<Message>& msg);
- void operator()(const boost::shared_ptr<Queue>& queue);
- };
- class Rollback{
- boost::intrusive_ptr<Message>& msg;
- public:
- Rollback(boost::intrusive_ptr<Message>& msg);
- void operator()(const boost::shared_ptr<Queue>& queue);
- };
+ class Commit{
+ boost::intrusive_ptr<Message>& msg;
+ public:
+ Commit(boost::intrusive_ptr<Message>& msg);
+ void operator()(const boost::shared_ptr<Queue>& queue);
+ };
+ class Rollback{
+ boost::intrusive_ptr<Message>& msg;
+ public:
+ Rollback(boost::intrusive_ptr<Message>& msg);
+ void operator()(const boost::shared_ptr<Queue>& queue);
+ };
- boost::intrusive_ptr<Message> msg;
- std::list<boost::shared_ptr<Queue> > queues;
- std::list<boost::shared_ptr<Queue> > prepared;
+ boost::intrusive_ptr<Message> msg;
+ std::list<boost::shared_ptr<Queue> > queues;
+ std::list<boost::shared_ptr<Queue> > prepared;
- void prepare(TransactionContext* ctxt, boost::shared_ptr<Queue>);
+ void prepare(TransactionContext* ctxt, boost::shared_ptr<Queue>);
- public:
- QPID_BROKER_EXTERN TxPublish(boost::intrusive_ptr<Message> msg);
- QPID_BROKER_EXTERN virtual bool prepare(TransactionContext* ctxt) throw();
- QPID_BROKER_EXTERN virtual void commit() throw();
- QPID_BROKER_EXTERN virtual void rollback() throw();
+ public:
+ QPID_BROKER_EXTERN TxPublish(boost::intrusive_ptr<Message> msg);
+ QPID_BROKER_EXTERN virtual bool prepare(TransactionContext* ctxt) throw();
+ QPID_BROKER_EXTERN virtual void commit() throw();
+ QPID_BROKER_EXTERN virtual void rollback() throw();
- virtual Message& getMessage() { return *msg; };
-
- QPID_BROKER_EXTERN virtual void deliverTo(const boost::shared_ptr<Queue>& queue);
+ virtual Message& getMessage() { return *msg; };
- virtual ~TxPublish(){}
- virtual void accept(TxOpConstVisitor& visitor) const { visitor(*this); }
+ QPID_BROKER_EXTERN virtual void deliverTo(const boost::shared_ptr<Queue>& queue);
- QPID_BROKER_EXTERN uint64_t contentSize();
+ virtual ~TxPublish(){}
+ virtual void accept(TxOpConstVisitor& visitor) const { visitor(*this); }
- boost::intrusive_ptr<Message> getMessage() const { return msg; }
- const std::list<boost::shared_ptr<Queue> > getQueues() const { return queues; }
- };
- }
+ QPID_BROKER_EXTERN uint64_t contentSize();
+
+ boost::intrusive_ptr<Message> getMessage() const { return msg; }
+ const std::list<boost::shared_ptr<Queue> >& getQueues() const { return queues; }
+ const std::list<boost::shared_ptr<Queue> >& getPrepared() const { return prepared; }
+};
+}
}
diff --git a/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp b/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp
index 962877a471..d26b370632 100644
--- a/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp
+++ b/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp
@@ -93,6 +93,7 @@ NullAuthenticator::~NullAuthenticator() {}
void NullAuthenticator::getMechanisms(Array& mechanisms)
{
mechanisms.add(boost::shared_ptr<FieldValue>(new Str16Value("ANONYMOUS")));
+ mechanisms.add(boost::shared_ptr<FieldValue>(new Str16Value("PLAIN")));
}
void NullAuthenticator::start(const string& mechanism, const string& response)
diff --git a/qpid/cpp/src/qpid/broker/windows/SslProtocolFactory.cpp b/qpid/cpp/src/qpid/broker/windows/SslProtocolFactory.cpp
index 676074a590..1dff1ddc8f 100644
--- a/qpid/cpp/src/qpid/broker/windows/SslProtocolFactory.cpp
+++ b/qpid/cpp/src/qpid/broker/windows/SslProtocolFactory.cpp
@@ -27,10 +27,14 @@
#include "qpid/sys/AsynchIOHandler.h"
#include "qpid/sys/ConnectionCodec.h"
#include "qpid/sys/Socket.h"
+#include "qpid/sys/SocketAddress.h"
#include "qpid/sys/SystemInfo.h"
#include "qpid/sys/windows/SslAsynchIO.h"
+
#include <boost/bind.hpp>
+#include <boost/ptr_container/ptr_vector.hpp>
#include <memory>
+
// security.h needs to see this to distinguish from kernel use.
#define SECURITY_WIN32
#include <security.h>
@@ -68,9 +72,10 @@ struct SslServerOptions : qpid::Options
};
class SslProtocolFactory : public qpid::sys::ProtocolFactory {
- qpid::sys::Socket listener;
const bool tcpNoDelay;
- const uint16_t listeningPort;
+ boost::ptr_vector<Socket> listeners;
+ boost::ptr_vector<AsynchAcceptor> acceptors;
+ uint16_t listeningPort;
std::string brokerHost;
const bool clientAuthSelected;
std::auto_ptr<qpid::sys::AsynchAcceptor> acceptor;
@@ -78,7 +83,7 @@ class SslProtocolFactory : public qpid::sys::ProtocolFactory {
CredHandle credHandle;
public:
- SslProtocolFactory(const SslServerOptions&, int backlog, bool nodelay);
+ SslProtocolFactory(const SslServerOptions&, const std::string& host, const std::string& port, int backlog, bool nodelay);
~SslProtocolFactory();
void accept(sys::Poller::shared_ptr, sys::ConnectionCodec::Factory*);
void connect(sys::Poller::shared_ptr, const std::string& host, const std::string& port,
@@ -114,6 +119,7 @@ static struct SslPlugin : public Plugin {
try {
const broker::Broker::Options& opts = broker->getOptions();
ProtocolFactory::shared_ptr protocol(new SslProtocolFactory(options,
+ "", boost::lexical_cast<std::string>(options.port),
opts.connectionBacklog,
opts.tcpNoDelay));
QPID_LOG(notice, "Listening for SSL connections on TCP port " << protocol->getPort());
@@ -126,12 +132,13 @@ static struct SslPlugin : public Plugin {
} sslPlugin;
SslProtocolFactory::SslProtocolFactory(const SslServerOptions& options,
- int backlog,
+ const std::string& host, const std::string& port, int backlog,
bool nodelay)
: tcpNoDelay(nodelay),
- listeningPort(listener.listen("", boost::lexical_cast<std::string>(options.port), backlog)),
clientAuthSelected(options.clientAuth) {
+ // Make sure that certificate store is good before listening to sockets
+ // to avoid having open and listening sockets when there is no cert store
SecInvalidateHandle(&credHandle);
// Get the certificate for this server.
@@ -176,6 +183,23 @@ SslProtocolFactory::SslProtocolFactory(const SslServerOptions& options,
throw QPID_WINDOWS_ERROR(status);
::CertFreeCertificateContext(certContext);
::CertCloseStore(certStoreHandle, 0);
+
+ // Listen to socket(s)
+ SocketAddress sa(host, port);
+
+ // We must have at least one resolved address
+ QPID_LOG(info, "SSL Listening to: " << sa.asString())
+ Socket* s = new Socket;
+ listeningPort = s->listen(sa, backlog);
+ listeners.push_back(s);
+
+ // Try any other resolved addresses
+ while (sa.nextAddress()) {
+ QPID_LOG(info, "SSL Listening to: " << sa.asString())
+ Socket* s = new Socket;
+ s->listen(sa, backlog);
+ listeners.push_back(s);
+ }
}
SslProtocolFactory::~SslProtocolFactory() {
@@ -238,10 +262,12 @@ uint16_t SslProtocolFactory::getPort() const {
void SslProtocolFactory::accept(sys::Poller::shared_ptr poller,
sys::ConnectionCodec::Factory* fact) {
- acceptor.reset(
- AsynchAcceptor::create(listener,
- boost::bind(&SslProtocolFactory::established, this, poller, _1, fact, false)));
- acceptor->start(poller);
+ for (unsigned i = 0; i<listeners.size(); ++i) {
+ acceptors.push_back(
+ AsynchAcceptor::create(listeners[i],
+ boost::bind(&SslProtocolFactory::established, this, poller, _1, fact, false)));
+ acceptors[i].start(poller);
+ }
}
void SslProtocolFactory::connect(sys::Poller::shared_ptr poller,
diff --git a/qpid/cpp/src/qpid/client/ConnectionHandler.cpp b/qpid/cpp/src/qpid/client/ConnectionHandler.cpp
index 4fbf55aa60..801fe38051 100644
--- a/qpid/cpp/src/qpid/client/ConnectionHandler.cpp
+++ b/qpid/cpp/src/qpid/client/ConnectionHandler.cpp
@@ -143,7 +143,9 @@ void ConnectionHandler::outgoing(AMQFrame& frame)
void ConnectionHandler::waitForOpen()
{
waitFor(ESTABLISHED);
- if (getState() == FAILED || getState() == CLOSED) {
+ if (getState() == FAILED) {
+ throw TransportFailure(errorText);
+ } else if (getState() == CLOSED) {
throw ConnectionException(errorCode, errorText);
}
}
diff --git a/qpid/cpp/src/qpid/client/ConnectionImpl.cpp b/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
index 4b7aa07065..db97f1e0f4 100644
--- a/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
+++ b/qpid/cpp/src/qpid/client/ConnectionImpl.cpp
@@ -265,7 +265,7 @@ void ConnectionImpl::open()
} catch (const std::exception& e) {
QPID_LOG(debug, "Failed to connect to " << protocol << ":" << host << ":" << port << " " << e.what());
connector.reset();
- throw;
+ throw TransportFailure(e.what());
}
connector->init();
diff --git a/qpid/cpp/src/qpid/client/SessionImpl.cpp b/qpid/cpp/src/qpid/client/SessionImpl.cpp
index b507625b11..7cf4ef648e 100644
--- a/qpid/cpp/src/qpid/client/SessionImpl.cpp
+++ b/qpid/cpp/src/qpid/client/SessionImpl.cpp
@@ -170,6 +170,7 @@ Demux& SessionImpl::getDemux()
void SessionImpl::waitForCompletion(const SequenceNumber& id)
{
Lock l(state);
+ sys::Waitable::ScopedWait w(state);
waitForCompletionImpl(id);
}
diff --git a/qpid/cpp/src/qpid/client/SslConnector.cpp b/qpid/cpp/src/qpid/client/SslConnector.cpp
index f121cfb1ab..26c2335eda 100644
--- a/qpid/cpp/src/qpid/client/SslConnector.cpp
+++ b/qpid/cpp/src/qpid/client/SslConnector.cpp
@@ -197,7 +197,7 @@ void SslConnector::connect(const std::string& host, const std::string& port){
socket.connect(host, port);
} catch (const std::exception& e) {
socket.close();
- throw ConnectionException(framing::connection::CLOSE_CODE_FRAMING_ERROR, e.what());
+ throw TransportFailure(e.what());
}
identifier = str(format("[%1% %2%]") % socket.getLocalPort() % socket.getPeerAddress());
diff --git a/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp b/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
index 9cf5f31290..6687ba75e6 100644
--- a/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
+++ b/qpid/cpp/src/qpid/client/amqp0_10/AddressResolution.cpp
@@ -129,6 +129,10 @@ const std::string HEADERS_EXCHANGE("headers");
const std::string XML_EXCHANGE("xml");
const std::string WILDCARD_ANY("#");
+//exchange prefixes:
+const std::string PREFIX_AMQ("amq.");
+const std::string PREFIX_QPID("qpid.");
+
const Verifier verifier;
}
@@ -199,6 +203,7 @@ class Exchange : protected Node
void checkCreate(qpid::client::AsyncSession&, CheckMode);
void checkAssert(qpid::client::AsyncSession&, CheckMode);
void checkDelete(qpid::client::AsyncSession&, CheckMode);
+ bool isReservedName();
protected:
const std::string specifiedType;
@@ -490,7 +495,7 @@ std::string Subscription::getSubscriptionName(const std::string& base, const std
if (name.empty()) {
return (boost::format("%1%_%2%") % base % Uuid(true).str()).str();
} else {
- return (boost::format("%1%_%2%") % base % name).str();
+ return name;
}
}
@@ -772,18 +777,32 @@ Exchange::Exchange(const Address& a) : Node(a),
linkBindings.setDefaultExchange(name);
}
+bool Exchange::isReservedName()
+{
+ return name.find(PREFIX_AMQ) != std::string::npos || name.find(PREFIX_QPID) != std::string::npos;
+}
+
void Exchange::checkCreate(qpid::client::AsyncSession& session, CheckMode mode)
{
if (enabled(createPolicy, mode)) {
try {
- std::string type = specifiedType;
- if (type.empty()) type = TOPIC_EXCHANGE;
- session.exchangeDeclare(arg::exchange=name,
- arg::type=type,
- arg::durable=durable,
- arg::autoDelete=autoDelete,
- arg::alternateExchange=alternateExchange,
- arg::arguments=arguments);
+ if (isReservedName()) {
+ try {
+ sync(session).exchangeDeclare(arg::exchange=name, arg::passive=true);
+ } catch (const qpid::framing::NotFoundException& /*e*/) {
+ throw ResolutionError((boost::format("Cannot create exchange %1%; names beginning with \"amq.\" or \"qpid.\" are reserved.") % name).str());
+ }
+
+ } else {
+ std::string type = specifiedType;
+ if (type.empty()) type = TOPIC_EXCHANGE;
+ session.exchangeDeclare(arg::exchange=name,
+ arg::type=type,
+ arg::durable=durable,
+ arg::autoDelete=autoDelete,
+ arg::alternateExchange=alternateExchange,
+ arg::arguments=arguments);
+ }
nodeBindings.bind(session);
session.sync();
} catch (const qpid::framing::NotAllowedException& e) {
@@ -833,7 +852,7 @@ void Exchange::checkAssert(qpid::client::AsyncSession& session, CheckMode mode)
FieldTable::ValuePtr v = result.getArguments().get(i->first);
if (!v) {
throw AssertionFailed((boost::format("Option %1% not set for %2%") % i->first % name).str());
- } else if (i->second != v) {
+ } else if (*i->second != *v) {
throw AssertionFailed((boost::format("Option %1% does not match for %2%, expected %3%, got %4%")
% i->first % name % *(i->second) % *v).str());
}
diff --git a/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp b/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp
index ced8cf66fd..cc6e9b9ab2 100644
--- a/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp
+++ b/qpid/cpp/src/qpid/client/amqp0_10/ConnectionImpl.cpp
@@ -20,7 +20,6 @@
*/
#include "ConnectionImpl.h"
#include "SessionImpl.h"
-#include "SimpleUrlParser.h"
#include "qpid/messaging/exceptions.h"
#include "qpid/messaging/Session.h"
#include "qpid/messaging/PrivateImplRef.h"
@@ -133,6 +132,8 @@ void ConnectionImpl::setOption(const std::string& name, const Variant& value)
settings.protocol = value.asString();
} else if (name == "ssl-cert-name" || name == "ssl_cert_name") {
settings.sslCertName = value.asString();
+ } else if (name == "x-reconnect-on-limit-exceeded" || name == "x_reconnect_on_limit_exceeded") {
+ reconnectOnLimitExceeded = value;
} else {
throw qpid::messaging::MessagingException(QPID_MSG("Invalid option: " << name << " not recognised"));
}
@@ -273,21 +274,14 @@ bool ConnectionImpl::tryConnect()
for (std::vector<std::string>::const_iterator i = urls.begin(); i != urls.end(); ++i) {
try {
QPID_LOG(info, "Trying to connect to " << *i << "...");
- //TODO: when url support is more complete can avoid this test here
- if (i->find("amqp:") == 0) {
- Url url(*i);
- connection.open(url, settings);
- } else {
- SimpleUrlParser::parse(*i, settings);
- connection.open(settings);
- }
+ Url url(*i);
+ if (url.getUser().size()) settings.username = url.getUser();
+ if (url.getPass().size()) settings.password = url.getPass();
+ connection.open(url, settings);
QPID_LOG(info, "Connected to " << *i);
mergeUrls(connection.getInitialBrokers(), l);
return resetSessions(l);
- } catch (const qpid::ConnectionException& e) {
- //TODO: need to fix timeout on
- //qpid::client::Connection::open() so that it throws
- //TransportFailure rather than a ConnectionException
+ } catch (const qpid::TransportFailure& e) {
QPID_LOG(info, "Failed to connect to " << *i << ": " << e.what());
}
}
diff --git a/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp b/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
index 787be7de2a..be5eab1f2b 100644
--- a/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
+++ b/qpid/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
@@ -60,12 +60,14 @@ SessionImpl::SessionImpl(ConnectionImpl& c, bool t) : connection(&c), transactio
void SessionImpl::checkError()
{
+ ScopedLock l(lock);
qpid::client::SessionBase_0_10Access s(session);
s.get()->assertOpen();
}
bool SessionImpl::hasError()
{
+ ScopedLock l(lock);
qpid::client::SessionBase_0_10Access s(session);
return s.get()->hasError();
}
@@ -129,27 +131,29 @@ void SessionImpl::close()
senders.clear();
receivers.clear();
} else {
- while (true) {
- Sender s;
- {
- ScopedLock l(lock);
- if (senders.empty()) break;
- s = senders.begin()->second;
- }
- s.close(); // outside the lock, will call senderCancelled
+ Senders sCopy;
+ Receivers rCopy;
+ {
+ ScopedLock l(lock);
+ senders.swap(sCopy);
+ receivers.swap(rCopy);
}
- while (true) {
- Receiver r;
- {
- ScopedLock l(lock);
- if (receivers.empty()) break;
- r = receivers.begin()->second;
- }
- r.close(); // outside the lock, will call receiverCancelled
+ for (Senders::iterator i = sCopy.begin(); i != sCopy.end(); ++i)
+ {
+ // outside the lock, will call senderCancelled
+ i->second.close();
+ }
+ for (Receivers::iterator i = rCopy.begin(); i != rCopy.end(); ++i)
+ {
+ // outside the lock, will call receiverCancelled
+ i->second.close();
}
}
connection->closed(*this);
- if (!hasError()) session.close();
+ if (!hasError()) {
+ ScopedLock l(lock);
+ session.close();
+ }
}
template <class T, class S> boost::intrusive_ptr<S> getImplPtr(T& t)
@@ -432,8 +436,11 @@ uint32_t SessionImpl::getUnsettledAcksImpl(const std::string* destination)
void SessionImpl::syncImpl(bool block)
{
- if (block) session.sync();
- else session.flush();
+ {
+ ScopedLock l(lock);
+ if (block) session.sync();
+ else session.flush();
+ }
//cleanup unconfirmed accept records:
incoming.pendingAccept();
}
diff --git a/qpid/cpp/src/qpid/client/amqp0_10/SimpleUrlParser.cpp b/qpid/cpp/src/qpid/client/amqp0_10/SimpleUrlParser.cpp
deleted file mode 100644
index 327c2274a6..0000000000
--- a/qpid/cpp/src/qpid/client/amqp0_10/SimpleUrlParser.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-#include "SimpleUrlParser.h"
-#include "qpid/client/ConnectionSettings.h"
-#include "qpid/Exception.h"
-#include <boost/lexical_cast.hpp>
-
-namespace qpid {
-namespace client {
-namespace amqp0_10 {
-
-bool split(const std::string& in, char delim, std::pair<std::string, std::string>& result)
-{
- std::string::size_type i = in.find(delim);
- if (i != std::string::npos) {
- result.first = in.substr(0, i);
- if (i+1 < in.size()) {
- result.second = in.substr(i+1);
- }
- return true;
- } else {
- return false;
- }
-}
-
-void parseUsernameAndPassword(const std::string& in, qpid::client::ConnectionSettings& result)
-{
- std::pair<std::string, std::string> parts;
- if (!split(in, '/', parts)) {
- result.username = in;
- } else {
- result.username = parts.first;
- result.password = parts.second;
- }
-}
-
-void parseHostAndPort(const std::string& in, qpid::client::ConnectionSettings& result)
-{
- std::pair<std::string, std::string> parts;
- if (!split(in, ':', parts)) {
- result.host = in;
- } else {
- result.host = parts.first;
- if (parts.second.size()) {
- result.port = boost::lexical_cast<uint16_t>(parts.second);
- }
- }
-}
-
-void SimpleUrlParser::parse(const std::string& url, qpid::client::ConnectionSettings& result)
-{
- std::pair<std::string, std::string> parts;
- if (!split(url, '@', parts)) {
- parseHostAndPort(url, result);
- } else {
- parseUsernameAndPassword(parts.first, result);
- parseHostAndPort(parts.second, result);
- }
-}
-
-}}} // namespace qpid::client::amqp0_10
diff --git a/qpid/cpp/src/qpid/client/amqp0_10/SimpleUrlParser.h b/qpid/cpp/src/qpid/client/amqp0_10/SimpleUrlParser.h
deleted file mode 100644
index 24f90ca9d6..0000000000
--- a/qpid/cpp/src/qpid/client/amqp0_10/SimpleUrlParser.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef QPID_CLIENT_AMQP0_10_SIMPLEURLPARSER_H
-#define QPID_CLIENT_AMQP0_10_SIMPLEURLPARSER_H
-
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-#include <string>
-
-namespace qpid {
-namespace client {
-
-struct ConnectionSettings;
-
-namespace amqp0_10 {
-
-/**
- * Parses a simple url of the form user/password@hostname:port
- */
-struct SimpleUrlParser
-{
- static void parse(const std::string& url, qpid::client::ConnectionSettings& result);
-};
-}}} // namespace qpid::client::amqp0_10
-
-#endif /*!QPID_CLIENT_AMQP0_10_SIMPLEURLPARSER_H*/
diff --git a/qpid/cpp/src/qpid/cluster/Cluster.cpp b/qpid/cpp/src/qpid/cluster/Cluster.cpp
index 82ed8bf8c9..7432fbbc33 100644
--- a/qpid/cpp/src/qpid/cluster/Cluster.cpp
+++ b/qpid/cpp/src/qpid/cluster/Cluster.cpp
@@ -57,12 +57,12 @@
* - management::ManagementBroker: uses MessageHandler supplied by cluster
* to send messages to the broker via the cluster.
*
- * - Dtx: not yet supported with cluster.
- *
- * cluster::ExpiryPolicy implements the strategy for message expiry.
+ * cluster::ExpiryPolicy uses cluster time.
*
* ClusterTimer implements periodic timed events in the cluster context.
- * Used for periodic management events.
+ * Used for:
+ * - periodic management events.
+ * - DTX transaction timeouts.
*
* <h1>CLUSTER PROTOCOL OVERVIEW</h1>
*
@@ -199,7 +199,7 @@ namespace _qmf = ::qmf::org::apache::qpid::cluster;
* Currently use SVN revision to avoid clashes with versions from
* different branches.
*/
-const uint32_t Cluster::CLUSTER_VERSION = 1128070;
+const uint32_t Cluster::CLUSTER_VERSION = 1159329;
struct ClusterDispatcher : public framing::AMQP_AllOperations::ClusterHandler {
qpid::cluster::Cluster& cluster;
@@ -526,7 +526,7 @@ void Cluster::deliveredFrame(const EventFrame& efConst) {
void Cluster::processFrame(const EventFrame& e, Lock& l) {
if (e.isCluster()) {
- QPID_LOG(trace, *this << " DLVR: " << e);
+ QPID_LOG_IF(trace, loggable(e.frame), *this << " DLVR: " << e);
ClusterDispatcher dispatch(*this, e.connectionId.getMember(), l);
if (!framing::invoke(dispatch, *e.frame.getBody()).wasHandled())
throw Exception(QPID_MSG("Invalid cluster control"));
@@ -535,14 +535,15 @@ void Cluster::processFrame(const EventFrame& e, Lock& l) {
map.incrementFrameSeq();
ConnectionPtr connection = getConnection(e, l);
if (connection) {
- QPID_LOG(trace, *this << " DLVR " << map.getFrameSeq() << ": " << e);
+ QPID_LOG_IF(trace, loggable(e.frame),
+ *this << " DLVR " << map.getFrameSeq() << ": " << e);
connection->deliveredFrame(e);
}
else
throw Exception(QPID_MSG("Unknown connection: " << e));
}
else // Drop connection frames while state < CATCHUP
- QPID_LOG(trace, *this << " DROP (joining): " << e);
+ QPID_LOG_IF(trace, loggable(e.frame), *this << " DROP (joining): " << e);
}
// Called in deliverFrameQueue thread
@@ -1219,4 +1220,12 @@ bool Cluster::deferDeliveryImpl(const std::string& queue,
return true;
}
+bool Cluster::loggable(const AMQFrame& f) {
+ const AMQMethodBody* method = (f.getMethod());
+ if (!method) return true; // Not a method
+ bool isClock = method->amqpClassId() == ClusterClockBody::CLASS_ID
+ && method->amqpMethodId() == ClusterClockBody::METHOD_ID;
+ return !isClock;
+}
+
}} // namespace qpid::cluster
diff --git a/qpid/cpp/src/qpid/cluster/Cluster.h b/qpid/cpp/src/qpid/cluster/Cluster.h
index adb06b2783..da5781b7a9 100644
--- a/qpid/cpp/src/qpid/cluster/Cluster.h
+++ b/qpid/cpp/src/qpid/cluster/Cluster.h
@@ -59,6 +59,7 @@ class Message;
}
namespace framing {
+class AMQFrame;
class AMQBody;
struct Uuid;
}
@@ -95,10 +96,10 @@ class Cluster : private Cpg::Handler, public management::Manageable {
void initialize();
// Connection map.
- void addLocalConnection(const ConnectionPtr&);
- void addShadowConnection(const ConnectionPtr&);
- void erase(const ConnectionId&);
-
+ void addLocalConnection(const ConnectionPtr&);
+ void addShadowConnection(const ConnectionPtr&);
+ void erase(const ConnectionId&);
+
// URLs of current cluster members.
std::vector<std::string> getIds() const;
std::vector<Url> getUrls() const;
@@ -113,7 +114,7 @@ class Cluster : private Cpg::Handler, public management::Manageable {
void updateInRetracted();
// True if we are expecting to receive catch-up connections.
bool isExpectingUpdate();
-
+
MemberId getId() const;
broker::Broker& getBroker() const;
Multicaster& getMulticast() { return mcast; }
@@ -144,6 +145,9 @@ class Cluster : private Cpg::Handler, public management::Manageable {
sys::AbsTime getClusterTime();
void sendClockUpdate();
void clock(const uint64_t time);
+
+ static bool loggable(const framing::AMQFrame&); // True if the frame should be logged.
+
private:
typedef sys::Monitor::ScopedLock Lock;
@@ -153,10 +157,10 @@ class Cluster : private Cpg::Handler, public management::Manageable {
/** Version number of the cluster protocol, to avoid mixed versions. */
static const uint32_t CLUSTER_VERSION;
-
+
// NB: A dummy Lock& parameter marks functions that must only be
// called with Cluster::lock locked.
-
+
void leave(Lock&);
std::vector<std::string> getIds(Lock&) const;
std::vector<Url> getUrls(Lock&) const;
@@ -165,11 +169,11 @@ class Cluster : private Cpg::Handler, public management::Manageable {
void brokerShutdown();
// == Called in deliverEventQueue thread
- void deliveredEvent(const Event&);
+ void deliveredEvent(const Event&);
// == Called in deliverFrameQueue thread
- void deliveredFrame(const EventFrame&);
- void processFrame(const EventFrame&, Lock&);
+ void deliveredFrame(const EventFrame&);
+ void processFrame(const EventFrame&, Lock&);
// Cluster controls implement XML methods from cluster.xml.
void updateRequest(const MemberId&, const std::string&, Lock&);
@@ -204,7 +208,7 @@ class Cluster : private Cpg::Handler, public management::Manageable {
void setReady(Lock&);
void memberUpdate(Lock&);
void setClusterId(const framing::Uuid&, Lock&);
- void erase(const ConnectionId&, Lock&);
+ void erase(const ConnectionId&, Lock&);
void requestUpdate(Lock& );
void initMapCompleted(Lock&);
void becomeElder(Lock&);
@@ -212,7 +216,7 @@ class Cluster : private Cpg::Handler, public management::Manageable {
void updateMgmtMembership(Lock&);
// == Called in CPG dispatch thread
- void deliver( // CPG deliver callback.
+ void deliver( // CPG deliver callback.
cpg_handle_t /*handle*/,
const struct cpg_name *group,
uint32_t /*nodeid*/,
@@ -221,7 +225,7 @@ class Cluster : private Cpg::Handler, public management::Manageable {
int /*msg_len*/);
void deliverEvent(const Event&);
-
+
void configChange( // CPG config change callback.
cpg_handle_t /*handle*/,
const struct cpg_name */*group*/,
@@ -272,7 +276,7 @@ class Cluster : private Cpg::Handler, public management::Manageable {
// Used only in deliverEventQueue thread or when stalled for update.
Decoder decoder;
bool discarding;
-
+
// Remaining members are protected by lock.
mutable sys::Monitor lock;
@@ -285,7 +289,7 @@ class Cluster : private Cpg::Handler, public management::Manageable {
JOINER, ///< Sent update request, waiting for update offer.
UPDATEE, ///< Stalled receive queue at update offer, waiting for update to complete.
CATCHUP, ///< Update complete, unstalled but has not yet seen own "ready" event.
- READY, ///< Fully operational
+ READY, ///< Fully operational
OFFER, ///< Sent an offer, waiting for accept/reject.
UPDATER, ///< Offer accepted, sending a state update.
LEFT ///< Final state, left the cluster.
diff --git a/qpid/cpp/src/qpid/cluster/Connection.cpp b/qpid/cpp/src/qpid/cluster/Connection.cpp
index 792f9f65f4..394749aad2 100644
--- a/qpid/cpp/src/qpid/cluster/Connection.cpp
+++ b/qpid/cpp/src/qpid/cluster/Connection.cpp
@@ -24,6 +24,8 @@
#include "Cluster.h"
#include "UpdateReceiver.h"
#include "qpid/assert.h"
+#include "qpid/broker/DtxAck.h"
+#include "qpid/broker/DtxBuffer.h"
#include "qpid/broker/SessionState.h"
#include "qpid/broker/SemanticState.h"
#include "qpid/broker/TxBuffer.h"
@@ -97,7 +99,9 @@ Connection::Connection(Cluster& c, sys::ConnectionOutputHandler& out,
external,
isLink,
isCatchUp ? ++catchUpId : 0,
- isCatchUp), // isCatchUp => shadow
+ // The first catch-up connection is not considered a shadow
+ // as it needs to be authenticated.
+ isCatchUp && self.second > 1),
expectProtocolHeader(isLink),
mcastFrameHandler(cluster.getMulticast(), self),
updateIn(c.getUpdateReceiver()),
@@ -114,7 +118,7 @@ Connection::Connection(Cluster& c, sys::ConnectionOutputHandler& out,
if (!updateIn.nextShadowMgmtId.empty())
connectionCtor.mgmtId = updateIn.nextShadowMgmtId;
updateIn.nextShadowMgmtId.clear();
- }
+ }
init();
QPID_LOG(debug, cluster << " local connection " << *this);
}
@@ -167,7 +171,7 @@ void Connection::announce(
AMQFrame frame;
while (frame.decode(buf))
connection->received(frame);
- connection->setUserId(username);
+ connection->setUserId(username);
}
// Do managment actions now that the connection is replicated.
connection->raiseConnectEvent();
@@ -194,7 +198,7 @@ void Connection::received(framing::AMQFrame& f) {
<< *this << ": " << f);
return;
}
- QPID_LOG(trace, cluster << " RECV " << *this << ": " << f);
+ QPID_LOG_IF(trace, Cluster::loggable(f), cluster << " RECV " << *this << ": " << f);
if (isLocal()) { // Local catch-up connection.
currentChannel = f.getChannel();
if (!framing::invoke(*this, *f.getBody()).wasHandled())
@@ -214,16 +218,9 @@ void Connection::received(framing::AMQFrame& f) {
}
}
-bool Connection::checkUnsupported(const AMQBody& body) {
- std::string message;
- if (body.getMethod()) {
- switch (body.getMethod()->amqpClassId()) {
- case DTX_CLASS_ID: message = "DTX transactions are not currently supported by cluster."; break;
- }
- }
- if (!message.empty())
- connection->close(connection::CLOSE_CODE_FRAMING_ERROR, message);
- return !message.empty();
+bool Connection::checkUnsupported(const AMQBody&) {
+ // Throw an exception for unsupported commands. Currently all are supported.
+ return false;
}
struct GiveReadCreditOnExit {
@@ -424,7 +421,8 @@ void Connection::sessionState(
const SequenceNumber& expected,
const SequenceNumber& received,
const SequenceSet& unknownCompleted,
- const SequenceSet& receivedIncomplete)
+ const SequenceSet& receivedIncomplete,
+ bool dtxSelected)
{
sessionState().setState(
replayStart,
@@ -434,7 +432,9 @@ void Connection::sessionState(
received,
unknownCompleted,
receivedIncomplete);
- QPID_LOG(debug, cluster << " received session state update for " << sessionState().getId());
+ if (dtxSelected) semanticState().selectDtx();
+ QPID_LOG(debug, cluster << " received session state update for "
+ << sessionState().getId());
// The output tasks will be added later in the update process.
connection->getOutputTasks().removeAll();
}
@@ -464,11 +464,24 @@ void Connection::shadowReady(
output.setSendMax(sendMax);
}
+void Connection::setDtxBuffer(const UpdateReceiver::DtxBufferRef& bufRef) {
+ broker::DtxManager& mgr = cluster.getBroker().getDtxManager();
+ broker::DtxWorkRecord* record = mgr.getWork(bufRef.xid);
+ broker::DtxBuffer::shared_ptr buffer = (*record)[bufRef.index];
+ if (bufRef.suspended)
+ bufRef.semanticState->getSuspendedXids()[bufRef.xid] = buffer;
+ else
+ bufRef.semanticState->setDtxBuffer(buffer);
+}
+
+// Marks the end of the update.
void Connection::membership(const FieldTable& joiners, const FieldTable& members,
const framing::SequenceNumber& frameSeq)
{
QPID_LOG(debug, cluster << " incoming update complete on connection " << *this);
updateIn.consumerNumbering.clear();
+ for_each(updateIn.dtxBuffers.begin(), updateIn.dtxBuffers.end(),
+ boost::bind(&Connection::setDtxBuffer, this, _1));
closeUpdated();
cluster.updateInDone(ClusterMap(joiners, members, frameSeq));
}
@@ -536,8 +549,16 @@ void Connection::deliveryRecord(const string& qname,
} else { // Message at original position in original queue
queue->find(position, m);
}
- if (!m.payload)
- throw Exception(QPID_MSG("deliveryRecord no update message"));
+ // FIXME aconway 2011-08-19: removed:
+ // if (!m.payload)
+ // throw Exception(QPID_MSG("deliveryRecord no update message"));
+ //
+ // It seems this could happen legitimately in the case one
+ // session browses message M, then another session acquires
+ // it. In that case the browsers delivery record is !acquired
+ // but the message is not on its original Queue. In that case
+ // we'll get a deliveryRecord with no payload for the browser.
+ //
}
broker::DeliveryRecord dr(m, queue, tag, acquired, accepted, windowing, credit);
@@ -545,7 +566,11 @@ void Connection::deliveryRecord(const string& qname,
if (cancelled) dr.cancel(dr.getTag());
if (completed) dr.complete();
if (ended) dr.setEnded(); // Exsitance of message
- semanticState().record(dr); // Part of the session's unacked list.
+
+ if (dtxBuffer) // Record for next dtx-ack
+ dtxAckRecords.push_back(dr);
+ else
+ semanticState().record(dr); // Record on session's unacked list.
}
void Connection::queuePosition(const string& qname, const SequenceNumber& position) {
@@ -561,29 +586,29 @@ void Connection::queueFairshareState(const std::string& qname, const uint8_t pri
namespace {
- // find a StatefulQueueObserver that matches a given identifier
- class ObserverFinder {
- const std::string id;
- boost::shared_ptr<broker::QueueObserver> target;
- ObserverFinder(const ObserverFinder&) {}
- public:
- ObserverFinder(const std::string& _id) : id(_id) {}
- broker::StatefulQueueObserver *getObserver()
- {
- if (target)
- return dynamic_cast<broker::StatefulQueueObserver *>(target.get());
- return 0;
- }
- void operator() (boost::shared_ptr<broker::QueueObserver> o)
- {
- if (!target) {
- broker::StatefulQueueObserver *p = dynamic_cast<broker::StatefulQueueObserver *>(o.get());
- if (p && p->getId() == id) {
- target = o;
- }
+// find a StatefulQueueObserver that matches a given identifier
+class ObserverFinder {
+ const std::string id;
+ boost::shared_ptr<broker::QueueObserver> target;
+ ObserverFinder(const ObserverFinder&) {}
+ public:
+ ObserverFinder(const std::string& _id) : id(_id) {}
+ broker::StatefulQueueObserver *getObserver()
+ {
+ if (target)
+ return dynamic_cast<broker::StatefulQueueObserver *>(target.get());
+ return 0;
+ }
+ void operator() (boost::shared_ptr<broker::QueueObserver> o)
+ {
+ if (!target) {
+ broker::StatefulQueueObserver *p = dynamic_cast<broker::StatefulQueueObserver *>(o.get());
+ if (p && p->getId() == id) {
+ target = o;
}
}
- };
+ }
+};
}
@@ -615,6 +640,7 @@ std::ostream& operator<<(std::ostream& o, const Connection& c) {
void Connection::txStart() {
txBuffer.reset(new broker::TxBuffer());
}
+
void Connection::txAccept(const framing::SequenceSet& acked) {
txBuffer->enlist(boost::shared_ptr<broker::TxAccept>(
new broker::TxAccept(acked, semanticState().getUnacked())));
@@ -630,8 +656,10 @@ void Connection::txEnqueue(const std::string& queue) {
new broker::RecoveredEnqueue(findQueue(queue), getUpdateMessage().payload)));
}
-void Connection::txPublish(const framing::Array& queues, bool delivered) {
- boost::shared_ptr<broker::TxPublish> txPub(new broker::TxPublish(getUpdateMessage().payload));
+void Connection::txPublish(const framing::Array& queues, bool delivered)
+{
+ boost::shared_ptr<broker::TxPublish> txPub(
+ new broker::TxPublish(getUpdateMessage().payload));
for (framing::Array::const_iterator i = queues.begin(); i != queues.end(); ++i)
txPub->deliverTo(findQueue((*i)->get<std::string>()));
txPub->delivered = delivered;
@@ -646,6 +674,51 @@ void Connection::accumulatedAck(const qpid::framing::SequenceSet& s) {
semanticState().setAccumulatedAck(s);
}
+void Connection::dtxStart(const std::string& xid,
+ bool ended,
+ bool suspended,
+ bool failed,
+ bool expired)
+{
+ dtxBuffer.reset(new broker::DtxBuffer(xid, ended, suspended, failed, expired));
+ txBuffer = dtxBuffer;
+}
+
+void Connection::dtxEnd() {
+ broker::DtxManager& mgr = cluster.getBroker().getDtxManager();
+ std::string xid = dtxBuffer->getXid();
+ if (mgr.exists(xid))
+ mgr.join(xid, dtxBuffer);
+ else
+ mgr.start(xid, dtxBuffer);
+ dtxBuffer.reset();
+ txBuffer.reset();
+}
+
+// Sent after all DeliveryRecords for a dtx-ack have been collected in dtxAckRecords
+void Connection::dtxAck() {
+ dtxBuffer->enlist(
+ boost::shared_ptr<broker::DtxAck>(new broker::DtxAck(dtxAckRecords)));
+ dtxAckRecords.clear();
+}
+
+void Connection::dtxBufferRef(const std::string& xid, uint32_t index, bool suspended) {
+ // Save the association between DtxBuffers and the session so we
+ // can set the DtxBuffers at the end of the update when the
+ // DtxManager has been replicated.
+ updateIn.dtxBuffers.push_back(
+ UpdateReceiver::DtxBufferRef(xid, index, suspended, &semanticState()));
+}
+
+// Sent at end of work record.
+void Connection::dtxWorkRecord(const std::string& xid, bool prepared, uint32_t timeout)
+{
+ broker::DtxManager& mgr = cluster.getBroker().getDtxManager();
+ if (timeout) mgr.setTimeout(xid, timeout);
+ if (prepared) mgr.prepare(xid);
+}
+
+
void Connection::exchange(const std::string& encoded) {
Buffer buf(const_cast<char*>(encoded.data()), encoded.size());
broker::Exchange::shared_ptr ex = broker::Exchange::decode(cluster.getBroker().getExchanges(), buf);
diff --git a/qpid/cpp/src/qpid/cluster/Connection.h b/qpid/cpp/src/qpid/cluster/Connection.h
index a9740f97f8..fe66b77238 100644
--- a/qpid/cpp/src/qpid/cluster/Connection.h
+++ b/qpid/cpp/src/qpid/cluster/Connection.h
@@ -29,6 +29,7 @@
#include "qpid/RefCounted.h"
#include "qpid/broker/Connection.h"
+#include "qpid/broker/DeliveryRecord.h"
#include "qpid/broker/SecureConnection.h"
#include "qpid/broker/SemanticState.h"
#include "qpid/amqp_0_10/Connection.h"
@@ -123,7 +124,8 @@ class Connection :
const framing::SequenceNumber& expected,
const framing::SequenceNumber& received,
const framing::SequenceSet& unknownCompleted,
- const SequenceSet& receivedIncomplete);
+ const SequenceSet& receivedIncomplete,
+ bool dtxSelected);
void outputTask(uint16_t channel, const std::string& name);
@@ -164,6 +166,17 @@ class Connection :
void txEnd();
void accumulatedAck(const framing::SequenceSet&);
+ // Dtx state
+ void dtxStart(const std::string& xid,
+ bool ended,
+ bool suspended,
+ bool failed,
+ bool expired);
+ void dtxEnd();
+ void dtxAck();
+ void dtxBufferRef(const std::string& xid, uint32_t index, bool suspended);
+ void dtxWorkRecord(const std::string& xid, bool prepared, uint32_t timeout);
+
// Encoded exchange replication.
void exchange(const std::string& encoded);
@@ -251,7 +264,7 @@ class Connection :
broker::SemanticState& semanticState();
broker::QueuedMessage getUpdateMessage();
void closeUpdated();
-
+ void setDtxBuffer(const UpdateReceiver::DtxBuffers::value_type &);
Cluster& cluster;
ConnectionId self;
bool catchUp;
@@ -263,6 +276,9 @@ class Connection :
framing::SequenceNumber deliverSeq;
framing::ChannelId currentChannel;
boost::shared_ptr<broker::TxBuffer> txBuffer;
+ boost::shared_ptr<broker::DtxBuffer> dtxBuffer;
+ broker::DeliveryRecords dtxAckRecords;
+ broker::DtxWorkRecord* dtxCurrent;
bool expectProtocolHeader;
McastFrameHandler mcastFrameHandler;
UpdateReceiver& updateIn;
diff --git a/qpid/cpp/src/qpid/cluster/Multicaster.cpp b/qpid/cpp/src/qpid/cluster/Multicaster.cpp
index 8916de9628..217641841c 100644
--- a/qpid/cpp/src/qpid/cluster/Multicaster.cpp
+++ b/qpid/cpp/src/qpid/cluster/Multicaster.cpp
@@ -21,6 +21,7 @@
#include "qpid/cluster/Multicaster.h"
#include "qpid/cluster/Cpg.h"
+#include "qpid/cluster/Cluster.h"
#include "qpid/log/Statement.h"
#include "qpid/framing/AMQBody.h"
#include "qpid/framing/AMQFrame.h"
@@ -58,7 +59,7 @@ void Multicaster::mcast(const Event& e) {
return;
}
}
- QPID_LOG(trace, "MCAST " << e);
+ QPID_LOG_IF(trace, e.isControl() && Cluster::loggable(e.getFrame()), "MCAST " << e);
if (bypass) { // direct, don't queue
iovec iov = e.toIovec();
while (!cpg.mcast(&iov, 1))
diff --git a/qpid/cpp/src/qpid/cluster/SecureConnectionFactory.cpp b/qpid/cpp/src/qpid/cluster/SecureConnectionFactory.cpp
index 6ddef66226..2672d8360c 100644
--- a/qpid/cpp/src/qpid/cluster/SecureConnectionFactory.cpp
+++ b/qpid/cpp/src/qpid/cluster/SecureConnectionFactory.cpp
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -48,7 +48,7 @@ SecureConnectionFactory::create(ProtocolVersion v, sys::OutputControl& out, cons
if (clusterCodec) {
SecureConnectionPtr sc(new SecureConnection());
clusterCodec->setSecureConnection(sc.get());
- sc->setCodec(codec);
+ sc->setCodec(codec);
return sc.release();
}
return 0;
@@ -63,7 +63,7 @@ SecureConnectionFactory::create(sys::OutputControl& out, const std::string& id,
if (clusterCodec) {
SecureConnectionPtr sc(new SecureConnection());
clusterCodec->setSecureConnection(sc.get());
- sc->setCodec(codec);
+ sc->setCodec(codec);
return sc.release();
}
return 0;
diff --git a/qpid/cpp/src/qpid/cluster/UpdateClient.cpp b/qpid/cpp/src/qpid/cluster/UpdateClient.cpp
index f4784297a7..2446c12f2b 100644
--- a/qpid/cpp/src/qpid/cluster/UpdateClient.cpp
+++ b/qpid/cpp/src/qpid/cluster/UpdateClient.cpp
@@ -45,6 +45,8 @@
#include "qpid/broker/SessionState.h"
#include "qpid/broker/TxOpVisitor.h"
#include "qpid/broker/DtxAck.h"
+#include "qpid/broker/DtxBuffer.h"
+#include "qpid/broker/DtxWorkRecord.h"
#include "qpid/broker/TxAccept.h"
#include "qpid/broker/TxPublish.h"
#include "qpid/broker/RecoveredDequeue.h"
@@ -65,6 +67,7 @@
#include <boost/bind.hpp>
#include <boost/cast.hpp>
#include <algorithm>
+#include <iterator>
#include <sstream>
namespace qpid {
@@ -148,6 +151,7 @@ void UpdateClient::run() {
try {
connection.open(updateeUrl, connectionSettings);
session = connection.newSession(UPDATE);
+ session.sync();
update();
done();
} catch (const std::exception& e) {
@@ -177,9 +181,9 @@ void UpdateClient::update() {
// longer on their original queue.
session.queueDeclare(arg::queue=UPDATE, arg::autoDelete=true);
session.sync();
+
std::for_each(connections.begin(), connections.end(),
boost::bind(&UpdateClient::updateConnection, this, _1));
- session.queueDelete(arg::queue=UPDATE);
// some Queue Observers need session state & msgs synced first, so sync observers now
b.getQueues().eachQueue(boost::bind(&UpdateClient::updateQueueObservers, this, _1));
@@ -189,6 +193,8 @@ void UpdateClient::update() {
updateLinks();
updateManagementAgent();
+ updateDtxManager();
+ session.queueDelete(arg::queue=UPDATE);
session.close();
@@ -318,22 +324,22 @@ class MessageUpdater {
lastPos = message.position;
// if the ttl > 0, we need to send the calculated expiration time to the updatee
- if (message.payload->getProperties<DeliveryProperties>()->getTtl() > 0) {
+ const DeliveryProperties* dprops =
+ message.payload->getProperties<DeliveryProperties>();
+ if (dprops && dprops->getTtl() > 0) {
bool hadMessageProps =
message.payload->hasProperties<framing::MessageProperties>();
- framing::MessageProperties* mprops =
+ const framing::MessageProperties* mprops =
message.payload->getProperties<framing::MessageProperties>();
bool hadApplicationHeaders = mprops->hasApplicationHeaders();
- FieldTable& applicationHeaders = mprops->getApplicationHeaders();
- applicationHeaders.setInt64(
- UpdateClient::X_QPID_EXPIRATION,
- sys::Duration(sys::EPOCH, message.payload->getExpiration()));
+ message.payload->insertCustomProperty(UpdateClient::X_QPID_EXPIRATION,
+ sys::Duration(sys::EPOCH, message.payload->getExpiration()));
// If message properties or application headers didn't exist
// prior to us adding data, we want to remove them on the other side.
if (!hadMessageProps)
- applicationHeaders.setInt(UpdateClient::X_QPID_NO_MESSAGE_PROPS, 0);
+ message.payload->insertCustomProperty(UpdateClient::X_QPID_NO_MESSAGE_PROPS, 0);
else if (!hadApplicationHeaders)
- applicationHeaders.setInt(UpdateClient::X_QPID_NO_HEADERS, 0);
+ message.payload->insertCustomProperty(UpdateClient::X_QPID_NO_HEADERS, 0);
}
// We can't send a broker::Message via the normal client API,
@@ -356,7 +362,8 @@ class MessageUpdater {
for (uint64_t offset = 0; morecontent; offset += maxContentSize)
{
AMQFrame frame((AMQContentBody()));
- morecontent = message.payload->getContentFrame(*(message.queue), frame, maxContentSize, offset);
+ morecontent = message.payload->getContentFrame(
+ *(message.queue), frame, maxContentSize, offset);
sb.get()->sendRawFrame(frame);
}
}
@@ -402,7 +409,11 @@ void UpdateClient::updateNonExclusiveQueue(const boost::shared_ptr<broker::Queue
}
void UpdateClient::updateBinding(client::AsyncSession& s, const std::string& queue, const QueueBinding& binding) {
- s.exchangeBind(queue, binding.exchange, binding.key, binding.args);
+ if (binding.exchange.size())
+ s.exchangeBind(queue, binding.exchange, binding.key, binding.args);
+ //else its the default exchange and there is no need to replicate
+ //the binding, the creation of the queue will have done so
+ //automatically
}
void UpdateClient::updateOutputTask(const sys::OutputTask* task) {
@@ -475,9 +486,9 @@ void UpdateClient::updateSession(broker::SessionHandler& sh) {
QPID_LOG(debug, *this << " updating unacknowledged messages.");
broker::DeliveryRecords& drs = ss->getSemanticState().getUnacked();
std::for_each(drs.begin(), drs.end(),
- boost::bind(&UpdateClient::updateUnacked, this, _1));
+ boost::bind(&UpdateClient::updateUnacked, this, _1, shadowSession));
- updateTxState(ss->getSemanticState()); // Tx transaction state.
+ updateTransactionState(ss->getSemanticState());
// Adjust command counter for message in progress, will be sent after state update.
boost::intrusive_ptr<Message> inProgress = ss->getMessageInProgress();
@@ -496,7 +507,8 @@ void UpdateClient::updateSession(broker::SessionHandler& sh) {
std::max(received, ss->receiverGetExpected().command),
received,
ss->receiverGetUnknownComplete(),
- ss->receiverGetIncomplete()
+ ss->receiverGetIncomplete(),
+ ss->getSemanticState().getDtxSelected()
);
// Send frames for partial message in progress.
@@ -538,14 +550,17 @@ void UpdateClient::updateConsumer(
<< " on " << shadowSession.getId());
}
-void UpdateClient::updateUnacked(const broker::DeliveryRecord& dr) {
- if (!dr.isEnded() && dr.isAcquired() && dr.getMessage().payload) {
+void UpdateClient::updateUnacked(const broker::DeliveryRecord& dr,
+ client::AsyncSession& updateSession)
+{
+ if (!dr.isEnded() && dr.isAcquired()) {
+ assert(dr.getMessage().payload);
// If the message is acquired then it is no longer on the
// updatees queue, put it on the update queue for updatee to pick up.
//
- MessageUpdater(UPDATE, shadowSession, expiry).updateQueuedMessage(dr.getMessage());
+ MessageUpdater(UPDATE, updateSession, expiry).updateQueuedMessage(dr.getMessage());
}
- ClusterConnectionProxy(shadowSession).deliveryRecord(
+ ClusterConnectionProxy(updateSession).deliveryRecord(
dr.getQueue()->getName(),
dr.getMessage().position,
dr.getTag(),
@@ -566,8 +581,10 @@ class TxOpUpdater : public broker::TxOpConstVisitor, public MessageUpdater {
TxOpUpdater(UpdateClient& dc, client::AsyncSession s, ExpiryPolicy& expiry)
: MessageUpdater(UpdateClient::UPDATE, s, expiry), parent(dc), session(s), proxy(s) {}
- void operator()(const broker::DtxAck& ) {
- throw InternalErrorException("DTX transactions not currently supported by cluster.");
+ void operator()(const broker::DtxAck& ack) {
+ std::for_each(ack.getPending().begin(), ack.getPending().end(),
+ boost::bind(&UpdateClient::updateUnacked, &parent, _1, session));
+ proxy.dtxAck();
}
void operator()(const broker::RecoveredDequeue& rdeq) {
@@ -584,13 +601,18 @@ class TxOpUpdater : public broker::TxOpConstVisitor, public MessageUpdater {
proxy.txAccept(txAccept.getAcked());
}
+ typedef std::list<Queue::shared_ptr> QueueList;
+
+ void copy(const QueueList& l, Array& a) {
+ for (QueueList::const_iterator i = l.begin(); i!=l.end(); ++i)
+ a.push_back(Array::ValuePtr(new Str8Value((*i)->getName())));
+ }
+
void operator()(const broker::TxPublish& txPub) {
updateMessage(txPub.getMessage());
- typedef std::list<Queue::shared_ptr> QueueList;
- const QueueList& qlist = txPub.getQueues();
+ assert(txPub.getQueues().empty() || txPub.getPrepared().empty());
Array qarray(TYPE_CODE_STR8);
- for (QueueList::const_iterator i = qlist.begin(); i != qlist.end(); ++i)
- qarray.push_back(Array::ValuePtr(new Str8Value((*i)->getName())));
+ copy(txPub.getQueues().empty() ? txPub.getPrepared() : txPub.getQueues(), qarray);
proxy.txPublish(qarray, txPub.delivered);
}
@@ -600,17 +622,43 @@ class TxOpUpdater : public broker::TxOpConstVisitor, public MessageUpdater {
ClusterConnectionProxy proxy;
};
-void UpdateClient::updateTxState(broker::SemanticState& s) {
- QPID_LOG(debug, *this << " updating TX transaction state.");
+void UpdateClient::updateBufferRef(const broker::DtxBuffer::shared_ptr& dtx,bool suspended)
+{
+ ClusterConnectionProxy proxy(shadowSession);
+ broker::DtxWorkRecord* record =
+ updaterBroker.getDtxManager().getWork(dtx->getXid());
+ proxy.dtxBufferRef(dtx->getXid(), record->indexOf(dtx), suspended);
+
+}
+
+void UpdateClient::updateTransactionState(broker::SemanticState& s) {
ClusterConnectionProxy proxy(shadowSession);
proxy.accumulatedAck(s.getAccumulatedAck());
- broker::TxBuffer::shared_ptr txBuffer = s.getTxBuffer();
- if (txBuffer) {
+ broker::TxBuffer::shared_ptr tx = s.getTxBuffer();
+ broker::DtxBuffer::shared_ptr dtx = s.getDtxBuffer();
+ if (dtx) {
+ updateBufferRef(dtx, false); // Current transaction.
+ } else if (tx) {
proxy.txStart();
TxOpUpdater updater(*this, shadowSession, expiry);
- txBuffer->accept(updater);
+ tx->accept(updater);
proxy.txEnd();
}
+ for (SemanticState::DtxBufferMap::iterator i = s.getSuspendedXids().begin();
+ i != s.getSuspendedXids().end();
+ ++i)
+ {
+ updateBufferRef(i->second, true);
+ }
+}
+
+void UpdateClient::updateDtxBuffer(const broker::DtxBuffer::shared_ptr& dtx) {
+ ClusterConnectionProxy proxy(session);
+ proxy.dtxStart(
+ dtx->getXid(), dtx->isEnded(), dtx->isSuspended(), dtx->isFailed(), dtx->isExpired());
+ TxOpUpdater updater(*this, session, expiry);
+ dtx->accept(updater);
+ proxy.dtxEnd();
}
void UpdateClient::updateQueueListeners(const boost::shared_ptr<broker::Queue>& queue) {
@@ -663,5 +711,17 @@ void UpdateClient::updateObserver(const boost::shared_ptr<broker::Queue>& q,
}
}
+void UpdateClient::updateDtxManager() {
+ broker::DtxManager& dtm = updaterBroker.getDtxManager();
+ dtm.each(boost::bind(&UpdateClient::updateDtxWorkRecord, this, _1));
+}
+
+void UpdateClient::updateDtxWorkRecord(const broker::DtxWorkRecord& r) {
+ QPID_LOG(debug, *this << " updating DTX transaction: " << r.getXid());
+ for (size_t i = 0; i < r.size(); ++i)
+ updateDtxBuffer(r[i]);
+ ClusterConnectionProxy(session).dtxWorkRecord(
+ r.getXid(), r.isPrepared(), r.getTimeout());
+}
}} // namespace qpid::cluster
diff --git a/qpid/cpp/src/qpid/cluster/UpdateClient.h b/qpid/cpp/src/qpid/cluster/UpdateClient.h
index 21bf6024e0..481ee357c7 100644
--- a/qpid/cpp/src/qpid/cluster/UpdateClient.h
+++ b/qpid/cpp/src/qpid/cluster/UpdateClient.h
@@ -52,7 +52,7 @@ class Decoder;
class Link;
class Bridge;
class QueueObserver;
-
+class DtxBuffer;
} // namespace broker
namespace cluster {
@@ -88,7 +88,7 @@ class UpdateClient : public sys::Runnable {
void update();
void run(); // Will delete this when finished.
- void updateUnacked(const broker::DeliveryRecord&);
+ void updateUnacked(const broker::DeliveryRecord&, client::AsyncSession&);
private:
void updateQueue(client::AsyncSession&, const boost::shared_ptr<broker::Queue>&);
@@ -100,7 +100,8 @@ class UpdateClient : public sys::Runnable {
void updateBinding(client::AsyncSession&, const std::string& queue, const broker::QueueBinding& binding);
void updateConnection(const boost::intrusive_ptr<Connection>& connection);
void updateSession(broker::SessionHandler& s);
- void updateTxState(broker::SemanticState& s);
+ void updateBufferRef(const broker::DtxBuffer::shared_ptr& dtx, bool suspended);
+ void updateTransactionState(broker::SemanticState& s);
void updateOutputTask(const sys::OutputTask* task);
void updateConsumer(const broker::SemanticState::ConsumerImpl::shared_ptr&);
void updateQueueListeners(const boost::shared_ptr<broker::Queue>&);
@@ -112,6 +113,9 @@ class UpdateClient : public sys::Runnable {
void updateBridge(const boost::shared_ptr<broker::Bridge>&);
void updateQueueObservers(const boost::shared_ptr<broker::Queue>&);
void updateObserver(const boost::shared_ptr<broker::Queue>&, boost::shared_ptr<broker::QueueObserver>);
+ void updateDtxManager();
+ void updateDtxBuffer(const boost::shared_ptr<broker::DtxBuffer>& );
+ void updateDtxWorkRecord(const broker::DtxWorkRecord&);
Numbering<broker::SemanticState::ConsumerImpl*> consumerNumbering;
diff --git a/qpid/cpp/src/qpid/cluster/UpdateExchange.cpp b/qpid/cpp/src/qpid/cluster/UpdateExchange.cpp
index e830459aba..cb1376004e 100644
--- a/qpid/cpp/src/qpid/cluster/UpdateExchange.cpp
+++ b/qpid/cpp/src/qpid/cluster/UpdateExchange.cpp
@@ -49,18 +49,18 @@ void UpdateExchange::setProperties(const boost::intrusive_ptr<broker::Message>&
// Copy expiration from x-property if present.
if (msg->hasProperties<MessageProperties>()) {
- MessageProperties* mprops = msg->getProperties<MessageProperties>();
+ const MessageProperties* mprops = msg->getProperties<MessageProperties>();
if (mprops->hasApplicationHeaders()) {
- FieldTable& headers = mprops->getApplicationHeaders();
+ const FieldTable& headers = mprops->getApplicationHeaders();
if (headers.isSet(UpdateClient::X_QPID_EXPIRATION)) {
msg->setExpiration(
sys::AbsTime(sys::EPOCH, headers.getAsInt64(UpdateClient::X_QPID_EXPIRATION)));
- headers.erase(UpdateClient::X_QPID_EXPIRATION);
+ msg->removeCustomProperty(UpdateClient::X_QPID_EXPIRATION);
// Erase props/headers that were added by the UpdateClient
if (headers.isSet(UpdateClient::X_QPID_NO_MESSAGE_PROPS))
msg->eraseProperties<MessageProperties>();
else if (headers.isSet(UpdateClient::X_QPID_NO_HEADERS))
- mprops->clearApplicationHeadersFlag();
+ msg->clearApplicationHeadersFlag();
}
}
}
diff --git a/qpid/cpp/src/qpid/cluster/UpdateReceiver.h b/qpid/cpp/src/qpid/cluster/UpdateReceiver.h
index 7e8ce47662..81ee3a5ffe 100644
--- a/qpid/cpp/src/qpid/cluster/UpdateReceiver.h
+++ b/qpid/cpp/src/qpid/cluster/UpdateReceiver.h
@@ -39,6 +39,20 @@ class UpdateReceiver {
/** Management-id for the next shadow connection */
std::string nextShadowMgmtId;
+
+ /** Record the position of a DtxBuffer in the DtxManager (xid + index)
+ * and the association with a session, either suspended or current.
+ */
+ struct DtxBufferRef {
+ std::string xid;
+ uint32_t index; // Index in WorkRecord in DtxManager
+ bool suspended; // Is this a suspended or current transaction?
+ broker::SemanticState* semanticState; // Associated session
+ DtxBufferRef(const std::string& x, uint32_t i, bool s, broker::SemanticState* ss)
+ : xid(x), index(i), suspended(s), semanticState(ss) {}
+ };
+ typedef std::vector<DtxBufferRef> DtxBuffers;
+ DtxBuffers dtxBuffers;
};
}} // namespace qpid::cluster
diff --git a/qpid/cpp/src/qpid/framing/AMQFrame.cpp b/qpid/cpp/src/qpid/framing/AMQFrame.cpp
index cd60cd971f..5b9673f0d0 100644
--- a/qpid/cpp/src/qpid/framing/AMQFrame.cpp
+++ b/qpid/cpp/src/qpid/framing/AMQFrame.cpp
@@ -139,6 +139,11 @@ bool AMQFrame::decode(Buffer& buffer)
return true;
}
+void AMQFrame::cloneBody()
+{
+ body = body->clone();
+}
+
std::ostream& operator<<(std::ostream& out, const AMQFrame& f)
{
return
diff --git a/qpid/cpp/src/qpid/framing/AMQFrame.h b/qpid/cpp/src/qpid/framing/AMQFrame.h
index c669d12bc0..4f6faf4199 100644
--- a/qpid/cpp/src/qpid/framing/AMQFrame.h
+++ b/qpid/cpp/src/qpid/framing/AMQFrame.h
@@ -59,6 +59,11 @@ class QPID_COMMON_CLASS_EXTERN AMQFrame : public AMQDataBlock
return boost::polymorphic_downcast<const T*>(getBody());
}
+ /**
+ * Take a deep copy of the body currently referenced
+ */
+ QPID_COMMON_EXTERN void cloneBody();
+
QPID_COMMON_EXTERN void encode(Buffer& buffer) const;
QPID_COMMON_EXTERN bool decode(Buffer& buffer);
QPID_COMMON_EXTERN uint32_t encodedSize() const;
diff --git a/qpid/cpp/src/qpid/framing/FieldTable.cpp b/qpid/cpp/src/qpid/framing/FieldTable.cpp
index 21eaea0f4d..f80d2f9fb1 100644
--- a/qpid/cpp/src/qpid/framing/FieldTable.cpp
+++ b/qpid/cpp/src/qpid/framing/FieldTable.cpp
@@ -198,10 +198,12 @@ void FieldTable::encode(Buffer& buffer) const {
void FieldTable::decode(Buffer& buffer){
clear();
+ if (buffer.available() < 4)
+ throw IllegalArgumentException(QPID_MSG("Not enough data for field table."));
uint32_t len = buffer.getLong();
if (len) {
uint32_t available = buffer.available();
- if (available < len)
+ if ((available < len) || (available < 4))
throw IllegalArgumentException(QPID_MSG("Not enough data for field table."));
uint32_t count = buffer.getLong();
uint32_t leftover = available - len;
diff --git a/qpid/cpp/src/qpid/framing/List.cpp b/qpid/cpp/src/qpid/framing/List.cpp
index 963ebc206b..d7ea172bac 100644
--- a/qpid/cpp/src/qpid/framing/List.cpp
+++ b/qpid/cpp/src/qpid/framing/List.cpp
@@ -49,6 +49,9 @@ void List::encode(Buffer& buffer) const
void List::decode(Buffer& buffer)
{
values.clear();
+ if (buffer.available() < 4)
+ throw IllegalArgumentException(QPID_MSG("Not enough data for list, expected at least "
+ " 4 bytes but only " << buffer.available() << " available"));
uint32_t size = buffer.getLong();
uint32_t available = buffer.available();
if (available < size) {
@@ -56,6 +59,9 @@ void List::decode(Buffer& buffer)
<< size << " bytes but only " << available << " available"));
}
if (size) {
+ if (buffer.available() < 4)
+ throw IllegalArgumentException(QPID_MSG("Not enough data for list, expected at least "
+ " 4 bytes but only " << buffer.available() << " available"));
uint32_t count = buffer.getLong();
for (uint32_t i = 0; i < count; i++) {
ValuePtr value(new FieldValue);
diff --git a/qpid/cpp/src/qpid/log/Statement.cpp b/qpid/cpp/src/qpid/log/Statement.cpp
index 6a32b50096..7dfdf08703 100644
--- a/qpid/cpp/src/qpid/log/Statement.cpp
+++ b/qpid/cpp/src/qpid/log/Statement.cpp
@@ -27,8 +27,6 @@ namespace qpid {
namespace log {
namespace {
-using namespace std;
-
struct NonPrint { bool operator()(unsigned char c) { return !isprint(c) && !isspace(c); } };
const char hex[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
@@ -39,7 +37,7 @@ std::string quote(const std::string& str) {
if (n==0) return str;
std::string ret;
ret.reserve(str.size()+2*n); // Avoid extra allocations.
- for (string::const_iterator i = str.begin(); i != str.end(); ++i) {
+ for (std::string::const_iterator i = str.begin(); i != str.end(); ++i) {
if (nonPrint(*i)) {
ret.push_back('\\');
ret.push_back('x');
@@ -50,7 +48,6 @@ std::string quote(const std::string& str) {
}
return ret;
}
-
}
void Statement::log(const std::string& message) {
diff --git a/qpid/cpp/src/qpid/log/posix/SinkOptions.cpp b/qpid/cpp/src/qpid/log/posix/SinkOptions.cpp
index 292e9147f6..ffa7633e3b 100644
--- a/qpid/cpp/src/qpid/log/posix/SinkOptions.cpp
+++ b/qpid/cpp/src/qpid/log/posix/SinkOptions.cpp
@@ -180,7 +180,7 @@ qpid::log::SinkOptions& SinkOptions::operator=(const qpid::log::SinkOptions& rhs
}
void SinkOptions::detached(void) {
- if (logToStderr && !logToStdout && !logToSyslog) {
+ if (logToStderr && !logToStdout && !logToSyslog && logFile.empty()) {
logToStderr = false;
logToSyslog = true;
}
diff --git a/qpid/cpp/src/qpid/management/ManagementAgent.cpp b/qpid/cpp/src/qpid/management/ManagementAgent.cpp
index 923005b9fc..50fdc82ee0 100644
--- a/qpid/cpp/src/qpid/management/ManagementAgent.cpp
+++ b/qpid/cpp/src/qpid/management/ManagementAgent.cpp
@@ -614,7 +614,7 @@ void ManagementAgent::sendBufferLH(const string& data,
props->setAppId("qmf2");
for (i = headers.begin(); i != headers.end(); ++i) {
- msg->getOrInsertHeaders().setString(i->first, i->second.asString());
+ msg->insertCustomProperty(i->first, i->second.asString());
}
DeliveryProperties* dp =
diff --git a/qpid/cpp/src/qpid/messaging/AddressParser.cpp b/qpid/cpp/src/qpid/messaging/AddressParser.cpp
index 83aca82be4..d76210ee5d 100644
--- a/qpid/cpp/src/qpid/messaging/AddressParser.cpp
+++ b/qpid/cpp/src/qpid/messaging/AddressParser.cpp
@@ -201,7 +201,8 @@ bool AddressParser::readSimpleValue(Variant& value)
{
std::string s;
if (readWord(s)) {
- value.parse(s);
+ value.parse(s);
+ if (value.getType() == VAR_STRING) value.setEncoding("utf8");
return true;
} else {
return false;
diff --git a/qpid/cpp/src/qpid/messaging/Message.cpp b/qpid/cpp/src/qpid/messaging/Message.cpp
index 83cdfd3c55..ef70c103e9 100644
--- a/qpid/cpp/src/qpid/messaging/Message.cpp
+++ b/qpid/cpp/src/qpid/messaging/Message.cpp
@@ -21,6 +21,7 @@
#include "qpid/messaging/Message.h"
#include "qpid/messaging/MessageImpl.h"
#include "qpid/amqp_0_10/Codecs.h"
+#include <qpid/Exception.h>
#include <boost/format.hpp>
namespace qpid {
@@ -115,7 +116,11 @@ template <class C> struct MessageCodec
static void decode(const Message& message, typename C::ObjectType& object, const std::string& encoding)
{
checkEncoding(message, encoding);
- C::decode(message.getContent(), object);
+ try {
+ C::decode(message.getContent(), object);
+ } catch (const qpid::Exception &ex) {
+ throw EncodingException(ex.what());
+ }
}
static void encode(const typename C::ObjectType& map, Message& message, const std::string& encoding)
diff --git a/qpid/cpp/src/qpid/replication/ReplicatingEventListener.cpp b/qpid/cpp/src/qpid/replication/ReplicatingEventListener.cpp
index b7d52372f4..0ced4d9161 100644
--- a/qpid/cpp/src/qpid/replication/ReplicatingEventListener.cpp
+++ b/qpid/cpp/src/qpid/replication/ReplicatingEventListener.cpp
@@ -69,10 +69,9 @@ void ReplicatingEventListener::deliverDequeueMessage(const QueuedMessage& dequeu
void ReplicatingEventListener::deliverEnqueueMessage(const QueuedMessage& enqueued)
{
boost::intrusive_ptr<Message> msg(cloneMessage(*(enqueued.queue), enqueued.payload));
- FieldTable& headers = msg->getProperties<MessageProperties>()->getApplicationHeaders();
- headers.setString(REPLICATION_TARGET_QUEUE, enqueued.queue->getName());
- headers.setInt(REPLICATION_EVENT_TYPE, ENQUEUE);
- headers.setInt(QUEUE_MESSAGE_POSITION,enqueued.position);
+ msg->insertCustomProperty(REPLICATION_TARGET_QUEUE, enqueued.queue->getName());
+ msg->insertCustomProperty(REPLICATION_EVENT_TYPE, ENQUEUE);
+ msg->insertCustomProperty(QUEUE_MESSAGE_POSITION,enqueued.position);
route(msg);
}
diff --git a/qpid/cpp/src/qpid/replication/ReplicationExchange.cpp b/qpid/cpp/src/qpid/replication/ReplicationExchange.cpp
index 4b6d25ac7d..89a2bf516d 100644
--- a/qpid/cpp/src/qpid/replication/ReplicationExchange.cpp
+++ b/qpid/cpp/src/qpid/replication/ReplicationExchange.cpp
@@ -97,11 +97,10 @@ void ReplicationExchange::handleEnqueueEvent(const FieldTable* args, Deliverable
} else {
queue->setPosition(seqno1);
- FieldTable& headers = msg.getMessage().getProperties<MessageProperties>()->getApplicationHeaders();
- headers.erase(REPLICATION_TARGET_QUEUE);
- headers.erase(REPLICATION_EVENT_SEQNO);
- headers.erase(REPLICATION_EVENT_TYPE);
- headers.erase(QUEUE_MESSAGE_POSITION);
+ msg.getMessage().removeCustomProperty(REPLICATION_TARGET_QUEUE);
+ msg.getMessage().removeCustomProperty(REPLICATION_EVENT_SEQNO);
+ msg.getMessage().removeCustomProperty(REPLICATION_EVENT_TYPE);
+ msg.getMessage().removeCustomProperty(QUEUE_MESSAGE_POSITION);
msg.deliverTo(queue);
QPID_LOG(debug, "Enqueued replicated message onto " << queueName);
if (mgmtExchange != 0) {
diff --git a/qpid/cpp/src/qpid/store/StorageProvider.h b/qpid/cpp/src/qpid/store/StorageProvider.h
index bc8d187517..d162cc58ec 100644
--- a/qpid/cpp/src/qpid/store/StorageProvider.h
+++ b/qpid/cpp/src/qpid/store/StorageProvider.h
@@ -54,7 +54,7 @@ struct QueueEntry {
QueueEntry(uint64_t id, TplStatus tpl = NONE, const std::string& x = "")
: queueId(id), tplStatus(tpl), xid(x) {}
- bool operator==(const QueueEntry& rhs) {
+ bool operator==(const QueueEntry& rhs) const {
if (queueId != rhs.queueId) return false;
if (tplStatus == NONE && rhs.tplStatus == NONE) return true;
return xid == rhs.xid;
diff --git a/qpid/cpp/src/qpid/sys/CopyOnWriteArray.h b/qpid/cpp/src/qpid/sys/CopyOnWriteArray.h
index 45a231dfd8..41384fc5a4 100644
--- a/qpid/cpp/src/qpid/sys/CopyOnWriteArray.h
+++ b/qpid/cpp/src/qpid/sys/CopyOnWriteArray.h
@@ -43,6 +43,12 @@ public:
CopyOnWriteArray() {}
CopyOnWriteArray(const CopyOnWriteArray& c) : array(c.array) {}
+ bool empty()
+ {
+ Mutex::ScopedLock l(lock);
+ return array ? array->empty() : true;
+ }
+
void add(T& t)
{
Mutex::ScopedLock l(lock);
diff --git a/qpid/cpp/src/qpid/sys/PollableQueue.h b/qpid/cpp/src/qpid/sys/PollableQueue.h
index 81c2301c1e..03b9d0084d 100644
--- a/qpid/cpp/src/qpid/sys/PollableQueue.h
+++ b/qpid/cpp/src/qpid/sys/PollableQueue.h
@@ -10,9 +10,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -28,7 +28,8 @@
#include <boost/function.hpp>
#include <boost/bind.hpp>
#include <algorithm>
-#include <vector>
+#include <deque>
+#include "qpid/log/Statement.h" // FIXME aconway 2011-08-05:
namespace qpid {
namespace sys {
@@ -44,7 +45,7 @@ class Poller;
template <class T>
class PollableQueue {
public:
- typedef std::vector<T> Batch;
+ typedef std::deque<T> Batch;
typedef T value_type;
/**
@@ -68,11 +69,11 @@ class PollableQueue {
const boost::shared_ptr<sys::Poller>& poller);
~PollableQueue();
-
+
/** Push a value onto the queue. Thread safe */
void push(const T& t);
- /** Start polling. */
+ /** Start polling. */
void start();
/** Stop polling and wait for the current callback, if any, to complete. */
@@ -90,14 +91,14 @@ class PollableQueue {
* ensure clean shutdown with no events left on the queue.
*/
void shutdown();
-
+
private:
typedef sys::Monitor::ScopedLock ScopedLock;
typedef sys::Monitor::ScopedUnlock ScopedUnlock;
void dispatch(PollableCondition& cond);
void process();
-
+
mutable sys::Monitor lock;
Callback callback;
PollableCondition condition;
@@ -107,7 +108,7 @@ class PollableQueue {
};
template <class T> PollableQueue<T>::PollableQueue(
- const Callback& cb, const boost::shared_ptr<sys::Poller>& p)
+ const Callback& cb, const boost::shared_ptr<sys::Poller>& p)
: callback(cb),
condition(boost::bind(&PollableQueue<T>::dispatch, this, _1), p),
stopped(true)
@@ -151,7 +152,7 @@ template <class T> void PollableQueue<T>::process() {
putBack = callback(batch);
}
// put back unprocessed items.
- queue.insert(queue.begin(), putBack, typename Batch::const_iterator(batch.end()));
+ queue.insert(queue.begin(), putBack, typename Batch::const_iterator(batch.end()));
batch.clear();
}
}
diff --git a/qpid/cpp/src/qpid/sys/Socket.h b/qpid/cpp/src/qpid/sys/Socket.h
index 9f62f3be1c..25f1c5fb9d 100644
--- a/qpid/cpp/src/qpid/sys/Socket.h
+++ b/qpid/cpp/src/qpid/sys/Socket.h
@@ -39,6 +39,9 @@ public:
/** Create a socket wrapper for descriptor. */
QPID_COMMON_EXTERN Socket();
+ /** Create a new Socket which is the same address family as this one */
+ QPID_COMMON_EXTERN Socket* createSameTypeSocket() const;
+
/** Set socket non blocking */
void setNonblocking() const;
@@ -77,7 +80,7 @@ public:
* Returns the error code stored in the socket. This may be used
* to determine the result of a non-blocking connect.
*/
- int getError() const;
+ QPID_COMMON_EXTERN int getError() const;
/** Accept a connection from a socket that is already listening
* and has an incoming connection
@@ -92,7 +95,9 @@ private:
/** Create socket */
void createSocket(const SocketAddress&) const;
+ /** Construct socket with existing handle */
Socket(IOHandlePrivate*);
+
mutable std::string localname;
mutable std::string peername;
mutable bool nonblocking;
diff --git a/qpid/cpp/src/qpid/sys/SocketAddress.h b/qpid/cpp/src/qpid/sys/SocketAddress.h
index c2120338cf..dcca109d94 100644
--- a/qpid/cpp/src/qpid/sys/SocketAddress.h
+++ b/qpid/cpp/src/qpid/sys/SocketAddress.h
@@ -27,6 +27,7 @@
#include <string>
struct addrinfo;
+struct sockaddr;
namespace qpid {
namespace sys {
@@ -41,12 +42,19 @@ public:
QPID_COMMON_EXTERN SocketAddress& operator=(const SocketAddress&);
QPID_COMMON_EXTERN ~SocketAddress();
- std::string asString(bool numeric=true) const;
+ QPID_COMMON_EXTERN bool nextAddress();
+ QPID_COMMON_EXTERN std::string asString(bool numeric=true) const;
+ QPID_COMMON_EXTERN void setAddrInfoPort(uint16_t port);
+
+ QPID_COMMON_EXTERN static std::string asString(::sockaddr const * const addr, size_t addrlen);
+ QPID_COMMON_EXTERN static uint16_t getPort(::sockaddr const * const addr);
+
private:
std::string host;
std::string port;
mutable ::addrinfo* addrInfo;
+ mutable ::addrinfo* currentAddrInfo;
};
}}
diff --git a/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp b/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp
index 34338ce434..85d8c1db87 100644
--- a/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp
+++ b/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp
@@ -25,21 +25,22 @@
#include "qpid/Plugin.h"
#include "qpid/sys/Socket.h"
+#include "qpid/sys/SocketAddress.h"
#include "qpid/sys/Poller.h"
#include "qpid/broker/Broker.h"
#include "qpid/log/Statement.h"
#include <boost/bind.hpp>
-#include <memory>
+#include <boost/ptr_container/ptr_vector.hpp>
namespace qpid {
namespace sys {
class AsynchIOProtocolFactory : public ProtocolFactory {
const bool tcpNoDelay;
- Socket listener;
- const uint16_t listeningPort;
- std::auto_ptr<AsynchAcceptor> acceptor;
+ boost::ptr_vector<Socket> listeners;
+ boost::ptr_vector<AsynchAcceptor> acceptors;
+ uint16_t listeningPort;
public:
AsynchIOProtocolFactory(const std::string& host, const std::string& port, int backlog, bool nodelay);
@@ -71,15 +72,38 @@ static class TCPIOPlugin : public Plugin {
"", boost::lexical_cast<std::string>(opts.port),
opts.connectionBacklog,
opts.tcpNoDelay));
- QPID_LOG(notice, "Listening on TCP port " << protocolt->getPort());
+ QPID_LOG(notice, "Listening on TCP/TCP6 port " << protocolt->getPort());
broker->registerProtocolFactory("tcp", protocolt);
}
}
} tcpPlugin;
AsynchIOProtocolFactory::AsynchIOProtocolFactory(const std::string& host, const std::string& port, int backlog, bool nodelay) :
- tcpNoDelay(nodelay), listeningPort(listener.listen(host, port, backlog))
-{}
+ tcpNoDelay(nodelay)
+{
+ SocketAddress sa(host, port);
+
+ // We must have at least one resolved address
+ QPID_LOG(info, "Listening to: " << sa.asString())
+ Socket* s = new Socket;
+ uint16_t lport = s->listen(sa, backlog);
+ QPID_LOG(debug, "Listened to: " << lport);
+ listeners.push_back(s);
+
+ listeningPort = lport;
+
+ // Try any other resolved addresses
+ while (sa.nextAddress()) {
+ // Hack to ensure that all listening connections are on the same port
+ sa.setAddrInfoPort(listeningPort);
+ QPID_LOG(info, "Listening to: " << sa.asString())
+ Socket* s = new Socket;
+ uint16_t lport = s->listen(sa, backlog);
+ QPID_LOG(debug, "Listened to: " << lport);
+ listeners.push_back(s);
+ }
+
+}
void AsynchIOProtocolFactory::established(Poller::shared_ptr poller, const Socket& s,
ConnectionCodec::Factory* f, bool isClient) {
@@ -111,10 +135,12 @@ uint16_t AsynchIOProtocolFactory::getPort() const {
void AsynchIOProtocolFactory::accept(Poller::shared_ptr poller,
ConnectionCodec::Factory* fact) {
- acceptor.reset(
- AsynchAcceptor::create(listener,
- boost::bind(&AsynchIOProtocolFactory::established, this, poller, _1, fact, false)));
- acceptor->start(poller);
+ for (unsigned i = 0; i<listeners.size(); ++i) {
+ acceptors.push_back(
+ AsynchAcceptor::create(listeners[i],
+ boost::bind(&AsynchIOProtocolFactory::established, this, poller, _1, fact, false)));
+ acceptors[i].start(poller);
+ }
}
void AsynchIOProtocolFactory::connectFailed(
@@ -138,6 +164,7 @@ void AsynchIOProtocolFactory::connect(
// shutdown. The allocated AsynchConnector frees itself when it
// is no longer needed.
Socket* socket = new Socket();
+ try {
AsynchConnector* c = AsynchConnector::create(
*socket,
host,
@@ -147,6 +174,12 @@ void AsynchIOProtocolFactory::connect(
boost::bind(&AsynchIOProtocolFactory::connectFailed,
this, _1, _2, _3, failed));
c->start(poller);
+ } catch (std::exception&) {
+ // TODO: Design question - should we do the error callback and also throw?
+ int errCode = socket->getError();
+ connectFailed(*socket, errCode, strError(errCode), failed);
+ throw;
+ }
}
}} // namespace qpid::sys
diff --git a/qpid/cpp/src/qpid/sys/TimerWarnings.cpp b/qpid/cpp/src/qpid/sys/TimerWarnings.cpp
index 87c3169456..85e26da54a 100644
--- a/qpid/cpp/src/qpid/sys/TimerWarnings.cpp
+++ b/qpid/cpp/src/qpid/sys/TimerWarnings.cpp
@@ -56,18 +56,18 @@ void TimerWarnings::log() {
std::string task = i->first;
TaskStats& stats = i->second;
if (stats.lateDelay.count)
- QPID_LOG(warning, task << " task late "
+ QPID_LOG(info, task << " task late "
<< stats.lateDelay.count << " times by "
<< stats.lateDelay.average()/TIME_MSEC << "ms on average.");
if (stats.overranOverrun.count)
- QPID_LOG(warning, task << " task overran "
+ QPID_LOG(info, task << " task overran "
<< stats.overranOverrun.count << " times by "
<< stats.overranOverrun.average()/TIME_MSEC << "ms (taking "
<< stats.overranTime.average() << "ns) on average.");
if (stats.lateAndOverranOverrun.count)
- QPID_LOG(warning, task << " task late and overran "
+ QPID_LOG(info, task << " task late and overran "
<< stats.lateAndOverranOverrun.count << " times: late "
<< stats.lateAndOverranDelay.average()/TIME_MSEC << "ms, overran "
<< stats.lateAndOverranOverrun.average()/TIME_MSEC << "ms (taking "
diff --git a/qpid/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp b/qpid/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp
index 3d868da64b..249b769051 100644
--- a/qpid/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp
+++ b/qpid/cpp/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp
@@ -57,6 +57,7 @@ size_t CyrusSecurityLayer::decode(const char* input, size_t size)
copied += count;
decodeBuffer.position += count;
size_t decodedSize = codec->decode(decodeBuffer.data, decodeBuffer.position);
+ if (decodedSize == 0) break;
if (decodedSize < decodeBuffer.position) {
::memmove(decodeBuffer.data, decodeBuffer.data + decodedSize, decodeBuffer.position - decodedSize);
}
diff --git a/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp b/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp
index 9ad05c71a3..dcc9d9181c 100644
--- a/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp
+++ b/qpid/cpp/src/qpid/sys/epoll/EpollPoller.cpp
@@ -384,7 +384,12 @@ void PollerPrivate::resetMode(PollerHandlePrivate& eh) {
epe.data.u64 = 0; // Keep valgrind happy
epe.data.ptr = &eh;
- QPID_POSIX_CHECK(::epoll_ctl(epollFd, EPOLL_CTL_MOD, eh.fd(), &epe));
+ int rc = ::epoll_ctl(epollFd, EPOLL_CTL_MOD, eh.fd(), &epe);
+ // If something has closed the fd in the meantime try adding it back
+ if (rc ==-1 && errno == ENOENT) {
+ rc = ::epoll_ctl(epollFd, EPOLL_CTL_ADD, eh.fd(), &epe);
+ }
+ QPID_POSIX_CHECK(rc);
eh.setActive();
return;
diff --git a/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp b/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp
index b5a0b0bf32..dab8bd09c6 100644
--- a/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp
+++ b/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp
@@ -149,6 +149,7 @@ private:
ConnectedCallback connCallback;
FailedCallback failCallback;
const Socket& socket;
+ SocketAddress sa;
public:
AsynchConnector(const Socket& socket,
@@ -171,11 +172,13 @@ AsynchConnector::AsynchConnector(const Socket& s,
boost::bind(&AsynchConnector::connComplete, this, _1)),
connCallback(connCb),
failCallback(failCb),
- socket(s)
+ socket(s),
+ sa(hostname, port)
{
socket.setNonblocking();
- SocketAddress sa(hostname, port);
+
// Note, not catching any exceptions here, also has effect of destructing
+ QPID_LOG(info, "Connecting: " << sa.asString());
socket.connect(sa);
}
@@ -191,11 +194,26 @@ void AsynchConnector::stop()
void AsynchConnector::connComplete(DispatchHandle& h)
{
- h.stopWatch();
int errCode = socket.getError();
if (errCode == 0) {
+ h.stopWatch();
connCallback(socket);
} else {
+ // Retry while we cause an immediate exception
+ // (asynch failure will be handled by re-entering here at the top)
+ while (sa.nextAddress()) {
+ try {
+ // Try next address without deleting ourselves
+ QPID_LOG(debug, "Ignored socket connect error: " << strError(errCode));
+ QPID_LOG(info, "Retrying connect: " << sa.asString());
+ socket.connect(sa);
+ return;
+ } catch (const std::exception& e) {
+ QPID_LOG(debug, "Ignored socket connect exception: " << e.what());
+ }
+ errCode = socket.getError();
+ }
+ h.stopWatch();
failCallback(socket, errCode, strError(errCode));
}
DispatchHandle::doDelete();
diff --git a/qpid/cpp/src/qpid/sys/posix/Socket.cpp b/qpid/cpp/src/qpid/sys/posix/Socket.cpp
index aa25f8062d..4a6dc66f80 100644
--- a/qpid/cpp/src/qpid/sys/posix/Socket.cpp
+++ b/qpid/cpp/src/qpid/sys/posix/Socket.cpp
@@ -34,9 +34,6 @@
#include <netdb.h>
#include <cstdlib>
#include <string.h>
-#include <iostream>
-
-#include <boost/format.hpp>
namespace qpid {
namespace sys {
@@ -44,24 +41,28 @@ namespace sys {
namespace {
std::string getName(int fd, bool local)
{
- ::sockaddr_storage name; // big enough for any socket address
- ::socklen_t namelen = sizeof(name);
+ ::sockaddr_storage name_s; // big enough for any socket address
+ ::sockaddr* name = (::sockaddr*)&name_s;
+ ::socklen_t namelen = sizeof(name_s);
- int result = -1;
if (local) {
- result = ::getsockname(fd, (::sockaddr*)&name, &namelen);
+ QPID_POSIX_CHECK( ::getsockname(fd, name, &namelen) );
} else {
- result = ::getpeername(fd, (::sockaddr*)&name, &namelen);
+ QPID_POSIX_CHECK( ::getpeername(fd, name, &namelen) );
}
- QPID_POSIX_CHECK(result);
- char servName[NI_MAXSERV];
- char dispName[NI_MAXHOST];
- if (int rc=::getnameinfo((::sockaddr*)&name, namelen, dispName, sizeof(dispName),
- servName, sizeof(servName),
- NI_NUMERICHOST | NI_NUMERICSERV) != 0)
- throw QPID_POSIX_ERROR(rc);
- return std::string(dispName) + ":" + std::string(servName);
+ return SocketAddress::asString(name, namelen);
+}
+
+uint16_t getLocalPort(int fd)
+{
+ ::sockaddr_storage name_s; // big enough for any socket address
+ ::sockaddr* name = (::sockaddr*)&name_s;
+ ::socklen_t namelen = sizeof(name_s);
+
+ QPID_POSIX_CHECK( ::getsockname(fd, name, &namelen) );
+
+ return SocketAddress::getPort(name);
}
}
@@ -88,6 +89,11 @@ void Socket::createSocket(const SocketAddress& sa) const
try {
if (nonblocking) setNonblocking();
if (nodelay) setTcpNoDelay();
+ if (getAddrInfo(sa).ai_family == AF_INET6) {
+ int flag = 1;
+ int result = ::setsockopt(socket, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&flag, sizeof(flag));
+ QPID_POSIX_CHECK(result);
+ }
} catch (std::exception&) {
::close(s);
socket = -1;
@@ -95,6 +101,20 @@ void Socket::createSocket(const SocketAddress& sa) const
}
}
+Socket* Socket::createSameTypeSocket() const {
+ int& socket = impl->fd;
+ // Socket currently has no actual socket attached
+ if (socket == -1)
+ return new Socket;
+
+ ::sockaddr_storage sa;
+ ::socklen_t salen = sizeof(sa);
+ QPID_POSIX_CHECK(::getsockname(socket, (::sockaddr*)&sa, &salen));
+ int s = ::socket(sa.ss_family, SOCK_STREAM, 0); // Currently only work with SOCK_STREAM
+ if (s < 0) throw QPID_POSIX_ERROR(errno);
+ return new Socket(new IOHandlePrivate(s));
+}
+
void Socket::setNonblocking() const {
int& socket = impl->fd;
nonblocking = true;
@@ -109,7 +129,7 @@ void Socket::setTcpNoDelay() const
nodelay = true;
if (socket != -1) {
int flag = 1;
- int result = setsockopt(impl->fd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(flag));
+ int result = ::setsockopt(impl->fd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(flag));
QPID_POSIX_CHECK(result);
}
}
@@ -179,19 +199,14 @@ int Socket::listen(const SocketAddress& sa, int backlog) const
const int& socket = impl->fd;
int yes=1;
- QPID_POSIX_CHECK(setsockopt(socket,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(yes)));
+ QPID_POSIX_CHECK(::setsockopt(socket,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(yes)));
if (::bind(socket, getAddrInfo(sa).ai_addr, getAddrInfo(sa).ai_addrlen) < 0)
throw Exception(QPID_MSG("Can't bind to port " << sa.asString() << ": " << strError(errno)));
if (::listen(socket, backlog) < 0)
throw Exception(QPID_MSG("Can't listen on port " << sa.asString() << ": " << strError(errno)));
- struct sockaddr_in name;
- socklen_t namelen = sizeof(name);
- if (::getsockname(socket, (struct sockaddr*)&name, &namelen) < 0)
- throw QPID_POSIX_ERROR(errno);
-
- return ntohs(name.sin_port);
+ return getLocalPort(socket);
}
Socket* Socket::accept() const
diff --git a/qpid/cpp/src/qpid/sys/posix/SocketAddress.cpp b/qpid/cpp/src/qpid/sys/posix/SocketAddress.cpp
index 10f1c8a563..077942ef2f 100644
--- a/qpid/cpp/src/qpid/sys/posix/SocketAddress.cpp
+++ b/qpid/cpp/src/qpid/sys/posix/SocketAddress.cpp
@@ -21,13 +21,13 @@
#include "qpid/sys/SocketAddress.h"
-#include "qpid/sys/posix/check.h"
+#include "qpid/Exception.h"
+#include "qpid/Msg.h"
#include <sys/socket.h>
-#include <string.h>
+#include <netinet/in.h>
#include <netdb.h>
-
-#include <algorithm>
+#include <string.h>
namespace qpid {
namespace sys {
@@ -61,31 +61,70 @@ SocketAddress::~SocketAddress()
}
}
-std::string SocketAddress::asString(bool numeric) const
+std::string SocketAddress::asString(::sockaddr const * const addr, size_t addrlen)
{
- if (!numeric)
- return host + ":" + port;
- // Canonicalise into numeric id
- const ::addrinfo& ai = getAddrInfo(*this);
char servName[NI_MAXSERV];
char dispName[NI_MAXHOST];
- if (int rc=::getnameinfo(ai.ai_addr, ai.ai_addrlen,
- dispName, sizeof(dispName),
- servName, sizeof(servName),
- NI_NUMERICHOST | NI_NUMERICSERV) != 0)
- throw QPID_POSIX_ERROR(rc);
- std::string s(dispName);
+ if (int rc=::getnameinfo(addr, addrlen,
+ dispName, sizeof(dispName),
+ servName, sizeof(servName),
+ NI_NUMERICHOST | NI_NUMERICSERV) != 0)
+ throw qpid::Exception(QPID_MSG(gai_strerror(rc)));
+ std::string s;
+ switch (addr->sa_family) {
+ case AF_INET: s += dispName; break;
+ case AF_INET6: s += "["; s += dispName; s+= "]"; break;
+ default: throw Exception(QPID_MSG("Unexpected socket type"));
+ }
s += ":";
s += servName;
return s;
}
+uint16_t SocketAddress::getPort(::sockaddr const * const addr)
+{
+ switch (addr->sa_family) {
+ case AF_INET: return ntohs(((::sockaddr_in*)addr)->sin_port);
+ case AF_INET6: return ntohs(((::sockaddr_in6*)addr)->sin6_port);
+ default:throw Exception(QPID_MSG("Unexpected socket type"));
+ }
+}
+
+std::string SocketAddress::asString(bool numeric) const
+{
+ if (!numeric)
+ return host + ":" + port;
+ // Canonicalise into numeric id
+ const ::addrinfo& ai = getAddrInfo(*this);
+
+ return asString(ai.ai_addr, ai.ai_addrlen);
+}
+
+bool SocketAddress::nextAddress() {
+ bool r = currentAddrInfo->ai_next != 0;
+ if (r)
+ currentAddrInfo = currentAddrInfo->ai_next;
+ return r;
+}
+
+void SocketAddress::setAddrInfoPort(uint16_t port) {
+ if (!currentAddrInfo) return;
+
+ ::addrinfo& ai = *currentAddrInfo;
+ switch (ai.ai_family) {
+ case AF_INET: ((::sockaddr_in*)ai.ai_addr)->sin_port = htons(port); return;
+ case AF_INET6:((::sockaddr_in6*)ai.ai_addr)->sin6_port = htons(port); return;
+ default: throw Exception(QPID_MSG("Unexpected socket type"));
+ }
+}
+
const ::addrinfo& getAddrInfo(const SocketAddress& sa)
{
if (!sa.addrInfo) {
::addrinfo hints;
::memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_INET; // Change this to support IPv6
+ hints.ai_flags = AI_ADDRCONFIG; // Only use protocols that we have configured interfaces for
+ hints.ai_family = AF_UNSPEC; // Allow both IPv4 and IPv6
hints.ai_socktype = SOCK_STREAM;
const char* node = 0;
@@ -99,9 +138,10 @@ const ::addrinfo& getAddrInfo(const SocketAddress& sa)
int n = ::getaddrinfo(node, service, &hints, &sa.addrInfo);
if (n != 0)
throw Exception(QPID_MSG("Cannot resolve " << sa.asString(false) << ": " << ::gai_strerror(n)));
+ sa.currentAddrInfo = sa.addrInfo;
}
- return *sa.addrInfo;
+ return *sa.currentAddrInfo;
}
}}
diff --git a/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp b/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp
index 8d84fdb7b2..30378d4c5f 100644
--- a/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp
+++ b/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp
@@ -47,16 +47,13 @@ namespace {
/*
* The function pointers for AcceptEx and ConnectEx need to be looked up
- * at run time. Make sure this is done only once.
+ * at run time.
*/
-boost::once_flag lookUpAcceptExOnce = BOOST_ONCE_INIT;
-LPFN_ACCEPTEX fnAcceptEx = 0;
-typedef void (*lookUpFunc)(const qpid::sys::Socket &);
-
-void lookUpAcceptEx() {
- SOCKET h = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
+const LPFN_ACCEPTEX lookUpAcceptEx(const qpid::sys::Socket& s) {
+ SOCKET h = toSocketHandle(s);
GUID guidAcceptEx = WSAID_ACCEPTEX;
DWORD dwBytes = 0;
+ LPFN_ACCEPTEX fnAcceptEx;
WSAIoctl(h,
SIO_GET_EXTENSION_FUNCTION_POINTER,
&guidAcceptEx,
@@ -66,9 +63,9 @@ void lookUpAcceptEx() {
&dwBytes,
NULL,
NULL);
- closesocket(h);
if (fnAcceptEx == 0)
throw qpid::Exception(QPID_MSG("Failed to look up AcceptEx"));
+ return fnAcceptEx;
}
}
@@ -95,18 +92,15 @@ private:
AsynchAcceptor::Callback acceptedCallback;
const Socket& socket;
+ const LPFN_ACCEPTEX fnAcceptEx;
};
AsynchAcceptor::AsynchAcceptor(const Socket& s, Callback callback)
: acceptedCallback(callback),
- socket(s) {
+ socket(s),
+ fnAcceptEx(lookUpAcceptEx(s)) {
s.setNonblocking();
-#if (BOOST_VERSION >= 103500) /* boost 1.35 or later reversed the args */
- boost::call_once(lookUpAcceptExOnce, lookUpAcceptEx);
-#else
- boost::call_once(lookUpAcceptEx, lookUpAcceptExOnce);
-#endif
}
AsynchAcceptor::~AsynchAcceptor()
@@ -124,25 +118,26 @@ void AsynchAcceptor::restart(void) {
DWORD bytesReceived = 0; // Not used, needed for AcceptEx API
AsynchAcceptResult *result = new AsynchAcceptResult(acceptedCallback,
this,
- toSocketHandle(socket));
+ socket);
BOOL status;
- status = ::fnAcceptEx(toSocketHandle(socket),
- toSocketHandle(*result->newSocket),
- result->addressBuffer,
- 0,
- AsynchAcceptResult::SOCKADDRMAXLEN,
- AsynchAcceptResult::SOCKADDRMAXLEN,
- &bytesReceived,
- result->overlapped());
+ status = fnAcceptEx(toSocketHandle(socket),
+ toSocketHandle(*result->newSocket),
+ result->addressBuffer,
+ 0,
+ AsynchAcceptResult::SOCKADDRMAXLEN,
+ AsynchAcceptResult::SOCKADDRMAXLEN,
+ &bytesReceived,
+ result->overlapped());
QPID_WINDOWS_CHECK_ASYNC_START(status);
}
AsynchAcceptResult::AsynchAcceptResult(AsynchAcceptor::Callback cb,
AsynchAcceptor *acceptor,
- SOCKET listener)
- : callback(cb), acceptor(acceptor), listener(listener) {
- newSocket.reset (new Socket());
+ const Socket& listener)
+ : callback(cb), acceptor(acceptor),
+ listener(toSocketHandle(listener)),
+ newSocket(listener.createSameTypeSocket()) {
}
void AsynchAcceptResult::success(size_t /*bytesTransferred*/) {
diff --git a/qpid/cpp/src/qpid/sys/windows/AsynchIoResult.h b/qpid/cpp/src/qpid/sys/windows/AsynchIoResult.h
index b11324918b..27e4c22138 100755
--- a/qpid/cpp/src/qpid/sys/windows/AsynchIoResult.h
+++ b/qpid/cpp/src/qpid/sys/windows/AsynchIoResult.h
@@ -83,17 +83,17 @@ class AsynchAcceptResult : public AsynchResult {
public:
AsynchAcceptResult(qpid::sys::AsynchAcceptor::Callback cb,
AsynchAcceptor *acceptor,
- SOCKET listener);
+ const qpid::sys::Socket& listener);
virtual void success (size_t bytesTransferred);
virtual void failure (int error);
private:
virtual void complete(void) {} // No-op for this class.
- std::auto_ptr<qpid::sys::Socket> newSocket;
qpid::sys::AsynchAcceptor::Callback callback;
AsynchAcceptor *acceptor;
SOCKET listener;
+ std::auto_ptr<qpid::sys::Socket> newSocket;
// AcceptEx needs a place to write the local and remote addresses
// when accepting the connection. Place those here; get enough for
diff --git a/qpid/cpp/src/qpid/sys/windows/Socket.cpp b/qpid/cpp/src/qpid/sys/windows/Socket.cpp
index baa80f04e0..1fa4768329 100755..100644
--- a/qpid/cpp/src/qpid/sys/windows/Socket.cpp
+++ b/qpid/cpp/src/qpid/sys/windows/Socket.cpp
@@ -19,25 +19,19 @@
*
*/
-// Ensure we get all of winsock2.h
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501
-#endif
-
#include "qpid/sys/Socket.h"
+
#include "qpid/sys/SocketAddress.h"
-#include "qpid/sys/windows/IoHandlePrivate.h"
#include "qpid/sys/windows/check.h"
-#include "qpid/sys/Time.h"
+#include "qpid/sys/windows/IoHandlePrivate.h"
-#include <cstdlib>
-#include <string.h>
+// Ensure we get all of winsock2.h
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
#include <winsock2.h>
-#include <boost/format.hpp>
-#include <boost/lexical_cast.hpp>
-
// Need to initialize WinSock. Ideally, this would be a singleton or embedded
// in some one-time initialization function. I tried boost singleton and could
// not get it to compile (and others located in google had the same problem).
@@ -91,22 +85,28 @@ namespace {
std::string getName(SOCKET fd, bool local)
{
- sockaddr_in name; // big enough for any socket address
- socklen_t namelen = sizeof(name);
+ ::sockaddr_storage name_s; // big enough for any socket address
+ ::sockaddr* name = (::sockaddr*)&name_s;
+ ::socklen_t namelen = sizeof(name_s);
+
if (local) {
- QPID_WINSOCK_CHECK(::getsockname(fd, (sockaddr*)&name, &namelen));
+ QPID_WINSOCK_CHECK(::getsockname(fd, name, &namelen));
} else {
- QPID_WINSOCK_CHECK(::getpeername(fd, (sockaddr*)&name, &namelen));
+ QPID_WINSOCK_CHECK(::getpeername(fd, name, &namelen));
}
- char servName[NI_MAXSERV];
- char dispName[NI_MAXHOST];
- if (int rc = ::getnameinfo((sockaddr*)&name, namelen,
- dispName, sizeof(dispName),
- servName, sizeof(servName),
- NI_NUMERICHOST | NI_NUMERICSERV) != 0)
- throw qpid::Exception(QPID_MSG(gai_strerror(rc)));
- return std::string(dispName) + ":" + std::string(servName);
+ return SocketAddress::asString(name, namelen);
+}
+
+uint16_t getLocalPort(int fd)
+{
+ ::sockaddr_storage name_s; // big enough for any socket address
+ ::sockaddr* name = (::sockaddr*)&name_s;
+ ::socklen_t namelen = sizeof(name_s);
+
+ QPID_WINSOCK_CHECK(::getsockname(fd, name, &namelen));
+
+ return SocketAddress::getPort(name);
}
} // namespace
@@ -114,13 +114,7 @@ Socket::Socket() :
IOHandle(new IOHandlePrivate),
nonblocking(false),
nodelay(false)
-{
- SOCKET& socket = impl->fd;
- if (socket != INVALID_SOCKET) Socket::close();
- SOCKET s = ::socket (PF_INET, SOCK_STREAM, 0);
- if (s == INVALID_SOCKET) throw QPID_WINDOWS_ERROR(WSAGetLastError());
- socket = s;
-}
+{}
Socket::Socket(IOHandlePrivate* h) :
IOHandle(h),
@@ -128,8 +122,7 @@ Socket::Socket(IOHandlePrivate* h) :
nodelay(false)
{}
-void
-Socket::createSocket(const SocketAddress& sa) const
+void Socket::createSocket(const SocketAddress& sa) const
{
SOCKET& socket = impl->fd;
if (socket != INVALID_SOCKET) Socket::close();
@@ -144,12 +137,26 @@ Socket::createSocket(const SocketAddress& sa) const
if (nonblocking) setNonblocking();
if (nodelay) setTcpNoDelay();
} catch (std::exception&) {
- closesocket(s);
+ ::closesocket(s);
socket = INVALID_SOCKET;
throw;
}
}
+Socket* Socket::createSameTypeSocket() const {
+ SOCKET& socket = impl->fd;
+ // Socket currently has no actual socket attached
+ if (socket == INVALID_SOCKET)
+ return new Socket;
+
+ ::sockaddr_storage sa;
+ ::socklen_t salen = sizeof(sa);
+ QPID_WINSOCK_CHECK(::getsockname(socket, (::sockaddr*)&sa, &salen));
+ SOCKET s = ::socket(sa.ss_family, SOCK_STREAM, 0); // Currently only work with SOCK_STREAM
+ if (s == INVALID_SOCKET) throw QPID_WINDOWS_ERROR(WSAGetLastError());
+ return new Socket(new IOHandlePrivate(s));
+}
+
void Socket::setNonblocking() const {
u_long nonblock = 1;
QPID_WINSOCK_CHECK(ioctlsocket(impl->fd, FIONBIO, &nonblock));
@@ -166,21 +173,14 @@ Socket::connect(const SocketAddress& addr) const
{
peername = addr.asString(false);
+ createSocket(addr);
+
const SOCKET& socket = impl->fd;
- const addrinfo *addrs = &(getAddrInfo(addr));
- int error = 0;
+ int err;
WSASetLastError(0);
- while (addrs != 0) {
- if ((::connect(socket, addrs->ai_addr, addrs->ai_addrlen) == 0) ||
- (WSAGetLastError() == WSAEWOULDBLOCK))
- break;
- // Error... save this error code and see if there are other address
- // to try before throwing the exception.
- error = WSAGetLastError();
- addrs = addrs->ai_next;
- }
- if (error)
- throw qpid::Exception(QPID_MSG(strError(error) << ": " << peername));
+ if ((::connect(socket, getAddrInfo(addr).ai_addr, getAddrInfo(addr).ai_addrlen) != 0) &&
+ ((err = ::WSAGetLastError()) != WSAEWOULDBLOCK))
+ throw qpid::Exception(QPID_MSG(strError(err) << ": " << peername));
}
void
@@ -211,24 +211,26 @@ int Socket::read(void *buf, size_t count) const
return received;
}
-int Socket::listen(const std::string&, const std::string& port, int backlog) const
+int Socket::listen(const std::string& host, const std::string& port, int backlog) const
+{
+ SocketAddress sa(host, port);
+ return listen(sa, backlog);
+}
+
+int Socket::listen(const SocketAddress& addr, int backlog) const
{
+ createSocket(addr);
+
const SOCKET& socket = impl->fd;
BOOL yes=1;
QPID_WINSOCK_CHECK(setsockopt(socket, SOL_SOCKET, SO_REUSEADDR, (char *)&yes, sizeof(yes)));
- struct sockaddr_in name;
- memset(&name, 0, sizeof(name));
- name.sin_family = AF_INET;
- name.sin_port = htons(boost::lexical_cast<uint16_t>(port));
- name.sin_addr.s_addr = 0;
- if (::bind(socket, (struct sockaddr*)&name, sizeof(name)) == SOCKET_ERROR)
- throw Exception(QPID_MSG("Can't bind to port " << port << ": " << strError(WSAGetLastError())));
+
+ if (::bind(socket, getAddrInfo(addr).ai_addr, getAddrInfo(addr).ai_addrlen) == SOCKET_ERROR)
+ throw Exception(QPID_MSG("Can't bind to " << addr.asString() << ": " << strError(WSAGetLastError())));
if (::listen(socket, backlog) == SOCKET_ERROR)
- throw Exception(QPID_MSG("Can't listen on port " << port << ": " << strError(WSAGetLastError())));
-
- socklen_t namelen = sizeof(name);
- QPID_WINSOCK_CHECK(::getsockname(socket, (struct sockaddr*)&name, &namelen));
- return ntohs(name.sin_port);
+ throw Exception(QPID_MSG("Can't listen on " <<addr.asString() << ": " << strError(WSAGetLastError())));
+
+ return getLocalPort(socket);
}
Socket* Socket::accept() const
@@ -243,15 +245,17 @@ Socket* Socket::accept() const
std::string Socket::getPeerAddress() const
{
- if (peername.empty())
+ if (peername.empty()) {
peername = getName(impl->fd, false);
+ }
return peername;
}
std::string Socket::getLocalAddress() const
{
- if (localname.empty())
+ if (localname.empty()) {
localname = getName(impl->fd, true);
+ }
return localname;
}
diff --git a/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp b/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp
index ac43cd2d23..77bbf85810 100644
--- a/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp
+++ b/qpid/cpp/src/qpid/sys/windows/SocketAddress.cpp
@@ -19,15 +19,16 @@
*
*/
+#include "qpid/sys/SocketAddress.h"
+
+#include "qpid/Exception.h"
+#include "qpid/Msg.h"
+
// Ensure we get all of winsock2.h
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0501
#endif
-#include "qpid/sys/SocketAddress.h"
-
-#include "qpid/sys/windows/check.h"
-
#include <winsock2.h>
#include <ws2tcpip.h>
#include <string.h>
@@ -40,37 +41,111 @@ SocketAddress::SocketAddress(const std::string& host0, const std::string& port0)
port(port0),
addrInfo(0)
{
- ::addrinfo hints;
- ::memset(&hints, 0, sizeof(hints));
- hints.ai_family = AF_INET; // In order to allow AF_INET6 we'd have to change createTcp() as well
- hints.ai_socktype = SOCK_STREAM;
-
- const char* node = 0;
- if (host.empty()) {
- hints.ai_flags |= AI_PASSIVE;
- } else {
- node = host.c_str();
- }
- const char* service = port.empty() ? "0" : port.c_str();
+}
- int n = ::getaddrinfo(node, service, &hints, &addrInfo);
- if (n != 0)
- throw Exception(QPID_MSG("Cannot resolve " << host << ": " << ::gai_strerror(n)));
+SocketAddress::SocketAddress(const SocketAddress& sa) :
+ host(sa.host),
+ port(sa.port),
+ addrInfo(0)
+{
+}
+
+SocketAddress& SocketAddress::operator=(const SocketAddress& sa)
+{
+ SocketAddress temp(sa);
+
+ std::swap(temp, *this);
+ return *this;
}
SocketAddress::~SocketAddress()
{
- ::freeaddrinfo(addrInfo);
+ if (addrInfo) {
+ ::freeaddrinfo(addrInfo);
+ }
+}
+
+std::string SocketAddress::asString(::sockaddr const * const addr, size_t addrlen)
+{
+ char servName[NI_MAXSERV];
+ char dispName[NI_MAXHOST];
+ if (int rc=::getnameinfo(addr, addrlen,
+ dispName, sizeof(dispName),
+ servName, sizeof(servName),
+ NI_NUMERICHOST | NI_NUMERICSERV) != 0)
+ throw qpid::Exception(QPID_MSG(gai_strerror(rc)));
+ std::string s;
+ switch (addr->sa_family) {
+ case AF_INET: s += dispName; break;
+ case AF_INET6: s += "["; s += dispName; s+= "]"; break;
+ default: throw Exception(QPID_MSG("Unexpected socket type"));
+ }
+ s += ":";
+ s += servName;
+ return s;
}
-std::string SocketAddress::asString(bool) const
+uint16_t SocketAddress::getPort(::sockaddr const * const addr)
{
- return host + ":" + port;
+ switch (addr->sa_family) {
+ case AF_INET: return ntohs(((::sockaddr_in*)addr)->sin_port);
+ case AF_INET6: return ntohs(((::sockaddr_in6*)addr)->sin6_port);
+ default:throw Exception(QPID_MSG("Unexpected socket type"));
+ }
+}
+
+std::string SocketAddress::asString(bool numeric) const
+{
+ if (!numeric)
+ return host + ":" + port;
+ // Canonicalise into numeric id
+ const ::addrinfo& ai = getAddrInfo(*this);
+
+ return asString(ai.ai_addr, ai.ai_addrlen);
+}
+
+bool SocketAddress::nextAddress() {
+ bool r = currentAddrInfo->ai_next != 0;
+ if (r)
+ currentAddrInfo = currentAddrInfo->ai_next;
+ return r;
+}
+
+void SocketAddress::setAddrInfoPort(uint16_t port) {
+ if (!currentAddrInfo) return;
+
+ ::addrinfo& ai = *currentAddrInfo;
+ switch (ai.ai_family) {
+ case AF_INET: ((::sockaddr_in*)ai.ai_addr)->sin_port = htons(port); return;
+ case AF_INET6:((::sockaddr_in6*)ai.ai_addr)->sin6_port = htons(port); return;
+ default: throw Exception(QPID_MSG("Unexpected socket type"));
+ }
}
const ::addrinfo& getAddrInfo(const SocketAddress& sa)
{
- return *sa.addrInfo;
+ if (!sa.addrInfo) {
+ ::addrinfo hints;
+ ::memset(&hints, 0, sizeof(hints));
+ hints.ai_flags = AI_ADDRCONFIG; // Only use protocols that we have configured interfaces for
+ hints.ai_family = AF_UNSPEC; // Allow both IPv4 and IPv6
+ hints.ai_socktype = SOCK_STREAM;
+
+ const char* node = 0;
+ if (sa.host.empty()) {
+ hints.ai_flags |= AI_PASSIVE;
+ } else {
+ node = sa.host.c_str();
+ }
+ const char* service = sa.port.empty() ? "0" : sa.port.c_str();
+
+ int n = ::getaddrinfo(node, service, &hints, &sa.addrInfo);
+ if (n != 0)
+ throw Exception(QPID_MSG("Cannot resolve " << sa.asString(false) << ": " << ::gai_strerror(n)));
+ sa.currentAddrInfo = sa.addrInfo;
+ }
+
+ return *sa.currentAddrInfo;
}
}}
diff --git a/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.h b/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.h
index 3cdf2c8f08..edec081ced 100644
--- a/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.h
+++ b/qpid/cpp/src/qpid/sys/windows/SslAsynchIO.h
@@ -39,9 +39,6 @@ namespace qpid {
namespace sys {
namespace windows {
-class Socket;
-class Poller;
-
/*
* SSL/Schannel shim between the frame-handling and AsynchIO layers.
* SslAsynchIO creates a regular AsynchIO object to handle I/O and this class
diff --git a/qpid/cpp/src/qpid/sys/windows/Thread.cpp b/qpid/cpp/src/qpid/sys/windows/Thread.cpp
index 583a9613a3..23b0033be4 100755
--- a/qpid/cpp/src/qpid/sys/windows/Thread.cpp
+++ b/qpid/cpp/src/qpid/sys/windows/Thread.cpp
@@ -19,6 +19,11 @@
*
*/
+// Ensure definition of OpenThread in mingw
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0501
+#endif
+
#include "qpid/sys/Thread.h"
#include "qpid/sys/Runnable.h"
#include "qpid/sys/windows/check.h"
@@ -26,50 +31,204 @@
#include <process.h>
#include <windows.h>
-namespace {
-unsigned __stdcall runRunnable(void* p)
-{
- static_cast<qpid::sys::Runnable*>(p)->run();
- _endthreadex(0);
- return 0;
-}
-}
+/*
+ * This implementation distinguishes between two types of thread: Qpid
+ * threads (based on qpid::sys::Runnable) and the rest. It provides a
+ * join() that will not deadlock against the Windows loader lock for
+ * Qpid threads.
+ *
+ * System thread identifiers are unique per Windows thread; thread
+ * handles are not. Thread identifiers can be recycled, but keeping a
+ * handle open against the thread prevents recycling as long as
+ * shared_ptr references to a ThreadPrivate structure remain.
+ *
+ * There is a 1-1 relationship between Qpid threads and their
+ * ThreadPrivate structure. Non-Qpid threads do not need to find the
+ * qpidThreadDone handle, so there may be a 1-many relationship for
+ * them.
+ *
+ * TLS storage is used for a lockless solution for static library
+ * builds. The special case of LoadLibrary/FreeLibrary requires
+ * additional synchronization variables and resource cleanup in
+ * DllMain. _DLL marks the dynamic case.
+ */
namespace qpid {
namespace sys {
class ThreadPrivate {
+public:
friend class Thread;
+ friend unsigned __stdcall runThreadPrivate(void*);
+ typedef boost::shared_ptr<ThreadPrivate> shared_ptr;
+ ~ThreadPrivate();
- HANDLE threadHandle;
+private:
unsigned threadId;
-
- ThreadPrivate(Runnable* runnable) {
- uintptr_t h = _beginthreadex(0,
- 0,
- runRunnable,
- runnable,
- 0,
- &threadId);
- QPID_WINDOWS_CHECK_CRT_NZ(h);
- threadHandle = reinterpret_cast<HANDLE>(h);
+ HANDLE threadHandle;
+ HANDLE initCompleted;
+ HANDLE qpidThreadDone;
+ Runnable* runnable;
+ shared_ptr keepAlive;
+
+ ThreadPrivate() : threadId(GetCurrentThreadId()), initCompleted(NULL),
+ qpidThreadDone(NULL), runnable(NULL) {
+ threadHandle = OpenThread (SYNCHRONIZE, FALSE, threadId);
+ QPID_WINDOWS_CHECK_CRT_NZ(threadHandle);
}
-
- ThreadPrivate()
- : threadHandle(GetCurrentThread()), threadId(GetCurrentThreadId()) {}
+
+ ThreadPrivate(Runnable* r) : threadHandle(NULL), initCompleted(NULL),
+ qpidThreadDone(NULL), runnable(r) {}
+
+ void start(shared_ptr& p);
+ static shared_ptr createThread(Runnable* r);
};
+}} // namespace qpid::sys
+
+
+namespace {
+using namespace qpid::sys;
+
+#ifdef _DLL
+class ScopedCriticalSection
+{
+ public:
+ ScopedCriticalSection(CRITICAL_SECTION& cs) : criticalSection(cs) { EnterCriticalSection(&criticalSection); }
+ ~ScopedCriticalSection() { LeaveCriticalSection(&criticalSection); }
+ private:
+ CRITICAL_SECTION& criticalSection;
+};
+
+CRITICAL_SECTION threadLock;
+long runningThreads = 0;
+HANDLE threadsDone;
+bool terminating = false;
+#endif
+
+
+DWORD volatile tlsIndex = TLS_OUT_OF_INDEXES;
+
+DWORD getTlsIndex() {
+ if (tlsIndex != TLS_OUT_OF_INDEXES)
+ return tlsIndex; // already set
+
+ DWORD trialIndex = TlsAlloc();
+ QPID_WINDOWS_CHECK_NOT(trialIndex, TLS_OUT_OF_INDEXES); // No OS resource
+
+ // only one thread gets to set the value
+ DWORD actualIndex = (DWORD) InterlockedCompareExchange((LONG volatile *) &tlsIndex, (LONG) trialIndex, (LONG) TLS_OUT_OF_INDEXES);
+ if (actualIndex == TLS_OUT_OF_INDEXES)
+ return trialIndex; // we won the race
+ else {
+ TlsFree(trialIndex);
+ return actualIndex;
+ }
+}
+
+} // namespace
+
+namespace qpid {
+namespace sys {
+
+unsigned __stdcall runThreadPrivate(void* p)
+{
+ ThreadPrivate* threadPrivate = static_cast<ThreadPrivate*>(p);
+ TlsSetValue(getTlsIndex(), threadPrivate);
+
+ WaitForSingleObject (threadPrivate->initCompleted, INFINITE);
+ CloseHandle (threadPrivate->initCompleted);
+ threadPrivate->initCompleted = NULL;
+
+ try {
+ threadPrivate->runnable->run();
+ } catch (...) {
+ // not our concern
+ }
+
+ SetEvent (threadPrivate->qpidThreadDone); // allow join()
+ threadPrivate->keepAlive.reset(); // may run ThreadPrivate destructor
+
+#ifdef _DLL
+ {
+ ScopedCriticalSection l(threadLock);
+ if (--runningThreads == 0)
+ SetEvent(threadsDone);
+ }
+#endif
+ return 0;
+}
+
+
+ThreadPrivate::shared_ptr ThreadPrivate::createThread(Runnable* runnable) {
+ ThreadPrivate::shared_ptr tp(new ThreadPrivate(runnable));
+ tp->start(tp);
+ return tp;
+}
+
+void ThreadPrivate::start(ThreadPrivate::shared_ptr& tp) {
+ getTlsIndex(); // fail here if OS problem, not in new thread
+
+ initCompleted = CreateEvent (NULL, TRUE, FALSE, NULL);
+ QPID_WINDOWS_CHECK_CRT_NZ(initCompleted);
+ qpidThreadDone = CreateEvent (NULL, TRUE, FALSE, NULL);
+ QPID_WINDOWS_CHECK_CRT_NZ(qpidThreadDone);
+
+#ifdef _DLL
+ {
+ ScopedCriticalSection l(threadLock);
+ if (terminating)
+ throw qpid::Exception(QPID_MSG("creating thread after exit/FreeLibrary"));
+ runningThreads++;
+ }
+#endif
+
+ uintptr_t h = _beginthreadex(0,
+ 0,
+ runThreadPrivate,
+ (void *)this,
+ 0,
+ &threadId);
+
+#ifdef _DLL
+ if (h == NULL) {
+ ScopedCriticalSection l(threadLock);
+ if (--runningThreads == 0)
+ SetEvent(threadsDone);
+ }
+#endif
+
+ QPID_WINDOWS_CHECK_CRT_NZ(h);
+
+ // Success
+ keepAlive = tp;
+ threadHandle = reinterpret_cast<HANDLE>(h);
+ SetEvent (initCompleted);
+}
+
+ThreadPrivate::~ThreadPrivate() {
+ if (threadHandle)
+ CloseHandle (threadHandle);
+ if (initCompleted)
+ CloseHandle (initCompleted);
+ if (qpidThreadDone)
+ CloseHandle (qpidThreadDone);
+}
+
+
Thread::Thread() {}
-Thread::Thread(Runnable* runnable) : impl(new ThreadPrivate(runnable)) {}
+Thread::Thread(Runnable* runnable) : impl(ThreadPrivate::createThread(runnable)) {}
-Thread::Thread(Runnable& runnable) : impl(new ThreadPrivate(&runnable)) {}
+Thread::Thread(Runnable& runnable) : impl(ThreadPrivate::createThread(&runnable)) {}
Thread::operator bool() {
return impl;
}
bool Thread::operator==(const Thread& t) const {
+ if (!impl || !t.impl)
+ return false;
return impl->threadId == t.impl->threadId;
}
@@ -79,10 +238,17 @@ bool Thread::operator!=(const Thread& t) const {
void Thread::join() {
if (impl) {
- DWORD status = WaitForSingleObject (impl->threadHandle, INFINITE);
+ DWORD status;
+ if (impl->runnable) {
+ HANDLE handles[2] = {impl->qpidThreadDone, impl->threadHandle};
+ // wait for either. threadHandle not signalled if loader
+ // lock held (FreeLibrary). qpidThreadDone not signalled
+ // if thread terminated by exit().
+ status = WaitForMultipleObjects (2, handles, false, INFINITE);
+ }
+ else
+ status = WaitForSingleObject (impl->threadHandle, INFINITE);
QPID_WINDOWS_CHECK_NOT(status, WAIT_FAILED);
- CloseHandle (impl->threadHandle);
- impl->threadHandle = 0;
}
}
@@ -92,9 +258,70 @@ unsigned long Thread::logId() {
/* static */
Thread Thread::current() {
+ ThreadPrivate* tlsValue = (ThreadPrivate *) TlsGetValue(getTlsIndex());
Thread t;
- t.impl.reset(new ThreadPrivate());
+ if (tlsValue != NULL) {
+ // called from within Runnable->run(), so keepAlive has positive use count
+ t.impl = tlsValue->keepAlive;
+ }
+ else
+ t.impl.reset(new ThreadPrivate());
return t;
}
-}} /* qpid::sys */
+}} // namespace qpid::sys
+
+
+#ifdef _DLL
+
+// DllMain: called possibly many times in a process lifetime if dll
+// loaded and freed repeatedly . Be mindful of Windows loader lock
+// and other DllMain restrictions.
+
+BOOL APIENTRY DllMain(HMODULE hm, DWORD reason, LPVOID reserved) {
+ switch (reason) {
+ case DLL_PROCESS_ATTACH:
+ InitializeCriticalSection(&threadLock);
+ threadsDone = CreateEvent(NULL, TRUE, FALSE, NULL);
+ break;
+
+ case DLL_PROCESS_DETACH:
+ terminating = true;
+ if (reserved != NULL) {
+ // process exit(): threads are stopped arbitrarily and
+ // possibly in an inconsistent state. Not even threadLock
+ // can be trusted. All static destructors have been
+ // called at this point and any resources this unit knows
+ // about will be released as part of process tear down by
+ // the OS. Accordingly, do nothing.
+ return TRUE;
+ }
+ else {
+ // FreeLibrary(): threads are still running and we are
+ // encouraged to clean up to avoid leaks. Mostly we just
+ // want any straggler threads to finish and notify
+ // threadsDone as the last thing they do.
+ while (1) {
+ {
+ ScopedCriticalSection l(threadLock);
+ if (runningThreads == 0)
+ break;
+ ResetEvent(threadsDone);
+ }
+ WaitForSingleObject(threadsDone, INFINITE);
+ }
+ if (tlsIndex != TLS_OUT_OF_INDEXES)
+ TlsFree(getTlsIndex());
+ CloseHandle(threadsDone);
+ DeleteCriticalSection(&threadLock);
+ }
+ break;
+
+ case DLL_THREAD_ATTACH:
+ case DLL_THREAD_DETACH:
+ break;
+ }
+ return TRUE;
+}
+
+#endif
diff --git a/qpid/cpp/src/qpid/types/Variant.cpp b/qpid/cpp/src/qpid/types/Variant.cpp
index 0b28234025..f563d5de5b 100644
--- a/qpid/cpp/src/qpid/types/Variant.cpp
+++ b/qpid/cpp/src/qpid/types/Variant.cpp
@@ -19,7 +19,6 @@
*
*/
#include "qpid/types/Variant.h"
-#include "qpid/Msg.h"
#include "qpid/log/Statement.h"
#include <boost/format.hpp>
#include <boost/lexical_cast.hpp>
diff --git a/qpid/cpp/src/tests/BrokerFixture.h b/qpid/cpp/src/tests/BrokerFixture.h
index 672d954572..92c6d22b57 100644
--- a/qpid/cpp/src/tests/BrokerFixture.h
+++ b/qpid/cpp/src/tests/BrokerFixture.h
@@ -22,8 +22,6 @@
*
*/
-#include "SocketProxy.h"
-
#include "qpid/broker/Broker.h"
#include "qpid/client/Connection.h"
#include "qpid/client/ConnectionImpl.h"
@@ -71,16 +69,15 @@ struct BrokerFixture : private boost::noncopyable {
brokerThread = qpid::sys::Thread(*broker);
};
- void shutdownBroker()
- {
- broker->shutdown();
- broker = BrokerPtr();
+ void shutdownBroker() {
+ if (broker) {
+ broker->shutdown();
+ brokerThread.join();
+ broker = BrokerPtr();
+ }
}
- ~BrokerFixture() {
- if (broker) broker->shutdown();
- brokerThread.join();
- }
+ ~BrokerFixture() { shutdownBroker(); }
/** Open a connection to the broker. */
void open(qpid::client::Connection& c) {
@@ -97,20 +94,6 @@ struct LocalConnection : public qpid::client::Connection {
~LocalConnection() { close(); }
};
-/** A local client connection via a socket proxy. */
-struct ProxyConnection : public qpid::client::Connection {
- SocketProxy proxy;
- ProxyConnection(int brokerPort) : proxy(brokerPort) {
- open("localhost", proxy.getPort());
- }
- ProxyConnection(const qpid::client::ConnectionSettings& s) : proxy(s.port) {
- qpid::client::ConnectionSettings proxySettings(s);
- proxySettings.port = proxy.getPort();
- open(proxySettings);
- }
- ~ProxyConnection() { close(); }
-};
-
/** Convenience class to create and open a connection and session
* and some related useful objects.
*/
@@ -147,7 +130,6 @@ struct SessionFixtureT : BrokerFixture, ClientT<ConnectionType,SessionType> {
};
typedef SessionFixtureT<LocalConnection> SessionFixture;
-typedef SessionFixtureT<ProxyConnection> ProxySessionFixture;
}} // namespace qpid::tests
diff --git a/qpid/cpp/src/tests/CMakeLists.txt b/qpid/cpp/src/tests/CMakeLists.txt
index 405718f12b..cc33478114 100644
--- a/qpid/cpp/src/tests/CMakeLists.txt
+++ b/qpid/cpp/src/tests/CMakeLists.txt
@@ -264,6 +264,14 @@ add_executable (qpid-send qpid-send.cpp Statistics.cpp ${platform_test_additions
target_link_libraries (qpid-send qpidmessaging)
remember_location(qpid-send)
+add_executable (qpid-ping qpid-ping.cpp ${platform_test_additions})
+target_link_libraries (qpid-ping qpidclient)
+remember_location(qpid-ping)
+
+add_executable (datagen datagen.cpp ${platform_test_additions})
+target_link_libraries (datagen qpidclient)
+remember_location(datagen)
+
# qpid-perftest and qpid-latency-test are generally useful so install them
install (TARGETS qpid-perftest qpid-latency-test RUNTIME
DESTINATION ${QPID_INSTALL_BINDIR})
@@ -278,7 +286,7 @@ set(test_wrap ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_test${test_script_suffix}
add_test (unit_test ${test_wrap} ${unit_test_LOCATION})
add_test (start_broker ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/start_broker${test_script_suffix})
-add_test (qpid-client-test ${test_wrap} ${qpid-client_test_LOCATION})
+add_test (qpid-client-test ${test_wrap} ${qpid-client-test_LOCATION})
add_test (quick_perftest ${test_wrap} ${qpid-perftest_LOCATION} --summary --count 100)
add_test (quick_topictest ${test_wrap} ${CMAKE_CURRENT_SOURCE_DIR}/quick_topictest${test_script_suffix})
add_test (quick_txtest ${test_wrap} ${qpid-txtest_LOCATION} --queues 4 --tx-count 10 --quiet)
@@ -288,6 +296,7 @@ if (PYTHON_EXECUTABLE)
endif (PYTHON_EXECUTABLE)
add_test (stop_broker ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/stop_broker${test_script_suffix})
if (PYTHON_EXECUTABLE)
+ add_test (ipv6_test ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/ipv6_test${test_script_suffix})
add_test (federation_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_federation_tests${test_script_suffix})
if (BUILD_ACL)
add_test (acl_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_acl_tests${test_script_suffix})
diff --git a/qpid/cpp/src/tests/ClientSessionTest.cpp b/qpid/cpp/src/tests/ClientSessionTest.cpp
index 3c0cff7350..30441cd03c 100644
--- a/qpid/cpp/src/tests/ClientSessionTest.cpp
+++ b/qpid/cpp/src/tests/ClientSessionTest.cpp
@@ -102,9 +102,9 @@ struct SimpleListener : public MessageListener
}
};
-struct ClientSessionFixture : public ProxySessionFixture
+struct ClientSessionFixture : public SessionFixture
{
- ClientSessionFixture(Broker::Options opts = Broker::Options()) : ProxySessionFixture(opts) {
+ ClientSessionFixture(Broker::Options opts = Broker::Options()) : SessionFixture(opts) {
session.queueDeclare(arg::queue="my-queue");
}
};
@@ -150,16 +150,6 @@ QPID_AUTO_TEST_CASE(testDispatcherThread)
BOOST_CHECK_EQUAL(boost::lexical_cast<string>(i), listener.messages[i].getData());
}
-// FIXME aconway 2009-06-17: test for unimplemented feature, enable when implemented.
-void testSuspend0Timeout() {
- ClientSessionFixture fix;
- fix.session.suspend(); // session has 0 timeout.
- try {
- fix.connection.resume(fix.session);
- BOOST_FAIL("Expected InvalidArgumentException.");
- } catch(const InternalErrorException&) {}
-}
-
QPID_AUTO_TEST_CASE(testUseSuspendedError)
{
ClientSessionFixture fix;
@@ -171,18 +161,6 @@ QPID_AUTO_TEST_CASE(testUseSuspendedError)
} catch(const NotAttachedException&) {}
}
-// FIXME aconway 2009-06-17: test for unimplemented feature, enable when implemented.
-void testSuspendResume() {
- ClientSessionFixture fix;
- fix.session.timeout(60);
- fix.session.suspend();
- // Make sure we are still subscribed after resume.
- fix.connection.resume(fix.session);
- fix.session.messageTransfer(arg::content=Message("my-message", "my-queue"));
- BOOST_CHECK_EQUAL("my-message", fix.subs.get("my-queue", TIME_SEC).getData());
-}
-
-
QPID_AUTO_TEST_CASE(testSendToSelf) {
ClientSessionFixture fix;
SimpleListener mylistener;
diff --git a/qpid/cpp/src/tests/ExchangeTest.cpp b/qpid/cpp/src/tests/ExchangeTest.cpp
index 88a1cd99c2..fe72f42a46 100644
--- a/qpid/cpp/src/tests/ExchangeTest.cpp
+++ b/qpid/cpp/src/tests/ExchangeTest.cpp
@@ -253,7 +253,7 @@ QPID_AUTO_TEST_CASE(testIVEOption)
TopicExchange topic ("topic1", false, args);
intrusive_ptr<Message> msg1 = cmessage("direct1", "abc");
- msg1->getProperties<MessageProperties>()->getApplicationHeaders().setString("a", "abc");
+ msg1->insertCustomProperty("a", "abc");
DeliverableMessage dmsg1(msg1);
FieldTable args2;
diff --git a/qpid/cpp/src/tests/Makefile.am b/qpid/cpp/src/tests/Makefile.am
index dceabe36cc..78ac6db5f1 100644
--- a/qpid/cpp/src/tests/Makefile.am
+++ b/qpid/cpp/src/tests/Makefile.am
@@ -304,9 +304,9 @@ TESTS_ENVIRONMENT = \
system_tests = qpid-client-test quick_perftest quick_topictest run_header_test quick_txtest \
run_msg_group_tests
-TESTS += start_broker $(system_tests) python_tests stop_broker run_federation_tests \
+TESTS += start_broker $(system_tests) python_tests stop_broker run_federation_tests run_federation_sys_tests \
run_acl_tests run_cli_tests replication_test dynamic_log_level_test \
- run_queue_flow_limit_tests
+ run_queue_flow_limit_tests ipv6_test
EXTRA_DIST += \
run_test vg_check \
@@ -321,6 +321,8 @@ EXTRA_DIST += \
config.null \
ais_check \
run_federation_tests \
+ run_federation_sys_tests \
+ run_long_federation_sys_tests \
run_cli_tests \
run_acl_tests \
.valgrind.supp \
@@ -362,6 +364,7 @@ LONG_TESTS+=start_broker \
fanout_perftest shared_perftest multiq_perftest topic_perftest run_ring_queue_test \
run_msg_groups_tests_soak \
stop_broker \
+ run_long_federation_sys_tests \
run_failover_soak reliable_replication_test \
federated_cluster_test_with_node_failure
diff --git a/qpid/cpp/src/tests/MessageReplayTracker.cpp b/qpid/cpp/src/tests/MessageReplayTracker.cpp
index 3d79ee53c2..e35f673683 100644
--- a/qpid/cpp/src/tests/MessageReplayTracker.cpp
+++ b/qpid/cpp/src/tests/MessageReplayTracker.cpp
@@ -51,7 +51,7 @@ class ReplayBufferChecker
QPID_AUTO_TEST_CASE(testReplay)
{
- ProxySessionFixture fix;
+ SessionFixture fix;
fix.session.queueDeclare(arg::queue="my-queue", arg::exclusive=true, arg::autoDelete=true);
MessageReplayTracker tracker(10);
@@ -77,7 +77,7 @@ QPID_AUTO_TEST_CASE(testReplay)
QPID_AUTO_TEST_CASE(testCheckCompletion)
{
- ProxySessionFixture fix;
+ SessionFixture fix;
fix.session.queueDeclare(arg::queue="my-queue", arg::exclusive=true, arg::autoDelete=true);
MessageReplayTracker tracker(10);
diff --git a/qpid/cpp/src/tests/MessagingSessionTests.cpp b/qpid/cpp/src/tests/MessagingSessionTests.cpp
index fae45a94d0..418653978b 100644
--- a/qpid/cpp/src/tests/MessagingSessionTests.cpp
+++ b/qpid/cpp/src/tests/MessagingSessionTests.cpp
@@ -611,6 +611,28 @@ QPID_AUTO_TEST_CASE(testAssertPolicyQueue)
fix.admin.deleteQueue("q");
}
+QPID_AUTO_TEST_CASE(testAssertExchangeOption)
+{
+ MessagingFixture fix;
+ std::string a1 = "e; {create:always, assert:always, node:{type:topic, x-declare:{type:direct, arguments:{qpid.msg_sequence:True}}}}";
+ Sender s1 = fix.session.createSender(a1);
+ s1.close();
+ Receiver r1 = fix.session.createReceiver(a1);
+ r1.close();
+
+ std::string a2 = "e; {assert:receiver, node:{type:topic, x-declare:{type:fanout, arguments:{qpid.msg_sequence:True}}}}";
+ Sender s2 = fix.session.createSender(a2);
+ s2.close();
+ BOOST_CHECK_THROW(fix.session.createReceiver(a2), qpid::messaging::AssertionFailed);
+
+ std::string a3 = "e; {assert:sender, node:{x-declare:{arguments:{qpid.msg_sequence:False}}}}";
+ BOOST_CHECK_THROW(fix.session.createSender(a3), qpid::messaging::AssertionFailed);
+ Receiver r3 = fix.session.createReceiver(a3);
+ r3.close();
+
+ fix.admin.deleteExchange("e");
+}
+
QPID_AUTO_TEST_CASE(testGetSender)
{
QueueFixture fix;
@@ -1064,6 +1086,20 @@ QPID_AUTO_TEST_CASE(testAcknowledgeUpTo)
BOOST_CHECK(!fix.session.createReceiver(fix.queue).fetch(m, Duration::IMMEDIATE));
}
+QPID_AUTO_TEST_CASE(testCreateBindingsOnStandardExchange)
+{
+ QueueFixture fix;
+ Sender sender = fix.session.createSender((boost::format("amq.direct; {create:always, node:{type:topic, x-bindings:[{queue:%1%, key:my-subject}]}}") % fix.queue).str());
+ Message out("test-message");
+ out.setSubject("my-subject");
+ sender.send(out);
+ Receiver receiver = fix.session.createReceiver(fix.queue);
+ Message in = receiver.fetch(Duration::SECOND * 5);
+ fix.session.acknowledge();
+ BOOST_CHECK_EQUAL(in.getContent(), out.getContent());
+ BOOST_CHECK_EQUAL(in.getSubject(), out.getSubject());
+}
+
QPID_AUTO_TEST_SUITE_END()
}} // namespace qpid::tests
diff --git a/qpid/cpp/src/tests/Qmf2.cpp b/qpid/cpp/src/tests/Qmf2.cpp
index 66c774accd..bc263d5c6d 100644
--- a/qpid/cpp/src/tests/Qmf2.cpp
+++ b/qpid/cpp/src/tests/Qmf2.cpp
@@ -23,12 +23,36 @@
#include "qmf/QueryImpl.h"
#include "qmf/SchemaImpl.h"
#include "qmf/exceptions.h"
-
+#include "qpid/messaging/Connection.h"
+#include "qmf/PosixEventNotifierImpl.h"
+#include "qmf/AgentSession.h"
+#include "qmf/AgentSessionImpl.h"
+#include "qmf/ConsoleSession.h"
+#include "qmf/ConsoleSessionImpl.h"
#include "unit_test.h"
+using namespace std;
using namespace qpid::types;
+using namespace qpid::messaging;
using namespace qmf;
+bool isReadable(int fd)
+{
+ fd_set rfds;
+ struct timeval tv;
+ int nfds, result;
+
+ FD_ZERO(&rfds);
+ FD_SET(fd, &rfds);
+ nfds = fd + 1;
+ tv.tv_sec = 0;
+ tv.tv_usec = 0;
+
+ result = select(nfds, &rfds, NULL, NULL, &tv);
+
+ return result > 0;
+}
+
namespace qpid {
namespace tests {
@@ -315,6 +339,84 @@ QPID_AUTO_TEST_CASE(testSchema)
BOOST_CHECK_THROW(method.getArgument(3), QmfException);
}
+QPID_AUTO_TEST_CASE(testAgentSessionEventListener)
+{
+ Connection connection("localhost");
+ AgentSession session(connection, "");
+ posix::EventNotifier notifier(session);
+
+ AgentSessionImpl& sessionImpl = AgentSessionImplAccess::get(session);
+
+ BOOST_CHECK(sessionImpl.getEventNotifier() != 0);
+}
+
+QPID_AUTO_TEST_CASE(testConsoleSessionEventListener)
+{
+ Connection connection("localhost");
+ ConsoleSession session(connection, "");
+ posix::EventNotifier notifier(session);
+
+ ConsoleSessionImpl& sessionImpl = ConsoleSessionImplAccess::get(session);
+
+ BOOST_CHECK(sessionImpl.getEventNotifier() != 0);
+}
+
+QPID_AUTO_TEST_CASE(testGetHandle)
+{
+ Connection connection("localhost");
+ ConsoleSession session(connection, "");
+ posix::EventNotifier notifier(session);
+
+ BOOST_CHECK(notifier.getHandle() > 0);
+}
+
+QPID_AUTO_TEST_CASE(testSetReadableToFalse)
+{
+ Connection connection("localhost");
+ ConsoleSession session(connection, "");
+ posix::EventNotifier notifier(session);
+ PosixEventNotifierImplAccess::get(notifier).setReadable(false);
+
+ bool readable(isReadable(notifier.getHandle()));
+ BOOST_CHECK(!readable);
+}
+
+QPID_AUTO_TEST_CASE(testSetReadable)
+{
+ Connection connection("localhost");
+ ConsoleSession session(connection, "");
+ posix::EventNotifier notifier(session);
+ PosixEventNotifierImplAccess::get(notifier).setReadable(true);
+
+ bool readable(isReadable(notifier.getHandle()));
+ BOOST_CHECK(readable);
+}
+
+QPID_AUTO_TEST_CASE(testSetReadableMultiple)
+{
+ Connection connection("localhost");
+ ConsoleSession session(connection, "");
+ posix::EventNotifier notifier(session);
+ for (int i = 0; i < 15; i++)
+ PosixEventNotifierImplAccess::get(notifier).setReadable(true);
+ PosixEventNotifierImplAccess::get(notifier).setReadable(false);
+
+ bool readable(isReadable(notifier.getHandle()));
+ BOOST_CHECK(!readable);
+}
+
+QPID_AUTO_TEST_CASE(testDeleteNotifier)
+{
+ Connection connection("localhost");
+ ConsoleSession session(connection, "");
+ ConsoleSessionImpl& sessionImpl = ConsoleSessionImplAccess::get(session);
+ {
+ posix::EventNotifier notifier(session);
+ BOOST_CHECK(sessionImpl.getEventNotifier() != 0);
+ }
+ BOOST_CHECK(sessionImpl.getEventNotifier() == 0);
+}
+
QPID_AUTO_TEST_SUITE_END()
}} // namespace qpid::tests
diff --git a/qpid/cpp/src/tests/QueueEvents.cpp b/qpid/cpp/src/tests/QueueEvents.cpp
index bd18fa45fb..cea8bbf0db 100644
--- a/qpid/cpp/src/tests/QueueEvents.cpp
+++ b/qpid/cpp/src/tests/QueueEvents.cpp
@@ -147,7 +147,7 @@ struct EventRecorder
QPID_AUTO_TEST_CASE(testSystemLevelEventProcessing)
{
- ProxySessionFixture fixture;
+ SessionFixture fixture;
//register dummy event listener to broker
EventRecorder listener;
fixture.broker->getQueueEvents().registerListener("recorder", boost::bind(&EventRecorder::handle, &listener, _1));
@@ -194,7 +194,7 @@ QPID_AUTO_TEST_CASE(testSystemLevelEventProcessing)
QPID_AUTO_TEST_CASE(testSystemLevelEventProcessing_enqueuesOnly)
{
- ProxySessionFixture fixture;
+ SessionFixture fixture;
//register dummy event listener to broker
EventRecorder listener;
fixture.broker->getQueueEvents().registerListener("recorder", boost::bind(&EventRecorder::handle, &listener, _1));
diff --git a/qpid/cpp/src/tests/QueuePolicyTest.cpp b/qpid/cpp/src/tests/QueuePolicyTest.cpp
index 5455105078..f735e09449 100644
--- a/qpid/cpp/src/tests/QueuePolicyTest.cpp
+++ b/qpid/cpp/src/tests/QueuePolicyTest.cpp
@@ -152,7 +152,7 @@ QPID_AUTO_TEST_CASE(testRingPolicyCount)
std::auto_ptr<QueuePolicy> policy = QueuePolicy::createQueuePolicy("test", 5, 0, QueuePolicy::RING);
policy->update(args);
- ProxySessionFixture f;
+ SessionFixture f;
std::string q("my-ring-queue");
f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args);
for (int i = 0; i < 10; i++) {
@@ -187,7 +187,7 @@ QPID_AUTO_TEST_CASE(testRingPolicySize)
std::auto_ptr<QueuePolicy> policy = QueuePolicy::createQueuePolicy("test", 0, 500, QueuePolicy::RING);
policy->update(args);
- ProxySessionFixture f;
+ SessionFixture f;
std::string q("my-ring-queue");
f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args);
@@ -259,7 +259,7 @@ QPID_AUTO_TEST_CASE(testStrictRingPolicy)
std::auto_ptr<QueuePolicy> policy = QueuePolicy::createQueuePolicy("test", 5, 0, QueuePolicy::RING_STRICT);
policy->update(args);
- ProxySessionFixture f;
+ SessionFixture f;
std::string q("my-ring-queue");
f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args);
LocalQueue incoming;
@@ -285,7 +285,7 @@ QPID_AUTO_TEST_CASE(testPolicyWithDtx)
std::auto_ptr<QueuePolicy> policy = QueuePolicy::createQueuePolicy("test", 5, 0, QueuePolicy::REJECT);
policy->update(args);
- ProxySessionFixture f;
+ SessionFixture f;
std::string q("my-policy-queue");
f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args);
LocalQueue incoming;
@@ -345,7 +345,7 @@ QPID_AUTO_TEST_CASE(testFlowToDiskWithNoStore)
// Disable flow control, or else we'll never hit the max limit
args.setInt(QueueFlowLimit::flowStopCountKey, 0);
- ProxySessionFixture f;
+ SessionFixture f;
std::string q("my-queue");
f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args);
LocalQueue incoming;
@@ -371,7 +371,7 @@ QPID_AUTO_TEST_CASE(testPolicyFailureOnCommit)
std::auto_ptr<QueuePolicy> policy = QueuePolicy::createQueuePolicy("test", 5, 0, QueuePolicy::REJECT);
policy->update(args);
- ProxySessionFixture f;
+ SessionFixture f;
std::string q("q");
f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args);
f.session.txSelect();
@@ -388,7 +388,7 @@ QPID_AUTO_TEST_CASE(testCapacityConversion)
args.setString("qpid.max_count", "5");
args.setString("qpid.flow_stop_count", "0");
- ProxySessionFixture f;
+ SessionFixture f;
std::string q("q");
f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args);
for (int i = 0; i < 5; i++) {
diff --git a/qpid/cpp/src/tests/QueueTest.cpp b/qpid/cpp/src/tests/QueueTest.cpp
index 98fbc2cba4..5274f2370d 100644
--- a/qpid/cpp/src/tests/QueueTest.cpp
+++ b/qpid/cpp/src/tests/QueueTest.cpp
@@ -81,13 +81,14 @@ public:
Message& getMessage() { return *(msg.get()); }
};
-intrusive_ptr<Message> create_message(std::string exchange, std::string routingKey) {
+intrusive_ptr<Message> create_message(std::string exchange, std::string routingKey, uint64_t ttl = 0) {
intrusive_ptr<Message> msg(new Message());
AMQFrame method((MessageTransferBody(ProtocolVersion(), exchange, 0, 0)));
AMQFrame header((AMQHeaderBody()));
msg->getFrames().append(method);
msg->getFrames().append(header);
msg->getFrames().getHeaders()->get<DeliveryProperties>(true)->setRoutingKey(routingKey);
+ if (ttl) msg->getFrames().getHeaders()->get<DeliveryProperties>(true)->setTtl(ttl);
return msg;
}
@@ -441,10 +442,10 @@ QPID_AUTO_TEST_CASE(testLVQOrdering){
BOOST_CHECK_EQUAL(key, "qpid.LVQ_key");
- msg1->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"a");
- msg2->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"b");
- msg3->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"c");
- msg4->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"a");
+ msg1->insertCustomProperty(key,"a");
+ msg2->insertCustomProperty(key,"b");
+ msg3->insertCustomProperty(key,"c");
+ msg4->insertCustomProperty(key,"a");
//enqueue 4 message
queue->deliver(msg1);
@@ -466,9 +467,9 @@ QPID_AUTO_TEST_CASE(testLVQOrdering){
intrusive_ptr<Message> msg5 = create_message("e", "A");
intrusive_ptr<Message> msg6 = create_message("e", "B");
intrusive_ptr<Message> msg7 = create_message("e", "C");
- msg5->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"a");
- msg6->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"b");
- msg7->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"c");
+ msg5->insertCustomProperty(key,"a");
+ msg6->insertCustomProperty(key,"b");
+ msg7->insertCustomProperty(key,"c");
queue->deliver(msg5);
queue->deliver(msg6);
queue->deliver(msg7);
@@ -503,7 +504,7 @@ QPID_AUTO_TEST_CASE(testLVQEmptyKey){
BOOST_CHECK_EQUAL(key, "qpid.LVQ_key");
- msg1->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"a");
+ msg1->insertCustomProperty(key,"a");
queue->deliver(msg1);
queue->deliver(msg2);
BOOST_CHECK_EQUAL(queue->getMessageCount(), 2u);
@@ -535,12 +536,12 @@ QPID_AUTO_TEST_CASE(testLVQAcquire){
BOOST_CHECK_EQUAL(key, "qpid.LVQ_key");
- msg1->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"a");
- msg2->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"b");
- msg3->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"c");
- msg4->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"a");
- msg5->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"b");
- msg6->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"c");
+ msg1->insertCustomProperty(key,"a");
+ msg2->insertCustomProperty(key,"b");
+ msg3->insertCustomProperty(key,"c");
+ msg4->insertCustomProperty(key,"a");
+ msg5->insertCustomProperty(key,"b");
+ msg6->insertCustomProperty(key,"c");
//enqueue 4 message
queue->deliver(msg1);
@@ -605,8 +606,8 @@ QPID_AUTO_TEST_CASE(testLVQMultiQueue){
args.getLVQKey(key);
BOOST_CHECK_EQUAL(key, "qpid.LVQ_key");
- msg1->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"a");
- msg2->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"a");
+ msg1->insertCustomProperty(key,"a");
+ msg2->insertCustomProperty(key,"a");
queue1->deliver(msg1);
queue2->deliver(msg1);
@@ -649,8 +650,8 @@ QPID_AUTO_TEST_CASE(testLVQRecover){
args.getLVQKey(key);
BOOST_CHECK_EQUAL(key, "qpid.LVQ_key");
- msg1->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"a");
- msg2->getProperties<MessageProperties>()->getApplicationHeaders().setString(key,"a");
+ msg1->insertCustomProperty(key,"a");
+ msg2->insertCustomProperty(key,"a");
// 3
queue1->deliver(msg1);
// 4
@@ -670,12 +671,7 @@ QPID_AUTO_TEST_CASE(testLVQRecover){
void addMessagesToQueue(uint count, Queue& queue, uint oddTtl = 200, uint evenTtl = 0)
{
for (uint i = 0; i < count; i++) {
- intrusive_ptr<Message> m = create_message("exchange", "key");
- if (i % 2) {
- if (oddTtl) m->getProperties<DeliveryProperties>()->setTtl(oddTtl);
- } else {
- if (evenTtl) m->getProperties<DeliveryProperties>()->setTtl(evenTtl);
- }
+ intrusive_ptr<Message> m = create_message("exchange", "key", i % 2 ? oddTtl : evenTtl);
m->setTimestamp(new broker::ExpiryPolicy);
queue.deliver(m);
}
@@ -738,8 +734,8 @@ QPID_AUTO_TEST_CASE(testGroupsMultiConsumer) {
std::string("c"), std::string("c"), std::string("c") };
for (int i = 0; i < 9; ++i) {
intrusive_ptr<Message> msg = create_message("e", "A");
- msg->getProperties<MessageProperties>()->getApplicationHeaders().setString("GROUP-ID", groups[i]);
- msg->getProperties<MessageProperties>()->getApplicationHeaders().setInt("MY-ID", i);
+ msg->insertCustomProperty("GROUP-ID", groups[i]);
+ msg->insertCustomProperty("MY-ID", i);
queue->deliver(msg);
}
@@ -885,8 +881,8 @@ QPID_AUTO_TEST_CASE(testGroupsMultiConsumer) {
// Owners= ^C3,
intrusive_ptr<Message> msg = create_message("e", "A");
- msg->getProperties<MessageProperties>()->getApplicationHeaders().setString("GROUP-ID", "a");
- msg->getProperties<MessageProperties>()->getApplicationHeaders().setInt("MY-ID", 9);
+ msg->insertCustomProperty("GROUP-ID", "a");
+ msg->insertCustomProperty("MY-ID", 9);
queue->deliver(msg);
// Queue = a-2, a-9
@@ -896,8 +892,8 @@ QPID_AUTO_TEST_CASE(testGroupsMultiConsumer) {
BOOST_CHECK( !gotOne );
msg = create_message("e", "A");
- msg->getProperties<MessageProperties>()->getApplicationHeaders().setString("GROUP-ID", "b");
- msg->getProperties<MessageProperties>()->getApplicationHeaders().setInt("MY-ID", 10);
+ msg->insertCustomProperty("GROUP-ID", "b");
+ msg->insertCustomProperty("MY-ID", 10);
queue->deliver(msg);
// Queue = a-2, a-9, b-10
@@ -927,7 +923,7 @@ QPID_AUTO_TEST_CASE(testGroupsMultiConsumerDefaults) {
for (int i = 0; i < 3; ++i) {
intrusive_ptr<Message> msg = create_message("e", "A");
// no "GROUP-ID" header
- msg->getProperties<MessageProperties>()->getApplicationHeaders().setInt("MY-ID", i);
+ msg->insertCustomProperty("MY-ID", i);
queue->deliver(msg);
}
diff --git a/qpid/cpp/src/tests/ReplicationTest.cpp b/qpid/cpp/src/tests/ReplicationTest.cpp
index 7310a3fe20..1219a6b59e 100644
--- a/qpid/cpp/src/tests/ReplicationTest.cpp
+++ b/qpid/cpp/src/tests/ReplicationTest.cpp
@@ -74,7 +74,7 @@ QPID_AUTO_TEST_CASE(testReplicationExchange)
{
qpid::broker::Broker::Options brokerOpts(getBrokerOpts(list_of<string>("qpidd")
("--replication-exchange-name=qpid.replication")));
- ProxySessionFixture f(brokerOpts);
+ SessionFixture f(brokerOpts);
std::string dataQ("queue-1");
diff --git a/qpid/cpp/src/tests/SessionState.cpp b/qpid/cpp/src/tests/SessionState.cpp
index 157cabfb63..3be9bb0cbc 100644
--- a/qpid/cpp/src/tests/SessionState.cpp
+++ b/qpid/cpp/src/tests/SessionState.cpp
@@ -43,7 +43,7 @@ using namespace qpid::framing;
// Apply f to [begin, end) and accumulate the result
template <class Iter, class T, class F>
T applyAccumulate(Iter begin, Iter end, T seed, const F& f) {
- return std::accumulate(begin, end, seed, bind(std::plus<T>(), _1, bind(f, _2)));
+ return std::accumulate(begin, end, seed, boost::bind(std::plus<T>(), _1, boost::bind(f, _2)));
}
// Create a frame with a one-char string.
@@ -105,8 +105,8 @@ size_t transferN(qpid::SessionState& s, string content) {
char last = content[content.size()-1];
content.resize(content.size()-1);
size += applyAccumulate(content.begin(), content.end(), 0,
- bind(&send, ref(s),
- bind(contentFrameChar, _1, false)));
+ boost::bind(&send, boost::ref(s),
+ boost::bind(contentFrameChar, _1, false)));
size += send(s, contentFrameChar(last, true));
}
return size;
@@ -115,7 +115,7 @@ size_t transferN(qpid::SessionState& s, string content) {
// Send multiple transfers with single-byte content.
size_t transfers(qpid::SessionState& s, string content) {
return applyAccumulate(content.begin(), content.end(), 0,
- bind(transfer1Char, ref(s), _1));
+ boost::bind(transfer1Char, boost::ref(s), _1));
}
size_t contentFrameSize(size_t n=1) { return AMQFrame(( AMQContentBody())).encodedSize() + n; }
diff --git a/qpid/cpp/src/tests/SocketProxy.h b/qpid/cpp/src/tests/SocketProxy.h
deleted file mode 100644
index d195f11aa9..0000000000
--- a/qpid/cpp/src/tests/SocketProxy.h
+++ /dev/null
@@ -1,183 +0,0 @@
-#ifndef SOCKETPROXY_H
-#define SOCKETPROXY_H
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-#include "qpid/sys/IOHandle.h"
-#ifdef _WIN32
-# include "qpid/sys/windows/IoHandlePrivate.h"
- typedef SOCKET FdType;
-#else
-# include "qpid/sys/posix/PrivatePosix.h"
- typedef int FdType;
-#endif
-#include "qpid/sys/Socket.h"
-#include "qpid/sys/Runnable.h"
-#include "qpid/sys/Thread.h"
-#include "qpid/sys/Mutex.h"
-#include "qpid/log/Statement.h"
-
-#include <boost/lexical_cast.hpp>
-
-namespace qpid {
-namespace tests {
-
-/**
- * A simple socket proxy that forwards to another socket.
- * Used between client & local broker to simulate network failures.
- */
-class SocketProxy : private qpid::sys::Runnable
-{
- // Need a Socket we can get the fd from
- class LowSocket : public qpid::sys::Socket {
- public:
-#ifdef _WIN32
- FdType getFd() { return toSocketHandle(*this); }
-#else
- FdType getFd() { return toFd(impl); }
-#endif
- };
-
- public:
- /** Connect to connectPort on host, start a forwarding thread.
- * Listen for connection on getPort().
- */
- SocketProxy(int connectPort, const std::string host="localhost")
- : closed(false), joined(true),
- port(listener.listen()), dropClient(), dropServer()
- {
- client.connect(host, boost::lexical_cast<std::string>(connectPort));
- joined = false;
- thread = qpid::sys::Thread(static_cast<qpid::sys::Runnable*>(this));
- }
-
- ~SocketProxy() { close(); if (!joined) thread.join(); }
-
- /** Simulate a network disconnect. */
- void close() {
- {
- qpid::sys::Mutex::ScopedLock l(lock);
- if (closed) { return; }
- closed=true;
- }
- if (thread && thread != qpid::sys::Thread::current()) {
- thread.join();
- joined = true;
- }
- client.close();
- }
-
- /** Simulate lost packets, drop data from client */
- void dropClientData(bool drop=true) { dropClient=drop; }
-
- /** Simulate lost packets, drop data from server */
- void dropServerData(bool drop=true) { dropServer=drop; }
-
- bool isClosed() const {
- qpid::sys::Mutex::ScopedLock l(lock);
- return closed;
- }
-
- uint16_t getPort() const { return port; }
-
- private:
- static void throwErrno(const std::string& msg) {
- throw qpid::Exception(msg+":"+qpid::sys::strError(errno));
- }
- static void throwIf(bool condition, const std::string& msg) {
- if (condition) throw qpid::Exception(msg);
- }
-
- void run() {
- std::auto_ptr<LowSocket> server;
- try {
- fd_set socks;
- FdType maxFd = listener.getFd();
- struct timeval tmo;
- for (;;) {
- FD_ZERO(&socks);
- FD_SET(maxFd, &socks);
- tmo.tv_sec = 0;
- tmo.tv_usec = 500 * 1000;
- if (select(maxFd+1, &socks, 0, 0, &tmo) == 0) {
- qpid::sys::Mutex::ScopedLock l(lock);
- throwIf(closed, "SocketProxy: Closed by close()");
- continue;
- }
- throwIf(!FD_ISSET(maxFd, &socks), "SocketProxy: Accept failed");
- break; // Accept ready... go to next step
- }
- server.reset(reinterpret_cast<LowSocket *>(listener.accept()));
- maxFd = server->getFd();
- if (client.getFd() > maxFd)
- maxFd = client.getFd();
- char buffer[1024];
- for (;;) {
- FD_ZERO(&socks);
- tmo.tv_sec = 0;
- tmo.tv_usec = 500 * 1000;
- FD_SET(client.getFd(), &socks);
- FD_SET(server->getFd(), &socks);
- if (select(maxFd+1, &socks, 0, 0, &tmo) == 0) {
- qpid::sys::Mutex::ScopedLock l(lock);
- throwIf(closed, "SocketProxy: Closed by close()");
- continue;
- }
- // Something is set; relay data as needed until something closes
- if (FD_ISSET(server->getFd(), &socks)) {
- int n = server->read(buffer, sizeof(buffer));
- throwIf(n <= 0, "SocketProxy: server disconnected");
- if (!dropServer) client.write(buffer, n);
- }
- if (FD_ISSET(client.getFd(), &socks)) {
- int n = client.read(buffer, sizeof(buffer));
- throwIf(n <= 0, "SocketProxy: client disconnected");
- if (!dropServer) server->write(buffer, n);
- }
- if (!FD_ISSET(client.getFd(), &socks) &&
- !FD_ISSET(server->getFd(), &socks))
- throwIf(true, "SocketProxy: No handle ready");
- }
- }
- catch (const std::exception& e) {
- QPID_LOG(debug, "SocketProxy::run exception: " << e.what());
- }
- try {
- if (server.get()) server->close();
- close();
- }
- catch (const std::exception& e) {
- QPID_LOG(debug, "SocketProxy::run exception in client/server close()" << e.what());
- }
- }
-
- mutable qpid::sys::Mutex lock;
- mutable bool closed;
- bool joined;
- LowSocket client, listener;
- uint16_t port;
- qpid::sys::Thread thread;
- bool dropClient, dropServer;
-};
-
-}} // namespace qpid::tests
-
-#endif
diff --git a/qpid/cpp/src/tests/TxPublishTest.cpp b/qpid/cpp/src/tests/TxPublishTest.cpp
index 210abf0a5b..152581e4ba 100644
--- a/qpid/cpp/src/tests/TxPublishTest.cpp
+++ b/qpid/cpp/src/tests/TxPublishTest.cpp
@@ -50,10 +50,9 @@ struct TxPublishTest
TxPublishTest() :
queue1(new Queue("queue1", false, &store, 0)),
queue2(new Queue("queue2", false, &store, 0)),
- msg(MessageUtils::createMessage("exchange", "routing_key", false, "id")),
+ msg(MessageUtils::createMessage("exchange", "routing_key", true)),
op(msg)
{
- msg->getProperties<DeliveryProperties>()->setDeliveryMode(PERSISTENT);
op.deliverTo(queue1);
op.deliverTo(queue2);
}
diff --git a/qpid/cpp/src/tests/Url.cpp b/qpid/cpp/src/tests/Url.cpp
index 234a62ee91..b30de682bc 100644
--- a/qpid/cpp/src/tests/Url.cpp
+++ b/qpid/cpp/src/tests/Url.cpp
@@ -60,6 +60,32 @@ QPID_AUTO_TEST_CASE(TestParseXyz) {
BOOST_CHECK_EQUAL(Url("xyz:host").str(), "amqp:xyz:host:5672");
}
+QPID_AUTO_TEST_CASE(TestParseTricky) {
+ BOOST_CHECK_EQUAL(Url("amqp").str(), "amqp:tcp:amqp:5672");
+ BOOST_CHECK_EQUAL(Url("amqp:tcp").str(), "amqp:tcp:tcp:5672");
+ // These are ambiguous parses and arguably not the best result
+ BOOST_CHECK_EQUAL(Url("amqp:876").str(), "amqp:tcp:876:5672");
+ BOOST_CHECK_EQUAL(Url("tcp:567").str(), "amqp:tcp:567:5672");
+}
+
+QPID_AUTO_TEST_CASE(TestParseIPv6) {
+ Url u1("[::]");
+ BOOST_CHECK_EQUAL(u1[0].host, "::");
+ BOOST_CHECK_EQUAL(u1[0].port, 5672);
+ Url u2("[::1]");
+ BOOST_CHECK_EQUAL(u2[0].host, "::1");
+ BOOST_CHECK_EQUAL(u2[0].port, 5672);
+ Url u3("[::127.0.0.1]");
+ BOOST_CHECK_EQUAL(u3[0].host, "::127.0.0.1");
+ BOOST_CHECK_EQUAL(u3[0].port, 5672);
+ Url u4("[2002::222:68ff:fe0b:e61a]");
+ BOOST_CHECK_EQUAL(u4[0].host, "2002::222:68ff:fe0b:e61a");
+ BOOST_CHECK_EQUAL(u4[0].port, 5672);
+ Url u5("[2002::222:68ff:fe0b:e61a]:123");
+ BOOST_CHECK_EQUAL(u5[0].host, "2002::222:68ff:fe0b:e61a");
+ BOOST_CHECK_EQUAL(u5[0].port, 123);
+}
+
QPID_AUTO_TEST_CASE(TestParseMultiAddress) {
Url::addProtocol("xyz");
URL_CHECK_STR("amqp:tcp:host:0,xyz:foo:123,tcp:foo:0,xyz:bar:1");
diff --git a/qpid/cpp/src/tests/XmlClientSessionTest.cpp b/qpid/cpp/src/tests/XmlClientSessionTest.cpp
index b3b7f12b53..b94c35ece0 100644
--- a/qpid/cpp/src/tests/XmlClientSessionTest.cpp
+++ b/qpid/cpp/src/tests/XmlClientSessionTest.cpp
@@ -90,7 +90,7 @@ struct SimpleListener : public MessageListener
}
};
-struct ClientSessionFixture : public ProxySessionFixture
+struct ClientSessionFixture : public SessionFixture
{
void declareSubscribe(const string& q="odd_blue",
const string& dest="xml")
diff --git a/qpid/cpp/src/tests/allhosts b/qpid/cpp/src/tests/allhosts
index e43571aed4..4b4b943156 100755
--- a/qpid/cpp/src/tests/allhosts
+++ b/qpid/cpp/src/tests/allhosts
@@ -29,11 +29,12 @@ Options:
-s SECONDS sleep between starting commands.
-q don't print banner lines for each host.
-o SUFFIX log output of each command to <host>.SUFFIX
+ -X passed to ssh - forward X connection.
"
exit 1
}
-while getopts "tl:bs:dqo:" opt; do
+while getopts "tl:bs:dqo:X" opt; do
case $opt in
l) SSHOPTS="-l$OPTARG $SSHOPTS" ;;
t) SSHOPTS="-t $SSHOPTS" ;;
@@ -42,6 +43,7 @@ while getopts "tl:bs:dqo:" opt; do
s) SLEEP="sleep $OPTARG" ;;
q) NOBANNER=1 ;;
o) SUFFIX=$OPTARG ;;
+ X) SSHOPTS="-X $SSHOPTS" ;;
*) usage;;
esac
done
diff --git a/qpid/cpp/src/tests/brokertest.py b/qpid/cpp/src/tests/brokertest.py
index 4a98c638a2..16d7fb0b78 100644
--- a/qpid/cpp/src/tests/brokertest.py
+++ b/qpid/cpp/src/tests/brokertest.py
@@ -251,7 +251,7 @@ class Broker(Popen):
def get_log(self):
return os.path.abspath(self.log)
- def __init__(self, test, args=[], name=None, expect=EXPECT_RUNNING, port=0, log_level=None, wait=None):
+ def __init__(self, test, args=[], name=None, expect=EXPECT_RUNNING, port=0, log_level=None, wait=None, show_cmd=False):
"""Start a broker daemon. name determines the data-dir and log
file names."""
@@ -280,6 +280,7 @@ class Broker(Popen):
cmd += ["--log-enable=%s" % log_level]
self.datadir = self.name
cmd += ["--data-dir", self.datadir]
+ if show_cmd: print cmd
Popen.__init__(self, cmd, expect, stdout=PIPE)
test.cleanup_stop(self)
self._host = "127.0.0.1"
@@ -400,7 +401,7 @@ class Cluster:
_cluster_count = 0
- def __init__(self, test, count=0, args=[], expect=EXPECT_RUNNING, wait=True):
+ def __init__(self, test, count=0, args=[], expect=EXPECT_RUNNING, wait=True, show_cmd=False):
self.test = test
self._brokers=[]
self.name = "cluster%d" % Cluster._cluster_count
@@ -411,16 +412,19 @@ class Cluster:
self.args += [ "--log-enable=info+", "--log-enable=debug+:cluster"]
assert BrokerTest.cluster_lib, "Cannot locate cluster plug-in"
self.args += [ "--load-module", BrokerTest.cluster_lib ]
- self.start_n(count, expect=expect, wait=wait)
+ self.start_n(count, expect=expect, wait=wait, show_cmd=show_cmd)
- def start(self, name=None, expect=EXPECT_RUNNING, wait=True, args=[], port=0):
+ def start(self, name=None, expect=EXPECT_RUNNING, wait=True, args=[], port=0, show_cmd=False):
"""Add a broker to the cluster. Returns the index of the new broker."""
if not name: name="%s-%d" % (self.name, len(self._brokers))
- self._brokers.append(self.test.broker(self.args+args, name, expect, wait, port=port))
+ self._brokers.append(self.test.broker(self.args+args, name, expect, wait, port=port, show_cmd=show_cmd))
return self._brokers[-1]
- def start_n(self, count, expect=EXPECT_RUNNING, wait=True, args=[]):
- for i in range(count): self.start(expect=expect, wait=wait, args=args)
+ def ready(self):
+ for b in self: b.ready()
+
+ def start_n(self, count, expect=EXPECT_RUNNING, wait=True, args=[], show_cmd=False):
+ for i in range(count): self.start(expect=expect, wait=wait, args=args, show_cmd=show_cmd)
# Behave like a list of brokers.
def __len__(self): return len(self._brokers)
@@ -477,31 +481,30 @@ class BrokerTest(TestCase):
self.cleanup_stop(p)
return p
- def broker(self, args=[], name=None, expect=EXPECT_RUNNING, wait=True, port=0, log_level=None):
+ def broker(self, args=[], name=None, expect=EXPECT_RUNNING, wait=True, port=0, log_level=None, show_cmd=False):
"""Create and return a broker ready for use"""
- b = Broker(self, args=args, name=name, expect=expect, port=port, log_level=log_level)
+ b = Broker(self, args=args, name=name, expect=expect, port=port, log_level=log_level, show_cmd=show_cmd)
if (wait):
try: b.ready()
except Exception, e:
raise RethrownException("Failed to start broker %s(%s): %s" % (b.name, b.log, e))
return b
- def cluster(self, count=0, args=[], expect=EXPECT_RUNNING, wait=True):
+ def cluster(self, count=0, args=[], expect=EXPECT_RUNNING, wait=True, show_cmd=False):
"""Create and return a cluster ready for use"""
- cluster = Cluster(self, count, args, expect=expect, wait=wait)
+ cluster = Cluster(self, count, args, expect=expect, wait=wait, show_cmd=show_cmd)
return cluster
def browse(self, session, queue, timeout=0):
- """Assert that the contents of messages on queue (as retrieved
- using session and timeout) exactly match the strings in
- expect_contents"""
+ """Return a list with the contents of each message on queue."""
r = session.receiver("%s;{mode:browse}"%(queue))
+ r.capacity = 100
try:
contents = []
try:
while True: contents.append(r.fetch(timeout=timeout).content)
except messaging.Empty: pass
- finally: pass #FIXME aconway 2011-04-14: r.close()
+ finally: r.close()
return contents
def assert_browse(self, session, queue, expect_contents, timeout=0):
diff --git a/qpid/cpp/src/tests/cluster_python_tests_failing.txt b/qpid/cpp/src/tests/cluster_python_tests_failing.txt
index 7ba8089946..f8639d7b59 100644
--- a/qpid/cpp/src/tests/cluster_python_tests_failing.txt
+++ b/qpid/cpp/src/tests/cluster_python_tests_failing.txt
@@ -1,32 +1,4 @@
qpid_tests.broker_0_10.management.ManagementTest.test_purge_queue
qpid_tests.broker_0_10.management.ManagementTest.test_connection_close
-qpid_tests.broker_0_10.dtx.DtxTests.test_bad_resume
-qpid_tests.broker_0_10.dtx.DtxTests.test_commit_unknown
-qpid_tests.broker_0_10.dtx.DtxTests.test_end
-qpid_tests.broker_0_10.dtx.DtxTests.test_end_suspend_and_fail
-qpid_tests.broker_0_10.dtx.DtxTests.test_end_unknown_xid
-qpid_tests.broker_0_10.dtx.DtxTests.test_forget_xid_on_completion
-qpid_tests.broker_0_10.dtx.DtxTests.test_get_timeout
-qpid_tests.broker_0_10.dtx.DtxTests.test_get_timeout_unknown
-qpid_tests.broker_0_10.dtx.DtxTests.test_implicit_end
-qpid_tests.broker_0_10.dtx.DtxTests.test_invalid_commit_not_ended
-qpid_tests.broker_0_10.dtx.DtxTests.test_invalid_commit_one_phase_false
-qpid_tests.broker_0_10.dtx.DtxTests.test_invalid_commit_one_phase_true
-qpid_tests.broker_0_10.dtx.DtxTests.test_invalid_prepare_not_ended
-qpid_tests.broker_0_10.dtx.DtxTests.test_invalid_rollback_not_ended
-qpid_tests.broker_0_10.dtx.DtxTests.test_prepare_unknown
-qpid_tests.broker_0_10.dtx.DtxTests.test_recover
-qpid_tests.broker_0_10.dtx.DtxTests.test_rollback_unknown
-qpid_tests.broker_0_10.dtx.DtxTests.test_select_required
-qpid_tests.broker_0_10.dtx.DtxTests.test_set_timeout
-qpid_tests.broker_0_10.dtx.DtxTests.test_simple_commit
-qpid_tests.broker_0_10.dtx.DtxTests.test_simple_prepare_commit
-qpid_tests.broker_0_10.dtx.DtxTests.test_simple_prepare_rollback
-qpid_tests.broker_0_10.dtx.DtxTests.test_simple_rollback
-qpid_tests.broker_0_10.dtx.DtxTests.test_start_already_known
-qpid_tests.broker_0_10.dtx.DtxTests.test_start_join
-qpid_tests.broker_0_10.dtx.DtxTests.test_start_join_and_resume
-qpid_tests.broker_0_10.dtx.DtxTests.test_suspend_resume
-qpid_tests.broker_0_10.dtx.DtxTests.test_suspend_start_end_resume
qpid_tests.broker_0_10.message.MessageTests.test_ttl
qpid_tests.broker_0_10.management.ManagementTest.test_broker_connectivity_oldAPI
diff --git a/qpid/cpp/src/tests/cluster_test_logs.py b/qpid/cpp/src/tests/cluster_test_logs.py
index a0ce8fb9c3..3c7e8e8020 100755
--- a/qpid/cpp/src/tests/cluster_test_logs.py
+++ b/qpid/cpp/src/tests/cluster_test_logs.py
@@ -53,6 +53,7 @@ def filter_log(log):
'stall for update|unstall, ignore update|cancelled offer .* unstall',
'caught up',
'active for links|Passivating links|Activating links',
+ 'info Connecting: .*', # UpdateClient connection
'info Connection.* connected to', # UpdateClient connection
'warning Connection \\[[-0-9.: ]+\\] closed', # UpdateClient connection
'warning Broker closed connection: 200, OK',
diff --git a/qpid/cpp/src/tests/cluster_tests.py b/qpid/cpp/src/tests/cluster_tests.py
index 13f4f716da..879dcdaeaf 100755
--- a/qpid/cpp/src/tests/cluster_tests.py
+++ b/qpid/cpp/src/tests/cluster_tests.py
@@ -164,6 +164,121 @@ acl allow all all
self.fail("Expected exception")
except messaging.exceptions.NotFound: pass
+ def test_sasl_join(self):
+ """Verify SASL authentication between brokers when joining a cluster."""
+ sasl_config=os.path.join(self.rootdir, "sasl_config")
+
+ # Valid user/password, ensure queue is created.
+ c = cluster[0].connect(username="zig", password="zig")
+ c.session().sender("ziggy;{create:always}")
+ c.close()
+ c = cluster[1].connect(username="zig", password="zig")
+ c.session().receiver("ziggy;{assert:always}")
+ c.close()
+ for b in cluster: b.ready() # Make sure all brokers still running.
+
+ # Valid user, bad password
+ try:
+ cluster[0].connect(username="zig", password="foo").close()
+ self.fail("Expected exception")
+ except messaging.exceptions.ConnectionError: pass
+ for b in cluster: b.ready() # Make sure all brokers still running.
+
+ # Bad user ID
+ try:
+ cluster[0].connect(username="foo", password="bar").close()
+ self.fail("Expected exception")
+ except messaging.exceptions.ConnectionError: pass
+ for b in cluster: b.ready() # Make sure all brokers still running.
+
+ # Action disallowed by ACL
+ c = cluster[0].connect(username="zag", password="zag")
+ try:
+ s = c.session()
+ s.sender("zaggy;{create:always}")
+ s.close()
+ self.fail("Expected exception")
+ except messaging.exceptions.UnauthorizedAccess: pass
+ # make sure the queue was not created at the other node.
+ c = cluster[0].connect(username="zag", password="zag")
+ try:
+ s = c.session()
+ s.sender("zaggy;{assert:always}")
+ s.close()
+ self.fail("Expected exception")
+ except messaging.exceptions.NotFound: pass
+
+ def test_sasl_join(self):
+ """Verify SASL authentication between brokers when joining a cluster."""
+ # Valid user/password, ensure queue is created.
+ c = cluster[0].connect(username="zig", password="zig")
+ c.session().sender("ziggy;{create:always}")
+ c.close()
+ c = cluster[1].connect(username="zig", password="zig")
+ c.session().receiver("ziggy;{assert:always}")
+ c.close()
+ for b in cluster: b.ready() # Make sure all brokers still running.
+
+ # Valid user, bad password
+ try:
+ cluster[0].connect(username="zig", password="foo").close()
+ self.fail("Expected exception")
+ except messaging.exceptions.ConnectionError: pass
+ for b in cluster: b.ready() # Make sure all brokers still running.
+
+ # Bad user ID
+ try:
+ cluster[0].connect(username="foo", password="bar").close()
+ self.fail("Expected exception")
+ except messaging.exceptions.ConnectionError: pass
+ for b in cluster: b.ready() # Make sure all brokers still running.
+
+ # Action disallowed by ACL
+ c = cluster[0].connect(username="zag", password="zag")
+ try:
+ s = c.session()
+ s.sender("zaggy;{create:always}")
+ s.close()
+ self.fail("Expected exception")
+ except messaging.exceptions.UnauthorizedAccess: pass
+ # make sure the queue was not created at the other node.
+ c = cluster[0].connect(username="zag", password="zag")
+ try:
+ s = c.session()
+ s.sender("zaggy;{assert:always}")
+ s.close()
+ self.fail("Expected exception")
+ except messaging.exceptions.NotFound: pass
+
+ def test_sasl_join(self):
+ """Verify SASL authentication between brokers when joining a cluster."""
+ sasl_config=os.path.join(self.rootdir, "sasl_config")
+ # Test with a valid username/password
+ cluster = self.cluster(1, args=["--auth", "yes",
+ "--sasl-config", sasl_config,
+ "--load-module", os.getenv("ACL_LIB"),
+ "--cluster-username=zig",
+ "--cluster-password=zig",
+ "--cluster-mechanism=PLAIN"
+ ])
+ cluster.start()
+ cluster.ready()
+ c = cluster[1].connect(username="zag", password="zag")
+
+ # Test with an invalid username/password
+ cluster = self.cluster(1, args=["--auth", "yes",
+ "--sasl-config", sasl_config,
+ "--load-module", os.getenv("ACL_LIB"),
+ "--cluster-username=x",
+ "--cluster-password=y",
+ "--cluster-mechanism=PLAIN"
+ ])
+ try:
+ cluster.start(expect=EXPECT_EXIT_OK)
+ cluster[1].ready()
+ self.fail("Expected exception")
+ except: pass
+
def test_user_id_update(self):
"""Ensure that user-id of an open session is updated to new cluster members"""
sasl_config=os.path.join(self.rootdir, "sasl_config")
@@ -713,6 +828,272 @@ acl allow all all
cluster.start()
fetch(cluster[2])
+# Some utility code for transaction tests
+XA_RBROLLBACK = 1
+XA_RBTIMEOUT = 2
+XA_OK = 0
+dtx_branch_counter = 0
+
+class DtxStatusException(Exception):
+ def __init__(self, expect, actual):
+ self.expect = expect
+ self.actual = actual
+
+ def str(self):
+ return "DtxStatusException(expect=%s, actual=%s)"%(self.expect, self.actual)
+
+class DtxTestFixture:
+ """Bundle together some common requirements for dtx tests."""
+ def __init__(self, test, broker, name, exclusive=False):
+ self.test = test
+ self.broker = broker
+ self.name = name
+ # Use old API. DTX is not supported in messaging API.
+ self.connection = broker.connect_old()
+ self.session = self.connection.session(name, 1) # 1 second timeout
+ self.queue = self.session.queue_declare(name, exclusive=exclusive)
+ self.session.dtx_select()
+ self.consumer = None
+
+ def xid(self, id=None):
+ if id is None: id = self.name
+ return self.session.xid(format=0, global_id=id)
+
+ def check_status(self, expect, actual):
+ if expect != actual: raise DtxStatusException(expect, actual)
+
+ def start(self, id=None, resume=False):
+ self.check_status(XA_OK, self.session.dtx_start(xid=self.xid(id), resume=resume).status)
+
+ def end(self, id=None, suspend=False):
+ self.check_status(XA_OK, self.session.dtx_end(xid=self.xid(id), suspend=suspend).status)
+
+ def prepare(self, id=None):
+ self.check_status(XA_OK, self.session.dtx_prepare(xid=self.xid(id)).status)
+
+ def commit(self, id=None, one_phase=True):
+ self.check_status(
+ XA_OK, self.session.dtx_commit(xid=self.xid(id), one_phase=one_phase).status)
+
+ def rollback(self, id=None):
+ self.check_status(XA_OK, self.session.dtx_rollback(xid=self.xid(id)).status)
+
+ def set_timeout(self, timeout, id=None):
+ self.session.dtx_set_timeout(xid=self.xid(id),timeout=timeout)
+
+ def send(self, messages):
+ for m in messages:
+ dp=self.session.delivery_properties(routing_key=self.name)
+ mp=self.session.message_properties()
+ self.session.message_transfer(message=qpid.datatypes.Message(dp, mp, m))
+
+ def accept(self):
+ """Accept 1 message from queue"""
+ consumer_tag="%s-consumer"%(self.name)
+ self.session.message_subscribe(queue=self.name, destination=consumer_tag)
+ self.session.message_flow(unit = self.session.credit_unit.message, value = 1, destination = consumer_tag)
+ self.session.message_flow(unit = self.session.credit_unit.byte, value = 0xFFFFFFFFL, destination = consumer_tag)
+ msg = self.session.incoming(consumer_tag).get(timeout=1)
+ self.session.message_cancel(destination=consumer_tag)
+ self.session.message_accept(qpid.datatypes.RangedSet(msg.id))
+ return msg
+
+
+ def verify(self, sessions, messages):
+ for s in sessions:
+ self.test.assert_browse(s, self.name, messages)
+
+class DtxTests(BrokerTest):
+
+ def test_dtx_update(self):
+ """Verify that DTX transaction state is updated to a new broker.
+ Start a collection of transactions, then add a new cluster member,
+ then verify they commit/rollback correctly on the new broker."""
+
+ # Note: multiple test have been bundled into one to avoid the need to start/stop
+ # multiple brokers per test.
+
+ cluster=self.cluster(1)
+ sessions = [cluster[0].connect().session()] # For verify
+
+ # Transaction that will be open when new member joins, then committed.
+ t1 = DtxTestFixture(self, cluster[0], "t1")
+ t1.start()
+ t1.send(["1", "2"])
+ t1.verify(sessions, []) # Not visible outside of transaction
+
+ # Transaction that will be open when new member joins, then rolled back.
+ t2 = DtxTestFixture(self, cluster[0], "t2")
+ t2.start()
+ t2.send(["1", "2"])
+
+ # Transaction that will be prepared when new member joins, then committed.
+ t3 = DtxTestFixture(self, cluster[0], "t3")
+ t3.start()
+ t3.send(["1", "2"])
+ t3.end()
+ t3.prepare()
+ t1.verify(sessions, []) # Not visible outside of transaction
+
+ # Transaction that will be prepared when new member joins, then rolled back.
+ t4 = DtxTestFixture(self, cluster[0], "t4")
+ t4.start()
+ t4.send(["1", "2"])
+ t4.end()
+ t4.prepare()
+
+ # Transaction using an exclusive queue
+ t5 = DtxTestFixture(self, cluster[0], "t5", exclusive=True)
+ t5.start()
+ t5.send(["1", "2"])
+
+ # Accept messages in a transaction before/after join then commit
+ t6 = DtxTestFixture(self, cluster[0], "t6")
+ t6.send(["a","b","c"])
+ t6.start()
+ self.assertEqual(t6.accept().body, "a");
+
+ # Accept messages in a transaction before/after join then roll back
+ t7 = DtxTestFixture(self, cluster[0], "t7")
+ t7.send(["a","b","c"])
+ t7.start()
+ self.assertEqual(t7.accept().body, "a");
+
+ # Ended, suspended transactions across join.
+ t8 = DtxTestFixture(self, cluster[0], "t8")
+ t8.start(id="1")
+ t8.send(["x"])
+ t8.end(id="1", suspend=True)
+ t8.start(id="2")
+ t8.send(["y"])
+ t8.end(id="2")
+ t8.start()
+ t8.send("z")
+
+
+ # Start new cluster member
+ cluster.start()
+ sessions.append(cluster[1].connect().session())
+
+ # Commit t1
+ t1.send(["3","4"])
+ t1.verify(sessions, [])
+ t1.end()
+ t1.commit(one_phase=True)
+ t1.verify(sessions, ["1","2","3","4"])
+
+ # Rollback t2
+ t2.send(["3","4"])
+ t2.end()
+ t2.rollback()
+ t2.verify(sessions, [])
+
+ # Commit t3
+ t3.commit(one_phase=False)
+ t3.verify(sessions, ["1","2"])
+
+ # Rollback t4
+ t4.rollback()
+ t4.verify(sessions, [])
+
+ # Commit t5
+ t5.send(["3","4"])
+ t5.verify(sessions, [])
+ t5.end()
+ t5.commit(one_phase=True)
+ t5.verify(sessions, ["1","2","3","4"])
+
+ # Commit t6
+ self.assertEqual(t6.accept().body, "b");
+ t6.verify(sessions, ["c"])
+ t6.end()
+ t6.commit(one_phase=True)
+ t6.session.close() # Make sure they're not requeued by the session.
+ t6.verify(sessions, ["c"])
+
+ # Rollback t7
+ self.assertEqual(t7.accept().body, "b");
+ t7.end()
+ t7.rollback()
+ t7.verify(sessions, ["a", "b", "c"])
+
+ # Resume t8
+ t8.end()
+ t8.commit(one_phase=True)
+ t8.start("1", resume=True)
+ t8.end("1")
+ t8.commit("1", one_phase=True)
+ t8.commit("2", one_phase=True)
+ t8.verify(sessions, ["z", "x","y"])
+
+
+ def test_dtx_failover_rollback(self):
+ """Kill a broker during a transaction, verify we roll back correctly"""
+ cluster=self.cluster(1, expect=EXPECT_EXIT_FAIL)
+ cluster.start(expect=EXPECT_RUNNING)
+
+ # Test unprepared at crash
+ t1 = DtxTestFixture(self, cluster[0], "t1")
+ t1.send(["a"]) # Not in transaction
+ t1.start()
+ t1.send(["b"]) # In transaction
+
+ # Test prepared at crash
+ t2 = DtxTestFixture(self, cluster[0], "t2")
+ t2.send(["a"]) # Not in transaction
+ t2.start()
+ t2.send(["b"]) # In transaction
+ t2.end()
+ t2.prepare()
+
+ # Crash the broker
+ cluster[0].kill()
+
+ # Transactional changes should not appear
+ s = cluster[1].connect().session();
+ self.assert_browse(s, "t1", ["a"])
+ self.assert_browse(s, "t2", ["a"])
+
+ def test_dtx_timeout(self):
+ """Verify that dtx timeout works"""
+ cluster = self.cluster(1)
+ t1 = DtxTestFixture(self, cluster[0], "t1")
+ t1.start()
+ t1.set_timeout(1)
+ time.sleep(1.1)
+ try:
+ t1.end()
+ self.fail("Expected rollback timeout.")
+ except DtxStatusException, e:
+ self.assertEqual(e.actual, XA_RBTIMEOUT)
+
+class TxTests(BrokerTest):
+
+ def test_tx_update(self):
+ """Verify that transaction state is updated to a new broker"""
+
+ def make_message(session, body=None, key=None, id=None):
+ dp=session.delivery_properties(routing_key=key)
+ mp=session.message_properties(correlation_id=id)
+ return qpid.datatypes.Message(dp, mp, body)
+
+ cluster=self.cluster(1)
+ # Use old API. TX is not supported in messaging API.
+ c = cluster[0].connect_old()
+ s = c.session("tx-session", 1)
+ s.queue_declare(queue="q")
+ # Start transaction
+ s.tx_select()
+ s.message_transfer(message=make_message(s, "1", "q"))
+ # Start new member mid-transaction
+ cluster.start()
+ # Do more work
+ s.message_transfer(message=make_message(s, "2", "q"))
+ # Commit the transaction and verify the results.
+ s.tx_commit()
+ for b in cluster: self.assert_browse(b.connect().session(), "q", ["1","2"])
+
+
class LongTests(BrokerTest):
"""Tests that can run for a long time if -DDURATION=<minutes> is set"""
def duration(self):
@@ -1001,6 +1382,8 @@ class LongTests(BrokerTest):
logger = logging.getLogger()
log_level = logger.getEffectiveLevel()
logger.setLevel(logging.ERROR)
+ sender = None
+ receiver = None
try:
# Start sender and receiver threads
receiver = Receiver(cluster[0], "q;{create:always}")
@@ -1031,8 +1414,8 @@ class LongTests(BrokerTest):
finally:
# Detach to avoid slow reconnect attempts during shut-down if test fails.
- sender.connection.detach()
- receiver.connection.detach()
+ if sender: sender.connection.detach()
+ if receiver: receiver.connection.detach()
logger.setLevel(log_level)
def test_msg_group_failover(self):
diff --git a/qpid/cpp/src/tests/exception_test.cpp b/qpid/cpp/src/tests/exception_test.cpp
index 3536ffddbe..3e844b4e58 100644
--- a/qpid/cpp/src/tests/exception_test.cpp
+++ b/qpid/cpp/src/tests/exception_test.cpp
@@ -92,32 +92,30 @@ QPID_AUTO_TEST_CASE(TestSessionBusy) {
}
QPID_AUTO_TEST_CASE(DisconnectedPop) {
- ProxySessionFixture fix;
- ProxyConnection c(fix.broker->getPort(Broker::TCP_TRANSPORT));
+ SessionFixture fix;
fix.session.queueDeclare(arg::queue="q");
fix.subs.subscribe(fix.lq, "q");
Catcher<TransportFailure> pop(bind(&LocalQueue::pop, &fix.lq, sys::TIME_SEC));
- fix.connection.proxy.close();
+ fix.shutdownBroker();
BOOST_CHECK(pop.join());
}
QPID_AUTO_TEST_CASE(DisconnectedListen) {
- ProxySessionFixture fix;
+ SessionFixture fix;
struct NullListener : public MessageListener {
void received(Message&) { BOOST_FAIL("Unexpected message"); }
} l;
- ProxyConnection c(fix.broker->getPort(Broker::TCP_TRANSPORT));
fix.session.queueDeclare(arg::queue="q");
fix.subs.subscribe(l, "q");
Catcher<TransportFailure> runner(bind(&SubscriptionManager::run, boost::ref(fix.subs)));
- fix.connection.proxy.close();
- runner.join();
+ fix.shutdownBroker();
+ runner.join();
BOOST_CHECK_THROW(fix.session.queueDeclare(arg::queue="x"), TransportFailure);
}
QPID_AUTO_TEST_CASE(NoSuchQueueTest) {
- ProxySessionFixture fix;
+ SessionFixture fix;
ScopedSuppressLogging sl; // Suppress messages for expected errors.
BOOST_CHECK_THROW(fix.subs.subscribe(fix.lq, "no such queue"), NotFoundException);
}
diff --git a/qpid/cpp/src/tests/federated_topic_test b/qpid/cpp/src/tests/federated_topic_test
index b1063c7e8c..2e55ddcfaa 100755
--- a/qpid/cpp/src/tests/federated_topic_test
+++ b/qpid/cpp/src/tests/federated_topic_test
@@ -42,13 +42,12 @@ while getopts "s:m:b:" opt ; do
esac
done
-MY_DIR=$(dirname $(which $0))
source ./test_env.sh
trap stop_brokers EXIT
start_broker() {
- ${MY_DIR}/../qpidd --daemon --port 0 --no-module-dir --no-data-dir --auth no > qpidd.port
+ $QPIDD_EXEC --daemon --port 0 --no-module-dir --no-data-dir --auth no > qpidd.port
}
start_brokers() {
@@ -76,39 +75,39 @@ subscribe() {
echo Subscriber $1 connecting on $MY_PORT
LOG="subscriber_$1.log"
- ${MY_DIR}/topic_listener -p $MY_PORT > $LOG 2>&1 && rm -f $LOG
+ ./qpid-topic-listener -p $MY_PORT > $LOG 2>&1 && rm -f $LOG
}
publish() {
- ${MY_DIR}/topic_publisher --messages $MESSAGES --batches $BATCHES --subscribers $SUBSCRIBERS -p $PORT_A
+ ./qpid-topic-publisher --messages $MESSAGES --batches $BATCHES --subscribers $SUBSCRIBERS -p $PORT_A
}
setup_routes() {
- BROKER_A="localhost:$PORT_A"
- BROKER_B="localhost:$PORT_B"
- BROKER_C="localhost:$PORT_C"
+ BROKER_A="daffodil:$PORT_A"
+ BROKER_B="daffodil:$PORT_B"
+ BROKER_C="daffodil:$PORT_C"
if (($VERBOSE)); then
echo "Establishing routes for topic..."
fi
- $PYTHON_COMMANDS/qpid-route route add $BROKER_B $BROKER_A amq.topic topic_control B B
- $PYTHON_COMMANDS/qpid-route route add $BROKER_C $BROKER_B amq.topic topic_control C C
+ $QPID_ROUTE_EXEC route add $BROKER_B $BROKER_A amq.topic topic_control B B
+ $QPID_ROUTE_EXEC route add $BROKER_C $BROKER_B amq.topic topic_control C C
if (($VERBOSE)); then
echo "linked A->B->C"
fi
- $PYTHON_COMMANDS/qpid-route route add $BROKER_B $BROKER_C amq.topic topic_control B B
- $PYTHON_COMMANDS/qpid-route route add $BROKER_A $BROKER_B amq.topic topic_control A A
+ $QPID_ROUTE_EXEC route add $BROKER_B $BROKER_C amq.topic topic_control B B
+ $QPID_ROUTE_EXEC route add $BROKER_A $BROKER_B amq.topic topic_control A A
if (($VERBOSE)); then
echo "linked C->B->A"
echo "Establishing routes for response queue..."
fi
- $PYTHON_COMMANDS/qpid-route route add $BROKER_B $BROKER_C amq.direct response B B
- $PYTHON_COMMANDS/qpid-route route add $BROKER_A $BROKER_B amq.direct response A A
+ $QPID_ROUTE_EXEC route add $BROKER_B $BROKER_C amq.direct response B B
+ $QPID_ROUTE_EXEC route add $BROKER_A $BROKER_B amq.direct response A A
if (($VERBOSE)); then
echo "linked C->B->A"
for b in $BROKER_A $BROKER_B $BROKER_C; do
echo "Routes for $b"
- $PYTHON_COMMANDS/qpid-route route list $b
+ $QPID_ROUTE_EXEC route list $b
done
fi
}
diff --git a/qpid/cpp/src/tests/federation.py b/qpid/cpp/src/tests/federation.py
index 49bdecdd95..7d613b98ce 100755
--- a/qpid/cpp/src/tests/federation.py
+++ b/qpid/cpp/src/tests/federation.py
@@ -111,18 +111,18 @@ class FederationTests(TestBase010):
broker = qmf.getObjects(_class="broker")[0]
result = broker.connect(self.remote_host(), self.remote_port(), False, "PLAIN", "guest", "guest", "tcp")
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
link = qmf.getObjects(_class="link")[0]
result = link.bridge(False, "amq.direct", "amq.direct", "my-key", "", "", False, False, False, 0)
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
bridge = qmf.getObjects(_class="bridge")[0]
result = bridge.close()
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
result = link.close()
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
self.verify_cleanup()
@@ -133,11 +133,11 @@ class FederationTests(TestBase010):
qmf = self.qmf
broker = qmf.getObjects(_class="broker")[0]
result = broker.connect(self.remote_host(), self.remote_port(), False, "PLAIN", "guest", "guest", "tcp")
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
link = qmf.getObjects(_class="link")[0]
result = link.bridge(False, "amq.direct", "amq.fanout", "my-key", "", "", False, False, False, 0)
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
bridge = qmf.getObjects(_class="bridge")[0]
@@ -165,9 +165,9 @@ class FederationTests(TestBase010):
except Empty: None
result = bridge.close()
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
result = link.close()
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
self.verify_cleanup()
@@ -178,11 +178,11 @@ class FederationTests(TestBase010):
qmf = self.qmf
broker = qmf.getObjects(_class="broker")[0]
result = broker.connect(self.remote_host(), self.remote_port(), False, "PLAIN", "guest", "guest", "tcp")
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
link = qmf.getObjects(_class="link")[0]
result = link.bridge(False, "amq.direct", "amq.fanout", "my-key", "", "", False, True, False, 0)
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
bridge = qmf.getObjects(_class="bridge")[0]
@@ -209,9 +209,9 @@ class FederationTests(TestBase010):
except Empty: None
result = bridge.close()
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
result = link.close()
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
self.verify_cleanup()
@@ -236,11 +236,11 @@ class FederationTests(TestBase010):
qmf = self.qmf
broker = qmf.getObjects(_class="broker")[0]
result = broker.connect(self.remote_host(), self.remote_port(), False, "PLAIN", "guest", "guest", "tcp")
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
link = qmf.getObjects(_class="link")[0]
result = link.bridge(False, "my-bridge-queue", "amq.fanout", "my-key", "", "", True, False, False, 1)
- self.assertEqual(result.status, 0)
+ self.assertEqual(result.status, 0, result)
bridge = qmf.getObjects(_class="bridge")[0]
sleep(3)
@@ -262,6 +262,63 @@ class FederationTests(TestBase010):
except Empty: None
result = bridge.close()
+ self.assertEqual(result.status, 0, result)
+ result = link.close()
+ self.assertEqual(result.status, 0, result)
+
+ self.verify_cleanup()
+
+ def test_pull_from_queue_recovery(self):
+ session = self.session
+
+ #setup queue on remote broker and add some messages
+ r_conn = self.connect(host=self.remote_host(), port=self.remote_port())
+ r_session = r_conn.session("test_pull_from_queue_recovery")
+ r_session.queue_declare(queue="my-bridge-queue", auto_delete=True)
+ for i in range(1, 6):
+ dp = r_session.delivery_properties(routing_key="my-bridge-queue")
+ r_session.message_transfer(message=Message(dp, "Message %d" % i))
+
+ #setup queue to receive messages from local broker
+ session.queue_declare(queue="fed1", exclusive=True, auto_delete=True)
+ session.exchange_bind(queue="fed1", exchange="amq.fanout")
+ self.subscribe(queue="fed1", destination="f1")
+ queue = session.incoming("f1")
+
+ self.startQmf()
+ qmf = self.qmf
+ broker = qmf.getObjects(_class="broker")[0]
+ result = broker.connect(self.remote_host(), self.remote_port(), False, "PLAIN", "guest", "guest", "tcp")
+ self.assertEqual(result.status, 0, result)
+
+ link = qmf.getObjects(_class="link")[0]
+ result = link.bridge(False, "my-bridge-queue", "amq.fanout", "my-key", "", "", True, False, False, 1)
+ self.assertEqual(result.status, 0, result)
+
+ bridge = qmf.getObjects(_class="bridge")[0]
+ sleep(5)
+
+ #recreate the remote bridge queue to invalidate the bridge session
+ r_session.queue_delete (queue="my-bridge-queue", if_empty=False, if_unused=False)
+ r_session.queue_declare(queue="my-bridge-queue", auto_delete=True)
+
+ #add some more messages (i.e. after bridge was created)
+ for i in range(6, 11):
+ dp = r_session.delivery_properties(routing_key="my-bridge-queue")
+ r_session.message_transfer(message=Message(dp, "Message %d" % i))
+
+ for i in range(1, 11):
+ try:
+ msg = queue.get(timeout=5)
+ self.assertEqual("Message %d" % i, msg.body)
+ except Empty:
+ self.fail("Failed to find expected message containing 'Message %d'" % i)
+ try:
+ extra = queue.get(timeout=1)
+ self.fail("Got unexpected message in queue: " + extra.body)
+ except Empty: None
+
+ result = bridge.close()
self.assertEqual(result.status, 0)
result = link.close()
self.assertEqual(result.status, 0)
diff --git a/qpid/cpp/src/tests/federation_sys.py b/qpid/cpp/src/tests/federation_sys.py
new file mode 100755
index 0000000000..11590f684e
--- /dev/null
+++ b/qpid/cpp/src/tests/federation_sys.py
@@ -0,0 +1,1900 @@
+#!/usr/bin/env python
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+from inspect import stack
+from qpid import messaging
+from qpid.messaging import Message
+from qpid.messaging.exceptions import Empty
+from qpid.testlib import TestBase010
+from random import randint
+from sys import stdout
+from time import sleep
+
+
+class Enum(object):
+ def __init__(self, **entries):
+ self.__dict__.update(entries)
+ def __repr__(self):
+ args = ['%s=%s' % (k, repr(v)) for (k,v) in vars(self).items()]
+ return 'Enum(%s)' % ', '.join(args)
+
+
+class QmfTestBase010(TestBase010):
+
+ _brokers = []
+ _links = []
+ _bridges = []
+ _alt_exch_ops = Enum(none=0, create=1, delete=2)
+
+ class _Broker(object):
+ """
+ This broker proxy object holds the Qmf proxy to a broker of known address as well as the QMF broker
+ object, connection and sessions to the broker.
+ """
+ def __init__(self, url):
+ self.url = url # format: "host:port"
+ url_parts = url.split(':')
+ self.host = url_parts[0]
+ self.port = int(url_parts[1])
+ self.qmf_broker = None
+ self.connection = messaging.Connection.establish(self.url)
+ self.sessions = []
+ def __str__(self):
+ return "_Broker %s:%s (%d open sessions)" % (self.host, self.port, len(self.sessions))
+ def destroy(self, qmf = None):
+ if qmf is not None:
+ qmf.delBroker(self.qmf_broker.getBroker())
+ for session in self.sessions:
+ try: # Session may have been closed by broker error
+ session.close()
+ except Exception, e: print "WARNING: %s: Unable to close session %s (%s): %s %s" % (self, session, hex(id(session)), type(e), e)
+ try: # Connection may have been closed by broker error
+ self.connection.close()
+ except Exception, e: print "WARNING: %s: Unable to close connection %s (%s): %s %s" % (self, self.connection, hex(id(self.connection)), type(e), e)
+ def session(self, name, transactional_flag = False):
+ session = self.connection.session(name, transactional_flag)
+ self.sessions.append(session)
+ return session
+
+ def setUp(self):
+ """
+ Called one before each test starts
+ """
+ TestBase010.setUp(self)
+ self.startQmf();
+
+ def tearDown(self):
+ """
+ Called once after each test competes. Close all Qmf objects (bridges, links and brokers)
+ """
+ while len(self._bridges):
+ self._bridges.pop().close()
+ while len(self._links):
+ self._links.pop().close()
+ while len(self._brokers):
+ b = self._brokers.pop()
+ if len(self._brokers) <= 1:
+ b.destroy(None)
+ else:
+ b.destroy(self.qmf)
+ TestBase010.tearDown(self)
+ self.qmf.close()
+
+ #--- General test utility functions
+
+ def _get_name(self):
+ """
+ Return the name of method which called this method stripped of "test_" prefix. Used for naming
+ queues and exchanges on a per-test basis.
+ """
+ return stack()[1][3][5:]
+
+ def _get_broker_port(self, key):
+ """
+ Get the port of a broker defined in the environment using -D<key>=portno
+ """
+ return int(self.defines[key])
+
+ def _get_cluster_ports(self, key):
+ """
+ Get the cluster ports from the parameters of the test which place it in the environment using
+ -D<key>="port0 port1 ... portN" (space-separated)
+ """
+ ports = []
+ ports_str = self.defines[key]
+ if ports_str:
+ for p in ports_str.split():
+ ports.append(int(p))
+ return ports
+
+ def _get_send_address(self, exch_name, queue_name):
+ """
+ Get an address to which to send messages based on the exchange name and queue name, but taking into account
+ that the exchange name may be "" (the default exchange), in whcih case the format changes slightly.
+ """
+ if len(exch_name) == 0: # Default exchange
+ return queue_name
+ return "%s/%s" % (exch_name, queue_name)
+
+ def _get_broker(self, cluster_flag, broker_port_key, cluster_ports_key):
+ """
+ Read the port numbers for pre-started brokers from the environment using keys, then find or create and return
+ the Qmf broker proxy for the appropriate broker
+ """
+ if cluster_flag:
+ port = self._get_cluster_ports(cluster_ports_key)[0] # Always use the first node in the cluster
+ else:
+ port = self._get_broker_port(broker_port_key)
+ return self._find_create_broker("localhost:%s" % port)
+
+ def _get_msg_subject(self, topic_key):
+ """
+ Return an appropriate subject for sending a message to a known topic. Return None if there is no topic.
+ """
+ if len(topic_key) == 0: return None
+ if "*" in topic_key: return topic_key.replace("*", "test")
+ if "#" in topic_key: return topic_key.replace("#", "multipart.test")
+ return topic_key
+
+ def _send_msgs(self, session_name, broker, addr, msg_count, msg_content = "Message_%03d", topic_key = "",
+ msg_durable_flag = False, enq_txn_size = 0):
+ """
+ Send messages to a broker using address addr
+ """
+ send_session = broker.session(session_name, transactional_flag = enq_txn_size > 0)
+ sender = send_session.sender(addr)
+ txn_cnt = 0
+ for i in range(0, msg_count):
+ sender.send(Message(msg_content % (i + 1), subject = self._get_msg_subject(topic_key), durable = msg_durable_flag))
+ if enq_txn_size > 0:
+ txn_cnt += 1
+ if txn_cnt >= enq_txn_size:
+ send_session.commit()
+ txn_cnt = 0
+ if enq_txn_size > 0 and txn_cnt > 0:
+ send_session.commit()
+ sender.close()
+ send_session.close()
+
+ def _receive_msgs(self, session_name, broker, addr, msg_count, msg_content = "Message_%03d", deq_txn_size = 0,
+ timeout = 0):
+ """
+ Receive messages from a broker
+ """
+ receive_session = broker.session(session_name, transactional_flag = deq_txn_size > 0)
+ receiver = receive_session.receiver(addr)
+ txn_cnt = 0
+ for i in range(0, msg_count):
+ try:
+ msg = receiver.fetch(timeout = timeout)
+ if deq_txn_size > 0:
+ txn_cnt += 1
+ if txn_cnt >= deq_txn_size:
+ receive_session.commit()
+ txn_cnt = 0
+ receive_session.acknowledge()
+ except Empty:
+ if deq_txn_size > 0: receive_session.rollback()
+ receiver.close()
+ receive_session.close()
+ if i == 0:
+ self.fail("Broker %s queue \"%s\" is empty" % (broker.qmf_broker.getBroker().getUrl(), addr))
+ else:
+ self.fail("Unable to receive message %d from broker %s queue \"%s\"" % (i, broker.qmf_broker.getBroker().getUrl(), addr))
+ if msg.content != msg_content % (i + 1):
+ receiver.close()
+ receive_session.close()
+ self.fail("Unexpected message \"%s\", was expecting \"%s\"." % (msg.content, msg_content % (i + 1)))
+ try:
+ msg = receiver.fetch(timeout = 0)
+ if deq_txn_size > 0: receive_session.rollback()
+ receiver.close()
+ receive_session.close()
+ self.fail("Extra message \"%s\" found on broker %s address \"%s\"" % (msg.content, broker.qmf_broker.getBroker().getUrl(), addr))
+ except Empty:
+ pass
+ if deq_txn_size > 0 and txn_cnt > 0:
+ receive_session.commit()
+ receiver.close()
+ receive_session.close()
+
+ #--- QMF-specific utility functions
+
+ def _get_qmf_property(self, props, key):
+ """
+ Get the value of a named property key kj from a property list [(k0, v0), (k1, v1), ... (kn, vn)].
+ """
+ for k,v in props:
+ if k.name == key:
+ return v
+ return None
+
+ def _check_qmf_return(self, method_result):
+ """
+ Check the result of a Qmf-defined method call
+ """
+ self.assertTrue(method_result.status == 0, method_result.text)
+
+ def _check_optional_qmf_property(self, qmf_broker, type, qmf_object, key, expected_val, obj_ref_flag):
+ """
+ Optional Qmf properties don't show up in the properties list when they are not specified. Checks for
+ these property types involve searching the properties list and making sure it is present or not as
+ expected.
+ """
+ val = self._get_qmf_property(qmf_object.getProperties(), key)
+ if val is None:
+ if len(expected_val) > 0:
+ self.fail("%s %s exists, but has does not have %s property. Expected value: \"%s\"" %
+ (type, qmf_object.name, key, expected_val))
+ else:
+ if len(expected_val) > 0:
+ if obj_ref_flag:
+ obj = self.qmf.getObjects(_objectId = val, _broker = qmf_broker.getBroker())
+ self.assertEqual(len(obj), 1, "More than one object with the same objectId: %s" % obj)
+ val = obj[0].name
+ self.assertEqual(val, expected_val, "%s %s exists, but has incorrect %s property. Found \"%s\", expected \"%s\"" %
+ (type, qmf_object.name, key, val, expected_val))
+ else:
+ self.fail("%s %s exists, but has an unexpected %s property \"%s\" set." % (type, qmf_object.name, key, val))
+
+ #--- Find/create Qmf broker objects
+
+ def _find_qmf_broker(self, url):
+ """
+ Find the Qmf broker object for the given broker URL. The broker must have been previously added to Qmf through
+ addBroker()
+ """
+ for b in self.qmf.getObjects(_class="broker"):
+ if b.getBroker().getUrl() == url:
+ return b
+ return None
+
+ def _find_create_broker(self, url):
+ """
+ Find a running broker through Qmf. If it does not exist, add it (assuming the broker is already running).
+ """
+ broker = self._Broker(url)
+ self._brokers.append(broker)
+ if self.qmf is not None:
+ qmf_broker = self._find_qmf_broker(broker.url)
+ if qmf_broker is None:
+ self.qmf.addBroker(broker.url)
+ broker.qmf_broker = self._find_qmf_broker(broker.url)
+ else:
+ broker.qmf_broker = qmf_broker
+ return broker
+
+ #--- Find/create/delete exchanges
+
+ def _find_qmf_exchange(self, qmf_broker, name, type, alternate, durable, auto_delete):
+ """
+ Find Qmf exchange object
+ """
+ for e in self.qmf.getObjects(_class="exchange", _broker = qmf_broker.getBroker()):
+ if e.name == name:
+ if len(name) == 0 or (len(name) >= 4 and name[:4] == "amq."): return e # skip checks for special exchanges
+ self.assertEqual(e.type, type,
+ "Exchange \"%s\" exists, but is of unexpected type %s; expected type %s." %
+ (name, e.type, type))
+ self._check_optional_qmf_property(qmf_broker, "Exchange", e, "altExchange", alternate, True)
+ self.assertEqual(e.durable, durable,
+ "Exchange \"%s\" exists, but has incorrect durability. Found durable=%s, expected durable=%s" %
+ (name, e.durable, durable))
+ self.assertEqual(e.autoDelete, auto_delete,
+ "Exchange \"%s\" exists, but has incorrect auto-delete property. Found %s, expected %s" %
+ (name, e.autoDelete, auto_delete))
+ return e
+ return None
+
+ def _find_create_qmf_exchange(self, qmf_broker, name, type, alternate, durable, auto_delete, args):
+ """
+ Find Qmf exchange object if exchange exists, create exchange and return its Qmf object if not
+ """
+ e = self._find_qmf_exchange(qmf_broker, name, type, alternate, durable, auto_delete)
+ if e is not None: return e
+ # Does not exist, so create it
+ props = dict({"exchange-type": type, "type": type, "durable": durable, "auto-delete": auto_delete, "alternate-exchange": alternate}, **args)
+ self._check_qmf_return(qmf_broker.create(type="exchange", name=name, properties=props, strict=True))
+ e = self._find_qmf_exchange(qmf_broker, name, type, alternate, durable, auto_delete)
+ self.assertNotEqual(e, None, "Creation of exchange %s on broker %s failed" % (name, qmf_broker.getBroker().getUrl()))
+ return e
+
+ def _find_delete_qmf_exchange(self, qmf_broker, name, type, alternate, durable, auto_delete):
+ """
+ Find and delete Qmf exchange object if it exists
+ """
+ e = self._find_qmf_exchange(qmf_broker, name, type, alternate, durable, auto_delete)
+ if e is not None and not auto_delete:
+ self._check_qmf_return(qmf_broker.delete(type="exchange", name=name, options={}))
+
+ #--- Find/create/delete queues
+
+ def _find_qmf_queue(self, qmf_broker, name, alternate_exchange, durable, exclusive, auto_delete):
+ """
+ Find a Qmf queue object
+ """
+ for q in self.qmf.getObjects(_class="queue", _broker = qmf_broker.getBroker()):
+ if q.name == name:
+ self._check_optional_qmf_property(qmf_broker, "Queue", q, "altExchange", alternate_exchange, True)
+ self.assertEqual(q.durable, durable,
+ "Queue \"%s\" exists, but has incorrect durable property. Found %s, expected %s" %
+ (name, q.durable, durable))
+ self.assertEqual(q.exclusive, exclusive,
+ "Queue \"%s\" exists, but has incorrect exclusive property. Found %s, expected %s" %
+ (name, q.exclusive, exclusive))
+ self.assertEqual(q.autoDelete, auto_delete,
+ "Queue \"%s\" exists, but has incorrect auto-delete property. Found %s, expected %s" %
+ (name, q.autoDelete, auto_delete))
+ return q
+ return None
+
+ def _find_create_qmf_queue(self, qmf_broker, name, alternate_exchange, durable, exclusive, auto_delete, args):
+ """
+ Find Qmf queue object if queue exists, create queue and return its Qmf object if not
+ """
+ q = self._find_qmf_queue(qmf_broker, name, alternate_exchange, durable, exclusive, auto_delete)
+ if q is not None: return q
+ # Queue does not exist, so create it
+ props = dict({"durable": durable, "auto-delete": auto_delete, "exclusive": exclusive, "alternate-exchange": alternate_exchange}, **args)
+ self._check_qmf_return(qmf_broker.create(type="queue", name=name, properties=props, strict=True))
+ q = self._find_qmf_queue(qmf_broker, name, alternate_exchange, durable, exclusive, auto_delete)
+ self.assertNotEqual(q, None, "Creation of queue %s on broker %s failed" % (name, qmf_broker.getBroker().getUrl()))
+ return q
+
+ def _find_delete_qmf_queue(self, qmf_broker, name, alternate_exchange, durable, exclusive, auto_delete, args):
+ """
+ Find and delete Qmf queue object if it exists
+ """
+ q = self._find_qmf_queue(qmf_broker, name, alternate_exchange, durable, exclusive, auto_delete)
+ if q is not None and not auto_delete:
+ self._check_qmf_return(qmf_broker.delete(type="queue", name=name, options={}))
+
+ #--- Find/create/delete bindings (between an exchange and a queue)
+
+ def _find_qmf_binding(self, qmf_broker, qmf_exchange, qmf_queue, binding_key, binding_args):
+ """
+ Find a Qmf binding object
+ """
+ for b in self.qmf.getObjects(_class="binding", _broker = qmf_broker.getBroker()):
+ if b.exchangeRef == qmf_exchange.getObjectId() and b.queueRef == qmf_queue.getObjectId():
+ if qmf_exchange.type != "fanout": # Fanout ignores the binding key, and always returns "" as the key
+ self.assertEqual(b.bindingKey, binding_key,
+ "Binding between exchange %s and queue %s exists, but has mismatching binding key: Found %s, expected %s." %
+ (qmf_exchange.name, qmf_queue.name, b.bindingKey, binding_key))
+ self.assertEqual(b.arguments, binding_args,
+ "Binding between exchange %s and queue %s exists, but has mismatching arguments: Found %s, expected %s" %
+ (qmf_exchange.name, qmf_queue.name, b.arguments, binding_args))
+ return b
+ return None
+
+ def _find_create_qmf_binding(self, qmf_broker, qmf_exchange, qmf_queue, binding_key, binding_args):
+ """
+ Find Qmf binding object if it exists, create binding and return its Qmf object if not
+ """
+ b = self._find_qmf_binding(qmf_broker, qmf_exchange, qmf_queue, binding_key, binding_args)
+ if b is not None: return b
+ # Does not exist, so create it
+ self._check_qmf_return(qmf_broker.create(type="binding", name="%s/%s/%s" % (qmf_exchange.name, qmf_queue.name, binding_key), properties=binding_args, strict=True))
+ b = self._find_qmf_binding(qmf_broker, qmf_exchange, qmf_queue, binding_key, binding_args)
+ self.assertNotEqual(b, None, "Creation of binding between exchange %s and queue %s with key %s failed" %
+ (qmf_exchange.name, qmf_queue.name, binding_key))
+ return b
+
+ def _find_delete_qmf_binding(self, qmf_broker, qmf_exchange, qmf_queue, binding_key, binding_args):
+ """
+ Find and delete Qmf binding object if it exists
+ """
+ b = self._find_qmf_binding(qmf_broker, qmf_exchange, qmf_queue, binding_key, binding_args)
+ if b is not None:
+ if len(qmf_exchange.name) > 0: # not default exchange
+ self._check_qmf_return(qmf_broker.delete(type="binding", name="%s/%s/%s" % (qmf_exchange.name, qmf_queue.name, binding_key), options={}))
+
+ #--- Find/create a link
+
+ def _find_qmf_link(self, qmf_from_broker_proxy, host, port):
+ """
+ Find a Qmf link object
+ """
+ for l in self.qmf.getObjects(_class="link", _broker=qmf_from_broker_proxy):
+ if l.host == host and l.port == port:
+ return l
+ return None
+
+ def _find_create_qmf_link(self, qmf_from_broker, qmf_to_broker_proxy, link_durable_flag, auth_mechanism, user_id,
+ password, transport, pause_interval, link_ready_timeout):
+ """
+ Find a Qmf link object if it exists, create it and return its Qmf link object if not
+ """
+ to_broker_host = qmf_to_broker_proxy.host
+ to_broker_port = qmf_to_broker_proxy.port
+ l = self._find_qmf_link(qmf_from_broker.getBroker(), to_broker_host, to_broker_port)
+ if l is not None: return l
+ # Does not exist, so create it
+ self._check_qmf_return(qmf_from_broker.connect(to_broker_host, to_broker_port, link_durable_flag, auth_mechanism, user_id, password, transport))
+ l = self._find_qmf_link(qmf_from_broker.getBroker(), to_broker_host, to_broker_port)
+ self.assertNotEqual(l, None, "Creation of link from broker %s to broker %s failed" %
+ (qmf_from_broker.getBroker().getUrl(), qmf_to_broker_proxy.getUrl()))
+ self._wait_for_link(l, pause_interval, link_ready_timeout)
+ return l
+
+ def _wait_for_link(self, link, pause_interval, link_ready_timeout):
+ """
+ Wait for link to become active (state=Operational)
+ """
+ tot_time = 0
+ link.update()
+ if link.state == "":
+ # Link mgmt updates for the c++ link object are disabled when in a cluster because of inconsistent state:
+ # one is "Operational", the other "Passive". In this case, wait a bit and hope for the best...
+ sleep(2*pause_interval)
+ else:
+ while link.state != "Operational" and tot_time < link_ready_timeout:
+ sleep(pause_interval)
+ tot_time += pause_interval
+ link.update()
+ self.assertEqual(link.state, "Operational", "Timeout: Link not operational, state=%s" % link.state)
+
+ #--- Find/create a bridge
+
+ def _find_qmf_bridge(self, qmf_broker_proxy, qmf_link, source, destination, key):
+ """
+ Find a Qmf link object
+ """
+ for b in self.qmf.getObjects(_class="bridge", _broker=qmf_broker_proxy):
+ if b.linkRef == qmf_link.getObjectId() and b.src == source and b.dest == destination and b.key == key:
+ return b
+ return None
+
+ def _find_create_qmf_bridge(self, qmf_broker_proxy, qmf_link, queue_name, exch_name, topic_key,
+ queue_route_type_flag, bridge_durable_flag):
+ """
+ Find a Qmf bridge object if it exists, create it and return its Qmf object if not
+ """
+ if queue_route_type_flag:
+ src = queue_name
+ dest = exch_name
+ key = ""
+ else:
+ src = exch_name
+ dest = exch_name
+ if len(topic_key) > 0:
+ key = topic_key
+ else:
+ key = queue_name
+ b = self._find_qmf_bridge(qmf_broker_proxy, qmf_link, src, dest, key)
+ if b is not None:
+ return b
+ # Does not exist, so create it
+ self._check_qmf_return(qmf_link.bridge(bridge_durable_flag, src, dest, key, "", "", queue_route_type_flag, False, False, 1))
+ b = self._find_qmf_bridge(qmf_broker_proxy, qmf_link, src, dest, key)
+ self.assertNotEqual(b, None, "Bridge creation failed: src=%s dest=%s key=%s" % (src, dest, key))
+ return b
+
+ def _wait_for_bridge(self, bridge, src_broker, dest_broker, exch_name, queue_name, topic_key, pause_interval,
+ bridge_ready_timeout):
+ """
+ Wait for bridge to become active by sending messages over the bridge at 1 sec intervals until they are
+ observed at the destination.
+ """
+ tot_time = 0
+ active = False
+ send_session = src_broker.session("tx")
+ sender = send_session.sender(self._get_send_address(exch_name, queue_name))
+ src_receive_session = src_broker.session("src_rx")
+ src_receiver = src_receive_session.receiver(queue_name)
+ dest_receive_session = dest_broker.session("dest_rx")
+ dest_receiver = dest_receive_session.receiver(queue_name)
+ while not active and tot_time < bridge_ready_timeout:
+ sender.send(Message("xyz123", subject = self._get_msg_subject(topic_key)))
+ try:
+ src_receiver.fetch(timeout = 0)
+ src_receive_session.acknowledge()
+ # Keep receiving msgs, as several may have accumulated
+ while True:
+ dest_receiver.fetch(timeout = 0)
+ dest_receive_session.acknowledge()
+ sleep(1)
+ active = True
+ except Empty:
+ sleep(pause_interval)
+ tot_time += pause_interval
+ dest_receiver.close()
+ dest_receive_session.close()
+ src_receiver.close()
+ src_receive_session.close()
+ sender.close()
+ send_session.close()
+ self.assertTrue(active, "Bridge failed to become active after %ds: %s" % (bridge_ready_timeout, bridge))
+
+ #--- Find/create/delete utility functions
+
+ def _create_and_bind(self, qmf_broker, exchange_args, queue_args, binding_args):
+ """
+ Create a binding between a named exchange and queue on a broker
+ """
+ e = self._find_create_qmf_exchange(qmf_broker, **exchange_args)
+ q = self._find_create_qmf_queue(qmf_broker, **queue_args)
+ return self._find_create_qmf_binding(qmf_broker, e, q, **binding_args)
+
+ def _check_alt_exchange(self, qmf_broker, alt_exch_name, alt_exch_type, alt_exch_op):
+ """
+ Check for existence of alternate exchange. Return the Qmf exchange proxy object for the alternate exchange
+ """
+ if len(alt_exch_name) == 0: return None
+ if alt_exch_op == _alt_exch_ops.create:
+ return self._find_create_qmf_exchange(qmf_broker=qmf_broker, name=alt_exch_name, type=alt_exch_type,
+ alternate="", durable=False, auto_delete=False, args={})
+ if alt_exch_op == _alt_exch_ops.delete:
+ return self._find_delete_qmf_exchange(qmf_broker=qmf_broker, name=alt_exch_name, type=alt_exch_type,
+ alternate="", durable=False, auto_delete=False)
+ return self._find_qmf_exchange(qmf_broker=qmf_broker, name=alt_exchange_name, type=alt_exchange_type,
+ alternate="", durable=False, auto_delete=False)
+
+ def _delete_queue_binding(self, qmf_broker, exchange_args, queue_args, binding_args):
+ """
+ Delete a queue and the binding between it and the exchange
+ """
+ e = self._find_qmf_exchange(qmf_broker, exchange_args["name"], exchange_args["type"], exchange_args["alternate"], exchange_args["durable"], exchange_args["auto_delete"])
+ q = self._find_qmf_queue(qmf_broker, queue_args["name"], queue_args["alternate_exchange"], queue_args["durable"], queue_args["exclusive"], queue_args["auto_delete"])
+ self._find_delete_qmf_binding(qmf_broker, e, q, **binding_args)
+ self._find_delete_qmf_queue(qmf_broker, **queue_args)
+
+ def _create_route(self, queue_route_type_flag, src_broker, dest_broker, exch_name, queue_name, topic_key,
+ link_durable_flag, bridge_durable_flag, auth_mechanism, user_id, password, transport,
+ pause_interval = 1, link_ready_timeout = 20, bridge_ready_timeout = 20):
+ """
+ Create a route from a source broker to a destination broker
+ """
+ l = self._find_create_qmf_link(dest_broker.qmf_broker, src_broker.qmf_broker.getBroker(), link_durable_flag,
+ auth_mechanism, user_id, password, transport, pause_interval, link_ready_timeout)
+ self._links.append(l)
+ b = self._find_create_qmf_bridge(dest_broker.qmf_broker.getBroker(), l, queue_name, exch_name, topic_key,
+ queue_route_type_flag, bridge_durable_flag)
+ self._bridges.append(b)
+ self._wait_for_bridge(b, src_broker, dest_broker, exch_name, queue_name, topic_key, pause_interval, bridge_ready_timeout)
+
+ # Parameterized test - entry point for tests
+
+ def _do_test(self,
+ test_name, # Name of test
+ exch_name = "amq.direct", # Remote exchange name
+ exch_type = "direct", # Remote exchange type
+ exch_alt_exch = "", # Remote exchange alternate exchange
+ exch_alt_exch_type = "direct", # Remote exchange alternate exchange type
+ exch_durable_flag = False, # Remote exchange durability
+ exch_auto_delete_flag = False, # Remote exchange auto-delete property
+ exch_x_args = {}, # Remote exchange args
+ queue_alt_exch = "", # Remote queue alternate exchange
+ queue_alt_exch_type = "direct", # Remote queue alternate exchange type
+ queue_durable_flag = False, # Remote queue durability
+ queue_exclusive_flag = False, # Remote queue exclusive property
+ queue_auto_delete_flag = False, # Remote queue auto-delete property
+ queue_x_args = {}, # Remote queue args
+ binding_durable_flag = False, # Remote binding durability
+ binding_x_args = {}, # Remote binding args
+ topic_key = "", # Binding key For remote topic exchanges only
+ msg_count = 10, # Number of messages to send
+ msg_durable_flag = False, # Message durability
+ link_durable_flag = False, # Route link durability
+ bridge_durable_flag = False, # Route bridge durability
+ queue_route_type_flag = False, # Route type: false = bridge route, true = queue route
+ enq_txn_size = 0, # Enqueue transaction size, 0 = no transactions
+ deq_txn_size = 0, # Dequeue transaction size, 0 = no transactions
+ local_cluster_flag = False, # Use a node from the local cluster, otherwise use single local broker
+ remote_cluster_flag = False, # Use a node from the remote cluster, otherwise use single remote broker
+ alt_exch_op = _alt_exch_ops.create,# Op on alt exch [create (ensure present), delete (ensure not present), none (neither create nor delete)]
+ auth_mechanism = "", # Authorization mechanism for linked broker
+ user_id = "", # User ID for authorization on linked broker
+ password = "", # Password for authorization on linked broker
+ transport = "tcp" # Transport for route to linked broker
+ ):
+ """
+ Parameterized federation test. Sets up a federated link between a source broker and a destination broker and
+ checks that messages correctly pass over the link to the destination. Where appropriate (non-queue-routes), also
+ checks for the presence of messages on the source broker.
+
+ In these tests, the concept is to create a LOCAL broker, then create a link to a REMOTE broker using federation.
+ In other words, the messages sent to the LOCAL broker will be replicated on the REMOTE broker, and tests are
+ performed on the REMOTE broker to check that the required messages are present. In the case of regular routes,
+ the LOCAL broker will also retain the messages, and a similar test is performed on this broker.
+
+ TODO: There are several items to improve here:
+ 1. _do_test() is rather general. Rather create a version for each exchange type and test the exchange/queue
+ interaction in more detail based on the exchange type
+ 2. Add a headers and an xml exchange type
+ 3. Restructure the tests to start and stop brokers and clusters directly rather than relying on previously
+ started brokers. Then persistence can be checked by stopping and restarting the brokers/clusters. In particular,
+ test the persistence of links and bridges, both of which take a persistence flag.
+ 4. Test the behavior of the alternate exchanges when messages are sourced through a link. Also check behavior
+ when the alternate exchange is not present or is deleted after the reference is made.
+ 5. Test special queue types (eg LVQ)
+ """
+ local_broker = self._get_broker(local_cluster_flag, "local-port", "local-cluster-ports")
+ remote_broker = self._get_broker(remote_cluster_flag, "remote-port", "remote-cluster-ports")
+
+ # Check alternate exchanges exist (and create them if not) on both local and remote brokers
+ self._check_alt_exchange(local_broker.qmf_broker, exch_alt_exch, exch_alt_exch_type, alt_exch_op)
+ self._check_alt_exchange(local_broker.qmf_broker, queue_alt_exch, queue_alt_exch_type, alt_exch_op)
+ self._check_alt_exchange(remote_broker.qmf_broker, exch_alt_exch, exch_alt_exch_type, alt_exch_op)
+ self._check_alt_exchange(remote_broker.qmf_broker, queue_alt_exch, queue_alt_exch_type, alt_exch_op)
+
+ queue_name = "queue_%s" % test_name
+ exchange_args = {"name": exch_name, "type": exch_type, "alternate": exch_alt_exch,
+ "durable": exch_durable_flag, "auto_delete": exch_auto_delete_flag, "args": exch_x_args}
+ queue_args = {"name": queue_name, "alternate_exchange": queue_alt_exch, "durable": queue_durable_flag,
+ "exclusive": queue_exclusive_flag, "auto_delete": queue_auto_delete_flag, "args": queue_x_args}
+ binding_args = {"binding_args": binding_x_args}
+ if exch_type == "topic":
+ self.assertTrue(len(topic_key) > 0, "Topic exchange selected, but no topic key was set.")
+ binding_args["binding_key"] = topic_key
+ elif exch_type == "direct":
+ binding_args["binding_key"] = queue_name
+ else:
+ binding_args["binding_key"] = ""
+ self._create_and_bind(qmf_broker=local_broker.qmf_broker, exchange_args=exchange_args, queue_args=queue_args, binding_args=binding_args)
+ self._create_and_bind(qmf_broker=remote_broker.qmf_broker, exchange_args=exchange_args, queue_args=queue_args, binding_args=binding_args)
+ self._create_route(queue_route_type_flag, local_broker, remote_broker, exch_name, queue_name, topic_key,
+ link_durable_flag, bridge_durable_flag, auth_mechanism, user_id, password, transport)
+
+ self._send_msgs("send_session", local_broker, addr = self._get_send_address(exch_name, queue_name),
+ msg_count = msg_count, topic_key = topic_key, msg_durable_flag = msg_durable_flag, enq_txn_size = enq_txn_size)
+ if not queue_route_type_flag:
+ self._receive_msgs("local_receive_session", local_broker, addr = queue_name, msg_count = msg_count, deq_txn_size = deq_txn_size)
+ self._receive_msgs("remote_receive_session", remote_broker, addr = queue_name, msg_count = msg_count, deq_txn_size = deq_txn_size, timeout = 5)
+
+ # Clean up
+ self._delete_queue_binding(qmf_broker=local_broker.qmf_broker, exchange_args=exchange_args, queue_args=queue_args, binding_args=binding_args)
+ self._delete_queue_binding(qmf_broker=remote_broker.qmf_broker, exchange_args=exchange_args, queue_args=queue_args, binding_args=binding_args)
+
+class A_ShortTests(QmfTestBase010):
+
+ def test_route_defaultExch(self):
+ self._do_test(self._get_name())
+
+ def test_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True)
+
+
+class A_LongTests(QmfTestBase010):
+
+ def test_route_amqDirectExch(self):
+ self._do_test(self._get_name(), exch_name="amq.direct")
+
+ def test_queueRoute_amqDirectExch(self):
+ self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True)
+
+
+ def test_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange")
+
+ def test_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True)
+
+
+ def test_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout")
+
+ def test_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True)
+
+
+ def test_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#")
+
+ def test_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True)
+
+
+class B_ShortTransactionTests(QmfTestBase010):
+
+ def test_txEnq01_route_defaultExch(self):
+ self._do_test(self._get_name(), enq_txn_size=1)
+
+ def test_txEnq01_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_txDeq01_route_defaultExch(self):
+ self._do_test(self._get_name(), enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+
+class B_LongTransactionTests(QmfTestBase010):
+
+ def test_txEnq10_route_defaultExch(self):
+ self._do_test(self._get_name(), enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
+
+
+
+
+ def test_txEnq01_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1)
+
+ def test_txEnq01_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1)
+
+ def test_txEnq10_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq01_txDeq01_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+
+ def test_txEnq01_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1)
+
+ def test_txEnq01_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1)
+
+ def test_txEnq10_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq01_txDeq01_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+
+ def test_txEnq01_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1)
+
+ def test_txEnq01_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1)
+
+ def test_txEnq10_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq01_txDeq01_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+
+class C_ShortClusterTests(QmfTestBase010):
+
+ def test_locCluster_route_defaultExch(self):
+ self._do_test(self._get_name(), local_cluster_flag=True)
+
+ def test_locCluster_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, local_cluster_flag=True)
+
+ def test_remCluster_route_defaultExch(self):
+ self._do_test(self._get_name(), remote_cluster_flag=True)
+
+ def test_remCluster_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_route_defaultExch(self):
+ self._do_test(self._get_name(), local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+class C_LongClusterTests(QmfTestBase010):
+
+ def test_locCluster_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", local_cluster_flag=True)
+
+ def test_locCluster_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, local_cluster_flag=True)
+
+ def test_remCluster_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", remote_cluster_flag=True)
+
+ def test_remCluster_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+ def test_locCluster_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", local_cluster_flag=True)
+
+ def test_locCluster_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, local_cluster_flag=True)
+
+ def test_remCluster_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", remote_cluster_flag=True)
+
+ def test_remCluster_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+ def test_locCluster_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", local_cluster_flag=True)
+
+ def test_locCluster_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, local_cluster_flag=True)
+
+ def test_remCluster_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", remote_cluster_flag=True)
+
+ def test_remCluster_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+class D_ShortClusterTransactionTests(QmfTestBase010):
+
+ def test_txEnq01_locCluster_route_defaultExch(self):
+ self._do_test(self._get_name(), enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_route_defaultExch(self):
+ self._do_test(self._get_name(), enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_remCluster_route_defaultExch(self):
+ self._do_test(self._get_name(), enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_route_defaultExch(self):
+ self._do_test(self._get_name(), enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_route_defaultExch(self):
+ self._do_test(self._get_name(), enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_route_defaultExch(self):
+ self._do_test(self._get_name(), enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+class D_LongClusterTransactionTests(QmfTestBase010):
+
+ def test_txEnq10_locCluster_route_defaultExch(self):
+ self._do_test(self._get_name(), enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_remCluster_route_defaultExch(self):
+ self._do_test(self._get_name(), enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_route_defaultExch(self):
+ self._do_test(self._get_name(), enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_queueRoute_defaultExch(self):
+ self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+ def test_txEnq01_locCluster_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_remCluster_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_route_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+ def test_txEnq01_locCluster_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_remCluster_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_route_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+ def test_txEnq01_locCluster_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_remCluster_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_route_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+class E_ShortPersistenceTests(QmfTestBase010):
+
+ def test_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True)
+
+ def test_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True)
+
+ def test_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True)
+
+ def test_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True)
+
+
+class E_LongPersistenceTests(QmfTestBase010):
+
+
+ def test_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True)
+
+ def test_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True)
+
+ def test_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True)
+
+ def test_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True)
+
+
+ def test_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True)
+
+ def test_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True)
+
+ def test_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True)
+
+ def test_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True)
+
+
+ def test_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True)
+
+ def test_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True)
+
+ def test_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True)
+
+ def test_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True)
+
+
+class F_ShortPersistenceTransactionTests(QmfTestBase010):
+
+ def test_txEnq01_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_txDeq01_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+
+class F_LongPersistenceTransactionTests(QmfTestBase010):
+
+ def test_txEnq10_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
+
+
+
+
+ def test_txEnq01_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1)
+
+ def test_txEnq10_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq01_txDeq01_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+
+ def test_txEnq01_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1)
+
+ def test_txEnq10_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq01_txDeq01_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+
+ def test_txEnq01_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1)
+
+ def test_txEnq01_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1)
+
+ def test_txEnq10_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq10_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
+
+ def test_txEnq01_txDeq01_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+ def test_txEnq01_txDeq01_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
+
+
+class G_ShortPersistenceClusterTests(QmfTestBase010):
+
+ def test_locCluster_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, local_cluster_flag=True)
+
+ def test_locCluster_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True)
+
+ def test_locCluster_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True)
+
+ def test_locCluster_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True)
+
+ def test_remCluster_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, remote_cluster_flag=True)
+
+ def test_remCluster_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, remote_cluster_flag=True)
+
+ def test_remCluster_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True)
+
+ def test_remCluster_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+class G_LongPersistenceClusterTests(QmfTestBase010):
+
+
+
+ def test_locCluster_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, local_cluster_flag=True)
+
+ def test_locCluster_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True)
+
+ def test_locCluster_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True)
+
+ def test_locCluster_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True)
+
+ def test_remCluster_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, remote_cluster_flag=True)
+
+ def test_remCluster_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, remote_cluster_flag=True)
+
+ def test_remCluster_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True)
+
+ def test_remCluster_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+ def test_locCluster_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, local_cluster_flag=True)
+
+ def test_locCluster_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True)
+
+ def test_locCluster_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True)
+
+ def test_locCluster_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True)
+
+ def test_remCluster_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, remote_cluster_flag=True)
+
+ def test_remCluster_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, remote_cluster_flag=True)
+
+ def test_remCluster_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True)
+
+ def test_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+ def test_locCluster_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, local_cluster_flag=True)
+
+ def test_locCluster_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True)
+
+ def test_locCluster_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True)
+
+ def test_locCluster_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True)
+
+ def test_remCluster_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, remote_cluster_flag=True)
+
+ def test_remCluster_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, remote_cluster_flag=True)
+
+ def test_remCluster_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True)
+
+ def test_remCluster_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_locCluster_remCluster_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+class H_ShortPersistenceClusterTransactionTests(QmfTestBase010):
+
+ def test_txEnq01_locCluster_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_remCluster_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+class H_LongPersistenceClusterTransactionTests(QmfTestBase010):
+
+ def test_txEnq10_locCluster_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_remCluster_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_route_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_route_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_queueRoute_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_queueRoute_durMsg_durQueue_defaultExch(self):
+ self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+
+
+ def test_txEnq01_locCluster_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_remCluster_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_route_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_route_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durMsg_durQueue_directExch(self):
+ self._do_test(self._get_name(), exch_name="testDirectExchange", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+ def test_txEnq01_locCluster_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_remCluster_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_route_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_route_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durMsg_durQueue_fanoutExch(self):
+ self._do_test(self._get_name(), exch_name="testFanoutExchange", exch_type="fanout", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+
+ def test_txEnq01_locCluster_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_locCluster_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq10_locCluster_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
+
+ def test_txEnq01_remCluster_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_remCluster_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq10_remCluster_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_remCluster_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_locCluster_remCluster_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq10_locCluster_remCluster_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_route_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_route_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
+ def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durMsg_durQueue_topicExch(self):
+ self._do_test(self._get_name(), exch_name="testTopicExchange", exch_type="topic", topic_key=self._get_name()+".#", msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
+
diff --git a/qpid/cpp/src/tests/ipv6_test b/qpid/cpp/src/tests/ipv6_test
new file mode 100755
index 0000000000..d75d50fd0a
--- /dev/null
+++ b/qpid/cpp/src/tests/ipv6_test
@@ -0,0 +1,150 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Run a simple test over IPv6
+source ./test_env.sh
+
+CONFIG=$(dirname $0)/config.null
+TEST_HOSTNAME=::1
+COUNT=10
+
+trap cleanup EXIT
+
+error() { echo $*; exit 1; }
+
+# Don't need --no-module-dir or --no-data-dir as they are set as env vars in test_env.sh
+COMMON_OPTS="--daemon --auth no --config $CONFIG"
+
+# Record all broker ports started
+unset PORTS
+declare -a PORTS
+
+# Start new brokers:
+# $1 must be integer
+# $2 = extra opts
+# Append used ports to PORTS variable
+start_brokers() {
+ local -a ports
+ for (( i=0; $i<$1; i++)) do
+ ports[$i]=$($QPIDD_EXEC --port 0 $COMMON_OPTS $2)
+ done
+ PORTS=( ${PORTS[@]} ${ports[@]} )
+}
+
+stop_brokers() {
+ for port in "${PORTS[@]}";
+ do
+ $QPIDD_EXEC -qp $port
+ done
+ PORTS=()
+}
+
+cleanup() {
+ stop_brokers
+}
+
+start_brokers 1
+PORT=${PORTS[0]}
+echo "Started IPv6 smoke perftest on broker port $PORT"
+
+## Test connection via connection settings
+./qpid-perftest --count ${COUNT} --port ${PORT} -b $TEST_HOSTNAME --summary
+
+## Test connection with a URL
+URL="amqp:[$TEST_HOSTNAME]:$PORT"
+
+./qpid-send -b $URL --content-string=hello -a "foo;{create:always}"
+MSG=`./qpid-receive -b $URL -a "foo;{create:always}" --messages 1`
+test "$MSG" = "hello" || { echo "receive failed '$MSG' != 'hello'"; exit 1; }
+
+stop_brokers
+
+# Federation smoke test follows
+
+# Start 2 brokers
+
+# In a distribution, the python tools will be absent.
+if [ ! -f $QPID_CONFIG_EXEC ] || [ ! -f $QPID_ROUTE_EXEC ] ; then
+ echo "python tools absent - skipping federation test."
+else
+
+ start_brokers 2
+ echo "Started Federated brokers on ports ${PORTS[*]}"
+ # Make broker urls
+ BROKER0="[::1]:${PORTS[0]}"
+ BROKER1="[::1]:${PORTS[1]}"
+ TEST_QUEUE=ipv6-fed-test
+
+ $QPID_CONFIG_EXEC -a $BROKER0 add queue $TEST_QUEUE
+ $QPID_CONFIG_EXEC -a $BROKER1 add queue $TEST_QUEUE
+ $QPID_ROUTE_EXEC dynamic add $BROKER1 $BROKER0 amq.direct
+ $QPID_CONFIG_EXEC -a $BROKER1 bind amq.direct $TEST_QUEUE $TEST_QUEUE
+ $QPID_ROUTE_EXEC route map $BROKER1
+
+ ./datagen --count 100 | tee rdata-in |
+ ./qpid-send -b amqp:$BROKER0 -a amq.direct/$TEST_QUEUE --content-stdin
+ ./qpid-receive -b amqp:$BROKER1 -a $TEST_QUEUE --print-content yes -m 0 > rdata-out
+
+ cmp rdata-in rdata-out || { echo "Federated data over IPv6 does not compare"; exit 1; }
+
+ stop_brokers
+ rm rdata-in rdata-out
+fi
+
+# Cluster smoke test follows
+test -z $CLUSTER_LIB && exit 0 # Exit if cluster not supported.
+
+## Test failover in a cluster using IPv6 only
+. $srcdir/ais_check # Will exit if clustering not enabled.
+
+pick_port() {
+ # We need a fixed port to set --cluster-url. Use qpidd to pick a free port.
+ # Note this method is racy
+ PICK=$($QPIDD_EXEC -dp0)
+ $QPIDD_EXEC -qp $PICK
+ echo $PICK
+}
+
+ssl_cluster_broker() { # $1 = port
+ $QPIDD_EXEC $COMMON_OPTS --load-module $CLUSTER_LIB --cluster-name ipv6_test.$HOSTNAME.$$ --cluster-url amqp:[$TEST_HOSTNAME]:$1 --port $1
+ # Wait for broker to be ready
+ ./qpid-ping -b $TEST_HOSTNAME -qp $1 || { echo "Cannot connect to broker on $1"; exit 1; }
+ echo "Running IPv6 cluster broker on port $1"
+}
+
+PORT1=`pick_port`; ssl_cluster_broker $PORT1
+PORT2=`pick_port`; ssl_cluster_broker $PORT2
+
+# Pipe receive output to uniq to remove duplicates
+./qpid-receive --connection-options "{reconnect:true, reconnect-timeout:5}" --failover-updates -b amqp:[$TEST_HOSTNAME]:$PORT1 -a "foo;{create:always}" -f | uniq > ssl_test_receive.tmp &
+
+./qpid-send -b amqp:[$TEST_HOSTNAME]:$PORT2 --content-string=one -a "foo;{create:always}"
+
+$QPIDD_EXEC -qp $PORT1 # Kill broker 1 receiver should fail-over.
+./qpid-send -b amqp:[$TEST_HOSTNAME]:$PORT2 --content-string=two -a "foo;{create:always}" --send-eos 1
+wait # Wait for qpid-receive
+{ echo one; echo two; } > ssl_test_receive.cmp
+diff ssl_test_receive.tmp ssl_test_receive.cmp || { echo "Failover failed"; exit 1; }
+
+$QPIDD_EXEC -qp $PORT2
+
+rm -f ssl_test_receive.*
+
diff --git a/qpid/cpp/src/tests/qpid-cpp-benchmark b/qpid/cpp/src/tests/qpid-cpp-benchmark
index 6138108558..300d34774f 100755
--- a/qpid/cpp/src/tests/qpid-cpp-benchmark
+++ b/qpid/cpp/src/tests/qpid-cpp-benchmark
@@ -215,7 +215,8 @@ class ReadyReceiver:
raise Exception("Receiver error: %s"%(out))
raise Exception("Timed out waiting for receivers to be ready")
-def flatten(l): return sum(map(lambda s: s.split(","), l),[])
+def flatten(l):
+ return sum(map(lambda s: re.split(re.compile("\s*,\s*|\s+"), s), l), [])
class RoundRobin:
def __init__(self,items):
diff --git a/qpid/cpp/src/tests/qpid-perftest.cpp b/qpid/cpp/src/tests/qpid-perftest.cpp
index 8a5cf05775..3aff742c62 100644
--- a/qpid/cpp/src/tests/qpid-perftest.cpp
+++ b/qpid/cpp/src/tests/qpid-perftest.cpp
@@ -396,7 +396,7 @@ struct Controller : public Client {
void run() { // Controller
try {
// Wait for subscribers to be ready.
- process(opts.totalSubs, fqn("sub_ready"), bind(expect, _1, "ready"));
+ process(opts.totalSubs, fqn("sub_ready"), boost::bind(expect, _1, "ready"));
LocalQueue pubDone;
LocalQueue subDone;
@@ -510,10 +510,11 @@ struct PublishThread : public Client {
}
SubscriptionManager subs(session);
LocalQueue lq;
- subs.setFlowControl(1, SubscriptionManager::UNLIMITED, true);
- subs.subscribe(lq, fqn("pub_start"));
+ subs.setFlowControl(0, SubscriptionManager::UNLIMITED, false);
+ Subscription cs = subs.subscribe(lq, fqn("pub_start"));
for (size_t j = 0; j < opts.iterations; ++j) {
+ cs.grantMessageCredit(1);
expect(lq.pop().getData(), "start");
AbsTime start=now();
for (size_t i=0; i<opts.count; i++) {
diff --git a/qpid/cpp/src/tests/run_federation_sys_tests b/qpid/cpp/src/tests/run_federation_sys_tests
new file mode 100755
index 0000000000..f5f772d72e
--- /dev/null
+++ b/qpid/cpp/src/tests/run_federation_sys_tests
@@ -0,0 +1,97 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Run the federation system tests.
+
+source ./test_env.sh
+
+MODULENAME=federation_sys
+
+# Test for clustering
+ps -u root | grep 'aisexec\|corosync' > /dev/null
+if (( $? == 0 )); then
+ CLUSTERING_ENABLED=1
+else
+ echo "WARNING: No clustering detected; tests using it will be ignored."
+fi
+
+# Test for long test
+if [[ "$1" == "LONG_TEST" ]]; then
+ USE_LONG_TEST=1
+ shift # get rid of this param so it is not treated as a test name
+fi
+
+trap stop_brokers INT TERM QUIT
+
+SKIPTESTS="-i federation_sys.E_* -i federation_sys.F_* -i federation_sys.G_* -i federation_sys.H_*"
+if [ -z ${USE_LONG_TEST} ]; then
+ SKIPTESTS="-i federation_sys.A_Long* -i federation_sys.B_Long* ${SKIPTESTS}"
+fi
+echo "WARNING: Tests using persistence will be ignored."
+if [ -z ${CLUSTERING_ENABLED} ]; then
+ SKIPTESTS="${SKIPTESTS} -i federation_sys.C_* -i federation_sys.D_*"
+elif [ -z ${USE_LONG_TEST} ]; then
+ SKIPTESTS="${SKIPTESTS} -i federation_sys.C_Long* -i federation_sys.D_Long*"
+fi
+
+start_brokers() {
+ start_broker() {
+ ${QPIDD_EXEC} --daemon --port 0 --auth no --no-data-dir $1 > qpidd.port
+ PORT=`cat qpidd.port`
+ eval "$2=${PORT}"
+ }
+ start_broker "" LOCAL_PORT
+ start_broker "" REMOTE_PORT
+ if [ -n "${CLUSTERING_ENABLED}" ]; then
+ start_broker "--load-module ${CLUSTER_LIB} --cluster-name test-cluster-1" CLUSTER_C1_1
+ start_broker "--load-module ${CLUSTER_LIB} --cluster-name test-cluster-1" CLUSTER_C1_2
+ start_broker "--load-module ${CLUSTER_LIB} --cluster-name test-cluster-2" CLUSTER_C2_1
+ start_broker "--load-module ${CLUSTER_LIB} --cluster-name test-cluster-2" CLUSTER_C2_2
+ fi
+ rm qpidd.port
+}
+
+stop_brokers() {
+ ${QPIDD_EXEC} -q --port ${LOCAL_PORT}
+ ${QPIDD_EXEC} -q --port ${REMOTE_PORT}
+ if [ -n "${CLUSTERING_ENABLED}" ]; then
+ ${QPID_CLUSTER_EXEC} --all-stop --force localhost:${CLUSTER_C1_1}
+ ${QPID_CLUSTER_EXEC} --all-stop --force localhost:${CLUSTER_C2_1}
+ fi
+}
+
+if test -d ${PYTHON_DIR} ; then
+ start_brokers
+ if [ -z ${CLUSTERING_ENABLED} ]; then
+ echo "Running federation tests using brokers on local port ${LOCAL_PORT}, remote port ${REMOTE_PORT} (NOTE: clustering is DISABLED)"
+ else
+ echo "Running federation tests using brokers on local port ${LOCAL_PORT}, remote port ${REMOTE_PORT}, local cluster nodes ${CLUSTER_C1_1} ${CLUSTER_C1_2}, remote cluster nodes ${CLUSTER_C2_1} ${CLUSTER_C2_2}"
+ fi
+ if [ -z ${USE_LONG_TEST} ]; then
+ echo "NOTE: To run a full set of federation system tests, use \"make check-long\". To test with persistence, run the store version of this script."
+ fi
+ ${QPID_PYTHON_TEST} -m ${MODULENAME} ${SKIPTESTS} -b localhost:${REMOTE_PORT} -Dlocal-port=${LOCAL_PORT} -Dremote-port=${REMOTE_PORT} -Dlocal-cluster-ports="${CLUSTER_C1_1} ${CLUSTER_C1_2}" -Dremote-cluster-ports="${CLUSTER_C2_1} ${CLUSTER_C2_2}" $@
+ RETCODE=$?
+ stop_brokers
+ if test x${RETCODE} != x0; then
+ echo "FAIL federation tests"; exit 1;
+ fi
+fi
diff --git a/qpid/cpp/src/tests/run_federation_tests b/qpid/cpp/src/tests/run_federation_tests
index 590f74746e..14af4807ba 100755
--- a/qpid/cpp/src/tests/run_federation_tests
+++ b/qpid/cpp/src/tests/run_federation_tests
@@ -55,7 +55,7 @@ stop_brokers() {
if test -d ${PYTHON_DIR} ; then
start_brokers
echo "Running federation tests using brokers on ports $LOCAL_PORT $REMOTE_PORT $REMOTE_B1 $REMOTE_B2"
- $QPID_PYTHON_TEST -m federation $SKIPTESTS -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dextra-brokers="$REMOTE_B1 $REMOTE_B2" $@
+ $QPID_PYTHON_TEST -m federation "$SKIPTESTS" -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dextra-brokers="$REMOTE_B1 $REMOTE_B2" $@
RETCODE=$?
stop_brokers
if test x$RETCODE != x0; then
diff --git a/qpid/java/broker/etc/access b/qpid/cpp/src/tests/run_long_federation_sys_tests
index 58b7443fa9..69dc08d11c 100644
--- a/qpid/java/broker/etc/access
+++ b/qpid/cpp/src/tests/run_long_federation_sys_tests
@@ -1,19 +1,24 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-guest:localhost(rw),test(rw) \ No newline at end of file
+#! /bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Run the federation system tests (long version).
+
+./run_federation_sys_tests LONG_TEST $@
diff --git a/qpid/cpp/src/tests/run_store_tests.ps1 b/qpid/cpp/src/tests/run_store_tests.ps1
index 76b46737f0..b2f0b1ccd8 100644
--- a/qpid/cpp/src/tests/run_store_tests.ps1
+++ b/qpid/cpp/src/tests/run_store_tests.ps1
@@ -111,7 +111,7 @@ Invoke-Expression "$prog --quit --port $env:QPID_PORT" | Write-Output
# Test 2... store.py starts/stops/restarts its own brokers
$tests = "*"
-$env:PYTHONPATH="$PYTHON_DIR;$srcdir"
+$env:PYTHONPATH="$PYTHON_DIR;$QMF_LIB;$srcdir"
$env:QPIDD_EXEC="$prog"
$env:STORE_LIB="$store_dir\store$suffix.dll"
if ($test_store -eq "MSSQL") {
diff --git a/qpid/cpp/src/tests/sasl_test_setup.sh b/qpid/cpp/src/tests/sasl_test_setup.sh
index 6395ba6ec3..3e69c0f02b 100755
--- a/qpid/cpp/src/tests/sasl_test_setup.sh
+++ b/qpid/cpp/src/tests/sasl_test_setup.sh
@@ -30,6 +30,7 @@ pwcheck_method: auxprop
auxprop_plugin: sasldb
sasldb_path: $PWD/sasl_config/qpidd.sasldb
sql_select: dummy select
+mech_list: ANONYMOUS PLAIN DIGEST-MD5 EXTERNAL
EOF
# Populate temporary sasl db.
diff --git a/qpid/cpp/src/windows/resources/template-resource.rc b/qpid/cpp/src/windows/resources/template-resource.rc
index 725d1c9391..8ca0a90890 100644
--- a/qpid/cpp/src/windows/resources/template-resource.rc
+++ b/qpid/cpp/src/windows/resources/template-resource.rc
@@ -24,7 +24,7 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
-#include "afxres.h"
+#include "windows.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
diff --git a/qpid/cpp/xml/cluster.xml b/qpid/cpp/xml/cluster.xml
index c33f2e4852..899625f5ec 100644
--- a/qpid/cpp/xml/cluster.xml
+++ b/qpid/cpp/xml/cluster.xml
@@ -212,6 +212,30 @@
<field name="name" type="str8"/>
</control>
+ <!-- Dtx transaction state. -->
+ <control name="dtx-start" code="0x1A">
+ <field name="xid" type="str16"/>
+ <field name="ended" type="bit"/>
+ <field name="suspended" type="bit"/>
+ <field name="failed" type="bit"/>
+ <field name="expired" type="bit"/>
+ </control>
+ <control name="dtx-end" code="0x1B"/>
+
+ <control name="dtx-ack" code="0x1C"/>
+
+ <control name="dtx-buffer-ref" code="0x1D">
+ <field name="xid" type="str16"/>
+ <field name="index" type="uint32"/>
+ <field name="suspended" type="bit"/>
+ </control>
+
+ <control name="dtx-work-record" code="0x1E">
+ <field name="xid" type="str16"/>
+ <field name="prepared" type="bit"/>
+ <field name="timeout" type="uint32"/>
+ </control>
+
<!-- Complete a session state update. -->
<control name="session-state" code="0x1F">
<!-- Target session deduced from channel number. -->
@@ -223,6 +247,7 @@
<field name="received" type="sequence-no"/> <!-- Received up to here (>= expected) -->
<field name="unknown-completed" type="sequence-set"/> <!-- Completed but not known to peer. -->
<field name="received-incomplete" type="sequence-set"/> <!-- Received and incomplete -->
+ <field name="dtx-selected" type="bit"/>
</control>
<!-- Complete a shadow connection update. -->
diff --git a/qpid/dotnet/Consumer/Program.cs b/qpid/dotnet/Consumer/Program.cs
deleted file mode 100644
index d9a6224a42..0000000000
--- a/qpid/dotnet/Consumer/Program.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Consumer
-{
- class Program
- {
- static void Main(string[] args)
- {
- Apache.Qpid.Client.Tests.interop.Consumer.Main(args);
- }
- }
-}
diff --git a/qpid/dotnet/Consumer/default.build b/qpid/dotnet/Consumer/default.build
deleted file mode 100644
index 5b1e3166c5..0000000000
--- a/qpid/dotnet/Consumer/default.build
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Consumer" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- unsafe="true"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}\Apache.Qpid.Client.Tests.dll"/>
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/LICENSE.txt b/qpid/dotnet/LICENSE.txt
deleted file mode 100644
index 981d2f83c3..0000000000
--- a/qpid/dotnet/LICENSE.txt
+++ /dev/null
@@ -1,757 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-=========================================================================
-== Saxon XSLT License ==
-=========================================================================
-
-Mozilla Public License Version 1.0
-
-1. Definitions.
-
- 1.1. "Contributor" means each entity that creates or contributes
- to the creation of Modifications.
-
- 1.2. "Contributor Version" means the combination of the
- Original Code, prior Modifications used by a Contributor, and the
- Modifications made by that particular Contributor.
-
- 1.3. "Covered Code" means the Original Code or Modifications
- or the combination of the Original Code and Modifications, in each case
- including portions thereof.
-
- 1.4. "Electronic Distribution Mechanism" means a mechanism
- generally accepted in the software development community for the
- electronic transfer of data.
-
- 1.5. "Executable" means Covered Code in any form other than
- Source Code.
-
- 1.6. "Initial Developer" means the individual or entity
- identified as the Initial Developer in the Source Code notice required by
- Exhibit A.
-
- 1.7. "Larger Work" means a work which combines Covered Code
- or portions thereof with code not governed by the terms of this License.
-
- 1.8. "License" means this document.
-
- 1.9. "Modifications" means any addition to or deletion from
- the substance or structure of either the Original Code or any previous
- Modifications. When Covered Code is released as a series of files, a
- Modification is:
-
- A. Any addition to or deletion from the contents of a file
- containing Original Code or previous Modifications.
-
- B. Any new file that contains any part of the Original
- Code or previous Modifications.
-
- 1.10. "Original Code" means Source Code of computer software
- code which is described in the Source Code notice required by Exhibit
- A as Original Code, and which, at the time of its release under this
- License is not already Covered Code governed by this License.
-
- 1.11. "Source Code" means the preferred form of the Covered
- Code for making modifications to it, including all modules it contains,
- plus any associated interface definition files, scripts used to control
- compilation and installation of an Executable, or a list of source code
- differential comparisons against either the Original Code or another well
- known, available Covered Code of the Contributor's choice. The Source
- Code can be in a compressed or archival form, provided the appropriate
- decompression or de-archiving software is widely available for no charge.
-
- 1.12. "You" means an individual or a legal entity exercising
- rights under, and complying with all of the terms of, this License or a
- future version of this License issued under Section 6.1. For legal
- entities, "You" includes any entity which controls, is controlled by,
- or is under common control with You. For purposes of this definition,
- "control" means (a) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or otherwise,
- or (b) ownership of fifty percent (50%) or more of the outstanding shares
- or beneficial ownership of such entity.
-
-2. Source Code License.
-
- 2.1. The Initial Developer Grant.
-
-
- The Initial Developer hereby grants You a world-wide, royalty-free,
- non-exclusive license, subject to third party intellectual property
- claims:
-
- (a) to use, reproduce, modify, display, perform, sublicense
- and distribute the Original Code (or portions thereof) with or
- without Modifications, or as part of a Larger Work; and
-
- (b) under patents now or hereafter owned or controlled by
- Initial Developer, to make, have made, use and sell ("Utilize") the
- Original Code (or portions thereof), but solely to the extent that
- any such patent is reasonably necessary to enable You to Utilize the
- Original Code (or portions thereof) and not to any greater extent
- that may be necessary to Utilize further Modifications or
- combinations.
-
- 2.2. Contributor Grant.
-
-
- Each Contributor hereby grants You a world-wide, royalty-free,
- non-exclusive license, subject to third party intellectual property
- claims:
-
- (a) to use, reproduce, modify, display, perform, sublicense and
- distribute the Modifications created by such Contributor (or portions
- thereof) either on an unmodified basis, with other Modifications, as
- Covered Code or as part of a Larger Work; and
-
- (b) under patents now or hereafter owned or controlled by
- Contributor, to Utilize the Contributor Version (or portions thereof),
- but solely to the extent that any such patent is reasonably necessary to
- enable You to Utilize the Contributor Version (or portions thereof), and
- not to any greater extent that may be necessary to Utilize further
- Modifications or combinations.
-
-3. Distribution Obligations.
-
- 3.1. Application of License.
-
-
- The Modifications which You create or to which You contribute are
- governed by the terms of this License, including without limitation
- Section 2.2. The Source Code version of Covered Code may be
- distributed only under the terms of this License or a future version of
- this License released under Section 6.1, and You must include a
- copy of this License with every copy of the Source Code You
- distribute. You may not offer or impose any terms on any Source Code
- version that alters or restricts the applicable version of this License
- or the recipients' rights hereunder. However, You may include an
- additional document offering the additional rights described in Section
- 3.5.
-
- 3.2. Availability of Source Code.
-
-
- Any Modification which You create or to which You contribute must be
- made available in Source Code form under the terms of this License either
- on the same media as an Executable version or via an accepted Electronic
- Distribution Mechanism to anyone to whom you made an Executable version
- available; and if made available via Electronic Distribution Mechanism,
- must remain available for at least twelve (12) months after the date it
- initially became available, or at least six (6) months after a subsequent
- version of that particular Modification has been made available to such
- recipients. You are responsible for ensuring that the Source Code version
- remains available even if the Electronic Distribution Mechanism is
- maintained by a third party.
-
- 3.3. Description of Modifications.
-
-
- You must cause all Covered Code to which you contribute to contain a
- file documenting the changes You made to create that Covered Code and the
- date of any change. You must include a prominent statement that the
- Modification is derived, directly or indirectly, from Original Code
- provided by the Initial Developer and including the name of the Initial
- Developer in (a) the Source Code, and (b) in any notice in an Executable
- version or related documentation in which You describe the origin or
- ownership of the Covered Code.
-
- 3.4. Intellectual Property Matters
-
- (a) Third Party Claims.
-
-
- If You have knowledge that a party claims an intellectual
- property right in particular functionality or code (or its
- utilization under this License), you must include a text file with
- the source code distribution titled "LEGAL" which describes the
- claim and the party making the claim in sufficient detail that a
- recipient will know whom to contact. If you obtain such knowledge
- after You make Your Modification available as described in Section
- 3.2, You shall promptly modify the LEGAL file in all copies
- You make available thereafter and shall take other steps (such as
- notifying appropriate mailing lists or newsgroups) reasonably
- calculated to inform those who received the Covered Code that new
- knowledge has been obtained.
-
- (b) Contributor APIs.
-
-
- If Your Modification is an application programming interface and
- You own or control patents which are reasonably necessary to
- implement that API, you must also include this information in the
- LEGAL file.
-
- 3.5. Required Notices.
-
-
- You must duplicate the notice in Exhibit A in each file of the
- Source Code, and this License in any documentation for the Source Code,
- where You describe recipients' rights relating to Covered Code. If You
- created one or more Modification(s), You may add your name as a
- Contributor to the notice described in Exhibit A. If it is not
- possible to put such notice in a particular Source Code file due to its
- structure, then you must include such notice in a location (such as a
- relevant directory file) where a user would be likely to look for such a
- notice. You may choose to offer, and to charge a fee for, warranty,
- support, indemnity or liability obligations to one or more recipients of
- Covered Code. However, You may do so only on Your own behalf, and not on
- behalf of the Initial Developer or any Contributor. You must make it
- absolutely clear than any such warranty, support, indemnity or liability
- obligation is offered by You alone, and You hereby agree to indemnify the
- Initial Developer and every Contributor for any liability incurred by the
- Initial Developer or such Contributor as a result of warranty, support,
- indemnity or liability terms You offer.
-
- 3.6. Distribution of Executable Versions.
-
-
- You may distribute Covered Code in Executable form only if the
- requirements of Section 3.1-3.5 have been met for that Covered
- Code, and if You include a notice stating that the Source Code version of
- the Covered Code is available under the terms of this License, including
- a description of how and where You have fulfilled the obligations of
- Section 3.2. The notice must be conspicuously included in any
- notice in an Executable version, related documentation or collateral in
- which You describe recipients' rights relating to the Covered Code. You
- may distribute the Executable version of Covered Code under a license of
- Your choice, which may contain terms different from this License,
- provided that You are in compliance with the terms of this License and
- that the license for the Executable version does not attempt to limit or
- alter the recipient's rights in the Source Code version from the rights
- set forth in this License. If You distribute the Executable version under
- a different license You must make it absolutely clear that any terms
- which differ from this License are offered by You alone, not by the
- Initial Developer or any Contributor. You hereby agree to indemnify the
- Initial Developer and every Contributor for any liability incurred by the
- Initial Developer or such Contributor as a result of any such terms You
- offer.
-
- 3.7. Larger Works.
-
-
- You may create a Larger Work by combining Covered Code with other
- code not governed by the terms of this License and distribute the Larger
- Work as a single product. In such a case, You must make sure the
- requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
- If it is impossible for You to comply with any of the terms of this
- License with respect to some or all of the Covered Code due to statute or
- regulation then You must: (a) comply with the terms of this License to
- the maximum extent possible; and (b) describe the limitations and the
- code they affect. Such description must be included in the LEGAL file
- described in Section 3.4 and must be included with all
- distributions of the Source Code. Except to the extent prohibited by
- statute or regulation, such description must be sufficiently detailed for
- a recipient of ordinary skill
- to be able to understand it.
-
-5. Application of this License.
-
- This License applies to code to which the Initial Developer has attached
- the notice in Exhibit A, and to related Covered Code.
-
-6. Versions of the License.
-
- 6.1. New Versions.
-
-
- Netscape Communications Corporation ("Netscape") may publish
- revised and/or new versions of the License from time to time. Each
- version will be given a distinguishing version number.
-
- 6.2. Effect of New Versions.
-
-
- Once Covered Code has been published under a particular version of
- the License, You may always continue to use it under the terms of that
- version. You may also choose to use such Covered Code under the terms of
- any subsequent version of the License published by Netscape. No one other
- than Netscape has the right to modify the terms applicable to Covered
- Code created under this License.
-
- 6.3. Derivative Works.
-
-
- If you create or use a modified version of this License (which you
- may only do in order to apply it to code which is not already Covered
- Code governed by this License), you must (a) rename Your license so that
- the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "NPL"
- or any confusingly similar phrase do not appear anywhere in your license
- and (b) otherwise make it clear that your version of the license contains
- terms which differ from the Mozilla Public License and Netscape Public
- License. (Filling in the name of the Initial Developer, Original Code or
- Contributor in the notice described in Exhibit A shall not of
- themselves be deemed to be modifications of this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
- COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS,
- MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE
- RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH
- YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
- INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY
- NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY
- CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE
- IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
- This License and the rights granted hereunder will terminate
- automatically if You fail to comply with terms herein and fail to cure
- such breach within 30 days of becoming aware of the breach. All
- sublicenses to the Covered Code which are properly granted shall survive
- any termination of this License. Provisions which, by their nature, must
- remain in effect beyond the termination of this License shall survive.
-
-9. LIMITATION OF LIABILITY.
-
- UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
- NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY
- OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF
- ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY
- INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER
- INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK
- STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
- COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED
- OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL
- NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH
- PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH
- LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION
- OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION
- MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
- The Covered Code is a "commercial item," as that term is defined in 48
- C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software"
- and "commercial computer software documentation," as such terms are
- used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212
- and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all
- U.S. Government End Users acquire Covered Code with only those rights set
- forth herein.
-
-11. MISCELLANEOUS.
-
- This License represents the complete agreement concerning subject matter
- hereof. If any provision of this License is held to be unenforceable,
- such provision shall be reformed only to the extent necessary to make it
- enforceable. This License shall be governed by California law provisions
- (except to the extent applicable law, if any, provides otherwise),
- excluding its conflict-of-law provisions. With respect to disputes in
- which at least one party is a citizen of, or an entity chartered or
- registered to do business in, the United States of America: (a) unless
- otherwise agreed in writing, all disputes relating to this License
- (excepting any dispute relating to intellectual property rights) shall be
- subject to final and binding arbitration, with the losing party paying
- all costs of arbitration; (b) any arbitration relating to this Agreement
- shall be held in Santa Clara County, California, under the auspices of
- JAMS/EndDispute; and (c) any litigation relating to this Agreement shall
- be subject to the jurisdiction of the Federal Courts of the Northern
- District of California, with venue lying in Santa Clara County,
- California, with the losing party responsible for costs, including
- without limitation, court costs and reasonable attorneys fees and
- expenses. The application of the United Nations Convention on Contracts
- for the International Sale of Goods is expressly excluded. Any law or
- regulation which provides that the language of a contract shall be
- construed against the drafter shall not apply to this License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
- Except in cases where another Contributor has failed to comply with
- Section 3.4, You are responsible for damages arising, directly or
- indirectly, out of Your utilization of rights under this License, based
- on the number of copies of Covered Code you made available, the revenues
- you received from utilizing such rights, and other relevant factors. You
- agree to work with affected parties to distribute responsibility on an
- equitable basis.
-
-EXHIBIT A.
-
- "The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- License for the specific language governing rights and limitations under
- the License.
-
- The Original Code is ______________________________________.
-
- The Initial Developer of the Original Code is
- ________________________. Portions created by ______________________ are
- Copyright (C) ______ _______________________. All Rights Reserved.
-
- Contributor(s): ______________________________________."
-
-
-=========================================================================
-== Nunit License ==
-=========================================================================
-Copyright (c) 2002 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov
-Copyright (c) 2000-2002 Philip A. Craig
-
-This software is provided 'as-is', without any express or implied
-warranty. In no event will the authors be held liable for any damages
-arising from the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
-
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
- 3. This notice may not be removed or altered from any source
- distribution.
-
-=========================================================================
-== Mentalis Security LibraryLicense ==
-=========================================================================
-
-Source Code License
-
-Copyright © 2002-2007, The Mentalis.org Team
-All rights reserved.
-http://www.mentalis.org/
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-- Neither the name of the Mentalis.org Team, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=========================================================================
-== AMQP License ==
-=========================================================================
-
- Copyright Notice
- ================
- (c) Copyright JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc.,
- iMatix Corporation, IONA\ufffd Technologies, Red Hat, Inc.,
- TWIST Process Innovations, and 29West Inc. 2006. All rights reserved.
-
- License
- =======
- JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc., iMatix
- Corporation, IONA\ufffd Technologies, Red Hat, Inc., TWIST Process Innovations, and
- 29West Inc. (collectively, the "Authors") each hereby grants to you a worldwide,
- perpetual, royalty-free, nontransferable, nonexclusive license to
- (i) copy, display, and implement the Advanced Messaging Queue Protocol
- ("AMQP") Specification and (ii) the Licensed Claims that are held by
- the Authors, all for the purpose of implementing the Advanced Messaging
- Queue Protocol Specification. Your license and any rights under this
- Agreement will terminate immediately without notice from
- any Author if you bring any claim, suit, demand, or action related to
- the Advanced Messaging Queue Protocol Specification against any Author.
- Upon termination, you shall destroy all copies of the Advanced Messaging
- Queue Protocol Specification in your possession or control.
-
- As used hereunder, "Licensed Claims" means those claims of a patent or
- patent application, throughout the world, excluding design patents and
- design registrations, owned or controlled, or that can be sublicensed
- without fee and in compliance with the requirements of this
- Agreement, by an Author or its affiliates now or at any
- future time and which would necessarily be infringed by implementation
- of the Advanced Messaging Queue Protocol Specification. A claim is
- necessarily infringed hereunder only when it is not possible to avoid
- infringing it because there is no plausible non-infringing alternative
- for implementing the required portions of the Advanced Messaging Queue
- Protocol Specification. Notwithstanding the foregoing, Licensed Claims
- shall not include any claims other than as set forth above even if
- contained in the same patent as Licensed Claims; or that read solely
- on any implementations of any portion of the Advanced Messaging Queue
- Protocol Specification that are not required by the Advanced Messaging
- Queue Protocol Specification, or that, if licensed, would require a
- payment of royalties by the licensor to unaffiliated third parties.
- Moreover, Licensed Claims shall not include (i) any enabling technologies
- that may be necessary to make or use any Licensed Product but are not
- themselves expressly set forth in the Advanced Messaging Queue Protocol
- Specification (e.g., semiconductor manufacturing technology, compiler
- technology, object oriented technology, networking technology, operating
- system technology, and the like); or (ii) the implementation of other
- published standards developed elsewhere and merely referred to in the
- body of the Advanced Messaging Queue Protocol Specification, or
- (iii) any Licensed Product and any combinations thereof the purpose or
- function of which is not required for compliance with the Advanced
- Messaging Queue Protocol Specification. For purposes of this definition,
- the Advanced Messaging Queue Protocol Specification shall be deemed to
- include both architectural and interconnection requirements essential
- for interoperability and may also include supporting source code artifacts
- where such architectural, interconnection requirements and source code
- artifacts are expressly identified as being required or documentation to
- achieve compliance with the Advanced Messaging Queue Protocol Specification.
-
- As used hereunder, "Licensed Products" means only those specific portions
- of products (hardware, software or combinations thereof) that implement
- and are compliant with all relevant portions of the Advanced Messaging
- Queue Protocol Specification.
-
- The following disclaimers, which you hereby also acknowledge as to any
- use you may make of the Advanced Messaging Queue Protocol Specification:
-
- THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION IS PROVIDED "AS IS,"
- AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
- IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE
- CONTENTS OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION ARE
- SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF THE ADVANCED
- MESSAGING QUEUE PROTOCOL SPECIFICATION WILL NOT INFRINGE ANY THIRD PARTY
- PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
- THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
- INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
- USE, IMPLEMENTATION OR DISTRIBUTION OF THE ADVANCED MESSAGING QUEUE
- PROTOCOL SPECIFICATION.
-
- The name and trademarks of the Authors may NOT be used in any manner,
- including advertising or publicity pertaining to the Advanced Messaging
- Queue Protocol Specification or its contents without specific, written
- prior permission. Title to copyright in the Advanced Messaging Queue
- Protocol Specification will at all times remain with the Authors.
-
- No other rights are granted by implication, estoppel or otherwise.
-
- Upon termination of your license or rights under this Agreement, you
- shall destroy all copies of the Advanced Messaging Queue Protocol
- Specification in your possession or control.
-
- Trademarks
- ==========
- "JPMorgan", "JPMorgan Chase", "Chase", the JPMorgan Chase logo and the
- Octagon Symbol are trademarks of JPMorgan Chase & Co.
-
- IMATIX and the iMatix logo are trademarks of iMatix Corporation sprl.
-
- IONA, IONA Technologies, and the IONA logos are trademarks of IONA
- Technologies PLC and/or its subsidiaries.
-
- LINUX is a trademark of Linus Torvalds. RED HAT and JBOSS are registered
- trademarks of Red Hat, Inc. in the US and other countries.
-
- Java, all Java-based trademarks and OpenOffice.org are trademarks of
- Sun Microsystems, Inc. in the United States, other countries, or both.
-
- Other company, product, or service names may be trademarks or service
- marks of others.
-
- Links to full AMQP specification:
- =================================
- http://www.envoytech.org/spec/amq/
- http://www.iona.com/opensource/amqp/
- http://www.redhat.com/solutions/specifications/amqp/
- http://www.twiststandards.org/tiki-index.php?page=AMQ
- http://www.imatix.com/amqp
diff --git a/qpid/dotnet/NOTICE.txt b/qpid/dotnet/NOTICE.txt
deleted file mode 100644
index 0b22ed3ab2..0000000000
--- a/qpid/dotnet/NOTICE.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-=========================================================================
-== NOTICE file corresponding to the section 4 d of ==
-== the Apache License, Version 2.0, ==
-== in this case for the Apache Ant distribution. ==
-=========================================================================
-
-Apache Qpid.NET
-Copyright 2006 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-This product also includes software developed by:
-
- - The SAXON XSLT Processor from Michael Kay distributed under the Mozilla
- Public License v1.0, which is available for download at
- http://saxon.sourceforge.net/
-
- - The nunit library, Copyright © 2002 James W. Newkirk, Michael C. Two,
- Alexei A. Vorontsov or Copyright © 2000-2002 Philip A. Craig. Available
- under terms based on the zlib/libpng licence. Available from
- http://www.nunit.org/
-
- - The Mentalis Security Library, Copyright © 2002-2006, , The Mentalis.org Team
- under tterms based on the BSD license (http://www.mentalis.org/site/license.qpx).
- Available from http://www.mentalis.org/soft/projects/seclib/
-
-This product includes software, Apache Log4Net
-(http://logging.apache.org/log4net)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
-
diff --git a/qpid/dotnet/Producer/Program.cs b/qpid/dotnet/Producer/Program.cs
deleted file mode 100644
index 83dbf597ed..0000000000
--- a/qpid/dotnet/Producer/Program.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Producer
-{
- class Program
- {
- static void Main(string[] args)
- {
- Apache.Qpid.Client.Tests.interop.Producer.Main(args);
- }
- }
-}
diff --git a/qpid/dotnet/Producer/default.build b/qpid/dotnet/Producer/default.build
deleted file mode 100644
index 72d2a3fa8d..0000000000
--- a/qpid/dotnet/Producer/default.build
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Producer" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- unsafe="true"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}\Apache.Qpid.Client.Tests.dll"/>
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/Program.cs b/qpid/dotnet/Program.cs
deleted file mode 100644
index d9a6224a42..0000000000
--- a/qpid/dotnet/Program.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Consumer
-{
- class Program
- {
- static void Main(string[] args)
- {
- Apache.Qpid.Client.Tests.interop.Consumer.Main(args);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Buffer.Tests/Properties/AssemblyInfo.cs b/qpid/dotnet/Qpid.Buffer.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index 2f49033c2d..0000000000
--- a/qpid/dotnet/Qpid.Buffer.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
- using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Apache.Qpid.Buffer.Tests")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Apache.Qpid.Buffer.Tests")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("9d967d0b-9454-4f00-8f53-fa86fd62b696")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/Qpid.Buffer.Tests/Qpid.Buffer.Tests.csproj b/qpid/dotnet/Qpid.Buffer.Tests/Qpid.Buffer.Tests.csproj
deleted file mode 100644
index 72d3ccc82f..0000000000
--- a/qpid/dotnet/Qpid.Buffer.Tests/Qpid.Buffer.Tests.csproj
+++ /dev/null
@@ -1,83 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{74640962-99D0-4D06-B57A-9CD66517CF52}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Apache.Qpid.Buffer.Tests</RootNamespace>
- <AssemblyName>Apache.Qpid.Buffer.Tests</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\net-2.0\debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <UseVSHostingProcess>true</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\net-2.0\release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\Qpid.Client.Tests\lib\nunit\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Qpid.Buffer\Qpid.Buffer.csproj">
- <Project>{44384DF2-B0A4-4580-BDBC-EE4BAA87D995}</Project>
- <Name>Qpid.Buffer</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/Qpid.Buffer.Tests/SimpleByteBufferTests.cs b/qpid/dotnet/Qpid.Buffer.Tests/SimpleByteBufferTests.cs
deleted file mode 100644
index b028bdb1ee..0000000000
--- a/qpid/dotnet/Qpid.Buffer.Tests/SimpleByteBufferTests.cs
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using NUnit.Framework;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Buffer.Tests
-{
- /// <summary>
- /// Tests for the SimpleByteBuffer class
- /// </summary>
- [TestFixture]
- public class SimpleByteBufferTests
- {
- [Test]
- public void CanCreateNewBuffer()
- {
- const int size = 10;
- ByteBuffer buffer = ByteBuffer.Allocate(size);
- Assert.AreEqual(size, buffer.Capacity);
- Assert.AreEqual(0, buffer.Position);
- Assert.AreEqual(size, buffer.Remaining);
- Assert.AreEqual(true, buffer.HasRemaining);
- }
-
- [Test]
- public void CanWrapArray()
- {
- byte[] array = new byte[10];
- for ( int i=0; i < array.Length; i++ )
- {
- array[i] = (byte) i;
- }
- ByteBuffer buffer = ByteBuffer.Wrap(array);
- // the buffer should be the same size,
- // and positioned at the end
- Assert.AreEqual(array.Length, buffer.Capacity);
- Assert.AreEqual(array.Length, buffer.Position);
- Assert.AreEqual(array.Length, buffer.Limit);
- }
-
- #region Base Read/Write tests
- //
- // Base Read/Write tests
- //
- [Test]
- public void CanReadWriteBytes()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- buffer.Put((byte)0x01).Put((byte)0x02).Put((byte)0x03);
- buffer.Rewind();
- Assert.AreEqual(0x01, buffer.GetByte());
- Assert.AreEqual(0x02, buffer.GetByte());
- Assert.AreEqual(0x03, buffer.GetByte());
- }
-
- [Test]
- [ExpectedException(typeof(BufferUnderflowException))]
- public void ThrowOnReadByteWithNoSpace()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(1);
- buffer.Put((byte)0x01);
- buffer.GetByte();
- }
-
- [Test]
- [ExpectedException(typeof(BufferOverflowException))]
- public void ThrowOnWriteByteWithNoSpace()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(1);
- buffer.Put((byte)0x01).Put((byte)0x02);
- }
-
- #endregion Base Read/Write tests
-
- #region Other Buffer Operations
- //
- // Other Buffer Operations
- //
-
- [Test]
- public void CanFlipBuffer()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- buffer.Put((byte)0x01).Put((byte)0x02).Put((byte)0x03);
- buffer.Flip();
- Assert.AreEqual(10, buffer.Capacity);
- Assert.AreEqual(3, buffer.Limit);
- Assert.AreEqual(0, buffer.Position);
- Assert.AreEqual(3, buffer.Remaining);
- }
-
- [Test]
- public void CanCompactBuffer()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- buffer.Put((byte)0x01).Put((byte)0x02).Put((byte)0x03);
- buffer.Flip();
- buffer.Position = 1;
- buffer.Compact();
- Assert.AreEqual(10, buffer.Capacity);
- Assert.AreEqual(10, buffer.Limit);
- Assert.AreEqual(2, buffer.Position);
- Assert.AreEqual(8, buffer.Remaining);
- buffer.Rewind();
- Assert.AreEqual((byte)0x02, buffer.GetByte());
- Assert.AreEqual((byte)0x03, buffer.GetByte());
- }
-
- [Test]
- public void CanClearBuffer()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- buffer.Put((byte)0x01).Put((byte)0x02).Put((byte)0x03);
- buffer.Flip();
- buffer.Position = 2;
- buffer.Clear();
- Assert.AreEqual(10, buffer.Capacity);
- Assert.AreEqual(10, buffer.Limit);
- Assert.AreEqual(0, buffer.Position);
- Assert.AreEqual(10, buffer.Remaining);
- }
-
- [Test]
- public void CanExpandBuffer()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- buffer.Put((byte)0x01).Put((byte)0x02).Put((byte)0x03);
- buffer.Flip();
- buffer.Position = 2;
- int pos = buffer.Position;
- buffer.Expand(20);
-
- Assert.AreEqual(pos, buffer.Position);
- Assert.IsTrue(buffer.Remaining >= 20);
- buffer.Rewind();
- Assert.AreEqual(0x01, buffer.GetByte());
- }
-
- [Test]
- public void CanAutoExpand()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(2);
- buffer.IsAutoExpand = true;
- // should cause autoexpand
- buffer.Put((byte)0x01).Put((byte)0x02).Put((byte)0x03);
- Assert.IsTrue(buffer.Capacity > 2);
- }
-
- [Test]
- public void CanGetArray()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- buffer.Put((byte)0x01).Put((byte)0x02).Put((byte)0x03);
- buffer.Flip();
-
- byte[] array = buffer.Array;
- for ( int i=0; i < buffer.Limit; i++ )
- {
- Assert.AreEqual(buffer.GetByte(), array[i]);
- }
- }
-
- [Test]
- public void CanSkip()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- buffer.Skip(4);
- Assert.AreEqual(4, buffer.Position);
- }
-
- #endregion // Base Read/Write tests
-
- #region Typed Accessors
- //
- // Typed Accessors
- //
- [Test]
- public void CanReadWriteSByte()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- sbyte value = -12;
- buffer.Put(value);
- buffer.Flip();
- Assert.AreEqual(value, buffer.GetSByte());
- }
- [Test]
- public void CanReadWriteUInt16()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- ushort value = 41233;
- buffer.Put(value);
- buffer.Flip();
- Assert.AreEqual(value, buffer.GetUInt16());
- }
- [Test]
- public void CanReadWriteInt16()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- short value = -21233;
- buffer.Put(value);
- buffer.Flip();
- Assert.AreEqual(value, buffer.GetInt16());
- }
- [Test]
- public void CanReadWriteUInt32()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- uint value = 41233211;
- buffer.Put(value);
- buffer.Flip();
- Assert.AreEqual(value, buffer.GetUInt32());
- }
- [Test]
- public void CanReadWriteInt32()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- int value = -22221233;
- buffer.Put(value);
- buffer.Flip();
- Assert.AreEqual(value, buffer.GetInt32());
- }
- [Test]
- public void CanReadWriteUInt64()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- ulong value = 41233218871;
- buffer.Put(value);
- buffer.Flip();
- Assert.AreEqual(value, buffer.GetUInt64());
- }
- [Test]
- public void CanReadWriteInt64()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- long value = -9887335411;
- buffer.Put(value);
- buffer.Flip();
- Assert.AreEqual(value, buffer.GetInt64());
- }
- [Test]
- public void CanReadWriteFloat()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- float value = -1.2331f;
- buffer.Put(value);
- buffer.Flip();
- Assert.AreEqual(value, buffer.GetFloat());
- }
-
- [Test]
- public void CanReadWriteDouble()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- double value = -1.2331E12;
- buffer.Put(value);
- buffer.Flip();
- Assert.AreEqual(value, buffer.GetDouble());
- }
-
- [Test]
- public void CanReadWriteChar()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- char value = 'H';
- buffer.Put(value);
- buffer.Flip();
- Assert.AreEqual(value, buffer.GetChar());
- }
-
- [Test]
- public void CanReadWriteByteArray()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- buffer.Put(new byte[] { 0x01, 0x02, 0x03});
- buffer.Flip();
- byte[] data = new byte[3];
- buffer.GetBytes(data);
- Assert.AreEqual(0x01, data[0]);
- Assert.AreEqual(0x02, data[1]);
- Assert.AreEqual(0x03, data[2]);
- }
-
- [Test]
- public void CanReadWriteByteArrayWithOffset()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(10);
- buffer.Put(new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05 }, 1, 4);
- buffer.Flip();
- byte[] data = new byte[3];
- buffer.GetBytes(data, 2, 1);
- Assert.AreEqual(0x00, data[0]);
- Assert.AreEqual(0x00, data[1]);
- Assert.AreEqual(0x02, data[2]);
- }
-
- [Test]
- public void CanWriteByteBuffer()
- {
- ByteBuffer buffer1 = ByteBuffer.Allocate(10);
- buffer1.Put((byte)0x01).Put((byte)0x02).Put((byte)0x03);
- buffer1.Flip();
-
- ByteBuffer buffer2 = ByteBuffer.Allocate(10);
- buffer2.Put(buffer1);
- buffer2.Flip();
- Assert.AreEqual(buffer1.Limit, buffer2.Limit);
- Assert.AreEqual(0x01, buffer2.GetByte());
- }
- #endregion // Typed Accessors
-
- } // class SimpleByteBufferTests
-}
-
-
diff --git a/qpid/dotnet/Qpid.Buffer.Tests/SlicedByteBufferTests.cs b/qpid/dotnet/Qpid.Buffer.Tests/SlicedByteBufferTests.cs
deleted file mode 100644
index 7dec7c390f..0000000000
--- a/qpid/dotnet/Qpid.Buffer.Tests/SlicedByteBufferTests.cs
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using NUnit.Framework;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Buffer.Tests
-{
- /// <summary>
- /// Tests for the SlicedByteBuffer class
- /// </summary>
- [TestFixture]
- public class SlicedByteBufferTests
- {
- private ByteBuffer _baseBuffer;
-
- [SetUp]
- public void Setup()
- {
- const int size = 50;
- _baseBuffer = ByteBuffer.Allocate(size);
- for ( byte b = 0; b < 10; b++ )
- {
- _baseBuffer.Put(b);
- }
- _baseBuffer.Flip();
- }
-
- [Test]
- public void CanSliceBuffer()
- {
- _baseBuffer.Position = 5;
-
- ByteBuffer slice = _baseBuffer.Slice();
- Assert.AreEqual(5, slice.Capacity);
- Assert.AreEqual(0, slice.Position);
- Assert.AreEqual(5, slice.Remaining);
- Assert.AreEqual(5, slice.Limit);
- }
-
- [Test]
- public void CanReadWriteSlice()
- {
- _baseBuffer.Position = 5;
-
- ByteBuffer slice = _baseBuffer.Slice();
- slice.Put((byte) 0xFF).Put((byte) 0xF0).Put((byte) 0xA0);
- slice.Flip();
-
- Assert.AreEqual(3, slice.Limit);
- Assert.AreEqual(0xFF, slice.GetByte());
- Assert.AreEqual(0xF0, slice.GetByte());
- Assert.AreEqual(0xA0, slice.GetByte());
- }
-
- [Test]
- public void WriteModifiesBaseBufferOnCorrectPosition()
- {
- _baseBuffer.Position = 5;
-
- ByteBuffer slice = _baseBuffer.Slice();
- slice.Put((byte) 0xFF);
- slice.Flip();
- // reading the _baseBuffer at position 5 should yield 0xFF
- _baseBuffer.Position = 5;
- Assert.AreEqual(0xFF, _baseBuffer.GetByte());
-
- }
-
- [Test]
- public void CanReadWriteByteArray()
- {
- _baseBuffer.Position = 5;
-
- ByteBuffer slice = _baseBuffer.Slice();
- byte[] data = {0xFF, 0xF0, 0xF2, 0xEE, 0x23};
- slice.Put(data, 2, 2);
- slice.Flip();
-
- Assert.AreEqual(2, slice.Limit);
- Assert.AreEqual(0xF2, slice.GetByte());
- Assert.AreEqual(0xEE, slice.GetByte());
- }
-
- [Test]
- [ExpectedException(typeof(BufferOverflowException))]
- public void ThrowWhenWritePastLimit()
- {
- _baseBuffer.Position = 5;
-
- ByteBuffer slice = _baseBuffer.Slice();
- slice.Put(0x01).Put(0x02);
- }
-
-
- [Test]
- [ExpectedException(typeof(NotSupportedException))]
- public void ThrowOnCompact()
- {
- // we don't support compacting
- ByteBuffer slice = _baseBuffer.Slice();
- slice.Compact();
- }
-
- [Test]
- [ExpectedException(typeof(NotSupportedException))]
- public void ThrowOnResize()
- {
- // we don't support resizing
- ByteBuffer slice = _baseBuffer.Slice();
- slice.Expand(50);
- }
- } // class SlicedByteBufferTests
-}
diff --git a/qpid/dotnet/Qpid.Buffer.Tests/default.build b/qpid/dotnet/Qpid.Buffer.Tests/default.build
deleted file mode 100644
index 77e95fb9d9..0000000000
--- a/qpid/dotnet/Qpid.Buffer.Tests/default.build
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Apache.Qpid.Buffer" default="test">
-
- <target name="build">
- <csc target="library"
- define="${build.defines}"
- warnaserror="true" debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.Tests.dll">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/nunit.framework.dll" />
- <include name="${build.dir}/${project::get-name()}.dll" />
- </references>
-
- </csc>
- </target>
- <target name="test" depends="build">
- <nunit2>
- <formatter type="${nant.formatter}" usefile="false" />
- <test assemblyname="${build.dir}/${project::get-name()}.Tests.dll" />
- </nunit2>
- </target>
-</project>
-
diff --git a/qpid/dotnet/Qpid.Buffer/ByteBuffer.cs b/qpid/dotnet/Qpid.Buffer/ByteBuffer.cs
deleted file mode 100644
index 67f0edd440..0000000000
--- a/qpid/dotnet/Qpid.Buffer/ByteBuffer.cs
+++ /dev/null
@@ -1,982 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Buffer
-{
- /// <summary>
- /// Abstract class implementing a byte buffer
- /// </summary>
- public abstract class ByteBuffer
- {
- private int _position;
- private int _limit;
- private bool _isAutoExpand;
- private static IByteBufferAllocator _allocator =
- new SimpleByteBufferAllocator();
-
- #region Properties
- //
- // Properties
- //
-
- /// <summary>
- /// The maximum number of bytes the buffer can hold
- /// </summary>
- public abstract int Capacity
- {
- get;
- }
-
- /// <summary>
- /// Return the backing array of this buffer
- /// </summary>
- public abstract byte[] Array
- {
- get;
- }
-
- /// <summary>
- /// The current position inside this buffer
- /// </summary>
- public int Position
- {
- get { return _position; }
- set { Seek(value); }
- }
-
- /// <summary>
- /// Index of the first element that should not be read or written.
- /// A buffer's limit is never negative and is never greater than the its capacity.
- /// </summary>
- public int Limit
- {
- get { return _limit; }
- set { SetLimit(value); }
- }
-
- /// <summary>
- /// Number of bytes remaining in the buffer from the current position
- /// </summary>
- public int Remaining
- {
- get { return Limit - Position; }
- }
-
- /// <summary>
- /// True if there are bytes remaining in the buffer
- /// </summary>
- public bool HasRemaining
- {
- get { return Remaining > 0; }
- }
-
- /// <summary>
- /// If true, the buffer will be resized as necessary
- /// to allow space for writing. By default is false.
- /// </summary>
- public bool IsAutoExpand
- {
- get { return _isAutoExpand; }
- set { _isAutoExpand = value; }
- }
-
- #endregion // Properties
-
- #region Buffer Manipulation
- //
- // Buffer Manipulation
- //
-
- /// <summary>
- /// Move the buffer to Position 0
- /// </summary>
- /// <returns>This instance</returns>
- public ByteBuffer Rewind()
- {
- Seek(0);
- return this;
- }
-
- /// <summary>
- /// Prepare the buffer to read back what's been written
- /// </summary>
- /// <returns>This instance</returns>
- public ByteBuffer Flip()
- {
- Limit = Position;
- Position = 0;
- return this;
- }
-
- /// <summary>
- /// Compact this buffer.
- /// </summary>
- /// <returns>This instance</returns>
- /// <remarks>
- /// The bytes between the buffer's current position and its limit, if any,
- /// are copied to the beginning of the buffer.
- /// </remarks>
- public ByteBuffer Compact()
- {
- DoCompact();
- return this;
- }
-
- /// <summary>
- /// Clears this buffer. The position is set to zero, the limit is set to the capacity
- /// </summary>
- /// <returns>This instance</returns>
- public ByteBuffer Clear()
- {
- Limit = Capacity;
- Position = 0;
- return this;
- }
-
- /// <summary>
- /// Expands this buffer's capacity so that
- /// Remaining == expectedRemaining
- /// </summary>
- /// <param name="expectedRemaining">Number of bytes that should be accessable after resizing</param>
- /// <returns>This instance</returns>
- public ByteBuffer Expand(int expectedRemaining)
- {
- return Expand(Position, expectedRemaining);
- }
-
- /// <summary>
- /// Expands this buffer's capacity so that
- /// Remaining == expectedRemaining
- /// </summary>
- /// <param name="position">Position from which to start the resize</param>
- /// <param name="expectedRemaining">Number of bytes that should be accessable after resizing</param>
- /// <returns>This instance</returns>
- public ByteBuffer Expand(int position, int expectedRemaining)
- {
- if ( expectedRemaining <= 0 )
- throw new ArgumentException("expectedRemaining must be greater than 0");
-
- int end = position + expectedRemaining;
- if ( end > Capacity )
- {
- DoResize(end);
- }
- if ( end > Limit )
- Limit = end;
- return this;
- }
-
- /// <summary>
- /// Creates a new byte buffer whose content is a shared
- /// subsequence of this buffer's content.
- /// </summary>
- /// <remarks>
- /// The content of the new buffer will start at this buffer's current position.
- /// Changes to this buffer's content will be visible in the new buffer,
- /// and vice versa; the two buffers' position and limit values will be independent.
- /// <para>
- /// The new buffer's position will be zero, its capacity and its limit will
- /// be the number of bytes remaining in this buffer.
- /// </para>
- /// </remarks>
- /// <returns>A view on top of this instance</returns>
- public ByteBuffer Slice()
- {
- return new SlicedByteBuffer(this);
- }
-
- /// <summary>
- /// Skip the specified number of bytes
- /// </summary>
- /// <param name="numBytes">Number of bytes to move forward by</param>
- /// <returns>This instance</returns>
- public ByteBuffer Skip(int numBytes)
- {
- Position += numBytes;
- return this;
- }
-
- /// <summary>
- /// Acquire this buffer to keep it alive.
- /// </summary>
- public virtual void Acquire()
- {
- // override in subclass if supported
- }
-
- /// <summary>
- /// Release this buffer instance
- /// </summary>
- public virtual void Release()
- {
- // override in subclass if supported
- }
-
- /// <summary>
- /// Return a string with a Hex Dump of this buffer's contents
- /// </summary>
- /// <returns>The hex dump</returns>
- public string GetHexDump()
- {
- return ByteBufferHexDumper.GetHexDump(this);
- }
-
- public override string ToString()
- {
- return GetHexDump();
- }
- #endregion // Buffer Manipulation
-
- #region Static Operations
- //
- // Static Operations
- //
- /// <summary>
- /// Replaces the default allocator with your own implementation
- /// </summary>
- /// <param name="allocator">New allocator</param>
- public static void SetAllocator(IByteBufferAllocator allocator)
- {
- if ( allocator == null )
- throw new ArgumentNullException("allocator");
- _allocator = allocator;
- }
-
- /// <summary>
- /// Allocate a new buffer with the specified capacity
- /// using the default allocator
- /// </summary>
- /// <param name="capacity">Desired capacity</param>
- /// <returns>The new buffer</returns>
- public static ByteBuffer Allocate(int capacity)
- {
- return _allocator.Allocate(capacity);
- }
-
- /// <summary>
- /// Wraps the specified arrat into a new buffer
- /// </summary>
- /// <param name="buffer"></param>
- /// <returns></returns>
- public static ByteBuffer Wrap(byte[] buffer)
- {
- return _allocator.Wrap(buffer);
- }
- #endregion // Static Operations
-
- #region Data Accessors
- //
- // Data Accessors
- //
-
- // Byte Stuff
-
- /// <summary>
- /// Read the next byte in the buffer
- /// </summary>
- /// <returns>The next byte available</returns>
- public byte GetByte()
- {
- byte value = GetByte(Position);
- Position += 1;
- return value;
- }
- /// <summary>
- /// Read the byte at the specified position
- /// </summary>
- /// <param name="position">Position to read from</param>
- /// <returns>The value at the position</returns>
- public byte GetByte(int position)
- {
- CheckSpaceForReading(position, 1);
- return ReadByte(position);
- }
- /// <summary>
- /// Write a byte at the current position
- /// </summary>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(byte value)
- {
- Put(Position, value);
- Position++;
- return this;
- }
- /// <summary>
- /// Write a byte at the specified position
- /// </summary>
- /// <param name="position">Position to write to</param>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(int position, byte value)
- {
- CheckSpaceForWriting(position, 1);
- Write(position, value);
- return this;
- }
-
- // SByte Stuff
-
- /// <summary>
- /// Read the next signed byte in the buffer
- /// </summary>
- /// <returns>The next signed byte available</returns>
- public sbyte GetSByte()
- {
- sbyte value = GetSByte(Position);
- Position += 1;
- return value;
- }
- /// <summary>
- /// Read the signed byte at the specified position
- /// </summary>
- /// <param name="position">Position to read from</param>
- /// <returns>The value at the position</returns>
- public sbyte GetSByte(int position)
- {
- CheckSpaceForReading(position, 1);
- return (sbyte)ReadByte(position);
- }
-
- /// <summary>
- /// Write a signed byte at the current position
- /// </summary>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(sbyte value)
- {
- Put(Position, value);
- Position += 1;
- return this;
- }
-
- /// <summary>
- /// Write a signed byte at the specified position
- /// </summary>
- /// <param name="position">Position to write to</param>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(int position, sbyte value)
- {
- CheckSpaceForWriting(position, 1);
- Write(position, (byte)value);
- return this;
- }
-
- // UInt16 Stuff
-
- /// <summary>
- /// Read the next uint16 in the buffer
- /// </summary>
- /// <returns>The next uint16 available</returns>
- public ushort GetUInt16()
- {
- ushort value = GetUInt16(Position);
- Position += 2;
- return value;
- }
- /// <summary>
- /// Read the uint16 at the specified position
- /// </summary>
- /// <param name="position">Position to read from</param>
- /// <returns>The value at the position</returns>
- public ushort GetUInt16(int position)
- {
- CheckSpaceForReading(position, 2);
- byte upper = ReadByte(position);
- byte lower = ReadByte(position+1);
- return (ushort)(((ushort)upper << 8) + lower);
- }
-
- /// <summary>
- /// Write a uint16 at the current position
- /// </summary>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(ushort value)
- {
- Put(Position, value);
- Position += 2;
- return this;
- }
-
- /// <summary>
- /// Write a uint16 at the specified position
- /// </summary>
- /// <param name="position">Position to write to</param>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(int position, ushort value)
- {
- CheckSpaceForWriting(position, 2);
- Write(position, (byte)(value >> 8));
- Write(position+1, (byte)(value));
- return this;
- }
-
- // Int16 Stuff
-
- /// <summary>
- /// Read the next int16 in the buffer
- /// </summary>
- /// <returns>The next int16 available</returns>
- public short GetInt16()
- {
- return (short) GetUInt16();
- }
- /// <summary>
- /// Read the int16 at the specified position
- /// </summary>
- /// <param name="position">Position to read from</param>
- /// <returns>The value at the position</returns>
- public short GetInt16(int position)
- {
- return (short)GetUInt16(position);
- }
-
- /// <summary>
- /// Write a int16 at the current position
- /// </summary>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(short value)
- {
- return Put((ushort) value);
- }
-
- /// <summary>
- /// Write a int16 at the specified position
- /// </summary>
- /// <param name="position">Position to write to</param>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(int position, short value)
- {
- return Put(position, (ushort)value);
- }
-
-
- // UInt32 Stuff
-
- /// <summary>
- /// Read the next uint32 in the buffer
- /// </summary>
- /// <returns>The next uint32 available</returns>
- public uint GetUInt32()
- {
- uint value = GetUInt32(Position);
- Position += 4;
- return value;
- }
- /// <summary>
- /// Read the uint32 at the specified position
- /// </summary>
- /// <param name="position">Position to read from</param>
- /// <returns>The value at the position</returns>
- public uint GetUInt32(int position)
- {
- CheckSpaceForReading(position, 4);
- byte b1 = ReadByte(position);
- byte b2 = ReadByte(position + 1);
- byte b3 = ReadByte(position + 2);
- byte b4 = ReadByte(position + 3);
- return (uint)((b1 << 24) + (b2 << 16) + (b3 << 8) + b4);
- }
-
- /// <summary>
- /// Write a uint32 at the current position
- /// </summary>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(uint value)
- {
- Put(Position, value);
- Position += 4;
- return this;
- }
-
- /// <summary>
- /// Write a uint32 at the specified position
- /// </summary>
- /// <param name="position">Position to write to</param>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(int position, uint value)
- {
- CheckSpaceForWriting(position, 4);
- Write(position, (byte)(value >> 24));
- Write(position + 1, (byte)(value >> 16));
- Write(position + 2, (byte)(value >> 8));
- Write(position + 3, (byte)(value));
- return this;
- }
-
- // Int32 Stuff
-
- /// <summary>
- /// Read the next int32 in the buffer
- /// </summary>
- /// <returns>The next int32 available</returns>
- public int GetInt32()
- {
- return (int)GetUInt32();
- }
- /// <summary>
- /// Read the int32 at the specified position
- /// </summary>
- /// <param name="position">Position to read from</param>
- /// <returns>The value at the position</returns>
- public int GetInt32(int position)
- {
- return (int)GetUInt32(position);
- }
-
- /// <summary>
- /// Write a int32 at the current position
- /// </summary>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(int value)
- {
- return Put((uint)value);
- }
-
- /// <summary>
- /// Write a int32 at the specified position
- /// </summary>
- /// <param name="position">Position to write to</param>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(int position, int value)
- {
- return Put(position, (uint)value);
- }
-
- // UInt64 Stuff
-
- /// <summary>
- /// Read the next uint64 in the buffer
- /// </summary>
- /// <returns>The next uint64 available</returns>
- public ulong GetUInt64()
- {
- ulong value = GetUInt64(Position);
- Position += 8;
- return value;
- }
- /// <summary>
- /// Read the uint64 at the specified position
- /// </summary>
- /// <param name="position">Position to read from</param>
- /// <returns>The value at the position</returns>
- public ulong GetUInt64(int position)
- {
- CheckSpaceForReading(position, 8);
- byte b1 = ReadByte(position);
- byte b2 = ReadByte(position + 1);
- byte b3 = ReadByte(position + 2);
- byte b4 = ReadByte(position + 3);
- byte b5 = ReadByte(position + 4);
- byte b6 = ReadByte(position + 5);
- byte b7 = ReadByte(position + 6);
- byte b8 = ReadByte(position + 7);
- // all the casts necessary because otherwise each subexpression
- // only gets promoted to uint and cause incorrect results
- return (((ulong)b1 << 56) + ((ulong)b2 << 48) + ((ulong)b3 << 40) +
- ((ulong)b4 << 32) + ((ulong)b5 << 24) +
- ((ulong)b6 << 16) + ((ulong)b7 << 8) + b8);
- }
-
- /// <summary>
- /// Write a uint64 at the current position
- /// </summary>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(ulong value)
- {
- Put(Position, value);
- Position += 8;
- return this;
- }
-
- /// <summary>
- /// Write a uint64 at the specified position
- /// </summary>
- /// <param name="position">Position to write to</param>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(int position, ulong value)
- {
- CheckSpaceForWriting(position, 8);
- Write(position, (byte)(value >> 56));
- Write(position + 1, (byte)(value >> 48));
- Write(position + 2, (byte)(value >> 40));
- Write(position + 3, (byte)(value >> 32));
- Write(position + 4, (byte)(value >> 24));
- Write(position + 5, (byte)(value >> 16));
- Write(position + 6, (byte)(value >> 8));
- Write(position + 7, (byte)(value));
- return this;
- }
-
- // Int64 Stuff
-
- /// <summary>
- /// Read the next int64 in the buffer
- /// </summary>
- /// <returns>The next int64 available</returns>
- public long GetInt64()
- {
- return (long)GetUInt64();
- }
- /// <summary>
- /// Read the int64 at the specified position
- /// </summary>
- /// <param name="position">Position to read from</param>
- /// <returns>The value at the position</returns>
- public long GetInt64(int position)
- {
- return (long)GetUInt64(position);
- }
-
- /// <summary>
- /// Write a int64 at the current position
- /// </summary>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(long value)
- {
- return Put((ulong)value);
- }
-
- /// <summary>
- /// Write a int64 at the specified position
- /// </summary>
- /// <param name="position">Position to write to</param>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(int position, long value)
- {
- return Put(position, (ulong)value);
- }
-
-
- // Float Stuff
-
- /// <summary>
- /// Read the next float in the buffer
- /// </summary>
- /// <returns>The next float available</returns>
- public float GetFloat()
- {
- unsafe
- {
- uint val = GetUInt32();
- return *((float*)&val);
- }
- }
- /// <summary>
- /// Read the float at the specified position
- /// </summary>
- /// <param name="position">Position to read from</param>
- /// <returns>The value at the position</returns>
- public float GetFloat(int position)
- {
- unsafe
- {
- uint val = GetUInt32(position);
- return *((float*)&val);
- }
- }
-
- /// <summary>
- /// Write a float at the current position
- /// </summary>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(float value)
- {
- unsafe
- {
- uint val = *((uint*)&value);
- return Put(val);
- }
- }
-
- /// <summary>
- /// Write a float at the specified position
- /// </summary>
- /// <param name="position">Position to write to</param>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(int position, float value)
- {
- unsafe
- {
- uint val = *((uint*)&value);
- return Put(position, val);
- }
- }
-
- // Double Stuff
-
- /// <summary>
- /// Read the next double in the buffer
- /// </summary>
- /// <returns>The next double available</returns>
- public double GetDouble()
- {
- unsafe
- {
- ulong val = GetUInt64();
- return *((double*)&val);
- }
- }
- /// <summary>
- /// Read the double at the specified position
- /// </summary>
- /// <param name="position">Position to read from</param>
- /// <returns>The value at the position</returns>
- public double GetDouble(int position)
- {
- unsafe
- {
- ulong val = GetUInt64(position);
- return *((double*)&val);
- }
- }
-
- /// <summary>
- /// Write a double at the current position
- /// </summary>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(double value)
- {
- unsafe
- {
- ulong val = *((ulong*)&value);
- return Put(val);
- }
- }
-
- /// <summary>
- /// Write a double at the specified position
- /// </summary>
- /// <param name="position">Position to write to</param>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(int position, double value)
- {
- unsafe
- {
- ulong val = *((ulong*)&value);
- return Put(position, val);
- }
- }
-
- // Char Stuff
-
- /// <summary>
- /// Read the next char in the buffer
- /// </summary>
- /// <returns>The next char available</returns>
- public char GetChar()
- {
- return (char)GetUInt16();
- }
- /// <summary>
- /// Read the char at the specified position
- /// </summary>
- /// <param name="position">Position to read from</param>
- /// <returns>The value at the position</returns>
- public char GetChar(int position)
- {
- return (char)GetUInt16(position);
- }
-
- /// <summary>
- /// Write a char at the current position
- /// </summary>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(char value)
- {
- return Put((ushort) value);
- }
-
- /// <summary>
- /// Write a char at the specified position
- /// </summary>
- /// <param name="position">Position to write to</param>
- /// <param name="value">Value to write</param>
- /// <returns>This instance</returns>
- public ByteBuffer Put(int position, char value)
- {
- return Put(position, (ushort)value);
- }
-
- // Byte[] stuff
-
- public void GetBytes(byte[] buffer)
- {
- GetBytes(buffer, 0, buffer.Length);
- }
-
- public void GetBytes(byte[] buffer, int offset, int length)
- {
- GetBytes(Position, buffer, offset, length);
- Position += length;
- }
- public void GetBytes(int position, byte[] buffer, int offset, int length)
- {
- CheckSpaceForReading(position, length);
- if ( offset + length > buffer.Length )
- throw new ArgumentException("Invalid offset + length");
- ReadBytes(position, buffer, offset, length);
- }
-
- public ByteBuffer Put(byte[] buffer)
- {
- return Put(buffer, 0, buffer.Length);
- }
-
- public ByteBuffer Put(byte[] buffer, int offset, int length)
- {
- Put(Position, buffer, offset, length);
- Position += length;
- return this;
- }
-
- public ByteBuffer Put(int position, byte[] buffer, int offset, int length)
- {
- CheckSpaceForWriting(position, length);
- if ( offset + length > buffer.Length )
- throw new ArgumentException("Invalid offset + length");
-
- Write(position, buffer, offset, length);
- return this;
- }
-
- public ByteBuffer Put(ByteBuffer data)
- {
- Put(Position, data);
- Position += data.Remaining;
- return this;
- }
-
- public ByteBuffer Put(int position, ByteBuffer data)
- {
- CheckSpaceForWriting(position, data.Remaining);
- Write(position, data.Array, data.Position, data.Remaining);
- return this;
- }
-
- #endregion // Data Accessors
-
- #region Core Overrides
- //
- // Core Overrides
- //
-
- protected abstract void DoWrite(int position, byte value);
- protected abstract void DoWrite(int position, byte[] src, int offset, int length);
- protected abstract byte DoReadByte(int position);
- protected abstract void DoReadBytes(int position, byte[] dest, int offset, int length);
- protected abstract void DoCompact();
- protected abstract void DoResize(int newSize);
-
- #endregion // Core Overrides
-
- #region Private Methods
- //
- // Private Methods
- //
-
- private void Seek(int offset)
- {
- if ( offset > Capacity )
- throw new ArgumentException("Cannot position beyond end of buffer");
- _position = offset;
- AdjustLimit();
- }
-
- private void SetLimit(int newLimit)
- {
- if ( newLimit < 0 )
- throw new ArgumentOutOfRangeException("The new limit must be a positive value");
- if ( newLimit > Capacity )
- throw new ArgumentOutOfRangeException("The new limit must not be greater than the capacity");
- _limit = newLimit;
- if ( _position > newLimit )
- _position = newLimit;
- }
-
- private void AdjustLimit()
- {
- if ( _limit < _position )
- _limit = _position;
- }
-
- private void CheckSpaceForReading(int position, int length)
- {
- if ( position + length > Limit )
- {
- throw new BufferUnderflowException("Attempt to read " + length + " byte(s) to buffer where position is " + position +
- " and limit is " + Limit);
- }
- }
-
- private void CheckSpaceForWriting(int position, int length)
- {
- if ( IsAutoExpand )
- {
- Expand(position, length);
- }
- if ( position + length > Limit )
- {
- throw new BufferOverflowException("Attempt to write " + length + " byte(s) to buffer where position is " + position +
- " and limit is " + Limit);
- }
- }
-
- private void Write(int position, byte value)
- {
- DoWrite(position, value);
- }
- private void Write(int position, byte[] src, int offset, int length)
- {
- DoWrite(position, src, offset, length);
- }
- private byte ReadByte(int position)
- {
- return DoReadByte(position);
- }
- private void ReadBytes(int position, byte[] dest, int offset, int length)
- {
- DoReadBytes(position, dest, offset, length);
- }
-
- #endregion // Private Methods
-
- } // class ByteBuffer
-}
diff --git a/qpid/dotnet/Qpid.Buffer/ByteBufferHexDumper.cs b/qpid/dotnet/Qpid.Buffer/ByteBufferHexDumper.cs
deleted file mode 100644
index 4c2856c333..0000000000
--- a/qpid/dotnet/Qpid.Buffer/ByteBufferHexDumper.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Text;
-
-namespace Apache.Qpid.Buffer
-{
- public class ByteBufferHexDumper
- {
- private static byte[] highDigits;
-
- private static byte[] lowDigits;
-
- static ByteBufferHexDumper()
- {
- byte[] digits = { (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5', (byte)'6',
- (byte)'7', (byte)'8', (byte)'9', (byte)'A', (byte)'B', (byte)'C', (byte)'D',
- (byte)'E', (byte)'F' };
- int i;
- byte[] high = new byte[256];
- byte[] low = new byte[256];
-
- for (i = 0; i < 256; i++)
- {
- high[i] = digits[i >> 4];
- low[i] = digits[i & 0x0F];
- }
-
- highDigits = high;
- lowDigits = low;
- }
-
- public static string GetHexDump(ByteBuffer input)
- {
- int size = input.Remaining;
- if (size == 0)
- {
- return "empty";
- }
-
- StringBuilder output = new StringBuilder(size * 3 - 1);
-
- byte[] data = input.Array;
- int byteValue = data[0] & 0xFF;
- output.Append((char) highDigits[byteValue]);
- output.Append((char) lowDigits[byteValue]);
-
- for (int i = 1 ; i < size; i++)
- {
- output.Append(' ');
- byteValue = data[i] & 0xFF;
- output.Append((char) highDigits[byteValue]);
- output.Append((char) lowDigits[byteValue]);
- }
-
- return output.ToString();
- }
- }
-}
-
-
-
diff --git a/qpid/dotnet/Qpid.Buffer/IByteBufferAllocator.cs b/qpid/dotnet/Qpid.Buffer/IByteBufferAllocator.cs
deleted file mode 100644
index 74944f7e69..0000000000
--- a/qpid/dotnet/Qpid.Buffer/IByteBufferAllocator.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-
-namespace Apache.Qpid.Buffer
-{
- /// <summary>
- /// Allocates <see cref="ByteBuffer"/>'s and manages them. Please
- /// implement this interface if you need more advanced memory management scheme
- /// </summary>
- public interface IByteBufferAllocator : IDisposable
- {
- /// <summary>
- /// Returns the buffer which is capable of the specified size.
- /// </summary>
- /// <param name="capacity">The capacity of the buffer</param>
- /// <returns>A new buffer</returns>
- ByteBuffer Allocate(int capacity);
-
- /// <summary>
- /// Wrap the specified byte array in a new buffer
- /// </summary>
- /// <param name="src">Source array</param>
- /// <returns>A new buffer</returns>
- ByteBuffer Wrap(byte[] src);
-
- } // interface IByteBufferAllocator
-}
-
-
-
diff --git a/qpid/dotnet/Qpid.Buffer/Properties/AssemblyInfo.cs b/qpid/dotnet/Qpid.Buffer/Properties/AssemblyInfo.cs
deleted file mode 100644
index b692af7ce5..0000000000
--- a/qpid/dotnet/Qpid.Buffer/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Reflection;
-using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Apache.Qpid.ByteBuffer")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Apache.Qpid.ByteBuffer")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("2b3333e5-03b5-4f00-9215-66009f8a5c47")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/Qpid.Buffer/Qpid.Buffer.csproj b/qpid/dotnet/Qpid.Buffer/Qpid.Buffer.csproj
deleted file mode 100644
index d13f399196..0000000000
--- a/qpid/dotnet/Qpid.Buffer/Qpid.Buffer.csproj
+++ /dev/null
@@ -1,77 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{44384DF2-B0A4-4580-BDBC-EE4BAA87D995}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Apache.Qpid.Buffer</RootNamespace>
- <AssemblyName>Apache.Qpid.Buffer</AssemblyName>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\net-2.0\debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\net-2.0\release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/Qpid.Buffer/SimpleByteBuffer.cs b/qpid/dotnet/Qpid.Buffer/SimpleByteBuffer.cs
deleted file mode 100644
index 956c59aa45..0000000000
--- a/qpid/dotnet/Qpid.Buffer/SimpleByteBuffer.cs
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Buffer
-{
- internal sealed class SimpleByteBuffer : ByteBuffer
- {
- private byte[] _buffer;
-
- public override int Capacity
- {
- get { return _buffer.Length; }
- }
-
- public override byte[] Array
- {
- get { return _buffer; }
- }
-
- /// <summary>
- /// Initialize a new instance with the desired size
- /// </summary>
- /// <param name="desiredSize">Initial Length of the array</param>
- internal SimpleByteBuffer(int desiredSize)
- {
- _buffer = new byte[desiredSize];
- Position = 0;
- Limit = Capacity;
- }
-
- /// <summary>
- /// Initialize a new instance with the data from
- /// an underlying array
- /// </summary>
- /// <param name="buffer">Initial data</param>
- /// <remarks>The original array is copied during construction and is not modified</remarks>
- internal SimpleByteBuffer(byte[] buffer)
- {
- _buffer = (byte[])buffer.Clone();
- // position at end
- Position = Limit = Capacity;
- }
-
- protected override void DoWrite(int position, byte value)
- {
- // available space is already handled by base class
- _buffer[position] = value;
- }
-
- protected override void DoWrite(int position, byte[] src, int offset, int length)
- {
- // available space is already handled by base class
- for ( int i = 0; i < length; i++ )
- {
- _buffer[position+i] = src[offset+i];
- }
- }
-
- protected override byte DoReadByte(int position)
- {
- return _buffer[position];
- }
-
- protected override void DoReadBytes(int position, byte[] dest, int offset, int length)
- {
- System.Array.Copy(_buffer, position, dest, offset, length);
- }
-
- protected override void DoCompact()
- {
- if ( Remaining > 0 )
- {
- if ( Position > 0 )
- {
- System.Array.Copy(_buffer, Position, _buffer, 0, Remaining);
- }
- Position = Remaining;
- } else
- {
- Position = 0;
- }
- Limit = Capacity;
- }
-
- protected override void DoResize(int newSize)
- {
- if ( newSize < Capacity )
- throw new NotSupportedException("Cannot resize a buffer to make it smaller");
-
- int newCapacity = 1;
- while ( newCapacity < newSize )
- {
- newCapacity <<= 1;
- }
-
- byte[] newBuffer = new byte[newCapacity];
- System.Array.Copy(_buffer, newBuffer, _buffer.Length);
- _buffer = newBuffer;
- }
- } // class SimpleByteBuffer
-}
diff --git a/qpid/dotnet/Qpid.Buffer/SimpleByteBufferAllocator.cs b/qpid/dotnet/Qpid.Buffer/SimpleByteBufferAllocator.cs
deleted file mode 100644
index e772e59ae3..0000000000
--- a/qpid/dotnet/Qpid.Buffer/SimpleByteBufferAllocator.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-namespace Apache.Qpid.Buffer
-{
- /// <summary>
- /// Allocates <see cref="ByteBuffer"/>'s and manages them.
- /// This is a simple implementation that just returns buffers
- /// as they are. Buffers are not reused or refcounted
- /// </summary>
- public class SimpleByteBufferAllocator : IByteBufferAllocator
- {
- #region IByteBufferAllocator Members
-
- public ByteBuffer Allocate(int capacity)
- {
- return new SimpleByteBuffer(capacity);
- }
-
- public ByteBuffer Wrap(byte[] src)
- {
- return new SimpleByteBuffer(src);
- }
-
- #endregion
-
- #region IDisposable Members
-
- public void Dispose()
- {
- // no need to do anaything
- }
-
- #endregion
-
- } // class SimpleByteBufferAllocator
-}
-
-
-
diff --git a/qpid/dotnet/Qpid.Buffer/SlicedByteBuffer.cs b/qpid/dotnet/Qpid.Buffer/SlicedByteBuffer.cs
deleted file mode 100644
index 890e2a3c7a..0000000000
--- a/qpid/dotnet/Qpid.Buffer/SlicedByteBuffer.cs
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Buffer
-{
- internal sealed class SlicedByteBuffer : ByteBuffer
- {
- private ByteBuffer _buffer;
- private int _capacity;
- private int _startPos;
-
- public override int Capacity
- {
- get { return _capacity; }
- }
-
- public override byte[] Array
- {
- get { return _buffer.Array; }
- }
-
- /// <summary>
- /// Initialize a new instance
- /// </summary>
- /// <param name="buffer">Underlying byte buffer</param>
- internal SlicedByteBuffer(ByteBuffer buffer)
- {
- _buffer = buffer;
- _startPos = buffer.Position;
- Position = 0;
- _capacity = buffer.Remaining;
- Limit = Capacity;
- // cannot autoexpand
- IsAutoExpand = false;
- }
-
- protected override void DoWrite(int position, byte value)
- {
- _buffer.Put(_startPos + position, value);
- }
-
- protected override void DoWrite(int position, byte[] src, int offset, int length)
- {
- _buffer.Put(_startPos + position, src, offset, length);
- }
-
- protected override byte DoReadByte(int position)
- {
- return _buffer.GetByte(_startPos + position);
- }
-
- protected override void DoReadBytes(int position, byte[] dest, int offset, int length)
- {
- _buffer.GetBytes(_startPos + position, dest, offset, length);
- }
-
- protected override void DoCompact()
- {
- throw new NotSupportedException();
- }
-
- protected override void DoResize(int newSize)
- {
- throw new NotSupportedException();
- }
- } // class SlicedByteBuffer
-}
diff --git a/qpid/dotnet/Qpid.Buffer/default.build b/qpid/dotnet/Qpid.Buffer/default.build
deleted file mode 100644
index efb5a8fc89..0000000000
--- a/qpid/dotnet/Qpid.Buffer/default.build
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Apache.Qpid.Buffer" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="library"
- define="${build.defines}"
- debug="${build.debug}"
- unsafe="true"
- output="${build.dir}/${project::get-name()}.dll">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/Qpid.Client.Tests/App.config b/qpid/dotnet/Qpid.Client.Tests/App.config
deleted file mode 100644
index e71a468a3a..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/App.config
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<configuration>
- <configSections>
- <sectionGroup name="qpid.client">
- <section name="authentication" type="Apache.Qpid.Client.Configuration.AuthenticationConfigurationSectionHandler, Apache.Qpid.Client"/>
- </sectionGroup>
- </configSections>
- <qpid.client>
- <authentication>
- <add key="TEST" value="Apache.Qpid.Client.Tests.Security.TestCallbackHandler, Apache.Qpid.Client.Tests"/>
- </authentication>
- </qpid.client>
-</configuration>
diff --git a/qpid/dotnet/Qpid.Client.Tests/BrokerDetails/BrokerDetailsTest.cs b/qpid/dotnet/Qpid.Client.Tests/BrokerDetails/BrokerDetailsTest.cs
deleted file mode 100644
index 56269c0f9d..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/BrokerDetails/BrokerDetailsTest.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Net;
-using NUnit.Framework;
-using Apache.Qpid.Client.Qms;
-
-namespace Apache.Qpid.Client.Tests.BrokerDetails
-{
- [TestFixture]
- public class BrokerDetailsTest
- {
-
- [Test]
- public void ValidateBrokerInfoEqualsMethod()
- {
- AmqBrokerInfo broker = new AmqBrokerInfo("amqp", "localhost", 5672, true);
- AmqBrokerInfo broker1 = new AmqBrokerInfo("Amqp", "localhost", 5672, true);
-
- Assert.IsTrue(broker.Equals(broker1),"The two AmqBrokerInfo objects are not equals");
- Console.WriteLine(string.Format("The object broker: {0} and broker1: {1} are equals", broker, broker1));
- }
-
- [Test]
- public void ValidateBrokerInfoWithDifferentSSL()
- {
- AmqBrokerInfo broker = new AmqBrokerInfo("amqp", "localhost", 5672, true);
- AmqBrokerInfo broker1 = new AmqBrokerInfo("amqp", "localhost", 5672, false);
-
- Assert.IsFalse(broker.Equals(broker1), "The two AmqBrokerInfo objects are equals");
- Console.WriteLine(string.Format("The object broker: {0} and broker1: {1} are not equals", broker, broker1));
- }
-
- [Test]
- public void ValidateBrokerInfoFromToString()
- {
- String url = "tcp://localhost:5672?timeout='200',immediatedelivery='true'";
-
- AmqBrokerInfo broker = new AmqBrokerInfo(url);
- AmqBrokerInfo broker1 = new AmqBrokerInfo(broker.ToString());
-
- Assert.AreEqual(broker.GetOption("timeout"), broker1.GetOption("timeout"));
- Assert.AreEqual(broker.GetOption("immediatedelivery"), broker1.GetOption("immediatedelivery"));
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Client.Tests/Channel/ChannelMessageCreationTests.cs b/qpid/dotnet/Qpid.Client.Tests/Channel/ChannelMessageCreationTests.cs
deleted file mode 100644
index f4f217c2a0..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/Channel/ChannelMessageCreationTests.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Client;
-using Apache.Qpid.Client.Message;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Client.Tests.Channel
-{
- /// <summary>
- /// Test that channels can create messages correctly
- /// </summary>
- [TestFixture]
- public class ChannelMessageCreationTests
- {
- [Test]
- public void CanCreateTextMessage()
- {
- IChannel channel = AmqChannel.CreateDisconnectedChannel();
- ITextMessage msg = channel.CreateTextMessage();
- Assert.IsNotNull(msg);
- }
- [Test]
- public void CanCreateTextMessageWithContent()
- {
- IChannel channel = AmqChannel.CreateDisconnectedChannel();
- const string CONTENT = "1234567890";
- ITextMessage msg = channel.CreateTextMessage(CONTENT);
- Assert.IsNotNull(msg);
- Assert.AreEqual(CONTENT, msg.Text);
- }
- [Test]
- public void CanCreateBytesMessage()
- {
- IChannel channel = AmqChannel.CreateDisconnectedChannel();
- IBytesMessage msg = channel.CreateBytesMessage();
- Assert.IsNotNull(msg);
- }
- [Test]
- public void CanCreateMessage()
- {
- IChannel channel = AmqChannel.CreateDisconnectedChannel();
- IMessage msg = channel.CreateMessage();
- Assert.IsNotNull(msg);
- }
- [Test]
- public void CanCreateMessageFromMimeType()
- {
- IChannel channel = AmqChannel.CreateDisconnectedChannel();
- IMessage msg = channel.CreateMessage("text/xml");
- Assert.IsNotNull(msg);
- Assert.IsInstanceOfType(typeof(ITextMessage), msg);
- }
- }
-} // namespace Apache.Qpid.Client.Tests.Channel
-
-
diff --git a/qpid/dotnet/Qpid.Client.Tests/Messages/MessageFactoryRegistryTests.cs b/qpid/dotnet/Qpid.Client.Tests/Messages/MessageFactoryRegistryTests.cs
deleted file mode 100644
index 4db3c91cb5..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/Messages/MessageFactoryRegistryTests.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Client.Message;
-
-namespace Apache.Qpid.Client.Tests.Messages
-{
- /// <summary>
- /// Ensure a factory creates messages correctly
- /// </summary>
- [TestFixture]
- public class MessageFactoryRegistryTests
- {
- const string TEXT_PLAIN = "text/plain";
- const string TEXT_XML = "text/xml";
- const string OCTET_STREAM = "application/octet-stream";
-
- /// <summary>
- /// Check default registry can create text/plain messages
- /// </summary>
- [Test]
- public void CanCreateTextPlain()
- {
- MessageFactoryRegistry registry =
- MessageFactoryRegistry.NewDefaultRegistry();
-
- IMessage message = registry.CreateMessage(TEXT_PLAIN);
- Assert.IsNotNull(message);
- Assert.AreEqual(TEXT_PLAIN, message.ContentType);
- Assert.IsInstanceOfType(typeof(QpidTextMessage), message);
- }
- /// <summary>
- /// Check default registry can create text/xml messages
- /// </summary>
- [Test]
- public void CanCreateTextXml()
- {
- MessageFactoryRegistry registry =
- MessageFactoryRegistry.NewDefaultRegistry();
-
- IMessage message = registry.CreateMessage(TEXT_XML);
- Assert.IsNotNull(message);
- Assert.AreEqual(TEXT_XML, message.ContentType);
- Assert.IsInstanceOfType(typeof(QpidTextMessage), message);
- }
- /// <summary>
- /// Check default registry can create application/octet-stream messages
- /// </summary>
- [Test]
- public void CanCreateBinary()
- {
- MessageFactoryRegistry registry =
- MessageFactoryRegistry.NewDefaultRegistry();
-
- IMessage message = registry.CreateMessage(OCTET_STREAM);
- Assert.IsNotNull(message);
- Assert.AreEqual(OCTET_STREAM, message.ContentType);
- Assert.IsInstanceOfType(typeof(QpidBytesMessage), message);
- }
- /// <summary>
- /// Check default registry can create messages for unknown types
- /// </summary>
- [Test]
- public void CanCreateUnknownType()
- {
- MessageFactoryRegistry registry =
- MessageFactoryRegistry.NewDefaultRegistry();
-
- const string OTHER = "application/unknown";
- IMessage message = registry.CreateMessage(OTHER);
- Assert.IsNotNull(message);
- Assert.AreEqual(OTHER, message.ContentType);
- Assert.IsInstanceOfType(typeof(QpidBytesMessage), message);
- }
- /// <summary>
- /// Check that text messages default to UTF-8 encoding
- /// </summary>
- [Test]
- public void TextMessagesDefaultToUTF8Encoding()
- {
- MessageFactoryRegistry registry =
- MessageFactoryRegistry.NewDefaultRegistry();
-
- IMessage message = registry.CreateMessage(TEXT_PLAIN);
- Assert.AreEqual("utf-8", message.ContentEncoding.ToLower());
- }
-
- }
-} // namespace Apache.Qpid.Client.Tests.Messages
-
-
diff --git a/qpid/dotnet/Qpid.Client.Tests/Properties/AssemblyInfo.cs b/qpid/dotnet/Qpid.Client.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index c710818053..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Reflection;
-using System.Runtime.InteropServices;
-using log4net.Config;
-[assembly: XmlConfigurator(ConfigFile="log4net.config")]
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Apache.Qpid.Client.Tests")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Apache.Qpid.Client.Tests")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("7ebdea21-1352-4673-b66e-fdc0beff461f")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
diff --git a/qpid/dotnet/Qpid.Client.Tests/Qpid.Client.Tests.csproj b/qpid/dotnet/Qpid.Client.Tests/Qpid.Client.Tests.csproj
deleted file mode 100644
index 73eabfa1f8..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/Qpid.Client.Tests.csproj
+++ /dev/null
@@ -1,158 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{BA1B0032-4CE6-40DD-A2DC-119F0FFA0A1D}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Apache.Qpid.Client.Tests</RootNamespace>
- <AssemblyName>Apache.Qpid.Client.Tests</AssemblyName>
- <StartupObject>
- </StartupObject>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <PublishUrl>http://localhost/Apache.Qpid.Client.Tests/</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Web</InstallFrom>
- <UpdateEnabled>true</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>true</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\net-2.0\debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <UseVSHostingProcess>true</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\net-2.0\release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\Qpid.Common\lib\log4net\log4net.dll</HintPath>
- </Reference>
- <Reference Include="nunit.framework, Version=2.2.6.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>lib\nunit\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Qpid.Buffer\Qpid.Buffer.csproj">
- <Project>{44384DF2-B0A4-4580-BDBC-EE4BAA87D995}</Project>
- <Name>Qpid.Buffer</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Messaging\Qpid.Messaging.csproj">
- <Project>{6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}</Project>
- <Name>Qpid.Messaging</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Client\Qpid.Client.csproj">
- <Project>{68987C05-3768-452C-A6FC-6BA1D372852F}</Project>
- <Name>Qpid.Client</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Common\Qpid.Common.csproj">
- <Project>{77064C42-24D2-4CEB-9EA2-0EF481A43205}</Project>
- <Name>Qpid.Common</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Sasl\Qpid.Sasl.csproj">
- <Project>{1465B0EE-6452-42A6-AB73-B2F9EABEEE75}</Project>
- <Name>Qpid.Sasl</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="log4net.config">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="interop\TestCases\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/Qpid.Client.Tests/Security/CallbackHandlerRegistryTests.cs b/qpid/dotnet/Qpid.Client.Tests/Security/CallbackHandlerRegistryTests.cs
deleted file mode 100644
index f1446a9aa6..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/Security/CallbackHandlerRegistryTests.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using NUnit.Framework;
-using Apache.Qpid.Client.Security;
-
-
-namespace Apache.Qpid.Client.Tests.Security
-{
- [TestFixture]
- public class CallbackRegistryHandlerTests
- {
- [Test]
- public void ParsesConfiguration()
- {
- CallbackHandlerRegistry registry = CallbackHandlerRegistry.Instance;
- Assert.AreEqual(4, registry.Mechanisms.Length);
- Assert.Contains("TEST", registry.Mechanisms);
-
- Type handlerType = registry.GetCallbackHandler("TEST");
- Assert.IsNotNull(handlerType);
- Assert.AreEqual(typeof(TestCallbackHandler), handlerType);
- }
-
- [Test]
- public void MechanimsInOrder()
- {
- CallbackHandlerRegistry registry = CallbackHandlerRegistry.Instance;
- Assert.AreEqual(4, registry.Mechanisms.Length);
- Assert.AreEqual("TEST", registry.Mechanisms[0]);
- Assert.AreEqual("EXTERNAL", registry.Mechanisms[1]);
- Assert.AreEqual("CRAM-MD5", registry.Mechanisms[2]);
- Assert.AreEqual("PLAIN", registry.Mechanisms[3]);
- }
- } // class CallbackRegistryHandlerTests
-
- public class TestCallbackHandler : IAMQCallbackHandler
- {
- public void Initialize(Qpid.Client.Protocol.AMQProtocolSession session)
- {
- }
- public void Handle(Qpid.Sasl.ISaslCallback[] callbacks)
- {
- }
-
- } // class TestCallbackHandler
-
-} // namespace Apache.Qpid.Client.Tests.Connection
diff --git a/qpid/dotnet/Qpid.Client.Tests/default.build b/qpid/dotnet/Qpid.Client.Tests/default.build
deleted file mode 100644
index 5116e651e1..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/default.build
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Apache.Qpid.Client" default="test">
-
- <target name="build">
- <csc target="library"
- define="${build.defines}"
- warnaserror="false" debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.Tests.dll">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/nunit.framework.dll" />
- <include name="${build.dir}/${project::get-name()}.dll" />
- <include name="${build.dir}/Apache.Qpid.Common.dll" />
- <include name="${build.dir}/Apache.Qpid.Messaging.dll" />
- <include name="${build.dir}/Apache.Qpid.Sasl.dll" />
- </references>
- </csc>
- <copy tofile="${build.dir}/${project::get-name()}.Tests.dll.config" file="App.config" />
- <copy todir="${build.dir}" file="log4net.config"/>
- </target>
-
- <target name="test" depends="build">
- <nunit2 verbose="true">
- <formatter type="${nant.formatter}" usefile="false" />
- <test>
- <assemblies>
- <include name="${build.dir}/${project::get-name()}.tests.dll"/>
- </assemblies>
- <categories>
- <!-- The fail-over tests are interactive so should not be run as part of the build. -->
- <exclude name="Integration"/>
- <exclude name="SSL" if="${framework::get-target-framework() == 'mono-2.0'}"/>
- </categories>
- </test>
- </nunit2>
- </target>
-
-</project>
-
diff --git a/qpid/dotnet/Qpid.Client.Tests/interop/Consumer.cs b/qpid/dotnet/Qpid.Client.Tests/interop/Consumer.cs
deleted file mode 100644
index d60514ae4c..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/interop/Consumer.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using Apache.Qpid.Client;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Client.Tests.interop
-{
- public class Consumer
- {
- public static void Main(string[] args)
- {
- try
- {
- const string connectionUrl = @"amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'";
- const string queueName = @"test-queue";
-
- var connectionInfo = QpidConnectionInfo.FromUrl(connectionUrl);
- var connection = new AMQConnection(connectionInfo);
- var channel = connection.CreateChannel(false, AcknowledgeMode.AutoAcknowledge, 1);
-
- channel.DeclareQueue(queueName, false, true, true);
- channel.Bind(queueName, ExchangeNameDefaults.DIRECT, queueName);
- IMessageConsumer consumer = channel.CreateConsumerBuilder(queueName) .Create();
- connection.Start();
-
- ITextMessage message = (ITextMessage) consumer.Receive();
- Console.WriteLine("Got: " + message.Text);
- connection.Dispose();
- }
- catch (Exception e)
- {
- Console.WriteLine(e);
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client.Tests/interop/Producer.cs b/qpid/dotnet/Qpid.Client.Tests/interop/Producer.cs
deleted file mode 100644
index d775080fc3..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/interop/Producer.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using Apache.Qpid.Client;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Client.Tests.interop
-{
- public class Producer
- {
- public static void Main(string[] args)
- {
- try
- {
- const string connectionUrl = @"amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'";
- const string queueName = @"test-queue";
-
- var connectionInfo = QpidConnectionInfo.FromUrl(connectionUrl);
- var connection = new AMQConnection(connectionInfo);
- var channel = connection.CreateChannel(false, AcknowledgeMode.AutoAcknowledge);
- var publisher = channel.CreatePublisherBuilder()
- .WithExchangeName(ExchangeNameDefaults.DIRECT)
- .WithRoutingKey(queueName)
- .Create();
- IMessage message = channel.CreateTextMessage("0123456789");
- publisher.Send(message);
- Console.WriteLine("Sent message");
- connection.Dispose();
- }
- catch (Exception e)
- {
- Console.WriteLine(e);
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client.Tests/interop/TopicListener.cs b/qpid/dotnet/Qpid.Client.Tests/interop/TopicListener.cs
deleted file mode 100644
index e5daa64a89..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/interop/TopicListener.cs
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using log4net;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Client.Qms;
-
-namespace Apache.Qpid.Client.Tests.interop
-{
- public class TopicListener
- {
- private static ILog log = LogManager.GetLogger(typeof(TopicListener));
-
- /// <summary> The default AMQ connection URL to use for tests. </summary>
- const string DEFAULT_URI = "amqp://guest:guest@default/test?brokerlist='tcp://localhost:5672'";
-
- /// <summary> Holds the routing key for the topic to receive test messages on. </summary>
- public static string CONTROL_ROUTING_KEY = "topic_control";
-
- /// <summary> Holds the routing key for the queue to send reports to. </summary>
- public static string RESPONSE_ROUTING_KEY = "response";
-
- /// <summary> Holds the connection to listen on. </summary>
- private IConnection connection;
-
- /// <summary> Holds the channel for all test messages.</summary>
- private IChannel channel;
-
- /// <summary> Holds the producer to send report messages on. </summary>
- private IMessagePublisher publisher;
-
- /// <summary> A monitor used to wait for shutdown. </summary>
- private AutoResetEvent shutdownReceivedEvt = new AutoResetEvent(false);
-
- /// <summary> Holds the default test timeout for communications . </summary>
- const int TIMEOUT = 60000;
-
- /// <summary> Holds a flag to indicate that a timer has begun on the first message. Reset when report is sent. </summary> */
- private bool init;
-
- /// <summary> Holds the count of messages received by this listener. </summary> */
- private int count;
-
- /// <summary> Creates a topic listener using the specified broker URL. </summary>
- ///
- /// <param name="connectionUri">The broker URL to listen on.</param>
- TopicListener(string connectionUri)
- {
- log.Debug("TopicListener(string connectionUri = " + connectionUri + "): called");
-
- // Create a connection to the broker.
- IConnectionInfo connectionInfo = QpidConnectionInfo.FromUrl(connectionUri);
- connection = new AMQConnection(connectionInfo);
-
- // Establish a session on the broker.
- channel = connection.CreateChannel(false, AcknowledgeMode.AutoAcknowledge, 1);
-
- // Set up a queue to listen for test messages on.
- string topicQueueName = channel.GenerateUniqueName();
- channel.DeclareQueue(topicQueueName, false, true, true);
-
- // Set this listener up to listen for incoming messages on the test topic queue.
- channel.Bind(topicQueueName, ExchangeNameDefaults.TOPIC, CONTROL_ROUTING_KEY);
- IMessageConsumer consumer = channel.CreateConsumerBuilder(topicQueueName)
- .Create();
- consumer.OnMessage += new MessageReceivedDelegate(OnMessage);
-
- // Set up this listener with a producer to send the reports on.
- publisher = channel.CreatePublisherBuilder()
- .WithExchangeName(ExchangeNameDefaults.DIRECT)
- .WithRoutingKey(RESPONSE_ROUTING_KEY)
- .Create();
-
- connection.Start();
- Console.WriteLine("Waiting for messages...");
-
- if (shutdownReceivedEvt.WaitOne(TIMEOUT, true))
- {
- Console.WriteLine("Shutting down - shut down message was received");
- }
- else
- {
- Console.WriteLine("Shutting down - timeout elapsed");
- }
- }
-
- public static void Main(String[] argv)
- {
- // Create an instance of this listener with the command line parameters.
- new TopicListener(DEFAULT_URI);
- }
-
- /// <summary>
- /// Handles all message received by this listener. Test messages are counted, report messages result in a report being sent and
- /// shutdown messages result in this listener being terminated.
- /// </summary>
- ///
- /// <param name="message">The received message.</param>
- public void OnMessage(IMessage message)
- {
- log.Debug("public void onMessage(Message message = " + message + "): called");
-
- // Take the start time of the first message if this is the first message.
- if (!init)
- {
- count = 0;
- init = true;
- }
-
- // Check if the message is a control message telling this listener to shut down.
- if (IsShutdown(message))
- {
- log.Debug("Got a shutdown message.");
- Shutdown();
- }
- // Check if the message is a report request message asking this listener to respond with the message count.
- else if (IsReport(message))
- {
- log.Debug("Got a report request message.");
-
- // Send the message count report.
- SendReport();
-
- // Reset the initialization flag so that the next message is considered to be the first.
- init = false;
- }
- // Otherwise it is an ordinary test message, so increment the message count.
- else
- {
- count++;
- }
- }
-
- /// <summary> Checks a message to see if it is a shutdown control message. </summary>
- ///
- /// <param name="m">The message to check.</param>
- ///
- /// <returns><tt>true</tt> if it is a shutdown control message, <tt>false</tt> otherwise.</returns>
- private bool IsShutdown(IMessage m)
- {
- bool result = CheckTextField(m, "TYPE", "TERMINATION_REQUEST");
-
- //log.Debug("isShutdown = " + result);
-
- return result;
- }
-
- /// <summary> Checks a message to see if it is a report request control message. </summary>
- ///
- /// <param name="m">The message to check.</param>
- ///
- /// <returns><tt>true</tt> if it is a report request control message, <tt>false</tt> otherwise.</returns>
- private bool IsReport(IMessage m)
- {
- bool result = CheckTextField(m, "TYPE", "REPORT_REQUEST");
-
- //log.Debug("isReport = " + result);
-
- return result;
- }
-
- /// <summary> Checks whether or not a text field on a message has the specified value. </summary>
- ///
- /// <param name="e">The message to check.</param>
- /// <param name="e">The name of the field to check.</param>
- /// <param name="e">The expected value of the field to compare with.</param>
- ///
- /// <returns> <tt>true</tt>If the specified field has the specified value, <tt>fals</tt> otherwise. </returns>
- private static bool CheckTextField(IMessage m, string fieldName, string value)
- {
- /*log.Debug("private static boolean checkTextField(Message m = " + m + ", String fieldName = " + fieldName
- + ", String value = " + value + "): called");*/
-
- string comp = m.Headers.GetString(fieldName);
-
- return (comp != null) && comp == value;
- }
-
- /// <summary> Stops the message consumer and closes the connection. </summary>
- private void Shutdown()
- {
- connection.Stop();
- channel.Dispose();
- connection.Dispose();
-
- shutdownReceivedEvt.Set();
- }
-
- /// <summary> Sends the report message to the response location. </summary>
- private void SendReport()
- {
- string report = "Received " + count + ".";
-
- IMessage reportMessage = channel.CreateTextMessage(report);
-
- reportMessage.Headers.SetBoolean("BOOLEAN", false);
- //reportMessage.Headers.SetByte("BYTE", 5);
- reportMessage.Headers.SetDouble("DOUBLE", 3.141);
- reportMessage.Headers.SetFloat("FLOAT", 1.0f);
- reportMessage.Headers.SetInt("INT", 1);
- reportMessage.Headers.SetLong("LONG", 1);
- reportMessage.Headers.SetString("STRING", "hello");
- reportMessage.Headers.SetShort("SHORT", 2);
-
- publisher.Send(reportMessage);
-
- Console.WriteLine("Sent report: " + report);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client.Tests/interop/TopicPublisher.cs b/qpid/dotnet/Qpid.Client.Tests/interop/TopicPublisher.cs
deleted file mode 100644
index 4fd0419e9c..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/interop/TopicPublisher.cs
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using log4net;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Client.Qms;
-
-namespace Apache.Qpid.Client.Tests.interop
-{
- public class TopicPublisher
- {
- private static ILog log = LogManager.GetLogger(typeof(TopicPublisher));
-
- /// <summary> The default AMQ connection URL to use for tests. </summary>
- const string DEFAULT_URI = "amqp://guest:guest@default/test?brokerlist='tcp://localhost:5672'";
-
- /// <summary> Holds the default test timeout for broker communications before tests give up. </summary>
- const int TIMEOUT = 10000;
-
- /// <summary> Holds the routing key for the topic to receive test messages on. </summary>
- const string CONTROL_ROUTING_KEY = "topic_control";
-
- /// <summary> Holds the routing key for the queue to send reports to. </summary>
- const string RESPONSE_ROUTING_KEY = "response";
-
- /// <summary> Holds the number of messages to send in each test run. </summary>
- private int numMessages;
-
- /// <summary> Holds the number of subscribers listening to the messsages. </summary>
- private int numSubscribers;
-
- /// <summary> A monitor used to wait for all reports to arrive back from consumers on. </summary>
- private AutoResetEvent allReportsReceivedEvt = new AutoResetEvent(false);
-
- /// <summary> Holds the connection to listen on. </summary>
- private IConnection connection;
-
- /// <summary> Holds the channel for all test messages.</summary>
- private IChannel channel;
-
- /// <summary> Holds the producer to send test messages on. </summary>
- private IMessagePublisher publisher;
-
- /// <summary>
- /// Creates a topic publisher that will send the specifed number of messages and expect the specifed number of report back from test
- /// subscribers.
- /// </summary>
- ///
- /// <param name="connectionUri">The broker URL.</param>
- /// <param name="numMessages">The number of messages to send in each test.</param>
- /// <param name="numSubscribers">The number of subscribes that are expected to reply with a report.</param>
- TopicPublisher(string connectionUri, int numMessages, int numSubscribers)
- {
- log.Debug("TopicPublisher(string connectionUri = " + connectionUri + ", int numMessages = "+ numMessages +
- ", int numSubscribers = " + numSubscribers + "): called");
-
- // Create a connection to the broker.
- IConnectionInfo connectionInfo = QpidConnectionInfo.FromUrl(connectionUri);
- connection = new AMQConnection(connectionInfo);
-
- // Establish a session on the broker.
- channel = connection.CreateChannel(false, AcknowledgeMode.AutoAcknowledge, 1);
-
- // Set up a queue to listen for reports on.
- string responseQueueName = channel.GenerateUniqueName();
- channel.DeclareQueue(responseQueueName, false, true, true);
-
- // Set this listener up to listen for reports on the response queue.
- channel.Bind(responseQueueName, ExchangeNameDefaults.DIRECT, RESPONSE_ROUTING_KEY);
- //channel.Bind(responseQueueName, "<<default>>", RESPONSE_ROUTING_KEY);
- IMessageConsumer consumer = channel.CreateConsumerBuilder(responseQueueName)
- .Create();
- consumer.OnMessage += new MessageReceivedDelegate(OnMessage);
-
- // Set up this listener with a producer to send the test messages and report requests on.
- publisher = channel.CreatePublisherBuilder()
- .WithExchangeName(ExchangeNameDefaults.TOPIC)
- .WithRoutingKey(CONTROL_ROUTING_KEY)
- .Create();
-
- // Keep the test parameters.
- this.numMessages = numMessages;
- this.numSubscribers = numSubscribers;
-
- connection.Start();
- Console.WriteLine("Sending messages and waiting for reports...");
- }
-
- /// <summary>
- /// Start a test subscriber. The broker URL must be specified as the first command line argument.
- /// </summary>
- ///
- /// <param name="argv">The command line arguments, broker URL first.</param>
- public static void Main(String[] argv)
- {
- // Create an instance of this publisher with the command line parameters.
- TopicPublisher publisher = new TopicPublisher(DEFAULT_URI, 1, 1);
-
- // Publish the test messages.
- publisher.DoTest();
- }
-
- /// <summary>
- /// Sends the test messages and waits for all subscribers to reply with a report.
- /// </summary>
- public void DoTest()
- {
- log.Debug("public void DoTest(): called");
-
- // Create a test message to send.
- IMessage testMessage = channel.CreateTextMessage("test");
-
- // Send the desired number of test messages.
- for (int i = 0; i < numMessages; i++)
- {
- publisher.Send(testMessage);
- }
-
- log.Debug("Sent " + numMessages + " test messages.");
-
- // Send the report request.
- IMessage reportRequestMessage = channel.CreateTextMessage("Report request message.");
- reportRequestMessage.Headers["TYPE"] = "REPORT_REQUEST";
-
- reportRequestMessage.Headers.SetBoolean("BOOLEAN", false);
- //reportRequestMessage.Headers.SetByte("BYTE", 5);
- reportRequestMessage.Headers.SetDouble("DOUBLE", 3.141);
- reportRequestMessage.Headers.SetFloat("FLOAT", 1.0f);
- reportRequestMessage.Headers.SetInt("INT", 1);
- reportRequestMessage.Headers.SetLong("LONG", 1);
- reportRequestMessage.Headers.SetString("STRING", "hello");
- reportRequestMessage.Headers.SetShort("SHORT", 2);
-
- publisher.Send(reportRequestMessage);
-
- log.Debug("Sent the report request message, waiting for all replies...");
-
- // Wait until all the reports come in.
- allReportsReceivedEvt.WaitOne(TIMEOUT, true);
-
- // Check if all reports were really received or if the timeout occurred.
- if (numSubscribers == 0)
- {
- log.Debug("Got all reports.");
- }
- else
- {
- log.Debug("Waiting for reports timed out, still waiting for " + numSubscribers + ".");
- }
-
- // Send the termination request.
- IMessage terminationRequestMessage = channel.CreateTextMessage("Termination request message.");
- terminationRequestMessage.Headers["TYPE"] = "TERMINATION_REQUEST";
- publisher.Send(terminationRequestMessage);
-
- log.Debug("Sent the termination request message.");
-
- // Close all message producers and consumers and the connection to the broker.
- Shutdown();
- }
-
- /// <summary>
- /// Handles all report messages from subscribers. This decrements the count of subscribers that are still to reply, until this becomes
- /// zero, at which time waiting threads are notified of this event.
- /// </summary>
- ///
- /// <param name="message">The received report message.</param>
- public void OnMessage(IMessage message)
- {
- log.Debug("public void OnMessage(IMessage message = " + message + "): called");
-
- // Decrement the count of expected messages and release the wait monitor when this becomes zero.
- if (--numSubscribers == 0)
- {
- log.Debug("Got reports from all subscribers.");
- allReportsReceivedEvt.Set();
- }
- }
-
- /// <summary> Stops the message consumers and closes the connection. </summary>
- private void Shutdown()
- {
- connection.Stop();
- publisher.Dispose();
- channel.Dispose();
- connection.Dispose();
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client.Tests/lib/nunit/nunit-licence.txt b/qpid/dotnet/Qpid.Client.Tests/lib/nunit/nunit-licence.txt
deleted file mode 100644
index b2316295d3..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/lib/nunit/nunit-licence.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov,
- Charlie Poole
-Copyright © 2000-2004 Philip A. Craig
-
-This software is provided 'as-is', without any express or implied warranty. In
-no event will the authors be held liable for any damages arising from the use
-of this software.
-
-Permission is granted to anyone to use this software for any purpose, including
-commercial applications, and to alter it and redistribute it freely, subject to
-the following restrictions:
-
-1. The origin of this software must not be misrepresented; you must not claim
- that you wrote the original software. If you use this software in a product, an
- acknowledgment (see the following) in the product documentation is required.
-
- Portions Copyright © 2002 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov
- or Copyright © 2000-2002 Philip A. Craig
-
-2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source distribution.
diff --git a/qpid/dotnet/Qpid.Client.Tests/lib/nunit/nunit.framework.dll b/qpid/dotnet/Qpid.Client.Tests/lib/nunit/nunit.framework.dll
deleted file mode 100644
index 53666e74c9..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/lib/nunit/nunit.framework.dll
+++ /dev/null
Binary files differ
diff --git a/qpid/dotnet/Qpid.Client.Tests/log4net.config b/qpid/dotnet/Qpid.Client.Tests/log4net.config
deleted file mode 100644
index 0ad25c4185..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/log4net.config
+++ /dev/null
@@ -1,68 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<log4net>
-
- <!-- ============================== -->
- <!-- Append messages to the console -->
- <!-- ============================== -->
-
- <appender name="console" type="log4net.Appender.ConsoleAppender" >
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%m%n"/>
- </layout>
- <threshold value="info"/>
- </appender>
-
- <!-- ====================================== -->
- <!-- Append messages to the socket appender -->
- <!-- ====================================== -->
-
- <appender name="UdpAppender" type="log4net.Appender.UdpAppender">
- <remoteAddress value="127.0.0.1"/>
- <remotePort value="4445"/>
- <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
- <locationInfo value="true"/>
- </layout>
- <threshold value="debug"/>
- </appender>
-
- <!-- ================ -->
- <!-- Limit categories -->
- <!-- ================ -->
-
- <logger name="Qpid">
- <level value="debug"/>
- </logger>
-
- <logger name="CONSOLE">
- <level value="info"/>
- <appender-ref ref="console"/>
- </logger>
-
- <!-- ======================= -->
- <!-- Setup the Root category -->
- <!-- ======================= -->
-
- <root>
- <appender-ref ref="UdpAppender"/>
- </root>
-
-</log4net>
diff --git a/qpid/dotnet/Qpid.Client.Tests/url/ConnectionUrlTest.cs b/qpid/dotnet/Qpid.Client.Tests/url/ConnectionUrlTest.cs
deleted file mode 100644
index 3c9f8dd4e2..0000000000
--- a/qpid/dotnet/Qpid.Client.Tests/url/ConnectionUrlTest.cs
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Net;
-using NUnit.Framework;
-using Apache.Qpid.Client.Qms;
-
-namespace Apache.Qpid.Client.Tests.url
-{
- [TestFixture]
- public class connectionUrlTests
- {
- [Test]
- public void FailoverURL()
- {
- //String url = "amqp://ritchiem:bob@/temp?brokerlist='tcp://localhost:5672;tcp://fancyserver:3000/',failover='roundrobin'";
- String url = "amqp://ritchiem:bob@default/temp?brokerlist='tcp://localhost:5672;tcp://fancyserver:3000/',failover='roundrobin'";
-
- IConnectionInfo connectionurl = QpidConnectionInfo.FromUrl(url);
-
- Assert.AreEqual("roundrobin", connectionurl.FailoverMethod);
- Assert.IsTrue(connectionurl.Username.Equals("ritchiem"));
- Assert.IsTrue(connectionurl.Password.Equals("bob"));
- Assert.IsTrue(connectionurl.VirtualHost.Equals("/temp"));
-
- Assert.IsTrue(connectionurl.BrokerCount == 2);
-
- IBrokerInfo service = connectionurl.GetBrokerInfo(0);
-
- Assert.IsTrue(service.Transport.Equals("tcp"));
- Assert.IsTrue(service.Host.Equals("localhost"));
- Assert.IsTrue(service.Port == 5672);
-
- service = connectionurl.GetBrokerInfo(1);
-
- Assert.IsTrue(service.Transport.Equals("tcp"));
- Assert.IsTrue(service.Host.Equals("fancyserver"));
- Assert.IsTrue(service.Port == 3000);
-
- }
-
- [Test]
- public void SingleTransportUsernamePasswordURL()
- {
- String url = "amqp://ritchiem:bob@default/temp?brokerlist='tcp://localhost:5672'";
-
- IConnectionInfo connectionurl = QpidConnectionInfo.FromUrl(url);
-
- Assert.IsTrue(connectionurl.FailoverMethod == null);
- Assert.IsTrue(connectionurl.Username.Equals("ritchiem"));
- Assert.IsTrue(connectionurl.Password.Equals("bob"));
- Assert.IsTrue(connectionurl.VirtualHost.Equals("/temp"));
-
- Assert.IsTrue(connectionurl.BrokerCount == 1);
-
- IBrokerInfo service = connectionurl.GetBrokerInfo(0);
-
- Assert.IsTrue(service.Transport.Equals("tcp"));
- Assert.IsTrue(service.Host.Equals("localhost"));
- Assert.IsTrue(service.Port == 5672);
- }
-
- [Test]
- public void SingleTransportUsernameBlankPasswordURL()
- {
- String url = "amqp://ritchiem:@default/temp?brokerlist='tcp://localhost:5672'";
-
- IConnectionInfo connectionurl = QpidConnectionInfo.FromUrl(url);
-
- Assert.IsTrue(connectionurl.FailoverMethod == null);
- Assert.IsTrue(connectionurl.Username.Equals("ritchiem"));
- Assert.IsTrue(connectionurl.Password.Equals(""));
- Assert.IsTrue(connectionurl.VirtualHost.Equals("/temp"));
-
- Assert.IsTrue(connectionurl.BrokerCount == 1);
-
- IBrokerInfo service = connectionurl.GetBrokerInfo(0);
-
- Assert.IsTrue(service.Transport.Equals("tcp"));
- Assert.IsTrue(service.Host.Equals("localhost"));
- Assert.IsTrue(service.Port == 5672);
- }
-
- [Test]
- public void FailedURLNullPassword()
- {
- String url = "amqp://ritchiem@default/temp?brokerlist='tcp://localhost:5672'";
-
- try
- {
- QpidConnectionInfo.FromUrl(url);
- Assert.Fail("URL has null password");
- }
- catch (UrlSyntaxException e)
- {
- Assert.AreEqual("Null password in user information not allowed.", e.Message);
- Assert.IsTrue(e.GetIndex() == 7);
- }
- }
-
- [Test]
- public void SingleTransportURL()
- {
- String url = "amqp://guest:guest@default/test?brokerlist='tcp://localhost:5672'";
-
- IConnectionInfo connectionurl = QpidConnectionInfo.FromUrl(url);
-
-
- Assert.IsTrue(connectionurl.FailoverMethod == null);
- Assert.IsTrue(connectionurl.Username.Equals("guest"));
- Assert.IsTrue(connectionurl.Password.Equals("guest"));
- Assert.IsTrue(connectionurl.VirtualHost.Equals("/test"));
-
-
- Assert.IsTrue(connectionurl.BrokerCount == 1);
-
-
- IBrokerInfo service = connectionurl.GetBrokerInfo(0);
-
- Assert.IsTrue(service.Transport.Equals("tcp"));
- Assert.IsTrue(service.Host.Equals("localhost"));
- Assert.IsTrue(service.Port == 5672);
- }
-
- [Test]
- public void SingleTransportWithClientURLURL()
- {
- String url = "amqp://guest:guest@clientname/temp?brokerlist='tcp://localhost:5672'";
-
- IConnectionInfo connectionurl = QpidConnectionInfo.FromUrl(url);
-
-
- Assert.IsTrue(connectionurl.FailoverMethod == null);
- Assert.IsTrue(connectionurl.Username.Equals("guest"));
- Assert.IsTrue(connectionurl.Password.Equals("guest"));
- Assert.IsTrue(connectionurl.VirtualHost.Equals("/temp"));
- Assert.IsTrue(connectionurl.ClientName.Equals("clientname"));
-
-
- Assert.IsTrue(connectionurl.BrokerCount == 1);
-
-
- IBrokerInfo service = connectionurl.GetBrokerInfo(0);
-
- Assert.IsTrue(service.Transport.Equals("tcp"));
- Assert.IsTrue(service.Host.Equals("localhost"));
- Assert.IsTrue(service.Port == 5672);
- }
-
- [Test]
- public void SingleTransport1OptionURL()
- {
- String url = "amqp://guest:guest@default/temp?brokerlist='tcp://localhost:5672',routingkey='jim'";
-
- IConnectionInfo connectionurl = QpidConnectionInfo.FromUrl(url);
-
- Assert.IsTrue(connectionurl.FailoverMethod == null);
- Assert.IsTrue(connectionurl.Username.Equals("guest"));
- Assert.IsTrue(connectionurl.Password.Equals("guest"));
- Assert.IsTrue(connectionurl.VirtualHost.Equals("/temp"));
-
-
- Assert.IsTrue(connectionurl.BrokerCount == 1);
-
- IBrokerInfo service = connectionurl.GetBrokerInfo(0);
-
- Assert.IsTrue(service.Transport.Equals("tcp"));
-
- Assert.IsTrue(service.Host.Equals("localhost"));
- Assert.IsTrue(service.Port == 5672);
- Assert.IsTrue(connectionurl.GetOption("routingkey").Equals("jim"));
- }
-
- [Test]
- public void SingleTransportDefaultedBroker()
- {
- String url = "amqp://guest:guest@default/temp?brokerlist='localhost:'";
-
- IConnectionInfo connectionurl = QpidConnectionInfo.FromUrl(url);
-
- Assert.IsTrue(connectionurl.FailoverMethod == null);
- Assert.IsTrue(connectionurl.Username.Equals("guest"));
- Assert.IsTrue(connectionurl.Password.Equals("guest"));
- Assert.IsTrue(connectionurl.VirtualHost.Equals("/temp"));
-
-
- Assert.IsTrue(connectionurl.BrokerCount == 1);
-
- IBrokerInfo service = connectionurl.GetBrokerInfo(0);
-
- Assert.IsTrue(service.Transport.Equals("tcp"));
-
- Assert.IsTrue(service.Host.Equals("localhost"));
- Assert.IsTrue(service.Port == 5672);
- }
-
- [Test]
- public void SingleTransportMultiOptionURL()
- {
- String url = "amqp://guest:guest@default/temp?brokerlist='tcp://localhost:5672',routingkey='jim',timeout='200',immediatedelivery='true'";
-
- IConnectionInfo connectionurl = QpidConnectionInfo.FromUrl(url);
-
- Assert.IsTrue(connectionurl.FailoverMethod == null);
- Assert.IsTrue(connectionurl.Username.Equals("guest"));
- Assert.IsTrue(connectionurl.Password.Equals("guest"));
- Assert.IsTrue(connectionurl.VirtualHost.Equals("/temp"));
-
- Assert.IsTrue(connectionurl.BrokerCount == 1);
-
- IBrokerInfo service = connectionurl.GetBrokerInfo(0);
-
- Assert.IsTrue(service.Transport.Equals("tcp"));
-
- Assert.IsTrue(service.Host.Equals("localhost"));
- Assert.IsTrue(service.Port == 5672);
-
- Assert.IsTrue(connectionurl.GetOption("routingkey").Equals("jim"));
- Assert.IsTrue(connectionurl.GetOption("timeout").Equals("200"));
- Assert.IsTrue(connectionurl.GetOption("immediatedelivery").Equals("true"));
- }
-
- [Test]
- public void SinglevmURL()
- {
- String url = "amqp://guest:guest@default/messages?brokerlist='vm://default:2'";
-
- IConnectionInfo connectionurl = QpidConnectionInfo.FromUrl(url);
-
- Assert.IsTrue(connectionurl.FailoverMethod == null);
- Assert.IsTrue(connectionurl.Username.Equals("guest"));
- Assert.IsTrue(connectionurl.Password.Equals("guest"));
- Assert.IsTrue(connectionurl.VirtualHost.Equals("/messages"));
-
- Assert.IsTrue(connectionurl.BrokerCount == 1);
-
- IBrokerInfo service = connectionurl.GetBrokerInfo(0);
-
- Assert.IsTrue(service.Transport.Equals("vm"));
- Assert.AreEqual("localhost", service.Host);
- Assert.AreEqual(2, service.Port);
- }
-
- [Test]
- public void FailoverVMURL()
- {
- String url = "amqp://ritchiem:bob@default/temp?brokerlist='vm://default:2;vm://default:3',failover='roundrobin'";
-
- IConnectionInfo connectionurl = QpidConnectionInfo.FromUrl(url);
-
- Assert.IsTrue(connectionurl.FailoverMethod.Equals("roundrobin"));
- Assert.IsTrue(connectionurl.Username.Equals("ritchiem"));
- Assert.IsTrue(connectionurl.Password.Equals("bob"));
- Assert.IsTrue(connectionurl.VirtualHost.Equals("/temp"));
-
- Assert.AreEqual(2, connectionurl.BrokerCount);
-
- IBrokerInfo service = connectionurl.GetBrokerInfo(0);
-
- Assert.IsTrue(service.Transport.Equals("vm"));
- Assert.AreEqual("localhost", service.Host);
- Assert.IsTrue(service.Port == 2);
-
- service = connectionurl.GetBrokerInfo(1);
- Assert.IsTrue(service.Transport.Equals("vm"));
- Assert.AreEqual("localhost", service.Host);
- Assert.IsTrue(service.Port == 3);
- }
-
- [Test]
- public void NoVirtualHostURL()
- {
- String url = "amqp://user@default?brokerlist='tcp://localhost:5672'";
-
- try
- {
- QpidConnectionInfo.FromUrl(url);
- Assert.Fail("URL has no virtual host should not parse");
- }
- catch (UrlSyntaxException)
- {
- // This should occur.
- }
- }
-
- [Test]
- public void NoClientID()
- {
- String url = "amqp://user:@default/test?brokerlist='tcp://localhost:5672'";
-
- IConnectionInfo connectionurl = QpidConnectionInfo.FromUrl(url);
-
- Assert.IsTrue(connectionurl.Username.Equals("user"));
- Assert.IsTrue(connectionurl.Password.Equals(""));
- Assert.IsTrue(connectionurl.VirtualHost.Equals("/test"));
- Assert.IsTrue(connectionurl.ClientName.StartsWith(Dns.GetHostName()));
-
- Assert.IsTrue(connectionurl.BrokerCount == 1);
- }
-
- [Test]
- public void WrongOptionSeparatorInOptions()
- {
- String url = "amqp://guest:guest@default/test?brokerlist='tcp://localhost:5672;tcp://localhost:5673'+failover='roundrobin'";
- try
- {
- QpidConnectionInfo.FromUrl(url);
- Assert.Fail("URL Should not parse");
- }
- catch (UrlSyntaxException urise)
- {
- Assert.IsTrue(urise.Message.Equals("Unterminated option. Possible illegal option separator:'+'"));
- }
-
- }
-
- [Test]
- public void NoUserDetailsProvidedWithClientID()
-
- {
- String url = "amqp://clientID/test?brokerlist='tcp://localhost:5672;tcp://localhost:5673'";
- try
- {
- QpidConnectionInfo.FromUrl(url);
- Assert.Fail("URL Should not parse");
- }
- catch (UrlSyntaxException urise)
- {
- Assert.IsTrue(urise.Message.StartsWith("User information not found on url"));
- }
-
- }
-
- [Test]
- public void NoUserDetailsProvidedNOClientID()
-
- {
- String url = "amqp:///test@default?brokerlist='tcp://localhost:5672;tcp://localhost:5673'";
- try
- {
- QpidConnectionInfo.FromUrl(url);
- Assert.Fail("URL Should not parse");
- }
- catch (UrlSyntaxException urise)
- {
-
- Assert.IsTrue(urise.Message.StartsWith("User information not found on url"));
- }
-
- }
-
- [Test]
- public void CheckVirtualHostFormat()
- {
- String url = "amqp://guest:guest@default/t.-_+!=:?brokerlist='tcp://localhost:5672'";
-
- IConnectionInfo connection = QpidConnectionInfo.FromUrl(url);
- Assert.IsTrue(connection.VirtualHost.Equals("/t.-_+!=:"));
- }
-
- [Test]
- public void CheckDefaultPort()
- {
- String url = "amqp://guest:guest@default/test=:?brokerlist='tcp://localhost'";
-
- IConnectionInfo connection = QpidConnectionInfo.FromUrl(url);
-
- IBrokerInfo broker = connection.GetBrokerInfo(0);
- Assert.IsTrue(broker.Port == BrokerInfoConstants.DEFAULT_PORT);
-
- }
-
- [Test]
- public void CheckMissingFinalQuote()
- {
- String url = "amqp://guest:guest@id/test" + "?brokerlist='tcp://localhost:5672";
-
- try
- {
- QpidConnectionInfo.FromUrl(url);
- }
- catch (UrlSyntaxException e)
- {
-// Assert.AreEqual("Unterminated option at index 32: brokerlist='tcp://localhost:5672",
-// e.Message);
- Assert.AreEqual("Unterminated option", e.Message);
- }
- }
-
- [Test]
- public void ValidateQpidConnectionInfoFromToString()
- {
- String url = "amqp://ritchiem:bob@default/temp?brokerlist='tcp://localhost:5672;tcp://fancyserver:3000/',failover='roundrobin'";
-
- IConnectionInfo connectionInfo = QpidConnectionInfo.FromUrl(url);
- IConnectionInfo connectionInfo1 = QpidConnectionInfo.FromUrl(connectionInfo.ToString());
-
- Console.WriteLine(connectionInfo.ToString());
- Console.WriteLine(connectionInfo1.ToString());
-
- Assert.AreEqual(connectionInfo.Username, connectionInfo1.Username);
- Assert.AreEqual(connectionInfo.Password, connectionInfo1.Password);
- Assert.AreEqual(connectionInfo.VirtualHost, connectionInfo1.VirtualHost);
-
- Assert.IsTrue((connectionInfo1.GetAllBrokerInfos().Count == 2));
- Assert.IsTrue(connectionInfo.GetBrokerInfo(0).Equals(connectionInfo1.GetBrokerInfo(0)));
- Assert.IsTrue(connectionInfo.GetBrokerInfo(1).Equals(connectionInfo1.GetBrokerInfo(1)));
-
- }
-
- [Test]
- public void EnsureVirtualHostStartsWithSlash()
- {
- IConnectionInfo connection = new QpidConnectionInfo();
- connection.VirtualHost = "test";
- Assert.AreEqual("/test", connection.VirtualHost);
-
- connection.VirtualHost = "/mytest";
- Assert.AreEqual("/mytest", connection.VirtualHost);
-
- connection.VirtualHost = "";
- Assert.AreEqual("/", connection.VirtualHost);
-
- connection.VirtualHost = null;
- Assert.AreEqual("/", connection.VirtualHost);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs b/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs
deleted file mode 100644
index b62b11a3db..0000000000
--- a/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketProcessor.cs
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Net;
-using System.Net.Sockets;
-using log4net;
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Client.Protocol;
-
-namespace Apache.Qpid.Client.Transport.Socket.Blocking
-{
- class BlockingSocketProcessor : IConnectionCloser
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(BlockingSocketProcessor));
-
- string _host;
- int _port;
- System.Net.Sockets.Socket _socket;
- private NetworkStream _networkStream;
- IByteChannel _byteChannel;
- IProtocolListener _protocolListener;
-
- public BlockingSocketProcessor(string host, int port, IProtocolListener protocolListener)
- {
- _host = host;
- _port = port;
- _protocolListener = protocolListener;
- _byteChannel = new ByteChannel(this);
- }
-
- /// <summary>
- /// Synchronous blocking connect.
- /// </summary>
- public void Connect()
- {
- _socket = new System.Net.Sockets.Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-
- /// For future note TCP Set NoDelay options may help, though with the blocking io not sure
- /// The Don't linger may help with detecting disconnect but that hasn't been the case in testing.
- /// _socket.SetSocketOption (SocketOptionLevel.Socket, SocketOptionName.NoDelay, 0);
- /// _socket.SetSocketOption (SocketOptionLevel.Socket, SocketOptionName.DontLinger, 0);
-
- IPHostEntry ipHostInfo = Dns.Resolve(_host); // Note: don't fix this warning. We do this for .NET 1.1 compatibility.
- IPAddress ipAddress = ipHostInfo.AddressList[0];
-
- IPEndPoint ipe = new IPEndPoint(ipAddress, _port);
-
- _socket.Connect(ipe);
- _networkStream = new NetworkStream(_socket, true);
- }
-
- public string getLocalEndPoint()
- {
- return _socket.LocalEndPoint.ToString();
- }
-
- public void Write(ByteBuffer byteBuffer)
- {
- try
- {
- _networkStream.Write(byteBuffer.array(), byteBuffer.position(), byteBuffer.limit()); // FIXME
- }
- catch (Exception e)
- {
- _log.Error("Write caused exception", e);
- _protocolListener.OnException(e);
- // We should provide the error synchronously as we are doing blocking io.
- throw e;
- }
- }
-
- public ByteBuffer Read()
- {
- const int bufferSize = 4 * 1024; // TODO: Prevent constant allocation of buffers.
- byte[] bytes = new byte[bufferSize];
-
- int numOctets = _networkStream.Read(bytes, 0, bytes.Length);
-
- /// Read only returns 0 if the socket has been gracefully shutdown.
- /// http://msdn2.microsoft.com/en-us/library/system.net.sockets.networkstream.read(VS.71).aspx
- /// We can use this to block Send so the next Read will force an exception forcing failover.
- /// Otherwise we need to wait ~20 seconds for the NetworkStream/Socket code to realise that
- /// the socket has been closed.
- if (numOctets == 0)
- {
- _socket.Shutdown(SocketShutdown.Send);
- _socket.Close();
- }
-
- ByteBuffer byteBuffer = ByteBuffer.wrap(bytes);
- byteBuffer.limit(numOctets);
-
- byteBuffer.flip();
-
- return byteBuffer;
- }
-
- public void Disconnect()
- {
- _networkStream.Flush();
- _networkStream.Close();
- _socket.Close();
- }
-
- public void Close()
- {
- Disconnect();
- }
-
- public IByteChannel ByteChannel
- {
- get { return _byteChannel; }
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketTransport.cs b/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketTransport.cs
deleted file mode 100644
index 17f911fb6d..0000000000
--- a/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/BlockingSocketTransport.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Threading;
-using log4net;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Framing;
-
-namespace Qpid.Client.Transport.Socket.Blocking
-{
- public class BlockingSocketTransport : ITransport
- {
-// static readonly ILog _log = LogManager.GetLogger(typeof(BlockingSocketTransport));
-
- // Configuration variables.
- string _host;
- int _port;
- IProtocolListener _protocolListener;
-
- // Runtime variables.
- private BlockingSocketProcessor _socketProcessor;
- private AmqpChannel _amqpChannel;
-
- private ReaderRunner _readerRunner;
- private Thread _readerThread;
-
- public BlockingSocketTransport(string host, int port, AMQConnection connection)
- {
- _host = host;
- _port = port;
- _protocolListener = connection.ProtocolListener;
- }
-
- public void Open()
- {
- _socketProcessor = new BlockingSocketProcessor(_host, _port, _protocolListener);
- _socketProcessor.Connect();
- _amqpChannel = new AmqpChannel(_socketProcessor.ByteChannel);
- _readerRunner = new ReaderRunner(this);
- _readerThread = new Thread(new ThreadStart(_readerRunner.Run));
- _readerThread.Start();
- }
-
- public string getLocalEndPoint()
- {
- return _socketProcessor.getLocalEndPoint();
- }
-
- public void Close()
- {
- StopReaderThread();
- _socketProcessor.Disconnect();
- }
-
- public IProtocolChannel ProtocolChannel { get { return _amqpChannel; } }
- public IProtocolWriter ProtocolWriter { get { return _amqpChannel; } }
-
- public void StopReaderThread()
- {
- _readerRunner.Stop();
- }
-
- class ReaderRunner
- {
- BlockingSocketTransport _transport;
- bool _running = true;
-
- public ReaderRunner(BlockingSocketTransport transport)
- {
- _transport = transport;
- }
-
- public void Run()
- {
- try
- {
- while (_running)
- {
- Queue frames = _transport.ProtocolChannel.Read();
-
- foreach (IDataBlock dataBlock in frames)
- {
- _transport._protocolListener.OnMessage(dataBlock);
- }
- }
- }
- catch (Exception e)
- {
- _transport._protocolListener.OnException(e);
- }
- }
-
- public void Stop()
- {
- // TODO: Check if this is thread safe. running is not volitile....
- _running = false;
- }
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/ByteChannel.cs b/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/ByteChannel.cs
deleted file mode 100644
index 5f67e99838..0000000000
--- a/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/ByteChannel.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using log4net;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Client.Transport.Socket.Blocking
-{
- class ByteChannel : IByteChannel
- {
- // Warning: don't use this log for regular logging.
- private static readonly ILog _ioTraceLog = LogManager.GetLogger("TRACE.Qpid.Client.ByteChannel");
-
- BlockingSocketProcessor processor;
-
- public ByteChannel(BlockingSocketProcessor processor)
- {
- this.processor = processor;
- }
-
- public ByteBuffer Read()
- {
- ByteBuffer result = processor.Read();
-
- // TODO: Move into decorator.
- if (_ioTraceLog.IsDebugEnabled)
- {
- _ioTraceLog.Debug(String.Format("READ {0}", result));
- }
-
- return result;
- }
-
- public void Write(ByteBuffer buffer)
- {
- // TODO: Move into decorator.
- if (_ioTraceLog.IsDebugEnabled)
- {
- _ioTraceLog.Debug(String.Format("WRITE {0}", buffer));
- }
-
- processor.Write(buffer);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Properties/AssemblyInfo.cs b/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Properties/AssemblyInfo.cs
deleted file mode 100644
index 19599b0833..0000000000
--- a/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Reflection;
-using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Apache.Qpid.Transport.Blocking")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Apache.Qpid.Transport.Blocking")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("ca23e89c-f5b9-4f7a-929a-4fae00ef055b")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.csproj b/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.csproj
deleted file mode 100644
index 6a0b1cd8e6..0000000000
--- a/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.csproj
+++ /dev/null
@@ -1,92 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{52AC4940-2077-4104-A753-29A9C8C16957}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Apache.Qpid.Client.Transport.Socket.Blocking</RootNamespace>
- <AssemblyName>Apache.Qpid.Client.Transport.Socket.Blocking</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="log4net, Version=1.2.0.30714, Culture=neutral, PublicKeyToken=500ffcafb14f92df">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\Qpid.Common\lib\log4net\log4net.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="BlockingSocketProcessor.cs" />
- <Compile Include="BlockingSocketTransport.cs" />
- <Compile Include="ByteChannel.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Qpid.Buffer\Qpid.Buffer.csproj">
- <Project>{44384DF2-B0A4-4580-BDBC-EE4BAA87D995}</Project>
- <Name>Qpid.Buffer</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Client\Qpid.Client.csproj">
- <Project>{68987C05-3768-452C-A6FC-6BA1D372852F}</Project>
- <Name>Qpid.Client</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Common\Qpid.Common.csproj">
- <Project>{77064C42-24D2-4CEB-9EA2-0EF481A43205}</Project>
- <Name>Qpid.Common</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Messaging\Qpid.Messaging.csproj">
- <Project>{6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}</Project>
- <Name>Qpid.Messaging</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.mdp b/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.mdp
deleted file mode 100644
index 54c3be76e5..0000000000
--- a/qpid/dotnet/Qpid.Client.Transport.Socket.Blocking/Qpid.Client.Transport.Socket.Blocking.mdp
+++ /dev/null
@@ -1,50 +0,0 @@
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project name="Qpid.Client.Transport.Socket.Blocking" fileversion="2.0" language="C#" clr-version="Net_1_1" ctype="DotNetProject">
- <Configurations active="Debug">
- <Configuration name="Debug" ctype="DotNetProjectConfiguration">
- <Output directory="./bin/Debug" assembly="Qpid.Client.Transport.Socket.Blocking" />
- <Build debugmode="True" target="Library" />
- <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_1_1" />
- <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
- </Configuration>
- <Configuration name="Release" ctype="DotNetProjectConfiguration">
- <Output directory="./bin/Release" assembly="Qpid.Client.Transport.Socket.Blocking" />
- <Build debugmode="False" target="Library" />
- <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_1_1" />
- <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
- </Configuration>
- </Configurations>
- <DeployTargets />
- <Contents>
- <File name="./Properties/AssemblyInfo.cs" subtype="Code" buildaction="Compile" />
- <File name="./BlockingSocketProcessor.cs" subtype="Code" buildaction="Compile" />
- <File name="./BlockingSocketTransport.cs" subtype="Code" buildaction="Compile" />
- <File name="./ByteChannel.cs" subtype="Code" buildaction="Compile" />
- </Contents>
- <References>
- <ProjectReference type="Gac" localcopy="True" refto="System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <ProjectReference type="Assembly" localcopy="True" refto="../Qpid.Common/lib/log4net/log4net.dll" />
- <ProjectReference type="Project" localcopy="True" refto="Qpid.Buffer" />
- <ProjectReference type="Project" localcopy="True" refto="Qpid.Client" />
- <ProjectReference type="Project" localcopy="True" refto="Qpid.Common" />
- </References>
-</Project> \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Client/Client/AMQAuthenticationException.cs b/qpid/dotnet/Qpid.Client/Client/AMQAuthenticationException.cs
deleted file mode 100644
index 7bb64e3fff..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/AMQAuthenticationException.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid.Client
-{
- [Serializable]
- public class AMQAuthenticationException : AMQException
- {
- public AMQAuthenticationException(int error, String message)
- : base(error, message)
- {
- }
-
- protected AMQAuthenticationException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/AMQConnection.cs b/qpid/dotnet/Qpid.Client/Client/AMQConnection.cs
deleted file mode 100644
index 41d4e089b6..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/AMQConnection.cs
+++ /dev/null
@@ -1,873 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.IO;
-using System.Reflection;
-using System.Threading;
-using log4net;
-using Apache.Qpid.Client.Failover;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client.State;
-using Apache.Qpid.Client.Transport;
-using Apache.Qpid.Client.Transport.Socket.Blocking;
-using Apache.Qpid.Collections;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Client
-{
- public class AMQConnection : Closeable, IConnection
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(AMQConnection));
-
- IConnectionInfo _connectionInfo;
- private int _nextChannelId = 0;
-
- // _Connected should be refactored with a suitable wait object.
- private bool _connected;
-
- Thread _heartBeatThread;
- HeartBeatThread _heartBeatRunner;
-
- // The last error code that occured on the connection. Used to return the correct exception to the client
- private AMQException _lastAMQException = null;
-
- /**
- * This is the "root" mutex that must be held when doing anything that could be impacted by failover.
- * This must be held by any child objects of this connection such as the session, producers and consumers.
- */
- private readonly Object _failoverMutex = new Object();
- public object FailoverMutex
- {
- get { return _failoverMutex; }
- }
-
- /**
- * Policy dictating how to failover
- */
- private FailoverPolicy _failoverPolicy;
-
- internal bool IsFailoverAllowed
- {
- get { if(!_connected) return false; else return _failoverPolicy.FailoverAllowed(); }
- }
-
- /// <summary>
- /// A channel is roughly analogous to a session. The server can negotiate the maximum number of channels
- /// per session and we must prevent the client from opening too many. Zero means unlimited.
- /// </summary>
- private ushort _maximumChannelCount;
-
- /// <summary>
- /// The maximum size of frame supported by the server
- /// </summary>
- private uint _maximumFrameSize;
-
- private AMQStateManager _stateManager;
-
- private AMQProtocolSession _protocolSession;
- public AMQProtocolSession ProtocolSession { get { return _protocolSession; } }
-
- /// <summary>
- /// Maps from session id (Integer) to AmqChannel instance
- /// </summary>
- private readonly IDictionary _sessions = new LinkedHashtable();
-
- private ExceptionListenerDelegate _exceptionListener;
-
- private IConnectionListener _connectionListener;
-
- private ITransport _transport;
- public ITransport Transport { get { return _transport; } }
-
- /// <summary>
- /// Whether this connection is started, i.e. whether messages are flowing to consumers. It has no meaning for
- /// message publication.
- /// </summary>
- private bool _started;
-
- private AMQProtocolListener _protocolListener;
- public AMQProtocolListener ProtocolListener { get { return _protocolListener; } }
-
- public IProtocolWriter ProtocolWriter
- {
- get { return _transport.ProtocolWriter; }
- }
-
- ProtocolWriter _protocolWriter;
-
- public ProtocolWriter ConvenientProtocolWriter
- {
- get { return _protocolWriter; }
- }
-
- public AMQConnection(IConnectionInfo connectionInfo)
- {
- if (connectionInfo == null)
- {
- throw new ArgumentException("ConnectionInfo must be specified");
- }
- _log.Debug("ConnectionInfo: " + connectionInfo);
- _connectionInfo = connectionInfo;
- _log.Debug("password = " + _connectionInfo.Password);
- _failoverPolicy = new FailoverPolicy(connectionInfo);
-
- // We are not currently connected.
- _connected = false;
-
- Exception lastException = null;
- do
- {
- try
- {
- IBrokerInfo brokerInfo = _failoverPolicy.GetNextBrokerInfo();
- _log.Debug("Connecting to " + brokerInfo);
- MakeBrokerConnection(brokerInfo);
- break;
- }
- catch (Exception e)
- {
- lastException = e;
- _log.Error("Unable to connect to broker " + _failoverPolicy.GetCurrentBrokerInfo(), e);
- // XXX: Should perhaps break out of the do/while here if not a SocketException...
- }
- } while (!_connected && _failoverPolicy.FailoverAllowed());
-
- _log.Debug("Are we connected:" + _connected);
-
- if (!_connected)
- {
- if ( lastException is AMQException )
- {
- throw lastException;
- }
- else
- {
- throw new AMQConnectionException("Unable to connect", lastException);
- }
- }
-
- }
-
- /*private ITransport LoadTransportFromAssembly(string host, int port, String assemblyName, String transportType)
- {
- //Assembly assembly = Assembly.LoadFrom(assemblyName);
- Assembly assembly = Assembly.Load(assemblyName);
-
- foreach (Type type in assembly.GetTypes())
- {
- _log.Debug(String.Format("type = {0}", type));
- }
-
- Type transport = assembly.GetType(transportType);
-
- if (transport == null)
- {
- throw new ArgumentException(
- String.Format("Type is not found in assembly. Type={0} Assembly={1}", transportType, assemblyName));
-
- }
-
- _log.Debug("transport = " + transport);
- _log.Debug("ctors = " + transport.GetConstructors());
-
- ConstructorInfo info = transport.GetConstructors()[0];
- ITransport result = (ITransport)info.Invoke(new object[] { host, port, this });
-
- _log.Debug("transport = " + result);
-
- return result;
- }*/
-
- public void Disconnect()
- {
- _transport.Close();
- }
-
- #region IConnection Members
-
- public string ClientID
- {
- get
- {
- CheckNotClosed();
- return _connectionInfo.ClientName;
- }
- set
- {
- CheckNotClosed();
- _connectionInfo.ClientName = value;
- }
- }
-
- public override void Close()
- {
- lock (FailoverMutex)
- {
- // atomically set to closed and check the _previous value was NOT CLOSED
- if (Interlocked.Exchange(ref _closed, CLOSED) == NOT_CLOSED)
- {
- try
- {
- CloseAllSessions(null);
- CloseConnection();
- }
- catch (AMQException e)
- {
- throw new QpidException("Error closing connection: " + e);
- }
- }
- }
- }
-
- private void CloseConnection()
- {
- _stateManager.ChangeState(AMQState.CONNECTION_CLOSING);
-
- AMQFrame frame = ConnectionCloseBody.CreateAMQFrame(
- 0, 200, "Qpid.NET client is closing the connection.", 0, 0);
-
- ProtocolWriter.Write(frame);
-
- _log.Debug("Blocking for connection close ok frame");
-
- Disconnect();
- }
-
- class CreateChannelFailoverSupport : FailoverSupport
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(CreateChannelFailoverSupport));
-
- private bool _transacted;
- private AcknowledgeMode _acknowledgeMode;
- int _prefetchHigh;
- int _prefetchLow;
- AMQConnection _connection;
-
- public CreateChannelFailoverSupport(AMQConnection connection, bool transacted, AcknowledgeMode acknowledgeMode, int prefetchHigh, int prefetchLow)
- {
- _connection = connection;
- _transacted = transacted;
- _acknowledgeMode = acknowledgeMode;
- _prefetchHigh = prefetchHigh;
- _prefetchLow = prefetchLow;
- }
-
- protected override object operation()
- {
- ushort channelId = _connection.NextChannelId();
-
- if (_log.IsDebugEnabled)
- {
- _log.Debug("Write channel open frame for channel id " + channelId);
- }
-
- // We must create the channel and register it before actually sending the frame to the server to
- // open it, so that there is no window where we could receive data on the channel and not be set
- // up to handle it appropriately.
- AmqChannel channel = new AmqChannel(_connection,
- channelId, _transacted, _acknowledgeMode, _prefetchHigh, _prefetchLow);
- _connection.ProtocolSession.AddSessionByChannel(channelId, channel);
- _connection.RegisterSession(channelId, channel);
-
- bool success = false;
- try
- {
- _connection.CreateChannelOverWire(channelId, _prefetchHigh, _prefetchLow, _transacted);
- success = true;
- }
- catch (AMQException e)
- {
- throw new QpidException("Error creating channel: " + e, e);
- }
- finally
- {
- if (!success) {
- _connection.ProtocolSession.RemoveSessionByChannel(channelId);
- _connection.DeregisterSession(channelId);
- }
- }
-
- if (_connection._started)
- {
- channel.Start();
- }
- return channel;
- }
- }
-
- internal ushort NextChannelId()
- {
- return (ushort) Interlocked.Increment(ref _nextChannelId);
- }
-
- public IChannel CreateChannel(bool transacted, AcknowledgeMode acknowledgeMode)
- {
- return CreateChannel(transacted, acknowledgeMode, AmqChannel.DEFAULT_PREFETCH_HIGH_MARK);
- }
-
- public IChannel CreateChannel(bool transacted, AcknowledgeMode acknowledgeMode, int prefetch)
- {
- return CreateChannel(transacted, acknowledgeMode, prefetch, prefetch);
- }
-
- public IChannel CreateChannel(bool transacted, AcknowledgeMode acknowledgeMode, int prefetchHigh, int prefetchLow)
- {
- CheckNotClosed();
- if (ChannelLimitReached())
- {
- throw new ChannelLimitReachedException(_maximumChannelCount);
- }
- else
- {
- CreateChannelFailoverSupport operation =
- new CreateChannelFailoverSupport(this, transacted, acknowledgeMode, prefetchHigh, prefetchLow);
- return (IChannel)operation.execute(this);
- }
- }
-
- public void CloseSession(AmqChannel channel)
- {
- // FIXME: Don't we need FailoverSupport here (as we have SyncWrite).
- _protocolSession.CloseSession(channel);
-
- AMQFrame frame = ChannelCloseBody.CreateAMQFrame(
- channel.ChannelId, 200, "JMS client closing channel", 0, 0);
-
- _log.Debug("Blocking for channel close frame for channel " + channel.ChannelId);
- _protocolWriter.SyncWrite(frame, typeof(ChannelCloseOkBody));
- _log.Debug("Received channel close frame");
- // When control resumes at this point, a reply will have been received that
- // indicates the broker has closed the channel successfully
- }
-
- public ExceptionListenerDelegate ExceptionListener
- {
- get
- {
- CheckNotClosed();
- return _exceptionListener;
- }
- set
- {
- CheckNotClosed();
- _exceptionListener = value;
- }
- }
-
- /// <summary>
- /// Start the connection, i.e. start flowing messages. Note that this method must be called only from a single thread
- /// and is not thread safe (which is legal according to the JMS specification).
- /// @throws JMSException
- /// </summary>
- public void Start()
- {
- CheckNotClosed();
-
- if (!_started)
- {
- foreach (DictionaryEntry lde in _sessions)
- {
- AmqChannel s = (AmqChannel)lde.Value;
- s.Start();
- }
- _started = true;
- }
- }
-
- public void Stop()
- {
- CheckNotClosed();
-
- if (_started)
- {
- foreach (DictionaryEntry lde in _sessions)
- {
- AmqChannel s = (AmqChannel) lde.Value;
- s.Stop();
- }
- _started = false;
- }
- }
-
- public IConnectionListener ConnectionListener
- {
- get { return _connectionListener; }
- set { _connectionListener = value; }
- }
-
- #endregion
-
- #region IDisposable Members
-
- public void Dispose()
- {
- Close();
- }
-
- #endregion
-
- private bool ChannelLimitReached()
- {
- return _maximumChannelCount != 0 && _sessions.Count == _maximumChannelCount;
- }
-
- /// <summary>
- /// Close all the sessions, either due to normal connection closure or due to an error occurring.
- /// @param cause if not null, the error that is causing this shutdown
- /// </summary>
- private void CloseAllSessions(Exception cause)
- {
- _log.Debug("Closing all session in connection " + this);
- ICollection sessions = new ArrayList(_sessions.Values);
- foreach (AmqChannel channel in sessions)
- {
- _log.Debug("Closing channel " + channel);
- if (cause != null)
- {
- channel.ClosedWithException(cause);
- }
- else
- {
- try
- {
- channel.Close();
- }
- catch (QpidException e)
- {
- _log.Error("Error closing channel: " + e);
- }
- }
- }
- _log.Debug("Done closing all sessions in connection " + this);
- }
-
- public int MaximumChannelCount
- {
- get
- {
- CheckNotClosed();
- return _maximumChannelCount;
- }
- }
-
- internal void SetMaximumChannelCount(ushort maximumChannelCount)
- {
- CheckNotClosed();
- _maximumChannelCount = maximumChannelCount;
- }
-
- public uint MaximumFrameSize
- {
- get
- {
- return _maximumFrameSize;
- }
-
- set
- {
- _maximumFrameSize = value;
- }
- }
-
- public IDictionary Sessions
- {
- get
- {
- return _sessions;
- }
- }
-
- public string Host
- {
- get
- {
- return _failoverPolicy.GetCurrentBrokerInfo().Host;
- }
- }
-
- public int Port
- {
- get
- {
- return _failoverPolicy.GetCurrentBrokerInfo().Port;
- }
- }
-
- public string Username
- {
- get
- {
- return _connectionInfo.Username;
- }
- }
-
- public string Password
- {
- get
- {
- return _connectionInfo.Password;
- }
- }
-
- public string VirtualHost
- {
- get
- {
- return _connectionInfo.VirtualHost;
- }
- }
-
- /// <summary>
- /// Invoked by the AMQProtocolSession when a protocol session exception has occurred.
- /// This method sends the exception to a JMS exception listener, if configured, and
- /// propagates the exception to sessions, which in turn will propagate to consumers.
- /// This allows synchronous consumers to have exceptions thrown to them.
- /// </summary>
- /// <param name="cause">the exception</param>
- public void ExceptionReceived(Exception cause)
- {
- if (_exceptionListener != null)
- {
- // Listener expects one of these...
- QpidException xe;
-
- if (cause is QpidException)
- {
- xe = (QpidException) cause;
- }
- else
- {
- xe = new QpidException("Exception thrown against " + ToString() + ": " + cause, cause);
- }
- // in the case of an IOException, MINA has closed the protocol session so we set _closed to true
- // so that any generic client code that tries to close the connection will not mess up this error
- // handling sequence
- if (cause is IOException)
- {
- Interlocked.Exchange(ref _closed, CLOSED);
- }
-#if __MonoCS__
- _exceptionListener(xe);
-#else
- _exceptionListener.Invoke(xe);
-#endif
- }
- else
- {
- _log.Error("Connection exception: " + cause);
- }
-
- // An undelivered is not fatal to the connections usability.
- if (!(cause is AMQUndeliveredException))
- {
- Interlocked.Exchange(ref _closed, CLOSED);
- CloseAllSessions(cause);
- }
- else
- {
- ;
- }
- }
-
- internal void RegisterSession(int channelId, AmqChannel channel)
- {
- _sessions[channelId] = channel;
- }
-
- internal void DeregisterSession(int channelId)
- {
- _sessions.Remove(channelId);
- }
-
- /**
- * Fire the preFailover event to the registered connection listener (if any)
- *
- * @param redirect true if this is the result of a redirect request rather than a connection error
- * @return true if no listener or listener does not veto change
- */
- public bool FirePreFailover(bool redirect)
- {
- bool proceed = true;
- if (_connectionListener != null)
- {
- proceed = _connectionListener.PreFailover(redirect);
- }
- return proceed;
- }
-
- /**
- * Fire the preResubscribe event to the registered connection listener (if any). If the listener
- * vetoes resubscription then all the sessions are closed.
- *
- * @return true if no listener or listener does not veto resubscription.
- * @throws JMSException
- */
- public bool FirePreResubscribe()
- {
- if (_connectionListener != null)
- {
- bool resubscribe = _connectionListener.PreResubscribe();
- if (!resubscribe)
- {
- MarkAllSessionsClosed();
- }
- return resubscribe;
- }
- else
- {
- return true;
- }
- }
-
- /**
- * Marks all sessions and their children as closed without sending any protocol messages. Useful when
- * you need to mark objects "visible" in userland as closed after failover or other significant event that
- * impacts the connection.
- * <p/>
- * The caller must hold the failover mutex before calling this method.
- */
- private void MarkAllSessionsClosed()
- {
- //LinkedList sessionCopy = new LinkedList(_sessions.values());
- ArrayList sessionCopy = new ArrayList(_sessions.Values);
- foreach (AmqChannel session in sessionCopy)
- {
- session.MarkClosed();
- }
- _sessions.Clear();
- }
-
- /**
- * Fires a failover complete event to the registered connection listener (if any).
- */
- public void FireFailoverComplete()
- {
- if (_connectionListener != null)
- {
- _connectionListener.FailoverComplete();
- }
- }
-
- public bool AttemptReconnection(String host, int port, SslOptions sslConfig)
- {
- IBrokerInfo bd = new AmqBrokerInfo("amqp", host, port, sslConfig);
-
- _failoverPolicy.setBroker(bd);
-
- try
- {
- MakeBrokerConnection(bd);
- return true;
- }
- catch (Exception e)
- {
- _log.Debug("Unable to connect to broker at " + bd, e);
- AttemptReconnection();
- }
- return false;
- }
-
- private void MakeBrokerConnection(IBrokerInfo brokerDetail)
- {
- try
- {
- _stateManager = new AMQStateManager();
- _protocolListener = new AMQProtocolListener(this, _stateManager);
- _protocolListener.AddFrameListener(_stateManager);
-
- /*
- // Currently there is only one transport option - BlockingSocket.
- String assemblyName = "Apache.Qpid.Client.Transport.Socket.Blocking.dll";
- String transportType = "Apache.Qpid.Client.Transport.Socket.Blocking.BlockingSocketTransport";
-
- // Load the transport assembly dynamically.
- _transport = LoadTransportFromAssembly(brokerDetail.getHost(), brokerDetail.getPort(), assemblyName, transportType);
- */
-
- _transport = new BlockingSocketTransport();
-
- // Connect.
- _transport.Connect(brokerDetail, this);
- _protocolWriter = new ProtocolWriter(_transport.ProtocolWriter, _protocolListener);
- _protocolSession = new AMQProtocolSession(_transport.ProtocolWriter, _transport, this);
- _protocolListener.ProtocolSession = _protocolSession;
-
- // Now start the connection "handshake".
- _transport.ProtocolWriter.Write(new ProtocolInitiation());
-
- // Blocks until the connection has been opened.
- _stateManager.AttainState(AMQState.CONNECTION_OPEN);
-
- _failoverPolicy.attainedConnection();
-
- // XXX: Again this should be changed to a suitable notify.
- _connected = true;
- }
- catch (AMQException e)
- {
- _lastAMQException = e;
- throw; // rethrow
- }
- }
-
- public bool AttemptReconnection()
- {
- while (_failoverPolicy.FailoverAllowed())
- {
- try
- {
- MakeBrokerConnection(_failoverPolicy.GetNextBrokerInfo());
- return true;
- }
- catch (Exception e)
- {
- if (!(e is AMQException))
- {
- _log.Debug("Unable to connect to broker at " + _failoverPolicy.GetCurrentBrokerInfo(), e);
- }
- else
- {
- _log.Debug(e.Message + ":Unable to connect to broker at " + _failoverPolicy.GetCurrentBrokerInfo());
- }
- }
- }
-
- // Connection unsuccessful.
- return false;
- }
-
- /**
- * For all channels, and for all consumers in those sessions, resubscribe. This is called during failover handling.
- * The caller must hold the failover mutex before calling this method.
- */
- public void ResubscribeChannels()
- {
- ArrayList channels = new ArrayList(_sessions.Values);
- _log.Debug(String.Format("Resubscribing sessions = {0} sessions.size={1}", channels, channels.Count));
- foreach (AmqChannel channel in channels)
- {
- _protocolSession.AddSessionByChannel(channel.ChannelId, channel);
- ReopenChannel(
- channel.ChannelId,
- channel.DefaultPrefetchHigh,
- channel.DefaultPrefetchLow,
- channel.Transacted
- );
- channel.ReplayOnFailOver();
- }
- }
-
- private void ReopenChannel(ushort channelId, int prefetchHigh, int prefetchLow, bool transacted)
- {
- _log.Debug(string.Format("Reopening channel id={0} prefetchHigh={1} prefetchLow={2} transacted={3}",
- channelId, prefetchHigh, prefetchLow, transacted));
- try
- {
- CreateChannelOverWire(channelId, prefetchHigh, prefetchLow, transacted);
- }
- catch (AMQException e)
- {
- _protocolSession.RemoveSessionByChannel(channelId);
- DeregisterSession(channelId);
- throw new AMQException("Error reopening channel " + channelId + " after failover: " + e);
- }
- }
-
- void CreateChannelOverWire(ushort channelId, int prefetchHigh, int prefetchLow, bool transacted)
- {
- _protocolWriter.SyncWrite(ChannelOpenBody.CreateAMQFrame(channelId, null), typeof (ChannelOpenOkBody));
-
- // Don't use the BasicQos frame if connecting to OpenAMQ (at it is not support). We
- // know this when we connection using AMQP 0.7
- if (ProtocolInitiation.CURRENT_PROTOCOL_VERSION_MAJOR != 7)
- {
- // Basic.Qos frame appears to not be supported by OpenAMQ 1.0d.
- _protocolWriter.SyncWrite(BasicQosBody.CreateAMQFrame(channelId, 0, (ushort)prefetchHigh, false), typeof (BasicQosOkBody));
- }
-
- if (transacted)
- {
- if (_log.IsDebugEnabled)
- {
- _log.Debug("Issuing TxSelect for " + channelId);
- }
- _protocolWriter.SyncWrite(TxSelectBody.CreateAMQFrame(channelId), typeof(TxSelectOkBody));
- }
- }
-
- public String toURL()
- {
- return _connectionInfo.AsUrl();
- }
-
- class HeartBeatThread
- {
- int _heartbeatMillis;
- IProtocolWriter _protocolWriter;
- bool _run = true;
-
- public HeartBeatThread(IProtocolWriter protocolWriter, int heartbeatMillis)
- {
- _protocolWriter = protocolWriter;
- _heartbeatMillis = heartbeatMillis;
- }
-
- public void Run()
- {
- while (_run)
- {
- Thread.Sleep(_heartbeatMillis);
- if (!_run) break;
- _log.Debug("Sending heartbeat");
- // TODO: Can we optimise this so that heartbeats are only written when we haven't sent anything recently to the broker?
- _protocolWriter.Write(HeartbeatBody.FRAME);
- }
- _log.Debug("Heatbeat thread stopped");
- }
-
- public void Stop()
- {
- _run = false;
- }
- }
-
- public void StartHeartBeatThread(int heartbeatSeconds)
- {
- _log.Debug("Starting new heartbeat thread");
- _heartBeatRunner = new HeartBeatThread(ProtocolWriter, heartbeatSeconds * 1000);
- _heartBeatThread = new Thread(new ThreadStart(_heartBeatRunner.Run));
- _heartBeatThread.Name = "HeartBeat";
- _heartBeatThread.Start();
- }
-
- public void StopHeartBeatThread()
- {
- if (_heartBeatRunner != null)
- {
- _log.Debug("Stopping old heartbeat thread");
- _heartBeatRunner.Stop();
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/AMQConnectionException.cs b/qpid/dotnet/Qpid.Client/Client/AMQConnectionException.cs
deleted file mode 100644
index c8a48814bb..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/AMQConnectionException.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid.Client
-{
- [Serializable]
- public class AMQConnectionException : AMQException
- {
- public AMQConnectionException(String message, Exception e) : base(message, e)
- {
- }
-
- protected AMQConnectionException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/AMQDestination.cs b/qpid/dotnet/Qpid.Client/Client/AMQDestination.cs
deleted file mode 100644
index 07ce3c2354..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/AMQDestination.cs
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Client
-{
- public abstract class AMQDestination
- {
- protected readonly string _exchangeName;
- protected readonly string _exchangeClass;
- protected readonly string _destinationName;
- protected readonly bool _isExclusive;
- protected readonly bool _isAutoDelete;
- protected bool _isDurable;
-
- public bool IsDurable
- {
-
- get { return _isDurable; }
- }
-
- protected string _queueName;
-
- protected AMQDestination(String exchangeName, String exchangeClass, String destinationName, bool isExclusive,
- bool isAutoDelete, String queueName)
- {
- // XXX: This is ugly - OnlyRequired because of ReplyToDestination.
-// if (destinationName == null)
-// {
-// throw new ArgumentNullException("destinationName");
-// }
-
- // XXX: This is ugly - OnlyRequired because of SendingDestinationAdapter.
-// if (exchangeName == null)
-// {
-// throw new ArgumentNullException("exchangeName");
-// }
-
- // XXX: This is ugly - OnlyRequired because of SendingDestinationAdapter.
-// if (exchangeClass == null)
-// {
-// throw new ArgumentNullException("exchangeClass");
-// }
-
- _exchangeName = exchangeName;
- _exchangeClass = exchangeClass;
- _destinationName = destinationName;
- _isExclusive = isExclusive;
- _isAutoDelete = isAutoDelete;
- _queueName = queueName;
- }
-
- public string Name
- {
- get
- {
- return _destinationName;
- }
- }
-
- public abstract string RoutingKey
- {
- get;
- }
-
- public abstract string EncodedName
- {
- get;
- }
-
- public bool AutoDelete
- {
- get
- {
- return _isAutoDelete;
- }
- }
-
- public string QueueName
- {
- get
- {
- return _queueName;
- }
- set
- {
- _queueName = value;
- }
- }
-
- public string ExchangeName
- {
- get
- {
- return _exchangeName;
- }
- }
-
- public string ExchangeClass
- {
- get
- {
- return _exchangeClass;
- }
- }
-
- public bool IsExclusive
- {
- get
- {
- return _isExclusive;
- }
- }
-
- public bool IsAutoDelete
- {
- get
- {
- return _isAutoDelete;
- }
- }
-
- public override string ToString()
- {
- return "Destination: " + _destinationName + ", " +
- "Queue Name: " + _queueName + ", Exchange: " + _exchangeName +
- ", Exchange class: " + _exchangeClass + ", Exclusive: " + _isExclusive +
- ", AutoDelete: " + _isAutoDelete; // +", Routing Key: " + RoutingKey;
- }
-
- public override bool Equals(object o)
- {
- if (this == o)
- {
- return true;
- }
- if (o == null || GetType() != o.GetType())
- {
- return false;
- }
-
- AMQDestination that = (AMQDestination) o;
-
- if (!StringsNotEqualNullSafe(_destinationName, that._destinationName))
- {
- return false;
- }
- if (!StringsNotEqualNullSafe(_exchangeClass, that._exchangeClass))
- {
- return false;
- }
- if (!StringsNotEqualNullSafe(_exchangeName, that._exchangeName))
- {
- return false;
- }
- if (!StringsNotEqualNullSafe(_queueName, that._queueName))
- {
- return false;
- }
- if (_isExclusive != that._isExclusive)
- {
- return false;
- }
- if (_isAutoDelete != that._isAutoDelete)
- {
- return false;
- }
- return true;
- }
-
- private bool StringsNotEqualNullSafe(string one, string two)
- {
- if ((one == null && two != null) ||
- (one != null && !one.Equals(two)))
- {
- return false;
- }
- else
- {
- return true;
- }
- }
-
- public override int GetHashCode()
- {
- int result;
- if (_exchangeName == null)
- {
- result = "".GetHashCode();
- }
- else
- {
- result = _exchangeName.GetHashCode();
- }
- if (_exchangeClass != null)
- {
- result = 29 * result + _exchangeClass.GetHashCode();
- }
- if (_destinationName != null)
- {
- result = 29 * result + _destinationName.GetHashCode();
- }
- if (_queueName != null)
- {
- result = 29 * result + _queueName.GetHashCode();
- }
- result = result * (_isExclusive ? 13 : 7);
- result = result * (_isAutoDelete ? 13 : 7);
-
- Console.WriteLine("FIXME HashCode for " + this + " = " + result);
- return result;
- }
-
- public abstract bool IsNameRequired { get; }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/AMQNoConsumersException.cs b/qpid/dotnet/Qpid.Client/Client/AMQNoConsumersException.cs
deleted file mode 100644
index 5c9dd86c53..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/AMQNoConsumersException.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-using Apache.Qpid.Common;
-using Apache.Qpid.Protocol;
-
-namespace Apache.Qpid.Client
-{
- [Serializable]
- public class AMQNoConsumersException : AMQUndeliveredException
- {
- public AMQNoConsumersException(string message)
- : this(message, null)
- {
- }
-
- public AMQNoConsumersException(string message, object bounced)
- : base(AMQConstant.NO_CONSUMERS.Code, message, bounced)
- {
- }
- protected AMQNoConsumersException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/AMQNoRouteException.cs b/qpid/dotnet/Qpid.Client/Client/AMQNoRouteException.cs
deleted file mode 100644
index 5868d78f32..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/AMQNoRouteException.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-using Apache.Qpid.Common;
-using Apache.Qpid.Protocol;
-
-namespace Apache.Qpid.Client
-{
- [Serializable]
- public class AMQNoRouteException : AMQUndeliveredException
- {
- public AMQNoRouteException(string message)
- : this(message, null)
- {
- }
-
- public AMQNoRouteException(string message, object bounced)
- : base(AMQConstant.NO_ROUTE.Code, message, bounced)
- {
- }
-
- protected AMQNoRouteException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs b/qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs
deleted file mode 100644
index 591c5b941f..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/AmqBrokerInfo.cs
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Text;
-using Apache.Qpid.Client.Qms;
-
-namespace Apache.Qpid.Client
-{
- public class AmqBrokerInfo : IBrokerInfo
- {
- public readonly string URL_FORMAT_EXAMPLE =
- "<transport>://<hostname>[:<port Default=\""+BrokerInfoConstants.DEFAULT_PORT+"\">][?<option>='<value>'[,<option>='<value>']]";
-
- public const long DEFAULT_CONNECT_TIMEOUT = 30000L;
-
- private string _host = "localhost";
- private int _port = 5672;
- private string _transport = "amqp";
- private Hashtable _options = new Hashtable();
- private SslOptions _sslOptions;
-
- public AmqBrokerInfo()
- {
- }
-
- public AmqBrokerInfo(string url)
- {
- // URL should be of format tcp://host:port?option='value',option='value'
- try
- {
- Uri connection = new Uri(url);
-
- String transport = connection.Scheme;
-
- // Handles some defaults to minimise changes to existing broker URLS e.g. localhost
- if (transport != null)
- {
- transport = transport.ToLower();
- //todo this list of valid transports should be enumerated somewhere
- if ((!(transport.Equals("vm") || transport.Equals("tcp"))))
- {
- if (transport.Equals("localhost"))
- {
- connection = new Uri(BrokerInfoConstants.DEFAULT_TRANSPORT + "://" + url);
- transport = connection.Scheme;
- }
- else
- {
- if (url[transport.Length] == ':' && url[transport.Length + 1] != '/')
- {
- //Then most likely we have a host:port value
- connection = new Uri(BrokerInfoConstants.DEFAULT_TRANSPORT + "://" + url);
- transport = connection.Scheme;
- }
- else
- {
- URLHelper.parseError(0, transport.Length, "Unknown transport", url);
- }
- }
- }
- }
- else
- {
- //Default the transport
- connection = new Uri(BrokerInfoConstants.DEFAULT_TRANSPORT + "://" + url);
- transport = connection.Scheme;
- }
-
- if (transport == null)
- {
- URLHelper.parseError(-1, "Unknown transport:'" + transport + "'" +
- " In broker URL:'" + url + "' Format: " + URL_FORMAT_EXAMPLE, "");
- }
-
- Transport = transport;
-
- String host = connection.Host;
- if (!host.Equals("default")) Host = host;
-
- int port = connection.Port;
-
- if (port == -1)
- {
- // Fix for when there is port data but it is not automatically parseable by getPort().
- String auth = connection.Authority;
-
- if (auth != null && auth.IndexOf(':') != -1)
- {
- int start = auth.IndexOf(":") + 1;
- int end = start;
- bool looking = true;
- bool found = false;
- //Walk the authority looking for a port value.
- while (looking)
- {
- try
- {
- end++;
- int.Parse(auth.Substring(start, end-start+1));
-
- if (end >= auth.Length)
- {
- looking = false;
- found = true;
- }
- }
- catch (FormatException)
- {
- looking = false;
- }
-
- }
- if (found)
- {
- Port = int.Parse(auth.Substring(start, end-start+1));
- }
- else
- {
- URLHelper.parseError(connection.ToString().IndexOf(connection.Authority) + end - 1,
- "Illegal character in port number", connection.ToString());
- }
- }
- else
- {
- Port = BrokerInfoConstants.DEFAULT_PORT;
- }
- }
- else
- {
- Port = port;
- }
-
- String queryString = connection.Query;
- if (queryString.Length > 0 && queryString[0] == '?')
- {
- queryString = queryString.Substring(1);
- }
-
- URLHelper.parseOptions(_options, queryString);
-
- //Fragment is #string (not used)
- }
- catch (UriFormatException uris)
- {
- throw uris;
-// if (uris is UrlSyntaxException)
-// {
-// throw uris;
-// }
-//
-// URLHelper.parseError(uris.getIndex(), uris.getReason(), uris.getInput());
- }
- }
-
- public AmqBrokerInfo(string transport, string host, int port, bool useSSL) : this()
- {
- _transport = transport;
- _host = host;
- _port = port;
-
- if (useSSL)
- {
- SetOption(BrokerInfoConstants.OPTIONS_SSL, "true");
- }
- }
-
- public AmqBrokerInfo(string transport, string host, int port, SslOptions sslConfig)
- : this()
- {
- _transport = transport;
- _host = host;
- _port = port;
-
- if ( sslConfig != null )
- {
- SetOption(BrokerInfoConstants.OPTIONS_SSL, "true");
- _sslOptions = sslConfig;
- }
- }
-
-
- public string Host
- {
- get { return _host; }
- set { _host = value; }
- }
-
- public int Port
- {
- get { return _port; }
- set { _port = value; }
- }
-
- public string Transport
- {
- get { return _transport; }
- set { _transport = value; }
- }
-
- public SslOptions SslOptions
- {
- get { return _sslOptions; }
- }
-
- public string GetOption(string key)
- {
- return (string)_options[key];
- }
-
- public void SetOption(string key, string value)
- {
- _options[key] = value;
- }
-
- public long Timeout
- {
- get
- {
- if ( _options.ContainsKey(BrokerInfoConstants.OPTIONS_CONNECT_TIMEOUT) )
- {
- try
- {
- return long.Parse(GetOption(BrokerInfoConstants.OPTIONS_CONNECT_TIMEOUT));
- } catch ( FormatException )
- {
- //Do nothing as we will use the default below.
- }
- }
- return BrokerInfoConstants.DEFAULT_CONNECT_TIMEOUT;
- }
- set
- {
- SetOption(BrokerInfoConstants.OPTIONS_CONNECT_TIMEOUT, value.ToString());
- }
- }
-
- public override string ToString()
- {
- StringBuilder sb = new StringBuilder();
-
- sb.Append(_transport);
- sb.Append("://");
-
- if (!(StringEqualsIgnoreCase(_transport, "vm")))
- {
- sb.Append(_host);
- }
-
- sb.Append(':');
- sb.Append(_port);
-
- sb.Append(URLHelper.printOptions(_options));
-
- return sb.ToString();
- }
-
- public override bool Equals(object obj)
- {
- if (!(obj is IBrokerInfo))
- {
- return false;
- }
-
- IBrokerInfo bd = (IBrokerInfo) obj;
- return StringEqualsIgnoreCase(_host, bd.Host) &&
- _port == bd.Port &&
- StringEqualsIgnoreCase(_transport, bd.Transport) &&
- UseSSL == bd.UseSSL;
- }
-
- public override int GetHashCode()
- {
- return _host.ToLower().GetHashCode() ^ _port.GetHashCode();
- }
-
- // TODO: move to util class.
- private bool StringEqualsIgnoreCase(string one, string two)
- {
- return one.ToLower().Equals(two.ToLower());
- }
-
- public bool UseSSL
- {
- get
- {
- // To be friendly to users we should be case insensitive.
- // or simply force users to conform to OPTIONS_SSL
- // todo make case insensitive by trying ssl Ssl sSl ssL SSl SsL sSL SSL
-
- if ( _options.ContainsKey(BrokerInfoConstants.OPTIONS_SSL) )
- {
- return StringEqualsIgnoreCase(GetOption(BrokerInfoConstants.OPTIONS_SSL), "true");
- }
-
- return false;
- }
- set
- {
- SetOption(BrokerInfoConstants.OPTIONS_SSL, value.ToString());
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs b/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs
deleted file mode 100644
index 84c7c06fe1..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/AmqChannel.cs
+++ /dev/null
@@ -1,1241 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Text.RegularExpressions;
-using System.Threading;
-using log4net;
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Client.Message;
-using Apache.Qpid.Client.Util;
-using Apache.Qpid.Collections;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Protocol;
-
-namespace Apache.Qpid.Client
-{
- /// <summary>
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Declare queues.
- /// <tr><td> Declare exchanges.
- /// <tr><td> Bind queues to exchanges.
- /// <tr><td> Create messages.
- /// <tr><td> Set up message consumers on the channel.
- /// <tr><td> Set up message producers on the channel.
- /// <tr><td> Commit the current transaction.
- /// <tr><td> Roll-back the current transaction.
- /// <tr><td> Close the channel.
- /// </table>
- /// </summary>
- public class AmqChannel : Closeable, IChannel
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(AmqChannel));
-
- internal const int BASIC_CONTENT_TYPE = 60;
-
- public const int DEFAULT_PREFETCH_HIGH_MARK = 5000;
-
- public const int DEFAULT_PREFETCH_LOW_MARK = 2500;
-
- private static int _nextSessionNumber = 0;
-
- private AMQConnection _connection;
-
- private int _sessionNumber;
-
- private bool _suspended;
-
- private object _suspensionLock = new object();
-
- // Used in the consume method. We generate the consume tag on the client so that we can use the nowait feature.
- private int _nextConsumerNumber = 1;
-
- private bool _transacted;
-
- private AcknowledgeMode _acknowledgeMode;
-
- private ushort _channelId;
-
- private int _defaultPrefetchHighMark = DEFAULT_PREFETCH_HIGH_MARK;
-
- private int _defaultPrefetchLowMark = DEFAULT_PREFETCH_LOW_MARK;
-
- private FlowControlQueue _queue;
-
- private Dispatcher _dispatcher;
-
- private MessageFactoryRegistry _messageFactoryRegistry;
-
- /// <summary> Holds all of the producers created by this channel. </summary>
- private Hashtable _producers = Hashtable.Synchronized(new Hashtable());
-
- /// <summary> Holds all of the consumers created by this channel. </summary>
- private Hashtable _consumers = Hashtable.Synchronized(new Hashtable());
-
- private ArrayList _replayFrames = new ArrayList();
-
- /// <summary>
- /// The counter of the _next producer id. This id is generated by the session and used only to allow the
- /// producer to identify itself to the session when deregistering itself.
- ///
- /// Access to this id does not require to be synchronized since according to the JMS specification only one
- /// thread of control is allowed to create producers for any given session instance.
- /// </summary>
- private long _nextProducerId;
-
- /// <summary>
- /// Initializes a new instance of the <see cref="AmqChannel"/> class.
- /// </summary>
- /// <param name="con">The connection.</param>
- /// <param name="channelId">The channel id.</param>
- /// <param name="transacted">if set to <c>true</c> [transacted].</param>
- /// <param name="acknowledgeMode">The acknowledge mode.</param>
- /// <param name="defaultPrefetchHigh">Default prefetch high value</param>
- /// <param name="defaultPrefetchLow">Default prefetch low value</param>
- internal AmqChannel(AMQConnection con, ushort channelId, bool transacted, AcknowledgeMode acknowledgeMode,
- int defaultPrefetchHigh, int defaultPrefetchLow)
- : this()
- {
- _sessionNumber = Interlocked.Increment(ref _nextSessionNumber);
- _connection = con;
- _transacted = transacted;
-
- if ( transacted )
- {
- _acknowledgeMode = AcknowledgeMode.SessionTransacted;
- }
- else
- {
- _acknowledgeMode = acknowledgeMode;
- }
-
- _channelId = channelId;
- _defaultPrefetchHighMark = defaultPrefetchHigh;
- _defaultPrefetchLowMark = defaultPrefetchLow;
-
- if ( _acknowledgeMode == AcknowledgeMode.NoAcknowledge )
- {
- _queue = new FlowControlQueue(_defaultPrefetchLowMark, _defaultPrefetchHighMark,
- new ThresholdMethod(OnPrefetchLowMark),
- new ThresholdMethod(OnPrefetchHighMark));
- }
- else
- {
- // low and upper are the same
- _queue = new FlowControlQueue(_defaultPrefetchHighMark, _defaultPrefetchHighMark,
- null, null);
- }
- }
-
- private AmqChannel()
- {
- _messageFactoryRegistry = MessageFactoryRegistry.NewDefaultRegistry();
- }
-
- /// <summary>
- /// Acknowledge mode for messages received.
- /// </summary>
- public AcknowledgeMode AcknowledgeMode
- {
- get
- {
- CheckNotClosed();
- return _acknowledgeMode;
- }
- }
-
- /// <summary>
- /// True if the channel should use transactions.
- /// </summary>
- public bool Transacted
- {
- get
- {
- CheckNotClosed();
- return _transacted;
- }
- }
-
- /// <summary>
- /// Prefetch value to be used as the default for
- /// consumers created on this channel.
- /// </summary>
- public int DefaultPrefetch
- {
- get { return DefaultPrefetchHigh; }
- }
-
- /// <summary>
- /// Prefetch low value to be used as the default for
- /// consumers created on this channel.
- /// </summary>
- public int DefaultPrefetchLow
- {
- get { return _defaultPrefetchLowMark; }
- }
-
- /// <summary>
- /// Prefetch high value to be used as the default for
- /// consumers created on this channel.
- /// </summary>
- public int DefaultPrefetchHigh
- {
- get { return _defaultPrefetchHighMark; }
- }
-
- /// <summary> Indicates whether or not this channel is currently suspended. </summary>
- public bool IsSuspended
- {
- get { return _suspended; }
- }
-
- /// <summary> Provides the channels number within the the connection. </summary>
- public ushort ChannelId
- {
- get { return _channelId; }
- }
-
- /// <summary> Provides the connection that this channel runs over. </summary>
- public AMQConnection Connection
- {
- get { return _connection; }
- }
-
- /// <summary>
- /// Declare a new exchange.
- /// </summary>
- /// <param name="exchangeName">Name of the exchange</param>
- /// <param name="exchangeClass">Class of the exchange, from <see cref="ExchangeClassConstants"/></param>
- public void DeclareExchange(String exchangeName, String exchangeClass)
- {
- _logger.Debug(string.Format("DeclareExchange vame={0} exchangeClass={1}", exchangeName, exchangeClass));
-
- DeclareExchange(_channelId, 0, exchangeName, exchangeClass, false, false, false, false, true, null);
- }
-
- /// <summary>
- /// Declare a new exchange using the default exchange class.
- /// </summary>
- /// <param name="exchangeName">Name of the exchange</param>
- public void DeleteExchange(string exchangeName)
- {
- throw new NotImplementedException();
- }
-
- /// <summary>
- /// Declare a new queue with the specified set of arguments.
- /// </summary>
- /// <param name="queueName">Name of the queue</param>
- /// <param name="isDurable">True if the queue should be durable</param>
- /// <param name="isExclusive">True if the queue should be exclusive to this channel</param>
- /// <param name="isAutoDelete">True if the queue should be deleted when the channel closes</param>
- public void DeclareQueue(string queueName, bool isDurable, bool isExclusive, bool isAutoDelete)
- {
- DoQueueDeclare(queueName, isDurable, isExclusive, isAutoDelete, null);
- }
-
- /// <summary>
- /// Declare a new queue with the specified set of arguments.
- /// </summary>
- /// <param name="queueName">Name of the queue</param>
- /// <param name="isDurable">True if the queue should be durable</param>
- /// <param name="isExclusive">True if the queue should be exclusive to this channel</param>
- /// <param name="isAutoDelete">True if the queue should be deleted when the channel closes</param>
- /// <param name="args">Optional arguments to Queue.Declare</param>
- public void DeclareQueue(string queueName, bool isDurable, bool isExclusive, bool isAutoDelete, IFieldTable args)
- {
- DoQueueDeclare(queueName, isDurable, isExclusive, isAutoDelete, args);
- }
-
- /// <summary>
- /// Delete a queue with the specifies arguments.
- /// </summary>
- /// <param name="queueName">Name of the queue to delete</param>
- /// <param name="ifUnused">If true, the queue will not deleted if it has no consumers</param>
- /// <param name="ifEmpty">If true, the queue will not deleted if it has no messages</param>
- /// <param name="noWait">If true, the server will not respond to the method</param>
- public void DeleteQueue(string queueName, bool ifUnused, bool ifEmpty, bool noWait)
- {
- DoDeleteQueue(queueName, ifUnused, ifEmpty, noWait);
- }
-
- /// <summary>
- /// Generate a new Unique name to use for a queue.
- /// </summary>
- /// <returns>A unique name to this channel</returns>
- public string GenerateUniqueName()
- {
- string result = _connection.ProtocolSession.GenerateQueueName();
- return Regex.Replace(result, "[^a-z0-9_]", "_");
- }
-
- /// <summary>
- /// Removes all messages from a queue.
- /// </summary>
- /// <param name="queueName">Name of the queue to delete</param>
- /// <param name="noWait">If true, the server will not respond to the method</param>
- public void PurgeQueue(string queueName, bool noWait)
- {
- DoPurgeQueue(queueName, noWait);
- }
-
- /// <summary>
- /// Bind a queue to the specified exchange.
- /// </summary>
- /// <param name="queueName">Name of queue to bind</param>
- /// <param name="exchangeName">Name of exchange to bind to</param>
- /// <param name="routingKey">Routing key</param>
- public void Bind(string queueName, string exchangeName, string routingKey)
- {
- DoBind(queueName, exchangeName, routingKey, new FieldTable());
- }
-
- /// <summary>
- /// Bind a queue to the specified exchange.
- /// </summary>
- /// <param name="queueName">Name of queue to bind</param>
- /// <param name="exchangeName">Name of exchange to bind to</param>
- /// <param name="routingKey">Routing key</param>
- /// <param name="args">Table of arguments for the binding. Used to bind with a Headers Exchange</param>
- public void Bind(string queueName, string exchangeName, string routingKey, IFieldTable args)
- {
- DoBind(queueName, exchangeName, routingKey, (FieldTable)args);
- }
-
- /// <summary>
- /// Create a new empty message with no body.
- /// </summary>
- /// <returns>The new message</returns>
- public IMessage CreateMessage()
- {
- return (IBytesMessage)_messageFactoryRegistry.CreateMessage("application/octet-stream");
- }
-
- /// <summary>
- /// Create a new message of the specified MIME type.
- /// </summary>
- /// <param name="mimeType">The mime type to create</param>
- /// <returns>The new message</returns>
- public IMessage CreateMessage(string mimeType)
- {
- return _messageFactoryRegistry.CreateMessage(mimeType);
- }
-
- /// <summary>
- /// Creates a new message for bytes (application/octet-stream).
- /// </summary>
- /// <returns>The new message</returns>
- public IBytesMessage CreateBytesMessage()
- {
- return (IBytesMessage)_messageFactoryRegistry.CreateMessage("application/octet-stream");
- }
-
- /// <summary>
- /// Creates a new text message (text/plain) with empty content.
- /// </summary>
- /// <returns>The new message</returns>
- public ITextMessage CreateTextMessage()
- {
- return CreateTextMessage(String.Empty);
- }
-
- /// <summary>
- /// Creates a new text message (text/plain) with a body.
- /// </summary>
- /// <param name="text">Initial body of the message</param>
- /// <returns>The new message</returns>
- public ITextMessage CreateTextMessage(string text)
- {
- ITextMessage msg = (ITextMessage)_messageFactoryRegistry.CreateMessage("text/plain");
- msg.Text = text;
- return msg;
- }
-
- /// <summary>
- /// Creates a new Consumer using the builder pattern.
- /// </summary>
- /// <param name="queueName">Name of queue to receive messages from</param>
- /// <returns>The builder object</returns>
- public MessageConsumerBuilder CreateConsumerBuilder(string queueName)
- {
- return new MessageConsumerBuilder(this, queueName);
- }
-
- /// <summary>
- /// Creates a new consumer.
- /// </summary>
- /// <param name="queueName">Name of queue to receive messages from</param>
- /// <param name="prefetchLow">Low prefetch value</param>
- /// <param name="prefetchHigh">High prefetch value</param>
- /// <param name="noLocal">If true, messages sent on this channel will not be received by this consumer</param>
- /// <param name="exclusive">If true, the consumer opens the queue in exclusive mode</param>
- /// <returns>The new consumer</returns>
- public IMessageConsumer CreateConsumer(string queueName,
- int prefetchLow,
- int prefetchHigh,
- bool noLocal,
- bool exclusive)
- {
- _logger.Debug(String.Format("CreateConsumer queueName={0} prefetchLow={1} prefetchHigh={2} noLocal={3} exclusive={4} ",
- queueName, prefetchLow, prefetchHigh, noLocal, exclusive));
-
- return CreateConsumerImpl(queueName, prefetchLow, prefetchHigh, noLocal, exclusive, false);
- }
-
- /// <summary>
- /// Creates a new consumer.
- /// </summary>
- /// <param name="queueName">Name of queue to receive messages from</param>
- /// <param name="prefetchLow">Low prefetch value</param>
- /// <param name="prefetchHigh">High prefetch value</param>
- /// <param name="noLocal">If true, messages sent on this channel will not be received by this consumer</param>
- /// <param name="exclusive">If true, the consumer opens the queue in exclusive mode</param>
- /// <param name="browse">If true, the consumer only browses and does not consume messages</param>
- /// <returns>The new consumer</returns>
- public IMessageConsumer CreateConsumer(string queueName,
- int prefetchLow,
- int prefetchHigh,
- bool noLocal,
- bool exclusive,
- bool browse)
- {
- _logger.Debug(String.Format("CreateConsumer queueName={0} prefetchLow={1} prefetchHigh={2} noLocal={3} exclusive={4} browse={5}",
- queueName, prefetchLow, prefetchHigh, noLocal, exclusive, browse));
-
- return CreateConsumerImpl(queueName, prefetchLow, prefetchHigh, noLocal, exclusive, browse);
- }
-
-
- /// <summary>
- /// Unsubscribe from a queue.
- /// </summary>
- /// <param name="subscriptionName">Subscription name</param>
- public void Unsubscribe(String name)
- {
- throw new NotImplementedException();
- }
-
- /// <summary>
- /// Create a new message publisher using the builder pattern.
- /// </summary>
- /// <returns>The builder object</returns>
- public MessagePublisherBuilder CreatePublisherBuilder()
- {
- return new MessagePublisherBuilder(this);
- }
-
- /// <summary>
- /// Create a new message publisher.
- /// </summary>
- /// <param name="exchangeName">Name of exchange to publish to</param>
- /// <param name="routingKey">Routing key</param>
- /// <param name="deliveryMode">Default delivery mode</param>
- /// <param name="timeToLive">Default TTL time of messages</param>
- /// <param name="immediate">If true, sent immediately</param>
- /// <param name="mandatory">If true, the broker will return an error
- /// (as a connection exception) if the message cannot be delivered</param>
- /// <param name="priority">Default message priority</param>
- /// <returns>The new message publisher</returns>
- public IMessagePublisher CreatePublisher(string exchangeName, string routingKey, DeliveryMode deliveryMode,
- long timeToLive, bool immediate, bool mandatory, int priority)
- {
- _logger.Debug(string.Format("Using new CreatePublisher exchangeName={0}, exchangeClass={1} routingKey={2}",
- exchangeName, "none", routingKey));
-
- return CreateProducerImpl(exchangeName, routingKey, deliveryMode,
- timeToLive, immediate, mandatory, priority);
- }
-
- /// <summary>
- /// Recover after transaction failure.
- /// </summary>
- /// <remarks>The 0-8 protocol does not support this, not implemented exception will always be thrown.</remarks>
- public void Recover()
- {
- CheckNotClosed();
- CheckNotTransacted();
-
- throw new NotImplementedException();
- }
-
- /// <summary>
- /// Commit the transaction.
- /// </summary>
- public void Commit()
- {
- // FIXME: Fail over safety. Needs FailoverSupport?
- CheckNotClosed();
- CheckTransacted(); // throws IllegalOperationException if not a transacted session
-
- try
- {
- // Acknowledge up to message last delivered (if any) for each consumer.
- // Need to send ack for messages delivered to consumers so far.
- foreach (BasicMessageConsumer consumer in _consumers.Values)
- {
- // Sends acknowledgement to server.
- consumer.AcknowledgeDelivered();
- }
-
- // Commits outstanding messages sent and outstanding acknowledgements.
- _connection.ConvenientProtocolWriter.SyncWrite(TxCommitBody.CreateAMQFrame(_channelId), typeof(TxCommitOkBody));
- }
- catch (AMQException e)
- {
- throw new QpidException("Failed to commit", e);
- }
- }
-
- /// <summary>
- /// Rollback the transaction.
- /// </summary>
- public void Rollback()
- {
- lock (_suspensionLock)
- {
- CheckTransacted(); // throws IllegalOperationException if not a transacted session
-
- try
- {
- bool suspended = IsSuspended;
- if (!suspended)
- {
- Suspend(true);
- }
-
- // Reject up to message last delivered (if any) for each consumer.
- // Need to send reject for messages delivered to consumers so far.
- foreach (BasicMessageConsumer consumer in _consumers.Values)
- {
- // Sends acknowledgement to server.
- consumer.RejectUnacked();
- }
-
- _connection.ConvenientProtocolWriter.SyncWrite(TxRollbackBody.CreateAMQFrame(_channelId), typeof(TxRollbackOkBody));
-
- if ( !suspended )
- {
- Suspend(false);
- }
- }
- catch (AMQException e)
- {
- throw new QpidException("Failed to rollback", e);
- }
- }
- }
-
- /// <summary>
- /// Create a disconnected channel that will fault
- /// for most things, but is useful for testing
- /// </summary>
- /// <returns>A new disconnected channel</returns>
- public static IChannel CreateDisconnectedChannel()
- {
- return new AmqChannel();
- }
-
- public override void Close()
- {
- lock (_connection.FailoverMutex)
- {
- // We must close down all producers and consumers in an orderly fashion. This is the only method
- // that can be called from a different thread of control from the one controlling the session
-
- lock (_closingLock)
- {
- SetClosed();
-
- // we pass null since this is not an error case
- CloseProducersAndConsumers(null);
-
- try
- {
- _connection.CloseSession(this);
- }
- catch (AMQException e)
- {
- throw new QpidException("Error closing session: " + e);
- }
- finally
- {
- _connection.DeregisterSession(_channelId);
- }
- }
- }
- }
-
- /**
- * Called when the server initiates the closure of the session
- * unilaterally.
- * @param e the exception that caused this session to be closed. Null causes the
- */
- public void ClosedWithException(Exception e)
- {
- lock (_connection.FailoverMutex)
- {
- // An AMQException has an error code and message already and will be passed in when closure occurs as a
- // result of a channel close request
- SetClosed();
- AMQException amqe;
-
- if (e is AMQException)
- {
- amqe = (AMQException) e;
- }
- else
- {
- amqe = new AMQException("Closing session forcibly", e);
- }
-
- _connection.DeregisterSession(_channelId);
- CloseProducersAndConsumers(amqe);
- }
- }
-
- public void MessageReceived(UnprocessedMessage message)
- {
- if (_logger.IsDebugEnabled)
- {
- _logger.Debug("Message received in session with channel id " + _channelId);
- }
-
- if ( message.DeliverBody == null )
- {
- ReturnBouncedMessage(message);
- }
- else
- {
- _queue.Enqueue(message);
- }
- }
-
- public void Dispose()
- {
- Close();
- }
-
- private void SetClosed()
- {
- Interlocked.Exchange(ref _closed, CLOSED);
- }
-
- /// <summary>
- /// Close all producers or consumers. This is called either in the error case or when closing the session normally.
- /// <param name="amqe">the exception, may be null to indicate no error has occurred</param>
- ///
- private void CloseProducersAndConsumers(AMQException amqe)
- {
- try
- {
- CloseProducers();
- }
- catch (QpidException e)
- {
- _logger.Error("Error closing session: " + e, e);
- }
- try
- {
- CloseConsumers(amqe);
- }
- catch (QpidException e)
- {
- _logger.Error("Error closing session: " + e, e);
- }
- }
-
- /// <summary>
- /// Called to close message producers cleanly. This may or may <b>not</b> be as a result of an error. There is
- /// currently no way of propagating errors to message producers (this is a JMS limitation).
- /// </summary>
- private void CloseProducers()
- {
- _logger.Debug("Closing producers on session " + this);
-
- // we need to clone the list of producers since the close() method updates the _producers collection
- // which would result in a concurrent modification exception
- ArrayList clonedProducers = new ArrayList(_producers.Values);
-
- foreach (BasicMessageProducer prod in clonedProducers)
- {
- _logger.Debug("Closing producer " + prod);
- prod.Close();
- }
-
- // at this point the _producers map is empty
- }
-
- /// <summary>
- /// Called to close message consumers cleanly. This may or may <b>not</b> be as a result of an error.
- /// <param name="error">not null if this is a result of an error occurring at the connection level</param>
- private void CloseConsumers(Exception error)
- {
- if (_dispatcher != null)
- {
- _dispatcher.StopDispatcher();
- }
-
- // we need to clone the list of consumers since the close() method updates the _consumers collection
- // which would result in a concurrent modification exception
- ArrayList clonedConsumers = new ArrayList(_consumers.Values);
-
- foreach (BasicMessageConsumer con in clonedConsumers)
- {
- if (error != null)
- {
- con.NotifyError(error);
- }
- else
- {
- con.Close();
- }
- }
-
- // at this point the _consumers map will be empty
- }
-
- private IMessagePublisher CreateProducerImpl(string exchangeName, string routingKey,
- DeliveryMode deliveryMode,
- long timeToLive, bool immediate, bool mandatory, int priority)
- {
- lock (_closingLock)
- {
- CheckNotClosed();
-
- try
- {
- return new BasicMessageProducer(exchangeName, routingKey, _transacted, _channelId,
- this, GetNextProducerId(),
- deliveryMode, timeToLive, immediate, mandatory, priority);
- }
- catch (AMQException e)
- {
- _logger.Error("Error creating message producer: " + e, e);
- throw new QpidException("Error creating message producer", e);
- }
- }
- }
-
- /// <summary> Creates a message consumer on this channel.</summary>
- ///
- /// <param name="queueName">The name of the queue to attach the consumer to.</param>
- /// <param name="prefetchLow">The pre-fetch buffer low-water mark.</param>
- /// <param name="prefetchHigh">The pre-fetch buffer high-water mark.</param>
- /// <param name="noLocal">The no-local flag, <tt>true</tt> means that the consumer does not receive messages sent on this channel.</param>
- /// <param name="exclusive">The exclusive flag, <tt>true</tt> gives this consumer exclusive receive access to the queue.</param>
- ///
- /// <return>The message consumer.</return>
- private IMessageConsumer CreateConsumerImpl(string queueName,
- int prefetchLow,
- int prefetchHigh,
- bool noLocal,
- bool exclusive,
- bool browse)
- {
- lock (_closingLock)
- {
- CheckNotClosed();
-
- BasicMessageConsumer consumer = new BasicMessageConsumer(_channelId, queueName, noLocal,
- _messageFactoryRegistry, this,
- prefetchHigh, prefetchLow, exclusive,
- browse);
- try
- {
- RegisterConsumer(consumer);
- }
- catch (AMQException e)
- {
- throw new QpidException("Error registering consumer: " + e, e);
- }
-
- return consumer;
- }
- }
-
- private void CheckTransacted()
- {
- if (!Transacted)
- {
- throw new InvalidOperationException("Channel is not transacted");
- }
- }
-
- private void CheckNotTransacted()
- {
- if (Transacted)
- {
- throw new InvalidOperationException("Channel is transacted");
- }
- }
-
- internal void Start()
- {
- _dispatcher = new Dispatcher(this);
- Thread dispatcherThread = new Thread(new ThreadStart(_dispatcher.RunDispatcher));
- dispatcherThread.IsBackground = true;
- dispatcherThread.Start();
- }
-
- internal void Stop()
- {
- Suspend(true);
- if (_dispatcher != null)
- {
- _dispatcher.StopDispatcher();
- }
- }
-
- internal void RegisterConsumer(string consumerTag, IMessageConsumer consumer)
- {
- _consumers[consumerTag] = consumer;
- }
-
- /// <summary>
- /// Called by the MessageConsumer when closing, to deregister the consumer from the
- /// map from consumerTag to consumer instance.
- /// </summary>
- /// <param name="consumerTag">the consumer tag, that was broker-generated</param>
- internal void DeregisterConsumer(string consumerTag)
- {
- _consumers.Remove(consumerTag);
- }
-
- internal void RegisterProducer(long producerId, IMessagePublisher publisher)
- {
- _producers[producerId] = publisher;
- }
-
- internal void DeregisterProducer(long producerId)
- {
- _producers.Remove(producerId);
- }
-
- private long GetNextProducerId()
- {
- return ++_nextProducerId;
- }
-
- /**
- * Called to mark the session as being closed. Useful when the session needs to be made invalid, e.g. after
- * failover when the client has veoted resubscription.
- *
- * The caller of this method must already hold the failover mutex.
- */
- internal void MarkClosed()
- {
- SetClosed();
- _connection.DeregisterSession(_channelId);
- MarkClosedProducersAndConsumers();
- }
-
- private void MarkClosedProducersAndConsumers()
- {
- try
- {
- // no need for a markClosed* method in this case since there is no protocol traffic closing a producer
- CloseProducers();
- }
- catch (QpidException e)
- {
- _logger.Error("Error closing session: " + e, e);
- }
- try
- {
- MarkClosedConsumers();
- }
- catch (QpidException e)
- {
- _logger.Error("Error closing session: " + e, e);
- }
- }
-
- private void MarkClosedConsumers()
- {
- if (_dispatcher != null)
- {
- _dispatcher.StopDispatcher();
- }
- // we need to clone the list of consumers since the close() method updates the _consumers collection
- // which would result in a concurrent modification exception
- ArrayList clonedConsumers = new ArrayList(_consumers.Values);
-
- foreach (BasicMessageConsumer consumer in clonedConsumers)
- {
- consumer.MarkClosed();
- }
- // at this point the _consumers map will be empty
- }
-
- private void DoPurgeQueue(string queueName, bool noWait)
- {
- try
- {
- _logger.DebugFormat("PurgeQueue {0}", queueName);
-
- AMQFrame purgeQueue = QueuePurgeBody.CreateAMQFrame(_channelId, 0, queueName, noWait);
-
- if (noWait)
- _connection.ProtocolWriter.Write(purgeQueue);
- else
- _connection.ConvenientProtocolWriter.SyncWrite(purgeQueue, typeof(QueuePurgeOkBody));
- }
- catch (AMQException)
- {
- throw;
- }
- }
-
- /**
- * Replays frame on fail over.
- *
- * @throws AMQException
- */
- internal void ReplayOnFailOver()
- {
- _logger.Debug(string.Format("Replaying frames for channel {0}", _channelId));
- foreach (AMQFrame frame in _replayFrames)
- {
- _logger.Debug(string.Format("Replaying frame=[{0}]", frame));
- _connection.ProtocolWriter.Write(frame);
- }
- }
-
- /// <summary>
- /// Callers must hold the failover mutex before calling this method.
- /// </summary>
- /// <param name="consumer"></param>
- private void RegisterConsumer(BasicMessageConsumer consumer)
- {
- // Need to generate a consumer tag on the client so we can exploit the nowait flag.
- String tag = string.Format("{0}-{1}", _sessionNumber, _nextConsumerNumber++);
- consumer.ConsumerTag = tag;
- _consumers.Add(tag, consumer);
-
- String consumerTag = ConsumeFromQueue(consumer.QueueName, consumer.NoLocal,
- consumer.Exclusive, consumer.AcknowledgeMode, tag, consumer.Browse);
-
- }
-
- internal void DoBind(string queueName, string exchangeName, string routingKey, FieldTable args)
- {
-
- _logger.Debug(string.Format("QueueBind queueName={0} exchangeName={1} routingKey={2}, arg={3}",
- queueName, exchangeName, routingKey, args));
-
- AMQFrame queueBind = QueueBindBody.CreateAMQFrame(_channelId, 0,
- queueName, exchangeName,
- routingKey, false, args);
-
-
- lock (_connection.FailoverMutex)
- {
- _connection.ConvenientProtocolWriter.SyncWrite(queueBind, typeof(QueueBindOkBody));
- }
- // AS FIXME: wasnae me
- _replayFrames.Add(QueueBindBody.CreateAMQFrame(_channelId, 0,
- queueName, exchangeName,
- routingKey, true, args));
- }
-
- private String ConsumeFromQueue(String queueName, bool noLocal, bool exclusive, AcknowledgeMode acknowledgeMode, String tag, bool browse)
- {
- FieldTable args = new FieldTable();
- if(browse)
- {
- args["x-filter-no-consume"] = true;
- }
- AMQFrame basicConsume = BasicConsumeBody.CreateAMQFrame(_channelId, 0,
- queueName, tag, noLocal,
- acknowledgeMode == AcknowledgeMode.NoAcknowledge,
- exclusive, true, args);
-
- _replayFrames.Add(basicConsume);
-
- _connection.ProtocolWriter.Write(basicConsume);
- return tag;
- }
-
- private void DoDeleteQueue(string queueName, bool ifUnused, bool ifEmpty, bool noWait)
- {
- try
- {
- _logger.Debug(string.Format("DeleteQueue name={0}", queueName));
-
- AMQFrame queueDelete = QueueDeleteBody.CreateAMQFrame(_channelId, 0, queueName, ifUnused, ifEmpty, noWait);
-
- if (noWait)
- {
- _connection.ProtocolWriter.Write(queueDelete);
- }
- else
- {
- _connection.ConvenientProtocolWriter.SyncWrite(queueDelete, typeof(QueueDeleteOkBody));
- }
- // AS FIXME: wasnae me
- _replayFrames.Add(QueueDeleteBody.CreateAMQFrame(_channelId, 0, queueName, ifUnused, ifEmpty, true));
- }
- catch (AMQException)
- {
- throw;
- }
- }
-
- private void DoQueueDeclare(string queueName, bool isDurable, bool isExclusive, bool isAutoDelete, IFieldTable args)
- {
- _logger.Debug(string.Format("DeclareQueue name={0} durable={1} exclusive={2}, auto-delete={3}",
- queueName, isDurable, isExclusive, isAutoDelete));
-
- AMQFrame queueDeclare = QueueDeclareBody.CreateAMQFrame(_channelId, 0, queueName, false, isDurable, isExclusive,
- isAutoDelete, false, (FieldTable) args);
-
-
- lock (_connection.FailoverMutex)
- {
- _connection.ConvenientProtocolWriter.SyncWrite(queueDeclare, typeof(QueueDeclareOkBody));
- }
- // AS FIXME: wasnae me
- _replayFrames.Add(QueueDeclareBody.CreateAMQFrame(_channelId, 0, queueName, false, isDurable, isExclusive,
- isAutoDelete, true, null));
- }
-
- // AMQP-level method.
- private void DeclareExchange(ushort channelId, ushort ticket, string exchangeName,
- string exchangeClass, bool passive, bool durable,
- bool autoDelete, bool xinternal, bool noWait, FieldTable args)
- {
- _logger.Debug(String.Format("DeclareExchange channelId={0} exchangeName={1} exchangeClass={2}",
- _channelId, exchangeName, exchangeClass));
-
- AMQFrame declareExchange = ExchangeDeclareBody.CreateAMQFrame(channelId, ticket, exchangeName, exchangeClass, passive,
- durable, autoDelete, xinternal, noWait, args);
-
- if (noWait)
- {
- lock (_connection.FailoverMutex)
- {
- _connection.ProtocolWriter.Write(declareExchange);
- }
- // AS FIXME: wasnae me
- _replayFrames.Add(declareExchange);
- }
- else
- {
- throw new NotImplementedException("Don't use nowait=false with DeclareExchange");
- //_connection.ConvenientProtocolWriter.SyncWrite(declareExchange, typeof (ExchangeDeclareOkBody));
- }
- }
-
- /**
- * Acknowledge a message or several messages. This method can be called via AbstractJMSMessage or from
- * a BasicConsumer. The former where the mode is CLIENT_ACK and the latter where the mode is
- * AUTO_ACK or similar.
- *
- * @param deliveryTag the tag of the last message to be acknowledged
- * @param multiple if true will acknowledge all messages up to and including the one specified by the
- * delivery tag
- */
- internal void AcknowledgeMessage(ulong deliveryTag, bool multiple)
- {
- AMQFrame ackFrame = BasicAckBody.CreateAMQFrame(_channelId, deliveryTag, multiple);
- if (_logger.IsDebugEnabled)
- {
- _logger.Debug("Sending ack for delivery tag " + deliveryTag + " on channel " + _channelId);
- }
- // FIXME: lock FailoverMutex here?
- _connection.ProtocolWriter.Write(ackFrame);
- }
-
- public void RejectMessage(ulong deliveryTag, bool requeue)
- {
- if ((_acknowledgeMode == AcknowledgeMode.ClientAcknowledge) || (_acknowledgeMode == AcknowledgeMode.SessionTransacted))
- {
- AMQFrame rejectFrame = BasicRejectBody.CreateAMQFrame(_channelId, deliveryTag, requeue);
- _connection.ProtocolWriter.Write(rejectFrame);
- }
- }
-
- /// <summary>
- /// Handle a message that bounced from the server, creating
- /// the corresponding exception and notifying the connection about it
- /// </summary>
- /// <param name="message">Unprocessed message</param>
- private void ReturnBouncedMessage(UnprocessedMessage message)
- {
- try
- {
- AbstractQmsMessage bouncedMessage =
- _messageFactoryRegistry.CreateMessage(0, false, message.ContentHeader, message.Bodies);
-
- int errorCode = message.BounceBody.ReplyCode;
- string reason = message.BounceBody.ReplyText;
- _logger.Debug("Message returned with error code " + errorCode + " (" + reason + ")");
- AMQException exception;
-
- if (errorCode == AMQConstant.NO_CONSUMERS.Code)
- {
- exception = new AMQNoConsumersException(reason, bouncedMessage);
- }
- else if (errorCode == AMQConstant.NO_ROUTE.Code)
- {
- exception = new AMQNoRouteException(reason, bouncedMessage);
- }
- else
- {
- exception = new AMQUndeliveredException(errorCode, reason, bouncedMessage);
- }
-
- _connection.ExceptionReceived(exception);
- }
- catch (Exception ex)
- {
- _logger.Error("Caught exception trying to raise undelivered message exception (dump follows) - ignoring...", ex);
- }
- }
-
- private void OnPrefetchLowMark(int count)
- {
- if (_acknowledgeMode == AcknowledgeMode.NoAcknowledge)
- {
- _logger.Warn("Below threshold(" + _defaultPrefetchLowMark + ") so unsuspending channel. Current value is " + count);
- Suspend(false);
- }
- }
-
- private void OnPrefetchHighMark(int count)
- {
- if (_acknowledgeMode == AcknowledgeMode.NoAcknowledge)
- {
- _logger.Warn("Above threshold(" + _defaultPrefetchHighMark + ") so suspending channel. Current value is " + count);
- Suspend(true);
- }
- }
-
- private void Suspend(bool suspend)
- {
- lock (_suspensionLock)
- {
- if (_logger.IsDebugEnabled)
- {
- _logger.Debug("Setting channel flow : " + (suspend ? "suspended" : "unsuspended"));
- }
-
- _suspended = suspend;
- AMQFrame frame = ChannelFlowBody.CreateAMQFrame(_channelId, !suspend);
-
- Connection.ConvenientProtocolWriter.SyncWrite(frame, typeof(ChannelFlowOkBody));
- }
- }
-
- /// <summary>A Dispatcher turns the consumption of incoming messages from an arrival queue, into event notifications on consumers.
- /// The arrival queue is typically a blocking queue, on which a dispatcher waits for messages to consume. Upon receipt of a message
- /// the dispatcher finds the consumer that is listening to the queue to which the message has been send and notifies it of the new
- /// message.
- ///
- /// <p/>The Dispatcher also contains logic to recognize bounced messages. Bounced messages returned from the broker can be
- /// told apart from regular deliveries because they do not have a delivery queue set on them. When the dispatcher receives a
- /// bounced message it creates an exception and notifies the connection, to which its containing channel belongs, of the condition.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Notify consumers of message arrivals on their queues. <td> <see cref="BasicMessageConsumer"/>
- /// <tr><td> Notify the containing connection of bounced message arrivals. <td> <see cref="AMQConnection"/>
- /// </table>
- /// </summary>
- ///
- /// <remarks>Stop mechanism seems wrong, as queue consume is evaluated after stop flag, so could consume and notify one more message.
- /// Placing stop check after consume may also be wrong as it may cause a message to be thrown away. Seems more correct to use interupt on
- /// the block thread to cause it to prematurely return from its wait, whereupon it can be made to re-check the stop flag.</remarks>
- ///
- /// <remarks>Exception swallowed, if there is an exception whilst notifying the connection on bounced messages. Unhandled excetpion should
- /// fall through and terminate the loop, as it is a bug if it occurrs.</remarks>
- private class Dispatcher
- {
- /// <summary> Flag used to indicate when this dispatcher is to be stopped (0=go, 1=stop). </summary>
- private int _stopped = 0;
-
- /// <summary> The channel for which this is a dispatcher. </summary>
- private AmqChannel _containingChannel;
-
- /// <summary> Creates a dispatcher on the specified channel. </summary>
- ///
- /// <param name="containingChannel"> The channel on which this is a dispatcher. </param>
- public Dispatcher(AmqChannel containingChannel)
- {
- _containingChannel = containingChannel;
- }
-
- /// <summary>The message dispatch loop. Consumes messages from the channels queue, notifying consumers of regular deliveries, and
- /// the connection of bounced messages.</summary>
- public void RunDispatcher()
- {
- UnprocessedMessage message;
-
- while (_stopped == 0 && (message = (UnprocessedMessage)_containingChannel._queue.Dequeue()) != null)
- {
- if (message.DeliverBody != null)
- {
- BasicMessageConsumer consumer = (BasicMessageConsumer) _containingChannel._consumers[message.DeliverBody.ConsumerTag];
-
- if (consumer == null)
- {
- _logger.Warn("Received a message from queue " + message.DeliverBody.ConsumerTag + " without a f - ignoring...");
- }
- else
- {
- consumer.NotifyMessage(message, _containingChannel.ChannelId);
- }
- }
- else
- {
- try
- {
- // Bounced message is processed here, away from the transport thread
- AbstractQmsMessage bouncedMessage = _containingChannel._messageFactoryRegistry.
- CreateMessage(0, false, message.ContentHeader, message.Bodies);
-
- int errorCode = message.BounceBody.ReplyCode;
- string reason = message.BounceBody.ReplyText;
-
- _logger.Debug("Message returned with error code " + errorCode + " (" + reason + ")");
-
- _containingChannel._connection.ExceptionReceived(new AMQUndeliveredException(errorCode, "Error: " + reason, bouncedMessage));
- }
- catch (Exception e)
- {
- _logger.Error("Caught exception trying to raise undelivered message exception (dump follows) - ignoring...", e);
- }
- }
- }
-
- _logger.Debug("Dispatcher thread terminating for channel: " + _containingChannel._channelId + ".");
- }
-
- /// <summary> Sets a stop flag on this dispatcher, which causes its dispatch loop to exit at the next available opportunity. </summary>
- public void StopDispatcher()
- {
- Interlocked.Exchange(ref _stopped, 1);
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/BasicMessageConsumer.cs b/qpid/dotnet/Qpid.Client/Client/BasicMessageConsumer.cs
deleted file mode 100644
index fdac5e75f2..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/BasicMessageConsumer.cs
+++ /dev/null
@@ -1,485 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using System.Collections;
-using System.Collections.Generic;
-using log4net;
-using Apache.Qpid.Client.Message;
-using Apache.Qpid.Collections;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Client
-{
- public class BasicMessageConsumer : Closeable, IMessageConsumer
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(BasicMessageConsumer));
-
- private bool _noLocal;
-
- /** Holds the exclusive status flag for the consumers access to its queue. */
- private bool _exclusive;
-
- public bool Exclusive
- {
- get { return _exclusive; }
- }
-
- private bool _browse;
-
- public bool Browse
- {
- get { return _browse; }
- }
-
- public bool NoLocal
- {
- get { return _noLocal; }
- set { _noLocal = value; }
- }
-
- private AcknowledgeMode _acknowledgeMode;
-
- public AcknowledgeMode AcknowledgeMode
- {
- get { return _acknowledgeMode; }
- }
-
- private MessageReceivedDelegate _messageListener;
-
- private bool IsMessageListenerSet
- {
- get { return _messageListener != null; }
- }
-
- /// <summary>
- /// The consumer tag allows us to close the consumer by sending a jmsCancel method to the
- /// broker
- /// </summary>
- private string _consumerTag;
-
- /// <summary>
- /// We need to know the channel id when constructing frames
- /// </summary>
- private ushort _channelId;
-
- private readonly string _queueName;
-
- /// <summary>
- /// Protects the setting of a messageListener
- /// </summary>
- private readonly object _syncLock = new object();
-
- /// <summary>
- /// We store the high water prefetch field in order to be able to reuse it when resubscribing in the event of failover
- /// </summary>
- private int _prefetchHigh;
-
- /// <summary>
- /// We store the low water prefetch field in order to be able to reuse it when resubscribing in the event of failover
- /// </summary>
- private int _prefetchLow;
-
- /// <summary>
- /// When true indicates that either a message listener is set or that
- /// a blocking receive call is in progress
- /// </summary>
- private bool _receiving;
-
- /// <summary>
- /// Used in the blocking receive methods to receive a message from
- /// the Channel thread.
- /// </summary>
- private readonly ConsumerProducerQueue _messageQueue = new ConsumerProducerQueue();
-
- private MessageFactoryRegistry _messageFactory;
-
- private AmqChannel _channel;
-
- // <summary>
- // Tag of last message delievered, whoch should be acknowledged on commit in transaction mode.
- // </summary>
- //private long _lastDeliveryTag;
-
- /// <summary>
- /// Explicit list of all received but un-acked messages in a transaction. Used to ensure acking is completed when transaction is committed.
- /// </summary>
- private LinkedList<long> _receivedDeliveryTags;
-
- /// <summary>
- /// Number of messages unacknowledged in DUPS_OK_ACKNOWLEDGE mode
- /// </summary>
- private int _outstanding;
-
- /// <summary>
- /// Switch to enable sending of acknowledgements when using DUPS_OK_ACKNOWLEDGE mode.
- /// Enabled when _outstannding number of msgs >= _prefetchHigh and disabled at < _prefetchLow
- /// </summary>
- private bool _dups_ok_acknowledge_send;
-
- internal BasicMessageConsumer(ushort channelId, string queueName, bool noLocal,
- MessageFactoryRegistry messageFactory, AmqChannel channel,
- int prefetchHigh, int prefetchLow, bool exclusive, bool browse)
- {
- _channelId = channelId;
- _queueName = queueName;
- _noLocal = noLocal;
- _messageFactory = messageFactory;
- _channel = channel;
- _acknowledgeMode = _channel.AcknowledgeMode;
- _prefetchHigh = prefetchHigh;
- _prefetchLow = prefetchLow;
- _exclusive = exclusive;
- _browse = browse;
-
- if (_acknowledgeMode == AcknowledgeMode.SessionTransacted)
- {
- _receivedDeliveryTags = new LinkedList<long>();
- }
- }
-
- #region IMessageConsumer Members
-
- public MessageReceivedDelegate OnMessage
- {
- get
- {
- return _messageListener;
- }
- set
- {
- CheckNotClosed();
-
- lock (_syncLock)
- {
- // If someone is already receiving
- if (_messageListener != null && _receiving)
- {
- throw new InvalidOperationException("Another thread is already receiving...");
- }
-
- _messageListener = value;
-
- _receiving = (_messageListener != null);
-
- if (_receiving)
- {
- _logger.Debug("Message listener set for queue with name " + _queueName);
- }
- }
- }
- }
-
- public IMessage Receive(long delay)
- {
- CheckNotClosed();
-
- lock (_syncLock)
- {
- // If someone is already receiving
- if (_receiving)
- {
- throw new InvalidOperationException("Another thread is already receiving (possibly asynchronously)...");
- }
-
- _receiving = true;
- }
-
- try
- {
- object o = _messageQueue.Dequeue(delay);
-
- return ReturnMessageOrThrowAndPostDeliver(o);
- }
- finally
- {
- lock (_syncLock)
- {
- _receiving = false;
- }
- }
- }
-
- private IMessage ReturnMessageOrThrowAndPostDeliver(object o)
- {
- IMessage m = ReturnMessageOrThrow(o);
- if (m != null)
- {
- PostDeliver(m);
- }
- return m;
- }
-
- public IMessage Receive()
- {
- return Receive(Timeout.Infinite);
- }
-
- public IMessage ReceiveNoWait()
- {
- return Receive(0);
- }
-
- #endregion
-
- /// <summary>
- /// We can get back either a Message or an exception from the queue. This method examines the argument and deals
- /// with it by throwing it (if an exception) or returning it (in any other case).
- /// </summary>
- /// <param name="o">the object off the queue</param>
- /// <returns> a message only if o is a Message</returns>
- /// <exception>JMSException if the argument is a throwable. If it is a QpidMessagingException it is rethrown as is, but if not
- /// a QpidMessagingException is created with the linked exception set appropriately</exception>
- private IMessage ReturnMessageOrThrow(object o)
- {
- // errors are passed via the queue too since there is no way of interrupting the poll() via the API.
- if (o is Exception)
- {
- Exception e = (Exception) o;
- throw new QpidException("Message consumer forcibly closed due to error: " + e, e);
- }
- else
- {
- return (IMessage) o;
- }
- }
-
- #region IDisposable Members
-
- public void Dispose()
- {
- Close();
- }
-
- #endregion
-
- public override void Close()
- {
- if (_closed == CLOSED)
- {
- return;
- }
- // FIXME: Don't we need FailoverSupport here (as we have SyncWrite). i.e. rather than just locking FailOverMutex
- lock (_channel.Connection.FailoverMutex)
- {
- lock (_closingLock)
- {
- Interlocked.Exchange(ref _closed, CLOSED);
-
- AMQFrame cancelFrame = BasicCancelBody.CreateAMQFrame(_channelId, _consumerTag, false);
-
- try
- {
- _channel.Connection.ConvenientProtocolWriter.SyncWrite(
- cancelFrame, typeof(BasicCancelOkBody));
- }
- catch (AMQException e)
- {
- _logger.Error("Error closing consumer: " + e, e);
- throw new QpidException("Error closing consumer: " + e);
- }
- finally
- {
- DeregisterConsumer();
- }
- }
- }
- }
-
- /**
- * Called from the AMQSession when a message has arrived for this consumer. This methods handles both the case
- * of a message listener or a synchronous receive() caller.
- *
- * @param messageFrame the raw unprocessed mesage
- * @param channelId channel on which this message was sent
- */
- internal void NotifyMessage(UnprocessedMessage messageFrame, int channelId)
- {
- if (_logger.IsDebugEnabled)
- {
- _logger.Debug("notifyMessage called with message number " + messageFrame.DeliverBody.DeliveryTag);
- }
- try
- {
- AbstractQmsMessage jmsMessage = _messageFactory.CreateMessage((long)messageFrame.DeliverBody.DeliveryTag,
- messageFrame.DeliverBody.Redelivered,
- messageFrame.ContentHeader,
- messageFrame.Bodies);
-
- _logger.Debug("Message is of type: " + jmsMessage.GetType().Name);
-
- PreDeliver(jmsMessage);
-
- if (IsMessageListenerSet)
- {
- // We do not need a lock around the test above, and the dispatch below as it is invalid
- // for an application to alter an installed listener while the session is started.
-#if __MonoCS__
- _messageListener(jmsMessage);
-#else
- _messageListener.Invoke(jmsMessage);
-#endif
- PostDeliver(jmsMessage);
- }
- else
- {
- _messageQueue.Enqueue(jmsMessage);
- }
- }
- catch (Exception e)
- {
- _logger.Error("Caught exception (dump follows) - ignoring...", e); // FIXME
- }
- }
-
-
- internal void NotifyError(Exception cause)
- {
- lock (_syncLock)
- {
- SetClosed();
-
- // we have no way of propagating the exception to a message listener - a JMS limitation - so we
- // deal with the case where we have a synchronous receive() waiting for a message to arrive
- if (_messageListener == null)
- {
- // offer only succeeds if there is a thread waiting for an item from the queue
- _messageQueue.Enqueue(cause);
- _logger.Debug("Passed exception to synchronous queue for propagation to receive()");
- }
- DeregisterConsumer();
- }
- }
-
- private void SetClosed()
- {
- Interlocked.Exchange(ref _closed, CLOSED);
- }
-
- /// <summary>
- /// Perform cleanup to deregister this consumer. This occurs when closing the consumer in both the clean
- /// case and in the case of an error occurring.
- /// </summary>
- internal void DeregisterConsumer()
- {
- _channel.DeregisterConsumer(_consumerTag);
- }
-
- public string ConsumerTag
- {
- get
- {
- return _consumerTag;
- }
- set
- {
- _consumerTag = value;
- }
- }
-
- /**
- * Called when you need to invalidate a consumer. Used for example when failover has occurred and the
- * client has vetoed automatic resubscription.
- * The caller must hold the failover mutex.
- */
- internal void MarkClosed()
- {
- SetClosed();
- DeregisterConsumer();
- }
-
- public string QueueName
- {
- get { return _queueName; }
- }
-
- /// <summary>
- /// Acknowledge up to last message delivered (if any). Used when commiting.
- /// </summary>
- internal void AcknowledgeDelivered()
- {
- foreach (long tag in _receivedDeliveryTags)
- {
- _channel.AcknowledgeMessage((ulong)tag, false);
- }
-
- _receivedDeliveryTags.Clear();
- }
-
- internal void RejectUnacked()
- {
- foreach (long tag in _receivedDeliveryTags)
- {
- _channel.RejectMessage((ulong)tag, true);
- }
-
- _receivedDeliveryTags.Clear();
- }
-
- private void PreDeliver(AbstractQmsMessage msg)
- {
- switch (AcknowledgeMode)
- {
- case AcknowledgeMode.PreAcknowledge:
- _channel.AcknowledgeMessage((ulong)msg.DeliveryTag, false);
- break;
-
- case AcknowledgeMode.ClientAcknowledge:
- // We set the session so that when the user calls acknowledge() it can call the method on session
- // to send out the appropriate frame.
- //msg.setAMQSession(_session);
- msg.Channel = _channel;
- break;
- }
- }
-
- private void PostDeliver(IMessage m)
- {
- AbstractQmsMessage msg = (AbstractQmsMessage) m;
- switch (AcknowledgeMode)
- {
- case AcknowledgeMode.DupsOkAcknowledge:
- if (++_outstanding >= _prefetchHigh)
- {
- _dups_ok_acknowledge_send = true;
- }
- if (_outstanding <= _prefetchLow)
- {
- _dups_ok_acknowledge_send = false;
- }
- if (_dups_ok_acknowledge_send)
- {
- _channel.AcknowledgeMessage((ulong)msg.DeliveryTag, true);
- }
- break;
-
- case AcknowledgeMode.AutoAcknowledge:
- _channel.AcknowledgeMessage((ulong)msg.DeliveryTag, true);
- break;
-
- case AcknowledgeMode.SessionTransacted:
- _receivedDeliveryTags.AddLast(msg.DeliveryTag);
- break;
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/BasicMessageProducer.cs b/qpid/dotnet/Qpid.Client/Client/BasicMessageProducer.cs
deleted file mode 100644
index f33afc452e..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/BasicMessageProducer.cs
+++ /dev/null
@@ -1,405 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using log4net;
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Client.Message;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client
-{
- public class BasicMessageProducer : Closeable, IMessagePublisher
- {
- protected readonly ILog _logger = LogManager.GetLogger(typeof(BasicMessageProducer));
-
- /// <summary>
- /// If true, messages will not get a timestamp.
- /// </summary>
- private bool _disableTimestamps;
-
- /// <summary>
- /// Priority of messages created by this producer.
- /// </summary>
- private int _messagePriority;
-
- /// <summary>
- /// Time to live of messages. Specified in milliseconds but AMQ has 1 second resolution.
- /// </summary>
- private long _timeToLive;
-
- /// <summary>
- /// Delivery mode used for this producer.
- /// </summary>
- private DeliveryMode _deliveryMode;
-
- private bool _immediate;
- private bool _mandatory;
-
- string _exchangeName;
- string _routingKey;
-
- /// <summary>
- /// Default encoding used for messages produced by this producer.
- /// </summary>
- private string _encoding;
-
- /// <summary>
- /// Default encoding used for message produced by this producer.
- /// </summary>
- private string _mimeType;
-
- /// <summary>
- /// True if this producer was created from a transacted session
- /// </summary>
- private bool _transacted;
-
- private ushort _channelId;
-
- /// <summary>
- /// This is an id generated by the session and is used to tie individual producers to the session. This means we
- /// can deregister a producer with the session when the producer is closed. We need to be able to tie producers
- /// to the session so that when an error is propagated to the session it can close the producer (meaning that
- /// a client that happens to hold onto a producer reference will get an error if he tries to use it subsequently).
- /// </summary>
- private long _producerId;
-
- /// <summary>
- /// The session used to create this producer
- /// </summary>
- private AmqChannel _channel;
-
- public BasicMessageProducer(string exchangeName, string routingKey,
- bool transacted,
- ushort channelId,
- AmqChannel channel,
- long producerId,
- DeliveryMode deliveryMode,
- long timeToLive,
- bool immediate,
- bool mandatory,
- int priority)
- {
- _exchangeName = exchangeName;
- _routingKey = routingKey;
- _transacted = transacted;
- _channelId = channelId;
- _channel = channel;
- _producerId = producerId;
- _deliveryMode = deliveryMode;
- _timeToLive = timeToLive;
- _immediate = immediate;
- _mandatory = mandatory;
- _messagePriority = priority;
-
- _channel.RegisterProducer(producerId, this);
- }
-
-
- #region IMessagePublisher Members
-
- public DeliveryMode DeliveryMode
- {
- get
- {
- CheckNotClosed();
- return _deliveryMode;
- }
- set
- {
- CheckNotClosed();
- _deliveryMode = value;
- }
- }
-
- public string ExchangeName
- {
- get { return _exchangeName; }
- }
-
- public string RoutingKey
- {
- get { return _routingKey; }
- }
-
- public bool DisableMessageID
- {
- get
- {
- throw new Exception("The method or operation is not implemented.");
- }
- set
- {
- throw new Exception("The method or operation is not implemented.");
- }
- }
-
- public bool DisableMessageTimestamp
- {
- get
- {
- CheckNotClosed();
- return _disableTimestamps;
- }
- set
- {
- CheckNotClosed();
- _disableTimestamps = value;
- }
- }
-
- public int Priority
- {
- get
- {
- CheckNotClosed();
- return _messagePriority;
- }
- set
- {
- CheckNotClosed();
- if ( value < 0 || value > 9 )
- {
- throw new ArgumentOutOfRangeException("Priority of " + value + " is illegal. Value must be in range 0 to 9");
- }
- _messagePriority = value;
- }
- }
-
- public override void Close()
- {
- _logger.Debug("Closing producer " + this);
- Interlocked.Exchange(ref _closed, CLOSED);
- _channel.DeregisterProducer(_producerId);
- }
-
- public void Send(IMessage msg, DeliveryMode deliveryMode, int priority, long timeToLive)
- {
- CheckNotClosed();
- SendImpl(
- _exchangeName,
- _routingKey,
- (AbstractQmsMessage)msg,
- deliveryMode,
- priority,
- (uint)timeToLive,
- _mandatory,
- _immediate
- );
- }
-
- public void Send(IMessage msg)
- {
- CheckNotClosed();
- SendImpl(
- _exchangeName,
- _routingKey,
- (AbstractQmsMessage)msg,
- _deliveryMode,
- _messagePriority,
- (uint)_timeToLive,
- _mandatory,
- _immediate
- );
- }
-
- // This is a short-term hack (knowing that this code will be re-vamped sometime soon)
- // to facilitate publishing messages to potentially non-existent recipients.
- public void Send(IMessage msg, bool mandatory)
- {
- CheckNotClosed();
- SendImpl(
- _exchangeName,
- _routingKey,
- (AbstractQmsMessage)msg,
- _deliveryMode,
- _messagePriority,
- (uint)_timeToLive,
- mandatory,
- _immediate
- );
- }
-
- public long TimeToLive
- {
- get
- {
- CheckNotClosed();
- return _timeToLive;
- }
- set
- {
- CheckNotClosed();
- if ( value < 0 )
- {
- throw new ArgumentOutOfRangeException("Time to live must be non-negative - supplied value was " + value);
- }
- _timeToLive = value;
- }
- }
-
- #endregion
-
- public string MimeType
- {
- get
- {
- CheckNotClosed();
- return _mimeType;
- }
- set
- {
- CheckNotClosed();
- _mimeType = value;
- }
- }
-
- public string Encoding
- {
- get
- {
- CheckNotClosed();
- return _encoding;
- }
- set
- {
- CheckNotClosed();
- _encoding = value;
- }
- }
-
- public void Dispose()
- {
- Close();
- }
-
- #region Message Publishing
-
- private void SendImpl(string exchangeName, string routingKey, AbstractQmsMessage message, DeliveryMode deliveryMode, int priority, uint timeToLive, bool mandatory, bool immediate)
- {
- // todo: handle session access ticket
- AMQFrame publishFrame = BasicPublishBody.CreateAMQFrame(
- _channel.ChannelId, 0, exchangeName,
- routingKey, mandatory, immediate
- );
-
- // fix message properties
- if ( !_disableTimestamps )
- {
- message.Timestamp = DateTime.UtcNow.Ticks;
- if (timeToLive != 0)
- {
- message.Expiration = message.Timestamp + timeToLive;
- }
- } else
- {
- message.Expiration = 0;
- }
- message.DeliveryMode = deliveryMode;
- message.Priority = (byte)priority;
-
- ByteBuffer payload = message.Data;
- int payloadLength = payload.Limit;
-
- ContentBody[] contentBodies = CreateContentBodies(payload);
- AMQFrame[] frames = new AMQFrame[2 + contentBodies.Length];
- for ( int i = 0; i < contentBodies.Length; i++ )
- {
- frames[2 + i] = ContentBody.CreateAMQFrame(_channelId, contentBodies[i]);
- }
- if ( contentBodies.Length > 0 && _logger.IsDebugEnabled )
- {
- _logger.Debug(string.Format("Sending content body frames to {{exchangeName={0} routingKey={1}}}", exchangeName, routingKey));
- }
-
- // weight argument of zero indicates no child content headers, just bodies
- AMQFrame contentHeaderFrame = ContentHeaderBody.CreateAMQFrame(
- _channelId, AmqChannel.BASIC_CONTENT_TYPE, 0,
- message.ContentHeaderProperties, (uint)payloadLength
- );
- if ( _logger.IsDebugEnabled )
- {
- _logger.Debug(string.Format("Sending content header frame to {{exchangeName={0} routingKey={1}}}", exchangeName, routingKey));
- }
-
- frames[0] = publishFrame;
- frames[1] = contentHeaderFrame;
- CompositeAMQDataBlock compositeFrame = new CompositeAMQDataBlock(frames);
-
- lock ( _channel.Connection.FailoverMutex )
- {
- _channel.Connection.ProtocolWriter.Write(compositeFrame);
- }
- }
-
-
- /// <summary>
- /// Create content bodies. This will split a large message into numerous bodies depending on the negotiated
- /// maximum frame size.
- /// </summary>
- /// <param name="payload"></param>
- /// <returns>return the array of content bodies</returns>
- private ContentBody[] CreateContentBodies(ByteBuffer payload)
- {
- if ( payload == null )
- {
- return null;
- } else if ( payload.Remaining == 0 )
- {
- return new ContentBody[0];
- }
- // we substract one from the total frame maximum size to account for the end of frame marker in a body frame
- // (0xCE byte).
- int framePayloadMax = (int)(_channel.Connection.MaximumFrameSize - 1);
- int frameCount = CalculateContentBodyFrames(payload);
- ContentBody[] bodies = new ContentBody[frameCount];
- for ( int i = 0; i < frameCount; i++ )
- {
- int length = (payload.Remaining >= framePayloadMax)
- ? framePayloadMax : payload.Remaining;
- bodies[i] = new ContentBody(payload, (uint)length);
- }
- return bodies;
- }
-
- private int CalculateContentBodyFrames(ByteBuffer payload)
- {
- // we substract one from the total frame maximum size to account
- // for the end of frame marker in a body frame
- // (0xCE byte).
- int frameCount;
- if ( (payload == null) || (payload.Remaining == 0) )
- {
- frameCount = 0;
- } else
- {
- int dataLength = payload.Remaining;
- int framePayloadMax = (int)_channel.Connection.MaximumFrameSize - 1;
- int lastFrame = ((dataLength % framePayloadMax) > 0) ? 1 : 0;
- frameCount = (int)(dataLength / framePayloadMax) + lastFrame;
- }
-
- return frameCount;
- }
- #endregion // Message Publishing
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Closeable.cs b/qpid/dotnet/Qpid.Client/Client/Closeable.cs
deleted file mode 100644
index b9664ccea3..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Closeable.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Client
-{
- /// <summary>Closeable provides monitoring of the state of a closeable resource; whether it is open or closed. It also provides a lock on which
- /// attempts to close the resource from multiple threads can be coordinated.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Close (and clean-up) a resource.
- /// <tr><td> Monitor the state of a closeable resource.
- /// <tr><td> Synchronous attempts to close resource from concurrent threads.
- /// </table>
- /// </summary>
- ///
- /// <remarks>Poor encapsulation of the close lock. Better to completely hide the implementation, such that there is a method, e.g., DoSingleClose,
- /// that sub-classes implement. Guaranteed to only be called by one thread at once, and iff the object is not already closed. That is, multiple
- /// simultaneous closes will result in a single call to the real close method. Put the wait and condition checking loop in this base class.
- /// </remarks>
- public abstract class Closeable : ICloseable
- {
- /// <summary> Constant representing the closed state. </summary>
- protected const int CLOSED = 1;
-
- /// <summary> Constant representing the open state. </summary>
- protected const int NOT_CLOSED = 2;
-
- /// <summary> Used to ensure orderly closing of the object. </summary>
- protected readonly object _closingLock = new object();
-
- /// <summary> Indicates the state of this resource; open or closed. </summary>
- protected int _closed = NOT_CLOSED;
-
- /// <summary>
- /// Checks the not closed.
- /// </summary>
- ///
- /// <remarks>Don't like check methods that throw exceptions. a) it can come as a surprise without checked exceptions, b) it limits the
- /// callers choice, if the caller would prefer a boolean, c) it is not side-effect free programming, where such could be used. Get rid
- /// of this and replace with boolean.</remarks>
- protected void CheckNotClosed()
- {
- if (_closed == CLOSED)
- {
- throw new InvalidOperationException("Object " + ToString() + " has been closed");
- }
- }
-
- /// <summary>Indicates whether this resource is closed.</summary>
- /// <value><c>true</c> if closed; otherwise, <c>false</c>.</value>
- public bool Closed
- {
- get
- {
- return _closed == CLOSED;
- }
- }
-
- /// <summary> Close this resource. </summary>
- public abstract void Close();
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Configuration/AuthenticationConfigurationSectionHandler.cs b/qpid/dotnet/Qpid.Client/Client/Configuration/AuthenticationConfigurationSectionHandler.cs
deleted file mode 100644
index 8d289fa956..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Configuration/AuthenticationConfigurationSectionHandler.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Configuration;
-using System.Text;
-
-using Apache.Qpid.Client.Security;
-using Apache.Qpid.Sasl.Mechanisms;
-
-namespace Apache.Qpid.Client.Configuration
-{
- public class AuthenticationConfigurationSectionHandler
- : IConfigurationSectionHandler
- {
-
- public object Create(object parent, object configContext, System.Xml.XmlNode section)
- {
- NameValueSectionHandler handler = new NameValueSectionHandler();
- OrderedHashTable schemes = new OrderedHashTable();
-
- NameValueCollection options = (NameValueCollection)
- handler.Create(parent, configContext, section);
-
- if ( options != null )
- {
- foreach ( string key in options.Keys )
- {
- Type type = Type.GetType(options[key]);
- if ( type == null )
- throw new ConfigurationException(string.Format("Type '{0}' not found", key));
- if ( !typeof(IAMQCallbackHandler).IsAssignableFrom(type) )
- throw new ConfigurationException(string.Format("Type '{0}' does not implement IAMQCallbackHandler", key));
-
- schemes.Add(key, type);
- }
- }
-
- return schemes;
- }
-
- } // class AuthenticationConfigurationSectionHandler
-
- public class OrderedHashTable : Hashtable
- {
- private ArrayList _keys = new ArrayList();
-
- public IList OrderedKeys
- {
- get { return _keys; }
- }
-
- public override void Add(object key, object value)
- {
- base.Add(key, value);
- _keys.Add(key);
- }
- public override void Remove(object key)
- {
- base.Remove(key);
- _keys.Remove(key);
- }
- }
-} // namespace Apache.Qpid.Client.Configuration
diff --git a/qpid/dotnet/Qpid.Client/Client/ConnectionTuneParameters.cs b/qpid/dotnet/Qpid.Client/Client/ConnectionTuneParameters.cs
deleted file mode 100644
index b21486bfa8..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/ConnectionTuneParameters.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Client
-{
- public class ConnectionTuneParameters
- {
- private uint _frameMax;
-
- private ushort _channelMax;
-
- private uint _hearbeat;
-
- private uint _txnLimit;
-
- public uint FrameMax
- {
- get
- {
- return _frameMax;
- }
- set
- {
- _frameMax = value;
- }
- }
-
- public ushort ChannelMax
- {
- get
- {
- return _channelMax;
- }
- set
- {
- _channelMax = value;
- }
- }
-
- public uint Heartbeat
- {
- get
- {
- return _hearbeat;
- }
- set
- {
- _hearbeat = value;
- }
- }
-
- public uint TxnLimit
- {
- get
- {
- return _txnLimit;
- }
- set
- {
- _txnLimit = value;
- }
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Failover/FailoverException.cs b/qpid/dotnet/Qpid.Client/Client/Failover/FailoverException.cs
deleted file mode 100644
index 7013746414..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Failover/FailoverException.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid.Client.Failover
-{
- /// <summary>
- /// This exception is thrown when failover is taking place and we need to let other
- /// parts of the client know about this.
- /// </summary>
- [Serializable]
- class FailoverException : Exception
- {
- public FailoverException(String message) : base(message)
- {
- }
-
- protected FailoverException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Failover/FailoverHandler.cs b/qpid/dotnet/Qpid.Client/Client/Failover/FailoverHandler.cs
deleted file mode 100644
index 83c69b7d25..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Failover/FailoverHandler.cs
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using log4net;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.State;
-
-namespace Apache.Qpid.Client.Failover
-{
- public class FailoverHandler
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(FailoverHandler));
-
- private AMQConnection _connection;
-
- /**
- * Used where forcing the failover host
- */
- private String _host;
-
- /**
- * Used where forcing the failover port
- */
- private int _port;
-
- public FailoverHandler(AMQConnection connection)
- {
- _connection = connection;
- }
-
- public void Run()
- {
- if (Thread.CurrentThread.IsBackground)
- {
- throw new InvalidOperationException("FailoverHandler must Run on a non-background thread.");
- }
-
- AMQProtocolListener pl = _connection.ProtocolListener;
- pl.FailoverLatch = new ManualResetEvent(false);
-
- // We wake up listeners. If they can handle failover, they will extend the
- // FailoverSupport class and will in turn block on the latch until failover
- // has completed before retrying the operation
- _connection.ProtocolListener.PropagateExceptionToWaiters(new FailoverException("Failing over about to start"));
-
- // Since failover impacts several structures we protect them all with a single mutex. These structures
- // are also in child objects of the connection. This allows us to manipulate them without affecting
- // client code which runs in a separate thread.
- lock (_connection.FailoverMutex)
- {
- _log.Info("Starting failover process");
-
- // We switch in a new state manager temporarily so that the interaction to get to the "connection open"
- // state works, without us having to terminate any existing "state waiters". We could theoretically
- // have a state waiter waiting until the connection is closed for some reason. Or in future we may have
- // a slightly more complex state model therefore I felt it was worthwhile doing this.
- AMQStateManager existingStateManager = _connection.ProtocolListener.StateManager;
- _connection.ProtocolListener.StateManager = new AMQStateManager();
- if (!_connection.FirePreFailover(_host != null))
- {
- _connection.ProtocolListener.StateManager = existingStateManager;
- if (_host != null)
- {
- _connection.ExceptionReceived(new AMQDisconnectedException("Redirect was vetoed by client"));
- }
- else
- {
- _connection.ExceptionReceived(new AMQDisconnectedException("Failover was vetoed by client"));
- }
- pl.FailoverLatch.Set();
- pl.FailoverLatch = null;
- return;
- }
- bool failoverSucceeded;
- // when host is non null we have a specified failover host otherwise we all the client to cycle through
- // all specified hosts
-
- // if _host has value then we are performing a redirect.
- if (_host != null)
- {
- // todo: fix SSL support!
- failoverSucceeded = _connection.AttemptReconnection(_host, _port, null);
- }
- else
- {
- failoverSucceeded = _connection.AttemptReconnection();
- }
-
- // XXX: at this point it appears that we are going to set StateManager to existingStateManager in
- // XXX: both paths of control.
- if (!failoverSucceeded)
- {
- _connection.ProtocolListener.StateManager = existingStateManager;
- _connection.ExceptionReceived(
- new AMQDisconnectedException("Server closed connection and no failover " +
- "was successful"));
- }
- else
- {
- _connection.ProtocolListener.StateManager = existingStateManager;
- try
- {
- if (_connection.FirePreResubscribe())
- {
- _log.Info("Resubscribing on new connection");
- _connection.ResubscribeChannels();
- }
- else
- {
- _log.Info("Client vetoed automatic resubscription");
- }
- _connection.FireFailoverComplete();
- _connection.ProtocolListener.FailoverState = FailoverState.NOT_STARTED;
- _log.Info("Connection failover completed successfully");
- }
- catch (Exception e)
- {
- _log.Info("Failover process failed - exception being propagated by protocol handler");
- _connection.ProtocolListener.FailoverState = FailoverState.FAILED;
- try
- {
- _connection.ProtocolListener.OnException(e);
- }
- catch (Exception ex)
- {
- _log.Error("Error notifying protocol session of error: " + ex, ex);
- }
- }
- }
- }
- pl.FailoverLatch.Set();
- }
-
- public String getHost()
- {
- return _host;
- }
-
- public void setHost(String host)
- {
- _host = host;
- }
-
- public int getPort()
- {
- return _port;
- }
-
- public void setPort(int port)
- {
- _port = port;
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Failover/FailoverState.cs b/qpid/dotnet/Qpid.Client/Client/Failover/FailoverState.cs
deleted file mode 100644
index 3058cdcd69..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Failover/FailoverState.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Client.Failover
-{
- /// <summary>
- /// Enumeration of failover states. Used to handle failover from within AMQProtocolHandler where MINA events need to be
- /// dealt with and can happen during failover.
- /// </summary>
- enum FailoverState
- {
- NOT_STARTED, IN_PROGRESS, FAILED
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Failover/FailoverSupport.cs b/qpid/dotnet/Qpid.Client/Client/Failover/FailoverSupport.cs
deleted file mode 100644
index afa5301f39..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Failover/FailoverSupport.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-namespace Apache.Qpid.Client.Failover
-{
- public abstract class FailoverSupport
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(FailoverSupport));
-
- public object execute(AMQConnection con)
- {
- // We wait until we are not in the middle of failover before acquiring the mutex and then proceeding.
- // Any method that can potentially block for any reason should use this class so that deadlock will not
- // occur. The FailoverException is propagated by the AMQProtocolHandler to any listeners (e.g. frame listeners)
- // that might be causing a block. When that happens, the exception is caught here and the mutex is released
- // before waiting for the failover to complete (either successfully or unsuccessfully).
- while (true)
- {
- con.ProtocolListener.BlockUntilNotFailingOver();
- lock (con.FailoverMutex)
- {
- try
- {
- return operation();
- }
- catch (FailoverException e)
- {
- _log.Info("Failover exception caught during operation", e);
- }
- }
- }
- }
-
- protected abstract object operation();
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Handler/BasicDeliverMethodHandler.cs b/qpid/dotnet/Qpid.Client/Client/Handler/BasicDeliverMethodHandler.cs
deleted file mode 100644
index def1e78e8c..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Handler/BasicDeliverMethodHandler.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using Apache.Qpid.Client.Message;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.State;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Handler
-{
- public class BasicDeliverMethodHandler : IStateAwareMethodListener
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(BasicDeliverMethodHandler));
-
- public void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt)
- {
- UnprocessedMessage msg = new UnprocessedMessage();
- msg.DeliverBody = (BasicDeliverBody) evt.Method;
- msg.ChannelId = evt.ChannelId;
- _logger.Debug("New JmsDeliver method received");
- evt.ProtocolSession.UnprocessedMessageReceived(msg);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Handler/BasicReturnMethodHandler.cs b/qpid/dotnet/Qpid.Client/Client/Handler/BasicReturnMethodHandler.cs
deleted file mode 100644
index f413dfc9c6..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Handler/BasicReturnMethodHandler.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using Apache.Qpid.Client.Message;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.State;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Handler
-{
- public class BasicReturnMethodHandler : IStateAwareMethodListener
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(BasicReturnMethodHandler));
-
- public void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt)
- {
- _logger.Debug("New Basic.Return method received");
- UnprocessedMessage msg = new UnprocessedMessage();
- msg.DeliverBody = null;
- msg.BounceBody = (BasicReturnBody) evt.Method;
- msg.ChannelId = evt.ChannelId;
-
- evt.ProtocolSession.UnprocessedMessageReceived(msg);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Handler/ChannelCloseMethodHandler.cs b/qpid/dotnet/Qpid.Client/Client/Handler/ChannelCloseMethodHandler.cs
deleted file mode 100644
index 9ed09a0d01..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Handler/ChannelCloseMethodHandler.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.State;
-using Apache.Qpid.Protocol;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Handler
-{
- public class ChannelCloseMethodHandler : IStateAwareMethodListener
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(ChannelCloseMethodHandler));
-
- public void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt)
- {
- _logger.Debug("ChannelClose method received");
- ChannelCloseBody method = (ChannelCloseBody) evt.Method;
-
- int errorCode = method.ReplyCode;
- string reason = method.ReplyText;
- if (_logger.IsDebugEnabled)
- {
- _logger.Debug("Channel close reply code: " + errorCode + ", reason: " + reason);
- }
-
- AMQFrame frame = ChannelCloseOkBody.CreateAMQFrame(evt.ChannelId);
- evt.ProtocolSession.WriteFrame(frame);
-
- if ( errorCode != AMQConstant.REPLY_SUCCESS.Code )
- {
- _logger.Debug("Channel close received with errorCode " + errorCode + ", throwing exception");
- if ( errorCode == AMQConstant.NO_CONSUMERS.Code )
- throw new AMQNoConsumersException(reason);
- if ( errorCode == AMQConstant.NO_ROUTE.Code )
- throw new AMQNoRouteException(reason);
- if ( errorCode == AMQConstant.INVALID_ARGUMENT.Code )
- throw new AMQInvalidArgumentException(reason);
- if ( errorCode == AMQConstant.INVALID_ROUTING_KEY.Code )
- throw new AMQInvalidRoutingKeyException(reason);
- // any other
- throw new AMQChannelClosedException(errorCode, "Error: " + reason);
- }
- evt.ProtocolSession.ChannelClosed(evt.ChannelId, errorCode, reason);
- }
- }
-}
-
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionCloseMethodHandler.cs b/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionCloseMethodHandler.cs
deleted file mode 100644
index 66cff3bc65..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionCloseMethodHandler.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using log4net;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.State;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Protocol;
-
-namespace Apache.Qpid.Client.Handler
-{
- public class ConnectionCloseMethodHandler : IStateAwareMethodListener
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(ConnectionCloseMethodHandler));
-
- public void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt)
- {
- _logger.Debug("ConnectionClose frame received");
- ConnectionCloseBody method = (ConnectionCloseBody) evt.Method;
-
- int errorCode = method.ReplyCode;
- String reason = method.ReplyText;
-
- // send CloseOK
- evt.ProtocolSession.WriteFrame(ConnectionCloseOkBody.CreateAMQFrame(evt.ChannelId));
-
- if ( errorCode != AMQConstant.REPLY_SUCCESS.Code )
- {
- if ( errorCode == AMQConstant.NOT_ALLOWED.Code )
- {
- _logger.Info("Authentication Error: " + Thread.CurrentThread.Name);
- evt.ProtocolSession.CloseProtocolSession();
-
- //todo this is a bit of a fudge (could be conssidered such as each new connection needs a new state manager or at least a fresh state.
- stateManager.ChangeState(AMQState.CONNECTION_NOT_STARTED);
-
- throw new AMQAuthenticationException(errorCode, reason);
- } else
- {
- _logger.Info("Connection close received with error code " + errorCode);
- throw new AMQConnectionClosedException(errorCode, "Error: " + reason);
- }
- }
- // this actually closes the connection in the case where it is not an error.
- evt.ProtocolSession.CloseProtocolSession();
- stateManager.ChangeState(AMQState.CONNECTION_CLOSED);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionCloseOkHandler.cs b/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionCloseOkHandler.cs
deleted file mode 100644
index 038da15731..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionCloseOkHandler.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.State;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Handler
-{
- public class ConnectionCloseOkHandler : IStateAwareMethodListener
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(ConnectionCloseOkHandler));
-
- public void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt)
- {
- _logger.Debug("ConnectionCloseOk frame received");
-// ConnectionCloseOkBody method = (ConnectionCloseOkBody)evt.Method;
- stateManager.ChangeState(AMQState.CONNECTION_CLOSED);
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionOpenOkMethodHandler.cs b/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionOpenOkMethodHandler.cs
deleted file mode 100644
index a12e4ead60..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionOpenOkMethodHandler.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.State;
-
-namespace Apache.Qpid.Client.Handler
-{
- public class ConnectionOpenOkMethodHandler : IStateAwareMethodListener
- {
- public void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt)
- {
- stateManager.ChangeState(AMQState.CONNECTION_OPEN);
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs b/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs
deleted file mode 100644
index 08cc580b17..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionRedirectMethodHandler.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.State;
-
-namespace Apache.Qpid.Client.Handler
-{
- public class ConnectionRedirectMethodHandler : IStateAwareMethodListener
- {
-// private static readonly ILog _logger = LogManager.GetLogger(typeof(ConnectionRedirectMethodHandler));
-
- private const int DEFAULT_REDIRECT_PORT = 5672;
-
- private static ConnectionRedirectMethodHandler _handler = new ConnectionRedirectMethodHandler();
-
- public static ConnectionRedirectMethodHandler GetInstance()
- {
- return _handler;
- }
-
- private ConnectionRedirectMethodHandler()
- {
- }
-
- public void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt)
- {
- /*_logger.Info("ConnectionRedirect frame received");
- ConnectionRedirectBody method = (ConnectionRedirectBody) evt.Method;
-
- // the host is in the form hostname:port with the port being optional
- int portIndex = method.Host.IndexOf(':');
- String host;
- int port;
- if (portIndex == -1)
- {
- host = method.Host;
- port = DEFAULT_REDIRECT_PORT;
- }
- else
- {
- host = method.Host.Substring(0, portIndex);
- port = Int32.Parse(method.Host.Substring(portIndex + 1));
- }
- evt.ProtocolSession.Failover(host, port);*/
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionSecureMethodHandler.cs b/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionSecureMethodHandler.cs
deleted file mode 100644
index 9333d4d0a6..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionSecureMethodHandler.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.State;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Sasl;
-
-namespace Apache.Qpid.Client.Handler
-{
- public class ConnectionSecureMethodHandler : IStateAwareMethodListener
- {
- public void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt)
- {
- ISaslClient saslClient = evt.ProtocolSession.SaslClient;
- if ( saslClient == null )
- {
- throw new AMQException("No SASL client set up - cannot proceed with authentication");
- }
-
-
- ConnectionSecureBody body = (ConnectionSecureBody)evt.Method;
-
- try
- {
- // Evaluate server challenge
- byte[] response = saslClient.EvaluateChallenge(body.Challenge);
- // AMQP version change: Hardwire the version to 0-8 (major=8, minor=0)
- // TODO: Connect this to the session version obtained from ProtocolInitiation for this session.
- // Be aware of possible changes to parameter order as versions change.
- AMQFrame responseFrame = ConnectionSecureOkBody.CreateAMQFrame(
- evt.ChannelId, response);
- evt.ProtocolSession.WriteFrame(responseFrame);
- } catch ( SaslException e )
- {
- throw new AMQException("Error processing SASL challenge: " + e, e);
- }
- }
- }
-}
-
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionStartMethodHandler.cs b/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionStartMethodHandler.cs
deleted file mode 100644
index c54662286b..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionStartMethodHandler.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Text;
-using log4net;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.Security;
-using Apache.Qpid.Client.State;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Sasl;
-
-
-namespace Apache.Qpid.Client.Handler
-{
- public class ConnectionStartMethodHandler : IStateAwareMethodListener
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(ConnectionStartMethodHandler));
-
- public void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt)
- {
- ConnectionStartBody body = (ConnectionStartBody) evt.Method;
- AMQProtocolSession ps = evt.ProtocolSession;
-
- try
- {
- if ( body.Mechanisms == null )
- {
- throw new AMQException("mechanism not specified in ConnectionStart method frame");
- }
- string mechanisms = Encoding.UTF8.GetString(body.Mechanisms);
- string selectedMechanism = ChooseMechanism(mechanisms);
- if ( selectedMechanism == null )
- {
- throw new AMQException("No supported security mechanism found, passed: " + mechanisms);
- }
-
- byte[] saslResponse = DoAuthentication(selectedMechanism, ps);
-
- if (body.Locales == null)
- {
- throw new AMQException("Locales is not defined in Connection Start method");
- }
- string allLocales = Encoding.ASCII.GetString(body.Locales);
- string[] locales = allLocales.Split(' ');
- string selectedLocale;
- if (locales != null && locales.Length > 0)
- {
- selectedLocale = locales[0];
- }
- else
- {
- throw new AMQException("No locales sent from server, passed: " + locales);
- }
-
- stateManager.ChangeState(AMQState.CONNECTION_NOT_TUNED);
- FieldTable clientProperties = new FieldTable();
- clientProperties["product"] = "Apache.Qpid.NET";
- clientProperties["version"] = "1.0";
- clientProperties["platform"] = GetFullSystemInfo();
- clientProperties["instance"] = ps.ClientID;
- AMQFrame frame = ConnectionStartOkBody.CreateAMQFrame(
- evt.ChannelId, clientProperties, selectedMechanism,
- saslResponse, selectedLocale);
- ps.WriteFrame(frame);
- }
- catch (Exception e)
- {
- throw new AMQException(_log, "Unable to decode data: " + e, e);
- }
- }
-
- private string GetFullSystemInfo()
- {
- StringBuilder sysInfo = new StringBuilder();
- // check if we're running on mono or .net
- Type monoRuntime = Type.GetType("Mono.Runtime");
- if ( monoRuntime != null )
- sysInfo.Append("Mono");
- else
- sysInfo.Append(".NET");
- sysInfo.Append(" ").Append(Environment.Version);
- sysInfo.Append(", ").Append(Environment.OSVersion);
- return sysInfo.ToString();
- }
-
- private string ChooseMechanism(string mechanisms)
- {
- return CallbackHandlerRegistry.Instance.ChooseMechanism(mechanisms);
- }
-
- private byte[] DoAuthentication(string selectedMechanism, AMQProtocolSession ps)
- {
- ISaslClient saslClient = Sasl.Sasl.CreateClient(
- new string[] { selectedMechanism }, null, "AMQP", "localhost",
- new Hashtable(), CreateCallbackHandler(selectedMechanism, ps)
- );
- if ( saslClient == null )
- {
- throw new AMQException("Client SASL configuration error: no SaslClient could be created for mechanism " +
- selectedMechanism);
- }
- ps.SaslClient = saslClient;
- try
- {
- return saslClient.HasInitialResponse ?
- saslClient.EvaluateChallenge(new byte[0]) : null;
- } catch ( Exception ex )
- {
- ps.SaslClient = null;
- throw new AMQException("Unable to create SASL client", ex);
- }
- }
-
- private IAMQCallbackHandler CreateCallbackHandler(string mechanism, AMQProtocolSession session)
- {
- Type type = CallbackHandlerRegistry.Instance.GetCallbackHandler(mechanism);
- IAMQCallbackHandler handler =
- (IAMQCallbackHandler)Activator.CreateInstance(type);
- if ( handler == null )
- throw new AMQException("Unable to create callback handler: " + mechanism);
- handler.Initialize(session);
- return handler;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionTuneMethodHandler.cs b/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionTuneMethodHandler.cs
deleted file mode 100644
index 15a1d908b7..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Handler/ConnectionTuneMethodHandler.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using log4net;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.State;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Handler
-{
- public class ConnectionTuneMethodHandler : IStateAwareMethodListener
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(ConnectionTuneMethodHandler));
-
- public void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt)
- {
- _logger.Debug("ConnectionTune frame received");
- ConnectionTuneBody frame = (ConnectionTuneBody) evt.Method;
- AMQProtocolSession session = evt.ProtocolSession;
-
- ConnectionTuneParameters parameters = session.ConnectionTuneParameters;
- if (parameters == null)
- {
- parameters = new ConnectionTuneParameters();
- }
-
- _logger.Debug(String.Format("ConnectionTune.heartbeat = {0}.", frame.Heartbeat));
-
- parameters.FrameMax = frame.FrameMax;
- parameters.Heartbeat = frame.Heartbeat;
- session.ConnectionTuneParameters = parameters;
-
- stateManager.ChangeState(AMQState.CONNECTION_NOT_OPENED);
- session.WriteFrame(ConnectionTuneOkBody.CreateAMQFrame(
- evt.ChannelId, frame.ChannelMax, frame.FrameMax, frame.Heartbeat));
- session.WriteFrame(ConnectionOpenBody.CreateAMQFrame(
- evt.ChannelId, session.AMQConnection.VirtualHost, null, true));
-
- if (frame.Heartbeat > 0)
- {
- evt.ProtocolSession.AMQConnection.StartHeartBeatThread(frame.Heartbeat);
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Handler/QueueDeleteOkMethodHandler.cs b/qpid/dotnet/Qpid.Client/Client/Handler/QueueDeleteOkMethodHandler.cs
deleted file mode 100644
index 70aa3e1078..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Handler/QueueDeleteOkMethodHandler.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using Apache.Qpid.Client.Message;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.State;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Handler
-{
- public class QueueDeleteOkMethodHandler : IStateAwareMethodListener
- {
-
- private static readonly ILog _logger = LogManager.GetLogger(typeof(QueueDeleteOkMethodHandler));
-
- public void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt)
- {
- QueueDeleteOkBody body = (QueueDeleteOkBody)evt.Method;
- if (body != null)
- {
- _logger.InfoFormat("Received Queue.Delete-Ok message, message count {0}", body.MessageCount);
- }
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Handler/QueuePurgeOkMethodHandler.cs b/qpid/dotnet/Qpid.Client/Client/Handler/QueuePurgeOkMethodHandler.cs
deleted file mode 100644
index 22db70575d..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Handler/QueuePurgeOkMethodHandler.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using Apache.Qpid.Client.Message;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.State;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Handler
-{
- public class QueuePurgeOkMethodHandler : IStateAwareMethodListener
- {
-
- private static readonly ILog _logger = LogManager.GetLogger(typeof(QueuePurgeOkMethodHandler));
-
- public void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt)
- {
- QueuePurgeOkBody body = (QueuePurgeOkBody)evt.Method;
- if (body != null)
- {
- _logger.InfoFormat("Received Queue.Purge-Ok message, message count {0}", body.MessageCount);
- }
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Message/AMQMessage.cs b/qpid/dotnet/Qpid.Client/Client/Message/AMQMessage.cs
deleted file mode 100644
index e58de2ab96..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Message/AMQMessage.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Message
-{
- public class AMQMessage
- {
- protected IContentHeaderProperties _contentHeaderProperties;
-
- /// <summary>
- /// If the acknowledge mode is CLIENT_ACKNOWLEDGE the session is required
- /// </summary>
- protected AmqChannel _channel;
-
- private long _deliveryTag;
-
- public AMQMessage(IContentHeaderProperties properties, long deliveryTag)
- {
- _contentHeaderProperties = properties;
- _deliveryTag = deliveryTag;
- }
-
- public AMQMessage(IContentHeaderProperties properties)
- : this(properties, -1)
- {
- }
-
- public long DeliveryTag
- {
- get { return _deliveryTag; }
- }
-
- public AmqChannel Channel
- {
- get { return _channel; }
- set { _channel = value; }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Message/AMQMessageFactory.cs b/qpid/dotnet/Qpid.Client/Client/Message/AMQMessageFactory.cs
deleted file mode 100644
index f352d62c11..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Message/AMQMessageFactory.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Collections;
-using Apache.Qpid.Framing;
-using log4net;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Client.Message
-{
- public abstract class AbstractQmsMessageFactory : IMessageFactory
- {
- public abstract AbstractQmsMessage CreateMessage(string mimeType);
-
- private static readonly ILog _logger = LogManager.GetLogger(typeof (AbstractQmsMessageFactory));
-
- protected abstract AbstractQmsMessage CreateMessage(long messageNbr, ByteBuffer data, ContentHeaderBody contentHeader);
-
- protected AbstractQmsMessage CreateMessageWithBody(long messageNbr,
- ContentHeaderBody contentHeader,
- IList bodies)
- {
- ByteBuffer data;
-
- // we optimise the non-fragmented case to avoid copying
- if (bodies != null && bodies.Count == 1)
- {
- _logger.Debug("Non-fragmented message body (bodySize=" + contentHeader.BodySize +")");
- data = ((ContentBody)bodies[0]).Payload;
- }
- else
- {
- _logger.Debug("Fragmented message body (" + bodies.Count + " frames, bodySize=" + contentHeader.BodySize + ")");
- data = ByteBuffer.Allocate((int)contentHeader.BodySize); // XXX: Is cast a problem?
- foreach (ContentBody body in bodies) {
- data.Put(body.Payload);
- //body.Payload.Release();
- }
-
- data.Flip();
- }
- _logger.Debug("Creating message from buffer with position=" + data.Position + " and remaining=" + data.Remaining);
-
- return CreateMessage(messageNbr, data, contentHeader);
- }
-
- public AbstractQmsMessage CreateMessage(long messageNbr, bool redelivered,
- ContentHeaderBody contentHeader,
- IList bodies)
- {
- AbstractQmsMessage msg = CreateMessageWithBody(messageNbr, contentHeader, bodies);
- msg.Redelivered = redelivered;
- return msg;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Message/AbstractQmsMessage.cs b/qpid/dotnet/Qpid.Client/Client/Message/AbstractQmsMessage.cs
deleted file mode 100644
index 34b47137e5..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Message/AbstractQmsMessage.cs
+++ /dev/null
@@ -1,694 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Text;
-using log4net;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Client.Message
-{
- public abstract class AbstractQmsMessage : AMQMessage, IMessage
- {
- private static ILog log = LogManager.GetLogger(typeof(AbstractQmsMessage));
-
- protected bool _redelivered;
-
- protected ByteBuffer _data;
- protected bool _readableMessage = false;
- private QpidHeaders _headers;
-
- protected AbstractQmsMessage(ByteBuffer data)
- : base(new BasicContentHeaderProperties())
- {
- Init(data);
- }
-
- protected AbstractQmsMessage(long deliveryTag, BasicContentHeaderProperties contentHeader, ByteBuffer data)
- : this(contentHeader, deliveryTag)
- {
- Init(data);
- }
-
- protected AbstractQmsMessage(BasicContentHeaderProperties contentHeader, long deliveryTag) : base(contentHeader, deliveryTag)
- {
- Init(null);
- }
-
- private void Init(ByteBuffer data)
- {
- _data = data;
- if ( _data != null )
- {
- _data.Acquire();
- }
- _readableMessage = (data != null);
- if ( ContentHeaderProperties.Headers == null )
- ContentHeaderProperties.Headers = new FieldTable();
- _headers = new QpidHeaders(ContentHeaderProperties.Headers);
- }
-
- //
- // Properties
- //
-
- /// <summary>
- /// The application message identifier
- /// </summary>
- public string MessageId
- {
- get
- {
- if (ContentHeaderProperties.MessageId == null)
- {
- ContentHeaderProperties.MessageId = "ID:" + DeliveryTag;
- }
- return ContentHeaderProperties.MessageId;
- }
- set { ContentHeaderProperties.MessageId = value; }
- }
-
- /// <summary>
- /// The message timestamp
- /// </summary>
- public long Timestamp
- {
- get
- {
- // TODO: look at ulong/long choice
- return (long) ContentHeaderProperties.Timestamp;
- }
- set
- {
- ContentHeaderProperties.Timestamp = (ulong) value;
- }
- }
-
- /// <summary>
- /// The <see cref="CorrelationId"/> as a byte array.
- /// </summary>
- public byte[] CorrelationIdAsBytes
- {
- get { return Encoding.Default.GetBytes(ContentHeaderProperties.CorrelationId); }
- set { ContentHeaderProperties.CorrelationId = Encoding.Default.GetString(value); }
- }
-
- /// <summary>
- /// The application correlation identifier
- /// </summary>
- public string CorrelationId
- {
- get { return ContentHeaderProperties.CorrelationId; }
- set { ContentHeaderProperties.CorrelationId = value; }
- }
-
- struct Dest
- {
- public string ExchangeName;
- public string RoutingKey;
-
- public Dest(string exchangeName, string routingKey)
- {
- ExchangeName = exchangeName;
- RoutingKey = routingKey;
- }
- }
-
- /// <summary>
- /// Exchange name of the reply-to address
- /// </summary>
- public string ReplyToExchangeName
- {
- get
- {
- return ReadReplyToHeader().ExchangeName;
- }
- set
- {
- BindingURL dest = ReadReplyToHeader();
- dest.ExchangeName = value;
- WriteReplyToHeader(dest);
- }
- }
-
- /// <summary>
- /// Routing key of the reply-to address
- /// </summary>
- public string ReplyToRoutingKey
- {
- get
- {
- return ReadReplyToHeader().RoutingKey;
- }
- set
- {
- BindingURL dest = ReadReplyToHeader();
- dest.RoutingKey = value;
- WriteReplyToHeader(dest);
- }
- }
-
- /// <summary>
- /// Non-persistent (1) or persistent (2)
- /// </summary>
- public DeliveryMode DeliveryMode
- {
- get
- {
- byte b = ContentHeaderProperties.DeliveryMode;
- switch (b)
- {
- case 1:
- return DeliveryMode.NonPersistent;
- case 2:
- return DeliveryMode.Persistent;
- default:
- throw new QpidException("Illegal value for delivery mode in content header properties");
- }
- }
- set
- {
- ContentHeaderProperties.DeliveryMode = (byte)(value==DeliveryMode.NonPersistent?1:2);
- }
- }
-
- /// <summary>
- /// True, if this is a redelivered message
- /// </summary>
- public bool Redelivered
- {
- get { return _redelivered; }
- set { _redelivered = value; }
- }
-
- /// <summary>
- /// The message type name
- /// </summary>
- public string Type
- {
- get { return ContentHeaderProperties.Type; }
- set { ContentHeaderProperties.Type = value; }
- }
-
- /// <summary>
- /// Message expiration specification
- /// </summary>
- public long Expiration
- {
- get { return ContentHeaderProperties.Expiration; }
- set { ContentHeaderProperties.Expiration = value; }
- }
-
- /// <summary>
- /// The message priority, 0 to 9
- /// </summary>
- public byte Priority
- {
- get { return ContentHeaderProperties.Priority; }
- set { ContentHeaderProperties.Priority = (byte) value; }
- }
-
- /// <summary>
- /// The MIME Content Type
- /// </summary>
- public string ContentType
- {
- get { return ContentHeaderProperties.ContentType; }
- set { ContentHeaderProperties.ContentType = value; }
- }
-
- /// <summary>
- /// The MIME Content Encoding
- /// </summary>
- public string ContentEncoding
- {
- get { return ContentHeaderProperties.Encoding; }
- set { ContentHeaderProperties.Encoding = value; }
- }
-
- /// <summary>
- /// Headers of this message
- /// </summary>
- public IHeaders Headers
- {
- get { return _headers; }
- }
-
- /// <summary>
- /// The creating user id
- /// </summary>
- public string UserId
- {
- get { return ContentHeaderProperties.UserId; }
- set { ContentHeaderProperties.UserId = value; }
- }
-
- /// <summary>
- /// The creating application id
- /// </summary>
- public string AppId
- {
- get { return ContentHeaderProperties.AppId; }
- set { ContentHeaderProperties.AppId = value; }
- }
-
- /// <summary>
- /// Intra-cluster routing identifier
- /// </summary>
- public string ClusterId
- {
- get { return ContentHeaderProperties.ClusterId; }
- set { ContentHeaderProperties.ClusterId = value; }
- }
-
- /// <summary>
- /// Return the raw byte array that is used to populate the frame when sending
- /// the message.
- /// </summary>
- /// <value>a byte array of message data</value>
- public ByteBuffer Data
- {
- get
- {
- if (_data != null)
- {
- if (!_readableMessage)
- {
- _data.Flip();
- }
- else
- {
- // Make sure we rewind the data just in case any method has moved the
- // position beyond the start.
- _data.Rewind();
- }
- }
- return _data;
- }
-
- set
- {
- _data = value;
- }
- }
-
- public void Acknowledge()
- {
- // the JMS 1.1 spec says in section 3.6 that calls to acknowledge are ignored when client acknowledge
- // is not specified. In our case, we only set the session field where client acknowledge mode is specified.
- if (_channel != null)
- {
- // we set multiple to true here since acknowledgement implies acknowledge of all count messages
- // received on the session
- _channel.AcknowledgeMessage((ulong)DeliveryTag, true);
- }
-
- }
-
- public abstract void ClearBodyImpl();
-
- public void ClearBody()
- {
- ClearBodyImpl();
- _readableMessage = false;
- }
-
- /// <summary>
- /// Get a String representation of the body of the message. Used in the
- /// toString() method which outputs this before message properties.
- /// </summary>
- /// <exception cref="QpidException"></exception>
- public abstract string ToBodyString();
-
- public override string ToString()
- {
- try
- {
- StringBuilder buf = new StringBuilder("Body:\n");
- buf.Append(ToBodyString());
- buf.Append("\nQmsTimestamp: ").Append(Timestamp);
- buf.Append("\nQmsExpiration: ").Append(Expiration);
- buf.Append("\nQmsPriority: ").Append(Priority);
- buf.Append("\nQmsDeliveryMode: ").Append(DeliveryMode);
- buf.Append("\nReplyToExchangeName: ").Append(ReplyToExchangeName);
- buf.Append("\nReplyToRoutingKey: ").Append(ReplyToRoutingKey);
- buf.Append("\nAMQ message number: ").Append(DeliveryTag);
- buf.Append("\nProperties:");
- if (ContentHeaderProperties.Headers == null)
- {
- buf.Append("<NONE>");
- }
- else
- {
- buf.Append(Headers.ToString());
- }
- return buf.ToString();
- }
- catch (Exception e)
- {
- return e.ToString();
- }
- }
-
- public FieldTable PopulateHeadersFromMessageProperties()
- {
- if (ContentHeaderProperties.Headers == null)
- {
- return null;
- }
- else
- {
- //
- // We need to convert every property into a String representation
- // Note that type information is preserved in the property name
- //
- FieldTable table = new FieldTable();
- foreach (DictionaryEntry entry in ContentHeaderProperties.Headers)
- {
- string propertyName = (string) entry.Key;
- if (propertyName == null)
- {
- continue;
- }
- else
- {
- table[propertyName] = entry.Value.ToString();
- }
- }
- return table;
- }
- }
-
- public BasicContentHeaderProperties ContentHeaderProperties
- {
- get
- {
- return (BasicContentHeaderProperties) _contentHeaderProperties;
- }
- }
-
- protected virtual void Reset()
- {
- _readableMessage = true;
- }
-
- public bool IsReadable
- {
- get { return _readableMessage; }
- }
-
- public bool isWritable
- {
- get { return !_readableMessage; }
- }
-
- protected void CheckReadable()
- {
- if ( !_readableMessage )
- {
- throw new MessageNotReadableException("You need to call reset() to make the message readable");
- }
- }
-
- /// <summary>
- /// Decodes the replyto field if one is set.
- ///
- /// Splits a replyto field containing an exchange name followed by a ':', followed by a routing key into the exchange name and
- /// routing key seperately. The exchange name may be empty in which case the empty string is returned. If the exchange name is
- /// empty the replyto field is expected to being with ':'.
- ///
- /// Anyhting other than a two part replyto field sperated with a ':' will result in an exception.
- /// </summary>
- ///
- /// <returns>A destination initialized to the replyto location if a replyto field was set, or an empty destination otherwise.</returns>
- private BindingURL ReadReplyToHeader()
- {
- string replyToEncoding = ContentHeaderProperties.ReplyTo;
- //log.Debug("replyToEncoding = " + replyToEncoding);
-
- BindingURL bindingUrl = new BindingURL(replyToEncoding);
- //log.Debug("bindingUrl = " + bindingUrl.ToString());
-
- return bindingUrl;
-
- //log.Info("replyToEncoding = " + replyToEncoding);
-
-// if ( replyToEncoding == null )
-// {
-// return new Dest();
-// } else
-// {
-// // Split the replyto field on a ':'
-// string[] split = replyToEncoding.Split(':');
-
-// // Ensure that the replyto field argument only consisted of two parts.
-// if ( split.Length != 2 )
-// {
-// throw new QpidException("Illegal value in ReplyTo property: " + replyToEncoding);
-// }
-
-// // Extract the exchange name and routing key from the split replyto field.
-// string exchangeName = split[0];
-
-// string[] split2 = split[1].Split('/');
-// string routingKey = split2[3];
-
-// return new Dest(exchangeName, routingKey);
-// }
- }
-
- private void WriteReplyToHeader(BindingURL dest)
- {
- string encodedDestination = string.Format("{0}:{1}", dest.ExchangeName, dest.RoutingKey);
- ContentHeaderProperties.ReplyTo = encodedDestination;
- }
- }
-
- public class BindingURL
- {
- public readonly static string OPTION_EXCLUSIVE = "exclusive";
- public readonly static string OPTION_AUTODELETE = "autodelete";
- public readonly static string OPTION_DURABLE = "durable";
- public readonly static string OPTION_CLIENTID = "clientid";
- public readonly static string OPTION_SUBSCRIPTION = "subscription";
- public readonly static string OPTION_ROUTING_KEY = "routingkey";
-
- /// <summary> Holds the undecoded URL </summary>
- string url;
-
- /// <summary> Holds the decoded options. </summary>
- IDictionary options = new Hashtable();
-
- /// <summary> Holds the decoded exchange class. </summary>
- string exchangeClass;
-
- /// <summary> Holds the decoded exchange name. </summary>
- string exchangeName;
-
- /// <summary> Holds the destination name. </summary>
- string destination;
-
- /// <summary> Holds the decoded queue name. </summary>
- string queueName;
-
- /// <summary>
- /// The binding URL has the format:
- /// <exch_class>://<exch_name>/[<destination>]/[<queue>]?<option>='<value>'[,<option>='<value>']*
- /// </summary>
- public BindingURL(string url)
- {
- this.url = url;
- Parse();
- }
-
- public string Url { get { return url; } }
-
- public string ExchangeClass
- {
- get { return exchangeClass; }
- set { exchangeClass = value; }
- }
-
- public string ExchangeName
- {
- get { return exchangeName; }
- set { exchangeName = value; }
- }
-
- public string QueueName
- {
- get { return queueName; }
- set { queueName = value; }
- }
-
- public string DestinationName
- {
- get { return destination; }
- set { destination = value; }
- }
-
- public string RoutingKey {
- get { return (string)options[OPTION_ROUTING_KEY]; }
- set { options[OPTION_ROUTING_KEY] = value; }
- }
-
- public bool ContainsOption(string key) { return options.Contains(key); }
-
- public string ToString()
- {
- return "BindingURL: [ ExchangeClass = " + ExchangeClass + ", ExchangeName = " + ExchangeName + ", QueueName = " + QueueName +
- ", DestinationName = " + DestinationName + ", RoutingKey = " + RoutingKey + " ] ";
- }
-
- private void Parse()
- {
- Uri binding = new Uri(url);
-
- // Extract the URI scheme, this contains the exchange class. It is defaulted to the direct exchange if not specified.
- string exchangeClass = binding.Scheme;
-
- if (exchangeClass == null)
- {
- url = ExchangeNameDefaults.DIRECT_EXCHANGE_CLASS + "://" + ExchangeNameDefaults.DIRECT + "//" + url;
- Parse();
-
- return;
- }
- else
- {
- this.exchangeClass = exchangeClass;
- }
-
- // Extract the host name, this contains the exchange name. It is defaulted to the default direct exchange if not specified.
- string exchangeName = binding.Host;
-
- if (exchangeName == null)
- {
- if (exchangeClass.Equals(ExchangeNameDefaults.DIRECT_EXCHANGE_CLASS))
- {
- this.exchangeName = "";
- }
- }
- else
- {
- this.exchangeName = exchangeName;
- }
-
- // Extract the destination and queue name.
- if ((binding.AbsolutePath == null) || binding.AbsolutePath.Equals(""))
- {
- throw new UriFormatException("Destination or Queue required");
- }
- else
- {
- int slashOffset = binding.AbsolutePath.IndexOf("/", 1);
- if (slashOffset == -1)
- {
- throw new UriFormatException("Destination required");
- }
- else
- {
- String path = binding.AbsolutePath;
-
- this.destination = path.Substring(1, slashOffset - 1);
- this.queueName = path.Substring(slashOffset + 1);
- }
- }
-
- ParseOptions(options, binding.Query);
-
- // If the routing key is not set as an option, set it to the destination name.
- if (!ContainsOption(OPTION_ROUTING_KEY))
- {
- options[OPTION_ROUTING_KEY] = destination;
- }
- }
-
- /// <summary>
- /// options looks like this
- /// brokerlist='tcp://host:port?option='value',option='value';vm://:3/virtualpath?option='value'',failover='method?option='value',option='value'
- /// </summary>
- public static void ParseOptions(IDictionary optionMap, string options)
- {
- // Check that there really are some options to parse.
- if ((options == null) || (options.IndexOf('=') == -1))
- {
- return;
- }
-
- int optionIndex = options.IndexOf('=');
- string option = options.Substring(0, optionIndex);
- int length = options.Length;
- int nestedQuotes = 0;
-
- // Holds the index of the final "'".
- int valueIndex = optionIndex;
-
- // Loop over all the options.Dest
- while ((nestedQuotes > 0) || (valueIndex < length))
- {
- valueIndex++;
-
- if (valueIndex >= length)
- {
- break;
- }
-
- if (options[valueIndex] == '\'')
- {
- if ((valueIndex + 1) < options.Length)
- {
- if ((options[valueIndex + 1] == '&') ||
- (options[valueIndex + 1] == ',') ||
- (options[valueIndex + 1] == ';') ||
- (options[valueIndex + 1] == '\''))
- {
- nestedQuotes--;
-
- if (nestedQuotes == 0)
- {
- // We've found the value of an option
- break;
- }
- }
- else
- {
- nestedQuotes++;
- }
- }
- else
- {
- // We are at the end of the string
- // Check to see if we are corectly closing quotes
- if (options[valueIndex] == '\'')
- {
- nestedQuotes--;
- }
-
- break;
- }
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Message/IMessageFactory.cs b/qpid/dotnet/Qpid.Client/Client/Message/IMessageFactory.cs
deleted file mode 100644
index bed379290f..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Message/IMessageFactory.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Collections;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Message
-{
- public interface IMessageFactory
- {
- /// <summary>
- /// Create a message
- /// </summary>
- /// <param name="deliverTag">Delivery Tag</param>
- /// <param name="messageNbr">Message Sequence Number</param>
- /// <param name="redelivered">True if this is a redelivered message</param>
- /// <param name="contentHeader">Content headers</param>
- /// <param name="bodies">Message bodies</param>
- /// <returns>The new message</returns>
- /// <exception cref="QpidMessagingException">if the message cannot be created</exception>
- AbstractQmsMessage CreateMessage(long deliverTag, bool redelivered,
- ContentHeaderBody contentHeader,
- IList bodies);
-
- /// <summary>
- /// Creates the message.
- /// </summary>
- /// <param name="mimeType">Mime type to associate the new message with</param>
- /// <returns>The new message</returns>
- /// <exception cref="QpidMessagingException">if the message cannot be created</exception>
- AbstractQmsMessage CreateMessage(string mimeType);
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Message/MessageFactoryRegistry.cs b/qpid/dotnet/Qpid.Client/Client/Message/MessageFactoryRegistry.cs
deleted file mode 100644
index fdb5e14aa6..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Message/MessageFactoryRegistry.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Client.Message
-{
- public class MessageFactoryRegistry
- {
- private readonly Hashtable _mimeToFactoryMap = new Hashtable();
- private IMessageFactory _defaultFactory;
-
- /// <summary>
- /// Default factory to use for unknown message types
- /// </summary>
- public IMessageFactory DefaultFactory
- {
- get { return _defaultFactory; }
- set { _defaultFactory = value; }
- }
-
- /// <summary>
- /// Register a new message factory for a MIME type
- /// </summary>
- /// <param name="mimeType">Mime type to register</param>
- /// <param name="mf"></param>
- public void RegisterFactory(string mimeType, IMessageFactory mf)
- {
- if ( mf == null )
- throw new ArgumentNullException("mf");
- if ( mimeType == null || mimeType.Length == 0 )
- throw new ArgumentNullException("mimeType");
-
- _mimeToFactoryMap[mimeType] = mf;
- }
-
- /// <summary>
- /// Remove a message factory
- /// </summary>
- /// <param name="mimeType">MIME type to unregister</param>
- public void DeregisterFactory(string mimeType)
- {
- _mimeToFactoryMap.Remove(mimeType);
- }
-
- /// <summary>
- /// Create a message. This looks up the MIME type from the content header and instantiates the appropriate
- /// concrete message type.
- /// </summary>
- /// <param name="messageNbr">the AMQ message id</param>
- /// <param name="redelivered">true if redelivered</param>
- /// <param name="contentHeader">the content header that was received</param>
- /// <param name="bodies">a list of ContentBody instances</param>
- /// <returns>the message.</returns>
- /// <exception cref="AMQException"/>
- /// <exception cref="QpidException"/>
- public AbstractQmsMessage CreateMessage(long messageNbr, bool redelivered,
- ContentHeaderBody contentHeader,
- IList bodies)
- {
- BasicContentHeaderProperties properties = (BasicContentHeaderProperties)contentHeader.Properties;
-
- if ( properties.ContentType == null )
- {
- properties.ContentType = "";
- }
-
- IMessageFactory mf = GetFactory(properties.ContentType);
- return mf.CreateMessage(messageNbr, redelivered, contentHeader, bodies);
- }
-
- /// <summary>
- /// Create a new message of the specified type
- /// </summary>
- /// <param name="mimeType">The Mime type</param>
- /// <returns>The new message</returns>
- public AbstractQmsMessage CreateMessage(string mimeType)
- {
- if ( mimeType == null || mimeType.Length == 0 )
- throw new ArgumentNullException("mimeType");
-
- IMessageFactory mf = GetFactory(mimeType);
- return mf.CreateMessage(mimeType);
- }
-
- /// <summary>
- /// Construct a new registry with the default message factories registered
- /// </summary>
- /// <returns>a message factory registry</returns>
- public static MessageFactoryRegistry NewDefaultRegistry()
- {
- MessageFactoryRegistry mf = new MessageFactoryRegistry();
- mf.RegisterFactory("text/plain", new QpidTextMessageFactory());
- mf.RegisterFactory("text/xml", new QpidTextMessageFactory());
- mf.RegisterFactory("application/octet-stream", new QpidBytesMessageFactory());
-
- mf.DefaultFactory = new QpidBytesMessageFactory();
- return mf;
- }
-
- private IMessageFactory GetFactory(string mimeType)
- {
- IMessageFactory mf = (IMessageFactory)_mimeToFactoryMap[mimeType];
- return mf != null ? mf : _defaultFactory;
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Message/QpidBytesMessage.cs b/qpid/dotnet/Qpid.Client/Client/Message/QpidBytesMessage.cs
deleted file mode 100644
index fb3efb1b0f..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Message/QpidBytesMessage.cs
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.IO;
-using System.Runtime.Serialization;
-using System.Text;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Client.Message
-{
- [Serializable]
- class MessageEOFException : QpidException
- {
- public MessageEOFException(string message) : base(message)
- {
- }
-
- protected MessageEOFException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-
- public class QpidBytesMessage : AbstractQmsMessage, IBytesMessage
- {
- private const int DEFAULT_BUFFER_INITIAL_SIZE = 1024;
-
- public QpidBytesMessage() : this(null)
- {
- }
-
- /// <summary>
- /// Construct a bytes message with existing data.
- /// </summary>
- /// <param name="data">if data is not null, the message is immediately in read only mode. if data is null, it is in
- /// write-only mode</param>
- QpidBytesMessage(ByteBuffer data) : base(data)
- {
- // superclass constructor has instantiated a content header at this point
- if (data == null)
- {
- _data = ByteBuffer.Allocate(DEFAULT_BUFFER_INITIAL_SIZE);
- _data.IsAutoExpand = true;
- }
- }
-
- internal QpidBytesMessage(long messageNbr, ContentHeaderBody contentHeader, ByteBuffer data)
- // TODO: this casting is ugly. Need to review whole ContentHeaderBody idea
- : base(messageNbr, (BasicContentHeaderProperties)contentHeader.Properties, data)
- {
- }
-
- public override void ClearBodyImpl()
- {
- _data.Clear();
- }
-
- public override string ToBodyString()
- {
- CheckReadable();
- try
- {
- return GetText();
- }
- catch (IOException e)
- {
- throw new QpidException(e.ToString());
- }
- }
-
- private String GetText()
- {
- // this will use the default platform encoding
- if (_data == null)
- {
- return null;
- }
- int pos = _data.Position;
- _data.Rewind();
- // one byte left is for the end of frame marker
- if (_data.Remaining == 0)
- {
- // this is really redundant since pos must be zero
- _data.Position = pos;
- return null;
- }
- else
- {
- byte[] data = new byte[_data.Remaining];
- _data.GetBytes(data);
- return Encoding.UTF8.GetString(data);
- }
- }
-
- public long BodyLength
- {
- get
- {
- CheckReadable();
- return _data.Limit;
- }
- }
-
- private void CheckWritable()
- {
- if (_readableMessage)
- {
- throw new MessageNotWriteableException("You need to call clearBody() to make the message writable");
- }
- }
-
- public bool ReadBoolean()
- {
- CheckReadable();
- CheckAvailable(1);
- return _data.GetByte() != 0;
- }
-
- public byte ReadByte()
- {
- CheckReadable();
- CheckAvailable(1);
- return _data.GetByte();
- }
-
- public short ReadSignedByte()
- {
- CheckReadable();
- CheckAvailable(1);
- return _data.GetSByte();
- }
-
- public short ReadShort()
- {
- CheckReadable();
- CheckAvailable(2);
- return _data.GetInt16();
- }
-
- public char ReadChar()
- {
- CheckReadable();
- CheckAvailable(2);
- return _data.GetChar();
- }
-
- public int ReadInt()
- {
- CheckReadable();
- CheckAvailable(4);
- return _data.GetInt32();
- }
-
- public long ReadLong()
- {
- CheckReadable();
- CheckAvailable(8);
- return _data.GetInt64();
- }
-
- public float ReadFloat()
- {
- CheckReadable();
- CheckAvailable(4);
- return _data.GetFloat();
- }
-
- public double ReadDouble()
- {
- CheckReadable();
- CheckAvailable(8);
- return _data.GetDouble();
- }
-
- public string ReadUTF()
- {
- CheckReadable();
- // we check only for one byte since theoretically the string could be only a
- // single byte when using UTF-8 encoding
- CheckAvailable(1);
- try
- {
- byte[] data = new byte[_data.Remaining];
- _data.GetBytes(data);
- return Encoding.UTF8.GetString(data);
- }
- catch (IOException e)
- {
- throw new QpidException(e.ToString(), e);
- }
- }
-
- public int ReadBytes(byte[] bytes)
- {
- if (bytes == null)
- {
- throw new ArgumentNullException("bytes");
- }
- CheckReadable();
- int count = (_data.Remaining >= bytes.Length ? bytes.Length : _data.Remaining);
- if (count == 0)
- {
- return -1;
- }
- else
- {
- _data.GetBytes(bytes, 0, count);
- return count;
- }
- }
-
- public int ReadBytes(byte[] bytes, int maxLength)
- {
- if (bytes == null)
- {
- throw new ArgumentNullException("bytes");
- }
- if (maxLength > bytes.Length)
- {
- throw new ArgumentOutOfRangeException("maxLength must be >= 0");
- }
- CheckReadable();
- int count = (_data.Remaining >= maxLength ? maxLength : _data.Remaining);
- if (count == 0)
- {
- return -1;
- }
- else
- {
- _data.GetBytes(bytes, 0, count);
- return count;
- }
- }
-
- public void WriteBoolean(bool b)
- {
- CheckWritable();
- _data.Put(b ? (byte)1 : (byte)0);
- }
-
- public void WriteByte(byte b)
- {
- CheckWritable();
- _data.Put(b);
- }
-
- public void WriteShort(short i)
- {
- CheckWritable();
- _data.Put(i);
- }
-
- public void WriteChar(char c)
- {
- CheckWritable();
- _data.Put(c);
- }
-
- public void WriteSignedByte(short value)
- {
- CheckWritable();
- _data.Put(value);
- }
-
- public void WriteDouble(double value)
- {
- CheckWritable();
- _data.Put(value);
- }
-
- public void WriteFloat(float value)
- {
- CheckWritable();
- _data.Put(value);
- }
-
- public void WriteInt(int value)
- {
- CheckWritable();
- _data.Put(value);
- }
-
- public void WriteLong(long value)
- {
- CheckWritable();
- _data.Put(value);
- }
-
- public void WriteUTF(string value)
- {
- CheckWritable();
- byte[] encodedData = Encoding.UTF8.GetBytes(value);
- _data.Put(encodedData);
- }
-
- public void WriteBytes(byte[] bytes)
- {
- CheckWritable();
- _data.Put(bytes);
- }
-
- public void WriteBytes(byte[] bytes, int offset, int length)
- {
- CheckWritable();
- _data.Put(bytes, offset, length);
- }
-
- protected override void Reset()
- {
- base.Reset();
- _data.Flip();
- }
-
- void IBytesMessage.Reset()
- {
- Reset();
- }
-
- /**
- * Check that there is at least a certain number of bytes available to read
- *
- * @param len the number of bytes
- * @throws MessageEOFException if there are less than len bytes available to read
- */
- private void CheckAvailable(int len)
- {
- if (_data.Remaining < len)
- {
- throw new MessageEOFException("Unable to read " + len + " bytes");
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Message/QpidBytesMessageFactory.cs b/qpid/dotnet/Qpid.Client/Client/Message/QpidBytesMessageFactory.cs
deleted file mode 100644
index 3cc96cbddc..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Message/QpidBytesMessageFactory.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Client.Message
-{
- public class QpidBytesMessageFactory : AbstractQmsMessageFactory
- {
- //protected override AbstractQmsMessage CreateMessageWithBody(long messageNbr,
- // ContentHeaderBody contentHeader,
- // IList bodies)
- //{
- // byte[] data;
-
- // // we optimise the non-fragmented case to avoid copying
- // if (bodies != null && bodies.Count == 1)
- // {
- // data = ((ContentBody)bodies[0]).Payload;
- // }
- // else
- // {
- // data = new byte[(long)contentHeader.BodySize];
- // int currentPosition = 0;
- // foreach (ContentBody cb in bodies)
- // {
- // Array.Copy(cb.Payload, 0, data, currentPosition, cb.Payload.Length);
- // currentPosition += cb.Payload.Length;
- // }
- // }
-
- // return new QpidBytesMessage(messageNbr, data, contentHeader);
- //}
-
- //public override AbstractQmsMessage CreateMessage()
- //{
- // return new QpidBytesMessage();
- //}
-
- protected override AbstractQmsMessage CreateMessage(long deliveryTag, ByteBuffer data, ContentHeaderBody contentHeader)
- {
- return new QpidBytesMessage(deliveryTag, contentHeader, data);
- }
-
- public override AbstractQmsMessage CreateMessage(string mimeType)
- {
- QpidBytesMessage msg = new QpidBytesMessage();
- msg.ContentType = mimeType;
- return msg;
- }
-
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Message/QpidHeaders.cs b/qpid/dotnet/Qpid.Client/Client/Message/QpidHeaders.cs
deleted file mode 100644
index 9ad1c26867..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Message/QpidHeaders.cs
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Text;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Client.Message
-{
- internal class QpidHeaders : IHeaders
- {
- private FieldTable _headers;
-
- public QpidHeaders(FieldTable headers)
- {
- if ( headers == null )
- throw new ArgumentNullException("headers");
- _headers = headers;
- }
-
- public bool Contains(string name)
- {
- CheckPropertyName(name);
- return _headers.Contains(name);
- }
-
- public void Clear()
- {
- _headers.Clear();
- }
-
- public object this[string name]
- {
- get { return GetObject(name); }
- set { SetObject(name, value); }
- }
-
- public bool GetBoolean(string name)
- {
- CheckPropertyName(name);
- if ( Contains(name) )
- return _headers.GetBoolean(name);
- return false;
- }
-
- public void SetBoolean(string name, bool b)
- {
- CheckPropertyName(name);
- _headers.SetBoolean(name, b);
- }
-
- public byte GetByte(string propertyName)
- {
- CheckPropertyName(propertyName);
- if ( Contains(propertyName) )
- return _headers.GetByte(propertyName);
- return 0;
- }
-
- public void SetByte(string propertyName, byte b)
- {
- CheckPropertyName(propertyName);
- _headers.SetByte(propertyName, b);
- }
-
- // we have sbyte overloads to interoperate with java
- // because the Java client/server uses signed bytes
- // by default, while C#'s is unsigned
- public sbyte GetSByte(string propertyName)
- {
- CheckPropertyName(propertyName);
- if ( Contains(propertyName) )
- return _headers.GetSByte(propertyName);
- return 0;
- }
-
- public void SetSByte(string propertyName, sbyte b)
- {
- CheckPropertyName(propertyName);
- _headers.SetSByte(propertyName, b);
- }
-
- public short GetShort(string propertyName)
- {
- CheckPropertyName(propertyName);
- if ( Contains(propertyName) )
- return _headers.GetInt16(propertyName);
- return 0;
- }
-
- public void SetShort(string propertyName, short i)
- {
- CheckPropertyName(propertyName);
- _headers.SetInt16(propertyName, i);
- }
-
- public int GetInt(string propertyName)
- {
- CheckPropertyName(propertyName);
- if ( Contains(propertyName) )
- return _headers.GetInt32(propertyName);
- return 0;
- }
-
- public void SetInt(string propertyName, int i)
- {
- CheckPropertyName(propertyName);
- _headers.SetInt32(propertyName, i);
- }
-
- public long GetLong(string propertyName)
- {
- CheckPropertyName(propertyName);
- if ( Contains(propertyName) )
- return _headers.GetInt64(propertyName);
- return 0;
- }
-
- public void SetLong(string propertyName, long l)
- {
- CheckPropertyName(propertyName);
- _headers.SetInt64(propertyName, l);
- }
-
- public float GetFloat(String propertyName)
- {
- CheckPropertyName(propertyName);
- if ( Contains(propertyName) )
- return _headers.GetFloat(propertyName);
- return 0f;
- }
-
- public void SetFloat(string propertyName, float f)
- {
- CheckPropertyName(propertyName);
- _headers.SetFloat(propertyName, f);
- }
-
- public double GetDouble(string propertyName)
- {
- CheckPropertyName(propertyName);
- if ( Contains(propertyName) )
- return _headers.GetDouble(propertyName);
- return 0;
- }
-
- public void SetDouble(string propertyName, double v)
- {
- CheckPropertyName(propertyName);
- _headers.SetDouble(propertyName, v);
- }
-
- public string GetString(string propertyName)
- {
- CheckPropertyName(propertyName);
- return _headers.GetString(propertyName);
- }
-
- public void SetString(string propertyName, string value)
- {
- CheckPropertyName(propertyName);
- _headers.SetString(propertyName, value);
- }
-
- public object GetObject(string propertyName)
- {
- CheckPropertyName(propertyName);
- return _headers[propertyName];
- }
-
- public void SetObject(string propertyName, object value)
- {
- CheckPropertyName(propertyName);
- _headers[propertyName] = value;
- }
-
- private static void CheckPropertyName(string propertyName)
- {
- if ( propertyName == null )
- {
- throw new ArgumentException("Property name must not be null");
- } else if ( "".Equals(propertyName) )
- {
- throw new ArgumentException("Property name must not be the empty string");
- }
- }
-
- public override string ToString()
- {
- StringBuilder buf = new StringBuilder("{");
- int i = 0;
- foreach ( DictionaryEntry entry in _headers )
- {
- ++i;
- if ( i > 1 )
- {
- buf.Append(", ");
- }
- string propertyName = (string)entry.Key;
- if ( propertyName == null )
- {
- buf.Append("\nInternal error: Property with NULL key defined");
- } else
- {
- buf.Append(propertyName);
- buf.Append(" = ").Append(entry.Value);
- }
- }
- buf.Append("}");
- return buf.ToString();
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Message/QpidTextMessage.cs b/qpid/dotnet/Qpid.Client/Client/Message/QpidTextMessage.cs
deleted file mode 100644
index 24aef92aa5..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Message/QpidTextMessage.cs
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Text;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Client.Message
-{
- public class QpidTextMessage : AbstractQmsMessage, ITextMessage
- {
- private string _decodedValue = null;
- private static Encoding DEFAULT_ENCODING = Encoding.UTF8;
-
- internal QpidTextMessage() : this(null, null)
- {
- ContentEncoding = DEFAULT_ENCODING.BodyName;
- }
-
- internal QpidTextMessage(ByteBuffer data, String encoding) : base(data)
- {
- ContentEncoding = encoding;
- }
-
- internal QpidTextMessage(long deliveryTag, BasicContentHeaderProperties contentHeader, ByteBuffer data)
- :base(deliveryTag, contentHeader, data)
- {
- }
-
- public override void ClearBodyImpl()
- {
- if (_data != null)
- {
- _data.Release();
- }
- _data = null;
- _decodedValue = null;
- }
-
- public override string ToBodyString()
- {
- return Text;
- }
-
- public string Text
- {
- get
- {
- if (_data == null && _decodedValue == null)
- {
- return null;
- }
- else if (_decodedValue != null)
- {
- return _decodedValue;
- }
- else
- {
- _data.Rewind();
-
- // Read remaining bytes.
- byte[] bytes = new byte[_data.Remaining];
- _data.GetBytes(bytes);
-
- // Convert to string based on encoding.
- if (ContentHeaderProperties.Encoding != null)
- {
- // throw ArgumentException if the encoding is not supported
- _decodedValue = Encoding.GetEncoding(ContentHeaderProperties.Encoding).GetString(bytes);
- }
- else
- {
- _decodedValue = DEFAULT_ENCODING.GetString(bytes);
- }
- return _decodedValue;
- }
- }
-
- set
- {
- byte[] bytes;
- if (ContentHeaderProperties.Encoding == null)
- {
- bytes = Encoding.Default.GetBytes(value);
- }
- else
- {
- // throw ArgumentException if the encoding is not supported
- bytes = Encoding.GetEncoding(ContentHeaderProperties.Encoding).GetBytes(value);
- }
- _data = ByteBuffer.Wrap(bytes);
- _decodedValue = value;
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Message/QpidTextMessageFactory.cs b/qpid/dotnet/Qpid.Client/Client/Message/QpidTextMessageFactory.cs
deleted file mode 100644
index 79871e85ca..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Message/QpidTextMessageFactory.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Message
-{
- public class QpidTextMessageFactory : AbstractQmsMessageFactory
- {
- public override AbstractQmsMessage CreateMessage(string mimeType)
- {
- QpidTextMessage msg = new QpidTextMessage();
- msg.ContentType = mimeType;
- return msg;
- }
-
- protected override AbstractQmsMessage CreateMessage(long deliveryTag, ByteBuffer data, ContentHeaderBody contentHeader)
- {
- return new QpidTextMessage(deliveryTag, (BasicContentHeaderProperties) contentHeader.Properties, data);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Message/UnexpectedBodyReceivedException.cs b/qpid/dotnet/Qpid.Client/Client/Message/UnexpectedBodyReceivedException.cs
deleted file mode 100644
index 4317ef3474..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Message/UnexpectedBodyReceivedException.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-using log4net;
-
-namespace Apache.Qpid.Client.Message
-{
- /// <summary>
- /// Raised when a message body is received unexpectedly by the client. This typically occurs when the
- /// length of bodies received does not match with the declared length in the content header.
- /// </summary>
- [Serializable]
- public class UnexpectedBodyReceivedException : AMQException
- {
- public UnexpectedBodyReceivedException(ILog logger, string msg, Exception t)
- : base(logger, msg, t)
- {
- }
-
- public UnexpectedBodyReceivedException(ILog logger, string msg)
- : base(logger, msg)
- {
- }
-
- public UnexpectedBodyReceivedException(ILog logger, int errorCode, string msg)
- : base(logger, errorCode, msg)
- {
- }
-
- protected UnexpectedBodyReceivedException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
-
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Message/UnprocessedMessage.cs b/qpid/dotnet/Qpid.Client/Client/Message/UnprocessedMessage.cs
deleted file mode 100644
index d329712334..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Message/UnprocessedMessage.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Collections;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Message
-{
- public class UnprocessedMessage
- {
- private ulong _bytesReceived = 0;
-
- public BasicDeliverBody DeliverBody;
- public BasicReturnBody BounceBody;
- public ushort ChannelId;
- public ContentHeaderBody ContentHeader;
-
- /// <summary>
- /// List of ContentBody instances. Due to fragmentation you don't know how big this will be in general
- /// </summary>
- /// TODO: write and use linked list class
- public IList Bodies = new ArrayList();
-
- public void ReceiveBody(ContentBody body)
- {
- Bodies.Add(body);
- if (body.Payload != null)
- {
- _bytesReceived += (uint)body.Payload.Remaining;
- }
- }
-
- public bool IsAllBodyDataReceived()
- {
- return _bytesReceived == ContentHeader.BodySize;
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Protocol/AMQMethodEvent.cs b/qpid/dotnet/Qpid.Client/Client/Protocol/AMQMethodEvent.cs
deleted file mode 100644
index a7ce808862..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Protocol/AMQMethodEvent.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Text;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Protocol
-{
- public class AMQMethodEvent
- {
- private AMQMethodBody _method;
-
- private ushort _channelId;
-
- private AMQProtocolSession _protocolSession;
-
- public AMQMethodEvent(ushort channelId, AMQMethodBody method, AMQProtocolSession protocolSession)
- {
- _channelId = channelId;
- _method = method;
- _protocolSession = protocolSession;
- }
-
- public AMQMethodBody Method
- {
- get
- {
- return _method;
- }
- }
-
- public ushort ChannelId
- {
- get
- {
- return _channelId;
- }
- }
-
- public AMQProtocolSession ProtocolSession
- {
- get
- {
- return _protocolSession;
- }
- }
-
- public override String ToString()
- {
- StringBuilder buf = new StringBuilder("Method event: ");
- buf.Append("\nChannel id: ").Append(_channelId);
- buf.Append("\nMethod: ").Append(_method);
- return buf.ToString();
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Protocol/AMQProtocolListener.cs b/qpid/dotnet/Qpid.Client/Client/Protocol/AMQProtocolListener.cs
deleted file mode 100644
index c51538b70e..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Protocol/AMQProtocolListener.cs
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Threading;
-using log4net;
-using Apache.Qpid.Client.Failover;
-using Apache.Qpid.Client.Protocol.Listener;
-using Apache.Qpid.Client.State;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Protocol
-{
- /// <summary>
- /// AMQProtocolListener
- ///
- /// <p/>Fail-over state transition rules...
- ///
- /// <p/>The failover handler is created when the session is created since it needs a reference to the IoSession in order
- /// to be able to send errors during failover back to the client application. The session won't be available in the case
- /// when failing over due to a Connection.Redirect message from the broker.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Track fail over state of a connection.
- /// <tr><td> Manage method listeners. <td> IAMQMethodListener
- /// <tr><td> Receive notification of all IO errors on a connection. <td> IoHandler
- /// <tr><td> Inform method listeners of all method events on a connection. <td> IAMQMethodListener
- /// <tr><td> Inform method listeners of all error events on a connection. <td> IAMQMethodListener
- /// </table>
- ///
- /// <b>Todo:</b> The broker will close the connection with no warning if authentication fails. This may result in the fail-over process being
- /// triggered, when it should not be.
- ///
- /// </summary>
- public class AMQProtocolListener : IProtocolListener
- {
- /// <summary>Used for debugging.</summary>
- private static readonly ILog _log = LogManager.GetLogger(typeof(AMQProtocolListener));
-
- /// <summary>
- /// Holds the failover handler for the connection. When a failure is detected, and the current failover state allows it,
- /// the failover process is handed off to this handler.
- /// </summary>
- private FailoverHandler _failoverHandler;
-
- /// <summary>Tracks the current fail-over state.</summary>
- internal FailoverState _failoverState = FailoverState.NOT_STARTED;
-
- internal FailoverState FailoverState
- {
- get { return _failoverState; }
- set { _failoverState = value; }
- }
-
- internal ManualResetEvent FailoverLatch;
-
- AMQConnection _connection;
- AMQStateManager _stateManager;
-
- public AMQStateManager StateManager
- {
- get { return _stateManager; }
- set { _stateManager = value; }
- }
-
- private readonly ArrayList _frameListeners = ArrayList.Synchronized(new ArrayList());
-
- AMQProtocolSession _protocolSession = null;
-
- private readonly Object _lock = new Object();
-
- public AMQProtocolSession ProtocolSession { set { _protocolSession = value; } }
-
- public AMQProtocolListener(AMQConnection connection, AMQStateManager stateManager)
- {
- _connection = connection;
- _stateManager = stateManager;
- _failoverHandler = new FailoverHandler(connection);
- }
-
- public void OnMessage(IDataBlock message)
- {
- // Handle incorrect protocol version.
- if (message is ProtocolInitiation)
- {
- string error = String.Format("Protocol mismatch - {0}", message.ToString());
- AMQException e = new AMQProtocolHeaderException(error);
- _log.Error("Closing connection because of protocol mismatch", e);
- //_protocolSession.CloseProtocolSession();
- _stateManager.Error(e);
- return;
- }
-
- AMQFrame frame = (AMQFrame)message;
-
- if (frame.BodyFrame is AMQMethodBody)
- {
- if (_log.IsDebugEnabled)
- {
- _log.Debug("Method frame received: " + frame);
- }
- AMQMethodEvent evt = new AMQMethodEvent(frame.Channel, (AMQMethodBody)frame.BodyFrame, _protocolSession);
- try
- {
- bool wasAnyoneInterested = false;
- lock (_frameListeners.SyncRoot)
- {
- foreach (IAMQMethodListener listener in _frameListeners)
- {
- wasAnyoneInterested = listener.MethodReceived(evt) || wasAnyoneInterested;
- }
- }
- if (!wasAnyoneInterested)
- {
- throw new AMQException("AMQMethodEvent " + evt + " was not processed by any listener.");
- }
- }
- catch (Exception e)
- {
- foreach (IAMQMethodListener listener in _frameListeners)
- {
- listener.Error(e);
- }
- }
- }
- else if (frame.BodyFrame is ContentHeaderBody)
- {
- _protocolSession.MessageContentHeaderReceived(frame.Channel,
- (ContentHeaderBody)frame.BodyFrame);
- }
- else if (frame.BodyFrame is ContentBody)
- {
- _protocolSession.MessageContentBodyReceived(frame.Channel,
- (ContentBody)frame.BodyFrame);
- }
- else if (frame.BodyFrame is HeartbeatBody)
- {
- _log.Debug("HeartBeat received");
- }
- }
-
- /// <summary>
- /// Receives notification of any IO exceptions on the connection.
- ///
- /// <p/>Upon receipt of a connection closed exception or any IOException, the fail-over process is attempted. If the fail-over fails, then
- /// all method listeners and the application connection object are notified of the connection failure exception.
- ///
- /// <p/>All other exception types are propagated to all method listeners.
- /// </summary>
- public void OnException(Exception cause)
- {
- _log.Warn("public void OnException(Exception cause = " + cause + "): called");
-
- // Ensure that the method listener set cannot be changed whilst this exception is propagated to all listeners. This also
- // ensures that this exception is fully propagated to all listeners, before another one can be processed.
- lock (_lock)
- {
- if (cause is AMQConnectionClosedException || cause is System.IO.IOException)
- {
- // Try a fail-over because the connection has failed.
- FailoverState failoverState = AttemptFailover();
-
- // Check if the fail-over has failed, in which case notify all method listeners of the exception.
- // The application connection object is also notified of the failure of the connection with the exception.
- if (failoverState == FailoverState.FAILED)
- {
- _log.Debug("Fail-over has failed. Notifying all method listeners of the exception.");
-
- AMQException amqe = new AMQException("Protocol handler error: " + cause, cause);
- PropagateExceptionToWaiters(amqe);
- _connection.ExceptionReceived(cause);
- }
- }
- // Notify all method listeners of the exception.
- else
- {
- PropagateExceptionToWaiters(cause);
- _connection.ExceptionReceived(cause);
- }
- }
- }
-
- /// <summary>
- /// Tries to fail-over the connection, if the connection policy will permit it, and the fail-over process has not yet been
- /// started. If the connection does not allow fail-over then an exception will be raised. If a fail-over is already in progress
- /// this method allows it to continue to run and will do nothing.
- ///
- /// <p/>This method should only be called when the connection has been remotely closed.
- /// </summary>
- ///
- /// <returns>The fail-over state at the end of this attempt.</returns>
- private FailoverState AttemptFailover()
- {
- _log.Debug("private void AttemptFailover(): called");
- _log.Debug("_failoverState = " + _failoverState);
-
- // Ensure that the connection stops sending heart beats, if it still is.
- _connection.StopHeartBeatThread();
-
- // Check that the connection policy allows fail-over to be attempted.
- if (!_connection.IsFailoverAllowed)
- {
- _log.Debug("Connection does not allowed to failover");
- _connection.ExceptionReceived(
- new AMQDisconnectedException("Broker closed connection and reconnection is not permitted."));
- }
-
- // Check if connection was closed deliberately by the application, in which case no fail-over is attempted.
- if (_connection.Closed)
- {
- return _failoverState;
- }
-
- // If the connection allows fail-over and fail-over has not yet been started, then it is started and the fail-over state is
- // advanced to 'in progress'
- if (_failoverState == FailoverState.NOT_STARTED && _connection.IsFailoverAllowed)
- {
- _log.Info("Starting the fail-over process.");
-
- _failoverState = FailoverState.IN_PROGRESS;
- StartFailoverThread();
- }
-
- return _failoverState;
- }
-
- /// <summary>
- /// There are two cases where we have other threads potentially blocking for events to be handled by this
- /// class. These are for the state manager (waiting for a state change) or a frame listener (waiting for a
- /// particular type of frame to arrive). When an error occurs we need to notify these waiters so that they can
- /// react appropriately.
- ///
- /// <param name="e">the exception to propagate</param>
- /// </summary>
- public void PropagateExceptionToWaiters(Exception e)
- {
- // FIXME: not sure if required as StateManager is in _frameListeners. Probably something to do with fail-over.
- _stateManager.Error(e);
- lock ( _lock )
- {
- foreach ( IAMQMethodListener listener in _frameListeners )
- {
- listener.Error(e);
- }
- }
- }
-
- public void AddFrameListener(IAMQMethodListener listener)
- {
- lock ( _lock )
- {
- _frameListeners.Add(listener);
- }
- }
-
- public void RemoveFrameListener(IAMQMethodListener listener)
- {
- if (_log.IsDebugEnabled)
- {
- _log.Debug("Removing frame listener: " + listener.ToString());
- }
- lock ( _lock )
- {
- _frameListeners.Remove(listener);
- }
- }
-
- public void BlockUntilNotFailingOver()
- {
- if (FailoverLatch != null)
- {
- FailoverLatch.WaitOne();
- }
- }
-
- /// <summary>
- /// "Failover" for redirection.
- /// </summary>
- /// <param name="host"></param>
- /// <param name="port"></param>
- public void Failover(string host, int port)
- {
- _failoverHandler.setHost(host);
- _failoverHandler.setPort(port);
- // see javadoc for FailoverHandler to see rationale for separate thread
- StartFailoverThread();
- }
-
- private void StartFailoverThread()
- {
- Thread failoverThread = new Thread(new ThreadStart(_failoverHandler.Run));
- failoverThread.Name = "Failover";
- // Do not inherit daemon-ness from current thread as this can be a daemon
- // thread such as a AnonymousIoService thread.
- failoverThread.IsBackground = false;
- failoverThread.Start();
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs b/qpid/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs
deleted file mode 100644
index 1fb3d407eb..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Protocol/AMQProtocolSession.cs
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using log4net;
-using Apache.Qpid.Client.Message;
-using Apache.Qpid.Client.Transport;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Sasl;
-
-namespace Apache.Qpid.Client.Protocol
-{
- public class AMQProtocolSession
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(AMQProtocolSession));
-
- private readonly IProtocolWriter _protocolWriter;
- private readonly IConnectionCloser _connectionCloser;
-
- /// <summary>
- /// Maps from the channel id to the AmqChannel that it represents.
- /// </summary>
- //private ConcurrentMap _channelId2SessionMap = new ConcurrentHashMap();
- private Hashtable _channelId2SessionMap = Hashtable.Synchronized(new Hashtable());
-
- //private ConcurrentMap _closingChannels = new ConcurrentHashMap();
- private Hashtable _closingChannels = Hashtable.Synchronized(new Hashtable());
-
- /// <summary>
- /// Maps from a channel id to an unprocessed message. This is used to tie together the
- /// JmsDeliverBody (which arrives first) with the subsequent content header and content bodies.
- /// </summary>
- //private ConcurrentMap _channelId2UnprocessedMsgMap = new ConcurrentHashMap();
- private Hashtable _channelId2UnprocessedMsgMap = Hashtable.Synchronized(new Hashtable());
-
- private AMQConnection _connection;
-
- public string ClientID { get { return _connection.ClientID; } }
-
- public AMQProtocolSession(IProtocolWriter protocolWriter, IConnectionCloser connectionCloser, AMQConnection connection)
- {
- _protocolWriter = protocolWriter;
- _connectionCloser = connectionCloser;
- _connection = connection;
- }
-
- public void Init()
- {
- // start the process of setting up the connection. This is the first place that
- // data is written to the server.
- _protocolWriter.Write(new ProtocolInitiation());
- }
-
- public string Username
- {
- get
- {
- return AMQConnection.Username;
- }
- }
-
- public string Password
- {
- get
- {
- return AMQConnection.Password;
- }
- }
-
- ConnectionTuneParameters _connectionTuneParameters; // TODO: should be able to have this in the Java too.
-
- public ConnectionTuneParameters ConnectionTuneParameters
- {
- get
- {
- return _connectionTuneParameters;
- }
- set
- {
- _connectionTuneParameters = value;
- AMQConnection con = AMQConnection;
- con.SetMaximumChannelCount(value.ChannelMax);
- con.MaximumFrameSize = value.FrameMax;
- }
- }
-
- private ISaslClient _saslClient;
- public ISaslClient SaslClient
- {
- get { return _saslClient; }
- set { _saslClient = value; }
- }
-
- /// <summary>
- /// Callback invoked from the BasicDeliverMethodHandler when a message has been received.
- /// This is invoked on the MINA dispatcher thread.
- /// </summary>
- /// <param name="message">the unprocessed message</param>
- /// <exception cname="AMQException">if this was not expected</exception>
- public void UnprocessedMessageReceived(UnprocessedMessage message)
- {
- _channelId2UnprocessedMsgMap[message.ChannelId] = message;
- }
-
- public void MessageContentHeaderReceived(ushort channelId, ContentHeaderBody contentHeader)
- {
- UnprocessedMessage msg = (UnprocessedMessage) _channelId2UnprocessedMsgMap[channelId];
- if (msg == null)
- {
- throw new AMQException("Error: received content header without having received a JMSDeliver frame first");
- }
- if (msg.ContentHeader != null)
- {
- throw new AMQException("Error: received duplicate content header or did not receive correct number of content body frames");
- }
- msg.ContentHeader = contentHeader;
- if (contentHeader.BodySize == 0)
- {
- DeliverMessageToAMQSession(channelId, msg);
- }
- }
-
- public void MessageContentBodyReceived(ushort channelId, ContentBody contentBody)
- {
- UnprocessedMessage msg = (UnprocessedMessage) _channelId2UnprocessedMsgMap[channelId];
- if (msg == null)
- {
- throw new AMQException("Error: received content body without having received a BasicDeliver frame first");
- }
- if (msg.ContentHeader == null)
- {
- _channelId2UnprocessedMsgMap.Remove(channelId);
- throw new AMQException("Error: received content body without having received a ContentHeader frame first");
- }
- try
- {
- msg.ReceiveBody(contentBody);
- }
- catch (UnexpectedBodyReceivedException e)
- {
- _channelId2UnprocessedMsgMap.Remove(channelId);
- throw e;
- }
- if (msg.IsAllBodyDataReceived())
- {
- DeliverMessageToAMQSession(channelId, msg);
- }
- }
-
- /// <summary>
- /// Deliver a message to the appropriate session, removing the unprocessed message
- /// from our map
- /// <param name="channelId">the channel id the message should be delivered to</param>
- /// <param name="msg"> the message</param>
- private void DeliverMessageToAMQSession(ushort channelId, UnprocessedMessage msg)
- {
- AmqChannel channel = (AmqChannel) _channelId2SessionMap[channelId];
- channel.MessageReceived(msg);
- _channelId2UnprocessedMsgMap.Remove(channelId);
- }
-
- /// <summary>
- /// Convenience method that writes a frame to the protocol session. Equivalent
- /// to calling getProtocolSession().write().
- /// </summary>
- /// <param name="frame">the frame to write</param>
- public void WriteFrame(IDataBlock frame)
- {
- _protocolWriter.Write(frame);
- }
-
- public void AddSessionByChannel(ushort channelId, AmqChannel channel)
- {
- if (channel == null)
- {
- throw new ArgumentNullException("Attempt to register a null channel");
- }
- _logger.Debug("Add channel with channel id " + channelId);
- _channelId2SessionMap[channelId] = channel;
- }
-
- public void RemoveSessionByChannel(ushort channelId)
- {
- _logger.Debug("Removing session with channelId " + channelId);
- _channelId2SessionMap.Remove(channelId);
- }
-
- /// <summary>
- /// Starts the process of closing a channel
- /// </summary>
- /// <param name="channel" the AmqChannel being closed</param>
- public void CloseSession(AmqChannel channel)
- {
- _logger.Debug("closeSession called on protocol channel for channel " + channel.ChannelId);
- ushort channelId = channel.ChannelId;
-
- // we need to know when a channel is closing so that we can respond
- // with a channel.close frame when we receive any other type of frame
- // on that channel
- _closingChannels[channelId] = channel;
-
- }
-
- /// <summary>
- /// Called from the ChannelClose handler when a channel close frame is received.
- /// This method decides whether this is a response or an initiation. The latter
- /// case causes the AmqChannel to be closed and an exception to be thrown if
- /// appropriate.
- /// </summary>
- /// <param name="channelId">the id of the channel (session)</param>
- /// <returns>true if the client must respond to the server, i.e. if the server
- /// initiated the channel close, false if the channel close is just the server
- /// responding to the client's earlier request to close the channel.</returns>
- public bool ChannelClosed(ushort channelId, int code, string text)
- {
- // if this is not a response to an earlier request to close the channel
- if (!_closingChannels.ContainsKey(channelId))
- {
- _closingChannels.Remove(channelId);
- AmqChannel channel = (AmqChannel) _channelId2SessionMap[channelId];
- channel.ClosedWithException(new AMQException(_logger, code, text));
- return true;
- }
- else
- {
- return false;
- }
- }
-
- public AMQConnection AMQConnection
- {
- get
- {
- return _connection;
- }
- }
-
- public void CloseProtocolSession()
- {
- _logger.Debug("Closing protocol session");
- _connectionCloser.Close();
- }
-
- internal string GenerateQueueName()
- {
- return "ntmp_" + System.Guid.NewGuid();
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Protocol/DefaultTimeouts.cs b/qpid/dotnet/Qpid.Client/Client/Protocol/DefaultTimeouts.cs
deleted file mode 100644
index 2f23a1571d..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Protocol/DefaultTimeouts.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Text;
-
-namespace Apache.Qpid.Client.Protocol
-{
- /// <summary>
- /// Default timeout values for the protocol
- /// </summary>
- sealed class DefaultTimeouts
- {
- /// <summary>
- /// Maximum number of milliseconds to wait for a state change
- /// in the protocol's state machine
- /// </summary>
- public const int MaxWaitForState = 30* 1000;
- /// <summary>
- /// Maximum number of milliseconds to wait for a reply
- /// frame when doing synchronous writer to the broker
- /// </summary>
- public const int MaxWaitForSyncWriter = 30 * 1000;
-
- private DefaultTimeouts()
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Protocol/IConnectionCloser.cs b/qpid/dotnet/Qpid.Client/Client/Protocol/IConnectionCloser.cs
deleted file mode 100644
index e3298200c4..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Protocol/IConnectionCloser.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Client.Protocol
-{
- public interface IConnectionCloser
- {
- void Close();
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Protocol/IProtocolListener.cs b/qpid/dotnet/Qpid.Client/Client/Protocol/IProtocolListener.cs
deleted file mode 100644
index 3b53f015f8..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Protocol/IProtocolListener.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using Apache.Qpid.Client.Protocol.Listener;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Protocol
-{
- public interface IProtocolListener
- {
- void OnMessage(IDataBlock message);
- void OnException(Exception e);
-
- // XXX: .NET way of doing listeners?
- void AddFrameListener(IAMQMethodListener listener);
- void RemoveFrameListener(IAMQMethodListener listener);
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Protocol/Listener/BlockingMethodFrameListener.cs b/qpid/dotnet/Qpid.Client/Client/Protocol/Listener/BlockingMethodFrameListener.cs
deleted file mode 100644
index 9cc9f8cee5..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Protocol/Listener/BlockingMethodFrameListener.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Protocol.Listener
-{
- public abstract class BlockingMethodFrameListener : IAMQMethodListener
- {
- private ManualResetEvent _resetEvent;
-
- public abstract bool ProcessMethod(ushort channelId, AMQMethodBody frame);
-
- /// <summary>
- /// This is set if there is an exception thrown from processCommandFrame and the
- /// exception is rethrown to the caller of blockForFrame()
- /// </summary>
- private volatile Exception _error;
-
- protected ushort _channelId;
-
- protected AMQMethodEvent _doneEvt = null;
-
- public BlockingMethodFrameListener(ushort channelId)
- {
- _channelId = channelId;
- _resetEvent = new ManualResetEvent(false);
- }
-
- /// <summary>
- /// This method is called by the MINA dispatching thread. Note that it could
- /// be called before BlockForFrame() has been called.
- /// </summary>
- /// <param name="evt">the frame event</param>
- /// <returns>true if the listener has dealt with this frame</returns>
- /// <exception cref="AMQException"></exception>
- public bool MethodReceived(AMQMethodEvent evt)
- {
- AMQMethodBody method = evt.Method;
-
- try
- {
- bool ready = (evt.ChannelId == _channelId) && ProcessMethod(evt.ChannelId, method);
- if (ready)
- {
- _doneEvt = evt;
- _resetEvent.Set();
- }
-
- return ready;
- }
- catch (AMQException e)
- {
- Error(e);
- // we rethrow the error here, and the code in the frame dispatcher will go round
- // each listener informing them that an exception has been thrown
- throw e;
- }
- }
-
- /// <summary>
- /// This method is called by the thread that wants to wait for a frame.
- /// </summary>
- /// <param name="timeout">Set the number of milliseconds to wait</param>
- public AMQMethodEvent BlockForFrame(int timeout)
- {
- _resetEvent.WaitOne(timeout, true);
- //at this point the event will have been signalled. The error field might or might not be set
- // depending on whether an error occurred
- if (_error != null)
- {
- throw _error;
- }
-
- return _doneEvt;
- }
-
- /// <summary>
- /// This is a callback, called by the MINA dispatcher thread only. It is also called from within this
- /// class to avoid code repetition but again is only called by the MINA dispatcher thread.
- /// </summary>
- /// <param name="e">the exception that caused the error</param>
- public void Error(Exception e)
- {
- // set the error so that the thread that is blocking (in BlockForFrame())
- // can pick up the exception and rethrow to the caller
- _error = e;
- _resetEvent.Set();
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Protocol/Listener/IAMQMethodListener.cs b/qpid/dotnet/Qpid.Client/Client/Protocol/Listener/IAMQMethodListener.cs
deleted file mode 100644
index b5450d00f7..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Protocol/Listener/IAMQMethodListener.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Client.Protocol.Listener
-{
- public interface IAMQMethodListener
- {
- /// <summary>
- /// Invoked when a method frame has been received
- /// <param name="evt">the event</param>
- /// <returns>true if the handler has processed the method frame, false otherwise. Note
- /// that this does not prohibit the method event being delivered to subsequent listeners
- /// but can be used to determine if nobody has dealt with an incoming method frame.</param>
- /// <exception cname="AMQException">if an error has occurred. This exception will be delivered
- /// to all registered listeners using the error() method (see below) allowing them to
- /// perform cleanup if necessary.</exception>
- bool MethodReceived(AMQMethodEvent evt);
-
- /// <summary>
- /// Callback when an error has occurred. Allows listeners to clean up.
- /// </summary>
- /// <param name="e">the exception</param>
- void Error(Exception e);
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Protocol/Listener/SpecificMethodFrameListener.cs b/qpid/dotnet/Qpid.Client/Client/Protocol/Listener/SpecificMethodFrameListener.cs
deleted file mode 100644
index 8cdc1dbba9..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Protocol/Listener/SpecificMethodFrameListener.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Protocol.Listener
-{
- public class SpecificMethodFrameListener : BlockingMethodFrameListener
- {
- private readonly Type _expectedClass;
-
- public SpecificMethodFrameListener(ushort channelId, Type expectedClass) : base(channelId)
- {
- _expectedClass = expectedClass;
- }
-
- public override bool ProcessMethod(ushort channelId, AMQMethodBody frame)
- {
- return _expectedClass.IsInstanceOfType(frame);
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Protocol/ProtocolWriter.cs b/qpid/dotnet/Qpid.Client/Client/Protocol/ProtocolWriter.cs
deleted file mode 100644
index 11918f1ea2..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Protocol/ProtocolWriter.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using Apache.Qpid.Client.Protocol.Listener;
-using Apache.Qpid.Client.Transport;
-using Apache.Qpid.Framing;
-
-using log4net;
-
-namespace Apache.Qpid.Client.Protocol
-{
- /// <summary>
- /// A convenient interface to writing protocol frames.
- /// </summary>
- public class ProtocolWriter
- {
-
- private ILog _logger = LogManager.GetLogger(typeof(ProtocolWriter));
-
- IProtocolWriter _protocolWriter;
- IProtocolListener _protocolListener;
-
- public ProtocolWriter(IProtocolWriter protocolWriter, IProtocolListener protocolListener)
- {
- _protocolWriter = protocolWriter;
- _protocolListener = protocolListener;
- }
-
- public void WriteFrame(IDataBlock frame)
- {
- _protocolWriter.Write(frame);
- }
-
- /// <summary>
- /// Convenience method that writes a frame to the protocol session and waits for
- /// a particular response. Equivalent to calling getProtocolSession().write() then
- /// waiting for the response.
- /// </summary>
- /// <param name="frame">the frame</param>
- /// <param name="listener">the blocking listener. Note the calling thread will block.</param>
- /// <param name="timeout">set the number of milliseconds to wait</param>
- private AMQMethodEvent SyncWrite(AMQFrame frame, BlockingMethodFrameListener listener, int timeout)
- {
- try
- {
- _protocolListener.AddFrameListener(listener);
- _protocolWriter.Write(frame);
-
- return listener.BlockForFrame(timeout);
- }
- finally
- {
- _protocolListener.RemoveFrameListener(listener);
- }
- // When control resumes before this line, a reply will have been received
- // that matches the criteria defined in the blocking listener
- }
-
- /// <summary>
- /// Convenience method that writes a frame to the protocol session and waits for
- /// a particular response. Equivalent to calling getProtocolSession().write() then
- /// waiting for the response.
- /// </summary>
- /// <param name="frame">the frame</param>
- /// <param name="responseType">the type of method response</param>
- public AMQMethodEvent SyncWrite(AMQFrame frame, Type responseType)
- {
- // TODO: If each frame knew it's response type, then the responseType argument would
- // TODO: not be neccesary.
- return SyncWrite(frame, responseType, DefaultTimeouts.MaxWaitForSyncWriter);
- }
-
- /// <summary>
- /// Convenience method that writes a frame to the protocol session and waits for
- /// a particular response. Equivalent to calling getProtocolSession().write() then
- /// waiting for the response.
- /// </summary>
- /// <param name="frame">the frame</param>
- /// <param name="responseType">the type of method response</param>
- /// <param name="timeout">set the number of milliseconds to wait</param>
- /// <returns>set the number of milliseconds to wait</returns>
- public AMQMethodEvent SyncWrite(AMQFrame frame, Type responseType, int timeout)
- {
- return SyncWrite(frame, new SpecificMethodFrameListener(frame.Channel, responseType), timeout);
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/QpidConnectionInfo.cs b/qpid/dotnet/Qpid.Client/Client/QpidConnectionInfo.cs
deleted file mode 100644
index ede8966f37..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/QpidConnectionInfo.cs
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Net;
-using System.Text;
-using System.Text.RegularExpressions;
-using log4net;
-using Apache.Qpid.Client.Qms;
-
-namespace Apache.Qpid.Client
-{
-
- public class URLHelper
- {
- public static char DEFAULT_OPTION_SEPERATOR = '&';
- public static char ALTERNATIVE_OPTION_SEPARATOR = ',';
- public static char BROKER_SEPARATOR = ';';
-
- /// <summary>
- ///
- /// </summary>
- /// <param name="optionMap"></param>
- /// <param name="options"></param>
- public static void parseOptions(IDictionary optionMap, string options)
- {
- //options looks like this
- //brokerlist='tcp://host:port?option='value',option='value';vm://:3/virtualpath?option='value'',failover='method?option='value',option='value''
-
- if (options == null || options.IndexOf('=') == -1)
- {
- return;
- }
-
- int optionIndex = options.IndexOf('=');
-
- String option = options.Substring(0, optionIndex);
-
- int length = options.Length;
-
- int nestedQuotes = 0;
-
- // to store index of final "'"
- int valueIndex = optionIndex;
-
- //Walk remainder of url.
- while (nestedQuotes > 0 || valueIndex < length)
- {
- valueIndex++;
-
- if (valueIndex >= length)
- {
- break;
- }
-
- if (options[valueIndex] == '\'')
- {
- if (valueIndex + 1 < options.Length)
- {
- if (options[valueIndex + 1] == DEFAULT_OPTION_SEPERATOR ||
- options[valueIndex + 1] == ALTERNATIVE_OPTION_SEPARATOR ||
- options[valueIndex + 1] == BROKER_SEPARATOR ||
- options[valueIndex + 1] == '\'')
- {
- nestedQuotes--;
- // System.out.println(
- // options + "\n" + "-" + nestedQuotes + ":" + getPositionString(valueIndex - 2, 1));
- if (nestedQuotes == 0)
- {
- //We've found the value of an option
- break;
- }
- }
- else
- {
- nestedQuotes++;
- // System.out.println(
- // options + "\n" + "+" + nestedQuotes + ":" + getPositionString(valueIndex - 2, 1));
- }
- }
- else
- {
- // We are at the end of the string
- // Check to see if we are corectly closing quotes
- if (options[valueIndex] == '\'')
- {
- nestedQuotes--;
- }
-
- break;
- }
- }
- }
-
- if (nestedQuotes != 0 || valueIndex < (optionIndex + 2))
- {
- int sepIndex = 0;
-
- //Try and identify illegal separator character
- if (nestedQuotes > 1)
- {
- for (int i = 0; i < nestedQuotes; i++)
- {
- sepIndex = options.IndexOf('\'', sepIndex);
- sepIndex++;
- }
- }
-
- if (sepIndex >= options.Length || sepIndex == 0)
- {
- parseError(valueIndex, "Unterminated option", options);
- }
- else
- {
- parseError(sepIndex, "Unterminated option. Possible illegal option separator:'" +
- options[sepIndex] + "'", options);
- }
- }
-
- // optionIndex +2 to skip "='"
- int sublen = valueIndex - (optionIndex + 2);
- String value = options.Substring(optionIndex + 2, sublen);
-
- optionMap.Add(option, value);
-
- if (valueIndex < (options.Length - 1))
- {
- //Recurse to get remaining options
- parseOptions(optionMap, options.Substring(valueIndex + 2));
- }
- }
-
-
- public static void parseError(int index, String error, String url)
- {
- parseError(index, 1, error, url);
- }
-
- public static void parseError(int index, int length, String error, String url)
- {
- throw new UrlSyntaxException(url, error, index, length);
- }
-
- public static String printOptions(Hashtable options)
- {
- if (options.Count == 0)
- {
- return "";
- }
- else
- {
- StringBuilder sb = new StringBuilder();
- sb.Append('?');
- foreach (String key in options.Keys)
- {
- sb.AppendFormat("{0}='{1}'{2}", key, options[key], DEFAULT_OPTION_SEPERATOR);
- }
-
- sb.Remove(sb.Length - 1, 1);
- return sb.ToString();
- }
- }
-
- }
-
- public class QpidConnectionUrl
- {
- internal static IConnectionInfo FromUrl(string fullURL)
- {
- //_url = fullURL;
- IConnectionInfo connectionInfo = new QpidConnectionInfo();
-
-
- // _options = new HashMap<String, String>();
- // _brokers = new LinkedList();
- // _failoverOptions = new HashMap<String, String>();
-
- // Connection URL format
- //amqp://[user:pass@][clientid]/virtualhost?brokerlist='tcp://host:port?option=\'value\',option=\'value\';vm://:3/virtualpath?option=\'value\'',failover='method?option=\'value\',option='value''"
- // Options are of course optional except for requiring a single broker in the broker list.
- try
- {
- Uri connection = new Uri(fullURL);
-
- if (connection.Scheme == null || !(connection.Scheme.Equals(ConnectionUrlConstants.AMQ_PROTOCOL)))
- {
- throw new UrlSyntaxException(fullURL, "Not an AMQP URL");
- }
-
- if (connection.Host != null && connection.Host.Length > 0 && !connection.Host.Equals("default"))
- {
- connectionInfo.ClientName = connection.Host;
- }
-
- String userInfo = connection.UserInfo;
- if (userInfo == null || userInfo.Length == 0)
- {
- URLHelper.parseError(ConnectionUrlConstants.AMQ_PROTOCOL.Length + 3,
- "User information not found on url", fullURL);
- }
- else
- {
- parseUserInfo(userInfo, fullURL, connectionInfo);
- }
- String virtualHost = connection.AbsolutePath; // XXX: is AbsolutePath corrrect?
-
- if (virtualHost != null && virtualHost.Length > 0)
- {
- connectionInfo.VirtualHost = virtualHost;
- }
- else
- {
- int authLength = connection.Authority.Length;
- int start = ConnectionUrlConstants.AMQ_PROTOCOL.Length + 3;
- int testIndex = start + authLength;
- if (testIndex < fullURL.Length && fullURL[testIndex] == '?')
- {
- URLHelper.parseError(start, testIndex - start, "Virtual host found", fullURL);
- }
- else
- {
- URLHelper.parseError(-1, "Virtual host not specified", fullURL);
- }
-
- }
-
- QpidConnectionInfo qci = (QpidConnectionInfo)connectionInfo;
- string query = connection.Query;
- if (query[0] == '?') query = query.Substring(1);
- URLHelper.parseOptions(qci.GetOptions(), query);
-
- processOptions(connectionInfo);
-
- //Fragment is #string (not used)
- //System.out.println(connection.getFragment());
- return connectionInfo;
- }
- catch (UriFormatException uris)
- {
- throw uris;
- // if (uris is UrlSyntaxException)
- // {
- // throw uris;
- // }
- //
- // int slash = fullURL.IndexOf("\\");
- //
- // if (slash == -1)
- // {
- // URLHelper.parseError(uris.GetIndex(), uris.getReason(), uris.getInput());
- // }
- // else
- // {
- // if (slash != 0 && fullURL.charAt(slash - 1) == ':')
- // {
- // URLHelper.parseError(slash - 2, fullURL.indexOf('?') - slash + 2, "Virtual host looks like a windows path, forward slash not allowed in URL", fullURL);
- // }
- // else
- // {
- // URLHelper.parseError(slash, "Forward slash not allowed in URL", fullURL);
- // }
- // }
- }
- }
-
- private static void parseUserInfo(String userinfo, string fullUrl, IConnectionInfo connectionInfo)
- {
- //user info = user:pass
-
- int colonIndex = userinfo.IndexOf(':');
-
- if (colonIndex == -1)
- {
- URLHelper.parseError(ConnectionUrlConstants.AMQ_PROTOCOL.Length + 3,
- userinfo.Length, "Null password in user information not allowed.", fullUrl);
- }
- else
- {
- connectionInfo.Username = userinfo.Substring(0, colonIndex);
- connectionInfo.Password = userinfo.Substring(colonIndex + 1);
- }
- }
-
- private static void processOptions(IConnectionInfo connectionInfo)
- {
- string brokerlist = connectionInfo.GetOption(ConnectionUrlConstants.OPTIONS_BROKERLIST);
- if (brokerlist != null)
- {
- //brokerlist tcp://host:port?option='value',option='value';vm://:3/virtualpath?option='value'
- Regex splitter = new Regex("" + URLHelper.BROKER_SEPARATOR);
-
- foreach (string broker in splitter.Split(brokerlist))
- {
- connectionInfo.AddBrokerInfo(new AmqBrokerInfo(broker));
- }
-
- connectionInfo.SetOption(ConnectionUrlConstants.OPTIONS_BROKERLIST, null);
- // _options.remove(OPTIONS_BROKERLIST);
- }
-
- string failover = connectionInfo.GetOption(ConnectionUrlConstants.OPTIONS_FAILOVER);
- if (failover != null)
- {
- // failover='method?option='value',option='value''
-
- int methodIndex = failover.IndexOf('?');
-
- if (methodIndex > -1)
- {
- connectionInfo.FailoverMethod = failover.Substring(0, methodIndex);
- QpidConnectionInfo qpidConnectionInfo = (QpidConnectionInfo)connectionInfo;
- URLHelper.parseOptions(qpidConnectionInfo.GetFailoverOptions(),
- failover.Substring(methodIndex + 1));
- }
- else
- {
- connectionInfo.FailoverMethod = failover;
- }
-
- connectionInfo.SetOption(ConnectionUrlConstants.OPTIONS_FAILOVER, null);
- // _options.remove(OPTIONS_FAILOVER);
- }
- }
-
- internal static IConnectionInfo FromUri(Uri uri)
- {
- return null; // FIXME
-
- }
- }
-
- public class QpidConnectionInfo : IConnectionInfo
- {
- const string DEFAULT_VHOST = "/";
- string _username = "guest";
- string _password = "guest";
- string _virtualHost = DEFAULT_VHOST;
-
- string _failoverMethod = null;
- IDictionary _failoverOptions = new Hashtable();
- IDictionary _options = new Hashtable();
- IList _brokerInfos = new ArrayList(); // List<BrokerInfo>
- string _clientName = String.Format("{0}{1:G}", Dns.GetHostName(), DateTime.Now.Ticks);
-
- public IDictionary GetFailoverOptions()
- {
- return _failoverOptions;
- }
-
- public IDictionary GetOptions()
- {
- return _options;
- }
-
- public static IConnectionInfo FromUrl(String url)
- {
- return QpidConnectionUrl.FromUrl(url);
- }
-
- public string AsUrl()
- {
- StringBuilder sb = new StringBuilder();
- sb.AppendFormat("{0}://", ConnectionUrlConstants.AMQ_PROTOCOL);
-
- if (_username != null)
- {
- sb.Append(_username);
- if (_password != null)
- {
- sb.AppendFormat(":{0}", _password);
- }
- sb.Append("@");
- }
-
- sb.Append(_clientName);
- sb.Append(_virtualHost);
- sb.Append(OptionsToString());
-
- return sb.ToString();
- }
-
- private String OptionsToString()
- {
- StringBuilder sb = new StringBuilder();
- sb.AppendFormat("?{0}='", ConnectionUrlConstants.OPTIONS_BROKERLIST);
-
- foreach (IBrokerInfo broker in _brokerInfos)
- {
- sb.AppendFormat("{0};", broker);
- }
-
- sb.Remove(sb.Length - 1, 1);
- sb.Append("'");
-
- if (_failoverMethod != null)
- {
- sb.AppendFormat("{0}{1}='{2}{3}'", URLHelper.DEFAULT_OPTION_SEPERATOR,
- ConnectionUrlConstants.OPTIONS_FAILOVER,
- _failoverMethod,
- URLHelper.printOptions((Hashtable)_failoverOptions));
- }
-
- return sb.ToString();
- }
-
-
- public string FailoverMethod
- {
- get { return _failoverMethod; }
- set { _failoverMethod = value; }
- }
-
- public string GetFailoverOption(string key)
- {
- return (string)_failoverOptions[key];
- }
-
- public int BrokerCount
- {
- get { return _brokerInfos.Count; }
- }
-
- public IBrokerInfo GetBrokerInfo(int index)
- {
- return (IBrokerInfo)_brokerInfos[index];
- }
-
- public void AddBrokerInfo(IBrokerInfo brokerInfo)
- {
- if (!_brokerInfos.Contains(brokerInfo))
- {
- _brokerInfos.Add(brokerInfo);
- }
- }
-
- public IList GetAllBrokerInfos()
- {
- return _brokerInfos;
- }
-
- public string ClientName
- {
- get { return _clientName; }
- set { _clientName = value; }
- }
-
- public string Username
- {
- get { return _username; }
- set { _username = value; }
- }
-
- public string Password
- {
- get { return _password; }
- set { _password = value; }
- }
-
- public string VirtualHost
- {
- get { return _virtualHost; }
- set {
- _virtualHost = value;
- if ( _virtualHost == null || _virtualHost.Length == 0 )
- _virtualHost = DEFAULT_VHOST;
- if ( _virtualHost[0] != '/' )
- _virtualHost = '/' + _virtualHost;
- }
- }
-
- public string GetOption(string key)
- {
- return (string)_options[key];
- }
-
- public void SetOption(string key, string value)
- {
- _options[key] = value;
- }
-
- public override string ToString()
- {
- return AsUrl();
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Security/CallbackHandlerRegistry.cs b/qpid/dotnet/Qpid.Client/Client/Security/CallbackHandlerRegistry.cs
deleted file mode 100644
index 9ac0381850..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Security/CallbackHandlerRegistry.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Configuration;
-using System.Text;
-using Apache.Qpid.Sasl;
-using Apache.Qpid.Sasl.Mechanisms;
-
-using Apache.Qpid.Client.Configuration;
-
-namespace Apache.Qpid.Client.Security
-{
-
- /// <summary>
- /// Helper class to map SASL mechanisms to our
- /// internal ISaslCallbackHandler implementations.
- /// </summary>
- /// <remarks>
- /// The set of configured callback handlers and their order
- /// controls the selection of the SASL mechanism used for authentication.
- /// <para>
- /// You can either replace the default handler for CRAM-MD5 and PLAIN
- /// authentication (the two default options) using the application
- /// configuration file. Configuration is done by especifying the SASL
- /// mechanism name (e.g PLAIN) and the type implementing the callback handler
- /// used to provide any data required by the mechanism like username and password.
- /// </para>
- /// <para>
- /// Callback handler types should implement the IAMQCallbackHandler interface.
- /// </para>
- /// <para>
- /// New callbacks or authentication mechanisms can be configured like this:
- /// </para>
- /// <example><![CDATA[
- /// <configuration>
- /// <configSections>
- /// <sectionGroup name="qpid.client">
- /// <section name="authentication" type="Apache.Qpid.Client.Configuration.AuthenticationConfigurationSectionHandler, Apache.Qpid.Client"/>
- /// </sectionGroup>
- /// </configSections>
- /// <qpid.client>
- /// <authentication>
- /// <add key="TEST" value="Apache.Qpid.Client.Tests.Security.TestCallbackHandler, Apache.Qpid.Client.Tests"/>
- /// </authentication>
- /// </qpid.client>
- /// </configuration>
- /// ]]></example>
- /// </remarks>
- public sealed class CallbackHandlerRegistry
- {
- private static CallbackHandlerRegistry _instance =
- new CallbackHandlerRegistry();
- private OrderedHashTable _mechanism2HandlerMap;
- private string[] _mechanisms;
-
- public static CallbackHandlerRegistry Instance
- {
- get { return _instance; }
- }
-
- public string[] Mechanisms
- {
- get { return _mechanisms; }
- }
-
- private CallbackHandlerRegistry()
- {
- _mechanism2HandlerMap = (OrderedHashTable)
- ConfigurationSettings.GetConfig("qpid.client/authentication");
-
- // configure default options if not available
- if ( _mechanism2HandlerMap == null )
- _mechanism2HandlerMap = new OrderedHashTable();
-
- if ( !_mechanism2HandlerMap.Contains(ExternalSaslClient.Mechanism) )
- _mechanism2HandlerMap.Add(ExternalSaslClient.Mechanism, typeof(UsernamePasswordCallbackHandler));
- if ( !_mechanism2HandlerMap.Contains(CramMD5SaslClient.Mechanism) )
- _mechanism2HandlerMap.Add(CramMD5SaslClient.Mechanism, typeof(UsernamePasswordCallbackHandler));
- if ( !_mechanism2HandlerMap.Contains(CramMD5HexSaslClient.Mechanism) )
- _mechanism2HandlerMap.Add(CramMD5HexSaslClient.Mechanism, typeof(UsernamePasswordCallbackHandler));
- if ( !_mechanism2HandlerMap.Contains(PlainSaslClient.Mechanism) )
- _mechanism2HandlerMap.Add(PlainSaslClient.Mechanism, typeof(UsernamePasswordCallbackHandler));
-
- _mechanisms = new string[_mechanism2HandlerMap.Count];
- _mechanism2HandlerMap.OrderedKeys.CopyTo(_mechanisms, 0);
- }
-
- public bool IsSupportedMechanism(string mechanism)
- {
- return _mechanism2HandlerMap.Contains(mechanism);
- }
-
- public string ChooseMechanism(string mechanisms)
- {
- IList mechs = mechanisms.Split(' ');
- foreach ( string supportedMech in _mechanisms )
- {
- if ( mechs.Contains(supportedMech) )
- return supportedMech;
- }
- return null;
- }
-
- public Type GetCallbackHandler(string mechanism)
- {
- return (Type)_mechanism2HandlerMap[mechanism];
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Security/IAMQCallbackHandler.cs b/qpid/dotnet/Qpid.Client/Client/Security/IAMQCallbackHandler.cs
deleted file mode 100644
index 6ff45be04a..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Security/IAMQCallbackHandler.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Text;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Sasl;
-
-namespace Apache.Qpid.Client.Security
-{
- public interface IAMQCallbackHandler : ISaslCallbackHandler
- {
- void Initialize(AMQProtocolSession session);
- }
-
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Security/UsernamePasswordCallbackHandler.cs b/qpid/dotnet/Qpid.Client/Client/Security/UsernamePasswordCallbackHandler.cs
deleted file mode 100644
index 743ade77c9..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Security/UsernamePasswordCallbackHandler.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Text;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Sasl;
-
-namespace Apache.Qpid.Client.Security
-{
- internal class UsernamePasswordCallbackHandler : IAMQCallbackHandler
- {
- private AMQProtocolSession _session;
-
- public void Initialize(AMQProtocolSession session)
- {
- if ( session == null )
- throw new ArgumentNullException("session");
-
- _session = session;
- }
-
- public void Handle(ISaslCallback[] callbacks)
- {
- foreach ( ISaslCallback cb in callbacks )
- {
- if ( cb is NameCallback )
- {
- ((NameCallback)cb).Text = _session.Username;
- } else if ( cb is PasswordCallback )
- {
- ((PasswordCallback)cb).Text = _session.Password;
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/SslOptions.cs b/qpid/dotnet/Qpid.Client/Client/SslOptions.cs
deleted file mode 100644
index 4630121828..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/SslOptions.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Security.Cryptography.X509Certificates;
-
-namespace Apache.Qpid.Client
-{
- /// <summary>
- /// Configures SSL-related options to connect to an AMQP broker.
- /// </summary>
- /// <remarks>
- /// If the server certificate is not trusted by the client,
- /// connection will fail. However, you can set the
- /// <see cref="IgnoreValidationErrors"/> property to true
- /// to ignore any certificate verification errors for debugging purposes.
- /// </remarks>
- public class SslOptions
- {
- private X509Certificate _clientCertificate;
- private bool _ignoreValidationErrors;
-
- /// <summary>
- /// Certificate to present to the broker to authenticate
- /// this client connection
- /// </summary>
- public X509Certificate ClientCertificate
- {
- get { return _clientCertificate; }
- }
-
- /// <summary>
- /// If true, the validity of the broker certificate
- /// will not be verified on connection
- /// </summary>
- public bool IgnoreValidationErrors
- {
- get { return _ignoreValidationErrors; }
- }
-
- /// <summary>
- /// Initialize a new instance with default values
- /// (No client certificate, don't ignore validation errors)
- /// </summary>
- public SslOptions()
- {
- }
-
- /// <summary>
- /// Initialize a new instance
- /// </summary>
- /// <param name="clientCertificate">
- /// Certificate to use to authenticate the client to the broker
- /// </param>
- /// <param name="ignoreValidationErrors">
- /// If true, ignore any validation errors when validating the server certificate
- /// </param>
- public SslOptions(X509Certificate clientCertificate, bool ignoreValidationErrors)
- {
- _clientCertificate = clientCertificate;
- _ignoreValidationErrors = ignoreValidationErrors;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/State/AMQState.cs b/qpid/dotnet/Qpid.Client/Client/State/AMQState.cs
deleted file mode 100644
index 67f8427fb2..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/State/AMQState.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Client.State
-{
- public enum AMQState
- {
- CONNECTION_NOT_STARTED,
- CONNECTION_NOT_TUNED,
- CONNECTION_NOT_OPENED,
- CONNECTION_OPEN,
- CONNECTION_CLOSING,
- CONNECTION_CLOSED,
- ALL // all is a special state used in the state manager. It is not valid to be "in" the state "all".
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/State/AMQStateChangedEvent.cs b/qpid/dotnet/Qpid.Client/Client/State/AMQStateChangedEvent.cs
deleted file mode 100644
index a464bbb6f5..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/State/AMQStateChangedEvent.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Client.State
-{
- public class AMQStateChangedEvent
- {
- private readonly AMQState _oldState;
-
- private readonly AMQState _newState;
-
- public AMQStateChangedEvent(AMQState oldState, AMQState newState)
- {
- _oldState = oldState;
- _newState = newState;
- }
-
- public AMQState OldState
- {
- get
- {
- return _oldState;
- }
- }
-
- public AMQState NewState
- {
- get
- {
- return _newState;
- }
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/State/AMQStateManager.cs b/qpid/dotnet/Qpid.Client/Client/State/AMQStateManager.cs
deleted file mode 100644
index 881e01e697..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/State/AMQStateManager.cs
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using log4net;
-using Apache.Qpid.Client.Handler;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Client.Protocol.Listener;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.State
-{
- public class AMQStateManager : IAMQMethodListener
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(AMQStateManager));
-
- const bool InfoLoggingHack = true;
-
- /// <summary>
- /// The current state
- /// </summary>
- private AMQState _currentState;
-
- /// <summary>
- /// Maps from an AMQState instance to a Map from Class to StateTransitionHandler.
- /// The class must be a subclass of AMQFrame.
- /// </summary>
- private readonly IDictionary _state2HandlersMap;
- private ArrayList _stateListeners;
- private object _syncLock;
-
- public AMQStateManager()
- {
- _syncLock = new object();
- _state2HandlersMap = new Hashtable();
- _stateListeners = ArrayList.Synchronized(new ArrayList(5));
- _currentState = AMQState.CONNECTION_NOT_STARTED;
- RegisterListeners();
- }
-
- private void RegisterListeners()
- {
- IStateAwareMethodListener connectionStart = new ConnectionStartMethodHandler();
- IStateAwareMethodListener connectionClose = new ConnectionCloseMethodHandler();
- IStateAwareMethodListener connectionCloseOk = new ConnectionCloseOkHandler();
- IStateAwareMethodListener connectionTune = new ConnectionTuneMethodHandler();
- IStateAwareMethodListener connectionSecure = new ConnectionSecureMethodHandler();
- IStateAwareMethodListener connectionOpenOk = new ConnectionOpenOkMethodHandler();
- IStateAwareMethodListener channelClose = new ChannelCloseMethodHandler();
- IStateAwareMethodListener basicDeliver = new BasicDeliverMethodHandler();
- IStateAwareMethodListener basicReturn = new BasicReturnMethodHandler();
- IStateAwareMethodListener queueDeleteOk = new QueueDeleteOkMethodHandler();
- IStateAwareMethodListener queuePurgeOk = new QueuePurgeOkMethodHandler();
-
- // We need to register a map for the null (i.e. all state) handlers otherwise you get
- // a stack overflow in the handler searching code when you present it with a frame for which
- // no handlers are registered.
- _state2HandlersMap[AMQState.ALL] = new Hashtable();
-
- {
- Hashtable notStarted = new Hashtable();
- notStarted[typeof(ConnectionStartBody)] = connectionStart;
- notStarted[typeof(ConnectionCloseBody)] = connectionClose;
- _state2HandlersMap[AMQState.CONNECTION_NOT_STARTED] = notStarted;
- }
- {
- Hashtable notTuned = new Hashtable();
- notTuned[typeof(ConnectionTuneBody)] = connectionTune;
- notTuned[typeof(ConnectionSecureBody)] = connectionSecure;
- notTuned[typeof(ConnectionCloseBody)] = connectionClose;
- _state2HandlersMap[AMQState.CONNECTION_NOT_TUNED] = notTuned;
- }
- {
- Hashtable notOpened = new Hashtable();
- notOpened[typeof(ConnectionOpenOkBody)] = connectionOpenOk;
- notOpened[typeof(ConnectionCloseBody)] = connectionClose;
- _state2HandlersMap[AMQState.CONNECTION_NOT_OPENED] = notOpened;
- }
- {
- Hashtable open = new Hashtable();
- open[typeof(ChannelCloseBody)] = channelClose;
- open[typeof(ConnectionCloseBody)] = connectionClose;
- open[typeof(BasicDeliverBody)] = basicDeliver;
- open[typeof(BasicReturnBody)] = basicReturn;
- open[typeof(QueueDeleteOkBody)] = queueDeleteOk;
- open[typeof(QueuePurgeOkBody)] = queuePurgeOk;
- _state2HandlersMap[AMQState.CONNECTION_OPEN] = open;
- }
- {
- Hashtable closing = new Hashtable();
- closing[typeof(ConnectionCloseOkBody)] = connectionCloseOk;
- _state2HandlersMap[AMQState.CONNECTION_CLOSING] = closing;
- }
- }
-
- public AMQState CurrentState
- {
- get
- {
- return _currentState;
- }
- }
-
- /// <summary>
- /// Changes the state.
- /// </summary>
- /// <param name="newState">The new state.</param>
- /// <exception cref="AMQException">if there is an error changing state</exception>
- public void ChangeState(AMQState newState)
- {
- if (InfoLoggingHack)
- {
- _logger.Debug("State changing to " + newState + " from old state " + _currentState);
- }
- _logger.Debug("State changing to " + newState + " from old state " + _currentState);
- AMQState oldState = _currentState;
- _currentState = newState;
-
- lock ( _syncLock )
- {
- foreach ( IStateListener l in _stateListeners )
- {
- l.StateChanged(oldState, newState);
- }
- }
- }
-
- public void Error(Exception e)
- {
- _logger.Debug("State manager receive error notification: " + e);
- lock ( _syncLock )
- {
- foreach ( IStateListener l in _stateListeners )
- {
- l.Error(e);
- }
- }
- }
-
- public bool MethodReceived(AMQMethodEvent evt)
- {
- _logger.Debug(String.Format("Finding method handler. currentState={0} type={1}", _currentState, evt.Method.GetType()));
- IStateAwareMethodListener handler = FindStateTransitionHandler(_currentState, evt.Method);
- if (handler != null)
- {
- handler.MethodReceived(this, evt);
- return true;
- }
- return false;
- }
-
- /// <summary>
- /// Finds the state transition handler.
- /// </summary>
- /// <param name="currentState">State of the current.</param>
- /// <param name="frame">The frame.</param>
- /// <returns></returns>
- /// <exception cref="IllegalStateTransitionException">if the state transition if not allowed</exception>
- private IStateAwareMethodListener FindStateTransitionHandler(AMQState currentState,
- AMQMethodBody frame)
- {
- Type clazz = frame.GetType();
- if (_logger.IsDebugEnabled)
- {
- _logger.Debug("Looking for state transition handler for frame " + clazz);
- }
- IDictionary classToHandlerMap = (IDictionary) _state2HandlersMap[currentState];
-
- if (classToHandlerMap == null)
- {
- // if no specialised per state handler is registered look for a
- // handler registered for "all" states
- return FindStateTransitionHandler(AMQState.ALL, frame);
- }
- IStateAwareMethodListener handler = (IStateAwareMethodListener) classToHandlerMap[clazz];
- if (handler == null)
- {
- if (currentState == AMQState.ALL)
- {
- _logger.Debug("No state transition handler defined for receiving frame " + frame);
- return null;
- }
- else
- {
- // if no specialised per state handler is registered look for a
- // handler registered for "all" states
- return FindStateTransitionHandler(AMQState.ALL, frame);
- }
- }
- else
- {
- return handler;
- }
- }
-
- public void AddStateListener(IStateListener listener)
- {
- _logger.Debug("Adding state listener");
- lock ( _syncLock )
- {
- _stateListeners.Add(listener);
- }
- }
-
- public void RemoveStateListener(IStateListener listener)
- {
- lock ( _syncLock )
- {
- _stateListeners.Remove(listener);
- }
- }
-
- public void AttainState(AMQState s)
- {
- if (_currentState != s)
- {
- StateWaiter sw = null;
- try
- {
- _logger.Debug("Adding state wait to reach state " + s);
- sw = new StateWaiter(s);
- AddStateListener(sw);
- sw.WaituntilStateHasChanged();
- // at this point the state will have changed.
- }
- finally
- {
- RemoveStateListener(sw);
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/State/IAMQStateListener.cs b/qpid/dotnet/Qpid.Client/Client/State/IAMQStateListener.cs
deleted file mode 100644
index 31e4b5046d..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/State/IAMQStateListener.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Client.State
-{
- public interface IAMQStateListener
- {
- void StateChanged(AMQStateChangedEvent evt);
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/State/IStateAwareMethodListener.cs b/qpid/dotnet/Qpid.Client/Client/State/IStateAwareMethodListener.cs
deleted file mode 100644
index 0874f39665..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/State/IStateAwareMethodListener.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Client.Protocol;
-
-namespace Apache.Qpid.Client.State
-{
- public interface IStateAwareMethodListener
- {
- void MethodReceived(AMQStateManager stateManager, AMQMethodEvent evt);
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/State/IStateListener.cs b/qpid/dotnet/Qpid.Client/Client/State/IStateListener.cs
deleted file mode 100644
index edd7382f93..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/State/IStateListener.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Client.State
-{
- public interface IStateListener
- {
- void StateChanged(AMQState oldState, AMQState newState);
-
- void Error(Exception e);
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/State/IllegalStateTransitionException.cs b/qpid/dotnet/Qpid.Client/Client/State/IllegalStateTransitionException.cs
deleted file mode 100644
index 81de622617..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/State/IllegalStateTransitionException.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid.Client.State
-{
- [Serializable]
- public class IllegalStateTransitionException : AMQException
- {
- private AMQState _originalState;
-
- private Type _frame;
-
- public IllegalStateTransitionException(AMQState originalState, Type frame)
- : base("No valid state transition defined for receiving frame " + frame +
- " from state " + originalState)
- {
- _originalState = originalState;
- _frame = frame;
- }
-
- protected IllegalStateTransitionException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- _originalState = (AMQState)info.GetValue("OriginalState", typeof(AMQState));
- _frame = (Type)info.GetValue("FrameType", typeof(Type));
- }
-
- public AMQState OriginalState
- {
- get
- {
- return _originalState;
- }
- }
-
- public Type FrameType
- {
- get
- {
- return _frame;
- }
- }
-
- public override void GetObjectData(SerializationInfo info, StreamingContext context)
- {
- base.GetObjectData(info, context);
- info.AddValue("OriginalState", OriginalState);
- info.AddValue("FrameType", FrameType);
- }
- }
-}
-
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/State/StateWaiter.cs b/qpid/dotnet/Qpid.Client/Client/State/StateWaiter.cs
deleted file mode 100644
index e739d0cb44..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/State/StateWaiter.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using Apache.Qpid.Client.Protocol;
-using log4net;
-
-namespace Apache.Qpid.Client.State
-{
- public class StateWaiter : IStateListener
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(StateWaiter));
-
- private readonly AMQState _state;
- private AMQState _newState;
-
- private volatile bool _newStateAchieved;
-
- private volatile Exception _exception;
-
- private ManualResetEvent _resetEvent = new ManualResetEvent(false);
-
- public StateWaiter(AMQState state)
- {
- _state = state;
- }
-
- public void StateChanged(AMQState oldState, AMQState newState)
- {
- _newState = newState;
- if (_logger.IsDebugEnabled)
- {
- _logger.Debug("stateChanged called");
- }
- if (_state == newState)
- {
- _newStateAchieved = true;
-
- if (_logger.IsDebugEnabled)
- {
- _logger.Debug("New state reached so notifying monitor");
- }
- _resetEvent.Set();
- }
- }
-
- public void Error(Exception e)
- {
- if (_logger.IsDebugEnabled)
- {
- _logger.Debug("exceptionThrown called");
- }
-
- _exception = e;
- _resetEvent.Set();
- }
-
- public void WaituntilStateHasChanged()
- {
- //
- // The guard is required in case we are woken up by a spurious
- // notify().
- //
-
- TimeSpan waitTime = TimeSpan.FromMilliseconds(DefaultTimeouts.MaxWaitForState);
- DateTime waitUntilTime = DateTime.Now + waitTime;
-
- while ( !_newStateAchieved
- && _exception == null
- && waitTime.TotalMilliseconds > 0 )
- {
- _logger.Debug("State not achieved so waiting...");
- try
- {
- _resetEvent.WaitOne(waitTime, true);
- }
- finally
- {
- if (!_newStateAchieved)
- {
- waitTime = waitUntilTime - DateTime.Now;
- }
- }
- }
-
- if (_exception != null)
- {
- _logger.Debug("Throwable reached state waiter: " + _exception);
- if (_exception is AMQException)
- throw _exception;
- else
- throw new AMQException("Error: " + _exception, _exception);
- }
-
- if (!_newStateAchieved)
- {
- string error = string.Format("State not achieved within permitted time. Current state: {0}, desired state: {1}", _state, _newState);
- _logger.Warn(error);
- throw new AMQException(error);
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/AMQProtocolProvider.cs b/qpid/dotnet/Qpid.Client/Client/Transport/AMQProtocolProvider.cs
deleted file mode 100644
index dd0bb404cb..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/AMQProtocolProvider.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Codec;
-using Apache.Qpid.Codec.Demux;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Transport
-{
- public class AMQProtocolProvider
- {
- private DemuxingProtocolCodecFactory _factory;
-
- public AMQProtocolProvider()
- {
- _factory = new DemuxingProtocolCodecFactory();
- _factory.Register(new AMQDataBlockEncoder());
- _factory.Register(new AMQDataBlockDecoder());
- _factory.Register(new ProtocolInitiation.Decoder());
- }
-
- public IProtocolCodecFactory CodecFactory
- {
- get
- {
- return _factory;
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/AmqpChannel.cs b/qpid/dotnet/Qpid.Client/Client/Transport/AmqpChannel.cs
deleted file mode 100644
index 1e217e755b..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/AmqpChannel.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using log4net;
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Codec;
-using Apache.Qpid.Codec.Support;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Transport
-{
- public class AmqpChannel : IProtocolChannel
- {
- // Warning: don't use this log for regular logging.
- static readonly ILog _protocolTraceLog = LogManager.GetLogger("TRACE.Qpid.Client.ProtocolChannel");
-
- IByteChannel _byteChannel;
- IProtocolEncoder _encoder;
- IProtocolDecoder _decoder;
- IProtocolDecoderOutput _decoderOutput;
- private object _syncLock;
-
- public AmqpChannel(IByteChannel byteChannel, IProtocolDecoderOutput decoderOutput)
- {
- _byteChannel = byteChannel;
- _decoderOutput = decoderOutput;
- _syncLock = new object();
-
- AMQProtocolProvider protocolProvider = new AMQProtocolProvider();
- IProtocolCodecFactory factory = protocolProvider.CodecFactory;
- _encoder = factory.Encoder;
- _decoder = factory.Decoder;
- }
-
- public void Read()
- {
- ByteBuffer buffer = _byteChannel.Read();
- Decode(buffer);
- }
-
- public IAsyncResult BeginRead(AsyncCallback callback, object state)
- {
- return _byteChannel.BeginRead(callback, state);
- }
-
- public void EndRead(IAsyncResult result)
- {
- ByteBuffer buffer = _byteChannel.EndRead(result);
- Decode(buffer);
- }
-
- public void Write(IDataBlock o)
- {
- // TODO: Refactor to decorator.
- if (_protocolTraceLog.IsDebugEnabled)
- {
- _protocolTraceLog.Debug(String.Format("WRITE {0}", o));
- }
- // we should be doing an async write, but apparently
- // the mentalis library doesn't queue async read/writes
- // correctly and throws random IOException's. Stay sync for a while
- //_byteChannel.BeginWrite(Encode(o), OnAsyncWriteDone, null);
- _byteChannel.Write(Encode(o));
- }
-
- // not used for now
- //private void OnAsyncWriteDone(IAsyncResult result)
- //{
- // _byteChannel.EndWrite(result);
- //}
-
- private void Decode(ByteBuffer buffer)
- {
- // make sure we don't try to decode more than
- // one buffer at the same time
- lock ( _syncLock )
- {
- _decoder.Decode(buffer, _decoderOutput);
- }
- }
-
- private ByteBuffer Encode(object o)
- {
- SingleProtocolEncoderOutput output = new SingleProtocolEncoderOutput();
- _encoder.Encode(o, output);
- return output.buffer;
- }
-
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/IByteChannel.cs b/qpid/dotnet/Qpid.Client/Client/Transport/IByteChannel.cs
deleted file mode 100644
index 35806f2a6e..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/IByteChannel.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Client.Transport
-{
- /// <summary>
- /// Represents input/output channels that read
- /// and write <see cref="ByteBuffer"/> instances
- /// </summary>
- public interface IByteChannel
- {
- /// <summary>
- /// Read a <see cref="ByteBuffer"/> from the underlying
- /// network stream and any configured filters
- /// </summary>
- /// <returns>A ByteBuffer, if available</returns>
- ByteBuffer Read();
- /// <summary>
- /// Begin an asynchronous read operation
- /// </summary>
- /// <param name="callback">Callback method to call when read operation completes</param>
- /// <param name="state">State object</param>
- /// <returns>An <see cref="System.IAsyncResult"/> object</returns>
- IAsyncResult BeginRead(AsyncCallback callback, object state);
- /// <summary>
- /// End an asynchronous read operation
- /// </summary>
- /// <param name="result">The <see cref="System.IAsyncResult"/> object returned from <see cref="BeginRead"/></param>
- /// <returns>The <see cref="ByteBuffer"/> read</returns>
- ByteBuffer EndRead(IAsyncResult result);
- /// <summary>
- /// Write a <see cref="ByteBuffer"/> to the underlying network
- /// stream, going through any configured filters
- /// </summary>
- /// <param name="buffer"></param>
- void Write(ByteBuffer buffer);
- /// <summary>
- /// Begin an asynchronous write operation
- /// </summary>
- /// <param name="buffer">Buffer to write</param>
- /// <param name="callback">A callback to call when the operation completes</param>
- /// <param name="state">State object</param>
- /// <returns>An <see cref="System.IAsyncResult"/> object</returns>
- IAsyncResult BeginWrite(ByteBuffer buffer, AsyncCallback callback, object state);
- /// <summary>
- /// End an asynchronous write operation
- /// </summary>
- /// <param name="result">The <see cref="System.IAsyncResult"/> object returned by <see cref="BeginWrite"/></param>
- void EndWrite(IAsyncResult result);
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/IProtocolChannel.cs b/qpid/dotnet/Qpid.Client/Client/Transport/IProtocolChannel.cs
deleted file mode 100644
index 0b59ee8799..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/IProtocolChannel.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-
-namespace Apache.Qpid.Client.Transport
-{
- public interface IProtocolChannel : IProtocolWriter
- {
- void Read();
- IAsyncResult BeginRead(AsyncCallback callback, object state);
- void EndRead(IAsyncResult result);
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/IProtocolWriter.cs b/qpid/dotnet/Qpid.Client/Client/Transport/IProtocolWriter.cs
deleted file mode 100644
index 592dff3a19..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/IProtocolWriter.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Transport
-{
- public interface IProtocolWriter
- {
- void Write(IDataBlock o);
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/IStreamFilter.cs b/qpid/dotnet/Qpid.Client/Client/Transport/IStreamFilter.cs
deleted file mode 100644
index e0e890fc5a..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/IStreamFilter.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.IO;
-
-namespace Apache.Qpid.Client.Transport
-{
- /// <summary>
- /// Defines a way to introduce an arbitrary filtering
- /// stream into the stream chain managed by <see cref="IoHandler"/>
- /// </summary>
- public interface IStreamFilter
- {
- /// <summary>
- /// Creates a new filtering stream on top of another
- /// </summary>
- /// <param name="lowerStream">Next stream on the stack</param>
- /// <returns>A new filtering stream</returns>
- Stream CreateFilterStream(Stream lowerStream);
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/ITransport.cs b/qpid/dotnet/Qpid.Client/Client/Transport/ITransport.cs
deleted file mode 100644
index 693a9a9534..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/ITransport.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client.Protocol;
-
-namespace Apache.Qpid.Client.Transport
-{
- public interface ITransport : IConnectionCloser
- {
- void Connect(IBrokerInfo broker, AMQConnection connection);
- string LocalEndpoint { get; }
- IProtocolWriter ProtocolWriter { get; }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/IoHandler.cs b/qpid/dotnet/Qpid.Client/Client/Transport/IoHandler.cs
deleted file mode 100644
index 0475236d92..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/IoHandler.cs
+++ /dev/null
@@ -1,322 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.IO;
-using System.Threading;
-using log4net;
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Client.Protocol;
-
-namespace Apache.Qpid.Client.Transport
-{
- /// <summary>
- /// Responsible for reading and writing
- /// ByteBuffers from/to network streams, and handling
- /// the stream filters
- /// </summary>
- public class IoHandler : IByteChannel, IDisposable
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(IoHandler));
- private const int DEFAULT_BUFFER_SIZE = 32 * 1024;
-
- private Stream _topStream;
- private IProtocolListener _protocolListener;
- private int _readBufferSize;
-
- public int ReadBufferSize
- {
- get { return _readBufferSize; }
- set { _readBufferSize = value; }
- }
-
- /// <summary>
- /// Initialize a new instance
- /// </summary>
- /// <param name="stream">Underlying network stream</param>
- /// <param name="protocolListener">Protocol listener to report exceptions to</param>
- public IoHandler(Stream stream, IProtocolListener protocolListener)
- {
- if ( stream == null )
- throw new ArgumentNullException("stream");
- if ( protocolListener == null )
- throw new ArgumentNullException("protocolListener");
-
- // initially, the stream at the top of the filter
- // chain is the underlying network stream
- _topStream = stream;
- _protocolListener = protocolListener;
- _readBufferSize = DEFAULT_BUFFER_SIZE;
- }
-
- /// <summary>
- /// Adds a new filter on the top of the chain
- /// </summary>
- /// <param name="filter">Stream filter to put on top of the chain</param>
- /// <remarks>
- /// This should *only* be called during initialization. We don't
- /// support changing the filter change after the first read/write
- /// has been done and it's not thread-safe to boot!
- /// </remarks>
- public void AddFilter(IStreamFilter filter)
- {
- _topStream = filter.CreateFilterStream(_topStream);
- }
-
- #region IByteChannel Implementation
- //
- // IByteChannel Implementation
- //
-
- /// <summary>
- /// Read a <see cref="ByteBuffer"/> from the underlying
- /// network stream and any configured filters
- /// </summary>
- /// <returns>A ByteBuffer, if available</returns>
- public ByteBuffer Read()
- {
- byte[] bytes = AllocateBuffer();
-
- int numOctets = _topStream.Read(bytes, 0, bytes.Length);
-
- return WrapByteArray(bytes, numOctets);
- }
-
- /// <summary>
- /// Begin an asynchronous read operation
- /// </summary>
- /// <param name="callback">Callback method to call when read operation completes</param>
- /// <param name="state">State object</param>
- /// <returns>An <see cref="System.IAsyncResult"/> object</returns>
- public IAsyncResult BeginRead(AsyncCallback callback, object state)
- {
- byte[] bytes = AllocateBuffer();
- ReadData rd = new ReadData(callback, state, bytes);
-
- // only put a callback if the caller wants one.
- AsyncCallback myCallback = null;
- if ( callback != null )
- myCallback = new AsyncCallback(OnAsyncReadDone);
-
- IAsyncResult result = _topStream.BeginRead(
- bytes, 0, bytes.Length, myCallback,rd
- );
- return new WrappedAsyncResult(result, bytes);
- }
-
- /// <summary>
- /// End an asynchronous read operation
- /// </summary>
- /// <param name="result">The <see cref="System.IAsyncResult"/> object returned from <see cref="BeginRead"/></param>
- /// <returns>The <see cref="ByteBuffer"/> read</returns>
- public ByteBuffer EndRead(IAsyncResult result)
- {
- WrappedAsyncResult theResult = (WrappedAsyncResult)result;
- int bytesRead = _topStream.EndRead(theResult.InnerResult);
- return WrapByteArray(theResult.Buffer, bytesRead);
- }
-
- /// <summary>
- /// Write a <see cref="ByteBuffer"/> to the underlying network
- /// stream, going through any configured filters
- /// </summary>
- /// <param name="buffer"></param>
- public void Write(ByteBuffer buffer)
- {
- try
- {
- _topStream.Write(buffer.Array, buffer.Position, buffer.Limit); // FIXME
- }
- catch (Exception e)
- {
- _log.Warn("Write caused exception", e);
- _protocolListener.OnException(e);
- }
- }
-
- /// <summary>
- /// Begin an asynchronous write operation
- /// </summary>
- /// <param name="buffer">Buffer to write</param>
- /// <param name="callback">A callback to call when the operation completes</param>
- /// <param name="state">State object</param>
- /// <returns>An <see cref="System.IAsyncResult"/> object</returns>
- public IAsyncResult BeginWrite(ByteBuffer buffer, AsyncCallback callback, object state)
- {
- try
- {
- return _topStream.BeginWrite(
- buffer.Array, buffer.Position, buffer.Limit,
- callback, state
- );
- } catch ( Exception e )
- {
- _log.Error("BeginWrite caused exception", e);
- // not clear if an exception here should be propagated? we still
- // need to propagate it upwards anyway!
- _protocolListener.OnException(e);
- throw;
- }
- }
-
- /// <summary>
- /// End an asynchronous write operation
- /// </summary>
- /// <param name="result">The <see cref="System.IAsyncResult"/> object returned by <see cref="BeginWrite"/></param>
- public void EndWrite(IAsyncResult result)
- {
- try
- {
- _topStream.EndWrite(result);
- } catch ( Exception e )
- {
- _log.Error("EndWrite caused exception", e);
- // not clear if an exception here should be propagated?
- _protocolListener.OnException(e);
- //throw;
- }
- }
- #endregion // IByteChannel Implementation
-
- #region IDisposable Implementation
- //
- // IDisposable Implementation
- //
-
- public void Dispose()
- {
- if ( _topStream != null )
- {
- _topStream.Close();
- }
- }
-
- #endregion // IDisposable Implementation
-
- #region Private and Helper Classes/Methods
- //
- // Private and Helper Classes/Methods
- //
-
- private byte[] AllocateBuffer()
- {
- return new byte[ReadBufferSize];
- }
-
- private static ByteBuffer WrapByteArray(byte[] bytes, int size)
- {
- ByteBuffer byteBuffer = ByteBuffer.Wrap(bytes);
- byteBuffer.Limit = size;
- byteBuffer.Flip();
-
- return byteBuffer;
- }
-
-
- private static void OnAsyncReadDone(IAsyncResult result)
- {
- ReadData rd = (ReadData) result.AsyncState;
- IAsyncResult wrapped = new WrappedAsyncResult(result, rd.Buffer);
- rd.Callback(wrapped);
- }
-
- class ReadData
- {
- private object _state;
- private AsyncCallback _callback;
- private byte[] _buffer;
-
- public object State
- {
- get { return _state; }
- }
-
- public AsyncCallback Callback
- {
- get { return _callback; }
- }
-
- public byte[] Buffer
- {
- get { return _buffer; }
- }
-
- public ReadData(AsyncCallback callback, object state, byte[] buffer)
- {
- _callback = callback;
- _state = state;
- _buffer = buffer;
- }
- }
-
- class WrappedAsyncResult : IAsyncResult
- {
- private IAsyncResult _innerResult;
- private byte[] _buffer;
-
- #region IAsyncResult Properties
- //
- // IAsyncResult Properties
- //
- public bool IsCompleted
- {
- get { return _innerResult.IsCompleted; }
- }
-
- public WaitHandle AsyncWaitHandle
- {
- get { return _innerResult.AsyncWaitHandle; }
- }
-
- public object AsyncState
- {
- get { return _innerResult.AsyncState; }
- }
-
- public bool CompletedSynchronously
- {
- get { return _innerResult.CompletedSynchronously; }
- }
- #endregion // IAsyncResult Properties
-
- public IAsyncResult InnerResult
- {
- get { return _innerResult; }
- }
- public byte[] Buffer
- {
- get { return _buffer; }
- }
-
- public WrappedAsyncResult(IAsyncResult result, byte[] buffer)
- {
- if ( result == null )
- throw new ArgumentNullException("result");
- if ( buffer == null )
- throw new ArgumentNullException("buffer");
-
- _innerResult = result;
- _buffer = buffer;
- }
- }
-
- #endregion // Private and Helper Classes/Methods
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/ProtocolDecoderOutput.cs b/qpid/dotnet/Qpid.Client/Client/Transport/ProtocolDecoderOutput.cs
deleted file mode 100644
index 9fa313152f..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/ProtocolDecoderOutput.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Codec;
-using Apache.Qpid.Framing;
-using log4net;
-
-namespace Apache.Qpid.Client.Transport
-{
- /// <summary>
- /// <see cref="IProtocolDecoderOutput"/> implementation that forwards
- /// each <see cref="IDataBlock"/> as it is decoded to the
- /// protocol listener
- /// </summary>
- internal class ProtocolDecoderOutput : IProtocolDecoderOutput
- {
- private IProtocolListener _protocolListener;
- static readonly ILog _protocolTraceLog = LogManager.GetLogger("TRACE.Qpid.Client.ProtocolChannel");
-
- public ProtocolDecoderOutput(IProtocolListener protocolListener)
- {
- if ( protocolListener == null )
- throw new ArgumentNullException("protocolListener");
-
- _protocolListener = protocolListener;
- }
-
- public void Write(object message)
- {
- IDataBlock block = message as IDataBlock;
- if ( block != null )
- {
- _protocolTraceLog.Debug(String.Format("READ {0}", block));
- _protocolListener.OnMessage(block);
- }
- }
- }
-} // namespace Apache.Qpid.Client.Transport
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/SingleProtocolEncoderOutput.cs b/qpid/dotnet/Qpid.Client/Client/Transport/SingleProtocolEncoderOutput.cs
deleted file mode 100644
index a1aa889ba0..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/SingleProtocolEncoderOutput.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Codec;
-
-namespace Apache.Qpid.Client.Transport
-{
- public class SingleProtocolEncoderOutput : IProtocolEncoderOutput
- {
- public ByteBuffer buffer;
-
- public void Write(ByteBuffer buf)
- {
- if (buffer != null)
- {
- throw new InvalidOperationException("{0} does not allow the writing of more than one buffer");
- }
- buffer = buf;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/BlockingSocketTransport.cs b/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/BlockingSocketTransport.cs
deleted file mode 100644
index f336d8a80a..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/BlockingSocketTransport.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.IO;
-using System.Threading;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client.Protocol;
-using Apache.Qpid.Codec;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Client.Transport.Socket.Blocking
-{
- /// <summary>
- /// TCP Socket transport supporting both
- /// SSL and non-SSL connections.
- /// </summary>
- public class BlockingSocketTransport : ITransport
- {
- // Configuration variables.
- IProtocolListener _protocolListener;
-
- // Runtime variables.
- private ISocketConnector _connector;
- private IoHandler _ioHandler;
- private AmqpChannel _amqpChannel;
- private ManualResetEvent _stopEvent;
-
- public IProtocolWriter ProtocolWriter
- {
- get { return _amqpChannel; }
- }
- public string LocalEndpoint
- {
- get { return _connector.LocalEndpoint; }
- }
-
-
- /// <summary>
- /// Connect to the specified broker
- /// </summary>
- /// <param name="broker">The broker to connect to</param>
- /// <param name="connection">The AMQ connection</param>
- public void Connect(IBrokerInfo broker, AMQConnection connection)
- {
- _stopEvent = new ManualResetEvent(false);
- _protocolListener = connection.ProtocolListener;
-
- _ioHandler = MakeBrokerConnection(broker, connection);
- // todo: get default read size from config!
-
- IProtocolDecoderOutput decoderOutput =
- new ProtocolDecoderOutput(_protocolListener);
- _amqpChannel =
- new AmqpChannel(new ByteChannel(_ioHandler), decoderOutput);
-
- // post an initial async read
- _amqpChannel.BeginRead(new AsyncCallback(OnAsyncReadDone), this);
- }
-
- /// <summary>
- /// Close the broker connection
- /// </summary>
- public void Close()
- {
- StopReading();
- CloseBrokerConnection();
- }
-
- private void StopReading()
- {
- _stopEvent.Set();
- }
-
- private void CloseBrokerConnection()
- {
- if ( _ioHandler != null )
- {
- _ioHandler.Dispose();
- _ioHandler = null;
- }
- if ( _connector != null )
- {
- _connector.Dispose();
- _connector = null;
- }
- }
-
- private IoHandler MakeBrokerConnection(IBrokerInfo broker, AMQConnection connection)
- {
- if ( broker.UseSSL )
- {
- _connector = new SslSocketConnector();
- } else
- {
- _connector = new SocketConnector();
- }
-
- Stream stream = _connector.Connect(broker);
- return new IoHandler(stream, connection.ProtocolListener);
- }
-
- private void OnAsyncReadDone(IAsyncResult result)
- {
- try
- {
- _amqpChannel.EndRead(result);
-
- bool stopping = _stopEvent.WaitOne(0, false);
- if ( !stopping )
- _amqpChannel.BeginRead(new AsyncCallback(OnAsyncReadDone), null);
- } catch ( Exception e )
- {
- // ignore any errors during closing
- bool stopping = _stopEvent.WaitOne(0, false);
- if ( !stopping )
- _protocolListener.OnException(e);
- }
- }
-
- #region IProtocolDecoderOutput Members
-
- public void Write(object message)
- {
- _protocolListener.OnMessage((IDataBlock)message);
- }
-
- #endregion
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/ByteChannel.cs b/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/ByteChannel.cs
deleted file mode 100644
index 4540f01f4e..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/ByteChannel.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using log4net;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Client.Transport.Socket.Blocking
-{
- class ByteChannel : IByteChannel
- {
- // Warning: don't use this log for regular logging.
- private static readonly ILog _ioTraceLog = LogManager.GetLogger("TRACE.Qpid.Client.ByteChannel");
-
- private IByteChannel _lowerChannel;
-
- public ByteChannel(IByteChannel lowerChannel)
- {
- _lowerChannel = lowerChannel;
- }
-
- public ByteBuffer Read()
- {
- ByteBuffer result = _lowerChannel.Read();
-
- // TODO: Move into decorator.
- if (_ioTraceLog.IsDebugEnabled)
- {
- _ioTraceLog.Debug(String.Format("READ {0}", result));
- }
-
- return result;
- }
-
- public IAsyncResult BeginRead(AsyncCallback callback, object state)
- {
- return _lowerChannel.BeginRead(callback, state);
- }
-
- public ByteBuffer EndRead(IAsyncResult result)
- {
- ByteBuffer buffer = _lowerChannel.EndRead(result);
- if ( _ioTraceLog.IsDebugEnabled )
- {
- _ioTraceLog.Debug(String.Format("READ {0}", buffer));
- }
- return buffer;
- }
-
- public void Write(ByteBuffer buffer)
- {
- // TODO: Move into decorator.
- if (_ioTraceLog.IsDebugEnabled)
- {
- _ioTraceLog.Debug(String.Format("WRITE {0}", buffer));
- }
-
- _lowerChannel.Write(buffer);
- }
-
- public IAsyncResult BeginWrite(ByteBuffer buffer, AsyncCallback callback, object state)
- {
- if ( _ioTraceLog.IsDebugEnabled )
- {
- _ioTraceLog.Debug(String.Format("WRITE {0}", buffer));
- }
- return _lowerChannel.BeginWrite(buffer, callback, state);
- }
-
- public void EndWrite(IAsyncResult result)
- {
- _lowerChannel.EndWrite(result);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/ISocketConnector.cs b/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/ISocketConnector.cs
deleted file mode 100644
index 137fa19c0d..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/ISocketConnector.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.IO;
-using Apache.Qpid.Client.Qms;
-
-namespace Apache.Qpid.Client.Transport.Socket.Blocking
-{
- interface ISocketConnector : IDisposable
- {
- string LocalEndpoint { get; }
- Stream Connect(IBrokerInfo broker);
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/SocketConnector.cs b/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/SocketConnector.cs
deleted file mode 100644
index b6dd8c3be1..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/SocketConnector.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.IO;
-using System.Net;
-using System.Net.Sockets;
-using Apache.Qpid.Client.Qms;
-
-namespace Apache.Qpid.Client.Transport.Socket.Blocking
-{
- /// <summary>
- /// Implements a TCP connection over regular sockets.
- /// </summary>
- class SocketConnector : ISocketConnector
- {
- private MyTcpClient _tcpClient;
-
- public string LocalEndpoint
- {
- get { return _tcpClient.LocalEndpoint.ToString(); }
- }
-
- public Stream Connect(IBrokerInfo broker)
- {
- _tcpClient = new MyTcpClient(broker.Host, broker.Port);
- return _tcpClient.GetStream();
- }
-
- public void Dispose()
- {
- if ( _tcpClient != null )
- {
- _tcpClient.Close();
- _tcpClient = null;
- }
- }
-
- class MyTcpClient : TcpClient
- {
- public MyTcpClient(string host, int port)
- : base(host, port)
- {
- }
-
- public EndPoint LocalEndpoint
- {
- get { return Client.LocalEndPoint; }
- }
- }
-
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/SslSocketConnector.cs b/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/SslSocketConnector.cs
deleted file mode 100644
index 8436e6fc4f..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Transport/Socket/Blocking/SslSocketConnector.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.IO;
-using System.Net;
-using log4net;
-using Apache.Qpid.Client.Qms;
-using Org.Mentalis.Security.Ssl;
-using MCertificate = Org.Mentalis.Security.Certificates.Certificate;
-using MCertificateChain = Org.Mentalis.Security.Certificates.CertificateChain;
-
-namespace Apache.Qpid.Client.Transport.Socket.Blocking
-{
- /// <summary>
- /// Implements a TLS v1.0 connection using the Mentalis.org library
- /// </summary>
- /// <remarks>
- /// It would've been easier to implement this at the StreamFilter
- /// level, but unfortunately the Mentalis library doesn't support
- /// a passthrough SSL stream class and is tied directly
- /// to socket-like classes.
- /// </remarks>
- class SslSocketConnector : ISocketConnector
- {
- private static ILog _logger = LogManager.GetLogger(typeof(SslSocketConnector));
- private MyTcpClient _tcpClient;
-
- public string LocalEndpoint
- {
- get { return _tcpClient.LocalEndpoint.ToString(); }
- }
-
- public Stream Connect(IBrokerInfo broker)
- {
- MCertificate cert = GetClientCert(broker);
- SecurityOptions options = new SecurityOptions(
- SecureProtocol.Tls1, cert, ConnectionEnd.Client
- );
- if ( broker.SslOptions != null
- && broker.SslOptions.IgnoreValidationErrors )
- {
- _logger.Warn("Ignoring any certificate validation errors during SSL handshake...");
- options.VerificationType = CredentialVerification.None;
- }
-
- _tcpClient = new MyTcpClient(broker.Host, broker.Port, options);
- return _tcpClient.GetStream();
- }
-
- public void Dispose()
- {
- if ( _tcpClient != null )
- {
- _tcpClient.Close();
- _tcpClient = null;
- }
- }
-
- private static MCertificate GetClientCert(IBrokerInfo broker)
- {
- // if a client certificate is configured,
- // use that to enable mutual authentication
- MCertificate cert = null;
- if ( broker.SslOptions != null
- && broker.SslOptions.ClientCertificate != null )
- {
- cert = MCertificate.CreateFromX509Certificate(
- broker.SslOptions.ClientCertificate
- );
- _logger.DebugFormat("Using Client Certificate for SSL '{0}'", cert.ToString(true));
- }
- return cert;
- }
-
- class MyTcpClient : SecureTcpClient
- {
- public MyTcpClient(string host, int port, SecurityOptions options)
- : base(host, port, options)
- {
- }
-
- public EndPoint LocalEndpoint
- {
- get { return Client.LocalEndPoint; }
- }
-
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Client/Util/FlowControlQueue.cs b/qpid/dotnet/Qpid.Client/Client/Util/FlowControlQueue.cs
deleted file mode 100644
index a06de9eac8..0000000000
--- a/qpid/dotnet/Qpid.Client/Client/Util/FlowControlQueue.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Text;
-using System.Threading;
-using Apache.Qpid.Collections;
-using Apache.Qpid.Common;
-
-namespace Apache.Qpid.Client.Util
-{
- internal delegate void ThresholdMethod(int currentCount);
-
- /// <summary>
- /// Basic bounded queue used to implement prefetching.
- /// Notice we do the callbacks here asynchronously to
- /// avoid adding more complexity to the channel impl.
- /// </summary>
- internal class FlowControlQueue
- {
- private BlockingQueue _queue = new LinkedBlockingQueue();
- private int _itemCount;
- private int _lowerBound;
- private int _upperBound;
- private ThresholdMethod _underThreshold;
- private ThresholdMethod _overThreshold;
-
- public FlowControlQueue(
- int lowerBound,
- int upperBound,
- ThresholdMethod underThreshold,
- ThresholdMethod overThreshold
- )
- {
- _lowerBound = lowerBound;
- _upperBound = upperBound;
- _underThreshold = underThreshold;
- _overThreshold = overThreshold;
- }
-
- public void Enqueue(object item)
- {
- _queue.EnqueueBlocking(item);
- int count = Interlocked.Increment(ref _itemCount);
- if ( _overThreshold != null )
- {
- if ( count == _upperBound )
- {
- _overThreshold.BeginInvoke(
- count, new AsyncCallback(OnAsyncCallEnd),
- _overThreshold
- );
- }
- }
- }
-
- public object Dequeue()
- {
- object item = _queue.DequeueBlocking();
- int count = Interlocked.Decrement(ref _itemCount);
- if ( _underThreshold != null )
- {
- if ( count == _lowerBound )
- {
- _underThreshold.BeginInvoke(
- count, new AsyncCallback(OnAsyncCallEnd),
- _underThreshold
- );
- }
- }
- return item;
- }
-
- private void OnAsyncCallEnd(IAsyncResult res)
- {
- ThresholdMethod method = (ThresholdMethod)res.AsyncState;
- method.EndInvoke(res);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/Properties/AssemblyInfo.cs b/qpid/dotnet/Qpid.Client/Properties/AssemblyInfo.cs
deleted file mode 100644
index 670a4f90b2..0000000000
--- a/qpid/dotnet/Qpid.Client/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Reflection;
-using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Apache.Qpid.Client")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Apache.Qpid.Client")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("380cb124-07a8-40c2-b67d-69a0d94cb620")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
diff --git a/qpid/dotnet/Qpid.Client/Qpid.Client.csproj b/qpid/dotnet/Qpid.Client/Qpid.Client.csproj
deleted file mode 100644
index 303f885149..0000000000
--- a/qpid/dotnet/Qpid.Client/Qpid.Client.csproj
+++ /dev/null
@@ -1,102 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{68987C05-3768-452C-A6FC-6BA1D372852F}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Apache.Qpid.Client</RootNamespace>
- <AssemblyName>Apache.Qpid.Client</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\net-2.0\debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\net-2.0\release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="log4net, Version=1.2.0.30714, Culture=neutral, PublicKeyToken=500ffcafb14f92df">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\Qpid.Common\lib\log4net\log4net.dll</HintPath>
- </Reference>
- <Reference Include="Org.Mentalis.Security, Version=1.0.13.716, Culture=neutral, PublicKeyToken=085a8f6006888436">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\Qpid.Common\lib\seclib-1.0.0\Org.Mentalis.Security.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Qpid.Buffer\Qpid.Buffer.csproj">
- <Project>{44384DF2-B0A4-4580-BDBC-EE4BAA87D995}</Project>
- <Name>Qpid.Buffer</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Codec\Qpid.Codec.csproj">
- <Project>{22D0D0C2-77AF-4DE3-B456-7FF3893F9F88}</Project>
- <Name>Qpid.Codec</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Messaging\Qpid.Messaging.csproj">
- <Project>{6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}</Project>
- <Name>Qpid.Messaging</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Common\Qpid.Common.csproj">
- <Project>{77064C42-24D2-4CEB-9EA2-0EF481A43205}</Project>
- <Name>Qpid.Common</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Sasl\Qpid.Sasl.csproj">
- <Project>{1465B0EE-6452-42A6-AB73-B2F9EABEEE75}</Project>
- <Name>Qpid.Sasl</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/Qpid.Client/default.build b/qpid/dotnet/Qpid.Client/default.build
deleted file mode 100644
index 9a0ec2ea6d..0000000000
--- a/qpid/dotnet/Qpid.Client/default.build
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Apache.Qpid.Client" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="library"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.dll">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/Apache.Qpid.Buffer.dll" />
- <include name="${build.dir}/Apache.Qpid.Sasl.dll" />
- <include name="${build.dir}/Apache.Qpid.Codec.dll" />
- <include name="${build.dir}/Apache.Qpid.Common.dll" />
- <include name="${build.dir}/Apache.Qpid.Messaging.dll" />
- <include name="${build.dir}/Org.Mentalis.Security.dll" />
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/Qpid.Client/qms/BrokerInfo.cs b/qpid/dotnet/Qpid.Client/qms/BrokerInfo.cs
deleted file mode 100644
index 93c00af6e0..0000000000
--- a/qpid/dotnet/Qpid.Client/qms/BrokerInfo.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Client.Qms
-{
- /// <summary>
- /// Know URL option names.
- /// <seealso cref="IConnectionInfo"/>
- /// </summary>
- public class BrokerInfoConstants
- {
- public const String OPTIONS_RETRY = "retries";
- public const String OPTIONS_SSL = ConnectionUrlConstants.OPTIONS_SSL;
- public const String OPTIONS_CONNECT_TIMEOUT = "connecttimeout";
- public const int DEFAULT_PORT = 5672;
- public const String DEFAULT_TRANSPORT = "tcp";
-
- public readonly string URL_FORMAT_EXAMPLE =
- "<transport>://<hostname>[:<port Default=\"" + DEFAULT_PORT + "\">][?<option>='<value>'[,<option>='<value>']]";
-
- public const long DEFAULT_CONNECT_TIMEOUT = 30000L;
- }
-
- public interface IBrokerInfo
- {
- string Host { get; set; }
- int Port { get; set; }
- string Transport { get; set; }
- bool UseSSL { get; set; }
- long Timeout { get; set; }
- SslOptions SslOptions { get; }
-
- String GetOption(string key);
- void SetOption(string key, string value);
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/qms/ConnectionInfo.cs b/qpid/dotnet/Qpid.Client/qms/ConnectionInfo.cs
deleted file mode 100644
index 4d3f7698b5..0000000000
--- a/qpid/dotnet/Qpid.Client/qms/ConnectionInfo.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Collections;
-
-namespace Apache.Qpid.Client.Qms
-{
- class ConnectionUrlConstants
- {
- public const string AMQ_PROTOCOL = "amqp";
- public const string OPTIONS_BROKERLIST = "brokerlist";
- public const string OPTIONS_FAILOVER = "failover";
- public const string OPTIONS_FAILOVER_CYCLE = "cyclecount";
- public const string OPTIONS_SSL = "ssl";
- }
-
- /// <summary>
- /// Connection URL format
- /// amqp://[user:pass@][clientid]/virtualhost?brokerlist='tcp://host:port?option=\'value\'&amp;option=\'value\';vm://:3/virtualpath?option=\'value\''&amp;failover='method?option=\'value\'&amp;option='value''"
- /// Options are of course optional except for requiring a single broker in the broker list.
- /// The option seperator is defined to be either '&amp;' or ','
- /// </summary>
- public interface IConnectionInfo
- {
- string AsUrl();
-
- string FailoverMethod { get; set; }
- string ClientName { get; set; }
- string Username { get; set; }
- string Password { get; set; }
- string VirtualHost { get; set; }
- string GetFailoverOption(string key);
-
- int BrokerCount { get; }
-
- IBrokerInfo GetBrokerInfo(int index);
-
- void AddBrokerInfo(IBrokerInfo broker);
-
- IList GetAllBrokerInfos();
-
- string GetOption(string key);
-
- void SetOption(string key, string value);
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/qms/FailoverPolicy.cs b/qpid/dotnet/Qpid.Client/qms/FailoverPolicy.cs
deleted file mode 100644
index 179a695bf9..0000000000
--- a/qpid/dotnet/Qpid.Client/qms/FailoverPolicy.cs
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Text;
-using log4net;
-using Apache.Qpid.Client.Qms.Failover;
-
-namespace Apache.Qpid.Client.Qms
-{
- public class FailoverPolicy
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(FailoverPolicy));
-
- private const long MINUTE = 60000L;
-
- private const long DEFAULT_METHOD_TIMEOUT = 1 * MINUTE;
- private const long DEFAULT_FAILOVER_TIMEOUT = 4 * MINUTE;
-
- private IFailoverMethod[] _methods = new IFailoverMethod[1];
-
- private int _currentMethod;
-
- private int _methodsRetries;
-
- private int _currentRetry;
-
- private bool _timing;
-
- private long _lastMethodTime;
- private long _lastFailTime;
-
- public FailoverPolicy(IConnectionInfo connectionInfo)
- {
- IFailoverMethod method;
-
- //todo This should be integrated in to the connection url when it supports
- // multiple strategies.
-
- _methodsRetries = 0;
-
- if (connectionInfo.FailoverMethod == null)
- {
- if (connectionInfo.BrokerCount > 1)
- {
- method = new FailoverRoundRobin(connectionInfo);
- }
- else
- {
- method = new FailoverSingleServer(connectionInfo);
- }
- }
- else
- {
- string failoverMethod = connectionInfo.FailoverMethod;
-
- /*
- if (failoverMethod.equals(FailoverMethod.RANDOM))
- {
- //todo write a random connection Failover
- }
- */
- if (failoverMethod.Equals(FailoverMethodConstants.ROUND_ROBIN))
- {
- method = new FailoverRoundRobin(connectionInfo);
- }
- else
- {
- throw new NotImplementedException("Dynamic loading of FailoverMethods not yet implemented.");
-// try
-// {
-// Type[] constructorSpec = {ConnectionInfo.class};
-// Object [] params = {connectionInfo};
-//
-// method = (FailoverMethod) ClassLoader.getSystemClassLoader().
-// loadClass(failoverMethod).
-// getConstructor(constructorSpec).newInstance(params);
-// }
-// catch (Exception cnfe)
-// {
-// throw new IllegalArgumentException("Unknown failover method:" + failoverMethod);
-// }
- }
- }
-
- if (method == null)
- {
- throw new ArgumentException("Unknown failover method specified.");
- }
-
- reset();
-
- _methods[_currentMethod] = method;
- }
-
- public FailoverPolicy(IFailoverMethod method) : this(method, 0)
- {
- }
-
- public FailoverPolicy(IFailoverMethod method, int retries)
- {
- _methodsRetries = retries;
-
- reset();
-
- _methods[_currentMethod] = method;
- }
-
- private void reset()
- {
- _currentMethod = 0;
- _currentRetry = 0;
- _timing = false;
-
- }
-
- public bool FailoverAllowed()
- {
- bool failoverAllowed;
-
- if (_timing)
- {
- long now = CurrentTimeMilliseconds();
-
- if ((now - _lastMethodTime) >= DEFAULT_METHOD_TIMEOUT)
- {
- _logger.Info("Failover method timeout");
- _lastMethodTime = now;
-
- if (!nextMethod())
- {
- return false;
- }
-
-
- }
- else if ((now - _lastFailTime) >= DEFAULT_FAILOVER_TIMEOUT)
- {
- _logger.Info("Failover timeout");
- return false;
- }
- else
- {
- _lastMethodTime = now;
- }
- }
- else
- {
- _timing = true;
- _lastMethodTime = CurrentTimeMilliseconds();
- _lastFailTime = _lastMethodTime;
- }
-
-
- if (_methods[_currentMethod].FailoverAllowed())
- {
- failoverAllowed = true;
- }
- else
- {
- if (_currentMethod < (_methods.Length - 1))
- {
- nextMethod();
- _logger.Info("Changing method to " + _methods[_currentMethod].MethodName);
- return FailoverAllowed();
- }
- else
- {
- return cycleMethods();
- }
- }
-
- return failoverAllowed;
- }
-
- private static long CurrentTimeMilliseconds()
- {
- return DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;
- }
-
- private bool nextMethod()
- {
- if (_currentMethod < (_methods.Length - 1))
- {
- _currentMethod++;
- _methods[_currentMethod].Reset();
- return true;
- }
- else
- {
- return cycleMethods();
- }
- }
-
- private bool cycleMethods()
- {
- if (_currentRetry < _methodsRetries)
- {
- _currentRetry++;
-
- _currentMethod = 0;
-
- _logger.Info("Retrying methods starting with " + _methods[_currentMethod].MethodName);
- _methods[_currentMethod].Reset();
- return FailoverAllowed();
- }
- else
- {
- _logger.Debug("All failover methods exhausted");
- return false;
- }
- }
-
- /**
- * Notification that connection was successful.
- */
- public void attainedConnection()
- {
- _currentRetry = 0;
-
- _methods[_currentMethod].AttainedConnection();
-
- _timing = false;
- }
-
- public IBrokerInfo GetCurrentBrokerInfo()
- {
- return _methods[_currentMethod].GetCurrentBrokerInfo();
- }
-
- public IBrokerInfo GetNextBrokerInfo()
- {
- return _methods[_currentMethod].GetNextBrokerDetails();
- }
-
- public void setBroker(IBrokerInfo broker)
- {
- _methods[_currentMethod].SetBroker(broker);
- }
-
- public void addMethod(IFailoverMethod method)
- {
- int len = _methods.Length + 1;
- IFailoverMethod[] newMethods = new IFailoverMethod[len];
- _methods.CopyTo(newMethods, 0);
-// System.arraycopy(_methods, 0, newMethods, 0, _methods.length);
- int index = len - 1;
- newMethods[index] = method;
- _methods = newMethods;
- }
-
- public void setMethodRetries(int retries)
- {
- _methodsRetries = retries;
- }
-
- public IFailoverMethod getCurrentMethod()
- {
- if (_currentMethod >= 0 && _currentMethod < (_methods.Length - 1))
- {
- return _methods[_currentMethod];
- }
- else
- {
- return null;
- }
- }
-
- public String toString()
- {
- StringBuilder sb = new StringBuilder();
-
- sb.Append("Failover Policy:\n");
-
- if (FailoverAllowed())
- {
- sb.Append("Failover allowed\n");
- }
- else
- {
- sb.Append("Failover not allowed\n");
- }
-
- sb.Append("Failover policy methods\n");
- for (int i = 0; i < _methods.Length; i++)
- {
-
- if (i == _currentMethod)
- {
- sb.Append(">");
- }
- sb.Append(_methods[i].ToString());
- }
-
- return sb.ToString();
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/qms/UrlSyntaxException.cs b/qpid/dotnet/Qpid.Client/qms/UrlSyntaxException.cs
deleted file mode 100644
index ab3de325d4..0000000000
--- a/qpid/dotnet/Qpid.Client/qms/UrlSyntaxException.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-using System.Text;
-
-namespace Apache.Qpid.Client.Qms
-{
- [Serializable]
- public class UrlSyntaxException : UriFormatException
- {
- private string _url;
- private int _index;
- private int _length;
-
- public int GetIndex()
- {
- return _index;
- }
-
- public UrlSyntaxException(String input, String reason)
- : this(input, reason, -1)
- {
- }
-
- private UrlSyntaxException(string input, string reason, int index)
- :
- this(input, reason, index, input.Length)
- {
- }
-
- public UrlSyntaxException(String url, String error, int index, int length)
- : base(error)
- {
- _url = url;
- _index = index;
- _length = length;
- }
-
- protected UrlSyntaxException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- _url = info.GetString("Url");
- _index = info.GetInt32("Index");
- _length = info.GetInt32("Length");
- }
-
- public override void GetObjectData(SerializationInfo info, StreamingContext context)
- {
- base.GetObjectData(info, context);
- info.AddValue("Url", _url);
- info.AddValue("Index", _index);
- info.AddValue("Length", _length);
- }
-
- private static String getPositionString(int index, int length)
- {
- StringBuilder sb = new StringBuilder(index + 1);
-
- for (int i = 0; i < index; i++)
- {
- sb.Append(" ");
- }
-
- if (length > -1)
- {
- for (int i = 0; i < length; i++)
- {
- sb.Append('^');
- }
- }
-
- return sb.ToString();
- }
-
-
- public String toString()
- {
- StringBuilder sb = new StringBuilder();
-
-// sb.Append(getReason());
-
- if (_index > -1)
- {
- if (_length != -1)
- {
- sb.Append(" between indicies ");
- sb.Append(_index);
- sb.Append(" and ");
- sb.Append(_length);
- }
- else
- {
- sb.Append(" at index ");
- sb.Append(_index);
- }
- }
-
- sb.Append(" ");
- if (_index != -1)
- {
- sb.Append("\n");
- }
-
- sb.Append(_url);
-
- if (_index != -1)
- {
- sb.Append("\n");
- sb.Append(getPositionString(_index, _length));
- }
-
- return sb.ToString();
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/qms/failover/FailoverMethod.cs b/qpid/dotnet/Qpid.Client/qms/failover/FailoverMethod.cs
deleted file mode 100644
index f32b275e84..0000000000
--- a/qpid/dotnet/Qpid.Client/qms/failover/FailoverMethod.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Client.Qms.Failover
-{
- public class FailoverMethodConstants
- {
- public const String ROUND_ROBIN = "roundrobin";
- public const String RANDOM = "random";
- }
-
- public interface IFailoverMethod
- {
- /// <summary>
- /// The name of this method for display purposes.
- /// </summary>
- String MethodName { get; }
-
- /// <summary>
- /// Reset the Failover to initial conditions
- /// </summary>
- void Reset();
-
- /// <summary>
- /// Check if failover is possible for this method
- /// </summary>
- /// <returns>true if failover is allowed</returns>
- bool FailoverAllowed();
-
- /// <summary>
- /// Notification to the Failover method that a connection has been attained.
- /// </summary>
- void AttainedConnection();
-
- /// <summary>
- /// If there is no current BrokerInfo the null will be returned.
- /// </summary>
- /// <returns>The current BrokerDetail value to use</returns>
- IBrokerInfo GetCurrentBrokerInfo();
-
- /// <summary>
- /// Move to the next BrokerInfo if one is available.
- /// </summary>
- /// <returns>the next BrokerDetail or null if there is none.</returns>
- IBrokerInfo GetNextBrokerDetails();
-
- /// <summary>
- /// Set the currently active broker to be the new value.
- /// </summary>
- /// <param name="broker">The new BrokerDetail value</param>
- void SetBroker(IBrokerInfo broker);
-
- /// <summary>
- /// Set the retries for this method
- /// </summary>
- /// <param name="maxRetries">the maximum number of time to retry this Method</param>
- void SetRetries(int maxRetries);
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/qms/failover/FailoverRoundRobin.cs b/qpid/dotnet/Qpid.Client/qms/failover/FailoverRoundRobin.cs
deleted file mode 100644
index 8103940fb4..0000000000
--- a/qpid/dotnet/Qpid.Client/qms/failover/FailoverRoundRobin.cs
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Text;
-using log4net;
-
-namespace Apache.Qpid.Client.Qms.Failover
-{
- public class FailoverRoundRobin : IFailoverMethod
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(FailoverRoundRobin));
-
- /** The default number of times to cycle through all servers */
- public const int DEFAULT_CYCLE_RETRIES = 0;
- /** The default number of times to retry each server */
- public const int DEFAULT_SERVER_RETRIES = 0;
-
- /**
- * The index into the hostDetails array of the broker to which we are connected
- */
- private int _currentBrokerIndex = -1;
-
- /**
- * The number of times to retry connecting for each server
- */
- private int _serverRetries;
-
- /**
- * The current number of retry attempts made
- */
- private int _currentServerRetry;
-
- /**
- * The number of times to cycle through the servers
- */
- private int _cycleRetries;
-
- /**
- * The current number of cycles performed.
- */
- private int _currentCycleRetries;
-
- /**
- * Array of BrokerDetail used to make connections.
- */
- private IConnectionInfo _connectionDetails;
-
- public FailoverRoundRobin(IConnectionInfo connectionDetails)
- {
- if (!(connectionDetails.BrokerCount > 0))
- {
- throw new ArgumentException("At least one broker details must be specified.");
- }
-
- _connectionDetails = connectionDetails;
-
- //There is no current broker at startup so set it to -1.
- _currentBrokerIndex = -1;
-
- String cycleRetries = _connectionDetails.GetFailoverOption(ConnectionUrlConstants.OPTIONS_FAILOVER_CYCLE);
-
- if (cycleRetries != null)
- {
- try
- {
- _cycleRetries = int.Parse(cycleRetries);
- }
- catch (FormatException)
- {
- _cycleRetries = DEFAULT_CYCLE_RETRIES;
- }
- }
-
- _currentCycleRetries = 0;
-
- _serverRetries = 0;
- _currentServerRetry = -1;
- }
-
- public void Reset()
- {
- _currentBrokerIndex = 0;
- _currentCycleRetries = 0;
- _currentServerRetry = -1;
- }
-
- public bool FailoverAllowed()
- {
- return ((_currentCycleRetries < _cycleRetries)
- || (_currentServerRetry < _serverRetries)
- || (_currentBrokerIndex < (_connectionDetails.BrokerCount - 1)));
- }
-
- public void AttainedConnection()
- {
- _currentCycleRetries = 0;
- _currentServerRetry = -1;
- }
-
- public IBrokerInfo GetCurrentBrokerInfo()
- {
- if (_currentBrokerIndex == -1)
- {
- return null;
- }
-
- return _connectionDetails.GetBrokerInfo(_currentBrokerIndex);
- }
-
- public IBrokerInfo GetNextBrokerDetails()
- {
- if (_currentBrokerIndex == (_connectionDetails.BrokerCount - 1))
- {
- if (_currentServerRetry < _serverRetries)
- {
- if (_currentBrokerIndex == -1)
- {
- _currentBrokerIndex = 0;
-
- SetBroker(_connectionDetails.GetBrokerInfo(_currentBrokerIndex ));
-
- _logger.Info("First Run using " + _connectionDetails.GetBrokerInfo(_currentBrokerIndex));
- }
- else
- {
- _logger.Info("Retrying " + _connectionDetails.GetBrokerInfo(_currentBrokerIndex));
- }
-
- _currentServerRetry++;
- }
- else
- {
- _currentCycleRetries++;
- //failed to connect to first broker
- _currentBrokerIndex = 0;
-
- SetBroker(_connectionDetails.GetBrokerInfo(_currentBrokerIndex ));
-
- // This is zero rather than -1 as we are already retrieving the details.
- _currentServerRetry = 0;
- }
- //else - should force client to stop as max retries has been reached.
- }
- else
- {
- if (_currentServerRetry < _serverRetries)
- {
- if (_currentBrokerIndex == -1)
- {
- _currentBrokerIndex = 0;
-
- SetBroker(_connectionDetails.GetBrokerInfo(_currentBrokerIndex ));
-
- _logger.Info("First Run using " + _connectionDetails.GetBrokerInfo(_currentBrokerIndex));
- }
- else
- {
- _logger.Info("Retrying " + _connectionDetails.GetBrokerInfo(_currentBrokerIndex));
- }
- _currentServerRetry++;
- }
- else
- {
- _currentBrokerIndex++;
-
- SetBroker(_connectionDetails.GetBrokerInfo(_currentBrokerIndex ));
- // This is zero rather than -1 as we are already retrieving the details.
- _currentServerRetry = 0;
- }
- }
-
- return _connectionDetails.GetBrokerInfo(_currentBrokerIndex);
- }
-
- public void SetBroker(IBrokerInfo broker)
- {
- _connectionDetails.AddBrokerInfo(broker);
-
- int index = _connectionDetails.GetAllBrokerInfos().IndexOf(broker);
-
- String serverRetries = broker.GetOption(BrokerInfoConstants.OPTIONS_RETRY);
-
- if (serverRetries != null)
- {
- try
- {
- _serverRetries = int.Parse(serverRetries);
- }
- catch (FormatException)
- {
- _serverRetries = DEFAULT_SERVER_RETRIES;
- }
- }
-
- _currentServerRetry = -1;
- _currentBrokerIndex = index;
- }
-
- public void SetRetries(int maxRetries)
- {
- _cycleRetries = maxRetries;
- }
-
- public String MethodName
- {
- get { return "Cycle Servers"; }
- }
-
- public override string ToString()
- {
- StringBuilder sb = new StringBuilder();
-
- sb.Append(GetType().Name).Append("\n");
-
- sb.Append("Broker count: ").Append(_connectionDetails.BrokerCount);
- sb.Append("\ncurrent broker index: ").Append(_currentBrokerIndex);
-
- sb.Append("\nCycle Retries: ").Append(_cycleRetries);
- sb.Append("\nCurrent Cycle:").Append(_currentCycleRetries);
- sb.Append("\nServer Retries:").Append(_serverRetries);
- sb.Append("\nCurrent Retry:").Append(_currentServerRetry);
- sb.Append("\n");
-
- for(int i=0; i < _connectionDetails.BrokerCount ; i++)
- {
- if (i == _currentBrokerIndex)
- {
- sb.Append(">");
- }
- sb.Append(_connectionDetails.GetBrokerInfo(i));
- sb.Append("\n");
- }
-
- return sb.ToString();
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs b/qpid/dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs
deleted file mode 100644
index 5e502b897e..0000000000
--- a/qpid/dotnet/Qpid.Client/qms/failover/FailoverSingleServer.cs
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Client.Qms.Failover
-{
- public class FailoverSingleServer : IFailoverMethod
- {
- /** The default number of times to rety a conection to this server */
- public const int DEFAULT_SERVER_RETRIES = 1;
-
- /**
- * The details of the Single Server
- */
- private IBrokerInfo _brokerDetail;
-
- /**
- * The number of times to retry connecting to the sever
- */
- private int _retries;
-
- /**
- * The current number of attempts made to the server
- */
- private int _currentRetries;
-
-
- public FailoverSingleServer(IConnectionInfo connectionDetails)
- {
- if (connectionDetails.BrokerCount > 0)
- {
- SetBroker(connectionDetails.GetBrokerInfo(0));
- }
- else
- {
- throw new ArgumentException("BrokerInfo details required for connection.");
- }
- }
-
- public FailoverSingleServer(IBrokerInfo brokerDetail)
- {
- SetBroker(brokerDetail);
- }
-
- public void Reset()
- {
- _currentRetries = -1;
- }
-
- public bool FailoverAllowed()
- {
- return _currentRetries < _retries;
- }
-
- public void AttainedConnection()
- {
- Reset();
- }
-
- public IBrokerInfo GetCurrentBrokerInfo()
- {
- return _brokerDetail;
- }
-
- public IBrokerInfo GetNextBrokerDetails()
- {
- if (_currentRetries == _retries)
- {
- return null;
- }
- else
- {
- if (_currentRetries < _retries)
- {
- _currentRetries ++;
- }
-
- return _brokerDetail;
- }
- }
-
- public void SetBroker(IBrokerInfo broker)
- {
- if (broker == null)
- {
- throw new ArgumentException("BrokerInfo details cannot be null");
- }
- _brokerDetail = broker;
-
- String retries = broker.GetOption(BrokerInfoConstants.OPTIONS_RETRY);
- if (retries != null)
- {
- try
- {
- _retries = int.Parse(retries);
- }
- catch (FormatException)
- {
- _retries = DEFAULT_SERVER_RETRIES;
- }
- }
- else
- {
- _retries = DEFAULT_SERVER_RETRIES;
- }
-
- Reset();
- }
-
- public void SetRetries(int retries)
- {
- _retries = retries;
- }
-
- public String MethodName
- {
- get { return "Single Server"; }
- }
-
- public String toString()
- {
- return "SingleServer:\n"+
- "Max Retries:"+_retries+
- "\nCurrent Retry:"+_currentRetries+
- "\n"+_brokerDetail+"\n";
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Codec/CumulativeProtocolDecoder.cs b/qpid/dotnet/Qpid.Codec/CumulativeProtocolDecoder.cs
deleted file mode 100644
index 6cfd75c851..0000000000
--- a/qpid/dotnet/Qpid.Codec/CumulativeProtocolDecoder.cs
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using log4net;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Codec
-{
- public abstract class CumulativeProtocolDecoder : IProtocolDecoder
- {
- static ILog _logger = LogManager.GetLogger(typeof(CumulativeProtocolDecoder));
-
- ByteBuffer _remaining;
-
- /// <summary>
- /// Creates a new instance with the 4096 bytes initial capacity of
- /// cumulative buffer.
- /// </summary>
- protected CumulativeProtocolDecoder()
- {
- _remaining = AllocateBuffer();
- }
-
- /// <summary>
- /// Cumulates content of <tt>in</tt> into internal buffer and forwards
- /// decoding request to {@link #doDecode(IoSession, ByteBuffer, ProtocolDecoderOutput)}.
- /// <tt>doDecode()</tt> is invoked repeatedly until it returns <tt>false</tt>
- /// and the cumulative buffer is compacted after decoding ends.
- /// </summary>
- /// <exception cref="Exception">
- /// if your <tt>doDecode()</tt> returned <tt>true</tt> not consuming the cumulative buffer.
- /// </exception>
- public void Decode(ByteBuffer input, IProtocolDecoderOutput output)
- {
- if ( _remaining.Position != 0 ) // If there were remaining undecoded bytes
- {
- DecodeRemainingAndInput(input, output);
- } else
- {
- DecodeInput(input, output);
- }
- }
-
- private void DecodeInput(ByteBuffer input, IProtocolDecoderOutput output)
- {
- _logger.Debug(string.Format("DecodeInput: input {0}", input.Remaining));
- // Just decode the input buffer and remember any remaining undecoded bytes.
- try
- {
- DecodeAll(input, output);
- } finally
- {
- if ( input.HasRemaining )
- {
- _remaining.Put(input);
- }
- }
- }
-
- private void DecodeRemainingAndInput(ByteBuffer input, IProtocolDecoderOutput output)
- {
- _logger.Debug(string.Format("DecodeRemainingAndInput: input {0}, remaining {1}", input.Remaining, _remaining.Position));
- // replace the _remainder buffer, so that we can leave the
- // original one alone. Necessary because some consumer splice
- // the buffer and only consume it until later, causing
- // a race condition if we compact it too soon.
- ByteBuffer newRemainding = AllocateBuffer();
- ByteBuffer temp = _remaining;
- _remaining = newRemainding;
- temp.Put(input);
- temp.Flip();
- try
- {
- DecodeAll(temp, output);
- } finally
- {
- if ( temp.Remaining > 0 )
- _remaining.Put(temp);
- }
- }
-
- private void DecodeAll(ByteBuffer buf, IProtocolDecoderOutput output)
- {
- for ( ; ; )
- {
- int oldPos = buf.Position;
- bool decoded = DoDecode(buf, output);
- if ( decoded )
- {
- if ( buf.Position == oldPos )
- {
- throw new Exception(
- "doDecode() can't return true when buffer is not consumed.");
- }
-
- if ( !buf.HasRemaining )
- {
- break;
- }
- } else
- {
- break;
- }
- }
- }
-
- /// <summary>
- /// Implement this method to consume the specified cumulative buffer and
- /// decode its content into message(s).
- /// </summary>
- /// <param name="input">the cumulative buffer</param>
- /// <param name="output">decoder output</param>
- /// <returns>
- /// <tt>true</tt> if and only if there's more to decode in the buffer
- /// and you want to have <tt>doDecode</tt> method invoked again.
- /// Return <tt>false</tt> if remaining data is not enough to decode,
- /// then this method will be invoked again when more data is cumulated.
- /// </returns>
- /// <exception cref="Exception">If cannot decode</exception>
- protected abstract bool DoDecode(ByteBuffer input, IProtocolDecoderOutput output);
-
- public void Dispose()
- {
- _remaining = null;
- }
-
- private ByteBuffer AllocateBuffer()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(4096);
- buffer.IsAutoExpand = true;
- return buffer;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Codec/Demux/DemuxingProtocolCodecFactory.cs b/qpid/dotnet/Qpid.Codec/Demux/DemuxingProtocolCodecFactory.cs
deleted file mode 100644
index 78276202d6..0000000000
--- a/qpid/dotnet/Qpid.Codec/Demux/DemuxingProtocolCodecFactory.cs
+++ /dev/null
@@ -1,387 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Codec.Demux
-{
- public class DemuxingProtocolCodecFactory : IProtocolCodecFactory
- {
- private ArrayList _decoderFactories = new ArrayList();
- private ArrayList _encoderFactories = new ArrayList();
-
- public void Register(Type encoderOrDecoderClass)
- {
- if (encoderOrDecoderClass == null)
- {
- throw new ArgumentNullException("encoderOrDecoderClass");
- }
-
- bool registered = false;
- if (typeof(IMessageEncoder).IsAssignableFrom(encoderOrDecoderClass))
- {
- Register(new DefaultConstructorMessageEncoderFactory(encoderOrDecoderClass));
- registered = true;
- }
-
- if (typeof(IMessageDecoder).IsAssignableFrom(encoderOrDecoderClass))
- {
- Register(new DefaultConstructorMessageDecoderFactory(encoderOrDecoderClass));
- registered = true;
- }
-
- if (!registered)
- {
- throw new ArgumentException("Unregisterable type: " + encoderOrDecoderClass);
- }
- }
-
- public void Register(IMessageEncoder encoder)
- {
- Register(new SingletonMessageEncoderFactory(encoder));
- }
-
- public void Register(IMessageEncoderFactory factory)
- {
- if (factory == null)
- {
- throw new ArgumentNullException("factory");
- }
-
- _encoderFactories.Add(factory);
- }
-
- public void Register(IMessageDecoder decoder)
- {
- Register(new SingletonMessageDecoderFactory(decoder));
- }
-
- public void Register(IMessageDecoderFactory factory)
- {
- if (factory == null)
- {
- throw new ArgumentNullException("factory");
- }
- _decoderFactories.Add(factory);
- }
-
- public IProtocolEncoder Encoder
- {
- get
- {
- return new ProtocolEncoderImpl(this);
- }
- }
-
- public IProtocolDecoder Decoder
- {
- get
- {
- return new ProtocolDecoderImpl(this);
- }
- }
-
- protected void DisposeCodecResources()
- {
- // Do nothing by default
- }
-
- private class ProtocolEncoderImpl : IProtocolEncoder
- {
- private readonly Hashtable _encoders = new Hashtable();
-
- private DemuxingProtocolCodecFactory _enclosing;
-
- public ProtocolEncoderImpl(DemuxingProtocolCodecFactory enclosing)
- {
- _enclosing = enclosing;
- ArrayList encoderFactories = enclosing._encoderFactories;
- for (int i = encoderFactories.Count - 1; i >= 0; i--)
- {
- IMessageEncoder encoder = ((IMessageEncoderFactory)encoderFactories[i]).NewEncoder();
- foreach (Type type in encoder.MessageTypes.Keys)
- {
- _encoders[type] = encoder;
- }
- }
- }
-
- public void Encode(object message, IProtocolEncoderOutput output)
- {
- Type type = message.GetType();
- IMessageEncoder encoder = FindEncoder(type);
- if (encoder == null)
- {
- throw new ProtocolEncoderException("Unexpected message type: " + type);
- }
-
- encoder.Encode(message, output);
- }
-
- private IMessageEncoder FindEncoder(Type type)
- {
- IMessageEncoder encoder = (IMessageEncoder)_encoders[type];
- if (encoder == null)
- {
- encoder = FindEncoder(type, new Hashtable());
- }
-
- return encoder;
- }
-
- private IMessageEncoder FindEncoder(Type type, Hashtable triedClasses)
- {
- IMessageEncoder encoder;
-
- if (triedClasses.Contains(type))
- {
- return null;
- }
- triedClasses[type] = 1;
-
- encoder = (IMessageEncoder)_encoders[type];
- if (encoder == null)
- {
- encoder = FindEncoder(type, triedClasses);
- if (encoder != null)
- {
- return encoder;
- }
-
- Type[] interfaces = type.GetInterfaces();
- for (int i = 0; i < interfaces.Length; i++)
- {
- encoder = FindEncoder(interfaces[i], triedClasses);
- if (encoder != null)
- {
- return encoder;
- }
- }
-
- return null;
- }
- else
- return encoder;
- }
-
- public void Dispose()
- {
- _enclosing.DisposeCodecResources();
- }
- }
-
- private class ProtocolDecoderImpl : CumulativeProtocolDecoder
- {
- private readonly IMessageDecoder[] _decoders;
- private IMessageDecoder _currentDecoder;
- private DemuxingProtocolCodecFactory _enclosing;
-
- public ProtocolDecoderImpl(DemuxingProtocolCodecFactory enclosing)
- {
- _enclosing = enclosing;
- ArrayList decoderFactories = _enclosing._decoderFactories;
- _decoders = new IMessageDecoder[decoderFactories.Count];
- for (int i = decoderFactories.Count - 1; i >= 0; i--)
- {
- _decoders[i] = ((IMessageDecoderFactory) decoderFactories[i]).NewDecoder();
- }
- }
-
- protected override bool DoDecode(ByteBuffer input, IProtocolDecoderOutput output)
- {
- MessageDecoderResult result;
- if (_currentDecoder == null)
- {
- IMessageDecoder[] decoders = _decoders;
- int undecodables = 0;
-
- for (int i = decoders.Length - 1; i >= 0; i --)
- {
- IMessageDecoder decoder = decoders[i];
- int limit = input.Limit;
- int pos = input.Position;
-
- try
- {
- result = decoder.Decodable(input);
- }
- finally
- {
- input.Position = pos;
- input.Limit = limit;
- }
-
- if (result == MessageDecoderResult.OK)
- {
- _currentDecoder = decoder;
- break;
- }
- else if(result == MessageDecoderResult.NOT_OK)
- {
- undecodables ++;
- }
- else if (result != MessageDecoderResult.NEED_DATA)
- {
- throw new Exception("Unexpected decode result (see your decodable()): " + result);
- }
- }
-
- if (undecodables == _decoders.Length)
- {
- // Throw an exception if all decoders cannot decode data.
- input.Position = input.Limit; // Skip data
- throw new ProtocolDecoderException(
- "No appropriate message decoder: " + input.GetHexDump());
- }
-
- if (_currentDecoder == null)
- {
- // Decoder is not determined yet (i.e. we need more data)
- return false;
- }
- }
-
- result = _currentDecoder.Decode(input, output);
- if (result == MessageDecoderResult.OK)
- {
- _currentDecoder = null;
- return true;
- }
- else if (result == MessageDecoderResult.NEED_DATA)
- {
- return false;
- }
- else if (result == MessageDecoderResult.NOT_OK)
- {
- throw new ProtocolDecoderException("Message decoder returned NOT_OK.");
- }
- else
- {
- throw new Exception("Unexpected decode result (see your decode()): " + result);
- }
- }
- }
-
- private class SingletonMessageEncoderFactory : IMessageEncoderFactory
- {
- private readonly IMessageEncoder _encoder;
-
- public SingletonMessageEncoderFactory(IMessageEncoder encoder)
- {
- if (encoder == null)
- {
- throw new ArgumentNullException("encoder");
- }
- _encoder = encoder;
- }
-
- public IMessageEncoder NewEncoder()
- {
- return _encoder;
- }
- }
-
- private class SingletonMessageDecoderFactory : IMessageDecoderFactory
- {
- private readonly IMessageDecoder _decoder;
-
- public SingletonMessageDecoderFactory(IMessageDecoder decoder)
- {
- if (decoder == null)
- {
- throw new ArgumentNullException("decoder");
- }
- _decoder = decoder;
- }
-
- public IMessageDecoder NewDecoder()
- {
- return _decoder;
- }
- }
-
- private class DefaultConstructorMessageEncoderFactory : IMessageEncoderFactory
- {
- private readonly Type _encoderClass;
-
- public DefaultConstructorMessageEncoderFactory(Type encoderClass)
- {
- if (encoderClass == null)
- {
- throw new ArgumentNullException("encoderClass");
- }
-
- if(!typeof(IMessageEncoder).IsAssignableFrom(encoderClass))
- {
- throw new ArgumentException("encoderClass is not assignable to MessageEncoder");
- }
- _encoderClass = encoderClass;
- }
-
- public IMessageEncoder NewEncoder()
- {
- try
- {
- return (IMessageEncoder) Activator.CreateInstance(_encoderClass);
- }
- catch (Exception e)
- {
- throw new Exception( "Failed to create a new instance of " + _encoderClass, e);
- }
- }
- }
-
- private class DefaultConstructorMessageDecoderFactory : IMessageDecoderFactory
- {
- private readonly Type _decoderClass;
-
- public DefaultConstructorMessageDecoderFactory(Type decoderClass)
- {
- if (decoderClass == null)
- {
- throw new ArgumentNullException("decoderClass");
- }
-
- if(!typeof(IMessageDecoder).IsAssignableFrom(decoderClass))
- {
- throw new ArgumentException("decoderClass is not assignable to MessageDecoder");
- }
- _decoderClass = decoderClass;
- }
-
- public IMessageDecoder NewDecoder()
- {
- try
- {
- return (IMessageDecoder) Activator.CreateInstance(_decoderClass);
- }
- catch (Exception e)
- {
- throw new Exception("Failed to create a new instance of " + _decoderClass, e);
- }
- }
- }
- }
-}
-
-
-
diff --git a/qpid/dotnet/Qpid.Codec/Demux/IMessageDecoder.cs b/qpid/dotnet/Qpid.Codec/Demux/IMessageDecoder.cs
deleted file mode 100644
index 5892673440..0000000000
--- a/qpid/dotnet/Qpid.Codec/Demux/IMessageDecoder.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Codec.Demux
-{
- public interface IMessageDecoder
- {
- /// <summary>
- /// Checks the specified buffer is decodable by this decoder.
- /// </summary>
- /// <param name="buffer">The buffer to read data from.</param>
- /// <returns>
- /// OK if this decoder can decode the specified buffer.
- /// NOT_OK if this decoder cannot decode the specified buffer.
- /// if more data is required to determine if the
- /// specified buffer is decodable ({@link #OK}) or not decodable
- /// {@link #NOT_OK}.</returns>
- MessageDecoderResult Decodable(ByteBuffer buffer);
-
- /// <summary>
- /// Decodes binary or protocol-specific content into higher-level message objects.
- /// MINA invokes {@link #decode(IoSession, ByteBuffer, ProtocolDecoderOutput)}
- /// method with read data, and then the decoder implementation puts decoded
- /// messages into {@link ProtocolDecoderOutput}.
- /// </summary>
- /// <returns>
- /// {@link #OK} if you finished decoding messages successfully.
- /// {@link #NEED_DATA} if you need more data to finish decoding current message.
- /// {@link #NOT_OK} if you cannot decode current message due to protocol specification violation.
- /// </returns>
- /// <exception cref="Exception">if the read data violated protocol specification </exception>
- MessageDecoderResult Decode(ByteBuffer buffer, IProtocolDecoderOutput output);
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Codec/Demux/IMessageDecoderFactory.cs b/qpid/dotnet/Qpid.Codec/Demux/IMessageDecoderFactory.cs
deleted file mode 100644
index 9e333d670f..0000000000
--- a/qpid/dotnet/Qpid.Codec/Demux/IMessageDecoderFactory.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Codec.Demux
-{
- public interface IMessageDecoderFactory
- {
- /// <summary>
- /// Creates a new message decoder.
- /// </summary>
- IMessageDecoder NewDecoder();
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Codec/Demux/IMessageEncoder.cs b/qpid/dotnet/Qpid.Codec/Demux/IMessageEncoder.cs
deleted file mode 100644
index 75ae23592b..0000000000
--- a/qpid/dotnet/Qpid.Codec/Demux/IMessageEncoder.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-
-namespace Apache.Qpid.Codec.Demux
-{
- public interface IMessageEncoder
- {
- /// <summary>
- /// Returns the set of message classes this encoder can encode.
- /// </summary>
- Hashtable MessageTypes
- {
- get;
- }
-
- /// <summary>
- /// Encodes higher-level message objects into binary or protocol-specific data.
- /// MINA invokes {@link #encode(IoSession, Object, ProtocolEncoderOutput)}
- /// method with message which is popped from the session write queue, and then
- /// the encoder implementation puts encoded {@link ByteBuffer}s into
- /// {@link ProtocolEncoderOutput}.
- /// </summary>
- /// <exception cref="Exception">if the message violated protocol specification</exception>
- void Encode(Object message, IProtocolEncoderOutput output);
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Codec/Demux/IMessageEncoderFactory.cs b/qpid/dotnet/Qpid.Codec/Demux/IMessageEncoderFactory.cs
deleted file mode 100644
index 3001d1a963..0000000000
--- a/qpid/dotnet/Qpid.Codec/Demux/IMessageEncoderFactory.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Codec.Demux
-{
- public interface IMessageEncoderFactory
- {
- /// <summary>
- /// Creates a new message encoder.
- /// </summary>
- IMessageEncoder NewEncoder();
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Codec/Demux/MessageDecoderResult.cs b/qpid/dotnet/Qpid.Codec/Demux/MessageDecoderResult.cs
deleted file mode 100644
index ab01864bc0..0000000000
--- a/qpid/dotnet/Qpid.Codec/Demux/MessageDecoderResult.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Codec.Demux
-{
- public enum MessageDecoderResult
- {
- OK, NOT_OK, NEED_DATA
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Codec/IProtocolCodecFactory.cs b/qpid/dotnet/Qpid.Codec/IProtocolCodecFactory.cs
deleted file mode 100644
index a26b91b16c..0000000000
--- a/qpid/dotnet/Qpid.Codec/IProtocolCodecFactory.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Codec
-{
- public interface IProtocolCodecFactory
- {
- IProtocolEncoder Encoder
- {
- get;
- }
-
- IProtocolDecoder Decoder
- {
- get;
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Codec/IProtocolDecoder.cs b/qpid/dotnet/Qpid.Codec/IProtocolDecoder.cs
deleted file mode 100644
index 3cccb0f7da..0000000000
--- a/qpid/dotnet/Qpid.Codec/IProtocolDecoder.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Codec
-{
- public interface IProtocolDecoder : IDisposable
- {
- /// <summary>
- /// Decodes binary or protocol-specific content into higher-level message objects.
- /// MINA invokes {@link #decode(IoSession, ByteBuffer, ProtocolDecoderOutput)}
- /// method with read data, and then the decoder implementation puts decoded
- /// messages into {@link ProtocolDecoderOutput}.
- /// </summary>
- /// <param name="input"></param>
- /// <param name="output"></param>
- /// <exception cref="Exception">if the read data violated protocol specification</exception>
- void Decode(ByteBuffer input, IProtocolDecoderOutput output);
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Codec/IProtocolDecoderOutput.cs b/qpid/dotnet/Qpid.Codec/IProtocolDecoderOutput.cs
deleted file mode 100644
index 77a1aea9db..0000000000
--- a/qpid/dotnet/Qpid.Codec/IProtocolDecoderOutput.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Codec
-{
- public interface IProtocolDecoderOutput
- {
- /// <summary>
- /// Callback for {@link ProtocolDecoder} to generate decoded messages.
- /// {@link ProtocolDecoder} must call {@link #write(Object)} for each
- /// decoded messages.
- /// </summary>
- /// <param name="message">the decoded message</param>
- void Write(object message);
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Codec/IProtocolEncoder.cs b/qpid/dotnet/Qpid.Codec/IProtocolEncoder.cs
deleted file mode 100644
index a16f2ad9d6..0000000000
--- a/qpid/dotnet/Qpid.Codec/IProtocolEncoder.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Codec
-{
- public interface IProtocolEncoder : IDisposable
- {
- /// <summary>
- /// Encodes higher-level message objects into binary or protocol-specific data.
- /// MINA invokes {@link #encode(IoSession, Object, ProtocolEncoderOutput)}
- /// method with message which is popped from the session write queue, and then
- /// the encoder implementation puts encoded {@link ByteBuffer}s into
- /// {@link ProtocolEncoderOutput}.
- /// </summary>
- /// <param name="message"></param>
- /// <param name="output"></param>
- /// <exception cref="Exception">if the message violated protocol specification</exception>
- void Encode(Object message, IProtocolEncoderOutput output);
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Codec/IProtocolEncoderOutput.cs b/qpid/dotnet/Qpid.Codec/IProtocolEncoderOutput.cs
deleted file mode 100644
index 70f9be38dc..0000000000
--- a/qpid/dotnet/Qpid.Codec/IProtocolEncoderOutput.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Codec
-{
- public interface IProtocolEncoderOutput
- {
- /// <summary>
- /// Callback for {@link ProtocolEncoder} to generate encoded
- /// {@link ByteBuffer}s. {@link ProtocolEncoder} must call
- /// {@link #write(ByteBuffer)} for each decoded messages.
- /// </summary>
- /// <param name="buf">the buffer which contains encoded data</param>
- void Write(ByteBuffer buf);
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Codec/Properties/AssemblyInfo.cs b/qpid/dotnet/Qpid.Codec/Properties/AssemblyInfo.cs
deleted file mode 100644
index 5261a62ec5..0000000000
--- a/qpid/dotnet/Qpid.Codec/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Reflection;
-using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Apache.Qpid.Codec")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Apache.Qpid.Codec")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("8bfe84f8-cd88-48f7-b0d2-0010411a14e5")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/Qpid.Codec/ProtocolDecoderException.cs b/qpid/dotnet/Qpid.Codec/ProtocolDecoderException.cs
deleted file mode 100644
index 8e7e6da145..0000000000
--- a/qpid/dotnet/Qpid.Codec/ProtocolDecoderException.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid.Codec
-{
- [Serializable]
- public class ProtocolDecoderException : ProtocolCodecException
- {
- private string _hexdump;
-
- public ProtocolDecoderException() : base()
- {
- }
-
- public ProtocolDecoderException(string message) : base(message)
- {
- }
-
- public ProtocolDecoderException(Exception cause) : base(cause)
- {
- }
-
- protected ProtocolDecoderException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- _hexdump = info.GetString("HexDump");
- }
-
- public string HexDump
- {
- get
- {
- return _hexdump;
- }
- set
- {
- _hexdump = value;
- }
- }
-
- public override void GetObjectData(SerializationInfo info, StreamingContext context)
- {
- base.GetObjectData(info, context);
- info.AddValue("HexDump", _hexdump);
- }
- }
-}
-
-
-
diff --git a/qpid/dotnet/Qpid.Codec/ProtocolEncoderException.cs b/qpid/dotnet/Qpid.Codec/ProtocolEncoderException.cs
deleted file mode 100644
index ac565a308b..0000000000
--- a/qpid/dotnet/Qpid.Codec/ProtocolEncoderException.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid.Codec
-{
- [Serializable]
- public class ProtocolEncoderException : ProtocolCodecException
- {
- public ProtocolEncoderException() : base()
- {
- }
-
- public ProtocolEncoderException(string message) : base(message)
- {
- }
-
- public ProtocolEncoderException(Exception cause) : base(cause)
- {
- }
-
- protected ProtocolEncoderException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
-
-
-
diff --git a/qpid/dotnet/Qpid.Codec/Qpid.Codec.csproj b/qpid/dotnet/Qpid.Codec/Qpid.Codec.csproj
deleted file mode 100644
index a0217cffa3..0000000000
--- a/qpid/dotnet/Qpid.Codec/Qpid.Codec.csproj
+++ /dev/null
@@ -1,82 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{22D0D0C2-77AF-4DE3-B456-7FF3893F9F88}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Apache.Qpid.Codec</RootNamespace>
- <AssemblyName>Apache.Qpid.Codec</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\net-2.0\debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\net-2.0\release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="log4net, Version=1.2.0.30714, Culture=neutral, PublicKeyToken=500ffcafb14f92df">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\Qpid.Common\lib\log4net\log4net.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Qpid.Buffer\Qpid.Buffer.csproj">
- <Project>{44384DF2-B0A4-4580-BDBC-EE4BAA87D995}</Project>
- <Name>Qpid.Buffer</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/Qpid.Codec/Support/SimpleProtocolDecoderOutput.cs b/qpid/dotnet/Qpid.Codec/Support/SimpleProtocolDecoderOutput.cs
deleted file mode 100644
index 0a4ff10ff0..0000000000
--- a/qpid/dotnet/Qpid.Codec/Support/SimpleProtocolDecoderOutput.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Collections;
-
-namespace Apache.Qpid.Codec.Support
-{
- public class SimpleProtocolDecoderOutput : IProtocolDecoderOutput
- {
- private readonly Queue _messageQueue = new Queue();
-
- public Queue MessageQueue
- {
- get
- {
- return _messageQueue;
- }
- }
-
- public void Write(object message)
- {
- _messageQueue.Enqueue(message);
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Codec/Support/SimpleProtocolEncoderOutput.cs b/qpid/dotnet/Qpid.Codec/Support/SimpleProtocolEncoderOutput.cs
deleted file mode 100644
index 2e4224ef98..0000000000
--- a/qpid/dotnet/Qpid.Codec/Support/SimpleProtocolEncoderOutput.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Collections;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Codec.Support
-{
- public abstract class SimpleProtocolEncoderOutput : IProtocolEncoderOutput
- {
- private readonly Queue _bufferQueue = new Queue();
-
- public Queue BufferQueue
- {
- get
- {
- return _bufferQueue;
- }
- }
-
- public void Write(ByteBuffer buf)
- {
- _bufferQueue.Enqueue(buf);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Codec/default.build b/qpid/dotnet/Qpid.Codec/default.build
deleted file mode 100644
index dd59df7d6a..0000000000
--- a/qpid/dotnet/Qpid.Codec/default.build
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Apache.Qpid.Codec" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="library"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.dll">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/Apache.Qpid.Buffer.dll" />
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/Qpid.Common.Tests/Properties/AssemblyInfo.cs b/qpid/dotnet/Qpid.Common.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index 2516a73035..0000000000
--- a/qpid/dotnet/Qpid.Common.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Apache.Qpid.Common.Tests")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Apache.Qpid.Common.Tests")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("2c0d906c-375d-4b04-8ad0-a22fcb4e7337")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/Qpid.Common.Tests/Qpid.Common.Tests.csproj b/qpid/dotnet/Qpid.Common.Tests/Qpid.Common.Tests.csproj
deleted file mode 100644
index c99217cc51..0000000000
--- a/qpid/dotnet/Qpid.Common.Tests/Qpid.Common.Tests.csproj
+++ /dev/null
@@ -1,87 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{F83624B0-762B-4D82-900D-FF4C1B36E36E}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Apache.Qpid.Tests</RootNamespace>
- <AssemblyName>Apache.Qpid.Common.Tests</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\net-2.0\debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <UseVSHostingProcess>true</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\net-2.0\release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="nunit.framework, Version=2.2.6.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\Qpid.Client.Tests\lib\nunit\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Qpid.Buffer\Qpid.Buffer.csproj">
- <Project>{44384DF2-B0A4-4580-BDBC-EE4BAA87D995}</Project>
- <Name>Qpid.Buffer</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Common\Qpid.Common.csproj">
- <Project>{77064C42-24D2-4CEB-9EA2-0EF481A43205}</Project>
- <Name>Qpid.Common</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/Qpid.Common.Tests/Qpid/Collections/TestConsumerProducerQueue.cs b/qpid/dotnet/Qpid.Common.Tests/Qpid/Collections/TestConsumerProducerQueue.cs
deleted file mode 100644
index 3e19508bac..0000000000
--- a/qpid/dotnet/Qpid.Common.Tests/Qpid/Collections/TestConsumerProducerQueue.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Text;
-using System.Threading;
-using NUnit.Framework;
-using Apache.Qpid.Collections;
-
-namespace Apache.Qpid.Collections.Tests
-{
- [TestFixture]
- public class TestConsumerProducerQueue
- {
- private ConsumerProducerQueue _queue;
-
- [SetUp]
- public void SetUp()
- {
- _queue = new ConsumerProducerQueue();
- }
-
- [Test]
- public void CanDequeueWithInifiniteWait()
- {
- Thread producer = new Thread(new ThreadStart(ProduceFive));
- producer.Start();
- for ( int i = 0; i < 5; i++ )
- {
- object item = _queue.Dequeue();
- Assert.IsNotNull(item);
- }
- }
-
- [Test]
- public void ReturnsNullOnDequeueTimeout()
- {
- // queue is empty
- Assert.IsNull(_queue.Dequeue(500));
- }
-
- [Test]
- public void DequeueTillEmpty()
- {
- _queue.Enqueue(1);
- _queue.Enqueue(2);
- _queue.Enqueue(3);
- Assert.AreEqual(1, _queue.Dequeue());
- Assert.AreEqual(2, _queue.Dequeue());
- Assert.AreEqual(3, _queue.Dequeue());
- // no messages in queue, will timeout
- Assert.IsNull(_queue.Dequeue(500));
- }
-
-
- private void ProduceFive()
- {
- Thread.Sleep(1000);
- _queue.Enqueue("test item 1");
- _queue.Enqueue("test item 2");
- _queue.Enqueue("test item 3");
- Thread.Sleep(0);
- _queue.Enqueue("test item 4");
- _queue.Enqueue("test item 5");
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common.Tests/Qpid/Collections/TestLinkedHashtable.cs b/qpid/dotnet/Qpid.Common.Tests/Qpid/Collections/TestLinkedHashtable.cs
deleted file mode 100644
index dbbc98a2e6..0000000000
--- a/qpid/dotnet/Qpid.Common.Tests/Qpid/Collections/TestLinkedHashtable.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Text;
-using NUnit.Framework;
-
-namespace Apache.Qpid.Collections
-{
- [TestFixture]
- public class TestLinkedHashtable
- {
- [Test]
- public void Test1()
- {
- LinkedHashtable table = new LinkedHashtable();
- table["Super"] = "Ayr";
- table["Ayr"] = "United";
- table["Fred"] = "Wilma";
- table["Dumbarton"] = "Gubbed";
- dumpDictionary(table);
-
- Console.WriteLine("\nRemoving XXX (non-existant)");
- table.Remove("XXX");
- dumpDictionary(table);
-
- Console.WriteLine("\nRemoving Fred");
- table.Remove("Fred");
- dumpDictionary(table);
-
- Console.WriteLine("\nMoving Dumbarton to head");
- table.MoveToHead("Dumbarton");
- dumpDictionary(table);
- }
-
- private static void dumpDictionary(LinkedHashtable table)
- {
- foreach (DictionaryEntry o in table)
- {
- Console.WriteLine(string.Format("Item: key={0} value={1}", o.Key, o.Value));
- }
-
- Console.WriteLine("keys are " + InspectCollection(table.Keys));
- Console.WriteLine("values are " + InspectCollection(table.Values));
- }
-
- static string InspectCollection(ICollection collection)
- {
- StringBuilder sb = null;
- foreach (object o in collection)
- {
- if (sb == null)
- {
- sb = new StringBuilder(o.ToString());
- }
- else
- {
- sb.Append(", ");
- sb.Append(o.ToString());
- }
- }
- return sb.ToString();
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common.Tests/Qpid/Framing/TestAMQType.cs b/qpid/dotnet/Qpid.Common.Tests/Qpid/Framing/TestAMQType.cs
deleted file mode 100644
index 23cb71c9f8..0000000000
--- a/qpid/dotnet/Qpid.Common.Tests/Qpid/Framing/TestAMQType.cs
+++ /dev/null
@@ -1,270 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using NUnit.Framework;
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Framing.Tests
-{
- [TestFixture]
- public class TestAMQType
- {
-
- #region LONG_STRING tests
- [Test]
- public void LONG_STRING_ReadWrite()
- {
- AMQType type = AMQType.LONG_STRING;
- ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
- const string VALUE = "simple string 1";
-
- type.WriteToBuffer(VALUE, buffer);
- buffer.Flip();
- buffer.Rewind();
- AMQTypedValue value = AMQTypedValue.ReadFromBuffer(buffer);
- Assert.AreEqual(VALUE, value.Value);
- }
- #endregion // LONG_STRING tests
-
- #region UINT32 tests
- [Test]
- public void UINT32_CanGetEncodingSize()
- {
- AMQType type = AMQType.UINT32;
- Assert.AreEqual(4, type.GetEncodingSize(1234443));
- }
-
- [Test]
- public void UINT32_ToNativeValue()
- {
- AMQType type = AMQType.UINT32;
- Assert.AreEqual(1, type.ToNativeValue(1));
- Assert.AreEqual(1, type.ToNativeValue((short)1));
- Assert.AreEqual(1, type.ToNativeValue((byte)1));
- Assert.AreEqual(1, type.ToNativeValue("1"));
-
- try
- {
- Assert.AreEqual(1, type.ToNativeValue("adasdads"));
- Assert.Fail("Invalid format allowed");
- } catch ( FormatException )
- {
- }
- }
-
- [Test]
- public void UINT32_ReadWrite()
- {
- AMQType type = AMQType.UINT32;
- ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
- const uint VALUE = 0xFFEEDDCC;
-
- type.WriteToBuffer(VALUE, buffer);
- buffer.Flip();
- buffer.Rewind();
- AMQTypedValue value = AMQTypedValue.ReadFromBuffer(buffer);
- Assert.AreEqual(VALUE, value.Value);
- }
- #endregion // UINT32 Tests
-
- #region VOID Tests
- [Test]
- public void VOID_CanGetEncodingSize()
- {
- AMQType type = AMQType.VOID;
- Assert.AreEqual(0, type.GetEncodingSize(null));
- }
-
- [Test]
- public void VOID_ToNativeValue()
- {
- AMQType type = AMQType.VOID;
- Assert.IsNull(type.ToNativeValue(null));
-
- try
- {
- type.ToNativeValue("asdasd");
- Assert.Fail("converted invalid value");
- } catch (FormatException)
- {
- }
- }
-
- [Test]
- public void VOID_ReadWrite()
- {
- AMQType type = AMQType.VOID;
- ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
-
- type.WriteToBuffer(null, buffer);
- buffer.Flip();
- buffer.Rewind();
- AMQTypedValue value = AMQTypedValue.ReadFromBuffer(buffer);
- Assert.AreEqual(null, value.Value);
- }
-
- #endregion // VOID Tests
-
- #region BOOLEAN Tests
- [Test]
- public void BOOLEAN_CanGetEncodingSize()
- {
- AMQType type = AMQType.BOOLEAN;
- Assert.AreEqual(1, type.GetEncodingSize(true));
- }
-
- [Test]
- public void BOOLEAN_ToNativeValue()
- {
- AMQType type = AMQType.BOOLEAN;
- Assert.AreEqual(true, type.ToNativeValue(true));
- Assert.AreEqual(false, type.ToNativeValue("false"));
-
- try
- {
- type.ToNativeValue("asdasd");
- Assert.Fail("converted invalid value");
- } catch ( FormatException )
- {
- }
- }
-
- [Test]
- public void BOOLEAN_ReadWrite()
- {
- AMQType type = AMQType.BOOLEAN;
- ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
-
- type.WriteToBuffer(true, buffer);
- buffer.Flip();
- buffer.Rewind();
- AMQTypedValue value = AMQTypedValue.ReadFromBuffer(buffer);
- Assert.AreEqual(true, value.Value);
- }
- #endregion // BOOLEAN Tests
-
- #region INT16 tests
- [Test]
- public void INT16_ReadWrite()
- {
- AMQType type = AMQType.INT16;
- ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
- const short VALUE = -32765;
-
- type.WriteToBuffer(VALUE, buffer);
- buffer.Flip();
- buffer.Rewind();
- AMQTypedValue value = AMQTypedValue.ReadFromBuffer(buffer);
- Assert.AreEqual(VALUE, value.Value);
- }
- //public void UINT16_ReadWrite()
- //{
- // AMQType type = AMQType.UINT16;
- // ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
- // const ushort VALUE = 64321;
-
- // type.WriteToBuffer(VALUE, buffer);
- // buffer.Flip();
- // buffer.Rewind();
- // AMQTypedValue value = AMQTypedValue.ReadFromBuffer(buffer);
- // Assert.AreEqual(VALUE, value.Value);
- //}
- #endregion // INT16 Tests
-
- #region INT32 tests
- [Test]
- public void INT32_ReadWrite()
- {
- AMQType type = AMQType.INT32;
- ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
- const int VALUE = -39273563;
-
- type.WriteToBuffer(VALUE, buffer);
- buffer.Flip();
- buffer.Rewind();
- AMQTypedValue value = AMQTypedValue.ReadFromBuffer(buffer);
- Assert.AreEqual(VALUE, value.Value);
- }
- #endregion // INT32 Tests
-
- #region INT64 tests
- [Test]
- public void INT64_ReadWrite()
- {
- AMQType type = AMQType.INT64;
- ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
- const long VALUE = -(2^43+1233123);
-
- type.WriteToBuffer(VALUE, buffer);
- buffer.Flip();
- buffer.Rewind();
- AMQTypedValue value = AMQTypedValue.ReadFromBuffer(buffer);
- Assert.AreEqual(VALUE, value.Value);
- }
- [Test]
- public void UINT64_ReadWrite()
- {
- AMQType type = AMQType.UINT64;
- ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
- const ulong VALUE = (2 ^ 61 + 1233123);
-
- type.WriteToBuffer(VALUE, buffer);
- buffer.Flip();
- buffer.Rewind();
- AMQTypedValue value = AMQTypedValue.ReadFromBuffer(buffer);
- Assert.AreEqual(VALUE, value.Value);
- }
- #endregion // INT64 Tests
-
- #region FLOAT tests
- [Test]
- public void FLOAT_ReadWrite()
- {
- AMQType type = AMQType.FLOAT;
- ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
- const float VALUE = 1.2345000E-035f;
-
- type.WriteToBuffer(VALUE, buffer);
- buffer.Flip();
- buffer.Rewind();
- AMQTypedValue value = AMQTypedValue.ReadFromBuffer(buffer);
- Assert.AreEqual(VALUE, value.Value);
- }
- #endregion // FLOAT Tests
-
- #region DOUBLE tests
- [Test]
- public void DOUBLE_ReadWrite()
- {
- AMQType type = AMQType.DOUBLE;
- ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
- const double VALUE = 1.2345000E-045;
-
- type.WriteToBuffer(VALUE, buffer);
- buffer.Flip();
- buffer.Rewind();
- AMQTypedValue value = AMQTypedValue.ReadFromBuffer(buffer);
- Assert.AreEqual(VALUE, value.Value);
- }
- #endregion // FLOAT Tests
- }
-}
diff --git a/qpid/dotnet/Qpid.Common.Tests/Qpid/Framing/TestEncodingUtils.cs b/qpid/dotnet/Qpid.Common.Tests/Qpid/Framing/TestEncodingUtils.cs
deleted file mode 100644
index a8202dc70d..0000000000
--- a/qpid/dotnet/Qpid.Common.Tests/Qpid/Framing/TestEncodingUtils.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using NUnit.Framework;
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Framing.Tests
-{
- [TestFixture]
- public class TestEncodingUtils
- {
- [Test]
- public void CanReadLongAsShortString()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
- EncodingUtils.WriteShortStringBytes(buffer, "98878122");
- buffer.Flip();
- long value = EncodingUtils.ReadLongAsShortString(buffer);
- Assert.AreEqual(98878122, value);
- }
- [Test]
- public void CanReadLongAsShortStringNegative()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
- EncodingUtils.WriteShortStringBytes(buffer, "-98878122");
- buffer.Flip();
- long value = EncodingUtils.ReadLongAsShortString(buffer);
- Assert.AreEqual(-98878122, value);
- }
- [Test]
- public void CanReadLongAsShortStringEmpty()
- {
- ByteBuffer buffer = ByteBuffer.Allocate(0x1000);
- EncodingUtils.WriteShortStringBytes(buffer, "");
- buffer.Flip();
- long value = EncodingUtils.ReadLongAsShortString(buffer);
- Assert.AreEqual(0, value);
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Common.Tests/default.build b/qpid/dotnet/Qpid.Common.Tests/default.build
deleted file mode 100644
index a97c0282c2..0000000000
--- a/qpid/dotnet/Qpid.Common.Tests/default.build
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Apache.Qpid.Common" default="test">
-
- <target name="build">
- <csc target="library"
- define="${build.defines}"
- warnaserror="true" debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.Tests.dll">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/nunit.framework.dll" />
- <include name="${build.dir}/${project::get-name()}.dll" />
- <include name="${build.dir}/Apache.Qpid.Codec.dll" />
- <include name="${build.dir}/Apache.Qpid.Messaging.dll" />
- <include name="${build.dir}/Apache.Qpid.Buffer.dll" />
- </references>
-
- </csc>
- </target>
- <target name="test" depends="build">
- <nunit2>
- <formatter type="${nant.formatter}" usefile="false" />
- <test assemblyname="${build.dir}/${project::get-name()}.Tests.dll" />
- </nunit2>
- </target>
-</project>
-
diff --git a/qpid/dotnet/Qpid.Common/AMQChannelClosedException.cs b/qpid/dotnet/Qpid.Common/AMQChannelClosedException.cs
deleted file mode 100644
index 98c6966cd1..0000000000
--- a/qpid/dotnet/Qpid.Common/AMQChannelClosedException.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid
-{
- [Serializable]
- public class AMQChannelClosedException : AMQException
- {
- public AMQChannelClosedException(int errorCode, string message)
- : base(errorCode, message)
- {
- }
-
- protected AMQChannelClosedException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/AMQConnectionClosedException.cs b/qpid/dotnet/Qpid.Common/AMQConnectionClosedException.cs
deleted file mode 100644
index 136131144b..0000000000
--- a/qpid/dotnet/Qpid.Common/AMQConnectionClosedException.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid
-{
- /// <summary>
- /// AMQConnectionClosedException indicates that a connection has been closed.
- ///
- /// <p/>This exception is really used as an event, in order that the method handler that raises it creates an event
- /// which is propagated to the io handler, in order to notify it of the connection closure.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Represents a the closure of a connection.
- /// </table>
- /// </summary>
- [Serializable]
- public class AMQConnectionClosedException : AMQException
- {
- public AMQConnectionClosedException(int errorCode, string message)
- : base(errorCode, message)
- {
- }
-
- protected AMQConnectionClosedException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/AMQDisconnectedException.cs b/qpid/dotnet/Qpid.Common/AMQDisconnectedException.cs
deleted file mode 100644
index b5c4d544cd..0000000000
--- a/qpid/dotnet/Qpid.Common/AMQDisconnectedException.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid
-{
- [Serializable]
- public class AMQDisconnectedException : AMQException
- {
- public AMQDisconnectedException(int errorCode, string message)
- : base(errorCode, message)
- {
- }
-
- public AMQDisconnectedException(string message)
- : base(message)
- {
- }
-
- protected AMQDisconnectedException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/AMQException.cs b/qpid/dotnet/Qpid.Common/AMQException.cs
deleted file mode 100644
index f9f7158a26..0000000000
--- a/qpid/dotnet/Qpid.Common/AMQException.cs
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-using log4net;
-
-namespace Apache.Qpid
-{
- /// <summary>
- /// The generic AMQ exception.
- /// </summary>
- [Serializable]
- public class AMQException : Exception
- {
- private int _errorCode;
-
- public AMQException(string message)
- : base(message)
- {
- }
-
- public AMQException(string message, Exception innerException)
- : base(message, innerException)
- {
- }
-
- public AMQException(int errorCode, string message)
- : base(message)
- {
- _errorCode = errorCode;
- }
-
- public AMQException(int errorCode, string message, Exception innerException)
- : base(message, innerException)
- {
- _errorCode = errorCode;
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="T:AMQException"/> class, with a logger that will
- /// be used to output log information upon construction. This saves having to log separately.
- /// </summary>
- /// <param name="logger">The logger.</param>
- /// <param name="message">The message.</param>
- public AMQException(ILog logger, string message)
- : base(message)
- {
- logger.Error(message);
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="T:AMQException"/> class, with a logger that will
- /// be used to output log information upon construction. This saves having to log separately.
- /// </summary>
- /// <param name="logger">The logger.</param>
- /// <param name="message">The message.</param>
- /// <param name="innerException">The root cause</param>
- public AMQException(ILog logger, string message, Exception innerException)
- : base(message, innerException)
- {
- logger.Error(message, innerException);
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="T:AMQException"/> class, with a logger that will
- /// be used to output log information upon construction. This saves having to log separately.
- /// </summary>
- /// <param name="logger">The logger.</param>
- /// <param name="message">The message.</param>
- /// <param name="errorCode">The AMQ error code. See RFC 006 for details of error codes</param>
- public AMQException(ILog logger, int errorCode, string message)
- : this(errorCode, message)
- {
- logger.Error(message);
- }
-
- /// <summary>
- /// Initializes a new instance of the <see cref="T:AMQException"/> class, with a logger that will
- /// be used to output log information upon construction. This saves having to log separately.
- /// </summary>
- /// <param name="logger">The logger.</param>
- /// <param name="message">The message.</param>
- /// <param name="errorCode">The AMQ error code. See RFC 006 for details of error codes</param>
- /// <param name="innerException">The root cause</param>
- public AMQException(ILog logger, int errorCode, string message, Exception innerException)
- : this(errorCode, message, innerException)
- {
- logger.Error(message, innerException);
- }
-
- /// <summary>
- /// Serialization Constructor
- /// </summary>
- /// <param name="info">SerializationInfo object</param>
- /// <param name="ctxt">StreamingContext object</param>
- protected AMQException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- _errorCode = info.GetInt32("ErrorCode");
- }
-
- /// <summary>
- /// ISerializable implementation of GetObjectData()
- /// </summary>
- /// <param name="info">SerializationInfo object</param>
- /// <param name="ctxt">StreamingContext object</param>
- public override void GetObjectData(SerializationInfo info, StreamingContext context)
- {
- base.GetObjectData(info, context);
- info.AddValue("ErrorCode", _errorCode);
- }
-
-
- /// <summary>
- /// Gets or sets the error code. See RFC 006 for details of error codes.
- /// </summary>
- /// <value>The error code.</value>
- public int ErrorCode
- {
- get
- {
- return _errorCode;
- }
- set
- {
- _errorCode = value;
- }
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/AMQInvalidArgumentException.cs b/qpid/dotnet/Qpid.Common/AMQInvalidArgumentException.cs
deleted file mode 100644
index 831f7bab0e..0000000000
--- a/qpid/dotnet/Qpid.Common/AMQInvalidArgumentException.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Runtime.Serialization;
-
-using Apache.Qpid.Protocol;
-
-namespace Apache.Qpid
-{
- /// <summary>
- /// Thrown when an invalid argument was supplied to the broker
- /// </summary>
- [Serializable]
- public class AMQInvalidArgumentException : AMQException
- {
- public AMQInvalidArgumentException(string message)
- : base(AMQConstant.INVALID_ARGUMENT.Code, message, null)
- {
- }
-
- protected AMQInvalidArgumentException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/AMQUndeliveredException.cs b/qpid/dotnet/Qpid.Common/AMQUndeliveredException.cs
deleted file mode 100644
index 70ad86c8a3..0000000000
--- a/qpid/dotnet/Qpid.Common/AMQUndeliveredException.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid
-{
- /// <summary>
- /// Thrown when a message has been bounced by the broker, indicating it could not be delivered.
- /// </summary>
- [Serializable]
- public class AMQUndeliveredException : AMQException
- {
- // TODO: Warning, no guarantee that the value stored here is serializable!
- private object _bounced;
-
- public AMQUndeliveredException(int errorCode, string message, object bounced)
- : base(errorCode, message)
- {
- _bounced = bounced;
- }
-
- protected AMQUndeliveredException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- _bounced = info.GetValue("bounced", typeof(object));
- }
-
- public override void GetObjectData(SerializationInfo info, StreamingContext context)
- {
- base.GetObjectData(info, context);
- info.AddValue("bounced", _bounced);
- }
-
- public object GetUndeliveredMessage()
- {
- return _bounced;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/AssemblySettings.cs b/qpid/dotnet/Qpid.Common/AssemblySettings.cs
deleted file mode 100644
index 888de692e8..0000000000
--- a/qpid/dotnet/Qpid.Common/AssemblySettings.cs
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Configuration;
-using System.IO;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Xml;
-using log4net;
-
-namespace Apache.Qpid.Common
-{
- /// <summary>
- ///
- /// Mike Woodring
- /// Bear Canyon Consulting LLC
- /// http://www.bearcanyon.com
- ///
- /// AssemblySettings usage:
- ///
- /// If you know the keys you're after, the following is probably
- /// the most convenient:
- ///
- /// AssemblySettings settings = new AssemblySettings();
- /// string someSetting1 = settings["someKey1"];
- /// string someSetting2 = settings["someKey2"];
- ///
- /// If you want to enumerate over the settings (or just as an
- /// alternative approach), you can do this too:
- ///
- /// IDictionary settings = AssemblySettings.GetConfig();
- ///
- /// foreach( DictionaryEntry entry in settings )
- /// {
- /// // Use entry.Key or entry.Value as desired...
- /// }
- ///
- /// In either of the above two scenarios, the calling assembly
- /// (the one that called the constructor or GetConfig) is used
- /// to determine what file to parse and what the name of the
- /// settings collection element is. For example, if the calling
- /// assembly is c:\foo\bar\TestLib.dll, then the configuration file
- /// that's parsed is c:\foo\bar\TestLib.dll.config, and the
- /// configuration section that's parsed must be named <assemblySettings>.
- ///
- /// To retrieve the configuration information for an arbitrary assembly,
- /// use the overloaded constructor or GetConfig method that takes an
- /// Assembly reference as input.
- ///
- /// If your assembly is being automatically downloaded from a web
- /// site by an "href-exe" (an application that's run directly from a link
- /// on a web page), then the enclosed web.config shows the mechanism
- /// for allowing the AssemblySettings library to download the
- /// configuration files you're using for your assemblies (while not
- /// allowing web.config itself to be downloaded).
- ///
- /// If the assembly you are trying to use this with is installed in, and loaded
- /// from, the GAC then you'll need to place the config file in the GAC directory where
- /// the assembly is installed. On the first release of the CLR, this directory is
- /// <windir>\assembly\gac\libName\verNum__pubKeyToken]]>. For example,
- /// the assembly "SomeLib, Version=1.2.3.4, Culture=neutral, PublicKeyToken=abcd1234"
- /// would be installed to the c:\winnt\assembly\gac\SomeLib\1.2.3.4__abcd1234 diretory
- /// (assuming the OS is installed in c:\winnt). For future versions of the CLR, this
- /// directory scheme may change, so you'll need to check the <code>CodeBase</code> property
- /// of a GAC-loaded assembly in the debugger to determine the correct directory location.
- ///
- /// </summary>
- public class AssemblySettings
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(AssemblySettings));
-
- private IDictionary settings;
-
- [MethodImpl(MethodImplOptions.NoInlining)]
- public AssemblySettings()
- : this(Assembly.GetCallingAssembly())
- {
- }
-
- public AssemblySettings(Assembly asm)
- {
- settings = GetConfig(asm);
- }
-
- public string this[string key]
- {
- get
- {
- string settingValue = null;
-
- if (settings != null)
- {
- settingValue = settings[key] as string;
- }
-
- return (settingValue == null ? "" : settingValue);
- }
- }
-
- public static IDictionary GetConfig()
- {
- return GetConfig(Assembly.GetCallingAssembly());
- }
-
- public static IDictionary GetConfig(Assembly asm)
- {
- // Open and parse configuration file for specified
- // assembly, returning collection to caller for future
- // use outside of this class.
- string cfgFile = asm.CodeBase + ".config";
- try
- {
- const string nodeName = "assemblySettings";
-
- XmlDocument doc = new XmlDocument();
- doc.Load(new XmlTextReader(cfgFile));
-
- XmlNodeList nodes = doc.GetElementsByTagName(nodeName);
-
- foreach (XmlNode node in nodes)
- {
- if (node.LocalName == nodeName)
- {
- DictionarySectionHandler handler = new DictionarySectionHandler();
- return (IDictionary)handler.Create(null, null, node);
- }
- }
- }
- catch (FileNotFoundException)
- {
- _log.Warn("Assembly configuration file not found: " + cfgFile);
- }
- catch (Exception e)
- {
- _log.Warn("Failed to load .config file: " + cfgFile, e);
- }
-
- return null;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Collections/BlockingQueue.cs b/qpid/dotnet/Qpid.Common/Collections/BlockingQueue.cs
deleted file mode 100644
index dcfacf8474..0000000000
--- a/qpid/dotnet/Qpid.Common/Collections/BlockingQueue.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-
-namespace Apache.Qpid.Collections
-{
- public abstract class BlockingQueue : Queue
- {
- /**
- * Inserts the specified element into this queue if it is possible to do
- * so immediately without violating capacity restrictions, returning
- * <tt>true</tt> upon success and <tt>false</tt> if no space is currently
- * available. When using a capacity-restricted queue, this method is
- * generally preferable to {@link #add}, which can fail to insert an
- * element only by throwing an exception.
- *
- * @param e the element to add
- * @return <tt>true</tt> if the element was added to this queue, else
- * <tt>false</tt>
- * @throws ClassCastException if the class of the specified element
- * prevents it from being added to this queue
- * @throws NullPointerException if the specified element is null
- * @throws IllegalArgumentException if some property of the specified
- * element prevents it from being added to this queue
- */
- public abstract bool EnqueueNoThrow(Object e);
-
- /**
- * Inserts the specified element into this queue, waiting if necessary
- * for space to become available.
- *
- * @param e the element to add
- * @throws InterruptedException if interrupted while waiting
- * @throws ClassCastException if the class of the specified element
- * prevents it from being added to this queue
- * @throws NullPointerException if the specified element is null
- * @throws IllegalArgumentException if some property of the specified
- * element prevents it from being added to this queue
- */
- public abstract void EnqueueBlocking(object e);
-
- /**
- * Retrieves and removes the head of this queue, waiting up to the
- * specified wait time if necessary for an element to become available.
- *
- * @param timeout how long to wait before giving up, in units of
- * <tt>unit</tt>
- * @param unit a <tt>TimeUnit</tt> determining how to interpret the
- * <tt>timeout</tt> parameter
- * @return the head of this queue, or <tt>null</tt> if the
- * specified waiting time elapses before an element is available
- * @throws InterruptedException if interrupted while waiting
- */
- public abstract object DequeueBlocking();
-
- /**
- * Returns the number of additional elements that this queue can ideally
- * (in the absence of memory or resource constraints) accept without
- * blocking, or <tt>Integer.MAX_VALUE</tt> if there is no intrinsic
- * limit.
- *
- * <p>Note that you <em>cannot</em> always tell if an attempt to insert
- * an element will succeed by inspecting <tt>remainingCapacity</tt>
- * because it may be the case that another thread is about to
- * insert or remove an element.
- *
- * @return the remaining capacity
- */
- public abstract int RemainingCapacity
- {
- get;
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Common/Collections/ConsumerProducerQueue.cs b/qpid/dotnet/Qpid.Common/Collections/ConsumerProducerQueue.cs
deleted file mode 100644
index 131f316da6..0000000000
--- a/qpid/dotnet/Qpid.Common/Collections/ConsumerProducerQueue.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Threading;
-
-
-namespace Apache.Qpid.Collections
-{
- /// <summary>
- /// Simple FIFO queue to support multi-threaded consumer
- /// and producers. It supports timeouts in dequeue operations.
- /// </summary>
- public sealed class ConsumerProducerQueue
- {
- private Queue _queue = new Queue();
- private WaitSemaphore _semaphore = new WaitSemaphore();
-
- /// <summary>
- /// Put an item into the tail of the queue
- /// </summary>
- /// <param name="item"></param>
- public void Enqueue(object item)
- {
- lock ( _queue.SyncRoot )
- {
- _queue.Enqueue(item);
- _semaphore.Increment();
- }
- }
-
- /// <summary>
- /// Wait indefinitely for an item to be available
- /// on the queue.
- /// </summary>
- /// <returns>The object at the head of the queue</returns>
- public object Dequeue()
- {
- return Dequeue(Timeout.Infinite);
- }
-
- /// <summary>
- /// Wait up to the number of milliseconds specified
- /// for an item to be available on the queue
- /// </summary>
- /// <param name="timeout">Number of milliseconds to wait</param>
- /// <returns>The object at the head of the queue, or null
- /// if the timeout expires</returns>
- public object Dequeue(long timeout)
- {
- if ( _semaphore.Decrement(timeout) )
- {
- lock ( _queue.SyncRoot )
- {
- return _queue.Dequeue();
- }
- }
- return null;
- }
-
- #region Simple Semaphore
- //
- // Simple Semaphore
- //
-
- class WaitSemaphore
- {
- private int _count;
- private AutoResetEvent _event = new AutoResetEvent(false);
-
- public void Increment()
- {
- Interlocked.Increment(ref _count);
- _event.Set();
- }
-
- public bool Decrement(long timeout)
- {
- if ( timeout > int.MaxValue )
- throw new ArgumentOutOfRangeException("timeout", timeout, "Must be <= Int32.MaxValue");
-
- int millis = (int) (timeout & 0x7FFFFFFF);
- if ( Interlocked.Decrement(ref _count) > 0 )
- {
- // there are messages in queue, so no need to wait
- return true;
- } else
- {
- return _event.WaitOne(millis, false);
- }
- }
- }
- #endregion // Simple Semaphore
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Collections/LinkedBlockingQueue.cs b/qpid/dotnet/Qpid.Common/Collections/LinkedBlockingQueue.cs
deleted file mode 100644
index be92576951..0000000000
--- a/qpid/dotnet/Qpid.Common/Collections/LinkedBlockingQueue.cs
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-
-namespace Apache.Qpid.Collections
-{
- public class LinkedBlockingQueue : BlockingQueue
- {
-
- /*
- * A variant of the "two lock queue" algorithm. The putLock gates
- * entry to put (and offer), and has an associated condition for
- * waiting puts. Similarly for the takeLock. The "count" field
- * that they both rely on is maintained as an atomic to avoid
- * needing to get both locks in most cases. Also, to minimize need
- * for puts to get takeLock and vice-versa, cascading notifies are
- * used. When a put notices that it has enabled at least one take,
- * it signals taker. That taker in turn signals others if more
- * items have been entered since the signal. And symmetrically for
- * takes signalling puts. Operations such as remove(Object) and
- * iterators acquire both locks.
- */
-
- /**
- * Linked list node class
- */
- internal class Node
- {
- /** The item, volatile to ensure barrier separating write and read */
- internal volatile Object item;
- internal Node next;
- internal Node(Object x) { item = x; }
- }
-
- /** The capacity bound, or Integer.MAX_VALUE if none */
- private readonly int capacity;
-
- /** Current number of elements */
- private volatile int count = 0;
-
- /** Head of linked list */
- private Node head;
-
- /** Tail of linked list */
- private Node last;
-
- /** Lock held by take, poll, etc */
- private readonly object takeLock = new Object(); //new SerializableLock();
-
- /** Lock held by put, offer, etc */
- private readonly object putLock = new Object();//new SerializableLock();
-
- /**
- * Signals a waiting take. Called only from put/offer (which do not
- * otherwise ordinarily lock takeLock.)
- */
- private void SignalNotEmpty()
- {
- lock (takeLock)
- {
- Monitor.Pulse(takeLock);
- }
- }
-
- /**
- * Signals a waiting put. Called only from take/poll.
- */
- private void SignalNotFull()
- {
- lock (putLock)
- {
- Monitor.Pulse(putLock);
- }
- }
-
- /**
- * Creates a node and links it at end of queue.
- * @param x the item
- */
- private void Insert(Object x)
- {
- last = last.next = new Node(x);
- }
-
- /**
- * Removes a node from head of queue,
- * @return the node
- */
- private Object Extract()
- {
- Node first = head.next;
- head = first;
- Object x = first.item;
- first.item = null;
- return x;
- }
-
-
- /**
- * Creates a <tt>LinkedBlockingQueue</tt> with a capacity of
- * {@link Integer#MAX_VALUE}.
- */
- public LinkedBlockingQueue() : this(Int32.MaxValue)
- {
- }
-
- /**
- * Creates a <tt>LinkedBlockingQueue</tt> with the given (fixed) capacity.
- *
- * @param capacity the capacity of this queue
- * @throws IllegalArgumentException if <tt>capacity</tt> is not greater
- * than zero
- */
- public LinkedBlockingQueue(int capacity)
- {
- if (capacity <= 0) throw new ArgumentException("Capacity must be positive, was passed " + capacity);
- this.capacity = capacity;
- last = head = new Node(null);
- }
-
- // this doc comment is overridden to remove the reference to collections
- // greater in size than Integer.MAX_VALUE
- /**
- * Returns the number of elements in this queue.
- *
- * @return the number of elements in this queue
- */
- public int Size
- {
- get
- {
- return count;
- }
- }
-
- // this doc comment is a modified copy of the inherited doc comment,
- // without the reference to unlimited queues.
- /**
- * Returns the number of additional elements that this queue can ideally
- * (in the absence of memory or resource constraints) accept without
- * blocking. This is always equal to the initial capacity of this queue
- * less the current <tt>size</tt> of this queue.
- *
- * <p>Note that you <em>cannot</em> always tell if an attempt to insert
- * an element will succeed by inspecting <tt>remainingCapacity</tt>
- * because it may be the case that another thread is about to
- * insert or remove an element.
- */
- public override int RemainingCapacity
- {
- get
- {
- return capacity - count;
- }
- }
-
- /**
- * Inserts the specified element at the tail of this queue, waiting if
- * necessary for space to become available.
- *
- * @throws InterruptedException {@inheritDoc}
- * @throws NullPointerException {@inheritDoc}
- */
- public override void EnqueueBlocking(Object e)
- {
- if (e == null) throw new ArgumentNullException("Object must not be null");
- // Note: convention in all put/take/etc is to preset
- // local var holding count negative to indicate failure unless set.
- int c = -1;
- lock (putLock)
- {
- /*
- * Note that count is used in wait guard even though it is
- * not protected by lock. This works because count can
- * only decrease at this point (all other puts are shut
- * out by lock), and we (or some other waiting put) are
- * signalled if it ever changes from
- * capacity. Similarly for all other uses of count in
- * other wait guards.
- */
- while (count == capacity)
- {
- Monitor.Wait(putLock);
- }
-
- Insert(e);
- lock(this)
- {
- c = count++;
- }
- if (c + 1 < capacity)
- {
- Monitor.Pulse(putLock);
- }
- }
-
- if (c == 0)
- {
- SignalNotEmpty();
- }
- }
-
- /**
- * Inserts the specified element at the tail of this queue if it is
- * possible to do so immediately without exceeding the queue's capacity,
- * returning <tt>true</tt> upon success and <tt>false</tt> if this queue
- * is full.
- * When using a capacity-restricted queue, this method is generally
- * preferable to method {@link BlockingQueue#add add}, which can fail to
- * insert an element only by throwing an exception.
- *
- * @throws NullPointerException if the specified element is null
- */
- public override bool EnqueueNoThrow(Object e)
- {
- if (e == null) throw new ArgumentNullException("e must not be null");
- if (count == capacity)
- {
- return false;
- }
- int c = -1;
- lock (putLock)
- {
- if (count < capacity)
- {
- Insert(e);
- lock (this)
- {
- c = count++;
- }
- if (c + 1 < capacity)
- {
- Monitor.Pulse(putLock);
- }
- }
- }
- if (c == 0)
- {
- SignalNotEmpty();
- }
- return c >= 0;
- }
-
- /**
- * Retrieves and removes the head of this queue, waiting if necessary
- * until an element becomes available.
- *
- * @return the head of this queue
- * @throws InterruptedException if interrupted while waiting
- */
- public override Object DequeueBlocking()
- {
- Object x;
- int c = -1;
- lock (takeLock)
- {
-
- while (count == 0)
- {
- Monitor.Wait(takeLock);
- }
-
-
- x = Extract();
- lock (this) { c = count--; }
- if (c > 1)
- {
- Monitor.Pulse(takeLock);
- }
- }
- if (c == capacity)
- {
- SignalNotFull();
- }
- return x;
- }
-
- public Object Poll()
- {
- if (count == 0)
- {
- return null;
- }
- Object x = null;
- int c = -1;
- lock (takeLock)
- {
- if (count > 0)
- {
- x = Extract();
- lock (this) { c = count--; }
- if (c > 1)
- {
- Monitor.Pulse(takeLock);
- }
- }
- }
- if (c == capacity)
- {
- SignalNotFull();
- }
- return x;
- }
-
-
- public override Object Peek()
- {
- if (count == 0)
- {
- return null;
- }
- lock (takeLock)
- {
- Node first = head.next;
- if (first == null)
- {
- return null;
- }
- else
- {
- return first.item;
- }
- }
- }
-
- public override String ToString()
- {
- lock (putLock)
- {
- lock (takeLock)
- {
- return base.ToString();
- }
- }
- }
-
- /**
- * Atomically removes all of the elements from this queue.
- * The queue will be empty after this call returns.
- */
- public override void Clear()
- {
- lock (putLock)
- {
- lock (takeLock)
- {
- head.next = null;
- last = head;
- int c;
- lock (this)
- {
- c = count;
- count = 0;
- }
- if (c == capacity)
- {
- Monitor.PulseAll(putLock);
- }
- }
- }
- }
- }
-}
-
-
diff --git a/qpid/dotnet/Qpid.Common/Collections/LinkedHashtable.cs b/qpid/dotnet/Qpid.Common/Collections/LinkedHashtable.cs
deleted file mode 100644
index 10ab5c674d..0000000000
--- a/qpid/dotnet/Qpid.Common/Collections/LinkedHashtable.cs
+++ /dev/null
@@ -1,327 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-
-namespace Apache.Qpid.Collections
-{
- public class LinkedHashtable : IDictionary
- {
- /// <summary>
- /// Maps from key to LinkedDictionaryEntry
- /// </summary>
- private Hashtable _indexedValues = new Hashtable();
-
- private LinkedDictionaryEntry _head;
-
- private LinkedDictionaryEntry _tail;
-
- private class LinkedDictionaryEntry
- {
- public LinkedDictionaryEntry _previous;
- public LinkedDictionaryEntry _next;
- internal DictionaryEntry _entry;
-
- public LinkedDictionaryEntry(object key, object value)
- {
- _entry = new DictionaryEntry(key, value);
- }
- }
-
- public object this[object key]
- {
- get
- {
- LinkedDictionaryEntry entry = (LinkedDictionaryEntry)_indexedValues[key];
- if (entry == null)
- {
- return null; // key not found
- }
- else
- {
- return entry._entry.Value;
- }
- }
-
- set
- {
- LinkedDictionaryEntry entry = (LinkedDictionaryEntry)_indexedValues[key];
- if (entry == null)
- {
- Add(key, value);
- }
- else
- {
- entry._entry.Value = value;
- }
- }
- }
-
- /// <summary>
- /// Collect keys in linked order.
- /// </summary>
- public ICollection Keys
- {
- get
- {
- IList result = new ArrayList();
- foreach (DictionaryEntry entry in this)
- {
- result.Add(entry.Key);
- }
- return result;
- }
- }
-
- /// <summary>
- /// Collect values in linked order.
- /// </summary>
- public ICollection Values
- {
- get
- {
- IList result = new ArrayList();
- foreach (DictionaryEntry entry in this)
- {
- result.Add(entry.Value);
- }
- return result;
- }
- }
-
- public bool IsReadOnly
- {
- get { return _indexedValues.IsReadOnly; }
- }
-
- public bool IsFixedSize
- {
- get { return _indexedValues.IsFixedSize; }
- }
-
- public bool Contains(object key)
- {
- return _indexedValues.Contains(key);
- }
-
- public void Add(object key, object value)
- {
- if (key == null) throw new ArgumentNullException("key");
-
- if (Contains(key))
- {
- throw new ArgumentException("LinkedHashtable already contains key. key=" + key);
- }
-
- LinkedDictionaryEntry de = new LinkedDictionaryEntry(key, value);
- if (_head == null)
- {
- _head = de;
- _tail = de;
- }
- else
- {
- _tail._next = de;
- de._previous = _tail;
- _tail = de;
- }
- _indexedValues[key] = de;
- }
-
- public void Clear()
- {
- _indexedValues.Clear();
- }
-
- IDictionaryEnumerator IDictionary.GetEnumerator()
- {
- return new LHTEnumerator(this);
- }
-
- public void Remove(object key)
- {
- if (key == null) throw new ArgumentNullException("key");
-
- LinkedDictionaryEntry de = (LinkedDictionaryEntry)_indexedValues[key];
- if (de == null) return; // key not found.
- LinkedDictionaryEntry prev = de._previous;
- if (prev == null)
- {
- _head = de._next;
- }
- else
- {
- prev._next = de._next;
- }
-
- LinkedDictionaryEntry next = de._next;
- if (next == null)
- {
- _tail = de;
- }
- else
- {
- next._previous = de._previous;
- }
- }
-
- private LinkedDictionaryEntry Head
- {
- get
- {
- return _head;
- }
- }
-
-// private LinkedDictionaryEntry Tail
-// {
-// get
-// {
-// return _tail;
-// }
-// }
-
- private class LHTEnumerator : IDictionaryEnumerator
- {
- private LinkedHashtable _container;
-
- private LinkedDictionaryEntry _current;
-
- /// <summary>
- /// Set once we have navigated off the end of the collection
- /// </summary>
- private bool _needsReset = false;
-
- public LHTEnumerator(LinkedHashtable container)
- {
- _container = container;
- }
-
- public object Current
- {
- get
- {
- if (_current == null)
- {
- throw new Exception("Iterator before first element");
- }
- else
- {
- return _current._entry;
- }
- }
- }
-
- public object Key
- {
- get { return _current._entry.Key; }
- }
-
- public object Value
- {
- get { return _current._entry.Value; }
- }
-
- public DictionaryEntry Entry
- {
- get
- {
- return _current._entry;
- }
- }
-
- public bool MoveNext()
- {
- if (_needsReset)
- {
- return false;
- }
- else if (_current == null)
- {
- _current = _container.Head;
- }
- else
- {
- _current = _current._next;
- }
- _needsReset = (_current == null);
- return !_needsReset;
- }
-
- public void Reset()
- {
- _current = null;
- _needsReset = false;
- }
- }
-
- public void MoveToHead(object key)
- {
- LinkedDictionaryEntry de = (LinkedDictionaryEntry)_indexedValues[key];
- if (de == null)
- {
- throw new ArgumentException("Key " + key + " not found");
- }
- // if the head is the element then there is nothing to do
- if (_head == de)
- {
- return;
- }
- de._previous._next = de._next;
- if (de._next != null)
- {
- de._next._previous = de._previous;
- }
- else
- {
- _tail = de._previous;
- }
- de._next = _head;
- _head = de;
- de._previous = null;
- }
-
- public void CopyTo(Array array, int index)
- {
- _indexedValues.CopyTo(array, index);
- }
-
- public int Count
- {
- get { return _indexedValues.Count; }
- }
-
- public object SyncRoot
- {
- get { return _indexedValues.SyncRoot; }
- }
-
- public bool IsSynchronized
- {
- get { return _indexedValues.IsSynchronized; }
- }
-
- public IEnumerator GetEnumerator()
- {
- return new LHTEnumerator(this);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Collections/SynchronousQueue.cs b/qpid/dotnet/Qpid.Common/Collections/SynchronousQueue.cs
deleted file mode 100644
index 3c12df6067..0000000000
--- a/qpid/dotnet/Qpid.Common/Collections/SynchronousQueue.cs
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-
-namespace Apache.Qpid.Collections
-{
- public class SynchronousQueue : BlockingQueue
- {
- /// <summary>
- /// Lock protecting both wait queues
- /// </summary>
-// private readonly object _qlock = new object();
-
- /// <summary>
- /// Queue holding waiting puts
- /// </summary>
-// private readonly WaitQueue _waitingProducers;
-
- /// <summary>
- /// Queue holding waiting takes
- /// </summary>
-// private readonly WaitQueue _waitingConsumers;
-
- /**
- * Queue to hold waiting puts/takes; specialized to Fifo/Lifo below.
- * These queues have all transient fields, but are serializable
- * in order to recover fairness settings when deserialized.
- */
- internal abstract class WaitQueue
- {
- /** Creates, adds, and returns node for x. */
- internal abstract Node Enq(Object x);
- /** Removes and returns node, or null if empty. */
- internal abstract Node Deq();
- /** Removes a cancelled node to avoid garbage retention. */
- internal abstract void Unlink(Node node);
- /** Returns true if a cancelled node might be on queue. */
- internal abstract bool ShouldUnlink(Node node);
- }
-
- /**
- * FIFO queue to hold waiting puts/takes.
- */
- sealed class FifoWaitQueue : WaitQueue
- {
- private Node head;
- private Node last;
-
- internal override Node Enq(Object x)
- {
- Node p = new Node(x);
- if (last == null)
- {
- last = head = p;
- }
- else
- {
- last = last.next = p;
- }
- return p;
- }
-
- internal override Node Deq()
- {
- Node p = head;
- if (p != null)
- {
- if ((head = p.next) == null)
- {
- last = null;
- }
- p.next = null;
- }
- return p;
- }
-
- internal override bool ShouldUnlink(Node node)
- {
- return (node == last || node.next != null);
- }
-
- internal override void Unlink(Node node)
- {
- Node p = head;
- Node trail = null;
- while (p != null)
- {
- if (p == node)
- {
- Node next = p.next;
- if (trail == null)
- {
- head = next;
- }
- else
- {
- trail.next = next;
- }
- if (last == node)
- {
- last = trail;
- }
- break;
- }
- trail = p;
- p = p.next;
- }
- }
- }
-
- /**
- * LIFO queue to hold waiting puts/takes.
- */
- sealed class LifoWaitQueue : WaitQueue
- {
- private Node head;
-
- internal override Node Enq(Object x)
- {
- return head = new Node(x, head);
- }
-
- internal override Node Deq()
- {
- Node p = head;
- if (p != null)
- {
- head = p.next;
- p.next = null;
- }
- return p;
- }
-
- internal override bool ShouldUnlink(Node node)
- {
- // Return false if already dequeued or is bottom node (in which
- // case we might retain at most one garbage node)
- return (node == head || node.next != null);
- }
-
- internal override void Unlink(Node node)
- {
- Node p = head;
- Node trail = null;
- while (p != null)
- {
- if (p == node)
- {
- Node next = p.next;
- if (trail == null)
- head = next;
- else
- trail.next = next;
- break;
- }
- trail = p;
- p = p.next;
- }
- }
- }
-
- /**
- * Nodes each maintain an item and handle waits and signals for
- * getting and setting it. The class extends
- * AbstractQueuedSynchronizer to manage blocking, using AQS state
- * 0 for waiting, 1 for ack, -1 for cancelled.
- */
- sealed internal class Node
- {
-
- /** Synchronization state value representing that node acked */
- private const int ACK = 1;
- /** Synchronization state value representing that node cancelled */
- private const int CANCEL = -1;
-
- internal int state = 0;
-
- /** The item being transferred */
- internal Object item;
- /** Next node in wait queue */
- internal Node next;
-
- /** Creates a node with initial item */
- internal Node(Object x)
- {
- item = x;
- }
-
- /** Creates a node with initial item and next */
- internal Node(Object x, Node n)
- {
- item = x;
- next = n;
- }
-
- /**
- * Takes item and nulls out field (for sake of GC)
- *
- * PRE: lock owned
- */
- private Object Extract()
- {
- Object x = item;
- item = null;
- return x;
- }
-
- /**
- * Tries to cancel on interrupt; if so rethrowing,
- * else setting interrupt state
- *
- * PRE: lock owned
- */
- /*private void checkCancellationOnInterrupt(InterruptedException ie)
- throws InterruptedException
- {
- if (state == 0) {
- state = CANCEL;
- notify();
- throw ie;
- }
- Thread.currentThread().interrupt();
- }*/
-
- /**
- * Fills in the slot created by the consumer and signal consumer to
- * continue.
- */
- internal bool SetItem(Object x)
- {
- lock (this)
- {
- if (state != 0) return false;
- item = x;
- state = ACK;
- Monitor.Pulse(this);
- return true;
- }
- }
-
- /**
- * Removes item from slot created by producer and signal producer
- * to continue.
- */
- internal Object GetItem()
- {
- if (state != 0) return null;
- state = ACK;
- Monitor.Pulse(this);
- return Extract();
- }
-
- /**
- * Waits for a consumer to take item placed by producer.
- */
- internal void WaitForTake() //throws InterruptedException {
- {
- while (state == 0)
- {
- Monitor.Wait(this);
- }
- }
-
- /**
- * Waits for a producer to put item placed by consumer.
- */
- internal object WaitForPut()
- {
- lock (this)
- {
- while (state == 0) Monitor.Wait(this);
- }
- return Extract();
- }
-
- private bool Attempt(long nanos)
- {
- if (state != 0) return true;
- if (nanos <= 0) {
- state = CANCEL;
- Monitor.Pulse(this);
- return false;
- }
-
- while (true)
- {
- Monitor.Wait(nanos);
- //TimeUnit.NANOSECONDS.timedWait(this, nanos);
- if (state != 0)
- {
- return true;
- }
- //nanos = deadline - Utils.nanoTime();
- //if (nanos <= 0)
- else
- {
- state = CANCEL;
- Monitor.Pulse(this);
- return false;
- }
- }
- }
-
- /**
- * Waits for a consumer to take item placed by producer or time out.
- */
- internal bool WaitForTake(long nanos)
- {
- return Attempt(nanos);
- }
-
- /**
- * Waits for a producer to put item placed by consumer, or time out.
- */
- internal object WaitForPut(long nanos)
- {
- if (!Attempt(nanos))
- {
- return null;
- }
- else
- {
- return Extract();
- }
- }
- }
-
- public SynchronousQueue(bool strict)
- {
- // TODO !!!!
- }
-
- public override bool EnqueueNoThrow(object e)
- {
- throw new NotImplementedException();
- }
-
- public override void EnqueueBlocking(object e)
- {
- throw new NotImplementedException();
- }
-
- public override object DequeueBlocking()
- {
- throw new NotImplementedException();
- }
-
- public override int RemainingCapacity
- {
- get
- {
- throw new NotImplementedException();
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs b/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs
deleted file mode 100644
index 7867650e50..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockDecoder.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using log4net;
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Codec;
-using Apache.Qpid.Codec.Demux;
-
-namespace Apache.Qpid.Framing
-{
- public class AMQDataBlockDecoder : IMessageDecoder
- {
- private static ILog _logger = LogManager.GetLogger(typeof(AMQDataBlockDecoder));
-
- private Hashtable _supportedBodies = new Hashtable();
-
- private bool _disabled = false;
-
- public AMQDataBlockDecoder()
- {
- _supportedBodies[AMQMethodBody.TYPE] = AMQMethodBodyFactory.GetInstance();
- _supportedBodies[ContentHeaderBody.TYPE] = ContentHeaderBodyFactory.GetInstance();
- _supportedBodies[ContentBody.TYPE] = ContentBodyFactory.GetInstance();
- _supportedBodies[HeartbeatBody.TYPE] = new HeartbeatBodyFactory();
- }
-
- public MessageDecoderResult Decodable(ByteBuffer input)
- {
- if (_disabled)
- {
- return MessageDecoderResult.NOT_OK;
- }
- // final +1 represents the command end which we know we must require even
- // if there is an empty body
- if (input.Remaining < 1)
- {
- return MessageDecoderResult.NEED_DATA;
- }
- byte type = input.GetByte();
-
- // we have to check this isn't a protocol initiation frame here - we can't tell later on and we end up
- // waiting for more data. This could be improved if MINA supported some kind of state awareness when decoding
- if ((char)type == 'A')
- {
- _logger.Error("Received what appears to be a protocol initiation frame");
- return MessageDecoderResult.NOT_OK;
- }
- // zero, channel, body size and end byte
- if (input.Remaining < (1 + 2 + 4 + 1))
- {
- return MessageDecoderResult.NEED_DATA;
- }
-
- int channel = input.GetUInt16();
- long bodySize = input.GetUInt32();
-
- // bodySize can be zero
- if (type <= 0 || channel < 0 || bodySize < 0)
- {
- _logger.Error(String.Format("Error decoding frame: Type={0}, Channel={1}, BodySize={2}", type, channel, bodySize));
- return MessageDecoderResult.NOT_OK;
- }
-
- if (input.Remaining < (bodySize + 1))
- {
- return MessageDecoderResult.NEED_DATA;
- }
-
- if (IsSupportedFrameType(type))
- {
- if (_logger.IsDebugEnabled)
- {
- // we have read 7 bytes so far, so output 7 + bodysize + 1 (for end byte) to get complete data block size
- // this logging statement is useful when looking at exactly what size of data is coming in/out
- // the broker
- _logger.Debug("Able to decode data block of size " + (bodySize + 8));
- }
- return MessageDecoderResult.OK;
- }
- else
- {
- return MessageDecoderResult.NOT_OK;
- }
- }
-
- private bool IsSupportedFrameType(byte frameType)
- {
- bool result = _supportedBodies.ContainsKey(frameType);
-
- if (!result)
- {
- _logger.Warn("AMQDataBlockDecoder does not handle frame type " + frameType);
- }
-
- return result;
- }
-
- protected Object CreateAndPopulateFrame(ByteBuffer input)
- {
- byte type = input.GetByte();
- ushort channel = input.GetUInt16();
- uint bodySize = input.GetUInt32();
-
- IBodyFactory bodyFactory = (IBodyFactory)_supportedBodies[type];
- if (bodyFactory == null)
- {
- throw new AMQFrameDecodingException("Unsupported body type: " + type);
- }
- AMQFrame frame = new AMQFrame();
-
- frame.PopulateFromBuffer(input, channel, bodySize, bodyFactory);
-
- byte marker = input.GetByte();
- if (marker != 0xCE) {
- throw new FormatException("marker is not 0xCE");
- }
- return frame;
- }
-
- public MessageDecoderResult Decode(ByteBuffer input, IProtocolDecoderOutput output)
- {
-
- output.Write(CreateAndPopulateFrame(input));
-
- return MessageDecoderResult.OK;
- }
-
- public bool Disabled
- {
- set
- {
- _disabled = value;
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockEncoder.cs b/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockEncoder.cs
deleted file mode 100644
index e2645c630e..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/AMQDataBlockEncoder.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Collections;
-using log4net;
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Codec;
-using Apache.Qpid.Codec.Demux;
-
-namespace Apache.Qpid.Framing
-{
- public class AMQDataBlockEncoder : IMessageEncoder
- {
- private static ILog _logger = LogManager.GetLogger(typeof(AMQDataBlockEncoder));
-
- private Hashtable _messageTypes;
-
- public AMQDataBlockEncoder()
- {
- _messageTypes = new Hashtable();
- _messageTypes[typeof (IEncodableAMQDataBlock)] = 1;
- }
-
-
- public Hashtable MessageTypes
- {
- get
- {
- return _messageTypes;
- }
- }
-
- public void Encode(object message, IProtocolEncoderOutput output)
- {
- IDataBlock frame = (IDataBlock) message;
- int frameSize = (int)frame.Size; // TODO: sort out signed/unsigned
- ByteBuffer buffer = ByteBuffer.Allocate(frameSize);
- frame.WritePayload(buffer);
-
- if (_logger.IsDebugEnabled)
- {
- _logger.Debug("Encoded frame byte-buffer is '" + ByteBufferHexDumper.GetHexDump(buffer) + "'");
- }
- buffer.Flip();
- output.Write(buffer);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/AMQFrame.cs b/qpid/dotnet/Qpid.Common/Framing/AMQFrame.cs
deleted file mode 100644
index 912be72d30..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/AMQFrame.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- public class AMQFrame : IDataBlock
- {
- private ushort _channel;
-
- private IBody _bodyFrame;
-
- public AMQFrame()
- {
- }
-
- public AMQFrame(ushort channel, IBody bodyFrame)
- {
- _channel = channel;
- _bodyFrame = bodyFrame;
- }
-
- public ushort Channel
- {
- get
- {
- return _channel;
- }
- set
- {
- _channel = value;
- }
- }
-
- public IBody BodyFrame
- {
- get
- {
- return _bodyFrame;
- }
- set
- {
- _bodyFrame = value;
- }
- }
-
- #region IDataBlock Members
-
- public uint Size
- {
- get
- {
- return (uint) (1 + 2 + 4 + _bodyFrame.Size + 1);
- }
- }
-
- public void WritePayload(ByteBuffer buffer)
- {
- buffer.Put(_bodyFrame.BodyType);
- // TODO: how does channel get populated
- buffer.Put(_channel);
- buffer.Put(_bodyFrame.Size);
- _bodyFrame.WritePayload(buffer);
- buffer.Put((byte) 0xCE);
- }
-
- #endregion
-
- /// <summary>
- /// Populates the frame instance data from the supplied buffer.
- /// </summary>
- /// <param name="buffer">The buffer.</param>
- /// <param name="channel">The channel.</param>
- /// <param name="bodySize">Size of the body in bytes</param>
- /// <param name="bodyFactory">The body factory.</param>
- /// <exception cref="AMQFrameDecodingException">Thrown if the buffer cannot be decoded</exception>
- public void PopulateFromBuffer(ByteBuffer buffer, ushort channel, uint bodySize, IBodyFactory bodyFactory)
- {
- _channel = channel;
- _bodyFrame = bodyFactory.CreateBody(buffer);
- _bodyFrame.PopulateFromBuffer(buffer, bodySize);
- }
-
- public override string ToString()
- {
- return "Frame channelId: " + _channel + ", bodyFrame: " + _bodyFrame.ToString();
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/AMQFrameDecodingException.cs b/qpid/dotnet/Qpid.Common/Framing/AMQFrameDecodingException.cs
deleted file mode 100644
index cda8c84ecf..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/AMQFrameDecodingException.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-using log4net;
-
-namespace Apache.Qpid.Framing
-{
- /// <summary>
- /// Thrown when a frame cannot be decoded. This generally indicates a mismatch between the broker and the
- /// client.
- /// </summary>
- [Serializable]
- public class AMQFrameDecodingException : AMQException
- {
- public AMQFrameDecodingException(string message)
- : base(message)
- {
- }
-
- public AMQFrameDecodingException(string message, Exception innerException)
- : base(message, innerException)
- {
- }
-
- public AMQFrameDecodingException(ILog logger, string message)
- : base(logger, message)
- {
- }
-
- public AMQFrameDecodingException(ILog logger, string message, Exception innerException)
- : base(logger, message, innerException)
- {
- }
-
- protected AMQFrameDecodingException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/AMQMethodBody.cs b/qpid/dotnet/Qpid.Common/Framing/AMQMethodBody.cs
deleted file mode 100644
index a3c4337147..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/AMQMethodBody.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- public abstract class AMQMethodBody : IBody
- {
- public const byte TYPE = 1;
-
- protected abstract uint BodySize
- {
- get;
- }
-
- protected abstract ushort Clazz
- {
- get;
- }
-
- protected abstract ushort Method
- {
- get;
- }
-
- protected abstract void WriteMethodPayload(ByteBuffer buffer);
-
- public byte BodyType
- {
- get
- {
- return TYPE;
- }
- }
-
- public uint Size
- {
- get
- {
- return (uint) (2 + 2 + BodySize);
- }
- }
-
- public void WritePayload(ByteBuffer buffer)
- {
- buffer.Put(Clazz);
- buffer.Put(Method);
- WriteMethodPayload(buffer);
- }
-
- /// <summary>
- /// Populates the method body by decoding the specified buffer
- /// </summary>
- /// <param name="buffer">The buffer to decode.</param>
- /// <exception cref="AMQFrameDecodingException">If the buffer cannot be decoded</exception>
- protected abstract void PopulateMethodBodyFromBuffer(ByteBuffer buffer);
-
- /// <summary>
- /// Populates this instance from a buffer of data.
- /// </summary>
- /// <param name="buffer">The buffer.</param>
- /// <param name="size">The size.</param>
- /// <exception cref="AMQFrameDecodingException">If the buffer contains data that cannot be decoded</exception>
- public void PopulateFromBuffer(ByteBuffer buffer, uint size)
- {
- PopulateMethodBodyFromBuffer(buffer);
- }
-
- public override string ToString()
- {
- return String.Format("{0}{{ Class: {1} Method: {2} }}", GetType().Name, Clazz, Method);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/AMQMethodBodyFactory.cs b/qpid/dotnet/Qpid.Common/Framing/AMQMethodBodyFactory.cs
deleted file mode 100644
index c1fd3f887a..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/AMQMethodBodyFactory.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- public class AMQMethodBodyFactory : IBodyFactory
- {
- private static readonly AMQMethodBodyFactory _instance = new AMQMethodBodyFactory();
-
- public static AMQMethodBodyFactory GetInstance()
- {
- return _instance;
- }
-
- /// <summary>
- /// Creates the body.
- /// </summary>
- /// <param name="inbuf">The ByteBuffer containing data from the network</param>
- /// <returns></returns>
- /// <exception>AMQFrameDecodingException</exception>
- public IBody CreateBody(ByteBuffer inbuf)
- {
- return MethodBodyDecoderRegistry.Get(inbuf.GetUInt16(), inbuf.GetUInt16());
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/AMQProtocolHeaderException.cs b/qpid/dotnet/Qpid.Common/Framing/AMQProtocolHeaderException.cs
deleted file mode 100644
index 379e5d00ba..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/AMQProtocolHeaderException.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid.Framing
-{
- [Serializable]
- public class AMQProtocolHeaderException : AMQException
- {
- public AMQProtocolHeaderException(string message) : base(message)
- {
- }
-
- protected AMQProtocolHeaderException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/AMQType.cs b/qpid/dotnet/Qpid.Common/Framing/AMQType.cs
deleted file mode 100644
index 95da72b907..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/AMQType.cs
+++ /dev/null
@@ -1,700 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Text;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- /// <summary>
- /// Base class for the Field Table Type system.
- /// Ported over from the Java AMQType enumeration
- /// </summary>
- public abstract class AMQType
- {
- private byte _identifier;
-
- /// <summary>
- /// Type code identifier for this type
- /// </summary>
- public byte Identifier
- {
- get { return _identifier; }
- }
-
- protected AMQType(char identifier)
- {
- _identifier = (byte)identifier;
- }
-
- /// <summary>
- /// Create a new <see cref="AMQTypedValue"/> instance
- /// </summary>
- /// <param name="value">Value to initialize with</param>
- /// <returns>A new typed value instance</returns>
- public AMQTypedValue AsTypedValue(object value)
- {
- return new AMQTypedValue(this, ToNativeValue(value));
- }
-
- /// <summary>
- /// Write the specified value to the buffer using the encoding
- /// specified for this type
- /// </summary>
- /// <param name="value">Value to write</param>
- /// <param name="buffer">Buffer to write to</param>
- public void WriteToBuffer(object value, ByteBuffer buffer)
- {
- buffer.Put(Identifier);
- WriteValueImpl(value, buffer);
- }
-
- public override string ToString()
- {
- return ((Char) Identifier).ToString();
- }
-
- /// <summary>
- /// Get the encoding size for the specified value in this type format
- /// </summary>
- /// <param name="value">Value to find encoded size for</param>
- /// <returns>The encoded size</returns>
- public abstract uint GetEncodingSize(object value);
- /// <summary>
- /// Convert the specified value to this type
- /// </summary>
- /// <param name="value">Value to convert</param>
- /// <returns>The converted value</returns>
- public abstract object ToNativeValue(object value);
-
- /// <summary>
- /// Read a value from the specified buffer using the encoding for
- /// this type
- /// </summary>
- /// <param name="buffer">Buffer to read from</param>
- /// <returns>The value read</returns>
- public abstract object ReadValueFromBuffer(ByteBuffer buffer);
-
- protected abstract void WriteValueImpl(Object value, ByteBuffer buffer);
-
-
- #region Known Types
- //
- // Known Types
- //
-
- // long string is not defined in the proposed specification,
- // and the 'S' discriminator is left for unsigned short (16-bit) values
- public static readonly AMQType LONG_STRING = new AMQLongStringType();
- public static readonly AMQType UINT32 = new AMQUInt32Type();
- public static readonly AMQType DECIMAL = new AMQDecimalType();
- public static readonly AMQType TIMESTAMP = new AMQTimeStampType();
- public static readonly AMQType FIELD_TABLE = new AMQFieldTableType();
- public static readonly AMQType VOID = new AMQVoidType();
- public static readonly AMQType BINARY = new AMQBinaryType();
- public static readonly AMQType ASCII_STRING = new AMQAsciiStringType();
- public static readonly AMQType WIDE_STRING = new AMQWideStringType();
- public static readonly AMQType BOOLEAN = new AMQBooleanType();
- public static readonly AMQType ASCII_CHARACTER = new AMQAsciiCharType();
- public static readonly AMQType BYTE = new AMQByteType();
- public static readonly AMQType SBYTE = new AMQSByteType();
- public static readonly AMQType INT16 = new AMQInt16Type();
- public static readonly AMQType UINT16 = new AMQUInt16Type();
- public static readonly AMQType INT32 = new AMQInt32Type();
- public static readonly AMQType INT64 = new AMQInt64Type();
- public static readonly AMQType UINT64 = new AMQUInt64Type();
- public static readonly AMQType FLOAT = new AMQFloatType();
- public static readonly AMQType DOUBLE = new AMQDoubleType();
-
- #endregion // Known Types
-
- #region Type Implementation
- //
- // Type Implementation
- //
-
- sealed class AMQLongStringType : AMQType
- {
- public AMQLongStringType() : base('S')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedLongStringLength((string) value);
- }
-
- public override object ToNativeValue(object value)
- {
- if ( value == null )
- throw new ArgumentNullException("value");
- return value.ToString();
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadLongString(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteLongStringBytes(buffer, (string) value);
- }
-
- }
-
- sealed class AMQUInt32Type : AMQType
- {
- public AMQUInt32Type() : base('i')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.UnsignedIntegerLength();
- }
-
- public override object ToNativeValue(object value)
- {
- return Convert.ToUInt32(value);
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadUnsignedInteger(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteUnsignedInteger(buffer, (uint) value);
- }
-
- }
-
- sealed class AMQDecimalType : AMQType
- {
- public AMQDecimalType() : base('D')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- throw new NotImplementedException();
- }
-
- public override object ToNativeValue(object value)
- {
- throw new NotImplementedException();
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- throw new NotImplementedException();
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- throw new NotImplementedException();
- }
- }
-
- sealed class AMQTimeStampType : AMQType
- {
- public AMQTimeStampType() : base('T')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- throw new NotImplementedException();
- }
-
- public override object ToNativeValue(object value)
- {
- throw new NotImplementedException();
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- throw new NotImplementedException();
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- throw new NotImplementedException();
- }
- }
-
- sealed class AMQFieldTableType : AMQType
- {
- public AMQFieldTableType() : base('F')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- throw new NotImplementedException();
- }
-
- public override object ToNativeValue(object value)
- {
- throw new NotImplementedException();
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- throw new NotImplementedException();
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- throw new NotImplementedException();
- }
- }
-
- sealed class AMQVoidType : AMQType
- {
- public AMQVoidType() : base('V')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return 0;
- }
-
- public override object ToNativeValue(object value)
- {
- if ( value != null )
- throw new FormatException(string.Format("Cannot convert {0} to VOID type", value));
- return null;
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return null;
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- }
- }
-
- // Extended Types
-
- sealed class AMQBinaryType : AMQType
- {
- public AMQBinaryType() : base('x')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedLongstrLength((byte[]) value);
- }
-
- public override object ToNativeValue(object value)
- {
- if ( value is byte[] || value == null )
- {
- return value;
- }
- throw new ArgumentException("Value cannot be converted to byte[]");
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadLongstr(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteLongstr(buffer, (byte[])value);
- }
- }
-
- sealed class AMQAsciiStringType : AMQType
- {
- public AMQAsciiStringType() : base('c')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedAsciiStringLength((string)value);
- }
-
- public override object ToNativeValue(object value)
- {
- if ( value == null )
- throw new ArgumentNullException("value");
- return value.ToString();
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadAsciiString(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteAsciiString(buffer, (string)value);
- }
- }
-
- sealed class AMQWideStringType : AMQType
- {
- // todo: Change encoding to UTF16 (java code still uses default
- // ascii encoding for wide strings
- private static readonly Encoding ENCODING = Encoding.ASCII;
-
- public AMQWideStringType()
- : base('C')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedLongStringLength((string)value, ENCODING);
- }
-
- public override object ToNativeValue(object value)
- {
- if ( value == null )
- throw new ArgumentNullException("value");
- return value.ToString();
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadLongString(buffer, ENCODING);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteLongStringBytes(buffer, (string)value, ENCODING);
- }
- }
-
- sealed class AMQBooleanType : AMQType
- {
- public AMQBooleanType() : base('t')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedBooleanLength();
- }
-
- public override object ToNativeValue(object value)
- {
- return Convert.ToBoolean(value);
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadBoolean(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteBoolean(buffer, (bool)value);
- }
- }
-
- sealed class AMQAsciiCharType : AMQType
- {
- public AMQAsciiCharType() : base('k')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedCharLength();
- }
-
- public override object ToNativeValue(object value)
- {
- return Convert.ToChar(value);
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadChar(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteChar(buffer, (char)value);
- }
- }
-
- sealed class AMQByteType : AMQType
- {
- public AMQByteType() : base('B')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedByteLength();
- }
-
- public override object ToNativeValue(object value)
- {
- return Convert.ToByte(value);
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadByte(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteByte(buffer, (byte)value);
- }
- }
-
- sealed class AMQSByteType : AMQType
- {
- public AMQSByteType()
- : base('b')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedSByteLength();
- }
-
- public override object ToNativeValue(object value)
- {
- return Convert.ToSByte(value);
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadSByte(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteSByte(buffer, (sbyte)value);
- }
- }
-
- sealed class AMQInt16Type : AMQType
- {
- public AMQInt16Type() : base('s')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedShortLength();
- }
-
- public override object ToNativeValue(object value)
- {
- return Convert.ToInt16(value);
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadShort(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteShort(buffer, (short)value);
- }
- }
-
- sealed class AMQUInt16Type : AMQType
- {
- public AMQUInt16Type()
- : base('S')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedUnsignedShortLength();
- }
-
- public override object ToNativeValue(object value)
- {
- return Convert.ToUInt16(value);
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadUnsignedShort(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteUnsignedShort(buffer, (ushort)value);
- }
- }
-
- sealed class AMQInt32Type : AMQType
- {
- public AMQInt32Type() : base('I')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedIntegerLength();
- }
-
- public override object ToNativeValue(object value)
- {
- return Convert.ToInt32(value);
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadInteger(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteInteger(buffer, (int)value);
- }
- }
-
- sealed class AMQInt64Type : AMQType
- {
- public AMQInt64Type() : base('l')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedLongLength();
- }
-
- public override object ToNativeValue(object value)
- {
- return Convert.ToInt64(value);
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadLong(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteLong(buffer, (long)value);
- }
- }
-
- sealed class AMQUInt64Type : AMQType
- {
- public AMQUInt64Type()
- : base('L')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedUnsignedLongLength();
- }
-
- public override object ToNativeValue(object value)
- {
- return Convert.ToUInt64(value);
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadUnsignedLong(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteUnsignedLong(buffer, (ulong)value);
- }
- }
-
- sealed class AMQFloatType : AMQType
- {
- public AMQFloatType() : base('f')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedFloatLength();
- }
-
- public override object ToNativeValue(object value)
- {
- return Convert.ToSingle(value);
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadFloat(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteFloat(buffer, (float)value);
- }
- }
-
- sealed class AMQDoubleType : AMQType
- {
- public AMQDoubleType() : base('d')
- {
- }
-
- public override uint GetEncodingSize(object value)
- {
- return EncodingUtils.EncodedDoubleLength();
- }
-
- public override object ToNativeValue(object value)
- {
- return Convert.ToDouble(value);
- }
-
- public override object ReadValueFromBuffer(ByteBuffer buffer)
- {
- return EncodingUtils.ReadDouble(buffer);
- }
-
- protected override void WriteValueImpl(object value, ByteBuffer buffer)
- {
- EncodingUtils.WriteDouble(buffer, (double)value);
- }
- }
-
- #endregion // Type Implementation
-
- } // class AMQType
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/AMQTypeMap.cs b/qpid/dotnet/Qpid.Common/Framing/AMQTypeMap.cs
deleted file mode 100644
index 8497c283f9..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/AMQTypeMap.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-
-namespace Apache.Qpid.Framing
-{
- public sealed class AMQTypeMap
- {
- private static Hashtable _reverseTypeMap;
-
- private AMQTypeMap()
- {
- }
-
- static AMQTypeMap()
- {
- _reverseTypeMap = Hashtable.Synchronized(new Hashtable());
-
- Add(AMQType.LONG_STRING);
- Add(AMQType.BOOLEAN);
- Add(AMQType.BYTE);
- Add(AMQType.SBYTE);
- Add(AMQType.INT16);
- // not supported for now as type code conflicts
- // with LONG_STRING
- //Add(AMQType.UINT16);
- Add(AMQType.INT32);
- Add(AMQType.UINT32);
- Add(AMQType.INT64);
- Add(AMQType.UINT64);
- Add(AMQType.FLOAT);
- Add(AMQType.DOUBLE);
- Add(AMQType.DECIMAL);
- Add(AMQType.BINARY);
- Add(AMQType.ASCII_STRING);
- Add(AMQType.WIDE_STRING);
- Add(AMQType.ASCII_CHARACTER);
- Add(AMQType.TIMESTAMP);
- Add(AMQType.FIELD_TABLE);
- Add(AMQType.VOID);
- }
-
- public static AMQType GetType(byte identifier)
- {
- AMQType type = (AMQType)_reverseTypeMap[identifier];
- if ( type == null )
- throw new ArgumentOutOfRangeException(string.Format("No such type code: {0:x}", identifier));
- return type;
- }
-
- private static void Add(AMQType type)
- {
- _reverseTypeMap.Add(type.Identifier, type);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/AMQTypedValue.cs b/qpid/dotnet/Qpid.Common/Framing/AMQTypedValue.cs
deleted file mode 100644
index 3d2e313fa6..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/AMQTypedValue.cs
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- public class AMQTypedValue
- {
- private readonly AMQType _type;
- private readonly object _value;
-
- public AMQType Type
- {
- get { return _type; }
- }
-
- public object Value
- {
- get { return _value; }
- }
-
- public uint EncodingLength
- {
- get { return _type.GetEncodingSize(_value); }
- }
-
- public AMQTypedValue(AMQType type, object value)
- {
- if ( type == null )
- throw new ArgumentNullException("type");
- _type = type;
- _value = type.ToNativeValue(value);
- }
-
- public AMQTypedValue(AMQType type, ByteBuffer buffer)
- {
- _type = type;
- _value = type.ReadValueFromBuffer(buffer);
- }
-
- public void WriteToBuffer(ByteBuffer buffer)
- {
- _type.WriteToBuffer(_value, buffer);
- }
-
- public static AMQTypedValue ReadFromBuffer(ByteBuffer buffer)
- {
- AMQType type = AMQTypeMap.GetType(buffer.GetByte());
- return new AMQTypedValue(type, buffer);
- }
-
- public override string ToString()
- {
- return string.Format("{0}: {1}", Type, Value);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/BasicContentHeaderProperties.cs b/qpid/dotnet/Qpid.Common/Framing/BasicContentHeaderProperties.cs
deleted file mode 100644
index 47db7b0887..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/BasicContentHeaderProperties.cs
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using log4net;
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Framing
-{
- public class BasicContentHeaderProperties : IContentHeaderProperties
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(BasicContentHeaderProperties));
-
- private string _contentType;
- private string _encoding;
- private FieldTable _headers;
- private byte _deliveryMode;
- private byte _priority;
- private string _correlationId;
- private long _expiration;
- private string _replyTo;
- private string _messageId;
- private ulong _timestamp;
- private string _type;
- private string _userId;
- private string _appId;
- private string _clusterId;
-
-
- #region Properties
- //
- // Properties
- //
-
- /// <summary>
- /// The MIME Content Type
- /// </summary>
- public string ContentType
- {
- get { return _contentType; }
- set { _contentType = value; }
- }
-
- /// <summary>
- /// The MIME Content Encoding
- /// </summary>
- public string Encoding
- {
- get { return _encoding; }
- set { _encoding = value; }
- }
-
- /// <summary>
- /// Message headers
- /// </summary>
- public FieldTable Headers
- {
- get { return _headers; }
- set { _headers = value; }
- }
-
- /// <summary>
- /// Non-persistent (1) or persistent (2)
- /// </summary>
- public byte DeliveryMode
- {
- get { return _deliveryMode; }
- set { _deliveryMode = value; }
- }
-
- /// <summary>
- /// The message priority, 0 to 9
- /// </summary>
- public byte Priority
- {
- get { return _priority; }
- set { _priority = value; }
- }
-
- /// <summary>
- /// The application correlation identifier
- /// </summary>
- public string CorrelationId
- {
- get { return _correlationId; }
- set { _correlationId = value; }
- }
-
- /// <summary>
- /// Message expiration specification
- /// </summary>
- // TODO: Should be string according to spec
- public long Expiration
- {
- get { return _expiration; }
- set { _expiration = value; }
- }
-
- /// <summary>
- /// The destination to reply to
- /// </summary>
- public string ReplyTo
- {
- get { return _replyTo; }
- set { _replyTo = value; }
- }
-
- /// <summary>
- /// The application message identifier
- /// </summary>
- public string MessageId
- {
- get { return _messageId; }
- set { _messageId = value; }
- }
-
- /// <summary>
- /// The message timestamp
- /// </summary>
- public ulong Timestamp
- {
- get { return _timestamp; }
- set { _timestamp = value; }
- }
-
- /// <summary>
- /// The message type name
- /// </summary>
- public string Type
- {
- get { return _type; }
- set { _type = value; }
- }
-
- /// <summary>
- /// The creating user id
- /// </summary>
- public string UserId
- {
- get { return _userId; }
- set { _userId = value; }
- }
-
- /// <summary>
- /// The creating application id
- /// </summary>
- public string AppId
- {
- get { return _appId; }
- set { _appId = value; }
- }
-
- /// <summary>
- /// Intra-cluster routing identifier
- /// </summary>
- public string ClusterId
- {
- get { return _clusterId; }
- set { _clusterId = value; }
- }
-
- #endregion // Properties
-
-
- public BasicContentHeaderProperties()
- {
- }
-
- public uint PropertyListSize
- {
- get
- {
- return (uint)(EncodingUtils.EncodedShortStringLength(ContentType) +
- EncodingUtils.EncodedShortStringLength(Encoding) +
- EncodingUtils.EncodedFieldTableLength(Headers) +
- 1 + 1 +
- EncodingUtils.EncodedShortStringLength(CorrelationId) +
- EncodingUtils.EncodedShortStringLength(ReplyTo) +
- EncodingUtils.EncodedShortStringLength(String.Format("{0:D}", Expiration)) +
- EncodingUtils.EncodedShortStringLength(MessageId) +
- 8 +
- EncodingUtils.EncodedShortStringLength(Type) +
- EncodingUtils.EncodedShortStringLength(UserId) +
- EncodingUtils.EncodedShortStringLength(AppId) +
- EncodingUtils.EncodedShortStringLength(ClusterId));
-
- }
- }
-
- public ushort PropertyFlags
- {
- get
- {
- int value = 0;
-
- // for now we just blast in all properties
- for ( int i = 0; i < 14; i++ )
- {
- value += (1 << (15 - i));
- }
- return (ushort)value;
- }
- }
-
- public void WritePropertyListPayload(ByteBuffer buffer)
- {
- EncodingUtils.WriteShortStringBytes(buffer, ContentType);
- EncodingUtils.WriteShortStringBytes(buffer, Encoding);
- EncodingUtils.WriteFieldTableBytes(buffer, Headers);
- buffer.Put(DeliveryMode);
- buffer.Put(Priority);
- EncodingUtils.WriteShortStringBytes(buffer, CorrelationId);
- EncodingUtils.WriteShortStringBytes(buffer, ReplyTo);
- EncodingUtils.WriteShortStringBytes(buffer, String.Format("{0:D}", Expiration));
- EncodingUtils.WriteShortStringBytes(buffer, MessageId);
- buffer.Put(Timestamp);
- EncodingUtils.WriteShortStringBytes(buffer, Type);
- EncodingUtils.WriteShortStringBytes(buffer, UserId);
- EncodingUtils.WriteShortStringBytes(buffer, AppId);
- EncodingUtils.WriteShortStringBytes(buffer, ClusterId);
- }
-
- public void PopulatePropertiesFromBuffer(ByteBuffer buffer, ushort propertyFlags)
- {
- _log.Debug("Property flags: " + propertyFlags);
- if ( (propertyFlags & (1 << 15)) > 0 )
- ContentType = EncodingUtils.ReadShortString(buffer);
- if ( (propertyFlags & (1 << 14)) > 0 )
- Encoding = EncodingUtils.ReadShortString(buffer);
- if ( (propertyFlags & (1 << 13)) > 0 )
- Headers = EncodingUtils.ReadFieldTable(buffer);
- if ( (propertyFlags & (1 << 12)) > 0 )
- DeliveryMode = buffer.GetByte();
- if ( (propertyFlags & (1 << 11)) > 0 )
- Priority = buffer.GetByte();
- if ( (propertyFlags & (1 << 10)) > 0 )
- CorrelationId = EncodingUtils.ReadShortString(buffer);
- if ( (propertyFlags & (1 << 9)) > 0 )
- ReplyTo = EncodingUtils.ReadShortString(buffer);
- if ( (propertyFlags & (1 << 8)) > 0 )
- Expiration = EncodingUtils.ReadLongAsShortString(buffer);
- if ( (propertyFlags & (1 << 7)) > 0 )
- MessageId = EncodingUtils.ReadShortString(buffer);
- if ( (propertyFlags & (1 << 6)) > 0 )
- Timestamp = buffer.GetUInt64();
- if ( (propertyFlags & (1 << 5)) > 0 )
- Type = EncodingUtils.ReadShortString(buffer);
- if ( (propertyFlags & (1 << 4)) > 0 )
- UserId = EncodingUtils.ReadShortString(buffer);
- if ( (propertyFlags & (1 << 3)) > 0 )
- AppId = EncodingUtils.ReadShortString(buffer);
- if ( (propertyFlags & (1 << 2)) > 0 )
- ClusterId = EncodingUtils.ReadShortString(buffer);
- }
-
- public void SetDeliveryMode(DeliveryMode deliveryMode)
- {
- if ( deliveryMode == Messaging.DeliveryMode.NonPersistent )
- {
- DeliveryMode = 1;
- } else
- {
- DeliveryMode = 2;
- }
- }
-
- public override string ToString()
- {
- return "Properties: " + ContentType + " " + Encoding + " " + Timestamp + " " + Type;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/CompositeAMQDataBlock.cs b/qpid/dotnet/Qpid.Common/Framing/CompositeAMQDataBlock.cs
deleted file mode 100644
index d2b7f606b2..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/CompositeAMQDataBlock.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Text;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- public class CompositeAMQDataBlock : IDataBlock, IEncodableAMQDataBlock
- {
- private IDataBlock[] _blocks;
-
- public CompositeAMQDataBlock(IDataBlock[] blocks)
- {
- _blocks = blocks;
- }
-
- public IDataBlock[] Blocks
- {
- get
- {
- return _blocks;
- }
- }
-
- public uint Size
- {
- get
- {
- uint frameSize = 0;
- foreach (IDataBlock block in _blocks)
- {
- frameSize += block.Size;
- }
- return frameSize;
- }
- }
-
- public void WritePayload(ByteBuffer buffer)
- {
- foreach (IDataBlock block in _blocks)
- {
- block.WritePayload(buffer);
- }
- }
-
- public override string ToString()
- {
- if (_blocks == null)
- {
- return "No blocks contained in composite frame";
- }
- else
- {
- StringBuilder buf = new StringBuilder(GetType().Name);
- buf.Append("{");
- //buf.Append("encodedBlock=").Append(_encodedBlock);
- for (int i = 0; i < _blocks.Length; i++)
- {
- buf.Append(" ").Append(i).Append("=[").Append(_blocks[i].ToString()).Append("]");
- }
- buf.Append("}");
- return buf.ToString();
- }
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/ContentBody.cs b/qpid/dotnet/Qpid.Common/Framing/ContentBody.cs
deleted file mode 100644
index 7a2142985d..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/ContentBody.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- public class ContentBody : IBody
- {
- public const byte TYPE = 3;
-
- private ByteBuffer _payload;
-
- public ByteBuffer Payload
- {
- get { return _payload; }
- }
-
- public ContentBody()
- {
- }
- public ContentBody(ByteBuffer payload)
- {
- PopulateFromBuffer(payload, (uint)payload.Remaining);
- }
- public ContentBody(ByteBuffer payload, uint length)
- {
- PopulateFromBuffer(payload, length);
- }
-
- #region IBody Members
-
- public byte BodyType
- {
- get
- {
- return TYPE;
- }
- }
-
- public uint Size
- {
- get
- {
- return (ushort)(Payload == null ? 0 : Payload.Remaining);
- }
- }
-
- public void WritePayload(ByteBuffer buffer)
- {
- if (Payload != null)
- {
- buffer.Put(Payload);
- Payload.Rewind();
- }
- }
-
- public void PopulateFromBuffer(ByteBuffer buffer, uint size)
- {
- if (size > 0)
- {
- _payload = buffer.Slice();
- _payload.Limit = (int)size;
- buffer.Skip((int)size);
- }
- }
-
- #endregion
-
- public static AMQFrame CreateAMQFrame(ushort channelId, ContentBody body)
- {
- AMQFrame frame = new AMQFrame();
- frame.Channel = channelId;
- frame.BodyFrame = body;
- return frame;
- }
-
- public override string ToString()
- {
- return string.Format("ContentBody [ Size: {0} ]", Size);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/ContentBodyFactory.cs b/qpid/dotnet/Qpid.Common/Framing/ContentBodyFactory.cs
deleted file mode 100644
index 400b2aec08..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/ContentBodyFactory.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- public class ContentBodyFactory : IBodyFactory
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(ContentBodyFactory));
-
- private static readonly ContentBodyFactory _instance = new ContentBodyFactory();
-
- public static ContentBodyFactory GetInstance()
- {
- return _instance;
- }
-
- private ContentBodyFactory()
- {
- _log.Debug("Creating content body factory");
- }
-
- /// <summary>
- /// Creates the body.
- /// </summary>
- /// <param name="inbuf">The ByteBuffer containing data from the network</param>
- /// <returns></returns>
- /// <exception>AMQFrameDecodingException</exception>
- public IBody CreateBody(ByteBuffer inbuf)
- {
- return new ContentBody();
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/ContentHeaderBody.cs b/qpid/dotnet/Qpid.Common/Framing/ContentHeaderBody.cs
deleted file mode 100644
index 82889c23c8..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/ContentHeaderBody.cs
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- public class ContentHeaderBody : IBody
- {
- public static readonly byte TYPE = 2;
-
- public ushort ClassId;
-
- public ushort Weight;
-
- public ulong BodySize;
-
- /** must never be null */
- public IContentHeaderProperties Properties;
-
- public ContentHeaderBody()
- {
- }
-
- public ContentHeaderBody(IContentHeaderProperties props, ushort classId)
- {
- Properties = props;
- ClassId = classId;
- }
-
- public ContentHeaderBody(ushort classId, ushort weight, IContentHeaderProperties props, uint bodySize)
- : this(props, classId)
- {
- Weight = weight;
- BodySize = bodySize;
- }
-
- #region IBody Members
-
- public byte BodyType
- {
- get
- {
- return TYPE;
- }
- }
-
- public uint Size
- {
- get
- {
- return (2 + 2 + 8 + 2 + Properties.PropertyListSize);
- }
- }
-
- public void WritePayload(ByteBuffer buffer)
- {
- buffer.Put(ClassId);
- buffer.Put(Weight);
- buffer.Put(BodySize);
- buffer.Put(Properties.PropertyFlags);
- Properties.WritePropertyListPayload(buffer);
- }
-
- public void PopulateFromBuffer(ByteBuffer buffer, uint size)
- {
- ClassId = buffer.GetUInt16();
- Weight = buffer.GetUInt16();
- BodySize = buffer.GetUInt64();
- ushort propertyFlags = buffer.GetUInt16();
- ContentHeaderPropertiesFactory factory = ContentHeaderPropertiesFactory.GetInstance();
- Properties = factory.CreateContentHeaderProperties(ClassId, propertyFlags, buffer);
- }
-
- #endregion
-
- public static AMQFrame CreateAMQFrame(ushort channelId, ushort classId, ushort weight, BasicContentHeaderProperties properties,
- uint bodySize)
- {
- AMQFrame frame = new AMQFrame();
- frame.Channel = channelId;
- frame.BodyFrame = new ContentHeaderBody(classId, weight, properties, bodySize);
- return frame;
- }
-
- public static AMQFrame CreateAMQFrame(ushort channelId, ContentHeaderBody body)
- {
- AMQFrame frame = new AMQFrame();
- frame.Channel = channelId;
- frame.BodyFrame = body;
- return frame;
- }
-
- public override string ToString()
- {
- return String.Format("ContentHeaderBody: ClassId {0}, Weight {1}, BodySize {2}, Properties {3}", ClassId, Weight,
- BodySize, Properties);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/ContentHeaderBodyFactory.cs b/qpid/dotnet/Qpid.Common/Framing/ContentHeaderBodyFactory.cs
deleted file mode 100644
index c95a10871d..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/ContentHeaderBodyFactory.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- public class ContentHeaderBodyFactory : IBodyFactory
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(ContentHeaderBodyFactory));
-
- private static readonly ContentHeaderBodyFactory _instance = new ContentHeaderBodyFactory();
-
- public static ContentHeaderBodyFactory GetInstance()
- {
- return _instance;
- }
-
- private ContentHeaderBodyFactory()
- {
- _log.Debug("Creating content header body factory");
- }
-
- #region IBodyFactory Members
-
- public IBody CreateBody(ByteBuffer inbuf)
- {
- // all content headers are the same - it is only the properties that differ.
- // the content header body further delegates construction of properties
- return new ContentHeaderBody();
- }
-
- #endregion
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/ContentHeaderPropertiesFactory.cs b/qpid/dotnet/Qpid.Common/Framing/ContentHeaderPropertiesFactory.cs
deleted file mode 100644
index bac5d10fd4..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/ContentHeaderPropertiesFactory.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- public class ContentHeaderPropertiesFactory
- {
-
- private static readonly ContentHeaderPropertiesFactory _instance = new ContentHeaderPropertiesFactory();
-
- public static ContentHeaderPropertiesFactory GetInstance()
- {
- return _instance;
- }
-
- private ContentHeaderPropertiesFactory()
- {
- }
-
- /// <summary>
- /// Creates the content header properties from a buffer.
- /// </summary>
- /// <param name="classId">The class id.</param>
- /// <param name="propertyFlags">The property flags.</param>
- /// <param name="buffer">The buffer.</param>
- /// <returns>a populated properties structure</returns>
- /// <exception cref="AMQFrameDecodingException">if the buffer cannot be decoded</exception>
- public IContentHeaderProperties CreateContentHeaderProperties(ushort classId, ushort propertyFlags,
- ByteBuffer buffer)
- {
- IContentHeaderProperties properties;
- switch (classId)
- {
- case 60:
- properties = new BasicContentHeaderProperties();
- break;
- default:
- throw new AMQFrameDecodingException("Unsupport content header class id: " + classId);
- }
- properties.PopulatePropertiesFromBuffer(buffer, propertyFlags);
- return properties;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/EncodingUtils.cs b/qpid/dotnet/Qpid.Common/Framing/EncodingUtils.cs
deleted file mode 100644
index 4d424656f9..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/EncodingUtils.cs
+++ /dev/null
@@ -1,460 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Globalization;
-using System.Text;
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- public class EncodingUtils
- {
- private static readonly Encoding DEFAULT_ENCODER = Encoding.ASCII;
-
- // SHORT STRING
- public static ushort EncodedShortStringLength(string s)
- {
- if ( s == null )
- {
- return 1;
- } else
- {
- return (ushort)(1 + s.Length);
- }
- }
- public static void WriteShortStringBytes(ByteBuffer buffer, string s)
- {
- if ( s != null )
- {
- //try
- //{
- //final byte[] encodedString = s.getBytes(STRING_ENCODING);
- byte[] encodedString;
- lock ( DEFAULT_ENCODER )
- {
- encodedString = DEFAULT_ENCODER.GetBytes(s);
- }
- // TODO: check length fits in an unsigned byte
- buffer.Put((byte)encodedString.Length);
- buffer.Put(encodedString);
-
- } else
- {
- // really writing out unsigned byte
- buffer.Put((byte)0);
- }
- }
-
- // ASCII STRINGS
- public static uint EncodedAsciiStringLength(string s)
- {
- // TODO: move this to 2-byte length once the proposed encodings
- // have been approved. Also, validate length!
- if ( s == null )
- return 4;
- else
- return (uint) (4 + s.Length);
- }
- public static string ReadAsciiString(ByteBuffer buffer)
- {
- return ReadLongString(buffer, DEFAULT_ENCODER);
- }
- public static void WriteAsciiString(ByteBuffer buffer, string s)
- {
- WriteLongStringBytes(buffer, s, DEFAULT_ENCODER);
- }
-
- // LONG STRING
- public static uint EncodedLongStringLength(string s)
- {
- return EncodedLongStringLength(s, DEFAULT_ENCODER);
- }
-
- public static uint EncodedLongStringLength(string s, Encoding encoding)
- {
- if ( s == null )
- {
- return 4;
- } else
- {
- return (uint)(4 + encoding.GetByteCount(s));
- }
- }
- public static string ReadLongString(ByteBuffer buffer)
- {
- return ReadLongString(buffer, DEFAULT_ENCODER);
- }
- public static string ReadLongString(ByteBuffer buffer, Encoding encoding)
- {
- uint length = buffer.GetUInt32();
- if ( length == 0 )
- {
- return null;
- } else
- {
- byte[] data = new byte[length];
- buffer.GetBytes(data);
- lock ( encoding )
- {
- return encoding.GetString(data);
- }
- }
- }
- public static void WriteLongStringBytes(ByteBuffer buffer, string s)
- {
- WriteLongStringBytes(buffer, s, DEFAULT_ENCODER);
- }
-
- public static void WriteLongStringBytes(ByteBuffer buffer, string s, Encoding encoding)
- {
- if ( !(s == null || s.Length <= 0xFFFE) )
- {
- throw new ArgumentException("String too long");
- }
- if ( s != null )
- {
- lock ( encoding )
- {
- byte[] encodedString = encoding.GetBytes(s);
- buffer.Put((uint)encodedString.Length);
- buffer.Put(encodedString);
- }
- } else
- {
- buffer.Put((uint)0);
- }
- }
-
- // BINARY
- public static uint EncodedLongstrLength(byte[] bytes)
- {
- if ( bytes == null )
- {
- return 4;
- } else
- {
- return (uint)(4 + bytes.Length);
- }
- }
- public static byte[] ReadLongstr(ByteBuffer buffer)
- {
- uint length = buffer.GetUInt32();
- if ( length == 0 )
- {
- return null;
- } else
- {
- byte[] result = new byte[length];
- buffer.GetBytes(result);
- return result;
- }
- }
- public static void WriteLongstr(ByteBuffer buffer, byte[] data)
- {
- if ( data != null )
- {
- buffer.Put((uint)data.Length);
- buffer.Put(data);
- } else
- {
- buffer.Put((uint)0);
- }
- }
-
- // BOOLEANS
- public static bool[] ReadBooleans(ByteBuffer buffer)
- {
- byte packedValue = buffer.GetByte();
- bool[] result = new bool[8];
-
- for ( int i = 0; i < 8; i++ )
- {
- result[i] = ((packedValue & (1 << i)) != 0);
- }
- return result;
- }
- public static void WriteBooleans(ByteBuffer buffer, bool[] values)
- {
- byte packedValue = 0;
- for ( int i = 0; i < values.Length; i++ )
- {
- if ( values[i] )
- {
- packedValue = (byte)(packedValue | (1 << i));
- }
- }
-
- buffer.Put(packedValue);
- }
-
- // FIELD TABLES
- public static uint EncodedFieldTableLength(FieldTable table)
- {
- if ( table == null )
- {
- // size is encoded as 4 octets
- return 4;
- } else
- {
- // size of the table plus 4 octets for the size
- return table.EncodedSize + 4;
- }
- }
- /// <summary>
- /// Reads the field table using the data in the specified buffer
- /// </summary>
- /// <param name="buffer">The buffer to read from.</param>
- /// <returns>a populated field table</returns>
- /// <exception cref="AMQFrameDecodingException">if the buffer does not contain a decodable field table</exception>
- public static FieldTable ReadFieldTable(ByteBuffer buffer)
- {
- uint length = buffer.GetUInt32();
- if ( length == 0 )
- {
- return null;
- } else
- {
- return new FieldTable(buffer, length);
- }
- }
- public static void WriteFieldTableBytes(ByteBuffer buffer, FieldTable table)
- {
- if ( table != null )
- {
- table.WriteToBuffer(buffer);
- } else
- {
- buffer.Put((uint)0);
- }
- }
-
-
- /// <summary>
- /// Read a short string from the buffer
- /// </summary>
- /// <param name="buffer">The buffer to read from.</param>
- /// <returns>a string</returns>
- /// <exception cref="AMQFrameDecodingException">if the buffer does not contain a decodable short string</exception>
- public static string ReadShortString(ByteBuffer buffer)
- {
- byte length = buffer.GetByte();
- if ( length == 0 )
- {
- return null;
- } else
- {
- byte[] data = new byte[length];
- buffer.GetBytes(data);
-
- lock ( DEFAULT_ENCODER )
- {
- return DEFAULT_ENCODER.GetString(data);
- }
- }
- }
-
-
-
- // BOOLEAN
- public static uint EncodedBooleanLength()
- {
- return 1;
- }
- public static bool ReadBoolean(ByteBuffer buffer)
- {
- byte packedValue = buffer.GetByte();
- return (packedValue == 1);
- }
- public static void WriteBoolean(ByteBuffer buffer, bool value)
- {
- buffer.Put((byte)(value ? 1 : 0));
- }
-
-
- // CHAR
- public static uint EncodedCharLength()
- {
- return EncodedByteLength();
- }
- public static char ReadChar(ByteBuffer buffer)
- {
- return (char)buffer.GetByte();
- }
- public static void WriteChar(ByteBuffer buffer, char value)
- {
- buffer.Put((byte)value);
- }
-
- // BYTE
- public static uint EncodedByteLength()
- {
- return 1;
- }
- public static byte ReadByte(ByteBuffer buffer)
- {
- return buffer.GetByte();
- }
- public static void WriteByte(ByteBuffer buffer, byte value)
- {
- buffer.Put(value);
- }
-
- // SBYTE
- public static uint EncodedSByteLength()
- {
- return 1;
- }
- public static sbyte ReadSByte(ByteBuffer buffer)
- {
- return buffer.GetSByte();
- }
- public static void WriteSByte(ByteBuffer buffer, sbyte value)
- {
- buffer.Put(value);
- }
-
- // INT16
- public static uint EncodedShortLength()
- {
- return 2;
- }
-
- public static short ReadShort(ByteBuffer buffer)
- {
- return buffer.GetInt16();
- }
- public static void WriteShort(ByteBuffer buffer, short value)
- {
- buffer.Put(value);
- }
-
- // UINT16
- public static uint EncodedUnsignedShortLength()
- {
- return 2;
- }
-
- public static ushort ReadUnsignedShort(ByteBuffer buffer)
- {
- return buffer.GetUInt16();
- }
- public static void WriteUnsignedShort(ByteBuffer buffer, ushort value)
- {
- buffer.Put(value);
- }
-
-
- // INT32
- public static uint EncodedIntegerLength()
- {
- return 4;
- }
- public static int ReadInteger(ByteBuffer buffer)
- {
- return buffer.GetInt32();
- }
- public static void WriteInteger(ByteBuffer buffer, int value)
- {
- buffer.Put(value);
- }
-
- // UINT32
- public static uint UnsignedIntegerLength()
- {
- return 4;
- }
- public static void WriteUnsignedInteger(ByteBuffer buffer, uint value)
- {
- buffer.Put(value);
- }
- public static uint ReadUnsignedInteger(ByteBuffer buffer)
- {
- return buffer.GetUInt32();
- }
-
- // INT64
- public static uint EncodedUnsignedLongLength()
- {
- return 8;
- }
- public static ulong ReadUnsignedLong(ByteBuffer buffer)
- {
- return buffer.GetUInt64();
- }
- public static void WriteUnsignedLong(ByteBuffer buffer, ulong value)
- {
- buffer.Put(value);
- }
-
- // UINT64
- public static uint EncodedLongLength()
- {
- return 8;
- }
- public static long ReadLong(ByteBuffer buffer)
- {
- return buffer.GetInt64();
- }
- public static void WriteLong(ByteBuffer buffer, long value)
- {
- buffer.Put(value);
- }
-
- // FLOAT
- public static uint EncodedFloatLength()
- {
- return 4;
- }
- public static void WriteFloat(ByteBuffer buffer, float value)
- {
- buffer.Put(value);
- }
- public static float ReadFloat(ByteBuffer buffer)
- {
- return buffer.GetFloat();
- }
-
- // DOUBLE
- public static uint EncodedDoubleLength()
- {
- return 8;
- }
- public static void WriteDouble(ByteBuffer buffer, double value)
- {
- buffer.Put(value);
- }
- public static double ReadDouble(ByteBuffer buffer)
- {
- return buffer.GetDouble();
- }
-
- // OTHER
- public static long ReadLongAsShortString(ByteBuffer buffer)
- {
- string value = ReadShortString(buffer);
- if ( value == null || value.Length == 0 )
- return 0L;
- return Convert.ToInt64(value, CultureInfo.InvariantCulture);
- }
-
- }
-
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/FieldTable.cs b/qpid/dotnet/Qpid.Common/Framing/FieldTable.cs
deleted file mode 100644
index 6567bf58ab..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/FieldTable.cs
+++ /dev/null
@@ -1,633 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Text;
-using log4net;
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Collections;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Framing
-{
- public class FieldTable : IFieldTable, IEnumerable
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(FieldTable));
-
- IDictionary _properties;
- private ByteBuffer _encodedForm;
- private object _syncLock;
- private uint _encodedSize;
-
- public FieldTable()
- {
- _syncLock = new object();
- }
-
- /// <summary>
- /// Construct a new field table.
- /// </summary>
- /// <param name="buffer">the buffer from which to read data. The length byte must be read already</param>
- /// <param name="length">the length of the field table. Must be > 0.</param>
- public FieldTable(ByteBuffer buffer, uint length) : this()
- {
- _encodedForm = buffer.Slice();
- _encodedForm.Limit = (int)length;
- _encodedSize = length;
- buffer.Skip((int)length);
- }
-
- /// <summary>
- /// The set of all property names
- /// </summary>
- public ICollection Keys
- {
- get
- {
- InitMapIfNecessary();
- return _properties.Keys;
- }
- }
-
- /// <summary>
- /// Calculated size of this field table once encoded
- /// </summary>
- public uint EncodedSize
- {
- get { return _encodedSize; }
- }
-
- /// <summary>
- /// Number of properties in the field table
- /// </summary>
- public int Count
- {
- get
- {
- InitMapIfNecessary();
- return _properties.Count;
- }
- }
-
- /// <summary>
- /// Gets or sets the specified property.
- /// </summary>
- /// <param name="key">Property name</param>
- /// <returns>The specified property value</returns>
- public object this[string key]
- {
- get { return GetObject(key); }
- set { SetObject(key, value); }
- }
-
- #region Typed Setters and Getters
- //
- // Typed Setters and Getters
- //
- public bool GetBoolean(string key)
- {
- return (bool)this[key];
- }
- public void SetBoolean(string key, bool value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.BOOLEAN.AsTypedValue(value));
- }
- public byte GetByte(string key)
- {
- return (byte)this[key];
- }
- public void SetByte(string key, byte value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.BYTE.AsTypedValue(value));
- }
- public sbyte GetSByte(string key)
- {
- return (sbyte)this[key];
- }
- public void SetSByte(string key, sbyte value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.SBYTE.AsTypedValue(value));
- }
- public short GetInt16(string key)
- {
- return (short)this[key];
- }
- public void SetInt16(string key, short value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.INT16.AsTypedValue(value));
- }
- public int GetInt32(string key)
- {
- return (int)this[key];
- }
- public void SetInt32(string key, int value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.INT32.AsTypedValue(value));
- }
- public long GetInt64(string key)
- {
- return (long)this[key];
- }
- public void SetInt64(string key, long value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.INT64.AsTypedValue(value));
- }
- public char GetChar(string key)
- {
- return (char)this[key];
- }
- public void SetChar(string key, char value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.ASCII_CHARACTER.AsTypedValue(value));
- }
- public float GetFloat(string key)
- {
- return (float)this[key];
- }
- public void SetFloat(string key, float value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.FLOAT.AsTypedValue(value));
- }
- public double GetDouble(string key)
- {
- return (double)this[key];
- }
- public void SetDouble(string key, double value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.DOUBLE.AsTypedValue(value));
- }
- public decimal GetDecimal(string key)
- {
- return (decimal)this[key];
- }
- public void SetDecimal(string key, decimal value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.DECIMAL.AsTypedValue(value));
- }
- public string GetString(string key)
- {
- return (string)this[key];
- }
- public void SetString(string key, string value)
- {
- CheckPropertyName(key);
- if ( value == null )
- SetProperty(key, AMQType.VOID.AsTypedValue(null));
- else
- SetProperty(key, AMQType.LONG_STRING.AsTypedValue(value));
- }
- public byte[] GetBytes(string key)
- {
- return (byte[])this[key];
- }
- public void SetBytes(string key, byte[] value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.BINARY.AsTypedValue(value));
- }
- public ushort GetUInt16(string key)
- {
- return (ushort)this[key];
- }
- public void SetUInt16(string key, ushort value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.UINT16.AsTypedValue(value));
- }
- public uint GetUInt32(string key)
- {
- return (uint)this[key];
- }
- public void SetUInt32(string key, uint value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.UINT32.AsTypedValue(value));
- }
- public ulong GetUInt64(string key)
- {
- return (ulong)this[key];
- }
- public void SetUInt64(string key, ulong value)
- {
- CheckPropertyName(key);
- SetProperty(key, AMQType.UINT64.AsTypedValue(value));
- }
-
- #endregion // Typed Setters and Getters
-
- #region Public Methods
- //
- // Public Methods
- //
-
- /// <summary>
- /// Removes the property with the specified name
- /// </summary>
- /// <param name="key">The name of the property to remove</param>
- /// <returns>The previous value of the property or null</returns>
- public AMQTypedValue RemoveKey(string key)
- {
- InitMapIfNecessary();
- _encodedForm = null;
- AMQTypedValue value = (AMQTypedValue)_properties[key];
- if ( value != null )
- {
- _properties.Remove(key);
- _encodedSize -= EncodingUtils.EncodedShortStringLength(key);
- _encodedSize--;
- _encodedSize -= value.EncodingLength;
-
- }
- return value;
- }
-
-
- /// <summary>
- /// Remove the property with the specified name
- /// </summary>
- /// <param name="key">The name of the property to remove</param>
- public void Remove(string key)
- {
- RemoveKey(key);
- }
-
- /// <summary>
- /// Remove all properties from the table
- /// </summary>
- public void Clear()
- {
- InitMapIfNecessary();
- _encodedForm = null;
- _properties.Clear();
- _encodedSize = 0;
- }
-
- /// <summary>
- /// Adds all the items from one field table in this one. Will overwrite any items in the current table
- /// with the same key.
- /// </summary>
- /// <param name="ft">the source field table</param>
- public void AddAll(IFieldTable ft)
- {
- foreach ( DictionaryEntry dictionaryEntry in ft )
- {
- this[(string)dictionaryEntry.Key] = dictionaryEntry.Value;
- }
- }
-
- /// <summary>
- /// Get a enumerator over the internal property set.
- /// Notice the enumerator will DictionaryEntry objects with
- /// a string as the Key and an <see cref="AMQTypedValue"/> instance as the value
- /// </summary>
- /// <returns>The enumerator object</returns>
- public IEnumerator GetEnumerator()
- {
- InitMapIfNecessary();
- return _properties.GetEnumerator();
- }
-
- /// <summary>
- /// Indicates if a property with the given name exists
- /// </summary>
- /// <param name="s">Property name to check</param>
- /// <returns>True if the property exists</returns>
- public bool Contains(string s)
- {
- InitMapIfNecessary();
- return _properties.Contains(s);
- }
-
- /// <summary>
- /// Returns a dictionary mapping Property Names to the corresponding
- /// <see cref="AMQTypedValue"/> value
- /// </summary>
- /// <returns>The internal dictionary</returns>
- public IDictionary AsDictionary()
- {
- InitMapIfNecessary();
- return _properties;
- }
-
- /// <summary>
- /// Returns a string representation of this field table
- /// </summary>
- /// <returns>A string</returns>
- public override string ToString()
- {
- StringBuilder sb = new StringBuilder("FieldTable {");
-
- bool first = true;
- InitMapIfNecessary();
- foreach ( DictionaryEntry entry in _properties )
- {
- if ( !first )
- {
- sb.Append(", ");
- }
- first = false;
- sb.Append(entry.Key).Append(" => ").Append(entry.Value);
- }
-
- sb.Append("}");
- return sb.ToString();
- }
-
- /// <summary>
- /// Serializes this instance to the specified <see cref="ByteBuffer"/>.
- /// </summary>
- /// <param name="buffer">The buffer to write to</param>
- public void WriteToBuffer(ByteBuffer buffer)
- {
- if ( _log.IsDebugEnabled )
- {
- _log.Debug("FieldTable::writeToBuffer: Writing encoded length of " + EncodedSize + "...");
- }
-
- EncodingUtils.WriteUnsignedInteger(buffer, EncodedSize);
- WritePayload(buffer);
- }
-
- /// <summary>
- /// Returns a byte array with the serialized representation
- /// of this field table
- /// </summary>
- /// <returns>An array of bytes</returns>
- public byte[] GetDataAsBytes()
- {
- ByteBuffer buffer = ByteBuffer.Allocate((int)_encodedSize);
- WritePayload(buffer);
- byte[] result = new byte[_encodedSize];
- buffer.Flip();
- buffer.GetBytes(result);
- //buffer.Release();
- return result;
- }
-
- #endregion // Public Methods
-
- #region Private Methods
- //
- // Private Methods
- //
-
- private static void CheckPropertyName(string propertyName)
- {
- if ( propertyName == null || propertyName.Length == 0 )
- throw new ArgumentNullException("propertyName");
- CheckIdentifierFormat(propertyName);
- }
-
- private static void CheckIdentifierFormat(string propertyName)
- {
- // AMQP Spec: 4.2.5.5 Field Tables
- // Guidelines for implementers:
- // * Field names MUST start with a letter, '$' or '#' and may continue with
- // letters, '$' or '#', digits, or underlines, to a maximum length of 128
- // characters.
- // * The server SHOULD validate field names and upon receiving an invalid
- // field name, it SHOULD signal a connection exception with reply code
- // 503 (syntax error). Conformance test: amq_wlp_table_01.
- // * A peer MUST handle duplicate fields by using only the first instance.
-
-
- // AMQP length limit
- if ( propertyName.Length > 128 )
- {
- throw new ArgumentException("AMQP limits property names to 128 characters");
- }
-
- // AMQ start character
- if ( !(Char.IsLetter(propertyName[0])
- || propertyName[0] == '$'
- || propertyName[0] == '#'
- || propertyName[0] == '_' ) )// Not official AMQP added for JMS.
- {
- throw new ArgumentException("Identifier '" + propertyName + "' does not start with a valid AMQP start character");
- }
- }
-
- private object GetObject(string key)
- {
- AMQTypedValue value = GetProperty(key);
- return value != null ? value.Value : null;
- }
-
- private void SetObject(string key, object value)
- {
- if ( value is bool )
- {
- SetBoolean(key, (bool)value);
- } else if ( value is byte )
- {
- SetByte(key, (byte)value);
- } else if ( value is sbyte )
- {
- SetSByte(key, (sbyte)value);
- } else if ( value is short )
- {
- SetInt16(key, (short)value);
- } else if ( value is ushort )
- {
- SetUInt16(key, (ushort)value);
- } else if ( value is int )
- {
- SetInt32(key, (int) value);
- } else if ( value is uint )
- {
- SetUInt32(key, (uint)value);
- } else if ( value is long )
- {
- SetInt64(key, (long) value);
- } else if ( value is ulong )
- {
- SetUInt64(key, (ulong)value);
- } else if ( value is char )
- {
- SetChar(key, (char) value);
- } else if ( value is float )
- {
- SetFloat(key, (float) value);
- } else if ( value is double )
- {
- SetDouble(key, (double) value);
- } else if ( value is decimal )
- {
- SetDecimal(key, (decimal) value);
- } else if ( value is string )
- {
- SetString(key, (string) value);
- } else if ( value is byte[] )
- {
- SetBytes(key, (byte[])value);
- } else
- {
- throw new ArgumentException("Data type not supported yet");
- }
- }
-
- private AMQTypedValue GetProperty(string name)
- {
- InitMapIfNecessary();
- return (AMQTypedValue) _properties[name];
- }
-
- private void PopulateFromBuffer()
- {
- try
- {
- ByteBuffer buffer = _encodedForm;
- _encodedForm = null;
- if ( buffer != null )
- SetFromBuffer(buffer, _encodedSize);
- } catch ( AMQFrameDecodingException e )
- {
- _log.Error("Error decoding FieldTable in deferred decoding mode ", e);
- throw;
- }
- }
-
- private void SetFromBuffer(ByteBuffer buffer, uint length)
- {
- bool trace = _log.IsDebugEnabled;
- if ( length > 0 )
- {
- int expectedRemaining = buffer.Remaining - (int)length;
- _properties = new LinkedHashtable();
-
- do
- {
- string key = EncodingUtils.ReadShortString(buffer);
- AMQTypedValue value = AMQTypedValue.ReadFromBuffer(buffer);
- if ( trace )
- {
- _log.Debug(string.Format("FieldTable::PropFieldTable(buffer,{0}): Read type '{1}', key '{2}', value '{3}'", length, value.Type, key, value.Value));
- }
- _properties.Add(key, value);
-
- } while ( buffer.Remaining > expectedRemaining );
- _encodedSize = length;
- }
- if ( trace )
- {
- _log.Debug("FieldTable::FieldTable(buffer," + length + "): Done.");
- }
- }
-
- private void InitMapIfNecessary()
- {
- lock ( _syncLock )
- {
- if ( _properties == null )
- {
- if ( _encodedForm == null )
- {
- _properties = new LinkedHashtable();
- } else
- {
- PopulateFromBuffer();
- }
- }
- }
- }
-
- private AMQTypedValue SetProperty(string key, AMQTypedValue value)
- {
- InitMapIfNecessary();
- _encodedForm = null;
- if ( value == null )
- {
- RemoveKey(key);
- }
- AMQTypedValue oldVal = (AMQTypedValue)_properties[key];
- _properties.Add(key, value);
- if ( oldVal != null )
- {
- _encodedSize -= oldVal.EncodingLength;
- } else
- {
- _encodedSize += EncodingUtils.EncodedShortStringLength(key) + (uint)1;
- }
- if ( value != null )
- {
- _encodedSize += value.EncodingLength;
- }
-
- return oldVal;
- }
-
- public void WritePayload(ByteBuffer buffer)
- {
- if ( _encodedForm != null )
- {
- lock ( _syncLock )
- {
- buffer.Put(_encodedForm);
- _encodedForm.Flip();
- }
- } else if ( _properties != null )
- {
- foreach ( DictionaryEntry de in _properties )
- {
- string key = (string)de.Key;
- AMQTypedValue value = (AMQTypedValue)de.Value;
- try
- {
- if ( _log.IsDebugEnabled )
- {
- _log.Debug("Writing Property:" + key +
- " Type:" + value.Type +
- " Value:" + value.Value);
- _log.Debug("Buffer Position:" + buffer.Position +
- " Remaining:" + buffer.Remaining);
- }
- //Write the actual parameter name
- EncodingUtils.WriteShortStringBytes(buffer, key);
- value.WriteToBuffer(buffer);
- } catch ( Exception ex )
- {
- if ( _log.IsDebugEnabled )
- {
- _log.Debug("Exception thrown:" + ex);
- _log.Debug("Writing Property:" + key +
- " Type:" + value.Type +
- " Value:" + value.Value);
- _log.Debug("Buffer Position:" + buffer.Position +
- " Remaining:" + buffer.Remaining);
- }
- throw;
- }
- }
- }
- }
- #endregion // Private Methods
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/HeartbeatBody.cs b/qpid/dotnet/Qpid.Common/Framing/HeartbeatBody.cs
deleted file mode 100644
index a8906f5ba8..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/HeartbeatBody.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- public class HeartbeatBody : IBody
-{
- public const byte TYPE = 8;
- public static AMQFrame FRAME = new HeartbeatBody().ToFrame();
-
- public byte BodyType
- {
- get
- {
- return TYPE;
- }
- }
-
- public uint Size
- {
- get
- {
- return 0;//heartbeats we generate have no payload
- }
- }
-
- public void WritePayload(ByteBuffer buffer)
- {
- }
-
- public void PopulateFromBuffer(ByteBuffer buffer, uint size)
- {
- if (size > 0)
- {
- //allow other implementations to have a payload, but ignore it:
- buffer.Skip((int) size);
- }
- }
-
- public AMQFrame ToFrame()
- {
- return new AMQFrame(0, this);
- }
-}
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/HeartbeatBodyFactory.cs b/qpid/dotnet/Qpid.Common/Framing/HeartbeatBodyFactory.cs
deleted file mode 100644
index 90e5c7768e..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/HeartbeatBodyFactory.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- public class HeartbeatBodyFactory : IBodyFactory
- {
- public IBody CreateBody(ByteBuffer input)
- {
- return new HeartbeatBody();
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/IBody.cs b/qpid/dotnet/Qpid.Common/Framing/IBody.cs
deleted file mode 100644
index 97b4459e5c..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/IBody.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- /// <summary>
- /// An IBody is contained within a top level frame. As such, it is not en/decodable on its own but
- /// is decoded as a step within a the overall en/decoding process.
- /// </summary>
- public interface IBody
- {
- /// <summary>
- /// Gets the type. See RFC 006 for the meaning of "type" in this context.
- /// </summary>
- /// <value>The type.</value>
- byte BodyType
- {
- get;
- }
-
- /// <summary>
- /// Get the size of the body
- /// </summary>
- /// <value>The size in bytes.</value>
- uint Size
- {
- get;
- }
-
- /// <summary>
- /// Writes this instance to a buffer.
- /// </summary>
- /// <param name="buffer">The buffer.</param>
- void WritePayload(ByteBuffer buffer);
-
- /// <summary>
- /// Populates this instance from a buffer of data.
- /// </summary>
- /// <param name="buffer">The buffer.</param>
- /// <param name="size">The size.</param>
- /// <exception cref="AMQFrameDecodingException">If the buffer contains data that cannot be decoded</exception>
- void PopulateFromBuffer(ByteBuffer buffer, uint size);
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/IBodyFactory.cs b/qpid/dotnet/Qpid.Common/Framing/IBodyFactory.cs
deleted file mode 100644
index dd7960ddbe..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/IBodyFactory.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- /// <summary>
- /// Any class that is capable of turning a stream of bytes into an AMQ structure must implement this interface.
- /// </summary>
- public interface IBodyFactory
- {
- /// <summary>
- /// Creates the body.
- /// </summary>
- /// <param name="inbuf">The ByteBuffer containing data from the network</param>
- /// <returns></returns>
- /// <exception>AMQFrameDecodingException</exception>
- IBody CreateBody(ByteBuffer inbuf);
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/IContentHeaderProperties.cs b/qpid/dotnet/Qpid.Common/Framing/IContentHeaderProperties.cs
deleted file mode 100644
index 676d0910d4..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/IContentHeaderProperties.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- /// <summary>
- /// There will be an implementation of this interface for each content type. All content types have associated
- /// header properties and this provides a way to encode and decode them.
- /// </summary>
- public interface IContentHeaderProperties
- {
- /// <summary>
- /// Writes the property list to the buffer, in a suitably encoded form.
- /// </summary>
- /// <param name="buffer">The buffer to write to</param>
- void WritePropertyListPayload(ByteBuffer buffer);
-
- /// <summary>
- /// Populates the properties from buffer.
- /// </summary>
- /// <param name="buffer">The buffer to read from.</param>
- /// <param name="propertyFlags">The property flags.</param>
- /// <exception cref="AMQFrameDecodingException">Thrown when the buffer does not contain valid data</exception>
- void PopulatePropertiesFromBuffer(ByteBuffer buffer, ushort propertyFlags);
-
- /// <summary>
- /// Gets the size of the encoded property list in bytes.
- /// </summary>
- /// <value>The size of the property list in bytes</value>
- uint PropertyListSize
- {
- get;
- }
-
- /// <summary>
- /// Gets the property flags. Property flags indicate which properties are set in the list. The
- /// position and meaning of each flag is defined in the protocol specification for the particular
- /// content type with which these properties are associated.
- /// </summary>
- /// <value>the flags as an unsigned integer</value>
- ushort PropertyFlags
- {
- get;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/IDataBlock.cs b/qpid/dotnet/Qpid.Common/Framing/IDataBlock.cs
deleted file mode 100644
index c61ed90d10..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/IDataBlock.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Buffer;
-
-namespace Apache.Qpid.Framing
-{
- /// <summary>
- /// A data block represents something that has a size in bytes and the ability to write itself to a byte
- /// buffer (similar to a byte array). It represents "top level" frames in the protocol specification.
- /// </summary>
- public interface IDataBlock : IEncodableAMQDataBlock
- {
- /// <summary>
- /// Get the size of buffer needed to store the byte representation of this
- /// frame.
- /// </summary>
- /// <returns>size in bytes</returns>
- uint Size
- {
- get;
- }
-
- /// <summary>
- /// Writes the datablock to the specified buffer.
- /// </summary>
- /// <param name="buffer">The buffer to write to. Must be the correct size.</param>
- void WritePayload(ByteBuffer buffer);
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/IEncodableAMQDataBlock.cs b/qpid/dotnet/Qpid.Common/Framing/IEncodableAMQDataBlock.cs
deleted file mode 100644
index da8bf9fef9..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/IEncodableAMQDataBlock.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Framing
-{
-
- /// <summary>
- /// Marker interface to indicate to MINA that a data block should be encoded with the
- /// single encoder/decoder that we have defined.
- /// </summary>
- public interface IEncodableAMQDataBlock
- {
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Framing/ProtocolInitiation.cs b/qpid/dotnet/Qpid.Common/Framing/ProtocolInitiation.cs
deleted file mode 100644
index 5407bc08d5..0000000000
--- a/qpid/dotnet/Qpid.Common/Framing/ProtocolInitiation.cs
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Configuration;
-using System.Reflection;
-using System.Xml;
-using log4net;
-using Apache.Qpid.Buffer;
-using Apache.Qpid.Codec;
-using Apache.Qpid.Codec.Demux;
-using Apache.Qpid.Common;
-
-namespace Apache.Qpid.Framing
-{
- public class ProtocolInitiation : IDataBlock, IEncodableAMQDataBlock
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(ProtocolInitiation));
-
- public char[] Header = new char[]{'A','M','Q','P'};
-
- private const byte CURRENT_PROTOCOL_CLASS = 1;
- private const int CURRENT_PROTOCOL_INSTANCE = 1;
- // FIXME: Needs to be tweakable from GRM.dll.config file. i.e. Major version 7 or 8 +
- // FIXME: a configuration item for avoiding Basic.Qos (for OpenAMQ compatibility)
- public static int CURRENT_PROTOCOL_VERSION_MAJOR = 8; // FIXME: put back to 7 for OpenAMQ!
- private const int CURRENT_PROTOCOL_VERSION_MINOR = 0;
-
- public byte ProtocolClass = CURRENT_PROTOCOL_CLASS;
- public byte ProtocolInstance = CURRENT_PROTOCOL_INSTANCE;
- public byte ProtocolMajor = (byte)CURRENT_PROTOCOL_VERSION_MAJOR;
- public byte ProtocolMinor = CURRENT_PROTOCOL_VERSION_MINOR;
-
- static ProtocolInitiation()
- {
- AssemblySettings settings = new AssemblySettings();
-
- /*
- string openAMQ = settings["OpenAMQ1d4Compatibility"];
- if (openAMQ.Equals("true"))
- {
- _log.Warn("Starting in OpenAMQ-1.0d4 compatibility mode. ProtocolMajorVersion is 7 and Basic.Qos will not be sent.");
- CURRENT_PROTOCOL_VERSION_MAJOR = 7;
- }
- */
- }
-
- public uint Size
- {
- get
- {
- return 4 + 1 + 1 + 1 + 1;
- }
- }
-
- public void WritePayload(ByteBuffer buffer)
- {
- foreach (char c in Header)
- {
- buffer.Put((byte) c);
- }
- buffer.Put(ProtocolClass);
- buffer.Put(ProtocolInstance);
- buffer.Put(ProtocolMajor);
- buffer.Put(ProtocolMinor);
- }
-
- /// <summary>
- /// Populates from buffer.
- /// </summary>
- /// <param name="buffer">The buffer.</param>
- public void PopulateFromBuffer(ByteBuffer buffer)
- {
- throw new AMQException("Method not implemented");
- }
-
- public class Decoder : IMessageDecoder
- {
- private bool _disabled = false;
-
- public MessageDecoderResult Decodable(ByteBuffer inbuf)
- {
- if (_disabled)
- {
- return MessageDecoderResult.NOT_OK;
- }
- if (inbuf.Remaining < 8)
- {
- return MessageDecoderResult.NEED_DATA;
- }
- else
- {
- char[] expected = new char[]{'A', 'M', 'Q', 'P'};
- for (int i = 0; i < 4; i++)
- {
- if (((char) inbuf.GetByte()) != expected[i])
- {
- return MessageDecoderResult.NOT_OK;
- }
- }
- return MessageDecoderResult.OK;
- }
- }
-
- /// <summary>
- /// Decodes the specified session.
- /// </summary>
- /// <param name="inbuf">The inbuf.</param>
- /// <param name="output">The protocol output.</param>
- /// <returns></returns>
- public MessageDecoderResult Decode(ByteBuffer inbuf, IProtocolDecoderOutput output)
- {
- byte[] header = new byte[4];
- inbuf.GetBytes(header);
- ProtocolInitiation pi = new ProtocolInitiation();
- pi.Header = new char[]{'A','M','Q','P'};
- pi.ProtocolClass = inbuf.GetByte();
- pi.ProtocolInstance = inbuf.GetByte();
- pi.ProtocolMajor = inbuf.GetByte();
- pi.ProtocolMinor = inbuf.GetByte();
- output.Write(pi);
- return MessageDecoderResult.OK;
- }
-
- public bool Disabled
- {
- set
- {
- _disabled = value;
- }
- }
- }
-
- public override string ToString()
- {
- return String.Format("{0}{{Class={1} Instance={2} Major={3} Minor={4}}}",
- GetType().Name, ProtocolClass, ProtocolInstance, ProtocolMajor, ProtocolMinor);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Properties/AssemblyInfo.cs b/qpid/dotnet/Qpid.Common/Properties/AssemblyInfo.cs
deleted file mode 100644
index 3847429519..0000000000
--- a/qpid/dotnet/Qpid.Common/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Reflection;
-using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Apache.Qpid.Common")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Apache.Qpid.Common")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("8dea7c69-1383-4bf7-99e9-e172eba639a2")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
diff --git a/qpid/dotnet/Qpid.Common/Protocol/AMQConstant.cs b/qpid/dotnet/Qpid.Common/Protocol/AMQConstant.cs
deleted file mode 100644
index 9400b1bd80..0000000000
--- a/qpid/dotnet/Qpid.Common/Protocol/AMQConstant.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-
-namespace Apache.Qpid.Protocol
-{
- public sealed class AMQConstant
- {
- private int _code;
- private string _name;
- private static Hashtable _codeMap = new Hashtable();
-
- public int Code
- {
- get { return _code; }
- }
-
- public string Name
- {
- get { return _name; }
- }
-
- private AMQConstant(int code, string name, bool map)
- {
- _code = code;
- _name = name;
-
- if ( map )
- {
- _codeMap.Add(code, this);
- }
- }
-
- public override string ToString()
- {
- return string.Format("{0}: {1}", Code, Name);
- }
-
- public static AMQConstant GetConstant(int code)
- {
- AMQConstant c = (AMQConstant)_codeMap[code];
- if ( c == null )
- {
- c = new AMQConstant(code, "unknown code", false);
- }
- return c;
- }
-
- #region Constants
- //
- // Constants
- //
- public static readonly AMQConstant FRAME_MIN_SIZE = new AMQConstant(4096, "frame min size", true);
- public static readonly AMQConstant FRAME_END = new AMQConstant(206, "frame end", true);
- public static readonly AMQConstant REPLY_SUCCESS = new AMQConstant(200, "reply success", true);
- public static readonly AMQConstant NOT_DELIVERED = new AMQConstant(310, "not delivered", true);
- public static readonly AMQConstant MESSAGE_TOO_LARGE = new AMQConstant(311, "message too large", true);
- public static readonly AMQConstant NO_ROUTE = new AMQConstant(312, "no route", true);
- public static readonly AMQConstant NO_CONSUMERS = new AMQConstant(313, "no consumers", true);
- public static readonly AMQConstant CONTEXT_IN_USE = new AMQConstant(320, "context in use", true);
- public static readonly AMQConstant INVALID_PATH = new AMQConstant(402, "invalid path", true);
- public static readonly AMQConstant ACCESS_REFUSED = new AMQConstant(403, "access refused", true);
- public static readonly AMQConstant NOT_FOUND = new AMQConstant(404, "not found", true);
- public static readonly AMQConstant ALREADY_EXISTS = new AMQConstant(405, "already exists", true);
- public static readonly AMQConstant IN_USE = new AMQConstant(406, "in use", true);
- public static readonly AMQConstant INVALID_ROUTING_KEY = new AMQConstant(407, "routing key invalid", true);
- public static readonly AMQConstant REQUEST_TIMEOUT = new AMQConstant(408, "request timeout", true);
- public static readonly AMQConstant INVALID_ARGUMENT = new AMQConstant(409, "argument invalid", true);
- public static readonly AMQConstant FRAME_ERROR = new AMQConstant(501, "frame error", true);
- public static readonly AMQConstant SYNTAX_ERROR = new AMQConstant(502, "syntax error", true);
- public static readonly AMQConstant COMMAND_INVALID = new AMQConstant(503, "command invalid", true);
- public static readonly AMQConstant CHANNEL_ERROR = new AMQConstant(504, "channel error", true);
- public static readonly AMQConstant RESOURCE_ERROR = new AMQConstant(506, "resource error", true);
- public static readonly AMQConstant NOT_ALLOWED = new AMQConstant(530, "not allowed", true);
- public static readonly AMQConstant NOT_IMPLEMENTED = new AMQConstant(540, "not implemented", true);
- public static readonly AMQConstant INTERNAL_ERROR = new AMQConstant(541, "internal error", true);
-
- #endregion // Constants
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Common/Qpid.Common.csproj b/qpid/dotnet/Qpid.Common/Qpid.Common.csproj
deleted file mode 100644
index 09f0a96ba9..0000000000
--- a/qpid/dotnet/Qpid.Common/Qpid.Common.csproj
+++ /dev/null
@@ -1,104 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{77064C42-24D2-4CEB-9EA2-0EF481A43205}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Apache.Qpid</RootNamespace>
- <AssemblyName>Apache.Qpid.Common</AssemblyName>
- <SignAssembly>false</SignAssembly>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\net-2.0\debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\net-2.0\release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>lib\log4net\log4net.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Qpid.Buffer\Qpid.Buffer.csproj">
- <Project>{44384DF2-B0A4-4580-BDBC-EE4BAA87D995}</Project>
- <Name>Qpid.Buffer</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Codec\Qpid.Codec.csproj">
- <Project>{22D0D0C2-77AF-4DE3-B456-7FF3893F9F88}</Project>
- <Name>Qpid.Codec</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Messaging\Qpid.Messaging.csproj">
- <Project>{6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}</Project>
- <Name>Qpid.Messaging</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Content Include="stylesheets\csharp.xsl" />
- <Content Include="stylesheets\framing.xsl" />
- <Content Include="stylesheets\java.xsl" />
- <Content Include="stylesheets\prepare1.xsl" />
- <Content Include="stylesheets\prepare2.xsl" />
- <Content Include="stylesheets\prepare3.xsl" />
- <Content Include="stylesheets\readme.txt" />
- <Content Include="stylesheets\registry.xsl" />
- <Content Include="stylesheets\utils.xsl" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/Qpid.Common/amqp.xml b/qpid/dotnet/Qpid.Common/amqp.xml
deleted file mode 100644
index ddd4b5be4b..0000000000
--- a/qpid/dotnet/Qpid.Common/amqp.xml
+++ /dev/null
@@ -1,3929 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-
-<!--
-Copyright Notice
-================
-© Copyright JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc.,
-iMatix Corporation, IONA� Technologies, Red Hat, Inc.,
-TWIST Process Innovations, and 29West Inc. 2006. All rights reserved.
-
-License
-=======
-JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc., iMatix
-Corporation, IONA� Technologies, Red Hat, Inc., TWIST Process Innovations, and
-29West Inc. (collectively, the "Authors") each hereby grants to you a worldwide,
-perpetual, royalty-free, nontransferable, nonexclusive license to
-(i) copy, display, and implement the Advanced Messaging Queue Protocol
-("AMQP") Specification and (ii) the Licensed Claims that are held by
-the Authors, all for the purpose of implementing the Advanced Messaging
-Queue Protocol Specification. Your license and any rights under this
-Agreement will terminate immediately without notice from
-any Author if you bring any claim, suit, demand, or action related to
-the Advanced Messaging Queue Protocol Specification against any Author.
-Upon termination, you shall destroy all copies of the Advanced Messaging
-Queue Protocol Specification in your possession or control.
-
-As used hereunder, "Licensed Claims" means those claims of a patent or
-patent application, throughout the world, excluding design patents and
-design registrations, owned or controlled, or that can be sublicensed
-without fee and in compliance with the requirements of this
-Agreement, by an Author or its affiliates now or at any
-future time and which would necessarily be infringed by implementation
-of the Advanced Messaging Queue Protocol Specification. A claim is
-necessarily infringed hereunder only when it is not possible to avoid
-infringing it because there is no plausible non-infringing alternative
-for implementing the required portions of the Advanced Messaging Queue
-Protocol Specification. Notwithstanding the foregoing, Licensed Claims
-shall not include any claims other than as set forth above even if
-contained in the same patent as Licensed Claims; or that read solely
-on any implementations of any portion of the Advanced Messaging Queue
-Protocol Specification that are not required by the Advanced Messaging
-Queue Protocol Specification, or that, if licensed, would require a
-payment of royalties by the licensor to unaffiliated third parties.
-Moreover, Licensed Claims shall not include (i) any enabling technologies
-that may be necessary to make or use any Licensed Product but are not
-themselves expressly set forth in the Advanced Messaging Queue Protocol
-Specification (e.g., semiconductor manufacturing technology, compiler
-technology, object oriented technology, networking technology, operating
-system technology, and the like); or (ii) the implementation of other
-published standards developed elsewhere and merely referred to in the
-body of the Advanced Messaging Queue Protocol Specification, or
-(iii) any Licensed Product and any combinations thereof the purpose or
-function of which is not required for compliance with the Advanced
-Messaging Queue Protocol Specification. For purposes of this definition,
-the Advanced Messaging Queue Protocol Specification shall be deemed to
-include both architectural and interconnection requirements essential
-for interoperability and may also include supporting source code artifacts
-where such architectural, interconnection requirements and source code
-artifacts are expressly identified as being required or documentation to
-achieve compliance with the Advanced Messaging Queue Protocol Specification.
-
-As used hereunder, "Licensed Products" means only those specific portions
-of products (hardware, software or combinations thereof) that implement
-and are compliant with all relevant portions of the Advanced Messaging
-Queue Protocol Specification.
-
-The following disclaimers, which you hereby also acknowledge as to any
-use you may make of the Advanced Messaging Queue Protocol Specification:
-
-THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION IS PROVIDED "AS IS,"
-AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
-IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE
-CONTENTS OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION ARE
-SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF THE ADVANCED
-MESSAGING QUEUE PROTOCOL SPECIFICATION WILL NOT INFRINGE ANY THIRD PARTY
-PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
-THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
-INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
-USE, IMPLEMENTATION OR DISTRIBUTION OF THE ADVANCED MESSAGING QUEUE
-PROTOCOL SPECIFICATION.
-
-The name and trademarks of the Authors may NOT be used in any manner,
-including advertising or publicity pertaining to the Advanced Messaging
-Queue Protocol Specification or its contents without specific, written
-prior permission. Title to copyright in the Advanced Messaging Queue
-Protocol Specification will at all times remain with the Authors.
-
-No other rights are granted by implication, estoppel or otherwise.
-
-Upon termination of your license or rights under this Agreement, you
-shall destroy all copies of the Advanced Messaging Queue Protocol
-Specification in your possession or control.
-
-Trademarks
-==========
-"JPMorgan", "JPMorgan Chase", "Chase", the JPMorgan Chase logo and the
-Octagon Symbol are trademarks of JPMorgan Chase & Co.
-
-IMATIX and the iMatix logo are trademarks of iMatix Corporation sprl.
-
-IONA, IONA Technologies, and the IONA logos are trademarks of IONA
-Technologies PLC and/or its subsidiaries.
-
-LINUX is a trademark of Linus Torvalds. RED HAT and JBOSS are registered
-trademarks of Red Hat, Inc. in the US and other countries.
-
-Java, all Java-based trademarks and OpenOffice.org are trademarks of
-Sun Microsystems, Inc. in the United States, other countries, or both.
-
-Other company, product, or service names may be trademarks or service
-marks of others.
-
-Links to full AMQP specification:
-=================================
-http://www.envoytech.org/spec/amq/
-http://www.iona.com/opensource/amqp/
-http://www.redhat.com/solutions/specifications/amqp/
-http://www.twiststandards.org/tiki-index.php?page=AMQ
-http://www.imatix.com/amqp
-
--->
-
-<amqp major="8" minor="0" port="5672" comment="AMQ protocol 0.80">
- AMQ Protocol 0.80
-<!--
-======================================================
-== CONSTANTS
-======================================================
--->
- <constant name="frame method" value="1"/>
- <constant name="frame header" value="2"/>
- <constant name="frame body" value="3"/>
- <constant name="frame oob method" value="4"/>
- <constant name="frame oob header" value="5"/>
- <constant name="frame oob body" value="6"/>
- <constant name="frame trace" value="7"/>
- <constant name="frame heartbeat" value="8"/>
- <constant name="frame min size" value="4096"/>
- <constant name="frame end" value="206"/>
- <constant name="reply success" value="200">
- Indicates that the method completed successfully. This reply code is
- reserved for future use - the current protocol design does not use
- positive confirmation and reply codes are sent only in case of an
- error.
-</constant>
- <constant name="not delivered" value="310" class="soft error">
- The client asked for a specific message that is no longer available.
- The message was delivered to another client, or was purged from the
- queue for some other reason.
-</constant>
- <constant name="content too large" value="311" class="soft error">
- The client attempted to transfer content larger than the server
- could accept at the present time. The client may retry at a later
- time.
-</constant>
- <constant name="connection forced" value="320" class="hard error">
- An operator intervened to close the connection for some reason.
- The client may retry at some later date.
-</constant>
- <constant name="invalid path" value="402" class="hard error">
- The client tried to work with an unknown virtual host or cluster.
-</constant>
- <constant name="access refused" value="403" class="soft error">
- The client attempted to work with a server entity to which it has
- no due to security settings.
-</constant>
- <constant name="not found" value="404" class="soft error">
- The client attempted to work with a server entity that does not exist.
-</constant>
- <constant name="resource locked" value="405" class="soft error">
- The client attempted to work with a server entity to which it has
- no access because another client is working with it.
-</constant>
- <constant name="frame error" value="501" class="hard error">
- The client sent a malformed frame that the server could not decode.
- This strongly implies a programming error in the client.
-</constant>
- <constant name="syntax error" value="502" class="hard error">
- The client sent a frame that contained illegal values for one or more
- fields. This strongly implies a programming error in the client.
-</constant>
- <constant name="command invalid" value="503" class="hard error">
- The client sent an invalid sequence of frames, attempting to perform
- an operation that was considered invalid by the server. This usually
- implies a programming error in the client.
-</constant>
- <constant name="channel error" value="504" class="hard error">
- The client attempted to work with a channel that had not been
- correctly opened. This most likely indicates a fault in the client
- layer.
-</constant>
- <constant name="resource error" value="506" class="hard error">
- The server could not complete the method because it lacked sufficient
- resources. This may be due to the client creating too many of some
- type of entity.
-</constant>
- <constant name="not allowed" value="530" class="hard error">
- The client tried to work with some entity in a manner that is
- prohibited by the server, due to security settings or by some other
- criteria.
-</constant>
- <constant name="not implemented" value="540" class="hard error">
- The client tried to use functionality that is not implemented in the
- server.
-</constant>
- <constant name="internal error" value="541" class="hard error">
- The server could not complete the method because of an internal error.
- The server may require intervention by an operator in order to resume
- normal operations.
-</constant>
- <!--
-======================================================
-== DOMAIN TYPES
-======================================================
--->
- <domain name="access ticket" type="short">
- access ticket granted by server
- <doc>
- An access ticket granted by the server for a certain set of access
- rights within a specific realm. Access tickets are valid within the
- channel where they were created, and expire when the channel closes.
- </doc>
- <assert check="ne" value="0"/>
- </domain>
- <domain name="class id" type="short"/>
- <domain name="consumer tag" type="shortstr">
- consumer tag
- <doc>
- Identifier for the consumer, valid within the current connection.
- </doc>
- <rule implement="MUST">
- The consumer tag is valid only within the channel from which the
- consumer was created. I.e. a client MUST NOT create a consumer in
- one channel and then use it in another.
- </rule>
- </domain>
- <domain name="delivery tag" type="longlong">
- server-assigned delivery tag
- <doc>
- The server-assigned and channel-specific delivery tag
- </doc>
- <rule implement="MUST">
- The delivery tag is valid only within the channel from which the
- message was received. I.e. a client MUST NOT receive a message on
- one channel and then acknowledge it on another.
- </rule>
- <rule implement="MUST">
- The server MUST NOT use a zero value for delivery tags. Zero is
- reserved for client use, meaning "all messages so far received".
- </rule>
- </domain>
- <domain name="exchange name" type="shortstr">
- exchange name
- <doc>
- The exchange name is a client-selected string that identifies
- the exchange for publish methods. Exchange names may consist
- of any mixture of digits, letters, and underscores. Exchange
- names are scoped by the virtual host.
- </doc>
- <assert check="length" value="127"/>
- </domain>
- <domain name="known hosts" type="shortstr">
-list of known hosts
-<doc>
-Specifies the list of equivalent or alternative hosts that the server
-knows about, which will normally include the current server itself.
-Clients can cache this information and use it when reconnecting to a
-server after a failure.
-</doc>
- <rule implement="MAY">
-The server MAY leave this field empty if it knows of no other
-hosts than itself.
-</rule>
- </domain>
- <domain name="method id" type="short"/>
- <domain name="no ack" type="bit">
- no acknowledgement needed
- <doc>
- If this field is set the server does not expect acknowledgments
- for messages. That is, when a message is delivered to the client
- the server automatically and silently acknowledges it on behalf
- of the client. This functionality increases performance but at
- the cost of reliability. Messages can get lost if a client dies
- before it can deliver them to the application.
- </doc>
- </domain>
- <domain name="no local" type="bit">
- do not deliver own messages
- <doc>
- If the no-local field is set the server will not send messages to
- the client that published them.
- </doc>
- </domain>
- <domain name="path" type="shortstr">
- <doc>
- Must start with a slash "/" and continue with path names
- separated by slashes. A path name consists of any combination
- of at least one of [A-Za-z0-9] plus zero or more of [.-_+!=:].
-</doc>
- <assert check="notnull"/>
- <assert check="syntax" rule="path"/>
- <assert check="length" value="127"/>
- </domain>
- <domain name="peer properties" type="table">
- <doc>
-This string provides a set of peer properties, used for
-identification, debugging, and general information.
-</doc>
- <rule implement="SHOULD">
-The properties SHOULD contain these fields:
-"product", giving the name of the peer product, "version", giving
-the name of the peer version, "platform", giving the name of the
-operating system, "copyright", if appropriate, and "information",
-giving other general information.
-</rule>
- </domain>
- <domain name="queue name" type="shortstr">
- queue name
- <doc>
- The queue name identifies the queue within the vhost. Queue
- names may consist of any mixture of digits, letters, and
- underscores.
- </doc>
- <assert check="length" value="127"/>
- </domain>
- <domain name="redelivered" type="bit">
- message is being redelivered
- <doc>
- This indicates that the message has been previously delivered to
- this or another client.
- </doc>
- <rule implement="SHOULD">
- The server SHOULD try to signal redelivered messages when it can.
- When redelivering a message that was not successfully acknowledged,
- the server SHOULD deliver it to the original client if possible.
- </rule>
- <rule implement="MUST">
- The client MUST NOT rely on the redelivered field but MUST take it
- as a hint that the message may already have been processed. A
- fully robust client must be able to track duplicate received messages
- on non-transacted, and locally-transacted channels.
- </rule>
- </domain>
- <domain name="reply code" type="short">
-reply code from server
-<doc>
- The reply code. The AMQ reply codes are defined in AMQ RFC 011.
-</doc>
- <assert check="notnull"/>
- </domain>
- <domain name="reply text" type="shortstr">
-localised reply text
-<doc>
- The localised reply text. This text can be logged as an aid to
- resolving issues.
-</doc>
- <assert check="notnull"/>
- </domain>
- <class name="connection" handler="connection" index="10">
- <!--
-======================================================
-== CONNECTION
-======================================================
--->
- work with socket connections
-<doc>
- The connection class provides methods for a client to establish a
- network connection to a server, and for both peers to operate the
- connection thereafter.
-</doc>
- <doc name="grammar">
- connection = open-connection *use-connection close-connection
- open-connection = C:protocol-header
- S:START C:START-OK
- *challenge
- S:TUNE C:TUNE-OK
- C:OPEN S:OPEN-OK | S:REDIRECT
- challenge = S:SECURE C:SECURE-OK
- use-connection = *channel
- close-connection = C:CLOSE S:CLOSE-OK
- / S:CLOSE C:CLOSE-OK
-</doc>
- <chassis name="server" implement="MUST"/>
- <chassis name="client" implement="MUST"/>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="start" synchronous="1" index="10">
- start connection negotiation
- <doc>
- This method starts the connection negotiation process by telling
- the client the protocol version that the server proposes, along
- with a list of security mechanisms which the client can use for
- authentication.
- </doc>
- <rule implement="MUST">
- If the client cannot handle the protocol version suggested by the
- server it MUST close the socket connection.
- </rule>
- <rule implement="MUST">
- The server MUST provide a protocol version that is lower than or
- equal to that requested by the client in the protocol header. If
- the server cannot support the specified protocol it MUST NOT send
- this method, but MUST close the socket connection.
- </rule>
- <chassis name="client" implement="MUST"/>
- <response name="start-ok"/>
- <field name="version major" type="octet">
- protocol major version
- <doc>
- The protocol major version that the server agrees to use, which
- cannot be higher than the client's major version.
- </doc>
- </field>
- <field name="version minor" type="octet">
- protocol major version
- <doc>
- The protocol minor version that the server agrees to use, which
- cannot be higher than the client's minor version.
- </doc>
- </field>
- <field name="server properties" domain="peer properties">
- server properties
- </field>
- <field name="mechanisms" type="longstr">
- available security mechanisms
- <doc>
- A list of the security mechanisms that the server supports, delimited
- by spaces. Currently ASL supports these mechanisms: PLAIN.
- </doc>
- <see name="security mechanisms"/>
- <assert check="notnull"/>
- </field>
- <field name="locales" type="longstr">
- available message locales
- <doc>
- A list of the message locales that the server supports, delimited
- by spaces. The locale defines the language in which the server
- will send reply texts.
- </doc>
- <rule implement="MUST">
- All servers MUST support at least the en_US locale.
- </rule>
- <assert check="notnull"/>
- </field>
- </method>
- <method name="start-ok" synchronous="1" index="11">
- select security mechanism and locale
- <doc>
- This method selects a SASL security mechanism. ASL uses SASL
- (RFC2222) to negotiate authentication and encryption.
- </doc>
- <chassis name="server" implement="MUST"/>
- <field name="client properties" domain="peer properties">
- client properties
- </field>
- <field name="mechanism" type="shortstr">
- selected security mechanism
- <doc>
- A single security mechanisms selected by the client, which must be
- one of those specified by the server.
- </doc>
- <rule implement="SHOULD">
- The client SHOULD authenticate using the highest-level security
- profile it can handle from the list provided by the server.
- </rule>
- <rule implement="MUST">
- The mechanism field MUST contain one of the security mechanisms
- proposed by the server in the Start method. If it doesn't, the
- server MUST close the socket.
- </rule>
- <assert check="notnull"/>
- </field>
- <field name="response" type="longstr">
- security response data
- <doc>
- A block of opaque data passed to the security mechanism. The contents
- of this data are defined by the SASL security mechanism. For the
- PLAIN security mechanism this is defined as a field table holding
- two fields, LOGIN and PASSWORD.
- </doc>
- <assert check="notnull"/>
- </field>
- <field name="locale" type="shortstr">
- selected message locale
- <doc>
- A single message local selected by the client, which must be one
- of those specified by the server.
- </doc>
- <assert check="notnull"/>
- </field>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="secure" synchronous="1" index="20">
- security mechanism challenge
- <doc>
- The SASL protocol works by exchanging challenges and responses until
- both peers have received sufficient information to authenticate each
- other. This method challenges the client to provide more information.
- </doc>
- <chassis name="client" implement="MUST"/>
- <response name="secure-ok"/>
- <field name="challenge" type="longstr">
- security challenge data
- <doc>
- Challenge information, a block of opaque binary data passed to
- the security mechanism.
- </doc>
- <see name="security mechanisms"/>
- </field>
- </method>
- <method name="secure-ok" synchronous="1" index="21">
- security mechanism response
- <doc>
- This method attempts to authenticate, passing a block of SASL data
- for the security mechanism at the server side.
- </doc>
- <chassis name="server" implement="MUST"/>
- <field name="response" type="longstr">
- security response data
- <doc>
- A block of opaque data passed to the security mechanism. The contents
- of this data are defined by the SASL security mechanism.
- </doc>
- <assert check="notnull"/>
- </field>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="tune" synchronous="1" index="30">
- propose connection tuning parameters
- <doc>
- This method proposes a set of connection configuration values
- to the client. The client can accept and/or adjust these.
- </doc>
- <chassis name="client" implement="MUST"/>
- <response name="tune-ok"/>
- <field name="channel max" type="short">
- proposed maximum channels
- <doc>
- The maximum total number of channels that the server allows
- per connection. Zero means that the server does not impose a
- fixed limit, but the number of allowed channels may be limited
- by available server resources.
- </doc>
- </field>
- <field name="frame max" type="long">
- proposed maximum frame size
- <doc>
- The largest frame size that the server proposes for the
- connection. The client can negotiate a lower value. Zero means
- that the server does not impose any specific limit but may reject
- very large frames if it cannot allocate resources for them.
- </doc>
- <rule implement="MUST">
- Until the frame-max has been negotiated, both peers MUST accept
- frames of up to 4096 octets large. The minimum non-zero value for
- the frame-max field is 4096.
- </rule>
- </field>
- <field name="heartbeat" type="short">
- desired heartbeat delay
- <doc>
- The delay, in seconds, of the connection heartbeat that the server
- wants. Zero means the server does not want a heartbeat.
- </doc>
- </field>
- </method>
- <method name="tune-ok" synchronous="1" index="31">
- negotiate connection tuning parameters
- <doc>
- This method sends the client's connection tuning parameters to the
- server. Certain fields are negotiated, others provide capability
- information.
- </doc>
- <chassis name="server" implement="MUST"/>
- <field name="channel max" type="short">
- negotiated maximum channels
- <doc>
- The maximum total number of channels that the client will use
- per connection. May not be higher than the value specified by
- the server.
- </doc>
- <rule implement="MAY">
- The server MAY ignore the channel-max value or MAY use it for
- tuning its resource allocation.
- </rule>
- <assert check="notnull"/>
- <assert check="le" method="tune" field="channel max"/>
- </field>
- <field name="frame max" type="long">
- negotiated maximum frame size
- <doc>
- The largest frame size that the client and server will use for
- the connection. Zero means that the client does not impose any
- specific limit but may reject very large frames if it cannot
- allocate resources for them. Note that the frame-max limit
- applies principally to content frames, where large contents
- can be broken into frames of arbitrary size.
- </doc>
- <rule implement="MUST">
- Until the frame-max has been negotiated, both peers must accept
- frames of up to 4096 octets large. The minimum non-zero value for
- the frame-max field is 4096.
- </rule>
- </field>
- <field name="heartbeat" type="short">
- desired heartbeat delay
- <doc>
- The delay, in seconds, of the connection heartbeat that the client
- wants. Zero means the client does not want a heartbeat.
- </doc>
- </field>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="open" synchronous="1" index="40">
- open connection to virtual host
- <doc>
- This method opens a connection to a virtual host, which is a
- collection of resources, and acts to separate multiple application
- domains within a server.
- </doc>
- <rule implement="MUST">
- The client MUST open the context before doing any work on the
- connection.
- </rule>
- <chassis name="server" implement="MUST"/>
- <response name="open-ok"/>
- <response name="redirect"/>
- <field name="virtual host" domain="path">
- virtual host name
- <assert check="regexp" value="^[a-zA-Z0-9/-_]+$"/>
- <doc>
- The name of the virtual host to work with.
- </doc>
- <rule implement="MUST">
- If the server supports multiple virtual hosts, it MUST enforce a
- full separation of exchanges, queues, and all associated entities
- per virtual host. An application, connected to a specific virtual
- host, MUST NOT be able to access resources of another virtual host.
- </rule>
- <rule implement="SHOULD">
- The server SHOULD verify that the client has permission to access
- the specified virtual host.
- </rule>
- <rule implement="MAY">
- The server MAY configure arbitrary limits per virtual host, such
- as the number of each type of entity that may be used, per
- connection and/or in total.
- </rule>
- </field>
- <field name="capabilities" type="shortstr">
- required capabilities
- <doc>
- The client may specify a number of capability names, delimited by
- spaces. The server can use this string to how to process the
- client's connection request.
- </doc>
- </field>
- <field name="insist" type="bit">
- insist on connecting to server
- <doc>
- In a configuration with multiple load-sharing servers, the server
- may respond to a Connection.Open method with a Connection.Redirect.
- The insist option tells the server that the client is insisting on
- a connection to the specified server.
- </doc>
- <rule implement="SHOULD">
- When the client uses the insist option, the server SHOULD accept
- the client connection unless it is technically unable to do so.
- </rule>
- </field>
- </method>
- <method name="open-ok" synchronous="1" index="41">
- signal that the connection is ready
- <doc>
- This method signals to the client that the connection is ready for
- use.
- </doc>
- <chassis name="client" implement="MUST"/>
- <field name="known hosts" domain="known hosts"/>
- </method>
- <method name="redirect" synchronous="1" index="50">
- asks the client to use a different server
- <doc>
- This method redirects the client to another server, based on the
- requested virtual host and/or capabilities.
- </doc>
- <rule implement="SHOULD">
- When getting the Connection.Redirect method, the client SHOULD
- reconnect to the host specified, and if that host is not present,
- to any of the hosts specified in the known-hosts list.
- </rule>
- <chassis name="client" implement="MAY"/>
- <field name="host" type="shortstr">
- server to connect to
- <doc>
- Specifies the server to connect to. This is an IP address or a
- DNS name, optionally followed by a colon and a port number. If
- no port number is specified, the client should use the default
- port number for the protocol.
- </doc>
- <assert check="notnull"/>
- </field>
- <field name="known hosts" domain="known hosts"/>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="close" synchronous="1" index="60">
- request a connection close
- <doc>
- This method indicates that the sender wants to close the connection.
- This may be due to internal conditions (e.g. a forced shut-down) or
- due to an error handling a specific method, i.e. an exception. When
- a close is due to an exception, the sender provides the class and
- method id of the method which caused the exception.
- </doc>
- <rule implement="MUST">
- After sending this method any received method except the Close-OK
- method MUST be discarded.
- </rule>
- <rule implement="MAY">
- The peer sending this method MAY use a counter or timeout to
- detect failure of the other peer to respond correctly with
- the Close-OK method.
- </rule>
- <rule implement="MUST">
- When a server receives the Close method from a client it MUST
- delete all server-side resources associated with the client's
- context. A client CANNOT reconnect to a context after sending
- or receiving a Close method.
- </rule>
- <chassis name="client" implement="MUST"/>
- <chassis name="server" implement="MUST"/>
- <response name="close-ok"/>
- <field name="reply code" domain="reply code"/>
- <field name="reply text" domain="reply text"/>
- <field name="class id" domain="class id">
- failing method class
- <doc>
- When the close is provoked by a method exception, this is the
- class of the method.
- </doc>
- </field>
- <field name="method id" domain="class id">
- failing method ID
- <doc>
- When the close is provoked by a method exception, this is the
- ID of the method.
- </doc>
- </field>
- </method>
- <method name="close-ok" synchronous="1" index="61">
- confirm a connection close
- <doc>
- This method confirms a Connection.Close method and tells the
- recipient that it is safe to release resources for the connection
- and close the socket.
- </doc>
- <rule implement="SHOULD">
- A peer that detects a socket closure without having received a
- Close-Ok handshake method SHOULD log the error.
- </rule>
- <chassis name="client" implement="MUST"/>
- <chassis name="server" implement="MUST"/>
- </method>
- </class>
- <class name="channel" handler="channel" index="20">
- <!--
-======================================================
-== CHANNEL
-======================================================
--->
- work with channels
-<doc>
- The channel class provides methods for a client to establish a virtual
- connection - a channel - to a server and for both peers to operate the
- virtual connection thereafter.
-</doc>
- <doc name="grammar">
- channel = open-channel *use-channel close-channel
- open-channel = C:OPEN S:OPEN-OK
- use-channel = C:FLOW S:FLOW-OK
- / S:FLOW C:FLOW-OK
- / S:ALERT
- / functional-class
- close-channel = C:CLOSE S:CLOSE-OK
- / S:CLOSE C:CLOSE-OK
-</doc>
- <chassis name="server" implement="MUST"/>
- <chassis name="client" implement="MUST"/>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="open" synchronous="1" index="10">
- open a channel for use
- <doc>
- This method opens a virtual connection (a channel).
- </doc>
- <rule implement="MUST">
- This method MUST NOT be called when the channel is already open.
- </rule>
- <chassis name="server" implement="MUST"/>
- <response name="open-ok"/>
- <field name="out of band" type="shortstr">
- out-of-band settings
- <doc>
- Configures out-of-band transfers on this channel. The syntax and
- meaning of this field will be formally defined at a later date.
- </doc>
- <assert check="null"/>
- </field>
- </method>
- <method name="open-ok" synchronous="1" index="11">
- signal that the channel is ready
- <doc>
- This method signals to the client that the channel is ready for use.
- </doc>
- <chassis name="client" implement="MUST"/>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="flow" synchronous="1" index="20">
- enable/disable flow from peer
- <doc>
- This method asks the peer to pause or restart the flow of content
- data. This is a simple flow-control mechanism that a peer can use
- to avoid oveflowing its queues or otherwise finding itself receiving
- more messages than it can process. Note that this method is not
- intended for window control. The peer that receives a request to
- stop sending content should finish sending the current content, if
- any, and then wait until it receives a Flow restart method.
- </doc>
- <rule implement="MAY">
- When a new channel is opened, it is active. Some applications
- assume that channels are inactive until started. To emulate this
- behaviour a client MAY open the channel, then pause it.
- </rule>
- <rule implement="SHOULD">
- When sending content data in multiple frames, a peer SHOULD monitor
- the channel for incoming methods and respond to a Channel.Flow as
- rapidly as possible.
- </rule>
- <rule implement="MAY">
- A peer MAY use the Channel.Flow method to throttle incoming content
- data for internal reasons, for example, when exchangeing data over a
- slower connection.
- </rule>
- <rule implement="MAY">
- The peer that requests a Channel.Flow method MAY disconnect and/or
- ban a peer that does not respect the request.
- </rule>
- <chassis name="server" implement="MUST"/>
- <chassis name="client" implement="MUST"/>
- <response name="flow-ok"/>
- <field name="active" type="bit">
- start/stop content frames
- <doc>
- If 1, the peer starts sending content frames. If 0, the peer
- stops sending content frames.
- </doc>
- </field>
- </method>
- <method name="flow-ok" index="21">
- confirm a flow method
- <doc>
- Confirms to the peer that a flow command was received and processed.
- </doc>
- <chassis name="server" implement="MUST"/>
- <chassis name="client" implement="MUST"/>
- <field name="active" type="bit">
- current flow setting
- <doc>
- Confirms the setting of the processed flow method: 1 means the
- peer will start sending or continue to send content frames; 0
- means it will not.
- </doc>
- </field>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="alert" index="30">
- send a non-fatal warning message
- <doc>
- This method allows the server to send a non-fatal warning to the
- client. This is used for methods that are normally asynchronous
- and thus do not have confirmations, and for which the server may
- detect errors that need to be reported. Fatal errors are handled
- as channel or connection exceptions; non-fatal errors are sent
- through this method.
- </doc>
- <chassis name="client" implement="MUST"/>
- <field name="reply code" domain="reply code"/>
- <field name="reply text" domain="reply text"/>
- <field name="details" type="table">
- detailed information for warning
- <doc>
- A set of fields that provide more information about the
- problem. The meaning of these fields are defined on a
- per-reply-code basis (TO BE DEFINED).
- </doc>
- </field>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="close" synchronous="1" index="40">
- request a channel close
- <doc>
- This method indicates that the sender wants to close the channel.
- This may be due to internal conditions (e.g. a forced shut-down) or
- due to an error handling a specific method, i.e. an exception. When
- a close is due to an exception, the sender provides the class and
- method id of the method which caused the exception.
- </doc>
- <rule implement="MUST">
- After sending this method any received method except
- Channel.Close-OK MUST be discarded.
- </rule>
- <rule implement="MAY">
- The peer sending this method MAY use a counter or timeout to detect
- failure of the other peer to respond correctly with Channel.Close-OK..
- </rule>
- <chassis name="client" implement="MUST"/>
- <chassis name="server" implement="MUST"/>
- <response name="close-ok"/>
- <field name="reply code" domain="reply code"/>
- <field name="reply text" domain="reply text"/>
- <field name="class id" domain="class id">
- failing method class
- <doc>
- When the close is provoked by a method exception, this is the
- class of the method.
- </doc>
- </field>
- <field name="method id" domain="method id">
- failing method ID
- <doc>
- When the close is provoked by a method exception, this is the
- ID of the method.
- </doc>
- </field>
- </method>
- <method name="close-ok" synchronous="1" index="41">
- confirm a channel close
- <doc>
- This method confirms a Channel.Close method and tells the recipient
- that it is safe to release resources for the channel and close the
- socket.
- </doc>
- <rule implement="SHOULD">
- A peer that detects a socket closure without having received a
- Channel.Close-Ok handshake method SHOULD log the error.
- </rule>
- <chassis name="client" implement="MUST"/>
- <chassis name="server" implement="MUST"/>
- </method>
- </class>
- <class name="access" handler="connection" index="30">
- <!--
-======================================================
-== ACCESS CONTROL
-======================================================
--->
- work with access tickets
-<doc>
- The protocol control access to server resources using access tickets.
- A client must explicitly request access tickets before doing work.
- An access ticket grants a client the right to use a specific set of
- resources - called a "realm" - in specific ways.
-</doc>
- <doc name="grammar">
- access = C:REQUEST S:REQUEST-OK
-</doc>
- <chassis name="server" implement="MUST"/>
- <chassis name="client" implement="MUST"/>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="request" synchronous="1" index="10">
- request an access ticket
- <doc>
- This method requests an access ticket for an access realm.
- The server responds by granting the access ticket. If the
- client does not have access rights to the requested realm
- this causes a connection exception. Access tickets are a
- per-channel resource.
- </doc>
- <rule implement="MUST">
- The realm name MUST start with either "/data" (for application
- resources) or "/admin" (for server administration resources).
- If the realm starts with any other path, the server MUST raise
- a connection exception with reply code 403 (access refused).
- </rule>
- <rule implement="MUST">
- The server MUST implement the /data realm and MAY implement the
- /admin realm. The mapping of resources to realms is not
- defined in the protocol - this is a server-side configuration
- issue.
- </rule>
- <chassis name="server" implement="MUST"/>
- <response name="request-ok"/>
- <field name="realm" domain="path">
- name of requested realm
- <rule implement="MUST">
- If the specified realm is not known to the server, the server
- must raise a channel exception with reply code 402 (invalid
- path).
- </rule>
- </field>
- <field name="exclusive" type="bit">
- request exclusive access
- <doc>
- Request exclusive access to the realm. If the server cannot grant
- this - because there are other active tickets for the realm - it
- raises a channel exception.
- </doc>
- </field>
- <field name="passive" type="bit">
- request passive access
- <doc>
- Request message passive access to the specified access realm.
- Passive access lets a client get information about resources in
- the realm but not to make any changes to them.
- </doc>
- </field>
- <field name="active" type="bit">
- request active access
- <doc>
- Request message active access to the specified access realm.
- Acvtive access lets a client get create and delete resources in
- the realm.
- </doc>
- </field>
- <field name="write" type="bit">
- request write access
- <doc>
- Request write access to the specified access realm. Write access
- lets a client publish messages to all exchanges in the realm.
- </doc>
- </field>
- <field name="read" type="bit">
- request read access
- <doc>
- Request read access to the specified access realm. Read access
- lets a client consume messages from queues in the realm.
- </doc>
- </field>
- </method>
- <method name="request-ok" synchronous="1" index="11">
- grant access to server resources
- <doc>
- This method provides the client with an access ticket. The access
- ticket is valid within the current channel and for the lifespan of
- the channel.
- </doc>
- <rule implement="MUST">
- The client MUST NOT use access tickets except within the same
- channel as originally granted.
- </rule>
- <rule implement="MUST">
- The server MUST isolate access tickets per channel and treat an
- attempt by a client to mix these as a connection exception.
- </rule>
- <chassis name="client" implement="MUST"/>
- <field name="ticket" domain="access ticket"/>
- </method>
- </class>
- <class name="exchange" handler="channel" index="40">
- <!--
-======================================================
-== EXCHANGES (or "routers", if you prefer)
-== (Or matchers, plugins, extensions, agents,... Routing is just one of
-== the many fun things an exchange can do.)
-======================================================
--->
- work with exchanges
-<doc>
- Exchanges match and distribute messages across queues. Exchanges can be
- configured in the server or created at runtime.
-</doc>
- <doc name="grammar">
- exchange = C:DECLARE S:DECLARE-OK
- / C:DELETE S:DELETE-OK
-</doc>
- <chassis name="server" implement="MUST"/>
- <chassis name="client" implement="MUST"/>
- <rule implement="MUST">
- <test>amq_exchange_19</test>
- The server MUST implement the direct and fanout exchange types, and
- predeclare the corresponding exchanges named amq.direct and amq.fanout
- in each virtual host. The server MUST also predeclare a direct
- exchange to act as the default exchange for content Publish methods
- and for default queue bindings.
-</rule>
- <rule implement="SHOULD">
- <test>amq_exchange_20</test>
- The server SHOULD implement the topic exchange type, and predeclare
- the corresponding exchange named amq.topic in each virtual host.
-</rule>
- <rule implement="MAY">
- <test>amq_exchange_21</test>
- The server MAY implement the system exchange type, and predeclare the
- corresponding exchanges named amq.system in each virtual host. If the
- client attempts to bind a queue to the system exchange, the server
- MUST raise a connection exception with reply code 507 (not allowed).
-</rule>
- <rule implement="MUST">
- <test>amq_exchange_22</test>
- The default exchange MUST be defined as internal, and be inaccessible
- to the client except by specifying an empty exchange name in a content
- Publish method. That is, the server MUST NOT let clients make explicit
- bindings to this exchange.
-</rule>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="declare" synchronous="1" index="10">
- declare exchange, create if needed
- <doc>
- This method creates an exchange if it does not already exist, and if the
- exchange exists, verifies that it is of the correct and expected class.
- </doc>
- <rule implement="SHOULD">
- <test>amq_exchange_23</test>
- The server SHOULD support a minimum of 16 exchanges per virtual host
- and ideally, impose no limit except as defined by available resources.
- </rule>
- <chassis name="server" implement="MUST"/>
- <response name="declare-ok"/>
- <field name="ticket" domain="access ticket">
- <doc>
- When a client defines a new exchange, this belongs to the access realm
- of the ticket used. All further work done with that exchange must be
- done with an access ticket for the same realm.
- </doc>
- <rule implement="MUST">
- The client MUST provide a valid access ticket giving "active" access
- to the realm in which the exchange exists or will be created, or
- "passive" access if the if-exists flag is set.
- </rule>
- </field>
- <field name="exchange" domain="exchange name">
- <rule implement="MUST">
- <test>amq_exchange_15</test>
- Exchange names starting with "amq." are reserved for predeclared
- and standardised exchanges. If the client attempts to create an
- exchange starting with "amq.", the server MUST raise a channel
- exception with reply code 403 (access refused).
- </rule>
- <assert check="regexp" value="^[a-zA-Z0-9-_.:]+$"/>
- </field>
- <field name="type" type="shortstr">
- exchange type
- <doc>
- Each exchange belongs to one of a set of exchange types implemented
- by the server. The exchange types define the functionality of the
- exchange - i.e. how messages are routed through it. It is not valid
- or meaningful to attempt to change the type of an existing exchange.
- </doc>
- <rule implement="MUST">
- <test>amq_exchange_16</test>
- If the exchange already exists with a different type, the server
- MUST raise a connection exception with a reply code 507 (not allowed).
- </rule>
- <rule implement="MUST">
- <test>amq_exchange_18</test>
- If the server does not support the requested exchange type it MUST
- raise a connection exception with a reply code 503 (command invalid).
- </rule>
- <assert check="regexp" value="^[a-zA-Z0-9-_.:]+$"/>
- </field>
- <field name="passive" type="bit">
- do not create exchange
- <doc>
- If set, the server will not create the exchange. The client can use
- this to check whether an exchange exists without modifying the server
- state.
- </doc>
- <rule implement="MUST">
- <test>amq_exchange_05</test>
- If set, and the exchange does not already exist, the server MUST
- raise a channel exception with reply code 404 (not found).
- </rule>
- </field>
- <field name="durable" type="bit">
- request a durable exchange
- <doc>
- If set when creating a new exchange, the exchange will be marked as
- durable. Durable exchanges remain active when a server restarts.
- Non-durable exchanges (transient exchanges) are purged if/when a
- server restarts.
- </doc>
- <rule implement="MUST">
- <test>amq_exchange_24</test>
- The server MUST support both durable and transient exchanges.
- </rule>
- <rule implement="MUST">
- The server MUST ignore the durable field if the exchange already
- exists.
- </rule>
- </field>
- <field name="auto delete" type="bit">
- auto-delete when unused
- <doc>
- If set, the exchange is deleted when all queues have finished
- using it.
- </doc>
- <rule implement="SHOULD">
- <test>amq_exchange_02</test>
- The server SHOULD allow for a reasonable delay between the point
- when it determines that an exchange is not being used (or no longer
- used), and the point when it deletes the exchange. At the least it
- must allow a client to create an exchange and then bind a queue to
- it, with a small but non-zero delay between these two actions.
- </rule>
- <rule implement="MUST">
- <test>amq_exchange_25</test>
- The server MUST ignore the auto-delete field if the exchange already
- exists.
- </rule>
- </field>
- <field name="internal" type="bit">
- create internal exchange
- <doc>
- If set, the exchange may not be used directly by publishers, but
- only when bound to other exchanges. Internal exchanges are used to
- construct wiring that is not visible to applications.
- </doc>
- </field>
-
- <field name = "nowait" type = "bit">
- do not send a reply method
- <doc>
- If set, the server will not respond to the method. The client should
- not wait for a reply method. If the server could not complete the
- method it will raise a channel or connection exception.
- </doc>
- </field>
-
- <field name="arguments" type="table">
- arguments for declaration
- <doc>
- A set of arguments for the declaration. The syntax and semantics
- of these arguments depends on the server implementation. This
- field is ignored if passive is 1.
- </doc>
- </field>
- </method>
- <method name="declare-ok" synchronous="1" index="11">
- confirms an exchange declaration
- <doc>
- This method confirms a Declare method and confirms the name of the
- exchange, essential for automatically-named exchanges.
- </doc>
- <chassis name="client" implement="MUST"/>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="delete" synchronous="1" index="20">
- delete an exchange
- <doc>
- This method deletes an exchange. When an exchange is deleted all queue
- bindings on the exchange are cancelled.
- </doc>
- <chassis name="server" implement="MUST"/>
- <response name="delete-ok"/>
- <field name="ticket" domain="access ticket">
- <rule implement="MUST">
- The client MUST provide a valid access ticket giving "active"
- access rights to the exchange's access realm.
- </rule>
- </field>
- <field name="exchange" domain="exchange name">
- <rule implement="MUST">
- <test>amq_exchange_11</test>
- The exchange MUST exist. Attempting to delete a non-existing exchange
- causes a channel exception.
- </rule>
- <assert check="notnull"/>
- </field>
- <field name="if unused" type="bit">
- delete only if unused
- <doc>
- If set, the server will only delete the exchange if it has no queue
- bindings. If the exchange has queue bindings the server does not
- delete it but raises a channel exception instead.
- </doc>
- <rule implement="SHOULD">
- <test>amq_exchange_12</test>
- If set, the server SHOULD delete the exchange but only if it has
- no queue bindings.
- </rule>
- <rule implement="SHOULD">
- <test>amq_exchange_13</test>
- If set, the server SHOULD raise a channel exception if the exchange is in
- use.
- </rule>
- </field>
-
- <field name = "nowait" type = "bit">
- do not send a reply method
- <doc>
- If set, the server will not respond to the method. The client should
- not wait for a reply method. If the server could not complete the
- method it will raise a channel or connection exception.
- </doc>
- </field>
-
- </method>
- <method name="delete-ok" synchronous="1" index="21">
- confirm deletion of an exchange
- <doc>
- This method confirms the deletion of an exchange.
- </doc>
- <chassis name="client" implement="MUST"/>
- </method>
- </class>
- <class name="queue" handler="channel" index="50">
- <!--
-======================================================
-== QUEUES
-======================================================
--->
- work with queues
-
-<doc>
- Queues store and forward messages. Queues can be configured in the server
- or created at runtime. Queues must be attached to at least one exchange
- in order to receive messages from publishers.
-</doc>
- <doc name="grammar">
- queue = C:DECLARE S:DECLARE-OK
- / C:BIND S:BIND-OK
- / C:PURGE S:PURGE-OK
- / C:DELETE S:DELETE-OK
-</doc>
- <chassis name="server" implement="MUST"/>
- <chassis name="client" implement="MUST"/>
- <rule implement="MUST">
- <test>amq_queue_33</test>
- A server MUST allow any content class to be sent to any queue, in any
- mix, and queue and delivery these content classes independently. Note
- that all methods that fetch content off queues are specific to a given
- content class.
-</rule>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="declare" synchronous="1" index="10">
- declare queue, create if needed
- <doc>
- This method creates or checks a queue. When creating a new queue
- the client can specify various properties that control the durability
- of the queue and its contents, and the level of sharing for the queue.
- </doc>
- <rule implement="MUST">
- <test>amq_queue_34</test>
- The server MUST create a default binding for a newly-created queue
- to the default exchange, which is an exchange of type 'direct'.
- </rule>
- <rule implement="SHOULD">
- <test>amq_queue_35</test>
- The server SHOULD support a minimum of 256 queues per virtual host
- and ideally, impose no limit except as defined by available resources.
- </rule>
- <chassis name="server" implement="MUST"/>
- <response name="declare-ok"/>
- <field name="ticket" domain="access ticket">
- <doc>
- When a client defines a new queue, this belongs to the access realm
- of the ticket used. All further work done with that queue must be
- done with an access ticket for the same realm.
- </doc>
- <doc>
- The client provides a valid access ticket giving "active" access
- to the realm in which the queue exists or will be created, or
- "passive" access if the if-exists flag is set.
- </doc>
- </field>
- <field name="queue" domain="queue name">
- <rule implement="MAY">
- <test>amq_queue_10</test>
- The queue name MAY be empty, in which case the server MUST create
- a new queue with a unique generated name and return this to the
- client in the Declare-Ok method.
- </rule>
- <rule implement="MUST">
- <test>amq_queue_32</test>
- Queue names starting with "amq." are reserved for predeclared and
- standardised server queues. If the queue name starts with "amq."
- and the passive option is zero, the server MUST raise a connection
- exception with reply code 403 (access refused).
- </rule>
- <assert check="regexp" value="^[a-zA-Z0-9-_.:]*$"/>
- </field>
- <field name="passive" type="bit">
- do not create queue
- <doc>
- If set, the server will not create the queue. The client can use
- this to check whether a queue exists without modifying the server
- state.
- </doc>
- <rule implement="MUST">
- <test>amq_queue_05</test>
- If set, and the queue does not already exist, the server MUST
- respond with a reply code 404 (not found) and raise a channel
- exception.
- </rule>
- </field>
- <field name="durable" type="bit">
- request a durable queue
- <doc>
- If set when creating a new queue, the queue will be marked as
- durable. Durable queues remain active when a server restarts.
- Non-durable queues (transient queues) are purged if/when a
- server restarts. Note that durable queues do not necessarily
- hold persistent messages, although it does not make sense to
- send persistent messages to a transient queue.
- </doc>
- <rule implement="MUST">
- <test>amq_queue_03</test>
- The server MUST recreate the durable queue after a restart.
- </rule>
- <rule implement="MUST">
- <test>amq_queue_36</test>
- The server MUST support both durable and transient queues.
- </rule>
- <rule implement="MUST">
- <test>amq_queue_37</test>
- The server MUST ignore the durable field if the queue already
- exists.
- </rule>
- </field>
- <field name="exclusive" type="bit">
- request an exclusive queue
- <doc>
- Exclusive queues may only be consumed from by the current connection.
- Setting the 'exclusive' flag always implies 'auto-delete'.
- </doc>
- <rule implement="MUST">
- <test>amq_queue_38</test>
- The server MUST support both exclusive (private) and non-exclusive
- (shared) queues.
- </rule>
- <rule implement="MUST">
- <test>amq_queue_04</test>
- The server MUST raise a channel exception if 'exclusive' is specified
- and the queue already exists and is owned by a different connection.
- </rule>
- </field>
- <field name="auto delete" type="bit">
- auto-delete queue when unused
- <doc>
- If set, the queue is deleted when all consumers have finished
- using it. Last consumer can be cancelled either explicitly or because
- its channel is closed. If there was no consumer ever on the queue, it
- won't be deleted.
- </doc>
- <rule implement="SHOULD">
- <test>amq_queue_02</test>
- The server SHOULD allow for a reasonable delay between the point
- when it determines that a queue is not being used (or no longer
- used), and the point when it deletes the queue. At the least it
- must allow a client to create a queue and then create a consumer
- to read from it, with a small but non-zero delay between these
- two actions. The server should equally allow for clients that may
- be disconnected prematurely, and wish to re-consume from the same
- queue without losing messages. We would recommend a configurable
- timeout, with a suitable default value being one minute.
- </rule>
- <rule implement="MUST">
- <test>amq_queue_31</test>
- The server MUST ignore the auto-delete field if the queue already
- exists.
- </rule>
- </field>
- <field name = "nowait" type = "bit">
- do not send a reply method
- <doc>
- If set, the server will not respond to the method. The client should
- not wait for a reply method. If the server could not complete the
- method it will raise a channel or connection exception.
- </doc>
- </field>
-
- <field name="arguments" type="table">
- arguments for declaration
- <doc>
- A set of arguments for the declaration. The syntax and semantics
- of these arguments depends on the server implementation. This
- field is ignored if passive is 1.
- </doc>
- </field>
- </method>
- <method name="declare-ok" synchronous="1" index="11">
- confirms a queue definition
- <doc>
- This method confirms a Declare method and confirms the name of the
- queue, essential for automatically-named queues.
- </doc>
- <chassis name="client" implement="MUST"/>
- <field name="queue" domain="queue name">
- <doc>
- Reports the name of the queue. If the server generated a queue
- name, this field contains that name.
- </doc>
- <assert check="notnull"/>
- </field>
- <field name="message count" type="long">
- number of messages in queue
- <doc>
- Reports the number of messages in the queue, which will be zero
- for newly-created queues.
- </doc>
- </field>
- <field name="consumer count" type="long">
- number of consumers
- <doc>
- Reports the number of active consumers for the queue. Note that
- consumers can suspend activity (Channel.Flow) in which case they
- do not appear in this count.
- </doc>
- </field>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="bind" synchronous="1" index="20">
- bind queue to an exchange
- <doc>
- This method binds a queue to an exchange. Until a queue is
- bound it will not receive any messages. In a classic messaging
- model, store-and-forward queues are bound to a dest exchange
- and subscription queues are bound to a dest_wild exchange.
- </doc>
- <rule implement="MUST">
- <test>amq_queue_25</test>
- A server MUST allow ignore duplicate bindings - that is, two or
- more bind methods for a specific queue, with identical arguments
- - without treating these as an error.
- </rule>
- <rule implement="MUST">
- <test>amq_queue_39</test>
- If a bind fails, the server MUST raise a connection exception.
- </rule>
- <rule implement="MUST">
- <test>amq_queue_12</test>
- The server MUST NOT allow a durable queue to bind to a transient
- exchange. If the client attempts this the server MUST raise a
- channel exception.
- </rule>
- <rule implement="SHOULD">
- <test>amq_queue_13</test>
- Bindings for durable queues are automatically durable and the
- server SHOULD restore such bindings after a server restart.
- </rule>
- <rule implement="MUST">
- <test>amq_queue_17</test>
- If the client attempts to an exchange that was declared as internal,
- the server MUST raise a connection exception with reply code 530
- (not allowed).
- </rule>
- <rule implement="SHOULD">
- <test>amq_queue_40</test>
- The server SHOULD support at least 4 bindings per queue, and
- ideally, impose no limit except as defined by available resources.
- </rule>
- <chassis name="server" implement="MUST"/>
- <response name="bind-ok"/>
- <field name="ticket" domain="access ticket">
- <doc>
- The client provides a valid access ticket giving "active"
- access rights to the queue's access realm.
- </doc>
- </field>
-
- <field name = "queue" domain = "queue name">
- <doc>
- Specifies the name of the queue to bind. If the queue name is
- empty, refers to the current queue for the channel, which is
- the last declared queue.
- </doc>
- <doc name = "rule">
- If the client did not previously declare a queue, and the queue
- name in this method is empty, the server MUST raise a connection
- exception with reply code 530 (not allowed).
- </doc>
- <doc name = "rule" test = "amq_queue_26">
- If the queue does not exist the server MUST raise a channel exception
- with reply code 404 (not found).
- </doc>
- </field>
-
- <field name="exchange" domain="exchange name">
- The name of the exchange to bind to.
- <rule implement="MUST">
- <test>amq_queue_14</test>
- If the exchange does not exist the server MUST raise a channel
- exception with reply code 404 (not found).
- </rule>
- </field>
- <field name="routing key" type="shortstr">
- message routing key
- <doc>
- Specifies the routing key for the binding. The routing key is
- used for routing messages depending on the exchange configuration.
- Not all exchanges use a routing key - refer to the specific
- exchange documentation. If the routing key is empty and the queue
- name is empty, the routing key will be the current queue for the
- channel, which is the last declared queue.
- </doc>
- </field>
-
- <field name = "nowait" type = "bit">
- do not send a reply method
- <doc>
- If set, the server will not respond to the method. The client should
- not wait for a reply method. If the server could not complete the
- method it will raise a channel or connection exception.
- </doc>
- </field>
-
- <field name="arguments" type="table">
- arguments for binding
- <doc>
- A set of arguments for the binding. The syntax and semantics of
- these arguments depends on the exchange class.
- </doc>
- </field>
- </method>
- <method name="bind-ok" synchronous="1" index="21">
- confirm bind successful
- <doc>
- This method confirms that the bind was successful.
- </doc>
- <chassis name="client" implement="MUST"/>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="purge" synchronous="1" index="30">
- purge a queue
- <doc>
- This method removes all messages from a queue. It does not cancel
- consumers. Purged messages are deleted without any formal "undo"
- mechanism.
- </doc>
- <rule implement="MUST">
- <test>amq_queue_15</test>
- A call to purge MUST result in an empty queue.
- </rule>
- <rule implement="MUST">
- <test>amq_queue_41</test>
- On transacted channels the server MUST not purge messages that have
- already been sent to a client but not yet acknowledged.
- </rule>
- <rule implement="MAY">
- <test>amq_queue_42</test>
- The server MAY implement a purge queue or log that allows system
- administrators to recover accidentally-purged messages. The server
- SHOULD NOT keep purged messages in the same storage spaces as the
- live messages since the volumes of purged messages may get very
- large.
- </rule>
- <chassis name="server" implement="MUST"/>
- <response name="purge-ok"/>
- <field name="ticket" domain="access ticket">
- <doc>
- The access ticket must be for the access realm that holds the
- queue.
- </doc>
- <rule implement="MUST">
- The client MUST provide a valid access ticket giving "read" access
- rights to the queue's access realm. Note that purging a queue is
- equivalent to reading all messages and discarding them.
- </rule>
- </field>
- <field name = "queue" domain = "queue name">
- <doc>
- Specifies the name of the queue to purge. If the queue name is
- empty, refers to the current queue for the channel, which is
- the last declared queue.
- </doc>
- <doc name = "rule">
- If the client did not previously declare a queue, and the queue
- name in this method is empty, the server MUST raise a connection
- exception with reply code 530 (not allowed).
- </doc>
- <doc name = "rule" test = "amq_queue_16">
- The queue must exist. Attempting to purge a non-existing queue
- causes a channel exception.
- </doc>
- </field>
-
- <field name = "nowait" type = "bit">
- do not send a reply method
- <doc>
- If set, the server will not respond to the method. The client should
- not wait for a reply method. If the server could not complete the
- method it will raise a channel or connection exception.
- </doc>
- </field>
- </method>
- <method name="purge-ok" synchronous="1" index="31">
- confirms a queue purge
- <doc>
- This method confirms the purge of a queue.
- </doc>
- <chassis name="client" implement="MUST"/>
- <field name="message count" type="long">
- number of messages purged
- <doc>
- Reports the number of messages purged.
- </doc>
- </field>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="delete" synchronous="1" index="40">
- delete a queue
- <doc>
- This method deletes a queue. When a queue is deleted any pending
- messages are sent to a dead-letter queue if this is defined in the
- server configuration, and all consumers on the queue are cancelled.
- </doc>
- <rule implement="SHOULD">
- <test>amq_queue_43</test>
- The server SHOULD use a dead-letter queue to hold messages that
- were pending on a deleted queue, and MAY provide facilities for
- a system administrator to move these messages back to an active
- queue.
- </rule>
- <chassis name="server" implement="MUST"/>
- <response name="delete-ok"/>
- <field name="ticket" domain="access ticket">
- <doc>
- The client provides a valid access ticket giving "active"
- access rights to the queue's access realm.
- </doc>
- </field>
-
- <field name = "queue" domain = "queue name">
- <doc>
- Specifies the name of the queue to delete. If the queue name is
- empty, refers to the current queue for the channel, which is the
- last declared queue.
- </doc>
- <doc name = "rule">
- If the client did not previously declare a queue, and the queue
- name in this method is empty, the server MUST raise a connection
- exception with reply code 530 (not allowed).
- </doc>
- <doc name = "rule" test = "amq_queue_21">
- The queue must exist. Attempting to delete a non-existing queue
- causes a channel exception.
- </doc>
- </field>
-
- <field name="if unused" type="bit">
- delete only if unused
- <doc>
- If set, the server will only delete the queue if it has no
- consumers. If the queue has consumers the server does does not
- delete it but raises a channel exception instead.
- </doc>
- <rule implement="MUST">
- <test>amq_queue_29</test>
- <test>amq_queue_30</test>
- The server MUST respect the if-unused flag when deleting a queue.
- </rule>
- </field>
- <field name="if empty" type="bit">
- delete only if empty
- <test>amq_queue_27</test>
- <doc>
- If set, the server will only delete the queue if it has no
- messages. If the queue is not empty the server raises a channel
- exception.
- </doc>
- </field>
- <field name = "nowait" type = "bit">
- do not send a reply method
- <doc>
- If set, the server will not respond to the method. The client should
- not wait for a reply method. If the server could not complete the
- method it will raise a channel or connection exception.
- </doc>
- </field>
- </method>
-
- <method name="delete-ok" synchronous="1" index="41">
- confirm deletion of a queue
- <doc>
- This method confirms the deletion of a queue.
- </doc>
- <chassis name="client" implement="MUST"/>
- <field name="message count" type="long">
- number of messages purged
- <doc>
- Reports the number of messages purged.
- </doc>
- </field>
- </method>
- </class>
- <class name="basic" handler="channel" index="60">
- <!--
-======================================================
-== BASIC MIDDLEWARE
-======================================================
--->
- work with basic content
-<doc>
- The Basic class provides methods that support an industry-standard
- messaging model.
-</doc>
-
-<doc name = "grammar">
- basic = C:QOS S:QOS-OK
- / C:CONSUME S:CONSUME-OK
- / C:CANCEL S:CANCEL-OK
- / C:PUBLISH content
- / S:RETURN content
- / S:DELIVER content
- / C:GET ( S:GET-OK content / S:GET-EMPTY )
- / C:ACK
- / C:REJECT
-</doc>
-
-<chassis name = "server" implement = "MUST" />
-<chassis name = "client" implement = "MAY" />
-
-<doc name = "rule" test = "amq_basic_08">
- The server SHOULD respect the persistent property of basic messages
- and SHOULD make a best-effort to hold persistent basic messages on a
- reliable storage mechanism.
-</doc>
-<doc name = "rule" test = "amq_basic_09">
- The server MUST NOT discard a persistent basic message in case of a
- queue overflow. The server MAY use the Channel.Flow method to slow
- or stop a basic message publisher when necessary.
-</doc>
-<doc name = "rule" test = "amq_basic_10">
- The server MAY overflow non-persistent basic messages to persistent
- storage and MAY discard or dead-letter non-persistent basic messages
- on a priority basis if the queue size exceeds some configured limit.
-</doc>
-<doc name = "rule" test = "amq_basic_11">
- The server MUST implement at least 2 priority levels for basic
- messages, where priorities 0-4 and 5-9 are treated as two distinct
- levels. The server MAY implement up to 10 priority levels.
-</doc>
-<doc name = "rule" test = "amq_basic_12">
- The server MUST deliver messages of the same priority in order
- irrespective of their individual persistence.
-</doc>
-<doc name = "rule" test = "amq_basic_13">
- The server MUST support both automatic and explicit acknowledgements
- on Basic content.
-</doc>
-
-<!-- These are the properties for a Basic content -->
-
-<field name = "content type" type = "shortstr">
- MIME content type
-</field>
-<field name = "content encoding" type = "shortstr">
- MIME content encoding
-</field>
-<field name = "headers" type = "table">
- Message header field table
-</field>
-<field name = "delivery mode" type = "octet">
- Non-persistent (1) or persistent (2)
-</field>
-<field name = "priority" type = "octet">
- The message priority, 0 to 9
-</field>
-<field name = "correlation id" type = "shortstr">
- The application correlation identifier
-</field>
-<field name = "reply to" type = "shortstr">
- The destination to reply to
-</field>
-<field name = "expiration" type = "shortstr">
- Message expiration specification
-</field>
-<field name = "message id" type = "shortstr">
- The application message identifier
-</field>
-<field name = "timestamp" type = "timestamp">
- The message timestamp
-</field>
-<field name = "type" type = "shortstr">
- The message type name
-</field>
-<field name = "user id" type = "shortstr">
- The creating user id
-</field>
-<field name = "app id" type = "shortstr">
- The creating application id
-</field>
-<field name = "cluster id" type = "shortstr">
- Intra-cluster routing identifier
-</field>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "qos" synchronous = "1" index = "10">
- specify quality of service
- <doc>
- This method requests a specific quality of service. The QoS can
- be specified for the current channel or for all channels on the
- connection. The particular properties and semantics of a qos method
- always depend on the content class semantics. Though the qos method
- could in principle apply to both peers, it is currently meaningful
- only for the server.
- </doc>
- <chassis name = "server" implement = "MUST" />
- <response name = "qos-ok" />
-
- <field name = "prefetch size" type = "long">
- prefetch window in octets
- <doc>
- The client can request that messages be sent in advance so that
- when the client finishes processing a message, the following
- message is already held locally, rather than needing to be sent
- down the channel. Prefetching gives a performance improvement.
- This field specifies the prefetch window size in octets. The
- server will send a message in advance if it is equal to or
- smaller in size than the available prefetch size (and also falls
- into other prefetch limits). May be set to zero, meaning "no
- specific limit", although other prefetch limits may still apply.
- The prefetch-size is ignored if the no-ack option is set.
- </doc>
- <doc name = "rule" test = "amq_basic_17">
- The server MUST ignore this setting when the client is not
- processing any messages - i.e. the prefetch size does not limit
- the transfer of single messages to a client, only the sending in
- advance of more messages while the client still has one or more
- unacknowledged messages.
- </doc>
- </field>
-
- <field name = "prefetch count" type = "short">
- prefetch window in messages
- <doc>
- Specifies a prefetch window in terms of whole messages. This
- field may be used in combination with the prefetch-size field;
- a message will only be sent in advance if both prefetch windows
- (and those at the channel and connection level) allow it.
- The prefetch-count is ignored if the no-ack option is set.
- </doc>
- <doc name = "rule" test = "amq_basic_18">
- The server MAY send less data in advance than allowed by the
- client's specified prefetch windows but it MUST NOT send more.
- </doc>
- </field>
-
- <field name = "global" type = "bit">
- apply to entire connection
- <doc>
- By default the QoS settings apply to the current channel only. If
- this field is set, they are applied to the entire connection.
- </doc>
- </field>
-</method>
-
-<method name = "qos-ok" synchronous = "1" index = "11">
- confirm the requested qos
- <doc>
- This method tells the client that the requested QoS levels could
- be handled by the server. The requested QoS applies to all active
- consumers until a new QoS is defined.
- </doc>
- <chassis name = "client" implement = "MUST" />
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "consume" synchronous = "1" index = "20">
- start a queue consumer
- <doc>
- This method asks the server to start a "consumer", which is a
- transient request for messages from a specific queue. Consumers
- last as long as the channel they were created on, or until the
- client cancels them.
- </doc>
- <doc name = "rule" test = "amq_basic_01">
- The server SHOULD support at least 16 consumers per queue, unless
- the queue was declared as private, and ideally, impose no limit
- except as defined by available resources.
- </doc>
- <chassis name = "server" implement = "MUST" />
- <response name = "consume-ok" />
-
- <field name = "ticket" domain = "access ticket">
- <doc name = "rule">
- The client MUST provide a valid access ticket giving "read" access
- rights to the realm for the queue.
- </doc>
- </field>
-
- <field name = "queue" domain = "queue name">
- <doc>
- Specifies the name of the queue to consume from. If the queue name
- is null, refers to the current queue for the channel, which is the
- last declared queue.
- </doc>
- <doc name = "rule">
- If the client did not previously declare a queue, and the queue name
- in this method is empty, the server MUST raise a connection exception
- with reply code 530 (not allowed).
- </doc>
- </field>
-
- <field name = "consumer tag" domain = "consumer tag">
- <doc>
- Specifies the identifier for the consumer. The consumer tag is
- local to a connection, so two clients can use the same consumer
- tags. If this field is empty the server will generate a unique
- tag.
- </doc>
- <doc name = "rule" test = "todo">
- The tag MUST NOT refer to an existing consumer. If the client
- attempts to create two consumers with the same non-empty tag
- the server MUST raise a connection exception with reply code
- 530 (not allowed).
- </doc>
- </field>
-
- <field name = "no local" domain = "no local" />
-
- <field name = "no ack" domain = "no ack" />
-
- <field name = "exclusive" type = "bit">
- request exclusive access
- <doc>
- Request exclusive consumer access, meaning only this consumer can
- access the queue.
- </doc>
- <doc name = "rule" test = "amq_basic_02">
- If the server cannot grant exclusive access to the queue when asked,
- - because there are other consumers active - it MUST raise a channel
- exception with return code 403 (access refused).
- </doc>
- </field>
-
- <field name = "nowait" type = "bit">
- do not send a reply method
- <doc>
- If set, the server will not respond to the method. The client should
- not wait for a reply method. If the server could not complete the
- method it will raise a channel or connection exception.
- </doc>
- </field>
-</method>
-
-<method name = "consume-ok" synchronous = "1" index = "21">
- confirm a new consumer
- <doc>
- The server provides the client with a consumer tag, which is used
- by the client for methods called on the consumer at a later stage.
- </doc>
- <chassis name = "client" implement = "MUST" />
-
- <field name = "consumer tag" domain = "consumer tag">
- <doc>
- Holds the consumer tag specified by the client or provided by
- the server.
- </doc>
- </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "cancel" synchronous = "1" index = "30">
- end a queue consumer
- <doc test = "amq_basic_04">
- This method cancels a consumer. This does not affect already
- delivered messages, but it does mean the server will not send any
- more messages for that consumer. The client may receive an
- abitrary number of messages in between sending the cancel method
- and receiving the cancel-ok reply.
- </doc>
- <doc name = "rule" test = "todo">
- If the queue no longer exists when the client sends a cancel command,
- or the consumer has been cancelled for other reasons, this command
- has no effect.
- </doc>
- <chassis name = "server" implement = "MUST" />
- <response name = "cancel-ok" />
-
- <field name = "consumer tag" domain = "consumer tag" />
-
- <field name = "nowait" type = "bit">
- do not send a reply method
- <doc>
- If set, the server will not respond to the method. The client should
- not wait for a reply method. If the server could not complete the
- method it will raise a channel or connection exception.
- </doc>
- </field>
-</method>
-
-<method name = "cancel-ok" synchronous = "1" index = "31">
- confirm a cancelled consumer
- <doc>
- This method confirms that the cancellation was completed.
- </doc>
- <chassis name = "client" implement = "MUST" />
-
- <field name = "consumer tag" domain = "consumer tag" />
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "publish" content = "1" index = "40">
- publish a message
- <doc>
- This method publishes a message to a specific exchange. The message
- will be routed to queues as defined by the exchange configuration
- and distributed to any active consumers when the transaction, if any,
- is committed.
- </doc>
- <chassis name = "server" implement = "MUST" />
-
- <field name = "ticket" domain = "access ticket">
- <doc name = "rule">
- The client MUST provide a valid access ticket giving "write"
- access rights to the access realm for the exchange.
- </doc>
- </field>
-
- <field name = "exchange" domain = "exchange name">
- <doc>
- Specifies the name of the exchange to publish to. The exchange
- name can be empty, meaning the default exchange. If the exchange
- name is specified, and that exchange does not exist, the server
- will raise a channel exception.
- </doc>
- <doc name = "rule" test = "amq_basic_06">
- The server MUST accept a blank exchange name to mean the default
- exchange.
- </doc>
- <doc name = "rule" test = "amq_basic_14">
- If the exchange was declared as an internal exchange, the server
- MUST raise a channel exception with a reply code 403 (access
- refused).
- </doc>
- <doc name = "rule" test = "amq_basic_15">
- The exchange MAY refuse basic content in which case it MUST raise
- a channel exception with reply code 540 (not implemented).
- </doc>
- </field>
-
- <field name = "routing key" type = "shortstr">
- Message routing key
- <doc>
- Specifies the routing key for the message. The routing key is
- used for routing messages depending on the exchange configuration.
- </doc>
- </field>
-
- <field name = "mandatory" type = "bit">
- indicate mandatory routing
- <doc>
- This flag tells the server how to react if the message cannot be
- routed to a queue. If this flag is set, the server will return an
- unroutable message with a Return method. If this flag is zero, the
- server silently drops the message.
- </doc>
- <doc name = "rule" test = "amq_basic_07">
- The server SHOULD implement the mandatory flag.
- </doc>
- </field>
-
- <field name = "immediate" type = "bit">
- request immediate delivery
- <doc>
- This flag tells the server how to react if the message cannot be
- routed to a queue consumer immediately. If this flag is set, the
- server will return an undeliverable message with a Return method.
- If this flag is zero, the server will queue the message, but with
- no guarantee that it will ever be consumed.
- </doc>
- <doc name = "rule" test = "amq_basic_16">
- The server SHOULD implement the immediate flag.
- </doc>
- </field>
-</method>
-
-<method name = "return" content = "1" index = "50">
- return a failed message
- <doc>
- This method returns an undeliverable message that was published
- with the "immediate" flag set, or an unroutable message published
- with the "mandatory" flag set. The reply code and text provide
- information about the reason that the message was undeliverable.
- </doc>
- <chassis name = "client" implement = "MUST" />
-
- <field name = "reply code" domain = "reply code" />
- <field name = "reply text" domain = "reply text" />
-
- <field name = "exchange" domain = "exchange name">
- <doc>
- Specifies the name of the exchange that the message was
- originally published to.
- </doc>
- </field>
-
- <field name = "routing key" type = "shortstr">
- Message routing key
- <doc>
- Specifies the routing key name specified when the message was
- published.
- </doc>
- </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "deliver" content = "1" index = "60">
- notify the client of a consumer message
- <doc>
- This method delivers a message to the client, via a consumer. In
- the asynchronous message delivery model, the client starts a
- consumer using the Consume method, then the server responds with
- Deliver methods as and when messages arrive for that consumer.
- </doc>
- <doc name = "rule" test = "amq_basic_19">
- The server SHOULD track the number of times a message has been
- delivered to clients and when a message is redelivered a certain
- number of times - e.g. 5 times - without being acknowledged, the
- server SHOULD consider the message to be unprocessable (possibly
- causing client applications to abort), and move the message to a
- dead letter queue.
- </doc>
- <chassis name = "client" implement = "MUST" />
-
- <field name = "consumer tag" domain = "consumer tag" />
-
- <field name = "delivery tag" domain = "delivery tag" />
-
- <field name = "redelivered" domain = "redelivered" />
-
- <field name = "exchange" domain = "exchange name">
- <doc>
- Specifies the name of the exchange that the message was
- originally published to.
- </doc>
- </field>
-
- <field name = "routing key" type = "shortstr">
- Message routing key
- <doc>
- Specifies the routing key name specified when the message was
- published.
- </doc>
- </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "get" synchronous = "1" index = "70">
- direct access to a queue
- <doc>
- This method provides a direct access to the messages in a queue
- using a synchronous dialogue that is designed for specific types of
- application where synchronous functionality is more important than
- performance.
- </doc>
- <response name = "get-ok" />
- <response name = "get-empty" />
- <chassis name = "server" implement = "MUST" />
-
- <field name = "ticket" domain = "access ticket">
- <doc name = "rule">
- The client MUST provide a valid access ticket giving "read"
- access rights to the realm for the queue.
- </doc>
- </field>
-
- <field name = "queue" domain = "queue name">
- <doc>
- Specifies the name of the queue to consume from. If the queue name
- is null, refers to the current queue for the channel, which is the
- last declared queue.
- </doc>
- <doc name = "rule">
- If the client did not previously declare a queue, and the queue name
- in this method is empty, the server MUST raise a connection exception
- with reply code 530 (not allowed).
- </doc>
- </field>
-
- <field name = "no ack" domain = "no ack" />
-</method>
-
-<method name = "get-ok" synchronous = "1" content = "1" index = "71">
- provide client with a message
- <doc>
- This method delivers a message to the client following a get
- method. A message delivered by 'get-ok' must be acknowledged
- unless the no-ack option was set in the get method.
- </doc>
- <chassis name = "client" implement = "MAY" />
-
- <field name = "delivery tag" domain = "delivery tag" />
-
- <field name = "redelivered" domain = "redelivered" />
-
- <field name = "exchange" domain = "exchange name">
- <doc>
- Specifies the name of the exchange that the message was originally
- published to. If empty, the message was published to the default
- exchange.
- </doc>
- </field>
-
- <field name = "routing key" type = "shortstr">
- Message routing key
- <doc>
- Specifies the routing key name specified when the message was
- published.
- </doc>
- </field>
-
- <field name = "message count" type = "long" >
- number of messages pending
- <doc>
- This field reports the number of messages pending on the queue,
- excluding the message being delivered. Note that this figure is
- indicative, not reliable, and can change arbitrarily as messages
- are added to the queue and removed by other clients.
- </doc>
- </field>
-</method>
-
-
-<method name = "get-empty" synchronous = "1" index = "72">
- indicate no messages available
- <doc>
- This method tells the client that the queue has no messages
- available for the client.
- </doc>
- <chassis name = "client" implement = "MAY" />
-
- <field name = "cluster id" type = "shortstr">
- Cluster id
- <doc>
- For use by cluster applications, should not be used by
- client applications.
- </doc>
- </field>
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "ack" index = "80">
- acknowledge one or more messages
- <doc>
- This method acknowledges one or more messages delivered via the
- Deliver or Get-Ok methods. The client can ask to confirm a
- single message or a set of messages up to and including a specific
- message.
- </doc>
- <chassis name = "server" implement = "MUST" />
- <field name = "delivery tag" domain = "delivery tag" />
-
- <field name = "multiple" type = "bit">
- acknowledge multiple messages
- <doc>
- If set to 1, the delivery tag is treated as "up to and including",
- so that the client can acknowledge multiple messages with a single
- method. If set to zero, the delivery tag refers to a single
- message. If the multiple field is 1, and the delivery tag is zero,
- tells the server to acknowledge all outstanding mesages.
- </doc>
- <doc name = "rule" test = "amq_basic_20">
- The server MUST validate that a non-zero delivery-tag refers to an
- delivered message, and raise a channel exception if this is not the
- case.
- </doc>
- </field>
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "reject" index = "90">
- reject an incoming message
- <doc>
- This method allows a client to reject a message. It can be used to
- interrupt and cancel large incoming messages, or return untreatable
- messages to their original queue.
- </doc>
- <doc name = "rule" test = "amq_basic_21">
- The server SHOULD be capable of accepting and process the Reject
- method while sending message content with a Deliver or Get-Ok
- method. I.e. the server should read and process incoming methods
- while sending output frames. To cancel a partially-send content,
- the server sends a content body frame of size 1 (i.e. with no data
- except the frame-end octet).
- </doc>
- <doc name = "rule" test = "amq_basic_22">
- The server SHOULD interpret this method as meaning that the client
- is unable to process the message at this time.
- </doc>
- <doc name = "rule">
- A client MUST NOT use this method as a means of selecting messages
- to process. A rejected message MAY be discarded or dead-lettered,
- not necessarily passed to another client.
- </doc>
- <chassis name = "server" implement = "MUST" />
-
- <field name = "delivery tag" domain = "delivery tag" />
-
- <field name = "requeue" type = "bit">
- requeue the message
- <doc>
- If this field is zero, the message will be discarded. If this bit
- is 1, the server will attempt to requeue the message.
- </doc>
- <doc name = "rule" test = "amq_basic_23">
- The server MUST NOT deliver the message to the same client within
- the context of the current channel. The recommended strategy is
- to attempt to deliver the message to an alternative consumer, and
- if that is not possible, to move the message to a dead-letter
- queue. The server MAY use more sophisticated tracking to hold
- the message on the queue and redeliver it to the same client at
- a later stage.
- </doc>
- </field>
-</method>
-
-<method name = "recover" index = "100">
- redeliver unacknowledged messages. This method is only allowed on non-transacted channels.
- <doc>
- This method asks the broker to redeliver all unacknowledged messages on a
- specifieid channel. Zero or more messages may be redelivered.
- </doc>
- <chassis name = "server" implement = "MUST" />
-
- <field name = "requeue" type = "bit">
- requeue the message
- <doc>
- If this field is zero, the message will be redelivered to the original recipient. If this bit
- is 1, the server will attempt to requeue the message, potentially then delivering it to an
- alternative subscriber.
- </doc>
- </field>
-
- <doc name="rule">
- The server MUST set the redelivered flag on all messages that are resent.
- </doc>
- <doc name="rule">
- The server MUST raise a channel exception if this is called on a transacted channel.
- </doc>
-</method>
-
-
-</class>
-
-
- <class name="file" handler="channel" index="70">
- <!--
-======================================================
-== FILE TRANSFER
-======================================================
--->
- work with file content
-<doc>
- The file class provides methods that support reliable file transfer.
- File messages have a specific set of properties that are required for
- interoperability with file transfer applications. File messages and
- acknowledgements are subject to channel transactions. Note that the
- file class does not provide message browsing methods; these are not
- compatible with the staging model. Applications that need browsable
- file transfer should use Basic content and the Basic class.
-</doc>
-
-<doc name = "grammar">
- file = C:QOS S:QOS-OK
- / C:CONSUME S:CONSUME-OK
- / C:CANCEL S:CANCEL-OK
- / C:OPEN S:OPEN-OK C:STAGE content
- / S:OPEN C:OPEN-OK S:STAGE content
- / C:PUBLISH
- / S:DELIVER
- / S:RETURN
- / C:ACK
- / C:REJECT
-</doc>
-
-<chassis name = "server" implement = "MAY" />
-<chassis name = "client" implement = "MAY" />
-
-<doc name = "rule">
- The server MUST make a best-effort to hold file messages on a
- reliable storage mechanism.
-</doc>
-<doc name = "rule">
- The server MUST NOT discard a file message in case of a queue
- overflow. The server MUST use the Channel.Flow method to slow or stop
- a file message publisher when necessary.
-</doc>
-<doc name = "rule">
- The server MUST implement at least 2 priority levels for file
- messages, where priorities 0-4 and 5-9 are treated as two distinct
- levels. The server MAY implement up to 10 priority levels.
-</doc>
-<doc name = "rule">
- The server MUST support both automatic and explicit acknowledgements
- on file content.
-</doc>
-
-<!-- These are the properties for a File content -->
-
-<field name = "content type" type = "shortstr">
- MIME content type
-</field>
-<field name = "content encoding" type = "shortstr">
- MIME content encoding
-</field>
-<field name = "headers" type = "table">
- Message header field table
-</field>
-<field name = "priority" type = "octet">
- The message priority, 0 to 9
-</field>
-<field name = "reply to" type = "shortstr">
- The destination to reply to
-</field>
-<field name = "message id" type = "shortstr">
- The application message identifier
-</field>
-<field name = "filename" type = "shortstr">
- The message filename
-</field>
-<field name = "timestamp" type = "timestamp">
- The message timestamp
-</field>
-<field name = "cluster id" type = "shortstr">
- Intra-cluster routing identifier
-</field>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "qos" synchronous = "1" index = "10">
- specify quality of service
- <doc>
- This method requests a specific quality of service. The QoS can
- be specified for the current channel or for all channels on the
- connection. The particular properties and semantics of a qos method
- always depend on the content class semantics. Though the qos method
- could in principle apply to both peers, it is currently meaningful
- only for the server.
- </doc>
- <chassis name = "server" implement = "MUST" />
- <response name = "qos-ok" />
-
- <field name = "prefetch size" type = "long">
- prefetch window in octets
- <doc>
- The client can request that messages be sent in advance so that
- when the client finishes processing a message, the following
- message is already held locally, rather than needing to be sent
- down the channel. Prefetching gives a performance improvement.
- This field specifies the prefetch window size in octets. May be
- set to zero, meaning "no specific limit". Note that other
- prefetch limits may still apply. The prefetch-size is ignored
- if the no-ack option is set.
- </doc>
- </field>
-
- <field name = "prefetch count" type = "short">
- prefetch window in messages
- <doc>
- Specifies a prefetch window in terms of whole messages. This
- is compatible with some file API implementations. This field
- may be used in combination with the prefetch-size field; a
- message will only be sent in advance if both prefetch windows
- (and those at the channel and connection level) allow it.
- The prefetch-count is ignored if the no-ack option is set.
- </doc>
- <doc name = "rule">
- The server MAY send less data in advance than allowed by the
- client's specified prefetch windows but it MUST NOT send more.
- </doc>
- </field>
-
- <field name = "global" type = "bit">
- apply to entire connection
- <doc>
- By default the QoS settings apply to the current channel only. If
- this field is set, they are applied to the entire connection.
- </doc>
- </field>
-</method>
-
-<method name = "qos-ok" synchronous = "1" index = "11">
- confirm the requested qos
- <doc>
- This method tells the client that the requested QoS levels could
- be handled by the server. The requested QoS applies to all active
- consumers until a new QoS is defined.
- </doc>
- <chassis name = "client" implement = "MUST" />
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "consume" synchronous = "1" index = "20">
- start a queue consumer
- <doc>
- This method asks the server to start a "consumer", which is a
- transient request for messages from a specific queue. Consumers
- last as long as the channel they were created on, or until the
- client cancels them.
- </doc>
- <doc name = "rule">
- The server SHOULD support at least 16 consumers per queue, unless
- the queue was declared as private, and ideally, impose no limit
- except as defined by available resources.
- </doc>
- <chassis name = "server" implement = "MUST" />
- <response name = "consume-ok" />
-
- <field name = "ticket" domain = "access ticket">
- <doc name = "rule">
- The client MUST provide a valid access ticket giving "read" access
- rights to the realm for the queue.
- </doc>
- </field>
-
- <field name = "queue" domain = "queue name">
- <doc>
- Specifies the name of the queue to consume from. If the queue name
- is null, refers to the current queue for the channel, which is the
- last declared queue.
- </doc>
- <doc name = "rule">
- If the client did not previously declare a queue, and the queue name
- in this method is empty, the server MUST raise a connection exception
- with reply code 530 (not allowed).
- </doc>
- </field>
-
- <field name = "consumer tag" domain = "consumer tag">
- <doc>
- Specifies the identifier for the consumer. The consumer tag is
- local to a connection, so two clients can use the same consumer
- tags. If this field is empty the server will generate a unique
- tag.
- </doc>
- <doc name = "rule" test = "todo">
- The tag MUST NOT refer to an existing consumer. If the client
- attempts to create two consumers with the same non-empty tag
- the server MUST raise a connection exception with reply code
- 530 (not allowed).
- </doc>
- </field>
-
- <field name = "no local" domain = "no local" />
-
- <field name = "no ack" domain = "no ack" />
-
- <field name = "exclusive" type = "bit">
- request exclusive access
- <doc>
- Request exclusive consumer access, meaning only this consumer can
- access the queue.
- </doc>
- <doc name = "rule" test = "amq_file_00">
- If the server cannot grant exclusive access to the queue when asked,
- - because there are other consumers active - it MUST raise a channel
- exception with return code 405 (resource locked).
- </doc>
- </field>
-
- <field name = "nowait" type = "bit">
- do not send a reply method
- <doc>
- If set, the server will not respond to the method. The client should
- not wait for a reply method. If the server could not complete the
- method it will raise a channel or connection exception.
- </doc>
- </field>
-</method>
-
-<method name = "consume-ok" synchronous = "1" index = "21">
- confirm a new consumer
- <doc>
- This method provides the client with a consumer tag which it MUST
- use in methods that work with the consumer.
- </doc>
- <chassis name = "client" implement = "MUST" />
-
- <field name = "consumer tag" domain = "consumer tag">
- <doc>
- Holds the consumer tag specified by the client or provided by
- the server.
- </doc>
- </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "cancel" synchronous = "1" index = "30">
- end a queue consumer
- <doc>
- This method cancels a consumer. This does not affect already
- delivered messages, but it does mean the server will not send any
- more messages for that consumer.
- </doc>
- <chassis name = "server" implement = "MUST" />
- <response name = "cancel-ok" />
-
- <field name = "consumer tag" domain = "consumer tag" />
-
- <field name = "nowait" type = "bit">
- do not send a reply method
- <doc>
- If set, the server will not respond to the method. The client should
- not wait for a reply method. If the server could not complete the
- method it will raise a channel or connection exception.
- </doc>
- </field>
-</method>
-
-<method name = "cancel-ok" synchronous = "1" index = "31">
- confirm a cancelled consumer
- <doc>
- This method confirms that the cancellation was completed.
- </doc>
- <chassis name = "client" implement = "MUST" />
-
- <field name = "consumer tag" domain = "consumer tag" />
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "open" synchronous = "1" index = "40">
- request to start staging
- <doc>
- This method requests permission to start staging a message. Staging
- means sending the message into a temporary area at the recipient end
- and then delivering the message by referring to this temporary area.
- Staging is how the protocol handles partial file transfers - if a
- message is partially staged and the connection breaks, the next time
- the sender starts to stage it, it can restart from where it left off.
- </doc>
- <response name = "open-ok" />
- <chassis name = "server" implement = "MUST" />
- <chassis name = "client" implement = "MUST" />
-
- <field name = "identifier" type = "shortstr">
- staging identifier
- <doc>
- This is the staging identifier. This is an arbitrary string chosen
- by the sender. For staging to work correctly the sender must use
- the same staging identifier when staging the same message a second
- time after recovery from a failure. A good choice for the staging
- identifier would be the SHA1 hash of the message properties data
- (including the original filename, revised time, etc.).
- </doc>
- </field>
-
- <field name = "content size" type = "longlong">
- message content size
- <doc>
- The size of the content in octets. The recipient may use this
- information to allocate or check available space in advance, to
- avoid "disk full" errors during staging of very large messages.
- </doc>
- <doc name = "rule">
- The sender MUST accurately fill the content-size field.
- Zero-length content is permitted.
- </doc>
- </field>
-</method>
-
-<method name = "open-ok" synchronous = "1" index = "41">
- confirm staging ready
- <doc>
- This method confirms that the recipient is ready to accept staged
- data. If the message was already partially-staged at a previous
- time the recipient will report the number of octets already staged.
- </doc>
- <response name = "stage" />
- <chassis name = "server" implement = "MUST" />
- <chassis name = "client" implement = "MUST" />
-
- <field name = "staged size" type = "longlong">
- already staged amount
- <doc>
- The amount of previously-staged content in octets. For a new
- message this will be zero.
- </doc>
- <doc name = "rule">
- The sender MUST start sending data from this octet offset in the
- message, counting from zero.
- </doc>
- <doc name = "rule">
- The recipient MAY decide how long to hold partially-staged content
- and MAY implement staging by always discarding partially-staged
- content. However if it uses the file content type it MUST support
- the staging methods.
- </doc>
- </field>
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "stage" content = "1" index = "50">
- stage message content
- <doc>
- This method stages the message, sending the message content to the
- recipient from the octet offset specified in the Open-Ok method.
- </doc>
- <chassis name = "server" implement = "MUST" />
- <chassis name = "client" implement = "MUST" />
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "publish" index = "60">
- publish a message
- <doc>
- This method publishes a staged file message to a specific exchange.
- The file message will be routed to queues as defined by the exchange
- configuration and distributed to any active consumers when the
- transaction, if any, is committed.
- </doc>
- <chassis name = "server" implement = "MUST" />
-
- <field name = "ticket" domain = "access ticket">
- <doc name = "rule">
- The client MUST provide a valid access ticket giving "write"
- access rights to the access realm for the exchange.
- </doc>
- </field>
-
- <field name = "exchange" domain = "exchange name">
- <doc>
- Specifies the name of the exchange to publish to. The exchange
- name can be empty, meaning the default exchange. If the exchange
- name is specified, and that exchange does not exist, the server
- will raise a channel exception.
- </doc>
- <doc name = "rule">
- The server MUST accept a blank exchange name to mean the default
- exchange.
- </doc>
- <doc name = "rule">
- If the exchange was declared as an internal exchange, the server
- MUST respond with a reply code 403 (access refused) and raise a
- channel exception.
- </doc>
- <doc name = "rule">
- The exchange MAY refuse file content in which case it MUST respond
- with a reply code 540 (not implemented) and raise a channel
- exception.
- </doc>
- </field>
-
- <field name = "routing key" type = "shortstr">
- Message routing key
- <doc>
- Specifies the routing key for the message. The routing key is
- used for routing messages depending on the exchange configuration.
- </doc>
- </field>
-
- <field name = "mandatory" type = "bit">
- indicate mandatory routing
- <doc>
- This flag tells the server how to react if the message cannot be
- routed to a queue. If this flag is set, the server will return an
- unroutable message with a Return method. If this flag is zero, the
- server silently drops the message.
- </doc>
- <doc name = "rule" test = "amq_file_00">
- The server SHOULD implement the mandatory flag.
- </doc>
- </field>
-
- <field name = "immediate" type = "bit">
- request immediate delivery
- <doc>
- This flag tells the server how to react if the message cannot be
- routed to a queue consumer immediately. If this flag is set, the
- server will return an undeliverable message with a Return method.
- If this flag is zero, the server will queue the message, but with
- no guarantee that it will ever be consumed.
- </doc>
- <doc name = "rule" test = "amq_file_00">
- The server SHOULD implement the immediate flag.
- </doc>
- </field>
-
- <field name = "identifier" type = "shortstr">
- staging identifier
- <doc>
- This is the staging identifier of the message to publish. The
- message must have been staged. Note that a client can send the
- Publish method asynchronously without waiting for staging to
- finish.
- </doc>
- </field>
-</method>
-
-<method name = "return" content = "1" index = "70">
- return a failed message
- <doc>
- This method returns an undeliverable message that was published
- with the "immediate" flag set, or an unroutable message published
- with the "mandatory" flag set. The reply code and text provide
- information about the reason that the message was undeliverable.
- </doc>
- <chassis name = "client" implement = "MUST" />
-
- <field name = "reply code" domain = "reply code" />
- <field name = "reply text" domain = "reply text" />
-
- <field name = "exchange" domain = "exchange name">
- <doc>
- Specifies the name of the exchange that the message was
- originally published to.
- </doc>
- </field>
-
- <field name = "routing key" type = "shortstr">
- Message routing key
- <doc>
- Specifies the routing key name specified when the message was
- published.
- </doc>
- </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "deliver" index = "80">
- notify the client of a consumer message
- <doc>
- This method delivers a staged file message to the client, via a
- consumer. In the asynchronous message delivery model, the client
- starts a consumer using the Consume method, then the server
- responds with Deliver methods as and when messages arrive for
- that consumer.
- </doc>
- <doc name = "rule">
- The server SHOULD track the number of times a message has been
- delivered to clients and when a message is redelivered a certain
- number of times - e.g. 5 times - without being acknowledged, the
- server SHOULD consider the message to be unprocessable (possibly
- causing client applications to abort), and move the message to a
- dead letter queue.
- </doc>
- <chassis name = "client" implement = "MUST" />
-
- <field name = "consumer tag" domain = "consumer tag" />
-
- <field name = "delivery tag" domain = "delivery tag" />
-
- <field name = "redelivered" domain = "redelivered" />
-
- <field name = "exchange" domain = "exchange name">
- <doc>
- Specifies the name of the exchange that the message was originally
- published to.
- </doc>
- </field>
-
- <field name = "routing key" type = "shortstr">
- Message routing key
- <doc>
- Specifies the routing key name specified when the message was
- published.
- </doc>
- </field>
-
- <field name = "identifier" type = "shortstr">
- staging identifier
- <doc>
- This is the staging identifier of the message to deliver. The
- message must have been staged. Note that a server can send the
- Deliver method asynchronously without waiting for staging to
- finish.
- </doc>
- </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "ack" index = "90">
- acknowledge one or more messages
- <doc>
- This method acknowledges one or more messages delivered via the
- Deliver method. The client can ask to confirm a single message or
- a set of messages up to and including a specific message.
- </doc>
- <chassis name = "server" implement = "MUST" />
- <field name = "delivery tag" domain = "delivery tag" />
-
- <field name = "multiple" type = "bit">
- acknowledge multiple messages
- <doc>
- If set to 1, the delivery tag is treated as "up to and including",
- so that the client can acknowledge multiple messages with a single
- method. If set to zero, the delivery tag refers to a single
- message. If the multiple field is 1, and the delivery tag is zero,
- tells the server to acknowledge all outstanding mesages.
- </doc>
- <doc name = "rule">
- The server MUST validate that a non-zero delivery-tag refers to an
- delivered message, and raise a channel exception if this is not the
- case.
- </doc>
- </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "reject" index = "100">
- reject an incoming message
- <doc>
- This method allows a client to reject a message. It can be used to
- return untreatable messages to their original queue. Note that file
- content is staged before delivery, so the client will not use this
- method to interrupt delivery of a large message.
- </doc>
- <doc name = "rule">
- The server SHOULD interpret this method as meaning that the client
- is unable to process the message at this time.
- </doc>
- <doc name = "rule">
- A client MUST NOT use this method as a means of selecting messages
- to process. A rejected message MAY be discarded or dead-lettered,
- not necessarily passed to another client.
- </doc>
- <chassis name = "server" implement = "MUST" />
-
- <field name = "delivery tag" domain = "delivery tag" />
-
- <field name = "requeue" type = "bit">
- requeue the message
- <doc>
- If this field is zero, the message will be discarded. If this bit
- is 1, the server will attempt to requeue the message.
- </doc>
- <doc name = "rule">
- The server MUST NOT deliver the message to the same client within
- the context of the current channel. The recommended strategy is
- to attempt to deliver the message to an alternative consumer, and
- if that is not possible, to move the message to a dead-letter
- queue. The server MAY use more sophisticated tracking to hold
- the message on the queue and redeliver it to the same client at
- a later stage.
- </doc>
- </field>
-</method>
-
-</class>
-
- <class name="stream" handler="channel" index="80">
- <!--
-======================================================
-== STREAMING
-======================================================
--->
- work with streaming content
-
-<doc>
- The stream class provides methods that support multimedia streaming.
- The stream class uses the following semantics: one message is one
- packet of data; delivery is unacknowleged and unreliable; the consumer
- can specify quality of service parameters that the server can try to
- adhere to; lower-priority messages may be discarded in favour of high
- priority messages.
-</doc>
-
-<doc name = "grammar">
- stream = C:QOS S:QOS-OK
- / C:CONSUME S:CONSUME-OK
- / C:CANCEL S:CANCEL-OK
- / C:PUBLISH content
- / S:RETURN
- / S:DELIVER content
-</doc>
-
-<chassis name = "server" implement = "MAY" />
-<chassis name = "client" implement = "MAY" />
-
-<doc name = "rule">
- The server SHOULD discard stream messages on a priority basis if
- the queue size exceeds some configured limit.
-</doc>
-<doc name = "rule">
- The server MUST implement at least 2 priority levels for stream
- messages, where priorities 0-4 and 5-9 are treated as two distinct
- levels. The server MAY implement up to 10 priority levels.
-</doc>
-<doc name = "rule">
- The server MUST implement automatic acknowledgements on stream
- content. That is, as soon as a message is delivered to a client
- via a Deliver method, the server must remove it from the queue.
-</doc>
-
-
-<!-- These are the properties for a Stream content -->
-
-<field name = "content type" type = "shortstr">
- MIME content type
-</field>
-<field name = "content encoding" type = "shortstr">
- MIME content encoding
-</field>
-<field name = "headers" type = "table">
- Message header field table
-</field>
-<field name = "priority" type = "octet">
- The message priority, 0 to 9
-</field>
-<field name = "timestamp" type = "timestamp">
- The message timestamp
-</field>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "qos" synchronous = "1" index = "10">
- specify quality of service
- <doc>
- This method requests a specific quality of service. The QoS can
- be specified for the current channel or for all channels on the
- connection. The particular properties and semantics of a qos method
- always depend on the content class semantics. Though the qos method
- could in principle apply to both peers, it is currently meaningful
- only for the server.
- </doc>
- <chassis name = "server" implement = "MUST" />
- <response name = "qos-ok" />
-
- <field name = "prefetch size" type = "long">
- prefetch window in octets
- <doc>
- The client can request that messages be sent in advance so that
- when the client finishes processing a message, the following
- message is already held locally, rather than needing to be sent
- down the channel. Prefetching gives a performance improvement.
- This field specifies the prefetch window size in octets. May be
- set to zero, meaning "no specific limit". Note that other
- prefetch limits may still apply.
- </doc>
- </field>
-
- <field name = "prefetch count" type = "short">
- prefetch window in messages
- <doc>
- Specifies a prefetch window in terms of whole messages. This
- field may be used in combination with the prefetch-size field;
- a message will only be sent in advance if both prefetch windows
- (and those at the channel and connection level) allow it.
- </doc>
- </field>
-
- <field name = "consume rate" type = "long">
- transfer rate in octets/second
- <doc>
- Specifies a desired transfer rate in octets per second. This is
- usually determined by the application that uses the streaming
- data. A value of zero means "no limit", i.e. as rapidly as
- possible.
- </doc>
- <doc name = "rule">
- The server MAY ignore the prefetch values and consume rates,
- depending on the type of stream and the ability of the server
- to queue and/or reply it. The server MAY drop low-priority
- messages in favour of high-priority messages.
- </doc>
- </field>
-
- <field name = "global" type = "bit">
- apply to entire connection
- <doc>
- By default the QoS settings apply to the current channel only. If
- this field is set, they are applied to the entire connection.
- </doc>
- </field>
-</method>
-
-<method name = "qos-ok" synchronous = "1" index = "11">
- confirm the requested qos
- <doc>
- This method tells the client that the requested QoS levels could
- be handled by the server. The requested QoS applies to all active
- consumers until a new QoS is defined.
- </doc>
- <chassis name = "client" implement = "MUST" />
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "consume" synchronous = "1" index = "20">
- start a queue consumer
- <doc>
- This method asks the server to start a "consumer", which is a
- transient request for messages from a specific queue. Consumers
- last as long as the channel they were created on, or until the
- client cancels them.
- </doc>
- <doc name = "rule">
- The server SHOULD support at least 16 consumers per queue, unless
- the queue was declared as private, and ideally, impose no limit
- except as defined by available resources.
- </doc>
- <doc name = "rule">
- Streaming applications SHOULD use different channels to select
- different streaming resolutions. AMQP makes no provision for
- filtering and/or transforming streams except on the basis of
- priority-based selective delivery of individual messages.
- </doc>
- <chassis name = "server" implement = "MUST" />
- <response name = "consume-ok" />
-
- <field name = "ticket" domain = "access ticket">
- <doc name = "rule">
- The client MUST provide a valid access ticket giving "read" access
- rights to the realm for the queue.
- </doc>
- </field>
-
- <field name = "queue" domain = "queue name">
- <doc>
- Specifies the name of the queue to consume from. If the queue name
- is null, refers to the current queue for the channel, which is the
- last declared queue.
- </doc>
- <doc name = "rule">
- If the client did not previously declare a queue, and the queue name
- in this method is empty, the server MUST raise a connection exception
- with reply code 530 (not allowed).
- </doc>
- </field>
-
- <field name = "consumer tag" domain = "consumer tag">
- <doc>
- Specifies the identifier for the consumer. The consumer tag is
- local to a connection, so two clients can use the same consumer
- tags. If this field is empty the server will generate a unique
- tag.
- </doc>
- <doc name = "rule" test = "todo">
- The tag MUST NOT refer to an existing consumer. If the client
- attempts to create two consumers with the same non-empty tag
- the server MUST raise a connection exception with reply code
- 530 (not allowed).
- </doc>
- </field>
-
- <field name = "no local" domain = "no local" />
-
- <field name = "exclusive" type = "bit">
- request exclusive access
- <doc>
- Request exclusive consumer access, meaning only this consumer can
- access the queue.
- </doc>
- <doc name = "rule" test = "amq_file_00">
- If the server cannot grant exclusive access to the queue when asked,
- - because there are other consumers active - it MUST raise a channel
- exception with return code 405 (resource locked).
- </doc>
- </field>
-
- <field name = "nowait" type = "bit">
- do not send a reply method
- <doc>
- If set, the server will not respond to the method. The client should
- not wait for a reply method. If the server could not complete the
- method it will raise a channel or connection exception.
- </doc>
- </field>
-</method>
-
-
-<method name = "consume-ok" synchronous = "1" index = "21">
- confirm a new consumer
- <doc>
- This method provides the client with a consumer tag which it may
- use in methods that work with the consumer.
- </doc>
- <chassis name = "client" implement = "MUST" />
-
- <field name = "consumer tag" domain = "consumer tag">
- <doc>
- Holds the consumer tag specified by the client or provided by
- the server.
- </doc>
- </field>
-</method>
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "cancel" synchronous = "1" index = "30">
- end a queue consumer
- <doc>
- This method cancels a consumer. Since message delivery is
- asynchronous the client may continue to receive messages for
- a short while after canceling a consumer. It may process or
- discard these as appropriate.
- </doc>
- <chassis name = "server" implement = "MUST" />
- <response name = "cancel-ok" />
-
- <field name = "consumer tag" domain = "consumer tag" />
-
- <field name = "nowait" type = "bit">
- do not send a reply method
- <doc>
- If set, the server will not respond to the method. The client should
- not wait for a reply method. If the server could not complete the
- method it will raise a channel or connection exception.
- </doc>
- </field>
-</method>
-
-<method name = "cancel-ok" synchronous = "1" index = "31">
- confirm a cancelled consumer
- <doc>
- This method confirms that the cancellation was completed.
- </doc>
- <chassis name = "client" implement = "MUST" />
-
- <field name = "consumer tag" domain = "consumer tag" />
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "publish" content = "1" index = "40">
- publish a message
- <doc>
- This method publishes a message to a specific exchange. The message
- will be routed to queues as defined by the exchange configuration
- and distributed to any active consumers as appropriate.
- </doc>
- <chassis name = "server" implement = "MUST" />
-
- <field name = "ticket" domain = "access ticket">
- <doc name = "rule">
- The client MUST provide a valid access ticket giving "write"
- access rights to the access realm for the exchange.
- </doc>
- </field>
-
- <field name = "exchange" domain = "exchange name">
- <doc>
- Specifies the name of the exchange to publish to. The exchange
- name can be empty, meaning the default exchange. If the exchange
- name is specified, and that exchange does not exist, the server
- will raise a channel exception.
- </doc>
- <doc name = "rule">
- The server MUST accept a blank exchange name to mean the default
- exchange.
- </doc>
- <doc name = "rule">
- If the exchange was declared as an internal exchange, the server
- MUST respond with a reply code 403 (access refused) and raise a
- channel exception.
- </doc>
- <doc name = "rule">
- The exchange MAY refuse stream content in which case it MUST
- respond with a reply code 540 (not implemented) and raise a
- channel exception.
- </doc>
- </field>
-
- <field name = "routing key" type = "shortstr">
- Message routing key
- <doc>
- Specifies the routing key for the message. The routing key is
- used for routing messages depending on the exchange configuration.
- </doc>
- </field>
-
- <field name = "mandatory" type = "bit">
- indicate mandatory routing
- <doc>
- This flag tells the server how to react if the message cannot be
- routed to a queue. If this flag is set, the server will return an
- unroutable message with a Return method. If this flag is zero, the
- server silently drops the message.
- </doc>
- <doc name = "rule" test = "amq_stream_00">
- The server SHOULD implement the mandatory flag.
- </doc>
- </field>
-
- <field name = "immediate" type = "bit">
- request immediate delivery
- <doc>
- This flag tells the server how to react if the message cannot be
- routed to a queue consumer immediately. If this flag is set, the
- server will return an undeliverable message with a Return method.
- If this flag is zero, the server will queue the message, but with
- no guarantee that it will ever be consumed.
- </doc>
- <doc name = "rule" test = "amq_stream_00">
- The server SHOULD implement the immediate flag.
- </doc>
- </field>
-</method>
-
-<method name = "return" content = "1" index = "50">
- return a failed message
- <doc>
- This method returns an undeliverable message that was published
- with the "immediate" flag set, or an unroutable message published
- with the "mandatory" flag set. The reply code and text provide
- information about the reason that the message was undeliverable.
- </doc>
- <chassis name = "client" implement = "MUST" />
-
- <field name = "reply code" domain = "reply code" />
- <field name = "reply text" domain = "reply text" />
-
- <field name = "exchange" domain = "exchange name">
- <doc>
- Specifies the name of the exchange that the message was
- originally published to.
- </doc>
- </field>
-
- <field name = "routing key" type = "shortstr">
- Message routing key
- <doc>
- Specifies the routing key name specified when the message was
- published.
- </doc>
- </field>
-</method>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-<method name = "deliver" content = "1" index = "60">
- notify the client of a consumer message
- <doc>
- This method delivers a message to the client, via a consumer. In
- the asynchronous message delivery model, the client starts a
- consumer using the Consume method, then the server responds with
- Deliver methods as and when messages arrive for that consumer.
- </doc>
- <chassis name = "client" implement = "MUST" />
-
- <field name = "consumer tag" domain = "consumer tag" />
-
- <field name = "delivery tag" domain = "delivery tag" />
-
- <field name = "exchange" domain = "exchange name">
- <doc>
- Specifies the name of the exchange that the message was originally
- published to.
- </doc>
- </field>
-
- <field name = "queue" domain = "queue name">
- <doc>
- Specifies the name of the queue that the message came from. Note
- that a single channel can start many consumers on different
- queues.
- </doc>
- <assert check = "notnull" />
- </field>
-</method>
- </class>
-
- <class name="tx" handler="channel" index="90">
- <!--
-======================================================
-== TRANSACTIONS
-======================================================
--->
- work with standard transactions
-
-<doc>
- Standard transactions provide so-called "1.5 phase commit". We can
- ensure that work is never lost, but there is a chance of confirmations
- being lost, so that messages may be resent. Applications that use
- standard transactions must be able to detect and ignore duplicate
- messages.
-</doc>
- <rule implement="SHOULD">
- An client using standard transactions SHOULD be able to track all
- messages received within a reasonable period, and thus detect and
- reject duplicates of the same message. It SHOULD NOT pass these to
- the application layer.
-</rule>
- <doc name="grammar">
- tx = C:SELECT S:SELECT-OK
- / C:COMMIT S:COMMIT-OK
- / C:ROLLBACK S:ROLLBACK-OK
-</doc>
- <chassis name="server" implement="SHOULD"/>
- <chassis name="client" implement="MAY"/>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="select" synchronous="1" index="10">
-select standard transaction mode
- <doc>
- This method sets the channel to use standard transactions. The
- client must use this method at least once on a channel before
- using the Commit or Rollback methods.
- </doc>
- <chassis name="server" implement="MUST"/>
- <response name="select-ok"/>
- </method>
- <method name="select-ok" synchronous="1" index="11">
-confirm transaction mode
- <doc>
- This method confirms to the client that the channel was successfully
- set to use standard transactions.
- </doc>
- <chassis name="client" implement="MUST"/>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="commit" synchronous="1" index="20">
-commit the current transaction
- <doc>
- This method commits all messages published and acknowledged in
- the current transaction. A new transaction starts immediately
- after a commit.
- </doc>
- <chassis name="server" implement="MUST"/>
- <response name="commit-ok"/>
- </method>
- <method name="commit-ok" synchronous="1" index="21">
-confirm a successful commit
- <doc>
- This method confirms to the client that the commit succeeded.
- Note that if a commit fails, the server raises a channel exception.
- </doc>
- <chassis name="client" implement="MUST"/>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="rollback" synchronous="1" index="30">
-abandon the current transaction
- <doc>
- This method abandons all messages published and acknowledged in
- the current transaction. A new transaction starts immediately
- after a rollback.
- </doc>
- <chassis name="server" implement="MUST"/>
- <response name="rollback-ok"/>
- </method>
- <method name="rollback-ok" synchronous="1" index="31">
-confirm a successful rollback
- <doc>
- This method confirms to the client that the rollback succeeded.
- Note that if an rollback fails, the server raises a channel exception.
- </doc>
- <chassis name="client" implement="MUST"/>
- </method>
- </class>
- <class name="dtx" handler="channel" index="100">
- <!--
-======================================================
-== DISTRIBUTED TRANSACTIONS
-======================================================
--->
- work with distributed transactions
-
-<doc>
- Distributed transactions provide so-called "2-phase commit". The
- AMQP distributed transaction model supports the X-Open XA
- architecture and other distributed transaction implementations.
- The Dtx class assumes that the server has a private communications
- channel (not AMQP) to a distributed transaction coordinator.
-</doc>
- <doc name="grammar">
- dtx = C:SELECT S:SELECT-OK
- C:START S:START-OK
-</doc>
- <chassis name="server" implement="MAY"/>
- <chassis name="client" implement="MAY"/>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="select" synchronous="1" index="10">
-select standard transaction mode
- <doc>
- This method sets the channel to use distributed transactions. The
- client must use this method at least once on a channel before
- using the Start method.
- </doc>
- <chassis name="server" implement="MUST"/>
- <response name="select-ok"/>
- </method>
- <method name="select-ok" synchronous="1" index="11">
-confirm transaction mode
- <doc>
- This method confirms to the client that the channel was successfully
- set to use distributed transactions.
- </doc>
- <chassis name="client" implement="MUST"/>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="start" synchronous="1" index="20">
- start a new distributed transaction
- <doc>
- This method starts a new distributed transaction. This must be
- the first method on a new channel that uses the distributed
- transaction mode, before any methods that publish or consume
- messages.
- </doc>
- <chassis name="server" implement="MAY"/>
- <response name="start-ok"/>
- <field name="dtx identifier" type="shortstr">
- transaction identifier
- <doc>
- The distributed transaction key. This identifies the transaction
- so that the AMQP server can coordinate with the distributed
- transaction coordinator.
- </doc>
- <assert check="notnull"/>
- </field>
- </method>
- <method name="start-ok" synchronous="1" index="21">
- confirm the start of a new distributed transaction
- <doc>
- This method confirms to the client that the transaction started.
- Note that if a start fails, the server raises a channel exception.
- </doc>
- <chassis name="client" implement="MUST"/>
- </method>
- </class>
- <class name="tunnel" handler="tunnel" index="110">
- <!--
-======================================================
-== TUNNEL
-======================================================
--->
- methods for protocol tunneling.
-
-<doc>
- The tunnel methods are used to send blocks of binary data - which
- can be serialised AMQP methods or other protocol frames - between
- AMQP peers.
-</doc>
- <doc name="grammar">
- tunnel = C:REQUEST
- / S:REQUEST
-</doc>
- <chassis name="server" implement="MAY"/>
- <chassis name="client" implement="MAY"/>
- <field name="headers" type="table">
- Message header field table
-</field>
- <field name="proxy name" type="shortstr">
- The identity of the tunnelling proxy
-</field>
- <field name="data name" type="shortstr">
- The name or type of the message being tunnelled
-</field>
- <field name="durable" type="octet">
- The message durability indicator
-</field>
- <field name="broadcast" type="octet">
- The message broadcast mode
-</field>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="request" content="1" index="10">
- sends a tunnelled method
- <doc>
- This method tunnels a block of binary data, which can be an
- encoded AMQP method or other data. The binary data is sent
- as the content for the Tunnel.Request method.
- </doc>
- <chassis name="server" implement="MUST"/>
- <field name="meta data" type="table">
- meta data for the tunnelled block
- <doc>
- This field table holds arbitrary meta-data that the sender needs
- to pass to the recipient.
- </doc>
- </field>
- </method>
- </class>
- <class name="test" handler="channel" index="120">
- <!--
-======================================================
-== TEST - CHECK FUNCTIONAL CAPABILITIES OF AN IMPLEMENTATION
-======================================================
--->
- test functional primitives of the implementation
-
-<doc>
- The test class provides methods for a peer to test the basic
- operational correctness of another peer. The test methods are
- intended to ensure that all peers respect at least the basic
- elements of the protocol, such as frame and content organisation
- and field types. We assume that a specially-designed peer, a
- "monitor client" would perform such tests.
-</doc>
- <doc name="grammar">
- test = C:INTEGER S:INTEGER-OK
- / S:INTEGER C:INTEGER-OK
- / C:STRING S:STRING-OK
- / S:STRING C:STRING-OK
- / C:TABLE S:TABLE-OK
- / S:TABLE C:TABLE-OK
- / C:CONTENT S:CONTENT-OK
- / S:CONTENT C:CONTENT-OK
-</doc>
- <chassis name="server" implement="MUST"/>
- <chassis name="client" implement="SHOULD"/>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="integer" synchronous="1" index="10">
- test integer handling
- <doc>
- This method tests the peer's capability to correctly marshal integer
- data.
- </doc>
- <chassis name="client" implement="MUST"/>
- <chassis name="server" implement="MUST"/>
- <response name="integer-ok"/>
- <field name="integer 1" type="octet">
- octet test value
- <doc>
- An octet integer test value.
- </doc>
- </field>
- <field name="integer 2" type="short">
- short test value
- <doc>
- A short integer test value.
- </doc>
- </field>
- <field name="integer 3" type="long">
- long test value
- <doc>
- A long integer test value.
- </doc>
- </field>
- <field name="integer 4" type="longlong">
- long-long test value
- <doc>
- A long long integer test value.
- </doc>
- </field>
- <field name="operation" type="octet">
- operation to test
- <doc>
- The client must execute this operation on the provided integer
- test fields and return the result.
- </doc>
- <assert check="enum">
- <value name="add">return sum of test values</value>
- <value name="min">return lowest of test values</value>
- <value name="max">return highest of test values</value>
- </assert>
- </field>
- </method>
- <method name="integer-ok" synchronous="1" index="11">
- report integer test result
- <doc>
- This method reports the result of an Integer method.
- </doc>
- <chassis name="client" implement="MUST"/>
- <chassis name="server" implement="MUST"/>
- <field name="result" type="longlong">
- result value
- <doc>
- The result of the tested operation.
- </doc>
- </field>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="string" synchronous="1" index="20">
- test string handling
- <doc>
- This method tests the peer's capability to correctly marshal string
- data.
- </doc>
- <chassis name="client" implement="MUST"/>
- <chassis name="server" implement="MUST"/>
- <response name="string-ok"/>
- <field name="string 1" type="shortstr">
- short string test value
- <doc>
- An short string test value.
- </doc>
- </field>
- <field name="string 2" type="longstr">
- long string test value
- <doc>
- A long string test value.
- </doc>
- </field>
- <field name="operation" type="octet">
- operation to test
- <doc>
- The client must execute this operation on the provided string
- test fields and return the result.
- </doc>
- <assert check="enum">
- <value name="add">return concatentation of test strings</value>
- <value name="min">return shortest of test strings</value>
- <value name="max">return longest of test strings</value>
- </assert>
- </field>
- </method>
- <method name="string-ok" synchronous="1" index="21">
- report string test result
- <doc>
- This method reports the result of a String method.
- </doc>
- <chassis name="client" implement="MUST"/>
- <chassis name="server" implement="MUST"/>
- <field name="result" type="longstr">
- result value
- <doc>
- The result of the tested operation.
- </doc>
- </field>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="table" synchronous="1" index="30">
- test field table handling
- <doc>
- This method tests the peer's capability to correctly marshal field
- table data.
- </doc>
- <chassis name="client" implement="MUST"/>
- <chassis name="server" implement="MUST"/>
- <response name="table-ok"/>
- <field name="table" type="table">
- field table of test values
- <doc>
- A field table of test values.
- </doc>
- </field>
- <field name="integer op" type="octet">
- operation to test on integers
- <doc>
- The client must execute this operation on the provided field
- table integer values and return the result.
- </doc>
- <assert check="enum">
- <value name="add">return sum of numeric field values</value>
- <value name="min">return min of numeric field values</value>
- <value name="max">return max of numeric field values</value>
- </assert>
- </field>
- <field name="string op" type="octet">
- operation to test on strings
- <doc>
- The client must execute this operation on the provided field
- table string values and return the result.
- </doc>
- <assert check="enum">
- <value name="add">return concatenation of string field values</value>
- <value name="min">return shortest of string field values</value>
- <value name="max">return longest of string field values</value>
- </assert>
- </field>
- </method>
- <method name="table-ok" synchronous="1" index="31">
- report table test result
- <doc>
- This method reports the result of a Table method.
- </doc>
- <chassis name="client" implement="MUST"/>
- <chassis name="server" implement="MUST"/>
- <field name="integer result" type="longlong">
- integer result value
- <doc>
- The result of the tested integer operation.
- </doc>
- </field>
- <field name="string result" type="longstr">
- string result value
- <doc>
- The result of the tested string operation.
- </doc>
- </field>
- </method>
- <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
- <method name="content" synchronous="1" content="1" index="40">
- test content handling
- <doc>
- This method tests the peer's capability to correctly marshal content.
- </doc>
- <chassis name="client" implement="MUST"/>
- <chassis name="server" implement="MUST"/>
- <response name="content-ok"/>
- </method>
- <method name="content-ok" synchronous="1" content="1" index="41">
- report content test result
- <doc>
- This method reports the result of a Content method. It contains the
- content checksum and echoes the original content as provided.
- </doc>
- <chassis name="client" implement="MUST"/>
- <chassis name="server" implement="MUST"/>
- <field name="content checksum" type="long">
- content hash
- <doc>
- The 32-bit checksum of the content, calculated by adding the
- content into a 32-bit accumulator.
- </doc>
- </field>
- </method>
- </class>
-</amqp>
diff --git a/qpid/dotnet/Qpid.Common/build.xml b/qpid/dotnet/Qpid.Common/build.xml
deleted file mode 100644
index 96dd877722..0000000000
--- a/qpid/dotnet/Qpid.Common/build.xml
+++ /dev/null
@@ -1,95 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-
-<!--
- This sole purpose of this build script is to generate the framing layer for the .net client from the AMQ spec.
- -->
-<project name="AMQ Dot Net Framing Layer" default="generate">
-
- <property name="amq.home" value="../.."/>
-
- <property name="stylesheet" value="stylesheets/framing.xsl"/>
- <property name="registry_stylesheet" value="stylesheets/registry.xsl"/>
- <property name="registry_template" value="resources/registry.template"/>
- <property name="saxon.jar" value="lib/saxon/saxon8.jar"/>
- <property name="generated.src" value="generated"/>
- <property name="static.src" value="src"/>
- <property name="resources" value="resources"/>
- <property name="base.lib" value="lib"/>
-
- <path id="amq.home.path">
- <pathelement location="${amq.home}"/>
- </path>
-
- <pathconvert targetos="unix" property="amq.home.fixed" refid="amq.home.path"/>
-
-<!-- Some spec changes break the build, reverting to private copy in Qpid.Common temporarily till this is fixed. -->
- <property name="amq.asl" value="${amq.home.fixed}/specs/amqp.0-8.xml"/>
-
- <target name="clean" description="Deletes the generated sources.">
- <delete>
- <fileset dir="${generated.src}" includes="**/*"/>
- </delete>
- </target>
-
- <!--
- Checks if the generation step needs to be performed. It will be skipped if the sources are up to date with the spec and provided that the
- force flag has not been set.
- -->
- <target name="check-generate"
- description="Checks if the generated sources are up-to-date. Use -Dforce=true or the 'forcegen' target to force generation.">
-
- <condition property="generateNotRequired">
- <and>
- <uptodate targetfile="${generated.src}/results.out" srcfile="${amq.asl}"/>
- <not><isset property="force"/></not>
- </and>
- </condition>
- </target>
-
- <!-- Applies a transformation to the AMQP spec to generate the framing layer. -->
- <target name="generate" depends="check-generate" unless="generateNotRequired" description="generates code">
-
- <mkdir dir="${generated.src}"/>
-
- <java jar="${saxon.jar}" fork="true">
- <arg value="-o"/>
- <arg value="${generated.src}/results.out"/>
- <arg value="${amq.asl}"/>
- <arg value="${stylesheet}"/>
- <arg value="asl_base=${asl.base}"/>
- <arg value="registry_name=MainRegistry"/>
- </java>
-
- <java jar="${saxon.jar}" fork="true">
- <arg value="-o"/>
- <arg value="${generated.src}/registry.out"/>
- <arg value="${registry_template}"/>
- <arg value="${registry_stylesheet}"/>
- </java>
- </target>
-
- <!-- Does a clean and forces re-generation of the sources. -->
- <target name="forcegen" depends="clean, generate" description="Forces clean re-generation of the code.">
- </target>
-
-</project>
diff --git a/qpid/dotnet/Qpid.Common/default.build b/qpid/dotnet/Qpid.Common/default.build
deleted file mode 100644
index df07397d0b..0000000000
--- a/qpid/dotnet/Qpid.Common/default.build
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Apache.Qpid.Common" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="library"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.dll">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/Apache.Qpid.Buffer.dll" />
- <include name="${build.dir}/Apache.Qpid.Messaging.dll" />
- <include name="${build.dir}/Apache.Qpid.Codec.dll" />
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/Qpid.Common/lib/log4net/log4net-licence.txt b/qpid/dotnet/Qpid.Common/lib/log4net/log4net-licence.txt
deleted file mode 100644
index 261eeb9e9f..0000000000
--- a/qpid/dotnet/Qpid.Common/lib/log4net/log4net-licence.txt
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/qpid/dotnet/Qpid.Common/lib/log4net/log4net.dll b/qpid/dotnet/Qpid.Common/lib/log4net/log4net.dll
deleted file mode 100644
index 995816f27b..0000000000
--- a/qpid/dotnet/Qpid.Common/lib/log4net/log4net.dll
+++ /dev/null
Binary files differ
diff --git a/qpid/dotnet/Qpid.Common/lib/log4net/log4net.xml b/qpid/dotnet/Qpid.Common/lib/log4net/log4net.xml
deleted file mode 100644
index 5beb669ab0..0000000000
--- a/qpid/dotnet/Qpid.Common/lib/log4net/log4net.xml
+++ /dev/null
@@ -1,28676 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<doc>
- <assembly>
- <name>log4net</name>
- </assembly>
- <members>
- <member name="T:log4net.Appender.AdoNetAppender">
- <summary>
- Appender that logs to a database.
- </summary>
- <remarks>
- <para>
- <see cref="T:log4net.Appender.AdoNetAppender"/> appends logging events to a table within a
- database. The appender can be configured to specify the connection
- string by setting the <see cref="P:log4net.Appender.AdoNetAppender.ConnectionString"/> property.
- The connection type (provider) can be specified by setting the <see cref="P:log4net.Appender.AdoNetAppender.ConnectionType"/>
- property. For more information on database connection strings for
- your specific database see <a href="http://www.connectionstrings.com/">http://www.connectionstrings.com/</a>.
- </para>
- <para>
- Records are written into the database either using a prepared
- statement or a stored procedure. The <see cref="P:log4net.Appender.AdoNetAppender.CommandType"/> property
- is set to <see cref="F:System.Data.CommandType.Text"/> (<c>System.Data.CommandType.Text</c>) to specify a prepared statement
- or to <see cref="F:System.Data.CommandType.StoredProcedure"/> (<c>System.Data.CommandType.StoredProcedure</c>) to specify a stored
- procedure.
- </para>
- <para>
- The prepared statement text or the name of the stored procedure
- must be set in the <see cref="P:log4net.Appender.AdoNetAppender.CommandText"/> property.
- </para>
- <para>
- The prepared statement or stored procedure can take a number
- of parameters. Parameters are added using the <see cref="M:log4net.Appender.AdoNetAppender.AddParameter(log4net.Appender.AdoNetAppenderParameter)"/>
- method. This adds a single <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> to the
- ordered list of parameters. The <see cref="T:log4net.Appender.AdoNetAppenderParameter"/>
- type may be subclassed if required to provide database specific
- functionality. The <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> specifies
- the parameter name, database type, size, and how the value should
- be generated using a <see cref="T:log4net.Layout.ILayout"/>.
- </para>
- </remarks>
- <example>
- An example of a SQL Server table that could be logged to:
- <code lang="SQL">
- CREATE TABLE [dbo].[Log] (
- [ID] [int] IDENTITY (1, 1) NOT NULL ,
- [Date] [datetime] NOT NULL ,
- [Thread] [varchar] (255) NOT NULL ,
- [Level] [varchar] (20) NOT NULL ,
- [Logger] [varchar] (255) NOT NULL ,
- [Message] [varchar] (4000) NOT NULL
- ) ON [PRIMARY]
- </code>
- </example>
- <example>
- An example configuration to log to the above table:
- <code lang="XML" escaped="true">
- <appender name="AdoNetAppender_SqlServer" type="log4net.Appender.AdoNetAppender">
- <connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
- <connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;User ID=sa;Password=sa"/>
- <commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message]) VALUES (@log_date, @thread, @log_level, @logger, @message)"/>
- <parameter>
- <parameterName value="@log_date"/>
- <dbType value="DateTime"/>
- <layout type="log4net.Layout.PatternLayout" value="%date{yyyy'-'MM'-'dd HH':'mm':'ss'.'fff}"/>
- </parameter>
- <parameter>
- <parameterName value="@thread"/>
- <dbType value="String"/>
- <size value="255"/>
- <layout type="log4net.Layout.PatternLayout" value="%thread"/>
- </parameter>
- <parameter>
- <parameterName value="@log_level"/>
- <dbType value="String"/>
- <size value="50"/>
- <layout type="log4net.Layout.PatternLayout" value="%level"/>
- </parameter>
- <parameter>
- <parameterName value="@logger"/>
- <dbType value="String"/>
- <size value="255"/>
- <layout type="log4net.Layout.PatternLayout" value="%logger"/>
- </parameter>
- <parameter>
- <parameterName value="@message"/>
- <dbType value="String"/>
- <size value="4000"/>
- <layout type="log4net.Layout.PatternLayout" value="%message"/>
- </parameter>
- </appender>
- </code>
- </example>
- <author>Julian Biddle</author>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Lance Nehring</author>
- </member>
- <member name="T:log4net.Appender.BufferingAppenderSkeleton">
- <summary>
- Abstract base class implementation of <see cref="T:log4net.Appender.IAppender"/> that
- buffers events in a fixed size buffer.
- </summary>
- <remarks>
- <para>
- This base class should be used by appenders that need to buffer a
- number of events before logging them. For example the <see cref="T:log4net.Appender.AdoNetAppender"/>
- buffers events and then submits the entire contents of the buffer to
- the underlying database in one go.
- </para>
- <para>
- Subclasses should override the <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>
- method to deliver the buffered events.
- </para>
- <para>The BufferingAppenderSkeleton maintains a fixed size cyclic
- buffer of events. The size of the buffer is set using
- the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> property.
- </para>
- <para>A <see cref="T:log4net.Core.ITriggeringEventEvaluator"/> is used to inspect
- each event as it arrives in the appender. If the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/>
- triggers, then the current buffer is sent immediately
- (see <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>). Otherwise the event
- is stored in the buffer. For example, an evaluator can be used to
- deliver the events immediately when an ERROR event arrives.
- </para>
- <para>
- The buffering appender can be configured in a <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> mode.
- By default the appender is NOT lossy. When the buffer is full all
- the buffered events are sent with <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>.
- If the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> property is set to <c>true</c> then the
- buffer will not be sent when it is full, and new events arriving
- in the appender will overwrite the oldest event in the buffer.
- In lossy mode the buffer will only be sent when the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/>
- triggers. This can be useful behavior when you need to know about
- ERROR events but not about events with a lower level, configure an
- evaluator that will trigger when an ERROR event arrives, the whole
- buffer will be sent which gives a history of events leading up to
- the ERROR event.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Appender.AppenderSkeleton">
- <summary>
- Abstract base class implementation of <see cref="T:log4net.Appender.IAppender"/>.
- </summary>
- <remarks>
- <para>
- This class provides the code for common functionality, such
- as support for threshold filtering and support for general filters.
- </para>
- <para>
- Appenders can also implement the <see cref="T:log4net.Core.IOptionHandler"/> interface. Therefore
- they would require that the <see cref="M:log4net.Core.IOptionHandler.ActivateOptions"/> method
- be called after the appenders properties have been configured.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Appender.IAppender">
- <summary>
- Implement this interface for your own strategies for printing log statements.
- </summary>
- <remarks>
- <para>
- Implementors should consider extending the <see cref="T:log4net.Appender.AppenderSkeleton"/>
- class which provides a default implementation of this interface.
- </para>
- <para>
- Appenders can also implement the <see cref="T:log4net.Core.IOptionHandler"/> interface. Therefore
- they would require that the <see cref="M:log4net.Core.IOptionHandler.ActivateOptions"/> method
- be called after the appenders properties have been configured.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.IAppender.Close">
- <summary>
- Closes the appender and releases resources.
- </summary>
- <remarks>
- <para>
- Releases any resources allocated within the appender such as file handles,
- network connections, etc.
- </para>
- <para>
- It is a programming error to append to a closed appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.IAppender.DoAppend(log4net.Core.LoggingEvent)">
- <summary>
- Log the logging event in Appender specific way.
- </summary>
- <param name="loggingEvent">The event to log</param>
- <remarks>
- <para>
- This method is called to log a message into this appender.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.IAppender.Name">
- <summary>
- Gets or sets the name of this appender.
- </summary>
- <value>The name of the appender.</value>
- <remarks>
- <para>The name uniquely identifies the appender.</para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.IBulkAppender">
- <summary>
- Interface for appenders that support bulk logging.
- </summary>
- <remarks>
- <para>
- This interface extends the <see cref="T:log4net.Appender.IAppender"/> interface to
- support bulk logging of <see cref="T:log4net.Core.LoggingEvent"/> objects. Appenders
- should only implement this interface if they can bulk log efficiently.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.IBulkAppender.DoAppend(log4net.Core.LoggingEvent[])">
- <summary>
- Log the array of logging events in Appender specific way.
- </summary>
- <param name="loggingEvents">The events to log</param>
- <remarks>
- <para>
- This method is called to log an array of events into this appender.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.IOptionHandler">
- <summary>
- Interface used to delay activate a configured object.
- </summary>
- <remarks>
- <para>
- This allows an object to defer activation of its options until all
- options have been set. This is required for components which have
- related options that remain ambiguous until all are set.
- </para>
- <para>
- If a component implements this interface then the <see cref="M:log4net.Core.IOptionHandler.ActivateOptions"/> method
- must be called by the container after its all the configured properties have been set
- and before the component can be used.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Core.IOptionHandler.ActivateOptions">
- <summary>
- Activate the options that were previously set with calls to properties.
- </summary>
- <remarks>
- <para>
- This allows an object to defer activation of its options until all
- options have been set. This is required for components which have
- related options that remain ambiguous until all are set.
- </para>
- <para>
- If a component implements this interface then this method must be called
- after its properties have been set before the component can be used.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.c_renderBufferSize">
- <summary>
- Initial buffer size
- </summary>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.c_renderBufferMaxCapacity">
- <summary>
- Maximum buffer size before it is recycled
- </summary>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>Empty default constructor</para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.Finalize">
- <summary>
- Finalizes this appender by calling the implementation's
- <see cref="M:log4net.Appender.AppenderSkeleton.Close"/> method.
- </summary>
- <remarks>
- <para>
- If this appender has not been closed then the <c>Finalize</c> method
- will call <see cref="M:log4net.Appender.AppenderSkeleton.Close"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.ActivateOptions">
- <summary>
- Initialize the appender based on the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.AppenderSkeleton.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.AppenderSkeleton.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.AppenderSkeleton.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.Close">
- <summary>
- Closes the appender and release resources.
- </summary>
- <remarks>
- <para>
- Release any resources allocated within the appender such as file handles,
- network connections, etc.
- </para>
- <para>
- It is a programming error to append to a closed appender.
- </para>
- <para>
- This method cannot be overridden by subclasses. This method
- delegates the closing of the appender to the <see cref="M:log4net.Appender.AppenderSkeleton.OnClose"/>
- method which must be overridden in the subclass.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)">
- <summary>
- Performs threshold checks and invokes filters before
- delegating actual logging to the subclasses specific
- <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- This method cannot be overridden by derived classes. A
- derived class should override the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method
- which is called by this method.
- </para>
- <para>
- The implementation of this method is as follows:
- </para>
- <para>
- <list type="bullet">
- <item>
- <description>
- Checks that the severity of the <paramref name="loggingEvent"/>
- is greater than or equal to the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> of this
- appender.</description>
- </item>
- <item>
- <description>
- Checks that the <see cref="T:log4net.Filter.IFilter"/> chain accepts the
- <paramref name="loggingEvent"/>.
- </description>
- </item>
- <item>
- <description>
- Calls <see cref="M:log4net.Appender.AppenderSkeleton.PreAppendCheck"/> and checks that
- it returns <c>true</c>.</description>
- </item>
- </list>
- </para>
- <para>
- If all of the above steps succeed then the <paramref name="loggingEvent"/>
- will be passed to the abstract <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent[])">
- <summary>
- Performs threshold checks and invokes filters before
- delegating actual logging to the subclasses specific
- <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent[])"/> method.
- </summary>
- <param name="loggingEvents">The array of events to log.</param>
- <remarks>
- <para>
- This method cannot be overridden by derived classes. A
- derived class should override the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent[])"/> method
- which is called by this method.
- </para>
- <para>
- The implementation of this method is as follows:
- </para>
- <para>
- <list type="bullet">
- <item>
- <description>
- Checks that the severity of the <paramref name="loggingEvent"/>
- is greater than or equal to the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> of this
- appender.</description>
- </item>
- <item>
- <description>
- Checks that the <see cref="T:log4net.Filter.IFilter"/> chain accepts the
- <paramref name="loggingEvent"/>.
- </description>
- </item>
- <item>
- <description>
- Calls <see cref="M:log4net.Appender.AppenderSkeleton.PreAppendCheck"/> and checks that
- it returns <c>true</c>.</description>
- </item>
- </list>
- </para>
- <para>
- If all of the above steps succeed then the <paramref name="loggingEvents"/>
- will be passed to the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent[])"/> method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.FilterEvent(log4net.Core.LoggingEvent)">
- <summary>
- Test if the logging event should we output by this appender
- </summary>
- <param name="loggingEvent">the event to test</param>
- <returns><c>true</c> if the event should be output, <c>false</c> if the event should be ignored</returns>
- <remarks>
- <para>
- This method checks the logging event against the threshold level set
- on this appender and also against the filters specified on this
- appender.
- </para>
- <para>
- The implementation of this method is as follows:
- </para>
- <para>
- <list type="bullet">
- <item>
- <description>
- Checks that the severity of the <paramref name="loggingEvent"/>
- is greater than or equal to the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> of this
- appender.</description>
- </item>
- <item>
- <description>
- Checks that the <see cref="T:log4net.Filter.IFilter"/> chain accepts the
- <paramref name="loggingEvent"/>.
- </description>
- </item>
- </list>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.AddFilter(log4net.Filter.IFilter)">
- <summary>
- Adds a filter to the end of the filter chain.
- </summary>
- <param name="filter">the filter to add to this appender</param>
- <remarks>
- <para>
- The Filters are organized in a linked list.
- </para>
- <para>
- Setting this property causes the new filter to be pushed onto the
- back of the filter chain.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.ClearFilters">
- <summary>
- Clears the filter list for this appender.
- </summary>
- <remarks>
- <para>
- Clears the filter list for this appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.IsAsSevereAsThreshold(log4net.Core.Level)">
- <summary>
- Checks if the message level is below this appender's threshold.
- </summary>
- <param name="level"><see cref="T:log4net.Core.Level"/> to test against.</param>
- <remarks>
- <para>
- If there is no threshold set, then the return value is always <c>true</c>.
- </para>
- </remarks>
- <returns>
- <c>true</c> if the <paramref name="level"/> meets the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/>
- requirements of this appender.
- </returns>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.OnClose">
- <summary>
- Is called when the appender is closed. Derived classes should override
- this method if resources need to be released.
- </summary>
- <remarks>
- <para>
- Releases any resources allocated within the appender such as file handles,
- network connections, etc.
- </para>
- <para>
- It is a programming error to append to a closed appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)">
- <summary>
- Subclasses of <see cref="T:log4net.Appender.AppenderSkeleton"/> should implement this method
- to perform actual logging.
- </summary>
- <param name="loggingEvent">The event to append.</param>
- <remarks>
- <para>
- A subclass must implement this method to perform
- logging of the <paramref name="loggingEvent"/>.
- </para>
- <para>This method will be called by <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/>
- if all the conditions listed for that method are met.
- </para>
- <para>
- To restrict the logging of events in the appender
- override the <see cref="M:log4net.Appender.AppenderSkeleton.PreAppendCheck"/> method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent[])">
- <summary>
- Append a bulk array of logging events.
- </summary>
- <param name="loggingEvents">the array of logging events</param>
- <remarks>
- <para>
- This base class implementation calls the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/>
- method for each element in the bulk array.
- </para>
- <para>
- A sub class that can better process a bulk array of events should
- override this method in addition to <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.PreAppendCheck">
- <summary>
- Called before <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> as a precondition.
- </summary>
- <remarks>
- <para>
- This method is called by <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/>
- before the call to the abstract <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method.
- </para>
- <para>
- This method can be overridden in a subclass to extend the checks
- made before the event is passed to the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method.
- </para>
- <para>
- A subclass should ensure that they delegate this call to
- this base class if it is overridden.
- </para>
- </remarks>
- <returns><c>true</c> if the call to <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> should proceed.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(log4net.Core.LoggingEvent)">
- <summary>
- Renders the <see cref="T:log4net.Core.LoggingEvent"/> to a string.
- </summary>
- <param name="loggingEvent">The event to render.</param>
- <returns>The event rendered as a string.</returns>
- <remarks>
- <para>
- Helper method to render a <see cref="T:log4net.Core.LoggingEvent"/> to
- a string. This appender must have a <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/>
- set to render the <paramref name="loggingEvent"/> to
- a string.
- </para>
- <para>If there is exception data in the logging event and
- the layout does not process the exception, this method
- will append the exception text to the rendered string.
- </para>
- <para>
- Where possible use the alternative version of this method
- <see cref="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(System.IO.TextWriter,log4net.Core.LoggingEvent)"/>.
- That method streams the rendering onto an existing Writer
- which can give better performance if the caller already has
- a <see cref="T:System.IO.TextWriter"/> open and ready for writing.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Renders the <see cref="T:log4net.Core.LoggingEvent"/> to a string.
- </summary>
- <param name="loggingEvent">The event to render.</param>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <remarks>
- <para>
- Helper method to render a <see cref="T:log4net.Core.LoggingEvent"/> to
- a string. This appender must have a <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/>
- set to render the <paramref name="loggingEvent"/> to
- a string.
- </para>
- <para>If there is exception data in the logging event and
- the layout does not process the exception, this method
- will append the exception text to the rendered string.
- </para>
- <para>
- Use this method in preference to <see cref="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(log4net.Core.LoggingEvent)"/>
- where possible. If, however, the caller needs to render the event
- to a string then <see cref="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(log4net.Core.LoggingEvent)"/> does
- provide an efficient mechanism for doing so.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_layout">
- <summary>
- The layout of this appender.
- </summary>
- <remarks>
- See <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/> for more information.
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_name">
- <summary>
- The name of this appender.
- </summary>
- <remarks>
- See <see cref="P:log4net.Appender.AppenderSkeleton.Name"/> for more information.
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_threshold">
- <summary>
- The level threshold of this appender.
- </summary>
- <remarks>
- <para>
- There is no level threshold filtering by default.
- </para>
- <para>
- See <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_errorHandler">
- <summary>
- It is assumed and enforced that errorHandler is never null.
- </summary>
- <remarks>
- <para>
- It is assumed and enforced that errorHandler is never null.
- </para>
- <para>
- See <see cref="P:log4net.Appender.AppenderSkeleton.ErrorHandler"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_headFilter">
- <summary>
- The first filter in the filter chain.
- </summary>
- <remarks>
- <para>
- Set to <c>null</c> initially.
- </para>
- <para>
- See <see cref="T:log4net.Filter.IFilter"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_tailFilter">
- <summary>
- The last filter in the filter chain.
- </summary>
- <remarks>
- See <see cref="T:log4net.Filter.IFilter"/> for more information.
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_closed">
- <summary>
- Flag indicating if this appender is closed.
- </summary>
- <remarks>
- See <see cref="M:log4net.Appender.AppenderSkeleton.Close"/> for more information.
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_recursiveGuard">
- <summary>
- The guard prevents an appender from repeatedly calling its own DoAppend method
- </summary>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_renderWriter">
- <summary>
- StringWriter used to render events
- </summary>
- </member>
- <member name="P:log4net.Appender.AppenderSkeleton.Threshold">
- <summary>
- Gets or sets the threshold <see cref="T:log4net.Core.Level"/> of this appender.
- </summary>
- <value>
- The threshold <see cref="T:log4net.Core.Level"/> of the appender.
- </value>
- <remarks>
- <para>
- All log events with lower level than the threshold level are ignored
- by the appender.
- </para>
- <para>
- In configuration files this option is specified by setting the
- value of the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> option to a level
- string, such as "DEBUG", "INFO" and so on.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AppenderSkeleton.ErrorHandler">
- <summary>
- Gets or sets the <see cref="T:log4net.Core.IErrorHandler"/> for this appender.
- </summary>
- <value>The <see cref="T:log4net.Core.IErrorHandler"/> of the appender</value>
- <remarks>
- <para>
- The <see cref="T:log4net.Appender.AppenderSkeleton"/> provides a default
- implementation for the <see cref="P:log4net.Appender.AppenderSkeleton.ErrorHandler"/> property.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AppenderSkeleton.FilterHead">
- <summary>
- The filter chain.
- </summary>
- <value>The head of the filter chain filter chain.</value>
- <remarks>
- <para>
- Returns the head Filter. The Filters are organized in a linked list
- and so all Filters on this Appender are available through the result.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AppenderSkeleton.Layout">
- <summary>
- Gets or sets the <see cref="T:log4net.Layout.ILayout"/> for this appender.
- </summary>
- <value>The layout of the appender.</value>
- <remarks>
- <para>
- See <see cref="P:log4net.Appender.AppenderSkeleton.RequiresLayout"/> for more information.
- </para>
- </remarks>
- <seealso cref="P:log4net.Appender.AppenderSkeleton.RequiresLayout"/>
- </member>
- <member name="P:log4net.Appender.AppenderSkeleton.Name">
- <summary>
- Gets or sets the name of this appender.
- </summary>
- <value>The name of the appender.</value>
- <remarks>
- <para>
- The name uniquely identifies the appender.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AppenderSkeleton.RequiresLayout">
- <summary>
- Tests if this appender requires a <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/> to be set.
- </summary>
- <remarks>
- <para>
- In the rather exceptional case, where the appender
- implementation admits a layout but can also work without it,
- then the appender should return <c>true</c>.
- </para>
- <para>
- This default implementation always returns <c>true</c>.
- </para>
- </remarks>
- <returns>
- <c>true</c> if the appender requires a layout object, otherwise <c>false</c>.
- </returns>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.DEFAULT_BUFFER_SIZE">
- <summary>
- The default buffer size.
- </summary>
- <remarks>
- The default size of the cyclic buffer used to store events.
- This is set to 512 by default.
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.BufferingAppenderSkeleton"/> class.
- </summary>
- <remarks>
- <para>
- Protected default constructor to allow subclassing.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.#ctor(System.Boolean)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.BufferingAppenderSkeleton"/> class.
- </summary>
- <param name="eventMustBeFixed">the events passed through this appender must be
- fixed by the time that they arrive in the derived class' <c>SendBuffer</c> method.</param>
- <remarks>
- <para>
- Protected constructor to allow subclassing.
- </para>
- <para>
- The <paramref name="eventMustBeFixed"/> should be set if the subclass
- expects the events delivered to be fixed even if the
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> is set to zero, i.e. when no buffering occurs.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.Flush">
- <summary>
- Flush the currently buffered events
- </summary>
- <remarks>
- <para>
- Flushes any events that have been buffered.
- </para>
- <para>
- If the appender is buffering in <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> mode then the contents
- of the buffer will NOT be flushed to the appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.Flush(System.Boolean)">
- <summary>
- Flush the currently buffered events
- </summary>
- <param name="flushLossyBuffer">set to <c>true</c> to flush the buffer of lossy events</param>
- <remarks>
- <para>
- Flushes events that have been buffered. If <paramref name="flushLossyBuffer"/> is
- <c>false</c> then events will only be flushed if this buffer is non-lossy mode.
- </para>
- <para>
- If the appender is buffering in <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> mode then the contents
- of the buffer will only be flushed if <paramref name="flushLossyBuffer"/> is <c>true</c>.
- In this case the contents of the buffer will be tested against the
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.LossyEvaluator"/> and if triggering will be output. All other buffered
- events will be discarded.
- </para>
- <para>
- If <paramref name="flushLossyBuffer"/> is <c>true</c> then the buffer will always
- be emptied by calling this method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.ActivateOptions">
- <summary>
- Initialize the appender based on the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.BufferingAppenderSkeleton.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.BufferingAppenderSkeleton.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.BufferingAppenderSkeleton.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.OnClose">
- <summary>
- Close this appender instance.
- </summary>
- <remarks>
- <para>
- Close this appender instance. If this appender is marked
- as not <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> then the remaining events in
- the buffer must be sent when the appender is closed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">the event to log</param>
- <remarks>
- <para>
- Stores the <paramref name="loggingEvent"/> in the cyclic buffer.
- </para>
- <para>
- The buffer will be sent (i.e. passed to the <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>
- method) if one of the following conditions is met:
- </para>
- <list type="bullet">
- <item>
- <description>The cyclic buffer is full and this appender is
- marked as not lossy (see <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/>)</description>
- </item>
- <item>
- <description>An <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> is set and
- it is triggered for the <paramref name="loggingEvent"/>
- specified.</description>
- </item>
- </list>
- <para>
- Before the event is stored in the buffer it is fixed
- (see <see cref="M:log4net.Core.LoggingEvent.FixVolatileData(log4net.Core.FixFlags)"/>) to ensure that
- any data referenced by the event will be valid when the buffer
- is processed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.SendFromBuffer(log4net.Core.LoggingEvent,log4net.Util.CyclicBuffer)">
- <summary>
- Sends the contents of the buffer.
- </summary>
- <param name="firstLoggingEvent">The first logging event.</param>
- <param name="buffer">The buffer containing the events that need to be send.</param>
- <remarks>
- <para>
- The subclass must override <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])">
- <summary>
- Sends the events.
- </summary>
- <param name="events">The events that need to be send.</param>
- <remarks>
- <para>
- The subclass must override this method to process the buffered events.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_bufferSize">
- <summary>
- The size of the cyclic buffer used to hold the logging events.
- </summary>
- <remarks>
- Set to <see cref="F:log4net.Appender.BufferingAppenderSkeleton.DEFAULT_BUFFER_SIZE"/> by default.
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_cb">
- <summary>
- The cyclic buffer used to store the logging events.
- </summary>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_evaluator">
- <summary>
- The triggering event evaluator that causes the buffer to be sent immediately.
- </summary>
- <remarks>
- The object that is used to determine if an event causes the entire
- buffer to be sent immediately. This field can be <c>null</c>, which
- indicates that event triggering is not to be done. The evaluator
- can be set using the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> property. If this appender
- has the <see cref="F:log4net.Appender.BufferingAppenderSkeleton.m_lossy"/> (<see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> property) set to
- <c>true</c> then an <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> must be set.
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_lossy">
- <summary>
- Indicates if the appender should overwrite events in the cyclic buffer
- when it becomes full, or if the buffer should be flushed when the
- buffer is full.
- </summary>
- <remarks>
- If this field is set to <c>true</c> then an <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> must
- be set.
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_lossyEvaluator">
- <summary>
- The triggering event evaluator filters discarded events.
- </summary>
- <remarks>
- The object that is used to determine if an event that is discarded should
- really be discarded or if it should be sent to the appenders.
- This field can be <c>null</c>, which indicates that all discarded events will
- be discarded.
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_fixFlags">
- <summary>
- Value indicating which fields in the event should be fixed
- </summary>
- <remarks>
- By default all fields are fixed
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_eventMustBeFixed">
- <summary>
- The events delivered to the subclass must be fixed.
- </summary>
- </member>
- <member name="P:log4net.Appender.BufferingAppenderSkeleton.Lossy">
- <summary>
- Gets or sets a value that indicates whether the appender is lossy.
- </summary>
- <value>
- <c>true</c> if the appender is lossy, otherwise <c>false</c>. The default is <c>false</c>.
- </value>
- <remarks>
- <para>
- This appender uses a buffer to store logging events before
- delivering them. A triggering event causes the whole buffer
- to be send to the remote sink. If the buffer overruns before
- a triggering event then logging events could be lost. Set
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> to <c>false</c> to prevent logging events
- from being lost.
- </para>
- <para>If <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> is set to <c>true</c> then an
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> must be specified.</para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize">
- <summary>
- Gets or sets the size of the cyclic buffer used to hold the
- logging events.
- </summary>
- <value>
- The size of the cyclic buffer used to hold the logging events.
- </value>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> option takes a positive integer
- representing the maximum number of logging events to collect in
- a cyclic buffer. When the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> is reached,
- oldest events are deleted as new events are added to the
- buffer. By default the size of the cyclic buffer is 512 events.
- </para>
- <para>
- If the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> is set to a value less than
- or equal to 1 then no buffering will occur. The logging event
- will be delivered synchronously (depending on the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/>
- and <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> properties). Otherwise the event will
- be buffered.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator">
- <summary>
- Gets or sets the <see cref="T:log4net.Core.ITriggeringEventEvaluator"/> that causes the
- buffer to be sent immediately.
- </summary>
- <value>
- The <see cref="T:log4net.Core.ITriggeringEventEvaluator"/> that causes the buffer to be
- sent immediately.
- </value>
- <remarks>
- <para>
- The evaluator will be called for each event that is appended to this
- appender. If the evaluator triggers then the current buffer will
- immediately be sent (see <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>).
- </para>
- <para>If <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> is set to <c>true</c> then an
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> must be specified.</para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.BufferingAppenderSkeleton.LossyEvaluator">
- <summary>
- Gets or sets the value of the <see cref="T:log4net.Core.ITriggeringEventEvaluator"/> to use.
- </summary>
- <value>
- The value of the <see cref="T:log4net.Core.ITriggeringEventEvaluator"/> to use.
- </value>
- <remarks>
- <para>
- The evaluator will be called for each event that is discarded from this
- appender. If the evaluator triggers then the current buffer will immediately
- be sent (see <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.BufferingAppenderSkeleton.OnlyFixPartialEventData">
- <summary>
- Gets or sets a value indicating if only part of the logging event data
- should be fixed.
- </summary>
- <value>
- <c>true</c> if the appender should only fix part of the logging event
- data, otherwise <c>false</c>. The default is <c>false</c>.
- </value>
- <remarks>
- <para>
- Setting this property to <c>true</c> will cause only part of the
- event data to be fixed and serialized. This will improve performance.
- </para>
- <para>
- See <see cref="M:log4net.Core.LoggingEvent.FixVolatileData(log4net.Core.FixFlags)"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.BufferingAppenderSkeleton.Fix">
- <summary>
- Gets or sets a the fields that will be fixed in the event
- </summary>
- <value>
- The event fields that will be fixed before the event is buffered
- </value>
- <remarks>
- <para>
- The logging event needs to have certain thread specific values
- captured before it can be buffered. See <see cref="P:log4net.Core.LoggingEvent.Fix"/>
- for details.
- </para>
- </remarks>
- <seealso cref="P:log4net.Core.LoggingEvent.Fix"/>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.AdoNetAppender"/> class.
- </summary>
- <remarks>
- Public default constructor to initialize a new instance of this class.
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.AdoNetAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.AdoNetAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.AdoNetAppender.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.OnClose">
- <summary>
- Override the parent method to close the database
- </summary>
- <remarks>
- <para>
- Closes the database command and database connection.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.SendBuffer(log4net.Core.LoggingEvent[])">
- <summary>
- Inserts the events into the database.
- </summary>
- <param name="events">The events to insert into the database.</param>
- <remarks>
- <para>
- Insert all the events specified in the <paramref name="events"/>
- array into the database.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.AddParameter(log4net.Appender.AdoNetAppenderParameter)">
- <summary>
- Adds a parameter to the command.
- </summary>
- <param name="parameter">The parameter to add to the command.</param>
- <remarks>
- <para>
- Adds a parameter to the ordered list of command parameters.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.SendBuffer(System.Data.IDbTransaction,log4net.Core.LoggingEvent[])">
- <summary>
- Writes the events to the database using the transaction specified.
- </summary>
- <param name="dbTran">The transaction that the events will be executed under.</param>
- <param name="events">The array of events to insert into the database.</param>
- <remarks>
- <para>
- The transaction argument can be <c>null</c> if the appender has been
- configured not to use transactions. See <see cref="P:log4net.Appender.AdoNetAppender.UseTransactions"/>
- property for more information.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.GetLogStatement(log4net.Core.LoggingEvent)">
- <summary>
- Formats the log message into database statement text.
- </summary>
- <param name="logEvent">The event being logged.</param>
- <remarks>
- This method can be overridden by subclasses to provide
- more control over the format of the database statement.
- </remarks>
- <returns>
- Text that can be passed to a <see cref="T:System.Data.IDbCommand"/>.
- </returns>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.InitializeDatabaseConnection">
- <summary>
- Connects to the database.
- </summary>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.ResolveConnectionType">
- <summary>
- Retrieves the class type of the ADO.NET provider.
- </summary>
- <remarks>
- <para>
- Gets the Type of the ADO.NET provider to use to connect to the
- database. This method resolves the type specified in the
- <see cref="P:log4net.Appender.AdoNetAppender.ConnectionType"/> property.
- </para>
- <para>
- Subclasses can override this method to return a different type
- if necessary.
- </para>
- </remarks>
- <returns>The <see cref="T:System.Type"/> of the ADO.NET provider</returns>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.InitializeDatabaseCommand">
- <summary>
- Prepares the database command and initialize the parameters.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_usePreparedCommand">
- <summary>
- Flag to indicate if we are using a command object
- </summary>
- <remarks>
- <para>
- Set to <c>true</c> when the appender is to use a prepared
- statement or stored procedure to insert into the database.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_parameters">
- <summary>
- The list of <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> objects.
- </summary>
- <remarks>
- <para>
- The list of <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> objects.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_securityContext">
- <summary>
- The security context to use for privileged calls
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_dbConnection">
- <summary>
- The <see cref="T:System.Data.IDbConnection"/> that will be used
- to insert logging events into a database.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_dbCommand">
- <summary>
- The database command.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_connectionString">
- <summary>
- Database connection string.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_connectionType">
- <summary>
- String type name of the <see cref="T:System.Data.IDbConnection"/> type name.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_commandText">
- <summary>
- The text of the command.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_commandType">
- <summary>
- The command type.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_useTransactions">
- <summary>
- Indicates whether to use transactions when writing to the database.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_reconnectOnError">
- <summary>
- Indicates whether to use transactions when writing to the database.
- </summary>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.ConnectionString">
- <summary>
- Gets or sets the database connection string that is used to connect to
- the database.
- </summary>
- <value>
- The database connection string used to connect to the database.
- </value>
- <remarks>
- <para>
- The connections string is specific to the connection type.
- See <see cref="P:log4net.Appender.AdoNetAppender.ConnectionType"/> for more information.
- </para>
- </remarks>
- <example>Connection string for MS Access via ODBC:
- <code>"DSN=MS Access Database;UID=admin;PWD=;SystemDB=C:\data\System.mdw;SafeTransactions = 0;FIL=MS Access;DriverID = 25;DBQ=C:\data\train33.mdb"</code>
- </example>
- <example>Another connection string for MS Access via ODBC:
- <code>"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Work\cvs_root\log4net-1.2\access.mdb;UID=;PWD=;"</code>
- </example>
- <example>Connection string for MS Access via OLE DB:
- <code>"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Work\cvs_root\log4net-1.2\access.mdb;User Id=;Password=;"</code>
- </example>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.ConnectionType">
- <summary>
- Gets or sets the type name of the <see cref="T:System.Data.IDbConnection"/> connection
- that should be created.
- </summary>
- <value>
- The type name of the <see cref="T:System.Data.IDbConnection"/> connection.
- </value>
- <remarks>
- <para>
- The type name of the ADO.NET provider to use.
- </para>
- <para>
- The default is to use the OLE DB provider.
- </para>
- </remarks>
- <example>Use the OLE DB Provider. This is the default value.
- <code>System.Data.OleDb.OleDbConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</code>
- </example>
- <example>Use the MS SQL Server Provider.
- <code>System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</code>
- </example>
- <example>Use the ODBC Provider.
- <code>Microsoft.Data.Odbc.OdbcConnection,Microsoft.Data.Odbc,version=1.0.3300.0,publicKeyToken=b77a5c561934e089,culture=neutral</code>
- This is an optional package that you can download from
- <a href="http://msdn.microsoft.com/downloads">http://msdn.microsoft.com/downloads</a>
- search for <b>ODBC .NET Data Provider</b>.
- </example>
- <example>Use the Oracle Provider.
- <code>System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</code>
- This is an optional package that you can download from
- <a href="http://msdn.microsoft.com/downloads">http://msdn.microsoft.com/downloads</a>
- search for <b>.NET Managed Provider for Oracle</b>.
- </example>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.CommandText">
- <summary>
- Gets or sets the command text that is used to insert logging events
- into the database.
- </summary>
- <value>
- The command text used to insert logging events into the database.
- </value>
- <remarks>
- <para>
- Either the text of the prepared statement or the
- name of the stored procedure to execute to write into
- the database.
- </para>
- <para>
- The <see cref="P:log4net.Appender.AdoNetAppender.CommandType"/> property determines if
- this text is a prepared statement or a stored procedure.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.CommandType">
- <summary>
- Gets or sets the command type to execute.
- </summary>
- <value>
- The command type to execute.
- </value>
- <remarks>
- <para>
- This value may be either <see cref="F:System.Data.CommandType.Text"/> (<c>System.Data.CommandType.Text</c>) to specify
- that the <see cref="P:log4net.Appender.AdoNetAppender.CommandText"/> is a prepared statement to execute,
- or <see cref="F:System.Data.CommandType.StoredProcedure"/> (<c>System.Data.CommandType.StoredProcedure</c>) to specify that the
- <see cref="P:log4net.Appender.AdoNetAppender.CommandText"/> property is the name of a stored procedure
- to execute.
- </para>
- <para>
- The default value is <see cref="F:System.Data.CommandType.Text"/> (<c>System.Data.CommandType.Text</c>).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.UseTransactions">
- <summary>
- Should transactions be used to insert logging events in the database.
- </summary>
- <value>
- <c>true</c> if transactions should be used to insert logging events in
- the database, otherwise <c>false</c>. The default value is <c>true</c>.
- </value>
- <remarks>
- <para>
- Gets or sets a value that indicates whether transactions should be used
- to insert logging events in the database.
- </para>
- <para>
- When set a single transaction will be used to insert the buffered events
- into the database. Otherwise each event will be inserted without using
- an explicit transaction.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.SecurityContext">
- <summary>
- Gets or sets the <see cref="P:log4net.Appender.AdoNetAppender.SecurityContext"/> used to call the NetSend method.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.AdoNetAppender.SecurityContext"/> used to call the NetSend method.
- </value>
- <remarks>
- <para>
- Unless a <see cref="P:log4net.Appender.AdoNetAppender.SecurityContext"/> specified here for this appender
- the <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> is queried for the
- security context to use. The default behavior is to use the security context
- of the current thread.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.ReconnectOnError">
- <summary>
- Should this appender try to reconnect to the database on error.
- </summary>
- <value>
- <c>true</c> if the appender should try to reconnect to the database after an
- error has occurred, otherwise <c>false</c>. The default value is <c>false</c>,
- i.e. not to try to reconnect.
- </value>
- <remarks>
- <para>
- The default behaviour is for the appender not to try to reconnect to the
- database if an error occurs. Subsequent logging events are discarded.
- </para>
- <para>
- To force the appender to attempt to reconnect to the database set this
- property to <c>true</c>.
- </para>
- <note>
- When the appender attempts to connect to the database there may be a
- delay of up to the connection timeout specified in the connection string.
- This delay will block the calling application's thread.
- Until the connection can be reestablished this potential delay may occur multiple times.
- </note>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.Connection">
- <summary>
- Gets or sets the underlying <see cref="T:System.Data.IDbConnection"/>.
- </summary>
- <value>
- The underlying <see cref="T:System.Data.IDbConnection"/>.
- </value>
- <remarks>
- <see cref="T:log4net.Appender.AdoNetAppender"/> creates a <see cref="T:System.Data.IDbConnection"/> to insert
- logging events into a database. Classes deriving from <see cref="T:log4net.Appender.AdoNetAppender"/>
- can use this property to get or set this <see cref="T:System.Data.IDbConnection"/>. Use the
- underlying <see cref="T:System.Data.IDbConnection"/> returned from <see cref="P:log4net.Appender.AdoNetAppender.Connection"/> if
- you require access beyond that which <see cref="T:log4net.Appender.AdoNetAppender"/> provides.
- </remarks>
- </member>
- <member name="T:log4net.Appender.AdoNetAppenderParameter">
- <summary>
- Parameter type used by the <see cref="T:log4net.Appender.AdoNetAppender"/>.
- </summary>
- <remarks>
- <para>
- This class provides the basic database parameter properties
- as defined by the <see cref="T:System.Data.IDbDataParameter"/> interface.
- </para>
- <para>This type can be subclassed to provide database specific
- functionality. The two methods that are called externally are
- <see cref="M:log4net.Appender.AdoNetAppenderParameter.Prepare(System.Data.IDbCommand)"/> and <see cref="M:log4net.Appender.AdoNetAppenderParameter.FormatValue(System.Data.IDbCommand,log4net.Core.LoggingEvent)"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppenderParameter.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> class.
- </summary>
- <remarks>
- Default constructor for the AdoNetAppenderParameter class.
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppenderParameter.Prepare(System.Data.IDbCommand)">
- <summary>
- Prepare the specified database command object.
- </summary>
- <param name="command">The command to prepare.</param>
- <remarks>
- <para>
- Prepares the database command object by adding
- this parameter to its collection of parameters.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppenderParameter.FormatValue(System.Data.IDbCommand,log4net.Core.LoggingEvent)">
- <summary>
- Renders the logging event and set the parameter value in the command.
- </summary>
- <param name="command">The command containing the parameter.</param>
- <param name="loggingEvent">The event to be rendered.</param>
- <remarks>
- <para>
- Renders the logging event using this parameters layout
- object. Sets the value of the parameter on the command object.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_parameterName">
- <summary>
- The name of this parameter.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_dbType">
- <summary>
- The database type for this parameter.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_inferType">
- <summary>
- Flag to infer type rather than use the DbType
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_precision">
- <summary>
- The precision for this parameter.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_scale">
- <summary>
- The scale for this parameter.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_size">
- <summary>
- The size for this parameter.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_layout">
- <summary>
- The <see cref="T:log4net.Layout.IRawLayout"/> to use to render the
- logging event into an object for this parameter.
- </summary>
- </member>
- <member name="P:log4net.Appender.AdoNetAppenderParameter.ParameterName">
- <summary>
- Gets or sets the name of this parameter.
- </summary>
- <value>
- The name of this parameter.
- </value>
- <remarks>
- <para>
- The name of this parameter. The parameter name
- must match up to a named parameter to the SQL stored procedure
- or prepared statement.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AdoNetAppenderParameter.DbType">
- <summary>
- Gets or sets the database type for this parameter.
- </summary>
- <value>
- The database type for this parameter.
- </value>
- <remarks>
- <para>
- The database type for this parameter. This property should
- be set to the database type from the <see cref="P:log4net.Appender.AdoNetAppenderParameter.DbType"/>
- enumeration. See <see cref="P:System.Data.IDataParameter.DbType"/>.
- </para>
- <para>
- This property is optional. If not specified the ADO.NET provider
- will attempt to infer the type from the value.
- </para>
- </remarks>
- <seealso cref="P:System.Data.IDataParameter.DbType"/>
- </member>
- <member name="P:log4net.Appender.AdoNetAppenderParameter.Precision">
- <summary>
- Gets or sets the precision for this parameter.
- </summary>
- <value>
- The precision for this parameter.
- </value>
- <remarks>
- <para>
- The maximum number of digits used to represent the Value.
- </para>
- <para>
- This property is optional. If not specified the ADO.NET provider
- will attempt to infer the precision from the value.
- </para>
- </remarks>
- <seealso cref="P:System.Data.IDbDataParameter.Precision"/>
- </member>
- <member name="P:log4net.Appender.AdoNetAppenderParameter.Scale">
- <summary>
- Gets or sets the scale for this parameter.
- </summary>
- <value>
- The scale for this parameter.
- </value>
- <remarks>
- <para>
- The number of decimal places to which Value is resolved.
- </para>
- <para>
- This property is optional. If not specified the ADO.NET provider
- will attempt to infer the scale from the value.
- </para>
- </remarks>
- <seealso cref="P:System.Data.IDbDataParameter.Scale"/>
- </member>
- <member name="P:log4net.Appender.AdoNetAppenderParameter.Size">
- <summary>
- Gets or sets the size for this parameter.
- </summary>
- <value>
- The size for this parameter.
- </value>
- <remarks>
- <para>
- The maximum size, in bytes, of the data within the column.
- </para>
- <para>
- This property is optional. If not specified the ADO.NET provider
- will attempt to infer the size from the value.
- </para>
- </remarks>
- <seealso cref="P:System.Data.IDbDataParameter.Size"/>
- </member>
- <member name="P:log4net.Appender.AdoNetAppenderParameter.Layout">
- <summary>
- Gets or sets the <see cref="T:log4net.Layout.IRawLayout"/> to use to
- render the logging event into an object for this
- parameter.
- </summary>
- <value>
- The <see cref="T:log4net.Layout.IRawLayout"/> used to render the
- logging event into an object for this parameter.
- </value>
- <remarks>
- <para>
- The <see cref="T:log4net.Layout.IRawLayout"/> that renders the value for this
- parameter.
- </para>
- <para>
- The <see cref="T:log4net.Layout.RawLayoutConverter"/> can be used to adapt
- any <see cref="T:log4net.Layout.ILayout"/> into a <see cref="T:log4net.Layout.IRawLayout"/>
- for use in the property.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.AnsiColorTerminalAppender">
- <summary>
- Appends logging events to the terminal using ANSI color escape sequences.
- </summary>
- <remarks>
- <para>
- AnsiColorTerminalAppender appends log events to the standard output stream
- or the error output stream using a layout specified by the
- user. It also allows the color of a specific level of message to be set.
- </para>
- <note>
- This appender expects the terminal to understand the VT100 control set
- in order to interpret the color codes. If the terminal or console does not
- understand the control codes the behavior is not defined.
- </note>
- <para>
- By default, all output is written to the console's standard output stream.
- The <see cref="P:log4net.Appender.AnsiColorTerminalAppender.Target"/> property can be set to direct the output to the
- error stream.
- </para>
- <para>
- NOTE: This appender writes each message to the <c>System.Console.Out</c> or
- <c>System.Console.Error</c> that is set at the time the event is appended.
- Therefore it is possible to programmatically redirect the output of this appender
- (for example NUnit does this to capture program output). While this is the desired
- behavior of this appender it may have security implications in your application.
- </para>
- <para>
- When configuring the ANSI colored terminal appender, a mapping should be
- specified to map a logging level to a color. For example:
- </para>
- <code lang="XML" escaped="true">
- <mapping>
- <level value="ERROR"/>
- <foreColor value="White"/>
- <backColor value="Red"/>
- <attributes value="Bright,Underscore"/>
- </mapping>
- <mapping>
- <level value="DEBUG"/>
- <backColor value="Green"/>
- </mapping>
- </code>
- <para>
- The Level is the standard log4net logging level and ForeColor and BackColor can be any
- of the following values:
- <list type="bullet">
- <item><term>Blue</term><description></description></item>
- <item><term>Green</term><description></description></item>
- <item><term>Red</term><description></description></item>
- <item><term>White</term><description></description></item>
- <item><term>Yellow</term><description></description></item>
- <item><term>Purple</term><description></description></item>
- <item><term>Cyan</term><description></description></item>
- </list>
- These color values cannot be combined together to make new colors.
- </para>
- <para>
- The attributes can be any combination of the following:
- <list type="bullet">
- <item><term>Bright</term><description>foreground is brighter</description></item>
- <item><term>Dim</term><description>foreground is dimmer</description></item>
- <item><term>Underscore</term><description>message is underlined</description></item>
- <item><term>Blink</term><description>foreground is blinking (does not work on all terminals)</description></item>
- <item><term>Reverse</term><description>foreground and background are reversed</description></item>
- <item><term>Hidden</term><description>output is hidden</description></item>
- <item><term>Strikethrough</term><description>message has a line through it</description></item>
- </list>
- While any of these attributes may be combined together not all combinations
- work well together, for example setting both <i>Bright</i> and <i>Dim</i> attributes makes
- no sense.
- </para>
- </remarks>
- <author>Patrick Wagstrom</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.ConsoleOut">
- <summary>
- The <see cref="P:log4net.Appender.AnsiColorTerminalAppender.Target"/> to use when writing to the Console
- standard output stream.
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.AnsiColorTerminalAppender.Target"/> to use when writing to the Console
- standard output stream.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.ConsoleError">
- <summary>
- The <see cref="P:log4net.Appender.AnsiColorTerminalAppender.Target"/> to use when writing to the Console
- standard error output stream.
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.AnsiColorTerminalAppender.Target"/> to use when writing to the Console
- standard error output stream.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.PostEventCodes">
- <summary>
- Ansi code to reset terminal
- </summary>
- </member>
- <member name="M:log4net.Appender.AnsiColorTerminalAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.AnsiColorTerminalAppender"/> class.
- </summary>
- <remarks>
- The instance of the <see cref="T:log4net.Appender.AnsiColorTerminalAppender"/> class is set up to write
- to the standard output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.AnsiColorTerminalAppender.AddMapping(log4net.Appender.AnsiColorTerminalAppender.LevelColors)">
- <summary>
- Add a mapping of level to color
- </summary>
- <param name="mapping">The mapping to add</param>
- <remarks>
- <para>
- Add a <see cref="T:log4net.Appender.AnsiColorTerminalAppender.LevelColors"/> mapping to this appender.
- Each mapping defines the foreground and background colours
- for a level.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AnsiColorTerminalAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the event to the console.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AnsiColorTerminalAppender.ActivateOptions">
- <summary>
- Initialize the options for this appender
- </summary>
- <remarks>
- <para>
- Initialize the level to color mappings set on this appender.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.m_writeToErrorStream">
- <summary>
- Flag to write output to the error stream rather than the standard output stream
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.m_levelMapping">
- <summary>
- Mapping from level object to color value
- </summary>
- </member>
- <member name="P:log4net.Appender.AnsiColorTerminalAppender.Target">
- <summary>
- Target is the value of the console output stream.
- </summary>
- <value>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </value>
- <remarks>
- <para>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AnsiColorTerminalAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes">
- <summary>
- The enum of possible display attributes
- </summary>
- <remarks>
- <para>
- The following flags can be combined together to
- form the ANSI color attributes.
- </para>
- </remarks>
- <seealso cref="T:log4net.Appender.AnsiColorTerminalAppender"/>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Bright">
- <summary>
- text is bright
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Dim">
- <summary>
- text is dim
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Underscore">
- <summary>
- text is underlined
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Blink">
- <summary>
- text is blinking
- </summary>
- <remarks>
- Not all terminals support this attribute
- </remarks>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Reverse">
- <summary>
- text and background colors are reversed
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Hidden">
- <summary>
- text is hidden
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Strikethrough">
- <summary>
- text is displayed with a strikethrough
- </summary>
- </member>
- <member name="T:log4net.Appender.AnsiColorTerminalAppender.AnsiColor">
- <summary>
- The enum of possible foreground or background color values for
- use with the color mapping method
- </summary>
- <remarks>
- <para>
- The output can be in one for the following ANSI colors.
- </para>
- </remarks>
- <seealso cref="T:log4net.Appender.AnsiColorTerminalAppender"/>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Black">
- <summary>
- color is black
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Red">
- <summary>
- color is red
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Green">
- <summary>
- color is green
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Yellow">
- <summary>
- color is yellow
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Blue">
- <summary>
- color is blue
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Magenta">
- <summary>
- color is magenta
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Cyan">
- <summary>
- color is cyan
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.White">
- <summary>
- color is white
- </summary>
- </member>
- <member name="T:log4net.Appender.AnsiColorTerminalAppender.LevelColors">
- <summary>
- A class to act as a mapping between the level that a logging call is made at and
- the color it should be displayed as.
- </summary>
- <remarks>
- <para>
- Defines the mapping between a level and the color it should be displayed in.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.LevelMappingEntry">
- <summary>
- An entry in the <see cref="T:log4net.Util.LevelMapping"/>
- </summary>
- <remarks>
- <para>
- This is an abstract base class for types that are stored in the
- <see cref="T:log4net.Util.LevelMapping"/> object.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.LevelMappingEntry.#ctor">
- <summary>
- Default protected constructor
- </summary>
- <remarks>
- <para>
- Default protected constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LevelMappingEntry.ActivateOptions">
- <summary>
- Initialize any options defined on this entry
- </summary>
- <remarks>
- <para>
- Should be overridden by any classes that need to initialise based on their options
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.LevelMappingEntry.Level">
- <summary>
- The level that is the key for this mapping
- </summary>
- <value>
- The <see cref="P:log4net.Util.LevelMappingEntry.Level"/> that is the key for this mapping
- </value>
- <remarks>
- <para>
- Get or set the <see cref="P:log4net.Util.LevelMappingEntry.Level"/> that is the key for this
- mapping subclass.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AnsiColorTerminalAppender.LevelColors.ActivateOptions">
- <summary>
- Initialize the options for the object
- </summary>
- <remarks>
- <para>
- Combine the <see cref="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.ForeColor"/> and <see cref="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.BackColor"/> together
- and append the attributes.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.ForeColor">
- <summary>
- The mapped foreground color for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The mapped foreground color for the specified level
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.BackColor">
- <summary>
- The mapped background color for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The mapped background color for the specified level
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.Attributes">
- <summary>
- The color attributes for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The color attributes for the specified level
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.CombinedColor">
- <summary>
- The combined <see cref="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.ForeColor"/>, <see cref="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.BackColor"/> and
- <see cref="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.Attributes"/> suitable for setting the ansi terminal color.
- </summary>
- </member>
- <member name="T:log4net.Appender.AppenderCollection">
- <summary>
- A strongly-typed collection of <see cref="T:log4net.Appender.IAppender"/> objects.
- </summary>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.ReadOnly(log4net.Appender.AppenderCollection)">
- <summary>
- Creates a read-only wrapper for a <c>AppenderCollection</c> instance.
- </summary>
- <param name="list">list to create a readonly wrapper arround</param>
- <returns>
- An <c>AppenderCollection</c> wrapper that is read-only.
- </returns>
- </member>
- <member name="F:log4net.Appender.AppenderCollection.EmptyCollection">
- <summary>
- An empty readonly static AppenderCollection
- </summary>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.#ctor">
- <summary>
- Initializes a new instance of the <c>AppenderCollection</c> class
- that is empty and has the default initial capacity.
- </summary>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.#ctor(System.Int32)">
- <summary>
- Initializes a new instance of the <c>AppenderCollection</c> class
- that has the specified initial capacity.
- </summary>
- <param name="capacity">
- The number of elements that the new <c>AppenderCollection</c> is initially capable of storing.
- </param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.#ctor(log4net.Appender.AppenderCollection)">
- <summary>
- Initializes a new instance of the <c>AppenderCollection</c> class
- that contains elements copied from the specified <c>AppenderCollection</c>.
- </summary>
- <param name="c">The <c>AppenderCollection</c> whose elements are copied to the new collection.</param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.#ctor(log4net.Appender.IAppender[])">
- <summary>
- Initializes a new instance of the <c>AppenderCollection</c> class
- that contains elements copied from the specified <see cref="T:log4net.Appender.IAppender"/> array.
- </summary>
- <param name="a">The <see cref="T:log4net.Appender.IAppender"/> array whose elements are copied to the new list.</param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.#ctor(System.Collections.ICollection)">
- <summary>
- Initializes a new instance of the <c>AppenderCollection</c> class
- that contains elements copied from the specified <see cref="T:log4net.Appender.IAppender"/> collection.
- </summary>
- <param name="col">The <see cref="T:log4net.Appender.IAppender"/> collection whose elements are copied to the new list.</param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.#ctor(log4net.Appender.AppenderCollection.Tag)">
- <summary>
- Allow subclasses to avoid our default constructors
- </summary>
- <param name="tag"></param>
- <exclude/>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.CopyTo(log4net.Appender.IAppender[])">
- <summary>
- Copies the entire <c>AppenderCollection</c> to a one-dimensional
- <see cref="T:log4net.Appender.IAppender"/> array.
- </summary>
- <param name="array">The one-dimensional <see cref="T:log4net.Appender.IAppender"/> array to copy to.</param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.CopyTo(log4net.Appender.IAppender[],System.Int32)">
- <summary>
- Copies the entire <c>AppenderCollection</c> to a one-dimensional
- <see cref="T:log4net.Appender.IAppender"/> array, starting at the specified index of the target array.
- </summary>
- <param name="array">The one-dimensional <see cref="T:log4net.Appender.IAppender"/> array to copy to.</param>
- <param name="start">The zero-based index in <paramref name="array"/> at which copying begins.</param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Add(log4net.Appender.IAppender)">
- <summary>
- Adds a <see cref="T:log4net.Appender.IAppender"/> to the end of the <c>AppenderCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Appender.IAppender"/> to be added to the end of the <c>AppenderCollection</c>.</param>
- <returns>The index at which the value has been added.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Clear">
- <summary>
- Removes all elements from the <c>AppenderCollection</c>.
- </summary>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Clone">
- <summary>
- Creates a shallow copy of the <see cref="T:log4net.Appender.AppenderCollection"/>.
- </summary>
- <returns>A new <see cref="T:log4net.Appender.AppenderCollection"/> with a shallow copy of the collection data.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Contains(log4net.Appender.IAppender)">
- <summary>
- Determines whether a given <see cref="T:log4net.Appender.IAppender"/> is in the <c>AppenderCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Appender.IAppender"/> to check for.</param>
- <returns><c>true</c> if <paramref name="item"/> is found in the <c>AppenderCollection</c>; otherwise, <c>false</c>.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.IndexOf(log4net.Appender.IAppender)">
- <summary>
- Returns the zero-based index of the first occurrence of a <see cref="T:log4net.Appender.IAppender"/>
- in the <c>AppenderCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Appender.IAppender"/> to locate in the <c>AppenderCollection</c>.</param>
- <returns>
- The zero-based index of the first occurrence of <paramref name="item"/>
- in the entire <c>AppenderCollection</c>, if found; otherwise, -1.
- </returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Insert(System.Int32,log4net.Appender.IAppender)">
- <summary>
- Inserts an element into the <c>AppenderCollection</c> at the specified index.
- </summary>
- <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
- <param name="item">The <see cref="T:log4net.Appender.IAppender"/> to insert.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Appender.AppenderCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Remove(log4net.Appender.IAppender)">
- <summary>
- Removes the first occurrence of a specific <see cref="T:log4net.Appender.IAppender"/> from the <c>AppenderCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Appender.IAppender"/> to remove from the <c>AppenderCollection</c>.</param>
- <exception cref="T:System.ArgumentException">
- The specified <see cref="T:log4net.Appender.IAppender"/> was not found in the <c>AppenderCollection</c>.
- </exception>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.RemoveAt(System.Int32)">
- <summary>
- Removes the element at the specified index of the <c>AppenderCollection</c>.
- </summary>
- <param name="index">The zero-based index of the element to remove.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Appender.AppenderCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.GetEnumerator">
- <summary>
- Returns an enumerator that can iterate through the <c>AppenderCollection</c>.
- </summary>
- <returns>An <see cref="T:log4net.Appender.AppenderCollection.Enumerator"/> for the entire <c>AppenderCollection</c>.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.AddRange(log4net.Appender.AppenderCollection)">
- <summary>
- Adds the elements of another <c>AppenderCollection</c> to the current <c>AppenderCollection</c>.
- </summary>
- <param name="x">The <c>AppenderCollection</c> whose elements should be added to the end of the current <c>AppenderCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Appender.AppenderCollection.Count"/> of the <c>AppenderCollection</c>.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.AddRange(log4net.Appender.IAppender[])">
- <summary>
- Adds the elements of a <see cref="T:log4net.Appender.IAppender"/> array to the current <c>AppenderCollection</c>.
- </summary>
- <param name="x">The <see cref="T:log4net.Appender.IAppender"/> array whose elements should be added to the end of the <c>AppenderCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Appender.AppenderCollection.Count"/> of the <c>AppenderCollection</c>.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.AddRange(System.Collections.ICollection)">
- <summary>
- Adds the elements of a <see cref="T:log4net.Appender.IAppender"/> collection to the current <c>AppenderCollection</c>.
- </summary>
- <param name="col">The <see cref="T:log4net.Appender.IAppender"/> collection whose elements should be added to the end of the <c>AppenderCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Appender.AppenderCollection.Count"/> of the <c>AppenderCollection</c>.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.TrimToSize">
- <summary>
- Sets the capacity to the actual number of elements.
- </summary>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.ToArray">
- <summary>
- Return the collection elements as an array
- </summary>
- <returns>the array</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.ValidateIndex(System.Int32)">
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Appender.AppenderCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.ValidateIndex(System.Int32,System.Boolean)">
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Appender.AppenderCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.Count">
- <summary>
- Gets the number of elements actually contained in the <c>AppenderCollection</c>.
- </summary>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.IsSynchronized">
- <summary>
- Gets a value indicating whether access to the collection is synchronized (thread-safe).
- </summary>
- <returns>true if access to the ICollection is synchronized (thread-safe); otherwise, false.</returns>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.SyncRoot">
- <summary>
- Gets an object that can be used to synchronize access to the collection.
- </summary>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.Item(System.Int32)">
- <summary>
- Gets or sets the <see cref="T:log4net.Appender.IAppender"/> at the specified index.
- </summary>
- <param name="index">The zero-based index of the element to get or set.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Appender.AppenderCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.IsFixedSize">
- <summary>
- Gets a value indicating whether the collection has a fixed size.
- </summary>
- <value>true if the collection has a fixed size; otherwise, false. The default is false</value>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.IsReadOnly">
- <summary>
- Gets a value indicating whether the IList is read-only.
- </summary>
- <value>true if the collection is read-only; otherwise, false. The default is false</value>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.Capacity">
- <summary>
- Gets or sets the number of elements the <c>AppenderCollection</c> can contain.
- </summary>
- </member>
- <member name="T:log4net.Appender.AppenderCollection.IAppenderCollectionEnumerator">
- <summary>
- Supports type-safe iteration over a <see cref="T:log4net.Appender.AppenderCollection"/>.
- </summary>
- <exclude/>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.IAppenderCollectionEnumerator.MoveNext">
- <summary>
- Advances the enumerator to the next element in the collection.
- </summary>
- <returns>
- <c>true</c> if the enumerator was successfully advanced to the next element;
- <c>false</c> if the enumerator has passed the end of the collection.
- </returns>
- <exception cref="T:System.InvalidOperationException">
- The collection was modified after the enumerator was created.
- </exception>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.IAppenderCollectionEnumerator.Reset">
- <summary>
- Sets the enumerator to its initial position, before the first element in the collection.
- </summary>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.IAppenderCollectionEnumerator.Current">
- <summary>
- Gets the current element in the collection.
- </summary>
- </member>
- <member name="T:log4net.Appender.AppenderCollection.Tag">
- <summary>
- Type visible only to our subclasses
- Used to access protected constructor
- </summary>
- <exclude/>
- </member>
- <member name="F:log4net.Appender.AppenderCollection.Tag.Default">
- <summary>
- A value
- </summary>
- </member>
- <member name="T:log4net.Appender.AppenderCollection.Enumerator">
- <summary>
- Supports simple iteration over a <see cref="T:log4net.Appender.AppenderCollection"/>.
- </summary>
- <exclude/>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Enumerator.#ctor(log4net.Appender.AppenderCollection)">
- <summary>
- Initializes a new instance of the <c>Enumerator</c> class.
- </summary>
- <param name="tc"></param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Enumerator.MoveNext">
- <summary>
- Advances the enumerator to the next element in the collection.
- </summary>
- <returns>
- <c>true</c> if the enumerator was successfully advanced to the next element;
- <c>false</c> if the enumerator has passed the end of the collection.
- </returns>
- <exception cref="T:System.InvalidOperationException">
- The collection was modified after the enumerator was created.
- </exception>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Enumerator.Reset">
- <summary>
- Sets the enumerator to its initial position, before the first element in the collection.
- </summary>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.Enumerator.Current">
- <summary>
- Gets the current element in the collection.
- </summary>
- </member>
- <member name="T:log4net.Appender.AppenderCollection.ReadOnlyAppenderCollection">
- <exclude/>
- </member>
- <member name="T:log4net.Appender.AspNetTraceAppender">
- <summary>
- <para>
- Appends log events to the ASP.NET <see cref="T:System.Web.TraceContext"/> system.
- </para>
- </summary>
- <remarks>
- <para>
- Diagnostic information and tracing messages that you specify are appended to the output
- of the page that is sent to the requesting browser. Optionally, you can view this information
- from a separate trace viewer (Trace.axd) that displays trace information for every page in a
- given application.
- </para>
- <para>
- Trace statements are processed and displayed only when tracing is enabled. You can control
- whether tracing is displayed to a page, to the trace viewer, or both.
- </para>
- <para>
- The logging event is passed to the <see cref="M:System.Web.TraceContext.Write(System.String)"/> or
- <see cref="M:System.Web.TraceContext.Warn(System.String)"/> method depending on the level of the logging event.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.AspNetTraceAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.AspNetTraceAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AspNetTraceAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Write the logging event to the ASP.NET trace
- </summary>
- <param name="loggingEvent">the event to log</param>
- <remarks>
- <para>
- Write the logging event to the ASP.NET trace
- <c>HttpContext.Current.Trace</c>
- (<see cref="T:System.Web.TraceContext"/>).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AspNetTraceAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.BufferingForwardingAppender">
- <summary>
- Buffers events and then forwards them to attached appenders.
- </summary>
- <remarks>
- <para>
- The events are buffered in this appender until conditions are
- met to allow the appender to deliver the events to the attached
- appenders. See <see cref="T:log4net.Appender.BufferingAppenderSkeleton"/> for the
- conditions that cause the buffer to be sent.
- </para>
- <para>The forwarding appender can be used to specify different
- thresholds and filters for the same appender at different locations
- within the hierarchy.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Core.IAppenderAttachable">
- <summary>
- Interface for attaching appenders to objects.
- </summary>
- <remarks>
- <para>
- Interface for attaching, removing and retrieving appenders.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.IAppenderAttachable.AddAppender(log4net.Appender.IAppender)">
- <summary>
- Attaches an appender.
- </summary>
- <param name="appender">The appender to add.</param>
- <remarks>
- <para>
- Add the specified appender. The implementation may
- choose to allow or deny duplicate appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IAppenderAttachable.GetAppender(System.String)">
- <summary>
- Gets an attached appender with the specified name.
- </summary>
- <param name="name">The name of the appender to get.</param>
- <returns>
- The appender with the name specified, or <c>null</c> if no appender with the
- specified name is found.
- </returns>
- <remarks>
- <para>
- Returns an attached appender with the <paramref name="name"/> specified.
- If no appender with the specified name is found <c>null</c> will be
- returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IAppenderAttachable.RemoveAllAppenders">
- <summary>
- Removes all attached appenders.
- </summary>
- <remarks>
- <para>
- Removes and closes all attached appenders
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IAppenderAttachable.RemoveAppender(log4net.Appender.IAppender)">
- <summary>
- Removes the specified appender from the list of attached appenders.
- </summary>
- <param name="appender">The appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- <para>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IAppenderAttachable.RemoveAppender(System.String)">
- <summary>
- Removes the appender with the specified name from the list of appenders.
- </summary>
- <param name="name">The name of the appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- <para>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.IAppenderAttachable.Appenders">
- <summary>
- Gets all attached appenders.
- </summary>
- <value>
- A collection of attached appenders.
- </value>
- <remarks>
- <para>
- Gets a collection of attached appenders.
- If there are no attached appenders the
- implementation should return an empty
- collection rather than <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.BufferingForwardingAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.OnClose">
- <summary>
- Closes the appender and releases resources.
- </summary>
- <remarks>
- <para>
- Releases any resources allocated within the appender such as file handles,
- network connections, etc.
- </para>
- <para>
- It is a programming error to append to a closed appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.SendBuffer(log4net.Core.LoggingEvent[])">
- <summary>
- Send the events.
- </summary>
- <param name="events">The events that need to be send.</param>
- <remarks>
- <para>
- Forwards the events to the attached appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.AddAppender(log4net.Appender.IAppender)">
- <summary>
- Adds an <see cref="T:log4net.Appender.IAppender"/> to the list of appenders of this
- instance.
- </summary>
- <param name="newAppender">The <see cref="T:log4net.Appender.IAppender"/> to add to this appender.</param>
- <remarks>
- <para>
- If the specified <see cref="T:log4net.Appender.IAppender"/> is already in the list of
- appenders, then it won't be added again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.GetAppender(System.String)">
- <summary>
- Looks for the appender with the specified name.
- </summary>
- <param name="name">The name of the appender to lookup.</param>
- <returns>
- The appender with the specified name, or <c>null</c>.
- </returns>
- <remarks>
- <para>
- Get the named appender attached to this buffering appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.RemoveAllAppenders">
- <summary>
- Removes all previously added appenders from this appender.
- </summary>
- <remarks>
- <para>
- This is useful when re-reading configuration information.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.RemoveAppender(log4net.Appender.IAppender)">
- <summary>
- Removes the specified appender from the list of appenders.
- </summary>
- <param name="appender">The appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.RemoveAppender(System.String)">
- <summary>
- Removes the appender with the specified name from the list of appenders.
- </summary>
- <param name="name">The name of the appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingForwardingAppender.m_appenderAttachedImpl">
- <summary>
- Implementation of the <see cref="T:log4net.Core.IAppenderAttachable"/> interface
- </summary>
- </member>
- <member name="P:log4net.Appender.BufferingForwardingAppender.Appenders">
- <summary>
- Gets the appenders contained in this appender as an
- <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <remarks>
- If no appenders can be found, then an <see cref="T:log4net.Util.EmptyCollection"/>
- is returned.
- </remarks>
- <returns>
- A collection of the appenders in this appender.
- </returns>
- </member>
- <member name="T:log4net.Appender.ColoredConsoleAppender">
- <summary>
- Appends logging events to the console.
- </summary>
- <remarks>
- <para>
- ColoredConsoleAppender appends log events to the standard output stream
- or the error output stream using a layout specified by the
- user. It also allows the color of a specific type of message to be set.
- </para>
- <para>
- By default, all output is written to the console's standard output stream.
- The <see cref="P:log4net.Appender.ColoredConsoleAppender.Target"/> property can be set to direct the output to the
- error stream.
- </para>
- <para>
- NOTE: This appender writes directly to the application's attached console
- not to the <c>System.Console.Out</c> or <c>System.Console.Error</c> <c>TextWriter</c>.
- The <c>System.Console.Out</c> and <c>System.Console.Error</c> streams can be
- programmatically redirected (for example NUnit does this to capture program output).
- This appender will ignore these redirections because it needs to use Win32
- API calls to colorize the output. To respect these redirections the <see cref="T:log4net.Appender.ConsoleAppender"/>
- must be used.
- </para>
- <para>
- When configuring the colored console appender, mapping should be
- specified to map a logging level to a color. For example:
- </para>
- <code lang="XML" escaped="true">
- <mapping>
- <level value="ERROR"/>
- <foreColor value="White"/>
- <backColor value="Red, HighIntensity"/>
- </mapping>
- <mapping>
- <level value="DEBUG"/>
- <backColor value="Green"/>
- </mapping>
- </code>
- <para>
- The Level is the standard log4net logging level and ForeColor and BackColor can be any
- combination of the following values:
- <list type="bullet">
- <item><term>Blue</term><description></description></item>
- <item><term>Green</term><description></description></item>
- <item><term>Red</term><description></description></item>
- <item><term>White</term><description></description></item>
- <item><term>Yellow</term><description></description></item>
- <item><term>Purple</term><description></description></item>
- <item><term>Cyan</term><description></description></item>
- <item><term>HighIntensity</term><description></description></item>
- </list>
- </para>
- </remarks>
- <author>Rick Hobbs</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.ConsoleOut">
- <summary>
- The <see cref="P:log4net.Appender.ColoredConsoleAppender.Target"/> to use when writing to the Console
- standard output stream.
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.ColoredConsoleAppender.Target"/> to use when writing to the Console
- standard output stream.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.ConsoleError">
- <summary>
- The <see cref="P:log4net.Appender.ColoredConsoleAppender.Target"/> to use when writing to the Console
- standard error output stream.
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.ColoredConsoleAppender.Target"/> to use when writing to the Console
- standard error output stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ColoredConsoleAppender"/> class.
- </summary>
- <remarks>
- The instance of the <see cref="T:log4net.Appender.ColoredConsoleAppender"/> class is set up to write
- to the standard output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.#ctor(log4net.Layout.ILayout)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ColoredConsoleAppender"/> class
- with the specified layout.
- </summary>
- <param name="layout">the layout to use for this appender</param>
- <remarks>
- The instance of the <see cref="T:log4net.Appender.ColoredConsoleAppender"/> class is set up to write
- to the standard output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.#ctor(log4net.Layout.ILayout,System.Boolean)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ColoredConsoleAppender"/> class
- with the specified layout.
- </summary>
- <param name="layout">the layout to use for this appender</param>
- <param name="writeToErrorStream">flag set to <c>true</c> to write to the console error stream</param>
- <remarks>
- When <paramref name="writeToErrorStream"/> is set to <c>true</c>, output is written to
- the standard error output stream. Otherwise, output is written to the standard
- output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.AddMapping(log4net.Appender.ColoredConsoleAppender.LevelColors)">
- <summary>
- Add a mapping of level to color - done by the config file
- </summary>
- <param name="mapping">The mapping to add</param>
- <remarks>
- <para>
- Add a <see cref="T:log4net.Appender.ColoredConsoleAppender.LevelColors"/> mapping to this appender.
- Each mapping defines the foreground and background colors
- for a level.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the event to the console.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.ActivateOptions">
- <summary>
- Initialize the options for this appender
- </summary>
- <remarks>
- <para>
- Initialize the level to color mappings set on this appender.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.m_writeToErrorStream">
- <summary>
- Flag to write output to the error stream rather than the standard output stream
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.m_levelMapping">
- <summary>
- Mapping from level object to color value
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.m_consoleOutputWriter">
- <summary>
- The console output stream writer to write to
- </summary>
- <remarks>
- <para>
- This writer is not thread safe.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ColoredConsoleAppender.Target">
- <summary>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </summary>
- <value>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </value>
- <remarks>
- <para>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ColoredConsoleAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.ColoredConsoleAppender.Colors">
- <summary>
- The enum of possible color values for use with the color mapping method
- </summary>
- <remarks>
- <para>
- The following flags can be combined together to
- form the colors.
- </para>
- </remarks>
- <seealso cref="T:log4net.Appender.ColoredConsoleAppender"/>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.Blue">
- <summary>
- color is blue
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.Green">
- <summary>
- color is green
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.Red">
- <summary>
- color is red
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.White">
- <summary>
- color is white
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.Yellow">
- <summary>
- color is yellow
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.Purple">
- <summary>
- color is purple
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.Cyan">
- <summary>
- color is cyan
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.HighIntensity">
- <summary>
- color is intensified
- </summary>
- </member>
- <member name="T:log4net.Appender.ColoredConsoleAppender.LevelColors">
- <summary>
- A class to act as a mapping between the level that a logging call is made at and
- the color it should be displayed as.
- </summary>
- <remarks>
- <para>
- Defines the mapping between a level and the color it should be displayed in.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.LevelColors.ActivateOptions">
- <summary>
- Initialize the options for the object
- </summary>
- <remarks>
- <para>
- Combine the <see cref="P:log4net.Appender.ColoredConsoleAppender.LevelColors.ForeColor"/> and <see cref="P:log4net.Appender.ColoredConsoleAppender.LevelColors.BackColor"/> together.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ColoredConsoleAppender.LevelColors.ForeColor">
- <summary>
- The mapped foreground color for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The mapped foreground color for the specified level.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ColoredConsoleAppender.LevelColors.BackColor">
- <summary>
- The mapped background color for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The mapped background color for the specified level.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ColoredConsoleAppender.LevelColors.CombinedColor">
- <summary>
- The combined <see cref="P:log4net.Appender.ColoredConsoleAppender.LevelColors.ForeColor"/> and <see cref="P:log4net.Appender.ColoredConsoleAppender.LevelColors.BackColor"/> suitable for
- setting the console color.
- </summary>
- </member>
- <member name="T:log4net.Appender.ConsoleAppender">
- <summary>
- Appends logging events to the console.
- </summary>
- <remarks>
- <para>
- ConsoleAppender appends log events to the standard output stream
- or the error output stream using a layout specified by the
- user.
- </para>
- <para>
- By default, all output is written to the console's standard output stream.
- The <see cref="P:log4net.Appender.ConsoleAppender.Target"/> property can be set to direct the output to the
- error stream.
- </para>
- <para>
- NOTE: This appender writes each message to the <c>System.Console.Out</c> or
- <c>System.Console.Error</c> that is set at the time the event is appended.
- Therefore it is possible to programmatically redirect the output of this appender
- (for example NUnit does this to capture program output). While this is the desired
- behavior of this appender it may have security implications in your application.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Appender.ConsoleAppender.ConsoleOut">
- <summary>
- The <see cref="P:log4net.Appender.ConsoleAppender.Target"/> to use when writing to the Console
- standard output stream.
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.ConsoleAppender.Target"/> to use when writing to the Console
- standard output stream.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.ConsoleAppender.ConsoleError">
- <summary>
- The <see cref="P:log4net.Appender.ConsoleAppender.Target"/> to use when writing to the Console
- standard error output stream.
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.ConsoleAppender.Target"/> to use when writing to the Console
- standard error output stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ConsoleAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ConsoleAppender"/> class.
- </summary>
- <remarks>
- The instance of the <see cref="T:log4net.Appender.ConsoleAppender"/> class is set up to write
- to the standard output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ConsoleAppender.#ctor(log4net.Layout.ILayout)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ConsoleAppender"/> class
- with the specified layout.
- </summary>
- <param name="layout">the layout to use for this appender</param>
- <remarks>
- The instance of the <see cref="T:log4net.Appender.ConsoleAppender"/> class is set up to write
- to the standard output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ConsoleAppender.#ctor(log4net.Layout.ILayout,System.Boolean)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ConsoleAppender"/> class
- with the specified layout.
- </summary>
- <param name="layout">the layout to use for this appender</param>
- <param name="writeToErrorStream">flag set to <c>true</c> to write to the console error stream</param>
- <remarks>
- When <paramref name="writeToErrorStream"/> is set to <c>true</c>, output is written to
- the standard error output stream. Otherwise, output is written to the standard
- output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ConsoleAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the event to the console.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ConsoleAppender.Target">
- <summary>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </summary>
- <value>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </value>
- <remarks>
- <para>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ConsoleAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.DebugAppender">
- <summary>
- Appends log events to the <see cref="T:System.Diagnostics.Debug"/> system.
- </summary>
- <remarks>
- <para>
- The application configuration file can be used to control what listeners
- are actually used. See the MSDN documentation for the
- <see cref="T:System.Diagnostics.Debug"/> class for details on configuring the
- debug system.
- </para>
- <para>
- Events are written using the <see cref="M:System.Diagnostics.Debug.Write(System.String,System.String)"/>
- method. The event's logger name is passed as the value for the category name to the Write method.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.DebugAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.DebugAppender"/>.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.DebugAppender.#ctor(log4net.Layout.ILayout)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.DebugAppender"/>
- with a specified layout.
- </summary>
- <param name="layout">The layout to use with this appender.</param>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.DebugAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Writes the logging event to the <see cref="T:System.Diagnostics.Debug"/> system.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the logging event to the <see cref="T:System.Diagnostics.Debug"/> system.
- If <see cref="P:log4net.Appender.DebugAppender.ImmediateFlush"/> is <c>true</c> then the <see cref="M:System.Diagnostics.Debug.Flush"/>
- is called.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.DebugAppender.m_immediateFlush">
- <summary>
- Immediate flush means that the underlying writer or output stream
- will be flushed at the end of each append operation.
- </summary>
- <remarks>
- <para>
- Immediate flush is slower but ensures that each append request is
- actually written. If <see cref="P:log4net.Appender.DebugAppender.ImmediateFlush"/> is set to
- <c>false</c>, then there is a good chance that the last few
- logs events are not actually written to persistent media if and
- when the application crashes.
- </para>
- <para>
- The default value is <c>true</c>.</para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.DebugAppender.ImmediateFlush">
- <summary>
- Gets or sets a value that indicates whether the appender will
- flush at the end of each write.
- </summary>
- <remarks>
- <para>The default behavior is to flush at the end of each
- write. If the option is set to<c>false</c>, then the underlying
- stream can defer writing to physical medium to a later time.
- </para>
- <para>
- Avoiding the flush operation at the end of each append results
- in a performance gain of 10 to 20 percent. However, there is safety
- trade-off involved in skipping flushing. Indeed, when flushing is
- skipped, then it is likely that the last few log events will not
- be recorded on disk when the application exits. This is a high
- price to pay even for a 20% performance gain.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.DebugAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.EventLogAppender">
- <summary>
- Writes events to the system event log.
- </summary>
- <remarks>
- <para>
- The <c>EventID</c> of the event log entry can be
- set using the <c>EventLogEventID</c> property (<see cref="P:log4net.Core.LoggingEvent.Properties"/>)
- on the <see cref="T:log4net.Core.LoggingEvent"/>.
- </para>
- <para>
- There is a limit of 32K characters for an event log message
- </para>
- <para>
- When configuring the EventLogAppender a mapping can be
- specified to map a logging level to an event log entry type. For example:
- </para>
- <code lang="XML">
- &lt;mapping&gt;
- &lt;level value="ERROR" /&gt;
- &lt;eventLogEntryType value="Error" /&gt;
- &lt;/mapping&gt;
- &lt;mapping&gt;
- &lt;level value="DEBUG" /&gt;
- &lt;eventLogEntryType value="Information" /&gt;
- &lt;/mapping&gt;
- </code>
- <para>
- The Level is the standard log4net logging level and eventLogEntryType can be any value
- from the <see cref="T:System.Diagnostics.EventLogEntryType"/> enum, i.e.:
- <list type="bullet">
- <item><term>Error</term><description>an error event</description></item>
- <item><term>Warning</term><description>a warning event</description></item>
- <item><term>Information</term><description>an informational event</description></item>
- </list>
- </para>
- </remarks>
- <author>Aspi Havewala</author>
- <author>Douglas de la Torre</author>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Thomas Voss</author>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.EventLogAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.#ctor(log4net.Layout.ILayout)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.EventLogAppender"/> class
- with the specified <see cref="T:log4net.Layout.ILayout"/>.
- </summary>
- <param name="layout">The <see cref="T:log4net.Layout.ILayout"/> to use with this appender.</param>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.AddMapping(log4net.Appender.EventLogAppender.Level2EventLogEntryType)">
- <summary>
- Add a mapping of level to <see cref="T:System.Diagnostics.EventLogEntryType"/> - done by the config file
- </summary>
- <param name="mapping">The mapping to add</param>
- <remarks>
- <para>
- Add a <see cref="T:log4net.Appender.EventLogAppender.Level2EventLogEntryType"/> mapping to this appender.
- Each mapping defines the event log entry type for a level.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.EventLogAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.EventLogAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.EventLogAppender.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.CreateEventSource(System.String,System.String,System.String)">
- <summary>
- Create an event log source
- </summary>
- <remarks>
- Uses different API calls under NET_2_0
- </remarks>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/>
- method.
- </summary>
- <param name="loggingEvent">the event to log</param>
- <remarks>
- <para>Writes the event to the system event log using the
- <see cref="P:log4net.Appender.EventLogAppender.ApplicationName"/>.</para>
-
- <para>If the event has an <c>EventID</c> property (see <see cref="P:log4net.Core.LoggingEvent.Properties"/>)
- set then this integer will be used as the event log event id.</para>
-
- <para>
- There is a limit of 32K characters for an event log message
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.GetEntryType(log4net.Core.Level)">
- <summary>
- Get the equivalent <see cref="T:System.Diagnostics.EventLogEntryType"/> for a <see cref="T:log4net.Core.Level"/> <paramref name="p"/>
- </summary>
- <param name="level">the Level to convert to an EventLogEntryType</param>
- <returns>The equivalent <see cref="T:System.Diagnostics.EventLogEntryType"/> for a <see cref="T:log4net.Core.Level"/> <paramref name="p"/></returns>
- <remarks>
- Because there are fewer applicable <see cref="T:System.Diagnostics.EventLogEntryType"/>
- values to use in logging levels than there are in the
- <see cref="T:log4net.Core.Level"/> this is a one way mapping. There is
- a loss of information during the conversion.
- </remarks>
- </member>
- <member name="F:log4net.Appender.EventLogAppender.m_logName">
- <summary>
- The log name is the section in the event logs where the messages
- are stored.
- </summary>
- </member>
- <member name="F:log4net.Appender.EventLogAppender.m_applicationName">
- <summary>
- Name of the application to use when logging. This appears in the
- application column of the event log named by <see cref="F:log4net.Appender.EventLogAppender.m_logName"/>.
- </summary>
- </member>
- <member name="F:log4net.Appender.EventLogAppender.m_machineName">
- <summary>
- The name of the machine which holds the event log. This is
- currently only allowed to be '.' i.e. the current machine.
- </summary>
- </member>
- <member name="F:log4net.Appender.EventLogAppender.m_levelMapping">
- <summary>
- Mapping from level object to EventLogEntryType
- </summary>
- </member>
- <member name="F:log4net.Appender.EventLogAppender.m_securityContext">
- <summary>
- The security context to use for privileged calls
- </summary>
- </member>
- <member name="P:log4net.Appender.EventLogAppender.LogName">
- <summary>
- The name of the log where messages will be stored.
- </summary>
- <value>
- The string name of the log where messages will be stored.
- </value>
- <remarks>
- <para>This is the name of the log as it appears in the Event Viewer
- tree. The default value is to log into the <c>Application</c>
- log, this is where most applications write their events. However
- if you need a separate log for your application (or applications)
- then you should set the <see cref="P:log4net.Appender.EventLogAppender.LogName"/> appropriately.</para>
- <para>This should not be used to distinguish your event log messages
- from those of other applications, the <see cref="P:log4net.Appender.EventLogAppender.ApplicationName"/>
- property should be used to distinguish events. This property should be
- used to group together events into a single log.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.EventLogAppender.ApplicationName">
- <summary>
- Property used to set the Application name. This appears in the
- event logs when logging.
- </summary>
- <value>
- The string used to distinguish events from different sources.
- </value>
- <remarks>
- Sets the event log source property.
- </remarks>
- </member>
- <member name="P:log4net.Appender.EventLogAppender.MachineName">
- <summary>
- This property is used to return the name of the computer to use
- when accessing the event logs. Currently, this is the current
- computer, denoted by a dot "."
- </summary>
- <value>
- The string name of the machine holding the event log that
- will be logged into.
- </value>
- <remarks>
- This property cannot be changed. It is currently set to '.'
- i.e. the local machine. This may be changed in future.
- </remarks>
- </member>
- <member name="P:log4net.Appender.EventLogAppender.SecurityContext">
- <summary>
- Gets or sets the <see cref="P:log4net.Appender.EventLogAppender.SecurityContext"/> used to write to the EventLog.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.EventLogAppender.SecurityContext"/> used to write to the EventLog.
- </value>
- <remarks>
- <para>
- The system security context used to write to the EventLog.
- </para>
- <para>
- Unless a <see cref="P:log4net.Appender.EventLogAppender.SecurityContext"/> specified here for this appender
- the <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> is queried for the
- security context to use. The default behavior is to use the security context
- of the current thread.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.EventLogAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.EventLogAppender.Level2EventLogEntryType">
- <summary>
- A class to act as a mapping between the level that a logging call is made at and
- the color it should be displayed as.
- </summary>
- <remarks>
- <para>
- Defines the mapping between a level and its event log entry type.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.EventLogAppender.Level2EventLogEntryType.EventLogEntryType">
- <summary>
- The <see cref="P:log4net.Appender.EventLogAppender.Level2EventLogEntryType.EventLogEntryType"/> for this entry
- </summary>
- <remarks>
- <para>
- Required property.
- The <see cref="P:log4net.Appender.EventLogAppender.Level2EventLogEntryType.EventLogEntryType"/> for this entry
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.FileAppender">
- <summary>
- Appends logging events to a file.
- </summary>
- <remarks>
- <para>
- Logging events are sent to the file specified by
- the <see cref="P:log4net.Appender.FileAppender.File"/> property.
- </para>
- <para>
- The file can be opened in either append or overwrite mode
- by specifying the <see cref="P:log4net.Appender.FileAppender.AppendToFile"/> property.
- If the file path is relative it is taken as relative from
- the application base directory. The file encoding can be
- specified by setting the <see cref="P:log4net.Appender.FileAppender.Encoding"/> property.
- </para>
- <para>
- The layout's <see cref="P:log4net.Layout.ILayout.Header"/> and <see cref="P:log4net.Layout.ILayout.Footer"/>
- values will be written each time the file is opened and closed
- respectively. If the <see cref="P:log4net.Appender.FileAppender.AppendToFile"/> property is <see langword="true"/>
- then the file may contain multiple copies of the header and footer.
- </para>
- <para>
- This appender will first try to open the file for writing when <see cref="M:log4net.Appender.FileAppender.ActivateOptions"/>
- is called. This will typically be during configuration.
- If the file cannot be opened for writing the appender will attempt
- to open the file again each time a message is logged to the appender.
- If the file cannot be opened for writing when a message is logged then
- the message will be discarded by this appender.
- </para>
- <para>
- The <see cref="T:log4net.Appender.FileAppender"/> supports pluggable file locking models via
- the <see cref="P:log4net.Appender.FileAppender.LockingModel"/> property.
- The default behavior, implemented by <see cref="T:log4net.Appender.FileAppender.ExclusiveLock"/>
- is to obtain an exclusive write lock on the file until this appender is closed.
- The alternative model, <see cref="T:log4net.Appender.FileAppender.MinimalLock"/>, only holds a
- write lock while the appender is writing a logging event.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Rodrigo B. de Oliveira</author>
- <author>Douglas de la Torre</author>
- <author>Niall Daley</author>
- </member>
- <member name="T:log4net.Appender.TextWriterAppender">
- <summary>
- Sends logging events to a <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <remarks>
- <para>
- An Appender that writes to a <see cref="T:System.IO.TextWriter"/>.
- </para>
- <para>
- This appender may be used stand alone if initialized with an appropriate
- writer, however it is typically used as a base class for an appender that
- can open a <see cref="T:System.IO.TextWriter"/> to write to.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Douglas de la Torre</author>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.TextWriterAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.#ctor(log4net.Layout.ILayout,System.IO.Stream)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.TextWriterAppender"/> class and
- sets the output destination to a new <see cref="T:System.IO.StreamWriter"/> initialized
- with the specified <see cref="T:System.IO.Stream"/>.
- </summary>
- <param name="layout">The layout to use with this appender.</param>
- <param name="os">The <see cref="T:System.IO.Stream"/> to output to.</param>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.#ctor(log4net.Layout.ILayout,System.IO.TextWriter)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.TextWriterAppender"/> class and sets
- the output destination to the specified <see cref="T:System.IO.StreamWriter"/>.
- </summary>
- <param name="layout">The layout to use with this appender</param>
- <param name="writer">The <see cref="T:System.IO.TextWriter"/> to output to</param>
- <remarks>
- The <see cref="T:System.IO.TextWriter"/> must have been previously opened.
- </remarks>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.PreAppendCheck">
- <summary>
- This method determines if there is a sense in attempting to append.
- </summary>
- <remarks>
- <para>
- This method checked if an output target has been set and if a
- layout has been set.
- </para>
- </remarks>
- <returns><c>false</c> if any of the preconditions fail.</returns>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/>
- method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes a log statement to the output stream if the output stream exists
- and is writable.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.Append(log4net.Core.LoggingEvent[])">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent[])"/>
- method.
- </summary>
- <param name="loggingEvents">The array of events to log.</param>
- <remarks>
- <para>
- This method writes all the bulk logged events to the output writer
- before flushing the stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.OnClose">
- <summary>
- Close this appender instance. The underlying stream or writer is also closed.
- </summary>
- <remarks>
- Closed appenders cannot be reused.
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.WriteFooterAndCloseWriter">
- <summary>
- Writes the footer and closes the underlying <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <remarks>
- <para>
- Writes the footer and closes the underlying <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.CloseWriter">
- <summary>
- Closes the underlying <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <remarks>
- <para>
- Closes the underlying <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.Reset">
- <summary>
- Clears internal references to the underlying <see cref="T:System.IO.TextWriter"/>
- and other variables.
- </summary>
- <remarks>
- <para>
- Subclasses can override this method for an alternate closing behavior.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.WriteFooter">
- <summary>
- Writes a footer as produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Footer"/> property.
- </summary>
- <remarks>
- <para>
- Writes a footer as produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Footer"/> property.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.WriteHeader">
- <summary>
- Writes a header produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Header"/> property.
- </summary>
- <remarks>
- <para>
- Writes a header produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Header"/> property.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.PrepareWriter">
- <summary>
- Called to allow a subclass to lazily initialize the writer
- </summary>
- <remarks>
- <para>
- This method is called when an event is logged and the <see cref="P:log4net.Appender.TextWriterAppender.Writer"/> or
- <see cref="P:log4net.Appender.TextWriterAppender.QuietWriter"/> have not been set. This allows a subclass to
- attempt to initialize the writer multiple times.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.TextWriterAppender.m_qtw">
- <summary>
- This is the <see cref="T:log4net.Util.QuietTextWriter"/> where logging events
- will be written to.
- </summary>
- </member>
- <member name="F:log4net.Appender.TextWriterAppender.m_immediateFlush">
- <summary>
- Immediate flush means that the underlying <see cref="T:System.IO.TextWriter"/>
- or output stream will be flushed at the end of each append operation.
- </summary>
- <remarks>
- <para>
- Immediate flush is slower but ensures that each append request is
- actually written. If <see cref="P:log4net.Appender.TextWriterAppender.ImmediateFlush"/> is set to
- <c>false</c>, then there is a good chance that the last few
- logging events are not actually persisted if and when the application
- crashes.
- </para>
- <para>
- The default value is <c>true</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TextWriterAppender.ImmediateFlush">
- <summary>
- Gets or set whether the appender will flush at the end
- of each append operation.
- </summary>
- <value>
- <para>
- The default behavior is to flush at the end of each
- append operation.
- </para>
- <para>
- If this option is set to <c>false</c>, then the underlying
- stream can defer persisting the logging event to a later
- time.
- </para>
- </value>
- <remarks>
- Avoiding the flush operation at the end of each append results in
- a performance gain of 10 to 20 percent. However, there is safety
- trade-off involved in skipping flushing. Indeed, when flushing is
- skipped, then it is likely that the last few log events will not
- be recorded on disk when the application exits. This is a high
- price to pay even for a 20% performance gain.
- </remarks>
- </member>
- <member name="P:log4net.Appender.TextWriterAppender.Writer">
- <summary>
- Sets the <see cref="T:System.IO.TextWriter"/> where the log output will go.
- </summary>
- <remarks>
- <para>
- The specified <see cref="T:System.IO.TextWriter"/> must be open and writable.
- </para>
- <para>
- The <see cref="T:System.IO.TextWriter"/> will be closed when the appender
- instance is closed.
- </para>
- <para>
- <b>Note:</b> Logging to an unopened <see cref="T:System.IO.TextWriter"/> will fail.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TextWriterAppender.ErrorHandler">
- <summary>
- Gets or set the <see cref="T:log4net.Core.IErrorHandler"/> and the underlying
- <see cref="T:log4net.Util.QuietTextWriter"/>, if any, for this appender.
- </summary>
- <value>
- The <see cref="T:log4net.Core.IErrorHandler"/> for this appender.
- </value>
- </member>
- <member name="P:log4net.Appender.TextWriterAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TextWriterAppender.QuietWriter">
- <summary>
- Gets or sets the <see cref="T:log4net.Util.QuietTextWriter"/> where logging events
- will be written to.
- </summary>
- <value>
- The <see cref="T:log4net.Util.QuietTextWriter"/> where logging events are written.
- </value>
- <remarks>
- <para>
- This is the <see cref="T:log4net.Util.QuietTextWriter"/> where logging events
- will be written to.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.#ctor(log4net.Layout.ILayout,System.String,System.Boolean)">
- <summary>
- Construct a new appender using the layout, file and append mode.
- </summary>
- <param name="layout">the layout to use with this appender</param>
- <param name="filename">the full path to the file to write to</param>
- <param name="append">flag to indicate if the file should be appended to</param>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.#ctor(log4net.Layout.ILayout,System.String)">
- <summary>
- Construct a new appender using the layout and file specified.
- The file will be appended to.
- </summary>
- <param name="layout">the layout to use with this appender</param>
- <param name="filename">the full path to the file to write to</param>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.ActivateOptions">
- <summary>
- Activate the options on the file appender.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.FileAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.FileAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.FileAppender.ActivateOptions"/> must be called again.
- </para>
- <para>
- This will cause the file to be opened.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.Reset">
- <summary>
- Closes any previously opened file and calls the parent's <see cref="M:log4net.Appender.TextWriterAppender.Reset"/>.
- </summary>
- <remarks>
- <para>
- Resets the filename and the file stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.PrepareWriter">
- <summary>
- Called to initialize the file writer
- </summary>
- <remarks>
- <para>
- Will be called for each logged message until the file is
- successfully opened.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/>
- method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes a log statement to the output stream if the output stream exists
- and is writable.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.Append(log4net.Core.LoggingEvent[])">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent[])"/>
- method.
- </summary>
- <param name="loggingEvents">The array of events to log.</param>
- <remarks>
- <para>
- Acquires the output file locks once before writing all the events to
- the stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.WriteFooter">
- <summary>
- Writes a footer as produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Footer"/> property.
- </summary>
- <remarks>
- <para>
- Writes a footer as produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Footer"/> property.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.WriteHeader">
- <summary>
- Writes a header produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Header"/> property.
- </summary>
- <remarks>
- <para>
- Writes a header produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Header"/> property.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.CloseWriter">
- <summary>
- Closes the underlying <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <remarks>
- <para>
- Closes the underlying <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.CloseFile">
- <summary>
- Closes the previously opened file.
- </summary>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Layout.ILayout.Footer"/> to the file and then
- closes the file.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.SafeOpenFile(System.String,System.Boolean)">
- <summary>
- Sets and <i>opens</i> the file where the log output will go. The specified file must be writable.
- </summary>
- <param name="fileName">The path to the log file. Must be a fully qualified path.</param>
- <param name="append">If true will append to fileName. Otherwise will truncate fileName</param>
- <remarks>
- <para>
- Calls <see cref="M:log4net.Appender.FileAppender.OpenFile(System.String,System.Boolean)"/> but guarantees not to throw an exception.
- Errors are passed to the <see cref="P:log4net.Appender.TextWriterAppender.ErrorHandler"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.OpenFile(System.String,System.Boolean)">
- <summary>
- Sets and <i>opens</i> the file where the log output will go. The specified file must be writable.
- </summary>
- <param name="fileName">The path to the log file. Must be a fully qualified path.</param>
- <param name="append">If true will append to fileName. Otherwise will truncate fileName</param>
- <remarks>
- <para>
- If there was already an opened file, then the previous file
- is closed first.
- </para>
- <para>
- This method will ensure that the directory structure
- for the <paramref name="fileName"/> specified exists.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.SetQWForFiles(System.IO.Stream)">
- <summary>
- Sets the quiet writer used for file output
- </summary>
- <param name="fileStream">the file stream that has been opened for writing</param>
- <remarks>
- <para>
- This implementation of <see cref="M:log4net.Appender.FileAppender.SetQWForFiles(System.IO.Stream)"/> creates a <see cref="T:System.IO.StreamWriter"/>
- over the <paramref name="fileStream"/> and passes it to the
- <see cref="M:log4net.Appender.FileAppender.SetQWForFiles(System.IO.TextWriter)"/> method.
- </para>
- <para>
- This method can be overridden by sub classes that want to wrap the
- <see cref="T:System.IO.Stream"/> in some way, for example to encrypt the output
- data using a <c>System.Security.Cryptography.CryptoStream</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.SetQWForFiles(System.IO.TextWriter)">
- <summary>
- Sets the quiet writer being used.
- </summary>
- <param name="writer">the writer over the file stream that has been opened for writing</param>
- <remarks>
- <para>
- This method can be overridden by sub classes that want to
- wrap the <see cref="T:System.IO.TextWriter"/> in some way.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.ConvertToFullPath(System.String)">
- <summary>
- Convert a path into a fully qualified path.
- </summary>
- <param name="path">The path to convert.</param>
- <returns>The fully qualified path.</returns>
- <remarks>
- <para>
- Converts the path specified to a fully
- qualified path. If the path is relative it is
- taken as relative from the application base
- directory.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.FileAppender.m_appendToFile">
- <summary>
- Flag to indicate if we should append to the file
- or overwrite the file. The default is to append.
- </summary>
- </member>
- <member name="F:log4net.Appender.FileAppender.m_fileName">
- <summary>
- The name of the log file.
- </summary>
- </member>
- <member name="F:log4net.Appender.FileAppender.m_encoding">
- <summary>
- The encoding to use for the file stream.
- </summary>
- </member>
- <member name="F:log4net.Appender.FileAppender.m_securityContext">
- <summary>
- The security context to use for privileged calls
- </summary>
- </member>
- <member name="F:log4net.Appender.FileAppender.m_stream">
- <summary>
- The stream to log to. Has added locking semantics
- </summary>
- </member>
- <member name="F:log4net.Appender.FileAppender.m_lockingModel">
- <summary>
- The locking model to use
- </summary>
- </member>
- <member name="P:log4net.Appender.FileAppender.File">
- <summary>
- Gets or sets the path to the file that logging will be written to.
- </summary>
- <value>
- The path to the file that logging will be written to.
- </value>
- <remarks>
- <para>
- If the path is relative it is taken as relative from
- the application base directory.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.FileAppender.AppendToFile">
- <summary>
- Gets or sets a flag that indicates whether the file should be
- appended to or overwritten.
- </summary>
- <value>
- Indicates whether the file should be appended to or overwritten.
- </value>
- <remarks>
- <para>
- If the value is set to false then the file will be overwritten, if
- it is set to true then the file will be appended to.
- </para>
- The default value is true.
- </remarks>
- </member>
- <member name="P:log4net.Appender.FileAppender.Encoding">
- <summary>
- Gets or sets <see cref="P:log4net.Appender.FileAppender.Encoding"/> used to write to the file.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.FileAppender.Encoding"/> used to write to the file.
- </value>
- <remarks>
- <para>
- The default encoding set is <see cref="P:System.Text.Encoding.Default"/>
- which is the encoding for the system's current ANSI code page.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.FileAppender.SecurityContext">
- <summary>
- Gets or sets the <see cref="P:log4net.Appender.FileAppender.SecurityContext"/> used to write to the file.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.FileAppender.SecurityContext"/> used to write to the file.
- </value>
- <remarks>
- <para>
- Unless a <see cref="P:log4net.Appender.FileAppender.SecurityContext"/> specified here for this appender
- the <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> is queried for the
- security context to use. The default behavior is to use the security context
- of the current thread.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.FileAppender.LockingModel">
- <summary>
- Gets or sets the <see cref="P:log4net.Appender.FileAppender.LockingModel"/> used to handle locking of the file.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.FileAppender.LockingModel"/> used to lock the file.
- </value>
- <remarks>
- <para>
- Gets or sets the <see cref="P:log4net.Appender.FileAppender.LockingModel"/> used to handle locking of the file.
- </para>
- <para>
- There are two built in locking models, <see cref="T:log4net.Appender.FileAppender.ExclusiveLock"/> and <see cref="T:log4net.Appender.FileAppender.MinimalLock"/>.
- The former locks the file from the start of logging to the end and the
- later lock only for the minimal amount of time when logging each message.
- </para>
- <para>
- The default locking model is the <see cref="T:log4net.Appender.FileAppender.ExclusiveLock"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.FileAppender.LockingStream">
- <summary>
- Write only <see cref="T:System.IO.Stream"/> that uses the <see cref="T:log4net.Appender.FileAppender.LockingModelBase"/>
- to manage access to an underlying resource.
- </summary>
- </member>
- <member name="M:log4net.Appender.FileAppender.LockingStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)">
- <summary>
- True asynchronous writes are not supported, the implementation forces a synchronous write.
- </summary>
- </member>
- <member name="T:log4net.Core.LogException">
- <summary>
- Exception base type for log4net.
- </summary>
- <remarks>
- <para>
- This type extends <see cref="T:System.ApplicationException"/>. It
- does not add any new functionality but does differentiate the
- type of exception being thrown.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.LogException.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LogException"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogException.#ctor(System.String)">
- <summary>
- Constructor
- </summary>
- <param name="message">A message to include with the exception.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LogException"/> class with
- the specified message.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogException.#ctor(System.String,System.Exception)">
- <summary>
- Constructor
- </summary>
- <param name="message">A message to include with the exception.</param>
- <param name="innerException">A nested exception to include.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LogException"/> class
- with the specified message and inner exception.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Serialization constructor
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
- <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LogException"/> class
- with serialized data.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.FileAppender.LockingModelBase">
- <summary>
- Locking model base class
- </summary>
- <remarks>
- <para>
- Base class for the locking models available to the <see cref="T:log4net.Appender.FileAppender"/> derived loggers.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.LockingModelBase.OpenFile(System.String,System.Boolean,System.Text.Encoding)">
- <summary>
- Open the output file
- </summary>
- <param name="filename">The filename to use</param>
- <param name="append">Whether to append to the file, or overwrite</param>
- <param name="encoding">The encoding to use</param>
- <remarks>
- <para>
- Open the file specified and prepare for logging.
- No writes will be made until <see cref="M:log4net.Appender.FileAppender.LockingModelBase.AcquireLock"/> is called.
- Must be called before any calls to <see cref="M:log4net.Appender.FileAppender.LockingModelBase.AcquireLock"/>,
- <see cref="M:log4net.Appender.FileAppender.LockingModelBase.ReleaseLock"/> and <see cref="M:log4net.Appender.FileAppender.LockingModelBase.CloseFile"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.LockingModelBase.CloseFile">
- <summary>
- Close the file
- </summary>
- <remarks>
- <para>
- Close the file. No further writes will be made.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.LockingModelBase.AcquireLock">
- <summary>
- Acquire the lock on the file
- </summary>
- <returns>A stream that is ready to be written to.</returns>
- <remarks>
- <para>
- Acquire the lock on the file in preparation for writing to it.
- Return a stream pointing to the file. <see cref="M:log4net.Appender.FileAppender.LockingModelBase.ReleaseLock"/>
- must be called to release the lock on the output file.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.LockingModelBase.ReleaseLock">
- <summary>
- Release the lock on the file
- </summary>
- <remarks>
- <para>
- Release the lock on the file. No further writes will be made to the
- stream until <see cref="M:log4net.Appender.FileAppender.LockingModelBase.AcquireLock"/> is called again.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.FileAppender.LockingModelBase.CurrentAppender">
- <summary>
- Gets or sets the <see cref="T:log4net.Appender.FileAppender"/> for this LockingModel
- </summary>
- <value>
- The <see cref="T:log4net.Appender.FileAppender"/> for this LockingModel
- </value>
- <remarks>
- <para>
- The file appender this locking model is attached to and working on
- behalf of.
- </para>
- <para>
- The file appender is used to locate the security context and the error handler to use.
- </para>
- <para>
- The value of this property will be set before <see cref="M:log4net.Appender.FileAppender.LockingModelBase.OpenFile(System.String,System.Boolean,System.Text.Encoding)"/> is
- called.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.FileAppender.ExclusiveLock">
- <summary>
- Hold an exclusive lock on the output file
- </summary>
- <remarks>
- <para>
- Open the file once for writing and hold it open until <see cref="M:log4net.Appender.FileAppender.ExclusiveLock.CloseFile"/> is called.
- Maintains an exclusive lock on the file during this time.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.ExclusiveLock.OpenFile(System.String,System.Boolean,System.Text.Encoding)">
- <summary>
- Open the file specified and prepare for logging.
- </summary>
- <param name="filename">The filename to use</param>
- <param name="append">Whether to append to the file, or overwrite</param>
- <param name="encoding">The encoding to use</param>
- <remarks>
- <para>
- Open the file specified and prepare for logging.
- No writes will be made until <see cref="M:log4net.Appender.FileAppender.ExclusiveLock.AcquireLock"/> is called.
- Must be called before any calls to <see cref="M:log4net.Appender.FileAppender.ExclusiveLock.AcquireLock"/>,
- <see cref="M:log4net.Appender.FileAppender.ExclusiveLock.ReleaseLock"/> and <see cref="M:log4net.Appender.FileAppender.ExclusiveLock.CloseFile"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.ExclusiveLock.CloseFile">
- <summary>
- Close the file
- </summary>
- <remarks>
- <para>
- Close the file. No further writes will be made.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.ExclusiveLock.AcquireLock">
- <summary>
- Acquire the lock on the file
- </summary>
- <returns>A stream that is ready to be written to.</returns>
- <remarks>
- <para>
- Does nothing. The lock is already taken
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.ExclusiveLock.ReleaseLock">
- <summary>
- Release the lock on the file
- </summary>
- <remarks>
- <para>
- Does nothing. The lock will be released when the file is closed.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.FileAppender.MinimalLock">
- <summary>
- Acquires the file lock for each write
- </summary>
- <remarks>
- <para>
- Opens the file once for each <see cref="M:log4net.Appender.FileAppender.MinimalLock.AcquireLock"/>/<see cref="M:log4net.Appender.FileAppender.MinimalLock.ReleaseLock"/> cycle,
- thus holding the lock for the minimal amount of time. This method of locking
- is considerably slower than <see cref="T:log4net.Appender.FileAppender.ExclusiveLock"/> but allows
- other processes to move/delete the log file whilst logging continues.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.MinimalLock.OpenFile(System.String,System.Boolean,System.Text.Encoding)">
- <summary>
- Prepares to open the file when the first message is logged.
- </summary>
- <param name="filename">The filename to use</param>
- <param name="append">Whether to append to the file, or overwrite</param>
- <param name="encoding">The encoding to use</param>
- <remarks>
- <para>
- Open the file specified and prepare for logging.
- No writes will be made until <see cref="M:log4net.Appender.FileAppender.MinimalLock.AcquireLock"/> is called.
- Must be called before any calls to <see cref="M:log4net.Appender.FileAppender.MinimalLock.AcquireLock"/>,
- <see cref="M:log4net.Appender.FileAppender.MinimalLock.ReleaseLock"/> and <see cref="M:log4net.Appender.FileAppender.MinimalLock.CloseFile"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.MinimalLock.CloseFile">
- <summary>
- Close the file
- </summary>
- <remarks>
- <para>
- Close the file. No further writes will be made.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.MinimalLock.AcquireLock">
- <summary>
- Acquire the lock on the file
- </summary>
- <returns>A stream that is ready to be written to.</returns>
- <remarks>
- <para>
- Acquire the lock on the file in preparation for writing to it.
- Return a stream pointing to the file. <see cref="M:log4net.Appender.FileAppender.MinimalLock.ReleaseLock"/>
- must be called to release the lock on the output file.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.MinimalLock.ReleaseLock">
- <summary>
- Release the lock on the file
- </summary>
- <remarks>
- <para>
- Release the lock on the file. No further writes will be made to the
- stream until <see cref="M:log4net.Appender.FileAppender.MinimalLock.AcquireLock"/> is called again.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.ForwardingAppender">
- <summary>
- This appender forwards logging events to attached appenders.
- </summary>
- <remarks>
- <para>
- The forwarding appender can be used to specify different thresholds
- and filters for the same appender at different locations within the hierarchy.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ForwardingAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.OnClose">
- <summary>
- Closes the appender and releases resources.
- </summary>
- <remarks>
- <para>
- Releases any resources allocated within the appender such as file handles,
- network connections, etc.
- </para>
- <para>
- It is a programming error to append to a closed appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Forward the logging event to the attached appenders
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Delivers the logging event to all the attached appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.Append(log4net.Core.LoggingEvent[])">
- <summary>
- Forward the logging events to the attached appenders
- </summary>
- <param name="loggingEvents">The array of events to log.</param>
- <remarks>
- <para>
- Delivers the logging events to all the attached appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.AddAppender(log4net.Appender.IAppender)">
- <summary>
- Adds an <see cref="T:log4net.Appender.IAppender"/> to the list of appenders of this
- instance.
- </summary>
- <param name="newAppender">The <see cref="T:log4net.Appender.IAppender"/> to add to this appender.</param>
- <remarks>
- <para>
- If the specified <see cref="T:log4net.Appender.IAppender"/> is already in the list of
- appenders, then it won't be added again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.GetAppender(System.String)">
- <summary>
- Looks for the appender with the specified name.
- </summary>
- <param name="name">The name of the appender to lookup.</param>
- <returns>
- The appender with the specified name, or <c>null</c>.
- </returns>
- <remarks>
- <para>
- Get the named appender attached to this appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.RemoveAllAppenders">
- <summary>
- Removes all previously added appenders from this appender.
- </summary>
- <remarks>
- <para>
- This is useful when re-reading configuration information.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.RemoveAppender(log4net.Appender.IAppender)">
- <summary>
- Removes the specified appender from the list of appenders.
- </summary>
- <param name="appender">The appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.RemoveAppender(System.String)">
- <summary>
- Removes the appender with the specified name from the list of appenders.
- </summary>
- <param name="name">The name of the appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </remarks>
- </member>
- <member name="F:log4net.Appender.ForwardingAppender.m_appenderAttachedImpl">
- <summary>
- Implementation of the <see cref="T:log4net.Core.IAppenderAttachable"/> interface
- </summary>
- </member>
- <member name="P:log4net.Appender.ForwardingAppender.Appenders">
- <summary>
- Gets the appenders contained in this appender as an
- <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <remarks>
- If no appenders can be found, then an <see cref="T:log4net.Util.EmptyCollection"/>
- is returned.
- </remarks>
- <returns>
- A collection of the appenders in this appender.
- </returns>
- </member>
- <member name="T:log4net.Appender.LocalSyslogAppender">
- <summary>
- Logs events to a local syslog service.
- </summary>
- <remarks>
- <note>
- This appender uses the POSIX libc library functions <c>openlog</c>, <c>syslog</c>, and <c>closelog</c>.
- If these functions are not available on the local system then this appender will not work!
- </note>
- <para>
- The functions <c>openlog</c>, <c>syslog</c>, and <c>closelog</c> are specified in SUSv2 and
- POSIX 1003.1-2001 standards. These are used to log messages to the local syslog service.
- </para>
- <para>
- This appender talks to a local syslog service. If you need to log to a remote syslog
- daemon and you cannot configure your local syslog service to do this you may be
- able to use the <see cref="T:log4net.Appender.RemoteSyslogAppender"/> to log via UDP.
- </para>
- <para>
- Syslog messages must have a facility and and a severity. The severity
- is derived from the Level of the logging event.
- The facility must be chosen from the set of defined syslog
- <see cref="T:log4net.Appender.LocalSyslogAppender.SyslogFacility"/> values. The facilities list is predefined
- and cannot be extended.
- </para>
- <para>
- An identifier is specified with each log message. This can be specified
- by setting the <see cref="P:log4net.Appender.LocalSyslogAppender.Identity"/> property. The identity (also know
- as the tag) must not contain white space. The default value for the
- identity is the application name (from <see cref="P:log4net.Util.SystemInfo.ApplicationFriendlyName"/>).
- </para>
- </remarks>
- <author>Rob Lyon</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.LocalSyslogAppender"/> class.
- </summary>
- <remarks>
- This instance of the <see cref="T:log4net.Appender.LocalSyslogAppender"/> class is set up to write
- to a local syslog service.
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.AddMapping(log4net.Appender.LocalSyslogAppender.LevelSeverity)">
- <summary>
- Add a mapping of level to severity
- </summary>
- <param name="mapping">The mapping to add</param>
- <remarks>
- <para>
- Adds a <see cref="T:log4net.Appender.LocalSyslogAppender.LevelSeverity"/> to this appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.LocalSyslogAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.LocalSyslogAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.LocalSyslogAppender.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the event to a remote syslog daemon.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.OnClose">
- <summary>
- Close the syslog when the appender is closed
- </summary>
- <remarks>
- <para>
- Close the syslog when the appender is closed
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.GetSeverity(log4net.Core.Level)">
- <summary>
- Translates a log4net level to a syslog severity.
- </summary>
- <param name="level">A log4net level.</param>
- <returns>A syslog severity.</returns>
- <remarks>
- <para>
- Translates a log4net level to a syslog severity.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.GeneratePriority(log4net.Appender.LocalSyslogAppender.SyslogFacility,log4net.Appender.LocalSyslogAppender.SyslogSeverity)">
- <summary>
- Generate a syslog priority.
- </summary>
- <param name="facility">The syslog facility.</param>
- <param name="severity">The syslog severity.</param>
- <returns>A syslog priority.</returns>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.m_facility">
- <summary>
- The facility. The default facility is <see cref="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.User"/>.
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.m_identity">
- <summary>
- The message identity
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.m_handleToIdentity">
- <summary>
- Marshaled handle to the identity string. We have to hold on to the
- string as the <c>openlog</c> and <c>syslog</c> APIs just hold the
- pointer to the ident and dereference it for each log message.
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.m_levelMapping">
- <summary>
- Mapping from level object to syslog severity
- </summary>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.openlog(System.IntPtr,System.Int32,log4net.Appender.LocalSyslogAppender.SyslogFacility)">
- <summary>
- Open connection to system logger.
- </summary>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.syslog(System.Int32,System.String,System.String)">
- <summary>
- Generate a log message.
- </summary>
- <remarks>
- <para>
- The libc syslog method takes a format string and a variable argument list similar
- to the classic printf function. As this type of vararg list is not supported
- by C# we need to specify the arguments explicitly. Here we have specified the
- format string with a single message argument. The caller must set the format
- string to <c>"%s"</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.closelog">
- <summary>
- Close descriptor used to write to system logger.
- </summary>
- </member>
- <member name="P:log4net.Appender.LocalSyslogAppender.Identity">
- <summary>
- Message identity
- </summary>
- <remarks>
- <para>
- An identifier is specified with each log message. This can be specified
- by setting the <see cref="P:log4net.Appender.LocalSyslogAppender.Identity"/> property. The identity (also know
- as the tag) must not contain white space. The default value for the
- identity is the application name (from <see cref="P:log4net.Util.SystemInfo.ApplicationFriendlyName"/>).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.LocalSyslogAppender.Facility">
- <summary>
- Syslog facility
- </summary>
- <remarks>
- Set to one of the <see cref="T:log4net.Appender.LocalSyslogAppender.SyslogFacility"/> values. The list of
- facilities is predefined and cannot be extended. The default value
- is <see cref="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.User"/>.
- </remarks>
- </member>
- <member name="P:log4net.Appender.LocalSyslogAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.LocalSyslogAppender.SyslogSeverity">
- <summary>
- syslog severities
- </summary>
- <remarks>
- <para>
- The log4net Level maps to a syslog severity using the
- <see cref="M:log4net.Appender.LocalSyslogAppender.AddMapping(log4net.Appender.LocalSyslogAppender.LevelSeverity)"/> method and the <see cref="T:log4net.Appender.LocalSyslogAppender.LevelSeverity"/>
- class. The severity is set on <see cref="P:log4net.Appender.LocalSyslogAppender.LevelSeverity.Severity"/>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Emergency">
- <summary>
- system is unusable
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Alert">
- <summary>
- action must be taken immediately
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Critical">
- <summary>
- critical conditions
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Error">
- <summary>
- error conditions
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Warning">
- <summary>
- warning conditions
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Notice">
- <summary>
- normal but significant condition
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Informational">
- <summary>
- informational
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Debug">
- <summary>
- debug-level messages
- </summary>
- </member>
- <member name="T:log4net.Appender.LocalSyslogAppender.SyslogFacility">
- <summary>
- syslog facilities
- </summary>
- <remarks>
- <para>
- The syslog facility defines which subsystem the logging comes from.
- This is set on the <see cref="P:log4net.Appender.LocalSyslogAppender.Facility"/> property.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Kernel">
- <summary>
- kernel messages
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.User">
- <summary>
- random user-level messages
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Mail">
- <summary>
- mail system
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Daemons">
- <summary>
- system daemons
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Authorization">
- <summary>
- security/authorization messages
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Syslog">
- <summary>
- messages generated internally by syslogd
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Printer">
- <summary>
- line printer subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.News">
- <summary>
- network news subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Uucp">
- <summary>
- UUCP subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Clock">
- <summary>
- clock (cron/at) daemon
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Authorization2">
- <summary>
- security/authorization messages (private)
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Ftp">
- <summary>
- ftp daemon
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Ntp">
- <summary>
- NTP subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Audit">
- <summary>
- log audit
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Alert">
- <summary>
- log alert
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Clock2">
- <summary>
- clock daemon
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local0">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local1">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local2">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local3">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local4">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local5">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local6">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local7">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="T:log4net.Appender.LocalSyslogAppender.LevelSeverity">
- <summary>
- A class to act as a mapping between the level that a logging call is made at and
- the syslog severity that is should be logged at.
- </summary>
- <remarks>
- <para>
- A class to act as a mapping between the level that a logging call is made at and
- the syslog severity that is should be logged at.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.LocalSyslogAppender.LevelSeverity.Severity">
- <summary>
- The mapped syslog severity for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The mapped syslog severity for the specified level
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.MemoryAppender">
- <summary>
- Stores logging events in an array.
- </summary>
- <remarks>
- <para>
- The memory appender stores all the logging events
- that are appended in an in-memory array.
- </para>
- <para>
- Use the <see cref="M:log4net.Appender.MemoryAppender.GetEvents"/> method to get
- the current list of events that have been appended.
- </para>
- <para>
- Use the <see cref="M:log4net.Appender.MemoryAppender.Clear"/> method to clear the
- current list of events.
- </para>
- </remarks>
- <author>Julian Biddle</author>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.MemoryAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.MemoryAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.MemoryAppender.GetEvents">
- <summary>
- Gets the events that have been logged.
- </summary>
- <returns>The events that have been logged</returns>
- <remarks>
- <para>
- Gets the events that have been logged.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.MemoryAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">the event to log</param>
- <remarks>
- <para>Stores the <paramref name="loggingEvent"/> in the events list.</para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.MemoryAppender.Clear">
- <summary>
- Clear the list of events
- </summary>
- <remarks>
- Clear the list of events
- </remarks>
- </member>
- <member name="F:log4net.Appender.MemoryAppender.m_eventsList">
- <summary>
- The list of events that have been appended.
- </summary>
- </member>
- <member name="F:log4net.Appender.MemoryAppender.m_fixFlags">
- <summary>
- Value indicating which fields in the event should be fixed
- </summary>
- <remarks>
- By default all fields are fixed
- </remarks>
- </member>
- <member name="P:log4net.Appender.MemoryAppender.OnlyFixPartialEventData">
- <summary>
- Gets or sets a value indicating whether only part of the logging event
- data should be fixed.
- </summary>
- <value>
- <c>true</c> if the appender should only fix part of the logging event
- data, otherwise <c>false</c>. The default is <c>false</c>.
- </value>
- <remarks>
- <para>
- Setting this property to <c>true</c> will cause only part of the event
- data to be fixed and stored in the appender, hereby improving performance.
- </para>
- <para>
- See <see cref="M:log4net.Core.LoggingEvent.FixVolatileData(System.Boolean)"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.MemoryAppender.Fix">
- <summary>
- Gets or sets the fields that will be fixed in the event
- </summary>
- <remarks>
- <para>
- The logging event needs to have certain thread specific values
- captured before it can be buffered. See <see cref="P:log4net.Core.LoggingEvent.Fix"/>
- for details.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.NetSendAppender">
- <summary>
- Logs entries by sending network messages using the
- <see cref="M:log4net.Appender.NetSendAppender.NetMessageBufferSend(System.String,System.String,System.String,System.String,System.Int32)"/> native function.
- </summary>
- <remarks>
- <para>
- You can send messages only to names that are active
- on the network. If you send the message to a user name,
- that user must be logged on and running the Messenger
- service to receive the message.
- </para>
- <para>
- The receiver will get a top most window displaying the
- messages one at a time, therefore this appender should
- not be used to deliver a high volume of messages.
- </para>
- <para>
- The following table lists some possible uses for this appender :
- </para>
- <para>
- <list type="table">
- <listheader>
- <term>Action</term>
- <description>Property Value(s)</description>
- </listheader>
- <item>
- <term>Send a message to a user account on the local machine</term>
- <description>
- <para>
- <paramref name="Server"/> = &lt;name of the local machine&gt;
- </para>
- <para>
- <paramref name="Recipient"/> = &lt;user name&gt;
- </para>
- </description>
- </item>
- <item>
- <term>Send a message to a user account on a remote machine</term>
- <description>
- <para>
- <paramref name="Server"/> = &lt;name of the remote machine&gt;
- </para>
- <para>
- <paramref name="Recipient"/> = &lt;user name&gt;
- </para>
- </description>
- </item>
- <item>
- <term>Send a message to a domain user account</term>
- <description>
- <para>
- <paramref name="Server"/> = &lt;name of a domain controller | uninitialized&gt;
- </para>
- <para>
- <paramref name="Recipient"/> = &lt;user name&gt;
- </para>
- </description>
- </item>
- <item>
- <term>Send a message to all the names in a workgroup or domain</term>
- <description>
- <para>
- <paramref name="Recipient"/> = &lt;workgroup name | domain name&gt;*
- </para>
- </description>
- </item>
- <item>
- <term>Send a message from the local machine to a remote machine</term>
- <description>
- <para>
- <paramref name="Server"/> = &lt;name of the local machine | uninitialized&gt;
- </para>
- <para>
- <paramref name="Recipient"/> = &lt;name of the remote machine&gt;
- </para>
- </description>
- </item>
- </list>
- </para>
- <para>
- <b>Note :</b> security restrictions apply for sending
- network messages, see <see cref="M:log4net.Appender.NetSendAppender.NetMessageBufferSend(System.String,System.String,System.String,System.String,System.Int32)"/>
- for more information.
- </para>
- </remarks>
- <example>
- <para>
- An example configuration section to log information
- using this appender from the local machine, named
- LOCAL_PC, to machine OPERATOR_PC :
- </para>
- <code lang="XML" escaped="true">
- <appender name="NetSendAppender_Operator" type="log4net.Appender.NetSendAppender">
- <server value="LOCAL_PC"/>
- <recipient value="OPERATOR_PC"/>
- <layout type="log4net.Layout.PatternLayout" value="%-5p %c [%x] - %m%n"/>
- </appender>
- </code>
- </example>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Appender.NetSendAppender.m_server">
- <summary>
- The DNS or NetBIOS name of the server on which the function is to execute.
- </summary>
- </member>
- <member name="F:log4net.Appender.NetSendAppender.m_sender">
- <summary>
- The sender of the network message.
- </summary>
- </member>
- <member name="F:log4net.Appender.NetSendAppender.m_recipient">
- <summary>
- The message alias to which the message should be sent.
- </summary>
- </member>
- <member name="F:log4net.Appender.NetSendAppender.m_securityContext">
- <summary>
- The security context to use for privileged calls
- </summary>
- </member>
- <member name="M:log4net.Appender.NetSendAppender.#ctor">
- <summary>
- Initializes the appender.
- </summary>
- <remarks>
- The default constructor initializes all fields to their default values.
- </remarks>
- </member>
- <member name="M:log4net.Appender.NetSendAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.NetSendAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.NetSendAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.NetSendAppender.ActivateOptions"/> must be called again.
- </para>
- <para>
- The appender will be ignored if no <see cref="P:log4net.Appender.NetSendAppender.Recipient"/> was specified.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">The required property <see cref="P:log4net.Appender.NetSendAppender.Recipient"/> was not specified.</exception>
- </member>
- <member name="M:log4net.Appender.NetSendAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Sends the event using a network message.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.NetSendAppender.NetMessageBufferSend(System.String,System.String,System.String,System.String,System.Int32)">
- <summary>
- Sends a buffer of information to a registered message alias.
- </summary>
- <param name="serverName">The DNS or NetBIOS name of the server on which the function is to execute.</param>
- <param name="msgName">The message alias to which the message buffer should be sent</param>
- <param name="fromName">The originator of the message.</param>
- <param name="buffer">The message text.</param>
- <param name="bufferSize">The length, in bytes, of the message text.</param>
- <remarks>
- <para>
- The following restrictions apply for sending network messages:
- </para>
- <para>
- <list type="table">
- <listheader>
- <term>Platform</term>
- <description>Requirements</description>
- </listheader>
- <item>
- <term>Windows NT</term>
- <description>
- <para>
- No special group membership is required to send a network message.
- </para>
- <para>
- Admin, Accounts, Print, or Server Operator group membership is required to
- successfully send a network message on a remote server.
- </para>
- </description>
- </item>
- <item>
- <term>Windows 2000 or later</term>
- <description>
- <para>
- If you send a message on a domain controller that is running Active Directory,
- access is allowed or denied based on the access control list (ACL) for the securable
- object. The default ACL permits only Domain Admins and Account Operators to send a network message.
- </para>
- <para>
- On a member server or workstation, only Administrators and Server Operators can send a network message.
- </para>
- </description>
- </item>
- </list>
- </para>
- <para>
- For more information see <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/security_requirements_for_the_network_management_functions.asp">Security Requirements for the Network Management Functions</a>.
- </para>
- </remarks>
- <returns>
- <para>
- If the function succeeds, the return value is zero.
- </para>
- </returns>
- </member>
- <member name="P:log4net.Appender.NetSendAppender.Sender">
- <summary>
- Gets or sets the sender of the message.
- </summary>
- <value>
- The sender of the message.
- </value>
- <remarks>
- If this property is not specified, the message is sent from the local computer.
- </remarks>
- </member>
- <member name="P:log4net.Appender.NetSendAppender.Recipient">
- <summary>
- Gets or sets the message alias to which the message should be sent.
- </summary>
- <value>
- The recipient of the message.
- </value>
- <remarks>
- This property should always be specified in order to send a message.
- </remarks>
- </member>
- <member name="P:log4net.Appender.NetSendAppender.Server">
- <summary>
- Gets or sets the DNS or NetBIOS name of the remote server on which the function is to execute.
- </summary>
- <value>
- DNS or NetBIOS name of the remote server on which the function is to execute.
- </value>
- <remarks>
- <para>
- For Windows NT 4.0 and earlier, the string should begin with \\.
- </para>
- <para>
- If this property is not specified, the local computer is used.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.NetSendAppender.SecurityContext">
- <summary>
- Gets or sets the <see cref="P:log4net.Appender.NetSendAppender.SecurityContext"/> used to call the NetSend method.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.NetSendAppender.SecurityContext"/> used to call the NetSend method.
- </value>
- <remarks>
- <para>
- Unless a <see cref="P:log4net.Appender.NetSendAppender.SecurityContext"/> specified here for this appender
- the <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> is queried for the
- security context to use. The default behavior is to use the security context
- of the current thread.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.NetSendAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.OutputDebugStringAppender">
- <summary>
- Appends log events to the OutputDebugString system.
- </summary>
- <remarks>
- <para>
- OutputDebugStringAppender appends log events to the
- OutputDebugString system.
- </para>
- <para>
- The string is passed to the native <c>OutputDebugString</c>
- function.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.OutputDebugStringAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.OutputDebugStringAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.OutputDebugStringAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Write the logging event to the output debug string API
- </summary>
- <param name="loggingEvent">the event to log</param>
- <remarks>
- <para>
- Write the logging event to the output debug string API
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.OutputDebugStringAppender.OutputDebugString(System.String)">
- <summary>
- Stub for OutputDebugString native method
- </summary>
- <param name="message">the string to output</param>
- <remarks>
- <para>
- Stub for OutputDebugString native method
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.OutputDebugStringAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.RemoteSyslogAppender">
- <summary>
- Logs events to a remote syslog daemon.
- </summary>
- <remarks>
- <para>
- The BSD syslog protocol is used to remotely log to
- a syslog daemon. The syslogd listens for for messages
- on UDP port 514.
- </para>
- <para>
- The syslog UDP protocol is not authenticated. Most syslog daemons
- do not accept remote log messages because of the security implications.
- You may be able to use the LocalSyslogAppender to talk to a local
- syslog service.
- </para>
- <para>
- There is an RFC 3164 that claims to document the BSD Syslog Protocol.
- This RFC can be seen here: http://www.faqs.org/rfcs/rfc3164.html.
- This appender generates what the RFC calls an "Original Device Message",
- i.e. does not include the TIMESTAMP or HOSTNAME fields. By observation
- this format of message will be accepted by all current syslog daemon
- implementations. The daemon will attach the current time and the source
- hostname or IP address to any messages received.
- </para>
- <para>
- Syslog messages must have a facility and and a severity. The severity
- is derived from the Level of the logging event.
- The facility must be chosen from the set of defined syslog
- <see cref="T:log4net.Appender.RemoteSyslogAppender.SyslogFacility"/> values. The facilities list is predefined
- and cannot be extended.
- </para>
- <para>
- An identifier is specified with each log message. This can be specified
- by setting the <see cref="P:log4net.Appender.RemoteSyslogAppender.Identity"/> property. The identity (also know
- as the tag) must not contain white space. The default value for the
- identity is the application name (from <see cref="P:log4net.Core.LoggingEvent.Domain"/>).
- </para>
- </remarks>
- <author>Rob Lyon</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="T:log4net.Appender.UdpAppender">
- <summary>
- Sends logging events as connectionless UDP datagrams to a remote host or a
- multicast group using an <see cref="T:System.Net.Sockets.UdpClient"/>.
- </summary>
- <remarks>
- <para>
- UDP guarantees neither that messages arrive, nor that they arrive in the correct order.
- </para>
- <para>
- To view the logging results, a custom application can be developed that listens for logging
- events.
- </para>
- <para>
- When decoding events send via this appender remember to use the same encoding
- to decode the events as was used to send the events. See the <see cref="P:log4net.Appender.UdpAppender.Encoding"/>
- property to specify the encoding to use.
- </para>
- </remarks>
- <example>
- This example shows how to log receive logging events that are sent
- on IP address 244.0.0.1 and port 8080 to the console. The event is
- encoded in the packet as a unicode string and it is decoded as such.
- <code lang="C#">
- IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 0);
- UdpClient udpClient;
- byte[] buffer;
- string loggingEvent;
-
- try
- {
- udpClient = new UdpClient(8080);
-
- while(true)
- {
- buffer = udpClient.Receive(ref remoteEndPoint);
- loggingEvent = System.Text.Encoding.Unicode.GetString(buffer);
- Console.WriteLine(loggingEvent);
- }
- }
- catch(Exception e)
- {
- Console.WriteLine(e.ToString());
- }
- </code>
- <code lang="Visual Basic">
- Dim remoteEndPoint as IPEndPoint
- Dim udpClient as UdpClient
- Dim buffer as Byte()
- Dim loggingEvent as String
-
- Try
- remoteEndPoint = new IPEndPoint(IPAddress.Any, 0)
- udpClient = new UdpClient(8080)
-
- While True
- buffer = udpClient.Receive(ByRef remoteEndPoint)
- loggingEvent = System.Text.Encoding.Unicode.GetString(buffer)
- Console.WriteLine(loggingEvent)
- Wend
- Catch e As Exception
- Console.WriteLine(e.ToString())
- End Try
- </code>
- <para>
- An example configuration section to log information using this appender to the
- IP 224.0.0.1 on port 8080:
- </para>
- <code lang="XML" escaped="true">
- <appender name="UdpAppender" type="log4net.Appender.UdpAppender">
- <remoteAddress value="224.0.0.1"/>
- <remotePort value="8080"/>
- <layout type="log4net.Layout.PatternLayout" value="%-5level %logger [%ndc] - %message%newline"/>
- </appender>
- </code>
- </example>
- <author>Gert Driesen</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.UdpAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.UdpAppender"/> class.
- </summary>
- <remarks>
- The default constructor initializes all fields to their default values.
- </remarks>
- </member>
- <member name="M:log4net.Appender.UdpAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.UdpAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.UdpAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.UdpAppender.ActivateOptions"/> must be called again.
- </para>
- <para>
- The appender will be ignored if no <see cref="P:log4net.Appender.UdpAppender.RemoteAddress"/> was specified or
- an invalid remote or local TCP port number was specified.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">The required property <see cref="P:log4net.Appender.UdpAppender.RemoteAddress"/> was not specified.</exception>
- <exception cref="T:System.ArgumentOutOfRangeException">The TCP port number assigned to <see cref="P:log4net.Appender.UdpAppender.LocalPort"/> or <see cref="P:log4net.Appender.UdpAppender.RemotePort"/> is less than <see cref="F:System.Net.IPEndPoint.MinPort"/> or greater than <see cref="F:System.Net.IPEndPoint.MaxPort"/>.</exception>
- </member>
- <member name="M:log4net.Appender.UdpAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Sends the event using an UDP datagram.
- </para>
- <para>
- Exceptions are passed to the <see cref="P:log4net.Appender.AppenderSkeleton.ErrorHandler"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.UdpAppender.OnClose">
- <summary>
- Closes the UDP connection and releases all resources associated with
- this <see cref="T:log4net.Appender.UdpAppender"/> instance.
- </summary>
- <remarks>
- <para>
- Disables the underlying <see cref="T:System.Net.Sockets.UdpClient"/> and releases all managed
- and unmanaged resources associated with the <see cref="T:log4net.Appender.UdpAppender"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.UdpAppender.InitializeClientConnection">
- <summary>
- Initializes the underlying <see cref="T:System.Net.Sockets.UdpClient"/> connection.
- </summary>
- <remarks>
- <para>
- The underlying <see cref="T:System.Net.Sockets.UdpClient"/> is initialized and binds to the
- port number from which you intend to communicate.
- </para>
- <para>
- Exceptions are passed to the <see cref="P:log4net.Appender.AppenderSkeleton.ErrorHandler"/>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.UdpAppender.m_remoteAddress">
- <summary>
- The IP address of the remote host or multicast group to which
- the logging event will be sent.
- </summary>
- </member>
- <member name="F:log4net.Appender.UdpAppender.m_remotePort">
- <summary>
- The TCP port number of the remote host or multicast group to
- which the logging event will be sent.
- </summary>
- </member>
- <member name="F:log4net.Appender.UdpAppender.m_remoteEndPoint">
- <summary>
- The cached remote endpoint to which the logging events will be sent.
- </summary>
- </member>
- <member name="F:log4net.Appender.UdpAppender.m_localPort">
- <summary>
- The TCP port number from which the <see cref="T:System.Net.Sockets.UdpClient"/> will communicate.
- </summary>
- </member>
- <member name="F:log4net.Appender.UdpAppender.m_client">
- <summary>
- The <see cref="T:System.Net.Sockets.UdpClient"/> instance that will be used for sending the
- logging events.
- </summary>
- </member>
- <member name="F:log4net.Appender.UdpAppender.m_encoding">
- <summary>
- The encoding to use for the packet.
- </summary>
- </member>
- <member name="P:log4net.Appender.UdpAppender.RemoteAddress">
- <summary>
- Gets or sets the IP address of the remote host or multicast group to which
- the underlying <see cref="T:System.Net.Sockets.UdpClient"/> should sent the logging event.
- </summary>
- <value>
- The IP address of the remote host or multicast group to which the logging event
- will be sent.
- </value>
- <remarks>
- <para>
- Multicast addresses are identified by IP class <b>D</b> addresses (in the range 224.0.0.0 to
- 239.255.255.255). Multicast packets can pass across different networks through routers, so
- it is possible to use multicasts in an Internet scenario as long as your network provider
- supports multicasting.
- </para>
- <para>
- Hosts that want to receive particular multicast messages must register their interest by joining
- the multicast group. Multicast messages are not sent to networks where no host has joined
- the multicast group. Class <b>D</b> IP addresses are used for multicast groups, to differentiate
- them from normal host addresses, allowing nodes to easily detect if a message is of interest.
- </para>
- <para>
- Static multicast addresses that are needed globally are assigned by IANA. A few examples are listed in the table below:
- </para>
- <para>
- <list type="table">
- <listheader>
- <term>IP Address</term>
- <description>Description</description>
- </listheader>
- <item>
- <term>224.0.0.1</term>
- <description>
- <para>
- Sends a message to all system on the subnet.
- </para>
- </description>
- </item>
- <item>
- <term>224.0.0.2</term>
- <description>
- <para>
- Sends a message to all routers on the subnet.
- </para>
- </description>
- </item>
- <item>
- <term>224.0.0.12</term>
- <description>
- <para>
- The DHCP server answers messages on the IP address 224.0.0.12, but only on a subnet.
- </para>
- </description>
- </item>
- </list>
- </para>
- <para>
- A complete list of actually reserved multicast addresses and their owners in the ranges
- defined by RFC 3171 can be found at the <A href="http://www.iana.org/assignments/multicast-addresses">IANA web site</A>.
- </para>
- <para>
- The address range 239.0.0.0 to 239.255.255.255 is reserved for administrative scope-relative
- addresses. These addresses can be reused with other local groups. Routers are typically
- configured with filters to prevent multicast traffic in this range from flowing outside
- of the local network.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.UdpAppender.RemotePort">
- <summary>
- Gets or sets the TCP port number of the remote host or multicast group to which
- the underlying <see cref="T:System.Net.Sockets.UdpClient"/> should sent the logging event.
- </summary>
- <value>
- An integer value in the range <see cref="F:System.Net.IPEndPoint.MinPort"/> to <see cref="F:System.Net.IPEndPoint.MaxPort"/>
- indicating the TCP port number of the remote host or multicast group to which the logging event
- will be sent.
- </value>
- <remarks>
- The underlying <see cref="T:System.Net.Sockets.UdpClient"/> will send messages to this TCP port number
- on the remote host or multicast group.
- </remarks>
- <exception cref="T:System.ArgumentOutOfRangeException">The value specified is less than <see cref="F:System.Net.IPEndPoint.MinPort"/> or greater than <see cref="F:System.Net.IPEndPoint.MaxPort"/>.</exception>
- </member>
- <member name="P:log4net.Appender.UdpAppender.LocalPort">
- <summary>
- Gets or sets the TCP port number from which the underlying <see cref="T:System.Net.Sockets.UdpClient"/> will communicate.
- </summary>
- <value>
- An integer value in the range <see cref="F:System.Net.IPEndPoint.MinPort"/> to <see cref="F:System.Net.IPEndPoint.MaxPort"/>
- indicating the TCP port number from which the underlying <see cref="T:System.Net.Sockets.UdpClient"/> will communicate.
- </value>
- <remarks>
- <para>
- The underlying <see cref="T:System.Net.Sockets.UdpClient"/> will bind to this port for sending messages.
- </para>
- <para>
- Setting the value to 0 (the default) will cause the udp client not to bind to
- a local port.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentOutOfRangeException">The value specified is less than <see cref="F:System.Net.IPEndPoint.MinPort"/> or greater than <see cref="F:System.Net.IPEndPoint.MaxPort"/>.</exception>
- </member>
- <member name="P:log4net.Appender.UdpAppender.Encoding">
- <summary>
- Gets or sets <see cref="P:log4net.Appender.UdpAppender.Encoding"/> used to write the packets.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.UdpAppender.Encoding"/> used to write the packets.
- </value>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.UdpAppender.Encoding"/> used to write the packets.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.UdpAppender.Client">
- <summary>
- Gets or sets the underlying <see cref="T:System.Net.Sockets.UdpClient"/>.
- </summary>
- <value>
- The underlying <see cref="T:System.Net.Sockets.UdpClient"/>.
- </value>
- <remarks>
- <see cref="T:log4net.Appender.UdpAppender"/> creates a <see cref="T:System.Net.Sockets.UdpClient"/> to send logging events
- over a network. Classes deriving from <see cref="T:log4net.Appender.UdpAppender"/> can use this
- property to get or set this <see cref="T:System.Net.Sockets.UdpClient"/>. Use the underlying <see cref="T:System.Net.Sockets.UdpClient"/>
- returned from <see cref="P:log4net.Appender.UdpAppender.Client"/> if you require access beyond that which
- <see cref="T:log4net.Appender.UdpAppender"/> provides.
- </remarks>
- </member>
- <member name="P:log4net.Appender.UdpAppender.RemoteEndPoint">
- <summary>
- Gets or sets the cached remote endpoint to which the logging events should be sent.
- </summary>
- <value>
- The cached remote endpoint to which the logging events will be sent.
- </value>
- <remarks>
- The <see cref="M:log4net.Appender.UdpAppender.ActivateOptions"/> method will initialize the remote endpoint
- with the values of the <see cref="P:log4net.Appender.UdpAppender.RemoteAddress"/> and <see cref="P:log4net.Appender.UdpAppender.RemotePort"/>
- properties.
- </remarks>
- </member>
- <member name="P:log4net.Appender.UdpAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.DefaultSyslogPort">
- <summary>
- Syslog port 514
- </summary>
- </member>
- <member name="M:log4net.Appender.RemoteSyslogAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.RemoteSyslogAppender"/> class.
- </summary>
- <remarks>
- This instance of the <see cref="T:log4net.Appender.RemoteSyslogAppender"/> class is set up to write
- to a remote syslog daemon.
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemoteSyslogAppender.AddMapping(log4net.Appender.RemoteSyslogAppender.LevelSeverity)">
- <summary>
- Add a mapping of level to severity
- </summary>
- <param name="mapping">The mapping to add</param>
- <remarks>
- <para>
- Add a <see cref="T:log4net.Appender.RemoteSyslogAppender.LevelSeverity"/> mapping to this appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemoteSyslogAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the event to a remote syslog daemon.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemoteSyslogAppender.ActivateOptions">
- <summary>
- Initialize the options for this appender
- </summary>
- <remarks>
- <para>
- Initialize the level to syslog severity mappings set on this appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemoteSyslogAppender.GetSeverity(log4net.Core.Level)">
- <summary>
- Translates a log4net level to a syslog severity.
- </summary>
- <param name="level">A log4net level.</param>
- <returns>A syslog severity.</returns>
- <remarks>
- <para>
- Translates a log4net level to a syslog severity.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemoteSyslogAppender.GeneratePriority(log4net.Appender.RemoteSyslogAppender.SyslogFacility,log4net.Appender.RemoteSyslogAppender.SyslogSeverity)">
- <summary>
- Generate a syslog priority.
- </summary>
- <param name="facility">The syslog facility.</param>
- <param name="severity">The syslog severity.</param>
- <returns>A syslog priority.</returns>
- <remarks>
- <para>
- Generate a syslog priority.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.m_facility">
- <summary>
- The facility. The default facility is <see cref="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.User"/>.
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.m_identity">
- <summary>
- The message identity
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.m_levelMapping">
- <summary>
- Mapping from level object to syslog severity
- </summary>
- </member>
- <member name="P:log4net.Appender.RemoteSyslogAppender.Identity">
- <summary>
- Message identity
- </summary>
- <remarks>
- <para>
- An identifier is specified with each log message. This can be specified
- by setting the <see cref="P:log4net.Appender.RemoteSyslogAppender.Identity"/> property. The identity (also know
- as the tag) must not contain white space. The default value for the
- identity is the application name (from <see cref="P:log4net.Core.LoggingEvent.Domain"/>).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RemoteSyslogAppender.Facility">
- <summary>
- Syslog facility
- </summary>
- <remarks>
- Set to one of the <see cref="T:log4net.Appender.RemoteSyslogAppender.SyslogFacility"/> values. The list of
- facilities is predefined and cannot be extended. The default value
- is <see cref="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.User"/>.
- </remarks>
- </member>
- <member name="T:log4net.Appender.RemoteSyslogAppender.SyslogSeverity">
- <summary>
- syslog severities
- </summary>
- <remarks>
- <para>
- The syslog severities.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Emergency">
- <summary>
- system is unusable
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Alert">
- <summary>
- action must be taken immediately
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Critical">
- <summary>
- critical conditions
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Error">
- <summary>
- error conditions
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Warning">
- <summary>
- warning conditions
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Notice">
- <summary>
- normal but significant condition
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Informational">
- <summary>
- informational
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Debug">
- <summary>
- debug-level messages
- </summary>
- </member>
- <member name="T:log4net.Appender.RemoteSyslogAppender.SyslogFacility">
- <summary>
- syslog facilities
- </summary>
- <remarks>
- <para>
- The syslog facilities
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Kernel">
- <summary>
- kernel messages
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.User">
- <summary>
- random user-level messages
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Mail">
- <summary>
- mail system
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Daemons">
- <summary>
- system daemons
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Authorization">
- <summary>
- security/authorization messages
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Syslog">
- <summary>
- messages generated internally by syslogd
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Printer">
- <summary>
- line printer subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.News">
- <summary>
- network news subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Uucp">
- <summary>
- UUCP subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Clock">
- <summary>
- clock (cron/at) daemon
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Authorization2">
- <summary>
- security/authorization messages (private)
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Ftp">
- <summary>
- ftp daemon
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Ntp">
- <summary>
- NTP subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Audit">
- <summary>
- log audit
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Alert">
- <summary>
- log alert
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Clock2">
- <summary>
- clock daemon
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local0">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local1">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local2">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local3">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local4">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local5">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local6">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local7">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="T:log4net.Appender.RemoteSyslogAppender.LevelSeverity">
- <summary>
- A class to act as a mapping between the level that a logging call is made at and
- the syslog severity that is should be logged at.
- </summary>
- <remarks>
- <para>
- A class to act as a mapping between the level that a logging call is made at and
- the syslog severity that is should be logged at.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RemoteSyslogAppender.LevelSeverity.Severity">
- <summary>
- The mapped syslog severity for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The mapped syslog severity for the specified level
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.RemotingAppender">
- <summary>
- Delivers logging events to a remote logging sink.
- </summary>
- <remarks>
- <para>
- This Appender is designed to deliver events to a remote sink.
- That is any object that implements the <see cref="T:log4net.Appender.RemotingAppender.IRemoteLoggingSink"/>
- interface. It delivers the events using .NET remoting. The
- object to deliver events to is specified by setting the
- appenders <see cref="P:log4net.Appender.RemotingAppender.Sink"/> property.</para>
- <para>
- The RemotingAppender buffers events before sending them. This allows it to
- make more efficient use of the remoting infrastructure.</para>
- <para>
- Once the buffer is full the events are still not sent immediately.
- They are scheduled to be sent using a pool thread. The effect is that
- the send occurs asynchronously. This is very important for a
- number of non obvious reasons. The remoting infrastructure will
- flow thread local variables (stored in the <see cref="T:System.Runtime.Remoting.Messaging.CallContext"/>),
- if they are marked as <see cref="T:System.Runtime.Remoting.Messaging.ILogicalThreadAffinative"/>, across the
- remoting boundary. If the server is not contactable then
- the remoting infrastructure will clear the <see cref="T:System.Runtime.Remoting.Messaging.ILogicalThreadAffinative"/>
- objects from the <see cref="T:System.Runtime.Remoting.Messaging.CallContext"/>. To prevent a logging failure from
- having side effects on the calling application the remoting call must be made
- from a separate thread to the one used by the application. A <see cref="T:System.Threading.ThreadPool"/>
- thread is used for this. If no <see cref="T:System.Threading.ThreadPool"/> thread is available then
- the events will block in the thread pool manager until a thread is available.</para>
- <para>
- Because the events are sent asynchronously using pool threads it is possible to close
- this appender before all the queued events have been sent.
- When closing the appender attempts to wait until all the queued events have been sent, but
- this will timeout after 30 seconds regardless.</para>
- <para>
- If this appender is being closed because the <see cref="E:System.AppDomain.ProcessExit"/>
- event has fired it may not be possible to send all the queued events. During process
- exit the runtime limits the time that a <see cref="E:System.AppDomain.ProcessExit"/>
- event handler is allowed to run for. If the runtime terminates the threads before
- the queued events have been sent then they will be lost. To ensure that all events
- are sent the appender must be closed before the application exits. See
- <see cref="M:log4net.Core.LoggerManager.Shutdown"/> for details on how to shutdown
- log4net programmatically.</para>
- </remarks>
- <seealso cref="T:log4net.Appender.RemotingAppender.IRemoteLoggingSink"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Daniel Cazzulino</author>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.RemotingAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.RemotingAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.RemotingAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.RemotingAppender.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.SendBuffer(log4net.Core.LoggingEvent[])">
- <summary>
- Send the contents of the buffer to the remote sink.
- </summary>
- <remarks>
- The events are not sent immediately. They are scheduled to be sent
- using a pool thread. The effect is that the send occurs asynchronously.
- This is very important for a number of non obvious reasons. The remoting
- infrastructure will flow thread local variables (stored in the <see cref="T:System.Runtime.Remoting.Messaging.CallContext"/>),
- if they are marked as <see cref="T:System.Runtime.Remoting.Messaging.ILogicalThreadAffinative"/>, across the
- remoting boundary. If the server is not contactable then
- the remoting infrastructure will clear the <see cref="T:System.Runtime.Remoting.Messaging.ILogicalThreadAffinative"/>
- objects from the <see cref="T:System.Runtime.Remoting.Messaging.CallContext"/>. To prevent a logging failure from
- having side effects on the calling application the remoting call must be made
- from a separate thread to the one used by the application. A <see cref="T:System.Threading.ThreadPool"/>
- thread is used for this. If no <see cref="T:System.Threading.ThreadPool"/> thread is available then
- the events will block in the thread pool manager until a thread is available.
- </remarks>
- <param name="events">The events to send.</param>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.OnClose">
- <summary>
- Override base class close.
- </summary>
- <remarks>
- <para>
- This method waits while there are queued work items. The events are
- sent asynchronously using <see cref="T:System.Threading.ThreadPool"/> work items. These items
- will be sent once a thread pool thread is available to send them, therefore
- it is possible to close the appender before all the queued events have been
- sent.</para>
- <para>
- This method attempts to wait until all the queued events have been sent, but this
- method will timeout after 30 seconds regardless.</para>
- <para>
- If the appender is being closed because the <see cref="E:System.AppDomain.ProcessExit"/>
- event has fired it may not be possible to send all the queued events. During process
- exit the runtime limits the time that a <see cref="E:System.AppDomain.ProcessExit"/>
- event handler is allowed to run for.</para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.BeginAsyncSend">
- <summary>
- A work item is being queued into the thread pool
- </summary>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.EndAsyncSend">
- <summary>
- A work item from the thread pool has completed
- </summary>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.SendBufferCallback(System.Object)">
- <summary>
- Send the contents of the buffer to the remote sink.
- </summary>
- <remarks>
- This method is designed to be used with the <see cref="T:System.Threading.ThreadPool"/>.
- This method expects to be passed an array of <see cref="T:log4net.Core.LoggingEvent"/>
- objects in the state param.
- </remarks>
- <param name="state">the logging events to send</param>
- </member>
- <member name="F:log4net.Appender.RemotingAppender.m_sinkUrl">
- <summary>
- The URL of the remote sink.
- </summary>
- </member>
- <member name="F:log4net.Appender.RemotingAppender.m_sinkObj">
- <summary>
- The local proxy (.NET remoting) for the remote logging sink.
- </summary>
- </member>
- <member name="F:log4net.Appender.RemotingAppender.m_queuedCallbackCount">
- <summary>
- The number of queued callbacks currently waiting or executing
- </summary>
- </member>
- <member name="F:log4net.Appender.RemotingAppender.m_workQueueEmptyEvent">
- <summary>
- Event used to signal when there are no queued work items
- </summary>
- <remarks>
- This event is set when there are no queued work items. In this
- state it is safe to close the appender.
- </remarks>
- </member>
- <member name="P:log4net.Appender.RemotingAppender.Sink">
- <summary>
- Gets or sets the URL of the well-known object that will accept
- the logging events.
- </summary>
- <value>
- The well-known URL of the remote sink.
- </value>
- <remarks>
- <para>
- The URL of the remoting sink that will accept logging events.
- The sink must implement the <see cref="T:log4net.Appender.RemotingAppender.IRemoteLoggingSink"/>
- interface.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.RemotingAppender.IRemoteLoggingSink">
- <summary>
- Interface used to deliver <see cref="T:log4net.Core.LoggingEvent"/> objects to a remote sink.
- </summary>
- <remarks>
- This interface must be implemented by a remoting sink
- if the <see cref="T:log4net.Appender.RemotingAppender"/> is to be used
- to deliver logging events to the sink.
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.IRemoteLoggingSink.LogEvents(log4net.Core.LoggingEvent[])">
- <summary>
- Delivers logging events to the remote sink
- </summary>
- <param name="events">Array of events to log.</param>
- <remarks>
- <para>
- Delivers logging events to the remote sink
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.RollingFileAppender">
- <summary>
- Appender that rolls log files based on size or date or both.
- </summary>
- <remarks>
- <para>
- RollingFileAppender can roll log files based on size or date or both
- depending on the setting of the <see cref="P:log4net.Appender.RollingFileAppender.RollingStyle"/> property.
- When set to <see cref="F:log4net.Appender.RollingFileAppender.RollingMode.Size"/> the log file will be rolled
- once its size exceeds the <see cref="P:log4net.Appender.RollingFileAppender.MaximumFileSize"/>.
- When set to <see cref="F:log4net.Appender.RollingFileAppender.RollingMode.Date"/> the log file will be rolled
- once the date boundary specified in the <see cref="P:log4net.Appender.RollingFileAppender.DatePattern"/> property
- is crossed.
- When set to <see cref="F:log4net.Appender.RollingFileAppender.RollingMode.Composite"/> the log file will be
- rolled once the date boundary specified in the <see cref="P:log4net.Appender.RollingFileAppender.DatePattern"/> property
- is crossed, but within a date boundary the file will also be rolled
- once its size exceeds the <see cref="P:log4net.Appender.RollingFileAppender.MaximumFileSize"/>.
- When set to <see cref="F:log4net.Appender.RollingFileAppender.RollingMode.Once"/> the log file will be rolled when
- the appender is configured. This effectively means that the log file can be
- rolled once per program execution.
- </para>
- <para>
- A of few additional optional features have been added:
- <list type="bullet">
- <item>Attach date pattern for current log file <see cref="P:log4net.Appender.RollingFileAppender.StaticLogFileName"/></item>
- <item>Backup number increments for newer files <see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/></item>
- <item>Infinite number of backups by file size <see cref="P:log4net.Appender.RollingFileAppender.MaxSizeRollBackups"/></item>
- </list>
- </para>
-
- <note>
- <para>
- For large or infinite numbers of backup files a <see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/>
- greater than zero is highly recommended, otherwise all the backup files need
- to be renamed each time a new backup is created.
- </para>
- <para>
- When Date/Time based rolling is used setting <see cref="P:log4net.Appender.RollingFileAppender.StaticLogFileName"/>
- to <see langword="true"/> will reduce the number of file renamings to few or none.
- </para>
- </note>
-
- <note type="caution">
- <para>
- Changing <see cref="P:log4net.Appender.RollingFileAppender.StaticLogFileName"/> or <see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/> without clearing
- the log file directory of backup files will cause unexpected and unwanted side effects.
- </para>
- </note>
-
- <para>
- If Date/Time based rolling is enabled this appender will attempt to roll existing files
- in the directory without a Date/Time tag based on the last write date of the base log file.
- The appender only rolls the log file when a message is logged. If Date/Time based rolling
- is enabled then the appender will not roll the log file at the Date/Time boundary but
- at the point when the next message is logged after the boundary has been crossed.
- </para>
-
- <para>
- The <see cref="T:log4net.Appender.RollingFileAppender"/> extends the <see cref="T:log4net.Appender.FileAppender"/> and
- has the same behavior when opening the log file.
- The appender will first try to open the file for writing when <see cref="M:log4net.Appender.RollingFileAppender.ActivateOptions"/>
- is called. This will typically be during configuration.
- If the file cannot be opened for writing the appender will attempt
- to open the file again each time a message is logged to the appender.
- If the file cannot be opened for writing when a message is logged then
- the message will be discarded by this appender.
- </para>
- <para>
- When rolling a backup file necessitates deleting an older backup file the
- file to be deleted is moved to a temporary name before being deleted.
- </para>
-
- <note type="caution">
- <para>
- A maximum number of backup files when rolling on date/time boundaries is not supported.
- </para>
- </note>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Aspi Havewala</author>
- <author>Douglas de la Torre</author>
- <author>Edward Smit</author>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.RollingFileAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.SetQWForFiles(System.IO.TextWriter)">
- <summary>
- Sets the quiet writer being used.
- </summary>
- <remarks>
- This method can be overridden by sub classes.
- </remarks>
- <param name="writer">the writer to set</param>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Write out a logging event.
- </summary>
- <param name="loggingEvent">the event to write to file.</param>
- <remarks>
- <para>
- Handles append time behavior for RollingFileAppender. This checks
- if a roll over either by date (checked first) or time (checked second)
- is need and then appends to the file last.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.Append(log4net.Core.LoggingEvent[])">
- <summary>
- Write out an array of logging events.
- </summary>
- <param name="loggingEvents">the events to write to file.</param>
- <remarks>
- <para>
- Handles append time behavior for RollingFileAppender. This checks
- if a roll over either by date (checked first) or time (checked second)
- is need and then appends to the file last.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.AdjustFileBeforeAppend">
- <summary>
- Performs any required rolling before outputting the next event
- </summary>
- <remarks>
- <para>
- Handles append time behavior for RollingFileAppender. This checks
- if a roll over either by date (checked first) or time (checked second)
- is need and then appends to the file last.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.OpenFile(System.String,System.Boolean)">
- <summary>
- Creates and opens the file for logging. If <see cref="P:log4net.Appender.RollingFileAppender.StaticLogFileName"/>
- is false then the fully qualified name is determined and used.
- </summary>
- <param name="fileName">the name of the file to open</param>
- <param name="append">true to append to existing file</param>
- <remarks>
- <para>This method will ensure that the directory structure
- for the <paramref name="fileName"/> specified exists.</para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.GetNextOutputFileName(System.String)">
- <summary>
- Get the current output file name
- </summary>
- <param name="fileName">the base file name</param>
- <returns>the output file name</returns>
- <remarks>
- The output file name is based on the base fileName specified.
- If <see cref="P:log4net.Appender.RollingFileAppender.StaticLogFileName"/> is set then the output
- file name is the same as the base file passed in. Otherwise
- the output file depends on the date pattern, on the count
- direction or both.
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.DetermineCurSizeRollBackups">
- <summary>
- Determines curSizeRollBackups (only within the current roll point)
- </summary>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.GetWildcardPatternForFile(System.String)">
- <summary>
- Generates a wildcard pattern that can be used to find all files
- that are similar to the base file name.
- </summary>
- <param name="baseFileName"></param>
- <returns></returns>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.GetExistingFiles(System.String)">
- <summary>
- Builds a list of filenames for all files matching the base filename plus a file
- pattern.
- </summary>
- <param name="baseFilePath"></param>
- <returns></returns>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.RollOverIfDateBoundaryCrossing">
- <summary>
- Initiates a roll over if needed for crossing a date boundary since the last run.
- </summary>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.ExistingInit">
- <summary>
- Initializes based on existing conditions at time of <see cref="M:log4net.Appender.RollingFileAppender.ActivateOptions"/>.
- </summary>
- <remarks>
- <para>
- Initializes based on existing conditions at time of <see cref="M:log4net.Appender.RollingFileAppender.ActivateOptions"/>.
- The following is done
- <list type="bullet">
- <item>determine curSizeRollBackups (only within the current roll point)</item>
- <item>initiates a roll over if needed for crossing a date boundary since the last run.</item>
- </list>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.InitializeFromOneFile(System.String,System.String)">
- <summary>
- Does the work of bumping the 'current' file counter higher
- to the highest count when an incremental file name is seen.
- The highest count is either the first file (when count direction
- is greater than 0) or the last file (when count direction less than 0).
- In either case, we want to know the highest count that is present.
- </summary>
- <param name="baseFile"></param>
- <param name="curFileName"></param>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.InitializeRollBackups(System.String,System.Collections.ArrayList)">
- <summary>
- Takes a list of files and a base file name, and looks for
- 'incremented' versions of the base file. Bumps the max
- count up to the highest count seen.
- </summary>
- <param name="baseFile"></param>
- <param name="arrayFiles"></param>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.ComputeCheckPeriod(System.String)">
- <summary>
- Calculates the RollPoint for the datePattern supplied.
- </summary>
- <param name="datePattern">the date pattern to calculate the check period for</param>
- <returns>The RollPoint that is most accurate for the date pattern supplied</returns>
- <remarks>
- Essentially the date pattern is examined to determine what the
- most suitable roll point is. The roll point chosen is the roll point
- with the smallest period that can be detected using the date pattern
- supplied. i.e. if the date pattern only outputs the year, month, day
- and hour then the smallest roll point that can be detected would be
- and hourly roll point as minutes could not be detected.
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.RollingFileAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.RollingFileAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.RollingFileAppender.ActivateOptions"/> must be called again.
- </para>
- <para>
- Sets initial conditions including date/time roll over information, first check,
- scheduledFilename, and calls <see cref="M:log4net.Appender.RollingFileAppender.ExistingInit"/> to initialize
- the current number of backups.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.RollOverTime(System.Boolean)">
- <summary>
- Rollover the file(s) to date/time tagged file(s).
- </summary>
- <param name="fileIsOpen">set to true if the file to be rolled is currently open</param>
- <remarks>
- <para>
- Rollover the file(s) to date/time tagged file(s).
- Resets curSizeRollBackups.
- If fileIsOpen is set then the new file is opened (through SafeOpenFile).
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.RollFile(System.String,System.String)">
- <summary>
- Renames file <paramref name="fromFile"/> to file <paramref name="toFile"/>.
- </summary>
- <param name="fromFile">Name of existing file to roll.</param>
- <param name="toFile">New name for file.</param>
- <remarks>
- <para>
- Renames file <paramref name="fromFile"/> to file <paramref name="toFile"/>. It
- also checks for existence of target file and deletes if it does.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.FileExists(System.String)">
- <summary>
- Test if a file exists at a specified path
- </summary>
- <param name="path">the path to the file</param>
- <returns>true if the file exists</returns>
- <remarks>
- <para>
- Test if a file exists at a specified path
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.DeleteFile(System.String)">
- <summary>
- Deletes the specified file if it exists.
- </summary>
- <param name="fileName">The file to delete.</param>
- <remarks>
- <para>
- Delete a file if is exists.
- The file is first moved to a new filename then deleted.
- This allows the file to be removed even when it cannot
- be deleted, but it still can be moved.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.RollOverSize">
- <summary>
- Implements file roll base on file size.
- </summary>
- <remarks>
- <para>
- If the maximum number of size based backups is reached
- (<c>curSizeRollBackups == maxSizeRollBackups</c>) then the oldest
- file is deleted -- its index determined by the sign of countDirection.
- If <c>countDirection</c> &lt; 0, then files
- {<c>File.1</c>, ..., <c>File.curSizeRollBackups -1</c>}
- are renamed to {<c>File.2</c>, ...,
- <c>File.curSizeRollBackups</c>}. Moreover, <c>File</c> is
- renamed <c>File.1</c> and closed.
- </para>
- <para>
- A new file is created to receive further log output.
- </para>
- <para>
- If <c>maxSizeRollBackups</c> is equal to zero, then the
- <c>File</c> is truncated with no backup files created.
- </para>
- <para>
- If <c>maxSizeRollBackups</c> &lt; 0, then <c>File</c> is
- renamed if needed and no files are deleted.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.RollOverRenameFiles(System.String)">
- <summary>
- Implements file roll.
- </summary>
- <param name="baseFileName">the base name to rename</param>
- <remarks>
- <para>
- If the maximum number of size based backups is reached
- (<c>curSizeRollBackups == maxSizeRollBackups</c>) then the oldest
- file is deleted -- its index determined by the sign of countDirection.
- If <c>countDirection</c> &lt; 0, then files
- {<c>File.1</c>, ..., <c>File.curSizeRollBackups -1</c>}
- are renamed to {<c>File.2</c>, ...,
- <c>File.curSizeRollBackups</c>}.
- </para>
- <para>
- If <c>maxSizeRollBackups</c> is equal to zero, then the
- <c>File</c> is truncated with no backup files created.
- </para>
- <para>
- If <c>maxSizeRollBackups</c> &lt; 0, then <c>File</c> is
- renamed if needed and no files are deleted.
- </para>
- <para>
- This is called by <see cref="M:log4net.Appender.RollingFileAppender.RollOverSize"/> to rename the files.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.NextCheckDate(System.DateTime,log4net.Appender.RollingFileAppender.RollPoint)">
- <summary>
- Get the start time of the next window for the current rollpoint
- </summary>
- <param name="currentDateTime">the current date</param>
- <param name="rollPoint">the type of roll point we are working with</param>
- <returns>the start time for the next roll point an interval after the currentDateTime date</returns>
- <remarks>
- <para>
- Returns the date of the next roll point after the currentDateTime date passed to the method.
- </para>
- <para>
- The basic strategy is to subtract the time parts that are less significant
- than the rollpoint from the current time. This should roll the time back to
- the start of the time window for the current rollpoint. Then we add 1 window
- worth of time and get the start time of the next window for the rollpoint.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_dateTime">
- <summary>
- This object supplies the current date/time. Allows test code to plug in
- a method to control this class when testing date/time based rolling.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_datePattern">
- <summary>
- The date pattern. By default, the pattern is set to <c>".yyyy-MM-dd"</c>
- meaning daily rollover.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_scheduledFilename">
- <summary>
- The actual formatted filename that is currently being written to
- or will be the file transferred to on roll over
- (based on staticLogFileName).
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_nextCheck">
- <summary>
- The timestamp when we shall next recompute the filename.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_now">
- <summary>
- Holds date of last roll over
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_rollPoint">
- <summary>
- The type of rolling done
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_maxFileSize">
- <summary>
- The default maximum file size is 10MB
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_maxSizeRollBackups">
- <summary>
- There is zero backup files by default
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_curSizeRollBackups">
- <summary>
- How many sized based backups have been made so far
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_countDirection">
- <summary>
- The rolling file count direction.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_rollingStyle">
- <summary>
- The rolling mode used in this appender.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_rollDate">
- <summary>
- Cache flag set if we are rolling by date.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_rollSize">
- <summary>
- Cache flag set if we are rolling by size.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_staticLogFileName">
- <summary>
- Value indicating whether to always log to the same file.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_baseFileName">
- <summary>
- FileName provided in configuration. Used for rolling properly
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.s_date1970">
- <summary>
- The 1st of January 1970 in UTC
- </summary>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.DatePattern">
- <summary>
- Gets or sets the date pattern to be used for generating file names
- when rolling over on date.
- </summary>
- <value>
- The date pattern to be used for generating file names when rolling
- over on date.
- </value>
- <remarks>
- <para>
- Takes a string in the same format as expected by
- <see cref="T:log4net.DateFormatter.SimpleDateFormatter"/>.
- </para>
- <para>
- This property determines the rollover schedule when rolling over
- on date.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.MaxSizeRollBackups">
- <summary>
- Gets or sets the maximum number of backup files that are kept before
- the oldest is erased.
- </summary>
- <value>
- The maximum number of backup files that are kept before the oldest is
- erased.
- </value>
- <remarks>
- <para>
- If set to zero, then there will be no backup files and the log file
- will be truncated when it reaches <see cref="P:log4net.Appender.RollingFileAppender.MaxFileSize"/>.
- </para>
- <para>
- If a negative number is supplied then no deletions will be made. Note
- that this could result in very slow performance as a large number of
- files are rolled over unless <see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/> is used.
- </para>
- <para>
- The maximum applies to <b>each</b> time based group of files and
- <b>not</b> the total.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.MaxFileSize">
- <summary>
- Gets or sets the maximum size that the output file is allowed to reach
- before being rolled over to backup files.
- </summary>
- <value>
- The maximum size in bytes that the output file is allowed to reach before being
- rolled over to backup files.
- </value>
- <remarks>
- <para>
- This property is equivalent to <see cref="P:log4net.Appender.RollingFileAppender.MaximumFileSize"/> except
- that it is required for differentiating the setter taking a
- <see cref="T:System.Int64"/> argument from the setter taking a <see cref="T:System.String"/>
- argument.
- </para>
- <para>
- The default maximum file size is 10MB (10*1024*1024).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.MaximumFileSize">
- <summary>
- Gets or sets the maximum size that the output file is allowed to reach
- before being rolled over to backup files.
- </summary>
- <value>
- The maximum size that the output file is allowed to reach before being
- rolled over to backup files.
- </value>
- <remarks>
- <para>
- This property allows you to specify the maximum size with the
- suffixes "KB", "MB" or "GB" so that the size is interpreted being
- expressed respectively in kilobytes, megabytes or gigabytes.
- </para>
- <para>
- For example, the value "10KB" will be interpreted as 10240 bytes.
- </para>
- <para>
- The default maximum file size is 10MB.
- </para>
- <para>
- If you have the option to set the maximum file size programmatically
- consider using the <see cref="P:log4net.Appender.RollingFileAppender.MaxFileSize"/> property instead as this
- allows you to set the size in bytes as a <see cref="T:System.Int64"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.CountDirection">
- <summary>
- Gets or sets the rolling file count direction.
- </summary>
- <value>
- The rolling file count direction.
- </value>
- <remarks>
- <para>
- Indicates if the current file is the lowest numbered file or the
- highest numbered file.
- </para>
- <para>
- By default newer files have lower numbers (<see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/> &lt; 0),
- i.e. log.1 is most recent, log.5 is the 5th backup, etc...
- </para>
- <para>
- <see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/> &gt;= 0 does the opposite i.e.
- log.1 is the first backup made, log.5 is the 5th backup made, etc.
- For infinite backups use <see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/> &gt;= 0 to reduce
- rollover costs.
- </para>
- <para>The default file count direction is -1.</para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.RollingStyle">
- <summary>
- Gets or sets the rolling style.
- </summary>
- <value>The rolling style.</value>
- <remarks>
- <para>
- The default rolling style is <see cref="F:log4net.Appender.RollingFileAppender.RollingMode.Composite"/>.
- </para>
- <para>
- When set to <see cref="F:log4net.Appender.RollingFileAppender.RollingMode.Once"/> this appender's
- <see cref="P:log4net.Appender.FileAppender.AppendToFile"/> property is set to <c>false</c>, otherwise
- the appender would append to a single file rather than rolling
- the file each time it is opened.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.StaticLogFileName">
- <summary>
- Gets or sets a value indicating whether to always log to
- the same file.
- </summary>
- <value>
- <c>true</c> if always should be logged to the same file, otherwise <c>false</c>.
- </value>
- <remarks>
- <para>
- By default file.log is always the current file. Optionally
- file.log.yyyy-mm-dd for current formatted datePattern can by the currently
- logging file (or file.log.curSizeRollBackup or even
- file.log.yyyy-mm-dd.curSizeRollBackup).
- </para>
- <para>
- This will make time based rollovers with a large number of backups
- much faster as the appender it won't have to rename all the backups!
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.RollingFileAppender.RollingMode">
- <summary>
- Style of rolling to use
- </summary>
- <remarks>
- <para>
- Style of rolling to use
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollingMode.Once">
- <summary>
- Roll files once per program execution
- </summary>
- <remarks>
- <para>
- Roll files once per program execution.
- Well really once each time this appender is
- configured.
- </para>
- <para>
- Setting this option also sets <c>AppendToFile</c> to
- <c>false</c> on the <c>RollingFileAppender</c>, otherwise
- this appender would just be a normal file appender.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollingMode.Size">
- <summary>
- Roll files based only on the size of the file
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollingMode.Date">
- <summary>
- Roll files based only on the date
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollingMode.Composite">
- <summary>
- Roll files based on both the size and date of the file
- </summary>
- </member>
- <member name="T:log4net.Appender.RollingFileAppender.RollPoint">
- <summary>
- The code assumes that the following 'time' constants are in a increasing sequence.
- </summary>
- <remarks>
- <para>
- The code assumes that the following 'time' constants are in a increasing sequence.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.InvalidRollPoint">
- <summary>
- Roll the log not based on the date
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.TopOfMinute">
- <summary>
- Roll the log for each minute
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.TopOfHour">
- <summary>
- Roll the log for each hour
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.HalfDay">
- <summary>
- Roll the log twice a day (midday and midnight)
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.TopOfDay">
- <summary>
- Roll the log each day (midnight)
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.TopOfWeek">
- <summary>
- Roll the log each week
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.TopOfMonth">
- <summary>
- Roll the log each month
- </summary>
- </member>
- <member name="T:log4net.Appender.RollingFileAppender.IDateTime">
- <summary>
- This interface is used to supply Date/Time information to the <see cref="T:log4net.Appender.RollingFileAppender"/>.
- </summary>
- <remarks>
- This interface is used to supply Date/Time information to the <see cref="T:log4net.Appender.RollingFileAppender"/>.
- Used primarily to allow test classes to plug themselves in so they can
- supply test date/times.
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.IDateTime.Now">
- <summary>
- Gets the <i>current</i> time.
- </summary>
- <value>The <i>current</i> time.</value>
- <remarks>
- <para>
- Gets the <i>current</i> time.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.RollingFileAppender.DefaultDateTime">
- <summary>
- Default implementation of <see cref="T:log4net.Appender.RollingFileAppender.IDateTime"/> that returns the current time.
- </summary>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.DefaultDateTime.Now">
- <summary>
- Gets the <b>current</b> time.
- </summary>
- <value>The <b>current</b> time.</value>
- <remarks>
- <para>
- Gets the <b>current</b> time.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.SmtpAppender">
- <summary>
- Send an e-mail when a specific logging event occurs, typically on errors
- or fatal errors.
- </summary>
- <remarks>
- <para>
- The number of logging events delivered in this e-mail depend on
- the value of <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> option. The
- <see cref="T:log4net.Appender.SmtpAppender"/> keeps only the last
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> logging events in its
- cyclic buffer. This keeps memory requirements at a reasonable level while
- still delivering useful application context.
- </para>
- <note type="caution">
- Authentication and setting the server Port are only available on the MS .NET 1.1 runtime.
- For these features to be enabled you need to ensure that you are using a version of
- the log4net assembly that is built against the MS .NET 1.1 framework and that you are
- running the your application on the MS .NET 1.1 runtime. On all other platforms only sending
- unauthenticated messages to a server listening on port 25 (the default) is supported.
- </note>
- <para>
- Authentication is supported by setting the <see cref="P:log4net.Appender.SmtpAppender.Authentication"/> property to
- either <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic"/> or <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Ntlm"/>.
- If using <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic"/> authentication then the <see cref="P:log4net.Appender.SmtpAppender.Username"/>
- and <see cref="P:log4net.Appender.SmtpAppender.Password"/> properties must also be set.
- </para>
- <para>
- To set the SMTP server port use the <see cref="P:log4net.Appender.SmtpAppender.Port"/> property. The default port is 25.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.SmtpAppender.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.SmtpAppender.SendBuffer(log4net.Core.LoggingEvent[])">
- <summary>
- Sends the contents of the cyclic buffer as an e-mail message.
- </summary>
- <param name="events">The logging events to send.</param>
- </member>
- <member name="M:log4net.Appender.SmtpAppender.SendEmail(System.String)">
- <summary>
- Send the email message
- </summary>
- <param name="messageBody">the body text to include in the mail</param>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.To">
- <summary>
- Gets or sets a semicolon-delimited list of recipient e-mail addresses.
- </summary>
- <value>
- A semicolon-delimited list of e-mail addresses.
- </value>
- <remarks>
- <para>
- A semicolon-delimited list of recipient e-mail addresses.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.From">
- <summary>
- Gets or sets the e-mail address of the sender.
- </summary>
- <value>
- The e-mail address of the sender.
- </value>
- <remarks>
- <para>
- The e-mail address of the sender.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.Subject">
- <summary>
- Gets or sets the subject line of the e-mail message.
- </summary>
- <value>
- The subject line of the e-mail message.
- </value>
- <remarks>
- <para>
- The subject line of the e-mail message.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.SmtpHost">
- <summary>
- Gets or sets the name of the SMTP relay mail server to use to send
- the e-mail messages.
- </summary>
- <value>
- The name of the e-mail relay server. If SmtpServer is not set, the
- name of the local SMTP server is used.
- </value>
- <remarks>
- <para>
- The name of the e-mail relay server. If SmtpServer is not set, the
- name of the local SMTP server is used.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.LocationInfo">
- <summary>
- Obsolete
- </summary>
- <remarks>
- Use the BufferingAppenderSkeleton Fix methods instead
- </remarks>
- <remarks>
- <para>
- Obsolete property.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.Authentication">
- <summary>
- The mode to use to authentication with the SMTP server
- </summary>
- <remarks>
- <note type="caution">Authentication is only available on the MS .NET 1.1 runtime.</note>
- <para>
- Valid Authentication mode values are: <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.None"/>,
- <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic"/>, and <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Ntlm"/>.
- The default value is <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.None"/>. When using
- <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic"/> you must specify the <see cref="P:log4net.Appender.SmtpAppender.Username"/>
- and <see cref="P:log4net.Appender.SmtpAppender.Password"/> to use to authenticate.
- When using <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Ntlm"/> the Windows credentials for the current
- thread, if impersonating, or the process will be used to authenticate.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.Username">
- <summary>
- The username to use to authenticate with the SMTP server
- </summary>
- <remarks>
- <note type="caution">Authentication is only available on the MS .NET 1.1 runtime.</note>
- <para>
- A <see cref="P:log4net.Appender.SmtpAppender.Username"/> and <see cref="P:log4net.Appender.SmtpAppender.Password"/> must be specified when
- <see cref="P:log4net.Appender.SmtpAppender.Authentication"/> is set to <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic"/>,
- otherwise the username will be ignored.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.Password">
- <summary>
- The password to use to authenticate with the SMTP server
- </summary>
- <remarks>
- <note type="caution">Authentication is only available on the MS .NET 1.1 runtime.</note>
- <para>
- A <see cref="P:log4net.Appender.SmtpAppender.Username"/> and <see cref="P:log4net.Appender.SmtpAppender.Password"/> must be specified when
- <see cref="P:log4net.Appender.SmtpAppender.Authentication"/> is set to <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic"/>,
- otherwise the password will be ignored.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.Port">
- <summary>
- The port on which the SMTP server is listening
- </summary>
- <remarks>
- <note type="caution">Server Port is only available on the MS .NET 1.1 runtime.</note>
- <para>
- The port on which the SMTP server is listening. The default
- port is <c>25</c>. The Port can only be changed when running on
- the MS .NET 1.1 runtime.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.Priority">
- <summary>
- Gets or sets the priority of the e-mail message
- </summary>
- <value>
- One of the <see cref="T:System.Web.Mail.MailPriority"/> values.
- </value>
- <remarks>
- <para>
- Sets the priority of the e-mails generated by this
- appender. The default priority is <see cref="F:System.Web.Mail.MailPriority.Normal"/>.
- </para>
- <para>
- If you are using this appender to report errors then
- you may want to set the priority to <see cref="F:System.Web.Mail.MailPriority.High"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.SmtpAppender.SmtpAuthentication">
- <summary>
- Values for the <see cref="P:log4net.Appender.SmtpAppender.Authentication"/> property.
- </summary>
- <remarks>
- <para>
- SMTP authentication modes.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.SmtpAppender.SmtpAuthentication.None">
- <summary>
- No authentication
- </summary>
- </member>
- <member name="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic">
- <summary>
- Basic authentication.
- </summary>
- <remarks>
- Requires a username and password to be supplied
- </remarks>
- </member>
- <member name="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Ntlm">
- <summary>
- Integrated authentication
- </summary>
- <remarks>
- Uses the Windows credentials from the current thread or process to authenticate.
- </remarks>
- </member>
- <member name="T:log4net.Appender.SmtpPickupDirAppender">
- <summary>
- Send an email when a specific logging event occurs, typically on errors
- or fatal errors. Rather than sending via smtp it writes a file into the
- directory specified by <see cref="P:log4net.Appender.SmtpPickupDirAppender.PickupDir"/>. This allows services such
- as the IIS SMTP agent to manage sending the messages.
- </summary>
- <remarks>
- <para>
- The configuration for this appender is identical to that of the <c>SMTPAppender</c>,
- except that instead of specifying the <c>SMTPAppender.SMTPHost</c> you specify
- <see cref="P:log4net.Appender.SmtpPickupDirAppender.PickupDir"/>.
- </para>
- <para>
- The number of logging events delivered in this e-mail depend on
- the value of <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> option. The
- <see cref="T:log4net.Appender.SmtpPickupDirAppender"/> keeps only the last
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> logging events in its
- cyclic buffer. This keeps memory requirements at a reasonable level while
- still delivering useful application context.
- </para>
- </remarks>
- <author>Niall Daley</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.SmtpPickupDirAppender.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.SmtpPickupDirAppender.SendBuffer(log4net.Core.LoggingEvent[])">
- <summary>
- Sends the contents of the cyclic buffer as an e-mail message.
- </summary>
- <param name="events">The logging events to send.</param>
- <remarks>
- <para>
- Sends the contents of the cyclic buffer as an e-mail message.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.SmtpPickupDirAppender.ActivateOptions">
- <summary>
- Activate the options on this appender.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.SmtpPickupDirAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.SmtpPickupDirAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.SmtpPickupDirAppender.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.SmtpPickupDirAppender.ConvertToFullPath(System.String)">
- <summary>
- Convert a path into a fully qualified path.
- </summary>
- <param name="path">The path to convert.</param>
- <returns>The fully qualified path.</returns>
- <remarks>
- <para>
- Converts the path specified to a fully
- qualified path. If the path is relative it is
- taken as relative from the application base
- directory.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.SmtpPickupDirAppender.m_securityContext">
- <summary>
- The security context to use for privileged calls
- </summary>
- </member>
- <member name="P:log4net.Appender.SmtpPickupDirAppender.To">
- <summary>
- Gets or sets a semicolon-delimited list of recipient e-mail addresses.
- </summary>
- <value>
- A semicolon-delimited list of e-mail addresses.
- </value>
- <remarks>
- <para>
- A semicolon-delimited list of e-mail addresses.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpPickupDirAppender.From">
- <summary>
- Gets or sets the e-mail address of the sender.
- </summary>
- <value>
- The e-mail address of the sender.
- </value>
- <remarks>
- <para>
- The e-mail address of the sender.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpPickupDirAppender.Subject">
- <summary>
- Gets or sets the subject line of the e-mail message.
- </summary>
- <value>
- The subject line of the e-mail message.
- </value>
- <remarks>
- <para>
- The subject line of the e-mail message.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpPickupDirAppender.PickupDir">
- <summary>
- Gets or sets the path to write the messages to.
- </summary>
- <remarks>
- <para>
- Gets or sets the path to write the messages to. This should be the same
- as that used by the agent sending the messages.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpPickupDirAppender.SecurityContext">
- <summary>
- Gets or sets the <see cref="P:log4net.Appender.SmtpPickupDirAppender.SecurityContext"/> used to write to the pickup directory.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.SmtpPickupDirAppender.SecurityContext"/> used to write to the pickup directory.
- </value>
- <remarks>
- <para>
- Unless a <see cref="P:log4net.Appender.SmtpPickupDirAppender.SecurityContext"/> specified here for this appender
- the <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> is queried for the
- security context to use. The default behavior is to use the security context
- of the current thread.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpPickupDirAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.TelnetAppender">
- <summary>
- Appender that allows clients to connect via Telnet to receive log messages
- </summary>
- <remarks>
- <para>
- The TelnetAppender accepts socket connections and streams logging messages
- back to the client.
- The output is provided in a telnet-friendly way so that a log can be monitored
- over a TCP/IP socket.
- This allows simple remote monitoring of application logging.
- </para>
- <para>
- The default <see cref="P:log4net.Appender.TelnetAppender.Port"/> is 23 (the telnet port).
- </para>
- </remarks>
- <author>Keith Long</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.OnClose">
- <summary>
- Overrides the parent method to close the socket handler
- </summary>
- <remarks>
- <para>
- Closes all the outstanding connections.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.TelnetAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.TelnetAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.TelnetAppender.ActivateOptions"/> must be called again.
- </para>
- <para>
- Create the socket handler and wait for connections
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Writes the logging event to each connected client.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the logging event to each connected client.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TelnetAppender.Port">
- <summary>
- Gets or sets the TCP port number on which this <see cref="T:log4net.Appender.TelnetAppender"/> will listen for connections.
- </summary>
- <value>
- An integer value in the range <see cref="F:System.Net.IPEndPoint.MinPort"/> to <see cref="F:System.Net.IPEndPoint.MaxPort"/>
- indicating the TCP port number on which this <see cref="T:log4net.Appender.TelnetAppender"/> will listen for connections.
- </value>
- <remarks>
- <para>
- The default value is 23 (the telnet port).
- </para>
- </remarks>
- <exception cref="T:System.ArgumentOutOfRangeException">The value specified is less than <see cref="F:System.Net.IPEndPoint.MinPort"/>
- or greater than <see cref="F:System.Net.IPEndPoint.MaxPort"/>.</exception>
- </member>
- <member name="P:log4net.Appender.TelnetAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.TelnetAppender.SocketHandler">
- <summary>
- Helper class to manage connected clients
- </summary>
- <remarks>
- <para>
- The SocketHandler class is used to accept connections from
- clients. It is threaded so that clients can connect/disconnect
- asynchronously.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.#ctor(System.Int32)">
- <summary>
- Opens a new server port on <paramref ref="port"/>
- </summary>
- <param name="port">the local port to listen on for connections</param>
- <remarks>
- <para>
- Creates a socket handler on the specified local server port.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.Send(System.String)">
- <summary>
- Sends a string message to each of the connected clients
- </summary>
- <param name="message">the text to send</param>
- <remarks>
- <para>
- Sends a string message to each of the connected clients
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.AddClient(log4net.Appender.TelnetAppender.SocketHandler.SocketClient)">
- <summary>
- Add a client to the internal clients list
- </summary>
- <param name="client">client to add</param>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.RemoveClient(log4net.Appender.TelnetAppender.SocketHandler.SocketClient)">
- <summary>
- Remove a client from the internal clients list
- </summary>
- <param name="client">client to remove</param>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.OnConnect(System.IAsyncResult)">
- <summary>
- Callback used to accept a connection on the server socket
- </summary>
- <param name="asyncResult">The result of the asynchronous operation</param>
- <remarks>
- <para>
- On connection adds to the list of connections
- if there are two many open connections you will be disconnected
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.Dispose">
- <summary>
- Close all network connections
- </summary>
- <remarks>
- <para>
- Make sure we close all network connections
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TelnetAppender.SocketHandler.HasConnections">
- <summary>
- Test if this handler has active connections
- </summary>
- <value>
- <c>true</c> if this handler has active connections
- </value>
- <remarks>
- <para>
- This property will be <c>true</c> while this handler has
- active connections, that is at least one connection that
- the handler will attempt to send a message to.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.TelnetAppender.SocketHandler.SocketClient">
- <summary>
- Class that represents a client connected to this handler
- </summary>
- <remarks>
- <para>
- Class that represents a client connected to this handler
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.SocketClient.#ctor(System.Net.Sockets.Socket)">
- <summary>
- Create this <see cref="T:log4net.Appender.TelnetAppender.SocketHandler.SocketClient"/> for the specified <see cref="T:System.Net.Sockets.Socket"/>
- </summary>
- <param name="socket">the client's socket</param>
- <remarks>
- <para>
- Opens a stream writer on the socket.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.SocketClient.Send(System.String)">
- <summary>
- Write a string to the client
- </summary>
- <param name="message">string to send</param>
- <remarks>
- <para>
- Write a string to the client
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.SocketClient.Dispose">
- <summary>
- Cleanup the clients connection
- </summary>
- <remarks>
- <para>
- Close the socket connection.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.TraceAppender">
- <summary>
- Appends log events to the <see cref="T:System.Diagnostics.Trace"/> system.
- </summary>
- <remarks>
- <para>
- The application configuration file can be used to control what listeners
- are actually used. See the MSDN documentation for the
- <see cref="T:System.Diagnostics.Trace"/> class for details on configuring the
- trace system.
- </para>
- <para>
- Events are written using the <c>System.Diagnostics.Trace.Write(string,string)</c>
- method. The event's logger name is passed as the value for the category name to the Write method.
- </para>
- <para>
- <b>Compact Framework</b><br/>
- The Compact Framework does not support the <see cref="T:System.Diagnostics.Trace"/>
- class for any operation except <c>Assert</c>. When using the Compact Framework this
- appender will write to the <see cref="T:System.Diagnostics.Debug"/> system rather than
- the Trace system. This appender will therefore behave like the <see cref="T:log4net.Appender.DebugAppender"/>.
- </para>
- </remarks>
- <author>Douglas de la Torre</author>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.TraceAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.TraceAppender"/>.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TraceAppender.#ctor(log4net.Layout.ILayout)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.TraceAppender"/>
- with a specified layout.
- </summary>
- <param name="layout">The layout to use with this appender.</param>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TraceAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Writes the logging event to the <see cref="T:System.Diagnostics.Trace"/> system.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the logging event to the <see cref="T:System.Diagnostics.Trace"/> system.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.TraceAppender.m_immediateFlush">
- <summary>
- Immediate flush means that the underlying writer or output stream
- will be flushed at the end of each append operation.
- </summary>
- <remarks>
- <para>
- Immediate flush is slower but ensures that each append request is
- actually written. If <see cref="P:log4net.Appender.TraceAppender.ImmediateFlush"/> is set to
- <c>false</c>, then there is a good chance that the last few
- logs events are not actually written to persistent media if and
- when the application crashes.
- </para>
- <para>
- The default value is <c>true</c>.</para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TraceAppender.ImmediateFlush">
- <summary>
- Gets or sets a value that indicates whether the appender will
- flush at the end of each write.
- </summary>
- <remarks>
- <para>The default behavior is to flush at the end of each
- write. If the option is set to<c>false</c>, then the underlying
- stream can defer writing to physical medium to a later time.
- </para>
- <para>
- Avoiding the flush operation at the end of each append results
- in a performance gain of 10 to 20 percent. However, there is safety
- trade-off involved in skipping flushing. Indeed, when flushing is
- skipped, then it is likely that the last few log events will not
- be recorded on disk when the application exits. This is a high
- price to pay even for a 20% performance gain.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TraceAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.AliasDomainAttribute">
- <summary>
- Assembly level attribute that specifies a domain to alias to this assembly's repository.
- </summary>
- <remarks>
- <para>
- <b>AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute.</b>
- </para>
- <para>
- An assembly's logger repository is defined by its <see cref="T:log4net.Config.DomainAttribute"/>,
- however this can be overridden by an assembly loaded before the target assembly.
- </para>
- <para>
- An assembly can alias another assembly's domain to its repository by
- specifying this attribute with the name of the target domain.
- </para>
- <para>
- This attribute can only be specified on the assembly and may be used
- as many times as necessary to alias all the required domains.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Config.AliasRepositoryAttribute">
- <summary>
- Assembly level attribute that specifies a repository to alias to this assembly's repository.
- </summary>
- <remarks>
- <para>
- An assembly's logger repository is defined by its <see cref="T:log4net.Config.RepositoryAttribute"/>,
- however this can be overridden by an assembly loaded before the target assembly.
- </para>
- <para>
- An assembly can alias another assembly's repository to its repository by
- specifying this attribute with the name of the target repository.
- </para>
- <para>
- This attribute can only be specified on the assembly and may be used
- as many times as necessary to alias all the required repositories.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.AliasRepositoryAttribute.#ctor(System.String)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.AliasRepositoryAttribute"/> class with
- the specified repository to alias to this assembly's repository.
- </summary>
- <param name="name">The repository to alias to this assemby's repository.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Config.AliasRepositoryAttribute"/> class with
- the specified repository to alias to this assembly's repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.AliasRepositoryAttribute.Name">
- <summary>
- Gets or sets the repository to alias to this assemby's repository.
- </summary>
- <value>
- The repository to alias to this assemby's repository.
- </value>
- <remarks>
- <para>
- The name of the repository to alias to this assemby's repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.AliasDomainAttribute.#ctor(System.String)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.AliasDomainAttribute"/> class with
- the specified domain to alias to this assembly's repository.
- </summary>
- <param name="name">The domain to alias to this assemby's repository.</param>
- <remarks>
- <para>
- Obsolete. Use <see cref="T:log4net.Config.AliasRepositoryAttribute"/> instead of <see cref="T:log4net.Config.AliasDomainAttribute"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.BasicConfigurator">
- <summary>
- Use this class to quickly configure a <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>.
- </summary>
- <remarks>
- <para>
- Allows very simple programmatic configuration of log4net.
- </para>
- <para>
- Only one appender can be configured using this configurator.
- The appender is set at the root of the hierarchy and all logging
- events will be delivered to that appender.
- </para>
- <para>
- Appenders can also implement the <see cref="T:log4net.Core.IOptionHandler"/> interface. Therefore
- they would require that the <see cref="M:log4net.Core.IOptionHandler.ActivateOptions"/> method
- be called after the appenders properties have been configured.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.BasicConfigurator.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.BasicConfigurator"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to prevent instantiation of this class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.BasicConfigurator.Configure">
- <summary>
- Initializes the log4net system with a default configuration.
- </summary>
- <remarks>
- <para>
- Initializes the log4net logging system using a <see cref="T:log4net.Appender.ConsoleAppender"/>
- that will write to <c>Console.Out</c>. The log messages are
- formatted using the <see cref="T:log4net.Layout.PatternLayout"/> layout object
- with the <see cref="F:log4net.Layout.PatternLayout.DetailConversionPattern"/>
- layout style.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.BasicConfigurator.Configure(log4net.Appender.IAppender)">
- <summary>
- Initializes the log4net system using the specified appender.
- </summary>
- <param name="appender">The appender to use to log all logging events.</param>
- <remarks>
- <para>
- Initializes the log4net system using the specified appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.BasicConfigurator.Configure(log4net.Repository.ILoggerRepository)">
- <summary>
- Initializes the <see cref="T:log4net.Repository.ILoggerRepository"/> with a default configuration.
- </summary>
- <param name="repository">The repository to configure.</param>
- <remarks>
- <para>
- Initializes the specified repository using a <see cref="T:log4net.Appender.ConsoleAppender"/>
- that will write to <c>Console.Out</c>. The log messages are
- formatted using the <see cref="T:log4net.Layout.PatternLayout"/> layout object
- with the <see cref="F:log4net.Layout.PatternLayout.DetailConversionPattern"/>
- layout style.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.BasicConfigurator.Configure(log4net.Repository.ILoggerRepository,log4net.Appender.IAppender)">
- <summary>
- Initializes the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified appender.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="appender">The appender to use to log all logging events.</param>
- <remarks>
- <para>
- Initializes the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified appender.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.ConfiguratorAttribute">
- <summary>
- Base class for all log4net configuration attributes.
- </summary>
- <remarks>
- This is an abstract class that must be extended by
- specific configurators. This attribute allows the
- configurator to be parameterized by an assembly level
- attribute.
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.ConfiguratorAttribute.#ctor(System.Int32)">
- <summary>
- Constructor used by subclasses.
- </summary>
- <param name="priority">the ordering priority for this configurator</param>
- <remarks>
- <para>
- The <paramref name="priority"/> is used to order the configurator
- attributes before they are invoked. Higher priority configurators are executed
- before lower priority ones.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.ConfiguratorAttribute.Configure(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified assembly.
- </summary>
- <param name="sourceAssembly">The assembly that this attribute was defined on.</param>
- <param name="targetRepository">The repository to configure.</param>
- <remarks>
- <para>
- Abstract method implemented by a subclass. When this method is called
- the subclass should configure the <paramref name="targetRepository"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.ConfiguratorAttribute.CompareTo(System.Object)">
- <summary>
- Compare this instance to another ConfiguratorAttribute
- </summary>
- <param name="obj">the object to compare to</param>
- <returns>see <see cref="M:System.IComparable.CompareTo(System.Object)"/></returns>
- <remarks>
- <para>
- Compares the priorities of the two <see cref="T:log4net.Config.ConfiguratorAttribute"/> instances.
- Sorts by priority in descending order. Objects with the same priority are
- randomly ordered.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.DomainAttribute">
- <summary>
- Assembly level attribute that specifies the logging domain for the assembly.
- </summary>
- <remarks>
- <para>
- <b>DomainAttribute is obsolete. Use RepositoryAttribute instead of DomainAttribute.</b>
- </para>
- <para>
- Assemblies are mapped to logging domains. Each domain has its own
- logging repository. This attribute specified on the assembly controls
- the configuration of the domain. The <see cref="P:log4net.Config.RepositoryAttribute.Name"/> property specifies the name
- of the domain that this assembly is a part of. The <see cref="P:log4net.Config.RepositoryAttribute.RepositoryType"/>
- specifies the type of the repository objects to create for the domain. If
- this attribute is not specified and a <see cref="P:log4net.Config.RepositoryAttribute.Name"/> is not specified
- then the assembly will be part of the default shared logging domain.
- </para>
- <para>
- This attribute can only be specified on the assembly and may only be used
- once per assembly.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Config.RepositoryAttribute">
- <summary>
- Assembly level attribute that specifies the logging repository for the assembly.
- </summary>
- <remarks>
- <para>
- Assemblies are mapped to logging repository. This attribute specified
- on the assembly controls
- the configuration of the repository. The <see cref="P:log4net.Config.RepositoryAttribute.Name"/> property specifies the name
- of the repository that this assembly is a part of. The <see cref="P:log4net.Config.RepositoryAttribute.RepositoryType"/>
- specifies the type of the <see cref="T:log4net.Repository.ILoggerRepository"/> object
- to create for the assembly. If this attribute is not specified or a <see cref="P:log4net.Config.RepositoryAttribute.Name"/>
- is not specified then the assembly will be part of the default shared logging repository.
- </para>
- <para>
- This attribute can only be specified on the assembly and may only be used
- once per assembly.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.RepositoryAttribute.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.RepositoryAttribute"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.RepositoryAttribute.#ctor(System.String)">
- <summary>
- Initialize a new instance of the <see cref="T:log4net.Config.RepositoryAttribute"/> class
- with the name of the repository.
- </summary>
- <param name="name">The name of the repository.</param>
- <remarks>
- <para>
- Initialize the attribute with the name for the assembly's repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.RepositoryAttribute.Name">
- <summary>
- Gets or sets the name of the logging repository.
- </summary>
- <value>
- The string name to use as the name of the repository associated with this
- assembly.
- </value>
- <remarks>
- <para>
- This value does not have to be unique. Several assemblies can share the
- same repository. They will share the logging configuration of the repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.RepositoryAttribute.RepositoryType">
- <summary>
- Gets or sets the type of repository to create for this assembly.
- </summary>
- <value>
- The type of repository to create for this assembly.
- </value>
- <remarks>
- <para>
- The type of the repository to create for the assembly.
- The type must implement the <see cref="T:log4net.Repository.ILoggerRepository"/>
- interface.
- </para>
- <para>
- This will be the type of repository created when
- the repository is created. If multiple assemblies reference the
- same repository then the repository is only created once using the
- <see cref="P:log4net.Config.RepositoryAttribute.RepositoryType"/> of the first assembly to call into the
- repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.DomainAttribute.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.DomainAttribute"/> class.
- </summary>
- <remarks>
- <para>
- Obsolete. Use RepositoryAttribute instead of DomainAttribute.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.DomainAttribute.#ctor(System.String)">
- <summary>
- Initialize a new instance of the <see cref="T:log4net.Config.DomainAttribute"/> class
- with the name of the domain.
- </summary>
- <param name="name">The name of the domain.</param>
- <remarks>
- <para>
- Obsolete. Use RepositoryAttribute instead of DomainAttribute.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.DOMConfigurator">
- <summary>
- Use this class to initialize the log4net environment using an Xml tree.
- </summary>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- Configures a <see cref="T:log4net.Repository.ILoggerRepository"/> using an Xml tree.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.#ctor">
- <summary>
- Private constructor
- </summary>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure">
- <summary>
- Automatically configures the log4net system based on the
- application's configuration settings.
- </summary>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- Each application has a configuration file. This has the
- same name as the application with '.config' appended.
- This file is XML and calling this function prompts the
- configurator to look in that file for a section called
- <c>log4net</c> that contains the configuration data.
- </remarks>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(log4net.Repository.ILoggerRepository)">
- <summary>
- Automatically configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using settings
- stored in the application's configuration file.
- </summary>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- Each application has a configuration file. This has the
- same name as the application with '.config' appended.
- This file is XML and calling this function prompts the
- configurator to look in that file for a section called
- <c>log4net</c> that contains the configuration data.
- </remarks>
- <param name="repository">The repository to configure.</param>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(System.Xml.XmlElement)">
- <summary>
- Configures log4net using a <c>log4net</c> element
- </summary>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- Loads the log4net configuration from the XML element
- supplied as <paramref name="element"/>.
- </remarks>
- <param name="element">The element to parse.</param>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(log4net.Repository.ILoggerRepository,System.Xml.XmlElement)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified XML
- element.
- </summary>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- Loads the log4net configuration from the XML element
- supplied as <paramref name="element"/>.
- </remarks>
- <param name="repository">The repository to configure.</param>
- <param name="element">The element to parse.</param>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(System.IO.FileInfo)">
- <summary>
- Configures log4net using the specified configuration file.
- </summary>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the log4net configuration data.
- </para>
- <para>
- The log4net configuration file can possible be specified in the application's
- configuration file (either <c>MyAppName.exe.config</c> for a
- normal application on <c>Web.config</c> for an ASP.NET application).
- </para>
- <example>
- The following example configures log4net using a configuration file, of which the
- location is stored in the application's configuration file :
- </example>
- <code lang="C#">
- using log4net.Config;
- using System.IO;
- using System.Configuration;
-
- ...
-
- DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"]));
- </code>
- <para>
- In the <c>.config</c> file, the path to the log4net can be specified like this :
- </para>
- <code lang="XML" escaped="true">
- <configuration>
- <appSettings>
- <add key="log4net-config-file" value="log.config"/>
- </appSettings>
- </configuration>
- </code>
- </remarks>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(System.IO.Stream)">
- <summary>
- Configures log4net using the specified configuration file.
- </summary>
- <param name="configStream">A stream to load the XML configuration from.</param>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- The configuration data must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the log4net configuration data.
- </para>
- <para>
- Note that this method will NOT close the stream parameter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified configuration
- file.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The log4net configuration file can possible be specified in the application's
- configuration file (either <c>MyAppName.exe.config</c> for a
- normal application on <c>Web.config</c> for an ASP.NET application).
- </para>
- <example>
- The following example configures log4net using a configuration file, of which the
- location is stored in the application's configuration file :
- </example>
- <code lang="C#">
- using log4net.Config;
- using System.IO;
- using System.Configuration;
-
- ...
-
- DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"]));
- </code>
- <para>
- In the <c>.config</c> file, the path to the log4net can be specified like this :
- </para>
- <code lang="XML" escaped="true">
- <configuration>
- <appSettings>
- <add key="log4net-config-file" value="log.config"/>
- </appSettings>
- </configuration>
- </code>
- </remarks>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(log4net.Repository.ILoggerRepository,System.IO.Stream)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified configuration
- file.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configStream">The stream to load the XML configuration from.</param>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- The configuration data must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- Note that this method will NOT close the stream parameter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.ConfigureAndWatch(System.IO.FileInfo)">
- <summary>
- Configures log4net using the file specified, monitors the file for changes
- and reloads the configuration if a change is detected.
- </summary>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The configuration file will be monitored using a <see cref="T:System.IO.FileSystemWatcher"/>
- and depends on the behavior of that class.
- </para>
- <para>
- For more information on how to configure log4net using
- a separate configuration file, see <see cref="M:log4net.Config.DOMConfigurator.Configure(System.IO.FileInfo)"/>.
- </para>
- </remarks>
- <seealso cref="M:log4net.Config.DOMConfigurator.Configure(System.IO.FileInfo)"/>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.ConfigureAndWatch(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the file specified,
- monitors the file for changes and reloads the configuration if a change
- is detected.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The configuration file will be monitored using a <see cref="T:System.IO.FileSystemWatcher"/>
- and depends on the behavior of that class.
- </para>
- <para>
- For more information on how to configure log4net using
- a separate configuration file, see <see cref="M:log4net.Config.DOMConfigurator.Configure(System.IO.FileInfo)"/>.
- </para>
- </remarks>
- <seealso cref="M:log4net.Config.DOMConfigurator.Configure(System.IO.FileInfo)"/>
- </member>
- <member name="T:log4net.Config.DOMConfiguratorAttribute">
- <summary>
- Assembly level attribute to configure the <see cref="T:log4net.Config.XmlConfigurator"/>.
- </summary>
- <remarks>
- <para>
- <b>AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute.</b>
- </para>
- <para>
- This attribute may only be used at the assembly scope and can only
- be used once per assembly.
- </para>
- <para>
- Use this attribute to configure the <see cref="T:log4net.Config.XmlConfigurator"/>
- without calling one of the <see cref="M:log4net.Config.XmlConfigurator.Configure"/>
- methods.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Config.XmlConfiguratorAttribute">
- <summary>
- Assembly level attribute to configure the <see cref="T:log4net.Config.XmlConfigurator"/>.
- </summary>
- <remarks>
- <para>
- This attribute may only be used at the assembly scope and can only
- be used once per assembly.
- </para>
- <para>
- Use this attribute to configure the <see cref="T:log4net.Config.XmlConfigurator"/>
- without calling one of the <see cref="M:log4net.Config.XmlConfigurator.Configure"/>
- methods.
- </para>
- <para>
- If neither of the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile"/> or <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/>
- properties are set the configuration is loaded from the application's .config file.
- If set the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile"/> property takes priority over the
- <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/> property. The <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile"/> property
- specifies a path to a file to load the config from. The path is relative to the
- application's base directory; <see cref="P:System.AppDomain.BaseDirectory"/>.
- The <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/> property is used as a postfix to the assembly file name.
- The config file must be located in the application's base directory; <see cref="P:System.AppDomain.BaseDirectory"/>.
- For example in a console application setting the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/> to
- <c>config</c> has the same effect as not specifying the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile"/> or
- <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/> properties.
- </para>
- <para>
- The <see cref="P:log4net.Config.XmlConfiguratorAttribute.Watch"/> property can be set to cause the <see cref="T:log4net.Config.XmlConfigurator"/>
- to watch the configuration file for changes.
- </para>
- <note>
- <para>
- Log4net will only look for assembly level configuration attributes once.
- When using the log4net assembly level attributes to control the configuration
- of log4net you must ensure that the first call to any of the
- <see cref="T:log4net.Core.LoggerManager"/> methods is made from the assembly with the configuration
- attributes.
- </para>
- <para>
- If you cannot guarantee the order in which log4net calls will be made from
- different assemblies you must use programmatic configuration instead, i.e.
- call the <see cref="M:log4net.Config.XmlConfigurator.Configure"/> method directly.
- </para>
- </note>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.XmlConfiguratorAttribute.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfiguratorAttribute.Configure(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified assembly.
- </summary>
- <param name="sourceAssembly">The assembly that this attribute was defined on.</param>
- <param name="targetRepository">The repository to configure.</param>
- <remarks>
- <para>
- Configure the repository using the <see cref="T:log4net.Config.XmlConfigurator"/>.
- The <paramref name="targetRepository"/> specified must extend the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>
- class otherwise the <see cref="T:log4net.Config.XmlConfigurator"/> will not be able to
- configure it.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="repository"/> does not extend <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>.</exception>
- </member>
- <member name="M:log4net.Config.XmlConfiguratorAttribute.ConfigureFromFile(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Attempt to load configuration from the local file system
- </summary>
- <param name="sourceAssembly">The assembly that this attribute was defined on.</param>
- <param name="targetRepository">The repository to configure.</param>
- </member>
- <member name="M:log4net.Config.XmlConfiguratorAttribute.ConfigureFromFile(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Configure the specified repository using a <see cref="T:System.IO.FileInfo"/>
- </summary>
- <param name="targetRepository">The repository to configure.</param>
- <param name="configFile">the FileInfo pointing to the config file</param>
- </member>
- <member name="M:log4net.Config.XmlConfiguratorAttribute.ConfigureFromUri(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Attempt to load configuration from a URI
- </summary>
- <param name="sourceAssembly">The assembly that this attribute was defined on.</param>
- <param name="targetRepository">The repository to configure.</param>
- </member>
- <member name="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile">
- <summary>
- Gets or sets the filename of the configuration file.
- </summary>
- <value>
- The filename of the configuration file.
- </value>
- <remarks>
- <para>
- If specified, this is the name of the configuration file to use with
- the <see cref="T:log4net.Config.XmlConfigurator"/>. This file path is relative to the
- <b>application base</b> directory (<see cref="P:System.AppDomain.BaseDirectory"/>).
- </para>
- <para>
- The <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile"/> takes priority over the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension">
- <summary>
- Gets or sets the extension of the configuration file.
- </summary>
- <value>
- The extension of the configuration file.
- </value>
- <remarks>
- <para>
- If specified this is the extension for the configuration file.
- The path to the config file is built by using the <b>application
- base</b> directory (<see cref="P:System.AppDomain.BaseDirectory"/>),
- the <b>assembly file name</b> and the config file extension.
- </para>
- <para>
- If the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/> is set to <c>MyExt</c> then
- possible config file names would be: <c>MyConsoleApp.exe.MyExt</c> or
- <c>MyClassLibrary.dll.MyExt</c>.
- </para>
- <para>
- The <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile"/> takes priority over the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.XmlConfiguratorAttribute.Watch">
- <summary>
- Gets or sets a value indicating whether to watch the configuration file.
- </summary>
- <value>
- <c>true</c> if the configuration should be watched, <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- If this flag is specified and set to <c>true</c> then the framework
- will watch the configuration file and will reload the config each time
- the file is modified.
- </para>
- <para>
- The config file can only be watched if it is loaded from local disk.
- In a No-Touch (Smart Client) deployment where the application is downloaded
- from a web server the config file may not reside on the local disk
- and therefore it may not be able to watch it.
- </para>
- <note>
- Watching configuration is not supported on the SSCLI.
- </note>
- </remarks>
- </member>
- <member name="T:log4net.Config.Log4NetConfigurationSectionHandler">
- <summary>
- Class to register for the log4net section of the configuration file
- </summary>
- <remarks>
- The log4net section of the configuration file needs to have a section
- handler registered. This is the section handler used. It simply returns
- the XML element that is the root of the section.
- </remarks>
- <example>
- Example of registering the log4net section handler :
- <code lang="XML" escaped="true">
- <configuration>
- <configSections>
- <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
- </configSections>
- <log4net>
- log4net configuration XML goes here
- </log4net>
- </configuration>
- </code>
- </example>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.Log4NetConfigurationSectionHandler.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.Log4NetConfigurationSectionHandler"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.Log4NetConfigurationSectionHandler.Create(System.Object,System.Object,System.Xml.XmlNode)">
- <summary>
- Parses the configuration section.
- </summary>
- <param name="parent">The configuration settings in a corresponding parent configuration section.</param>
- <param name="configContext">The configuration context when called from the ASP.NET configuration system. Otherwise, this parameter is reserved and is a null reference.</param>
- <param name="section">The <see cref="T:System.Xml.XmlNode"/> for the log4net section.</param>
- <returns>The <see cref="T:System.Xml.XmlNode"/> for the log4net section.</returns>
- <remarks>
- <para>
- Returns the <see cref="T:System.Xml.XmlNode"/> containing the configuration data,
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.PluginAttribute">
- <summary>
- Assembly level attribute that specifies a plugin to attach to
- the repository.
- </summary>
- <remarks>
- <para>
- Specifies the type of a plugin to create and attach to the
- assembly's repository. The plugin type must implement the
- <see cref="T:log4net.Plugin.IPlugin"/> interface.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Plugin.IPluginFactory">
- <summary>
- Interface used to create plugins.
- </summary>
- <remarks>
- <para>
- Interface used to create a plugin.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Plugin.IPluginFactory.CreatePlugin">
- <summary>
- Creates the plugin object.
- </summary>
- <returns>the new plugin instance</returns>
- <remarks>
- <para>
- Create and return a new plugin instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.PluginAttribute.#ctor(System.String)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.PluginAttribute"/> class
- with the specified type.
- </summary>
- <param name="typeName">The type name of plugin to create.</param>
- <remarks>
- <para>
- Create the attribute with the plugin type specified.
- </para>
- <para>
- Where possible use the constructor that takes a <see cref="T:System.Type"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.PluginAttribute.#ctor(System.Type)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.PluginAttribute"/> class
- with the specified type.
- </summary>
- <param name="type">The type of plugin to create.</param>
- <remarks>
- <para>
- Create the attribute with the plugin type specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.PluginAttribute.CreatePlugin">
- <summary>
- Creates the plugin object defined by this attribute.
- </summary>
- <remarks>
- <para>
- Creates the instance of the <see cref="T:log4net.Plugin.IPlugin"/> object as
- specified by this attribute.
- </para>
- </remarks>
- <returns>The plugin object.</returns>
- </member>
- <member name="M:log4net.Config.PluginAttribute.ToString">
- <summary>
- Returns a representation of the properties of this object.
- </summary>
- <remarks>
- <para>
- Overrides base class <see cref="M:System.Object.ToString"/> method to
- return a representation of the properties of this object.
- </para>
- </remarks>
- <returns>A representation of the properties of this object</returns>
- </member>
- <member name="P:log4net.Config.PluginAttribute.Type">
- <summary>
- Gets or sets the type for the plugin.
- </summary>
- <value>
- The type for the plugin.
- </value>
- <remarks>
- <para>
- The type for the plugin.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.PluginAttribute.TypeName">
- <summary>
- Gets or sets the type name for the plugin.
- </summary>
- <value>
- The type name for the plugin.
- </value>
- <remarks>
- <para>
- The type name for the plugin.
- </para>
- <para>
- Where possible use the <see cref="P:log4net.Config.PluginAttribute.Type"/> property instead.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.SecurityContextProviderAttribute">
- <summary>
- Assembly level attribute to configure the <see cref="T:log4net.Core.SecurityContextProvider"/>.
- </summary>
- <remarks>
- <para>
- This attribute may only be used at the assembly scope and can only
- be used once per assembly.
- </para>
- <para>
- Use this attribute to configure the <see cref="T:log4net.Config.XmlConfigurator"/>
- without calling one of the <see cref="M:log4net.Config.XmlConfigurator.Configure"/>
- methods.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Config.SecurityContextProviderAttribute.#ctor(System.Type)">
- <summary>
- Construct provider attribute with type specified
- </summary>
- <param name="providerType">the type of the provider to use</param>
- <remarks>
- <para>
- The provider specified must subclass the <see cref="T:log4net.Core.SecurityContextProvider"/>
- class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.SecurityContextProviderAttribute.Configure(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Configures the SecurityContextProvider
- </summary>
- <param name="sourceAssembly">The assembly that this attribute was defined on.</param>
- <param name="targetRepository">The repository to configure.</param>
- <remarks>
- <para>
- Creates a provider instance from the <see cref="P:log4net.Config.SecurityContextProviderAttribute.ProviderType"/> specified.
- Sets this as the default security context provider <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.SecurityContextProviderAttribute.ProviderType">
- <summary>
- Gets or sets the type of the provider to use.
- </summary>
- <value>
- the type of the provider to use.
- </value>
- <remarks>
- <para>
- The provider specified must subclass the <see cref="T:log4net.Core.SecurityContextProvider"/>
- class.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.XmlConfigurator">
- <summary>
- Use this class to initialize the log4net environment using an Xml tree.
- </summary>
- <remarks>
- <para>
- Configures a <see cref="T:log4net.Repository.ILoggerRepository"/> using an Xml tree.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.#ctor">
- <summary>
- Private constructor
- </summary>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure">
- <summary>
- Automatically configures the log4net system based on the
- application's configuration settings.
- </summary>
- <remarks>
- <para>
- Each application has a configuration file. This has the
- same name as the application with '.config' appended.
- This file is XML and calling this function prompts the
- configurator to look in that file for a section called
- <c>log4net</c> that contains the configuration data.
- </para>
- <para>
- To use this method to configure log4net you must specify
- the <see cref="T:log4net.Config.Log4NetConfigurationSectionHandler"/> section
- handler for the <c>log4net</c> configuration section. See the
- <see cref="T:log4net.Config.Log4NetConfigurationSectionHandler"/> for an example.
- </para>
- </remarks>
- <seealso cref="T:log4net.Config.Log4NetConfigurationSectionHandler"/>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(log4net.Repository.ILoggerRepository)">
- <summary>
- Automatically configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using settings
- stored in the application's configuration file.
- </summary>
- <remarks>
- <para>
- Each application has a configuration file. This has the
- same name as the application with '.config' appended.
- This file is XML and calling this function prompts the
- configurator to look in that file for a section called
- <c>log4net</c> that contains the configuration data.
- </para>
- <para>
- To use this method to configure log4net you must specify
- the <see cref="T:log4net.Config.Log4NetConfigurationSectionHandler"/> section
- handler for the <c>log4net</c> configuration section. See the
- <see cref="T:log4net.Config.Log4NetConfigurationSectionHandler"/> for an example.
- </para>
- </remarks>
- <param name="repository">The repository to configure.</param>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(System.Xml.XmlElement)">
- <summary>
- Configures log4net using a <c>log4net</c> element
- </summary>
- <remarks>
- <para>
- Loads the log4net configuration from the XML element
- supplied as <paramref name="element"/>.
- </para>
- </remarks>
- <param name="element">The element to parse.</param>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(log4net.Repository.ILoggerRepository,System.Xml.XmlElement)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified XML
- element.
- </summary>
- <remarks>
- Loads the log4net configuration from the XML element
- supplied as <paramref name="element"/>.
- </remarks>
- <param name="repository">The repository to configure.</param>
- <param name="element">The element to parse.</param>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(System.IO.FileInfo)">
- <summary>
- Configures log4net using the specified configuration file.
- </summary>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the log4net configuration data.
- </para>
- <para>
- The log4net configuration file can possible be specified in the application's
- configuration file (either <c>MyAppName.exe.config</c> for a
- normal application on <c>Web.config</c> for an ASP.NET application).
- </para>
- <para>
- The first element matching <c>&lt;configuration&gt;</c> will be read as the
- configuration. If this file is also a .NET .config file then you must specify
- a configuration section for the <c>log4net</c> element otherwise .NET will
- complain. Set the type for the section handler to <see cref="T:System.Configuration.IgnoreSectionHandler"/>, for example:
- <code lang="XML" escaped="true">
- <configSections>
- <section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
- </configSections>
- </code>
- </para>
- <example>
- The following example configures log4net using a configuration file, of which the
- location is stored in the application's configuration file :
- </example>
- <code lang="C#">
- using log4net.Config;
- using System.IO;
- using System.Configuration;
-
- ...
-
- XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"]));
- </code>
- <para>
- In the <c>.config</c> file, the path to the log4net can be specified like this :
- </para>
- <code lang="XML" escaped="true">
- <configuration>
- <appSettings>
- <add key="log4net-config-file" value="log.config"/>
- </appSettings>
- </configuration>
- </code>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(System.Uri)">
- <summary>
- Configures log4net using the specified configuration URI.
- </summary>
- <param name="configUri">A URI to load the XML configuration from.</param>
- <remarks>
- <para>
- The configuration data must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the log4net configuration data.
- </para>
- <para>
- The <see cref="T:System.Net.WebRequest"/> must support the URI scheme specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(System.IO.Stream)">
- <summary>
- Configures log4net using the specified configuration data stream.
- </summary>
- <param name="configStream">A stream to load the XML configuration from.</param>
- <remarks>
- <para>
- The configuration data must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the log4net configuration data.
- </para>
- <para>
- Note that this method will NOT close the stream parameter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified configuration
- file.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The log4net configuration file can possible be specified in the application's
- configuration file (either <c>MyAppName.exe.config</c> for a
- normal application on <c>Web.config</c> for an ASP.NET application).
- </para>
- <para>
- The first element matching <c>&lt;configuration&gt;</c> will be read as the
- configuration. If this file is also a .NET .config file then you must specify
- a configuration section for the <c>log4net</c> element otherwise .NET will
- complain. Set the type for the section handler to <see cref="T:System.Configuration.IgnoreSectionHandler"/>, for example:
- <code lang="XML" escaped="true">
- <configSections>
- <section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
- </configSections>
- </code>
- </para>
- <example>
- The following example configures log4net using a configuration file, of which the
- location is stored in the application's configuration file :
- </example>
- <code lang="C#">
- using log4net.Config;
- using System.IO;
- using System.Configuration;
-
- ...
-
- XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"]));
- </code>
- <para>
- In the <c>.config</c> file, the path to the log4net can be specified like this :
- </para>
- <code lang="XML" escaped="true">
- <configuration>
- <appSettings>
- <add key="log4net-config-file" value="log.config"/>
- </appSettings>
- </configuration>
- </code>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(log4net.Repository.ILoggerRepository,System.Uri)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified configuration
- URI.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configUri">A URI to load the XML configuration from.</param>
- <remarks>
- <para>
- The configuration data must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The <see cref="T:System.Net.WebRequest"/> must support the URI scheme specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(log4net.Repository.ILoggerRepository,System.IO.Stream)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified configuration
- file.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configStream">The stream to load the XML configuration from.</param>
- <remarks>
- <para>
- The configuration data must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- Note that this method will NOT close the stream parameter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatch(System.IO.FileInfo)">
- <summary>
- Configures log4net using the file specified, monitors the file for changes
- and reloads the configuration if a change is detected.
- </summary>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The configuration file will be monitored using a <see cref="T:System.IO.FileSystemWatcher"/>
- and depends on the behavior of that class.
- </para>
- <para>
- For more information on how to configure log4net using
- a separate configuration file, see <see cref="M:log4net.Config.XmlConfigurator.Configure(System.IO.FileInfo)"/>.
- </para>
- </remarks>
- <seealso cref="M:log4net.Config.XmlConfigurator.Configure(System.IO.FileInfo)"/>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatch(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the file specified,
- monitors the file for changes and reloads the configuration if a change
- is detected.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The configuration file will be monitored using a <see cref="T:System.IO.FileSystemWatcher"/>
- and depends on the behavior of that class.
- </para>
- <para>
- For more information on how to configure log4net using
- a separate configuration file, see <see cref="M:log4net.Config.XmlConfigurator.Configure(System.IO.FileInfo)"/>.
- </para>
- </remarks>
- <seealso cref="M:log4net.Config.XmlConfigurator.Configure(System.IO.FileInfo)"/>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureFromXml(log4net.Repository.ILoggerRepository,System.Xml.XmlElement)">
- <summary>
- Configures the specified repository using a <c>log4net</c> element.
- </summary>
- <param name="repository">The hierarchy to configure.</param>
- <param name="element">The element to parse.</param>
- <remarks>
- <para>
- Loads the log4net configuration from the XML element
- supplied as <paramref name="element"/>.
- </para>
- <para>
- This method is ultimately called by one of the Configure methods
- to load the configuration from an <see cref="T:System.Xml.XmlElement"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler">
- <summary>
- Class used to watch config files.
- </summary>
- <remarks>
- <para>
- Uses the <see cref="T:System.IO.FileSystemWatcher"/> to monitor
- changes to a specified file. Because multiple change notifications
- may be raised when the file is modified, a timer is used to
- compress the notifications into a single event. The timer
- waits for <see cref="F:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.TimeoutMillis"/> time before delivering
- the event notification. If any further <see cref="T:System.IO.FileSystemWatcher"/>
- change notifications arrive while the timer is waiting it
- is reset and waits again for <see cref="F:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.TimeoutMillis"/> to
- elapse.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.TimeoutMillis">
- <summary>
- The default amount of time to wait after receiving notification
- before reloading the config file.
- </summary>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.StartWatching(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Watch a specified config file used to configure a repository
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configFile">The configuration file to watch.</param>
- <remarks>
- <para>
- Watch a specified config file used to configure a repository
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.m_configFile">
- <summary>
- Holds the FileInfo used to configure the XmlConfigurator
- </summary>
- </member>
- <member name="F:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.m_repository">
- <summary>
- Holds the repository being configured.
- </summary>
- </member>
- <member name="F:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.m_timer">
- <summary>
- The timer used to compress the notification events.
- </summary>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.#ctor(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler"/> class.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configFile">The configuration file to watch.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.ConfigureAndWatchHandler_OnChanged(System.Object,System.IO.FileSystemEventArgs)">
- <summary>
- Event handler used by <see cref="T:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler"/>.
- </summary>
- <param name="source">The <see cref="T:System.IO.FileSystemWatcher"/> firing the event.</param>
- <param name="e">The argument indicates the file that caused the event to be fired.</param>
- <remarks>
- <para>
- This handler reloads the configuration from the file when the event is fired.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.ConfigureAndWatchHandler_OnRenamed(System.Object,System.IO.RenamedEventArgs)">
- <summary>
- Event handler used by <see cref="T:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler"/>.
- </summary>
- <param name="source">The <see cref="T:System.IO.FileSystemWatcher"/> firing the event.</param>
- <param name="e">The argument indicates the file that caused the event to be fired.</param>
- <remarks>
- <para>
- This handler reloads the configuration from the file when the event is fired.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.OnWatchedFileChange(System.Object)">
- <summary>
- Called by the timer when the configuration has been updated.
- </summary>
- <param name="state">null</param>
- </member>
- <member name="T:log4net.Core.CompactRepositorySelector">
- <summary>
- The implementation of the <see cref="T:log4net.Core.IRepositorySelector"/> interface suitable
- for use with the compact framework
- </summary>
- <remarks>
- <para>
- This <see cref="T:log4net.Core.IRepositorySelector"/> implementation is a simple
- mapping between repository name and <see cref="T:log4net.Repository.ILoggerRepository"/>
- object.
- </para>
- <para>
- The .NET Compact Framework 1.0 does not support retrieving assembly
- level attributes therefore unlike the <c>DefaultRepositorySelector</c>
- this selector does not examine the calling assembly for attributes.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="T:log4net.Core.IRepositorySelector">
- <summary>
- Interface used by the <see cref="T:log4net.LogManager"/> to select the <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.LogManager"/> uses a <see cref="T:log4net.Core.IRepositorySelector"/>
- to specify the policy for selecting the correct <see cref="T:log4net.Repository.ILoggerRepository"/>
- to return to the caller.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.IRepositorySelector.GetRepository(System.Reflection.Assembly)">
- <summary>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified assembly.
- </summary>
- <param name="assembly">The assembly to use to lookup to the <see cref="T:log4net.Repository.ILoggerRepository"/></param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> for the assembly.</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified assembly.
- </para>
- <para>
- How the association between <see cref="T:System.Reflection.Assembly"/> and <see cref="T:log4net.Repository.ILoggerRepository"/>
- is made is not defined. The implementation may choose any method for
- this association. The results of this method must be repeatable, i.e.
- when called again with the same arguments the result must be the
- save value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IRepositorySelector.GetRepository(System.String)">
- <summary>
- Gets the named <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </summary>
- <param name="repositoryName">The name to use to lookup to the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <returns>The named <see cref="T:log4net.Repository.ILoggerRepository"/></returns>
- <remarks>
- Lookup a named <see cref="T:log4net.Repository.ILoggerRepository"/>. This is the repository created by
- calling <see cref="M:log4net.Core.IRepositorySelector.CreateRepository(System.String,System.Type)"/>.
- </remarks>
- </member>
- <member name="M:log4net.Core.IRepositorySelector.CreateRepository(System.Reflection.Assembly,System.Type)">
- <summary>
- Creates a new repository for the assembly specified.
- </summary>
- <param name="assembly">The assembly to use to create the domain to associate with the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <param name="repositoryType">The type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <returns>The repository created.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the domain
- specified such that a call to <see cref="M:log4net.Core.IRepositorySelector.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- <para>
- How the association between <see cref="T:System.Reflection.Assembly"/> and <see cref="T:log4net.Repository.ILoggerRepository"/>
- is made is not defined. The implementation may choose any method for
- this association.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IRepositorySelector.CreateRepository(System.String,System.Type)">
- <summary>
- Creates a new repository with the name specified.
- </summary>
- <param name="repositoryName">The name to associate with the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <param name="repositoryType">The type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <returns>The repository created.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the name
- specified such that a call to <see cref="M:log4net.Core.IRepositorySelector.GetRepository(System.String)"/> with the
- same name will return the same repository instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IRepositorySelector.ExistsRepository(System.String)">
- <summary>
- Test if a named repository exists
- </summary>
- <param name="repositoryName">the named repository to check</param>
- <returns><c>true</c> if the repository exists</returns>
- <remarks>
- <para>
- Test if a named repository exists. Use <see cref="M:log4net.Core.IRepositorySelector.CreateRepository(System.Reflection.Assembly,System.Type)"/>
- to create a new repository and <see cref="M:log4net.Core.IRepositorySelector.GetRepository(System.Reflection.Assembly)"/> to retrieve
- a repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IRepositorySelector.GetAllRepositories">
- <summary>
- Gets an array of all currently defined repositories.
- </summary>
- <returns>
- An array of the <see cref="T:log4net.Repository.ILoggerRepository"/> instances created by
- this <see cref="T:log4net.Core.IRepositorySelector"/>.</returns>
- <remarks>
- <para>
- Gets an array of all of the repositories created by this selector.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Core.IRepositorySelector.LoggerRepositoryCreatedEvent">
- <summary>
- Event to notify that a logger repository has been created.
- </summary>
- <value>
- Event to notify that a logger repository has been created.
- </value>
- <remarks>
- <para>
- Event raised when a new repository is created.
- The event source will be this selector. The event args will
- be a <see cref="T:log4net.Core.LoggerRepositoryCreationEventArgs"/> which
- holds the newly created <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.#ctor(System.Type)">
- <summary>
- Create a new repository selector
- </summary>
- <param name="defaultRepositoryType">the type of the repositories to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/></param>
- <remarks>
- <para>
- Create an new compact repository selector.
- The default type for repositories must be specified,
- an appropriate value would be <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">throw if <paramref name="defaultRepositoryType"/> is null</exception>
- <exception cref="T:System.ArgumentOutOfRangeException">throw if <paramref name="defaultRepositoryType"/> does not implement <see cref="T:log4net.Repository.ILoggerRepository"/></exception>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.GetRepository(System.Reflection.Assembly)">
- <summary>
- Get the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified assembly
- </summary>
- <param name="assembly">not used</param>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/></returns>
- <remarks>
- <para>
- The <paramref name="assembly"/> argument is not used. This selector does not create a
- separate repository for each assembly.
- </para>
- <para>
- As a named repository is not specified the default repository is
- returned. The default repository is named <c>log4net-default-repository</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.GetRepository(System.String)">
- <summary>
- Get the named <see cref="T:log4net.Repository.ILoggerRepository"/>
- </summary>
- <param name="repositoryName">the name of the repository to lookup</param>
- <returns>The named <see cref="T:log4net.Repository.ILoggerRepository"/></returns>
- <remarks>
- <para>
- Get the named <see cref="T:log4net.Repository.ILoggerRepository"/>. The default
- repository is <c>log4net-default-repository</c>. Other repositories
- must be created using the <see cref="M:log4net.Core.CompactRepositorySelector.CreateRepository(System.String,System.Type)"/>.
- If the named repository does not exist an exception is thrown.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">throw if <paramref name="repositoryName"/> is null</exception>
- <exception cref="T:log4net.Core.LogException">throw if the <paramref name="repositoryName"/> does not exist</exception>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.CreateRepository(System.Reflection.Assembly,System.Type)">
- <summary>
- Create a new repository for the assembly specified
- </summary>
- <param name="assembly">not used</param>
- <param name="repositoryType">the type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/></param>
- <returns>the repository created</returns>
- <remarks>
- <para>
- The <paramref name="assembly"/> argument is not used. This selector does not create a
- separate repository for each assembly.
- </para>
- <para>
- If the <paramref name="repositoryType"/> is <c>null</c> then the
- default repository type specified to the constructor is used.
- </para>
- <para>
- As a named repository is not specified the default repository is
- returned. The default repository is named <c>log4net-default-repository</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.CreateRepository(System.String,System.Type)">
- <summary>
- Create a new repository for the repository specified
- </summary>
- <param name="repositoryName">the repository to associate with the <see cref="T:log4net.Repository.ILoggerRepository"/></param>
- <param name="repositoryType">the type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/>.
- If this param is null then the default repository type is used.</param>
- <returns>the repository created</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.Core.CompactRepositorySelector.GetRepository(System.String)"/> with the
- same repository specified will return the same repository instance.
- </para>
- <para>
- If the named repository already exists an exception will be thrown.
- </para>
- <para>
- If <paramref name="repositoryType"/> is <c>null</c> then the default
- repository type specified to the constructor is used.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">throw if <paramref name="repositoryName"/> is null</exception>
- <exception cref="T:log4net.Core.LogException">throw if the <paramref name="repositoryName"/> already exists</exception>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.ExistsRepository(System.String)">
- <summary>
- Test if a named repository exists
- </summary>
- <param name="repositoryName">the named repository to check</param>
- <returns><c>true</c> if the repository exists</returns>
- <remarks>
- <para>
- Test if a named repository exists. Use <see cref="M:log4net.Core.CompactRepositorySelector.CreateRepository(System.String,System.Type)"/>
- to create a new repository and <see cref="M:log4net.Core.CompactRepositorySelector.GetRepository(System.String)"/> to retrieve
- a repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.GetAllRepositories">
- <summary>
- Gets a list of <see cref="T:log4net.Repository.ILoggerRepository"/> objects
- </summary>
- <returns>an array of all known <see cref="T:log4net.Repository.ILoggerRepository"/> objects</returns>
- <remarks>
- <para>
- Gets an array of all of the repositories created by this selector.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.OnLoggerRepositoryCreatedEvent(log4net.Repository.ILoggerRepository)">
- <summary>
- Notify the registered listeners that the repository has been created
- </summary>
- <param name="repository">The repository that has been created</param>
- <remarks>
- <para>
- Raises the <event cref="E:log4net.Core.CompactRepositorySelector.LoggerRepositoryCreatedEvent">LoggerRepositoryCreatedEvent</event>
- event.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Core.CompactRepositorySelector.LoggerRepositoryCreatedEvent">
- <summary>
- Event to notify that a logger repository has been created.
- </summary>
- <value>
- Event to notify that a logger repository has been created.
- </value>
- <remarks>
- <para>
- Event raised when a new repository is created.
- The event source will be this selector. The event args will
- be a <see cref="T:log4net.Core.LoggerRepositoryCreationEventArgs"/> which
- holds the newly created <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.DefaultRepositorySelector">
- <summary>
- The default implementation of the <see cref="T:log4net.Core.IRepositorySelector"/> interface.
- </summary>
- <remarks>
- <para>
- Uses attributes defined on the calling assembly to determine how to
- configure the hierarchy for the repository.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.#ctor(System.Type)">
- <summary>
- Creates a new repository selector.
- </summary>
- <param name="defaultRepositoryType">The type of the repositories to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/></param>
- <remarks>
- <para>
- Create an new repository selector.
- The default type for repositories must be specified,
- an appropriate value would be <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException"><paramref name="defaultRepositoryType"/> is <see langword="null"/>.</exception>
- <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="defaultRepositoryType"/> does not implement <see cref="T:log4net.Repository.ILoggerRepository"/>.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.GetRepository(System.Reflection.Assembly)">
- <summary>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified assembly.
- </summary>
- <param name="repositoryAssembly">The assembly use to lookup the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <remarks>
- <para>
- The type of the <see cref="T:log4net.Repository.ILoggerRepository"/> created and the repository
- to create can be overridden by specifying the <see cref="T:log4net.Config.RepositoryAttribute"/>
- attribute on the <paramref name="repositoryAssembly"/>.
- </para>
- <para>
- The default values are to use the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>
- implementation of the <see cref="T:log4net.Repository.ILoggerRepository"/> interface and to use the
- <see cref="P:System.Reflection.AssemblyName.Name"/> as the name of the repository.
- </para>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be automatically configured using
- any <see cref="T:log4net.Config.ConfiguratorAttribute"/> attributes defined on
- the <paramref name="repositoryAssembly"/>.
- </para>
- </remarks>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> for the assembly</returns>
- <exception cref="T:System.ArgumentNullException"><paramref name="repositoryAssembly"/> is <see langword="null"/>.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.GetRepository(System.String)">
- <summary>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified repository.
- </summary>
- <param name="repositoryName">The repository to use to lookup the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified repository.</returns>
- <remarks>
- <para>
- Returns the named repository. If <paramref name="repositoryName"/> is <c>null</c>
- a <see cref="T:System.ArgumentNullException"/> is thrown. If the repository
- does not exist a <see cref="T:log4net.Core.LogException"/> is thrown.
- </para>
- <para>
- Use <see cref="M:log4net.Core.DefaultRepositorySelector.CreateRepository(System.String,System.Type)"/> to create a repository.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException"><paramref name="repositoryName"/> is <see langword="null"/>.</exception>
- <exception cref="T:log4net.Core.LogException"><paramref name="repositoryName"/> does not exist.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.CreateRepository(System.Reflection.Assembly,System.Type)">
- <summary>
- Create a new repository for the assembly specified
- </summary>
- <param name="repositoryAssembly">the assembly to use to create the repository to associate with the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <param name="repositoryType">The type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <returns>The repository created.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.Core.DefaultRepositorySelector.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- <para>
- The type of the <see cref="T:log4net.Repository.ILoggerRepository"/> created and
- the repository to create can be overridden by specifying the
- <see cref="T:log4net.Config.RepositoryAttribute"/> attribute on the
- <paramref name="repositoryAssembly"/>. The default values are to use the
- <paramref name="repositoryType"/> implementation of the
- <see cref="T:log4net.Repository.ILoggerRepository"/> interface and to use the
- <see cref="P:System.Reflection.AssemblyName.Name"/> as the name of the repository.
- </para>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be automatically
- configured using any <see cref="T:log4net.Config.ConfiguratorAttribute"/>
- attributes defined on the <paramref name="repositoryAssembly"/>.
- </para>
- <para>
- If a repository for the <paramref name="repositoryAssembly"/> already exists
- that repository will be returned. An error will not be raised and that
- repository may be of a different type to that specified in <paramref name="repositoryType"/>.
- Also the <see cref="T:log4net.Config.RepositoryAttribute"/> attribute on the
- assembly may be used to override the repository type specified in
- <paramref name="repositoryType"/>.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException"><paramref name="repositoryAssembly"/> is <see langword="null"/>.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.CreateRepository(System.Reflection.Assembly,System.Type,System.String,System.Boolean)">
- <summary>
- Creates a new repository for the assembly specified.
- </summary>
- <param name="repositoryAssembly">the assembly to use to create the repository to associate with the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <param name="repositoryType">The type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <param name="repositoryName">The name to assign to the created repository</param>
- <param name="readAssemblyAttributes">Set to <c>true</c> to read and apply the assembly attributes</param>
- <returns>The repository created.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.Core.DefaultRepositorySelector.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- <para>
- The type of the <see cref="T:log4net.Repository.ILoggerRepository"/> created and
- the repository to create can be overridden by specifying the
- <see cref="T:log4net.Config.RepositoryAttribute"/> attribute on the
- <paramref name="repositoryAssembly"/>. The default values are to use the
- <paramref name="repositoryType"/> implementation of the
- <see cref="T:log4net.Repository.ILoggerRepository"/> interface and to use the
- <see cref="P:System.Reflection.AssemblyName.Name"/> as the name of the repository.
- </para>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be automatically
- configured using any <see cref="T:log4net.Config.ConfiguratorAttribute"/>
- attributes defined on the <paramref name="repositoryAssembly"/>.
- </para>
- <para>
- If a repository for the <paramref name="repositoryAssembly"/> already exists
- that repository will be returned. An error will not be raised and that
- repository may be of a different type to that specified in <paramref name="repositoryType"/>.
- Also the <see cref="T:log4net.Config.RepositoryAttribute"/> attribute on the
- assembly may be used to override the repository type specified in
- <paramref name="repositoryType"/>.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException"><paramref name="repositoryAssembly"/> is <see langword="null"/>.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.CreateRepository(System.String,System.Type)">
- <summary>
- Creates a new repository for the specified repository.
- </summary>
- <param name="repositoryName">The repository to associate with the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <param name="repositoryType">The type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/>.
- If this param is <see langword="null"/> then the default repository type is used.</param>
- <returns>The new repository.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.Core.DefaultRepositorySelector.GetRepository(System.String)"/> with the
- same repository specified will return the same repository instance.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException"><paramref name="repositoryName"/> is <see langword="null"/>.</exception>
- <exception cref="T:log4net.Core.LogException"><paramref name="repositoryName"/> already exists.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.ExistsRepository(System.String)">
- <summary>
- Test if a named repository exists
- </summary>
- <param name="repositoryName">the named repository to check</param>
- <returns><c>true</c> if the repository exists</returns>
- <remarks>
- <para>
- Test if a named repository exists. Use <see cref="M:log4net.Core.DefaultRepositorySelector.CreateRepository(System.String,System.Type)"/>
- to create a new repository and <see cref="M:log4net.Core.DefaultRepositorySelector.GetRepository(System.String)"/> to retrieve
- a repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.GetAllRepositories">
- <summary>
- Gets a list of <see cref="T:log4net.Repository.ILoggerRepository"/> objects
- </summary>
- <returns>an array of all known <see cref="T:log4net.Repository.ILoggerRepository"/> objects</returns>
- <remarks>
- <para>
- Gets an array of all of the repositories created by this selector.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.AliasRepository(System.String,log4net.Repository.ILoggerRepository)">
- <summary>
- Aliases a repository to an existing repository.
- </summary>
- <param name="repositoryAlias">The repository to alias.</param>
- <param name="repositoryTarget">The repository that the repository is aliased to.</param>
- <remarks>
- <para>
- The repository specified will be aliased to the repository when created.
- The repository must not already exist.
- </para>
- <para>
- When the repository is created it must utilize the same repository type as
- the repository it is aliased to, otherwise the aliasing will fail.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">
- <para><paramref name="repositoryAlias"/> is <see langword="null"/>.</para>
- <para>-or-</para>
- <para><paramref name="repositoryTarget"/> is <see langword="null"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.OnLoggerRepositoryCreatedEvent(log4net.Repository.ILoggerRepository)">
- <summary>
- Notifies the registered listeners that the repository has been created.
- </summary>
- <param name="repository">The repository that has been created.</param>
- <remarks>
- <para>
- Raises the <see cref="E:log4net.Core.DefaultRepositorySelector.LoggerRepositoryCreatedEvent"/> event.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.GetInfoForAssembly(System.Reflection.Assembly,System.String@,System.Type@)">
- <summary>
- Gets the repository name and repository type for the specified assembly.
- </summary>
- <param name="assembly">The assembly that has a <see cref="T:log4net.Config.RepositoryAttribute"/>.</param>
- <param name="repositoryName">in/out param to hold the repository name to use for the assembly, caller should set this to the default value before calling.</param>
- <param name="repositoryType">in/out param to hold the type of the repository to create for the assembly, caller should set this to the default value before calling.</param>
- <exception cref="T:System.ArgumentNullException"><paramref name="assembly"/> is <see langword="null"/>.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.ConfigureRepository(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Configures the repository using information from the assembly.
- </summary>
- <param name="assembly">The assembly containing <see cref="T:log4net.Config.ConfiguratorAttribute"/>
- attributes which define the configuration for the repository.</param>
- <param name="repository">The repository to configure.</param>
- <exception cref="T:System.ArgumentNullException">
- <para><paramref name="assembly"/> is <see langword="null"/>.</para>
- <para>-or-</para>
- <para><paramref name="repository"/> is <see langword="null"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.LoadPlugins(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Loads the attribute defined plugins on the assembly.
- </summary>
- <param name="assembly">The assembly that contains the attributes.</param>
- <param name="repository">The repository to add the plugins to.</param>
- <exception cref="T:System.ArgumentNullException">
- <para><paramref name="assembly"/> is <see langword="null"/>.</para>
- <para>-or-</para>
- <para><paramref name="repository"/> is <see langword="null"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.LoadAliases(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Loads the attribute defined aliases on the assembly.
- </summary>
- <param name="assembly">The assembly that contains the attributes.</param>
- <param name="repository">The repository to alias to.</param>
- <exception cref="T:System.ArgumentNullException">
- <para><paramref name="assembly"/> is <see langword="null"/>.</para>
- <para>-or-</para>
- <para><paramref name="repository"/> is <see langword="null"/>.</para>
- </exception>
- </member>
- <member name="E:log4net.Core.DefaultRepositorySelector.LoggerRepositoryCreatedEvent">
- <summary>
- Event to notify that a logger repository has been created.
- </summary>
- <value>
- Event to notify that a logger repository has been created.
- </value>
- <remarks>
- <para>
- Event raised when a new repository is created.
- The event source will be this selector. The event args will
- be a <see cref="T:log4net.Core.LoggerRepositoryCreationEventArgs"/> which
- holds the newly created <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.ErrorCode">
- <summary>
- Defined error codes that can be passed to the <see cref="M:log4net.Core.IErrorHandler.Error(System.String,System.Exception,log4net.Core.ErrorCode)"/> method.
- </summary>
- <remarks>
- <para>
- Values passed to the <see cref="M:log4net.Core.IErrorHandler.Error(System.String,System.Exception,log4net.Core.ErrorCode)"/> method.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Core.ErrorCode.GenericFailure">
- <summary>
- A general error
- </summary>
- </member>
- <member name="F:log4net.Core.ErrorCode.WriteFailure">
- <summary>
- Error while writing output
- </summary>
- </member>
- <member name="F:log4net.Core.ErrorCode.FlushFailure">
- <summary>
- Failed to flush file
- </summary>
- </member>
- <member name="F:log4net.Core.ErrorCode.CloseFailure">
- <summary>
- Failed to close file
- </summary>
- </member>
- <member name="F:log4net.Core.ErrorCode.FileOpenFailure">
- <summary>
- Unable to open output file
- </summary>
- </member>
- <member name="F:log4net.Core.ErrorCode.MissingLayout">
- <summary>
- No layout specified
- </summary>
- </member>
- <member name="F:log4net.Core.ErrorCode.AddressParseFailure">
- <summary>
- Failed to parse address
- </summary>
- </member>
- <member name="T:log4net.Core.IErrorHandler">
- <summary>
- Appenders may delegate their error handling to an <see cref="T:log4net.Core.IErrorHandler"/>.
- </summary>
- <remarks>
- <para>
- Error handling is a particularly tedious to get right because by
- definition errors are hard to predict and to reproduce.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.IErrorHandler.Error(System.String,System.Exception,log4net.Core.ErrorCode)">
- <summary>
- Handles the error and information about the error condition is passed as
- a parameter.
- </summary>
- <param name="message">The message associated with the error.</param>
- <param name="e">The <see cref="T:System.Exception"/> that was thrown when the error occurred.</param>
- <param name="errorCode">The error code associated with the error.</param>
- <remarks>
- <para>
- Handles the error and information about the error condition is passed as
- a parameter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IErrorHandler.Error(System.String,System.Exception)">
- <summary>
- Prints the error message passed as a parameter.
- </summary>
- <param name="message">The message associated with the error.</param>
- <param name="e">The <see cref="T:System.Exception"/> that was thrown when the error occurred.</param>
- <remarks>
- <para>
- See <see cref="M:log4net.Core.IErrorHandler.Error(System.String,System.Exception,log4net.Core.ErrorCode)"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IErrorHandler.Error(System.String)">
- <summary>
- Prints the error message passed as a parameter.
- </summary>
- <param name="message">The message associated with the error.</param>
- <remarks>
- <para>
- See <see cref="M:log4net.Core.IErrorHandler.Error(System.String,System.Exception,log4net.Core.ErrorCode)"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.IFixingRequired">
- <summary>
- Interface for objects that require fixing.
- </summary>
- <remarks>
- <para>
- Interface that indicates that the object requires fixing before it
- can be taken outside the context of the appender's
- <see cref="M:log4net.Appender.IAppender.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </para>
- <para>
- When objects that implement this interface are stored
- in the context properties maps <see cref="T:log4net.GlobalContext"/>
- <see cref="P:log4net.GlobalContext.Properties"/> and <see cref="T:log4net.ThreadContext"/>
- <see cref="P:log4net.ThreadContext.Properties"/> are fixed
- (see <see cref="P:log4net.Core.LoggingEvent.Fix"/>) the <see cref="M:log4net.Core.IFixingRequired.GetFixedObject"/>
- method will be called.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Core.IFixingRequired.GetFixedObject">
- <summary>
- Get a portable version of this object
- </summary>
- <returns>the portable instance of this object</returns>
- <remarks>
- <para>
- Get a portable instance object that represents the current
- state of this object. The portable object can be stored
- and logged from any thread with identical results.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.ILogger">
- <summary>
- Interface that all loggers implement
- </summary>
- <remarks>
- <para>
- This interface supports logging events and testing if a level
- is enabled for logging.
- </para>
- <para>
- These methods will not throw exceptions. Note to implementor, ensure
- that the implementation of these methods cannot allow an exception
- to be thrown to the caller.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.ILogger.Log(System.Type,log4net.Core.Level,System.Object,System.Exception)">
- <summary>
- This generic form is intended to be used by wrappers.
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <param name="level">The level of the message to be logged.</param>
- <param name="message">The message object to log.</param>
- <param name="exception">the exception to log, including its stack trace. Pass <c>null</c> to not log an exception.</param>
- <remarks>
- <para>
- Generates a logging event for the specified <paramref name="level"/> using
- the <paramref name="message"/> and <paramref name="exception"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.ILogger.Log(log4net.Core.LoggingEvent)">
- <summary>
- This is the most generic printing method that is intended to be used
- by wrappers.
- </summary>
- <param name="logEvent">The event being logged.</param>
- <remarks>
- <para>
- Logs the specified logging event through this logger.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.ILogger.IsEnabledFor(log4net.Core.Level)">
- <summary>
- Checks if this logger is enabled for a given <see cref="T:log4net.Core.Level"/> passed as parameter.
- </summary>
- <param name="level">The level to check.</param>
- <returns>
- <c>true</c> if this logger is enabled for <c>level</c>, otherwise <c>false</c>.
- </returns>
- <remarks>
- <para>
- Test if this logger is going to log events of the specified <paramref name="level"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.ILogger.Name">
- <summary>
- Gets the name of the logger.
- </summary>
- <value>
- The name of the logger.
- </value>
- <remarks>
- <para>
- The name of this logger
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.ILogger.Repository">
- <summary>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> where this
- <c>Logger</c> instance is attached to.
- </summary>
- <value>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that this logger belongs to.
- </value>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> where this
- <c>Logger</c> instance is attached to.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.ILoggerWrapper">
- <summary>
- Base interface for all wrappers
- </summary>
- <remarks>
- <para>
- Base interface for all wrappers.
- </para>
- <para>
- All wrappers must implement this interface.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="P:log4net.Core.ILoggerWrapper.Logger">
- <summary>
- Get the implementation behind this wrapper object.
- </summary>
- <value>
- The <see cref="T:log4net.Core.ILogger"/> object that in implementing this object.
- </value>
- <remarks>
- <para>
- The <see cref="T:log4net.Core.ILogger"/> object that in implementing this
- object. The <c>Logger</c> object may not
- be the same object as this object because of logger decorators.
- This gets the actual underlying objects that is used to process
- the log events.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LoggerRepositoryCreationEventHandler">
- <summary>
- Delegate used to handle logger repository creation event notifications
- </summary>
- <param name="sender">The <see cref="T:log4net.Core.IRepositorySelector"/> which created the repository.</param>
- <param name="e">The <see cref="T:log4net.Core.LoggerRepositoryCreationEventArgs"/> event args
- that holds the <see cref="T:log4net.Repository.ILoggerRepository"/> instance that has been created.</param>
- <remarks>
- <para>
- Delegate used to handle logger repository creation event notifications.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LoggerRepositoryCreationEventArgs">
- <summary>
- Provides data for the <see cref="E:log4net.Core.IRepositorySelector.LoggerRepositoryCreatedEvent"/> event.
- </summary>
- <remarks>
- <para>
- A <see cref="E:log4net.Core.IRepositorySelector.LoggerRepositoryCreatedEvent"/>
- event is raised every time a <see cref="T:log4net.Repository.ILoggerRepository"/> is created.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggerRepositoryCreationEventArgs.m_repository">
- <summary>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created
- </summary>
- </member>
- <member name="M:log4net.Core.LoggerRepositoryCreationEventArgs.#ctor(log4net.Repository.ILoggerRepository)">
- <summary>
- Construct instance using <see cref="T:log4net.Repository.ILoggerRepository"/> specified
- </summary>
- <param name="repository">the <see cref="T:log4net.Repository.ILoggerRepository"/> that has been created</param>
- <remarks>
- <para>
- Construct instance using <see cref="T:log4net.Repository.ILoggerRepository"/> specified
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggerRepositoryCreationEventArgs.LoggerRepository">
- <summary>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that has been created
- </summary>
- <value>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that has been created
- </value>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that has been created
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.ITriggeringEventEvaluator">
- <summary>
- Test if an <see cref="T:log4net.Core.LoggingEvent"/> triggers an action
- </summary>
- <remarks>
- <para>
- Implementations of this interface allow certain appenders to decide
- when to perform an appender specific action.
- </para>
- <para>
- The action or behavior triggered is defined by the implementation.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Core.ITriggeringEventEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)">
- <summary>
- Test if this event triggers the action
- </summary>
- <param name="loggingEvent">The event to check</param>
- <returns><c>true</c> if this event triggers the action, otherwise <c>false</c></returns>
- <remarks>
- <para>
- Return <c>true</c> if this event triggers the action
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.Level">
- <summary>
- Defines the default set of levels recognized by the system.
- </summary>
- <remarks>
- <para>
- Each <see cref="T:log4net.Core.LoggingEvent"/> has an associated <see cref="T:log4net.Core.Level"/>.
- </para>
- <para>
- Levels have a numeric <see cref="P:log4net.Core.Level.Value"/> that defines the relative
- ordering between levels. Two Levels with the same <see cref="P:log4net.Core.Level.Value"/>
- are deemed to be equivalent.
- </para>
- <para>
- The levels that are recognized by log4net are set for each <see cref="T:log4net.Repository.ILoggerRepository"/>
- and each repository can have different levels defined. The levels are stored
- in the <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/> on the repository. Levels are
- looked up by name from the <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/>.
- </para>
- <para>
- When logging at level INFO the actual level used is not <see cref="F:log4net.Core.Level.Info"/> but
- the value of <c>LoggerRepository.LevelMap["INFO"]</c>. The default value for this is
- <see cref="F:log4net.Core.Level.Info"/>, but this can be changed by reconfiguring the level map.
- </para>
- <para>
- Each level has a <see cref="P:log4net.Core.Level.DisplayName"/> in addition to its <see cref="P:log4net.Core.Level.Name"/>. The
- <see cref="P:log4net.Core.Level.DisplayName"/> is the string that is written into the output log. By default
- the display name is the same as the level name, but this can be used to alias levels
- or to localize the log output.
- </para>
- <para>
- Some of the predefined levels recognized by the system are:
- </para>
- <list type="bullet">
- <item>
- <description><see cref="F:log4net.Core.Level.Off"/>.</description>
- </item>
- <item>
- <description><see cref="F:log4net.Core.Level.Fatal"/>.</description>
- </item>
- <item>
- <description><see cref="F:log4net.Core.Level.Error"/>.</description>
- </item>
- <item>
- <description><see cref="F:log4net.Core.Level.Warn"/>.</description>
- </item>
- <item>
- <description><see cref="F:log4net.Core.Level.Info"/>.</description>
- </item>
- <item>
- <description><see cref="F:log4net.Core.Level.Debug"/>.</description>
- </item>
- <item>
- <description><see cref="F:log4net.Core.Level.All"/>.</description>
- </item>
- </list>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.Level.#ctor(System.Int32,System.String,System.String)">
- <summary>
- Constructor
- </summary>
- <param name="level">Integer value for this level, higher values represent more severe levels.</param>
- <param name="levelName">The string name of this level.</param>
- <param name="displayName">The display name for this level. This may be localized or otherwise different from the name</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.Level"/> class with
- the specified level name and value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.#ctor(System.Int32,System.String)">
- <summary>
- Constructor
- </summary>
- <param name="level">Integer value for this level, higher values represent more severe levels.</param>
- <param name="levelName">The string name of this level.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.Level"/> class with
- the specified level name and value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.ToString">
- <summary>
- Returns the <see cref="T:System.String"/> representation of the current
- <see cref="T:log4net.Core.Level"/>.
- </summary>
- <returns>
- A <see cref="T:System.String"/> representation of the current <see cref="T:log4net.Core.Level"/>.
- </returns>
- <remarks>
- <para>
- Returns the level <see cref="P:log4net.Core.Level.Name"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.Equals(System.Object)">
- <summary>
- Compares levels.
- </summary>
- <param name="o">The object to compare against.</param>
- <returns><c>true</c> if the objects are equal.</returns>
- <remarks>
- <para>
- Compares the levels of <see cref="T:log4net.Core.Level"/> instances, and
- defers to base class if the target object is not a <see cref="T:log4net.Core.Level"/>
- instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.GetHashCode">
- <summary>
- Returns a hash code
- </summary>
- <returns>A hash code for the current <see cref="T:log4net.Core.Level"/>.</returns>
- <remarks>
- <para>
- Returns a hash code suitable for use in hashing algorithms and data
- structures like a hash table.
- </para>
- <para>
- Returns the hash code of the level <see cref="P:log4net.Core.Level.Value"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.CompareTo(System.Object)">
- <summary>
- Compares this instance to a specified object and returns an
- indication of their relative values.
- </summary>
- <param name="r">A <see cref="T:log4net.Core.Level"/> instance or <see langword="null"/> to compare with this instance.</param>
- <returns>
- A 32-bit signed integer that indicates the relative order of the
- values compared. The return value has these meanings:
- <list type="table">
- <listheader>
- <term>Value</term>
- <description>Meaning</description>
- </listheader>
- <item>
- <term>Less than zero</term>
- <description>This instance is less than <paramref name="r"/>.</description>
- </item>
- <item>
- <term>Zero</term>
- <description>This instance is equal to <paramref name="r"/>.</description>
- </item>
- <item>
- <term>Greater than zero</term>
- <description>
- <para>This instance is greater than <paramref name="r"/>.</para>
- <para>-or-</para>
- <para><paramref name="r"/> is <see langword="null"/>.</para>
- </description>
- </item>
- </list>
- </returns>
- <remarks>
- <para>
- <paramref name="r"/> must be an instance of <see cref="T:log4net.Core.Level"/>
- or <see langword="null"/>; otherwise, an exception is thrown.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentException"><paramref name="r"/> is not a <see cref="T:log4net.Core.Level"/>.</exception>
- </member>
- <member name="M:log4net.Core.Level.op_GreaterThan(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Returns a value indicating whether a specified <see cref="T:log4net.Core.Level"/>
- is greater than another specified <see cref="T:log4net.Core.Level"/>.
- </summary>
- <param name="l">A <see cref="T:log4net.Core.Level"/></param>
- <param name="r">A <see cref="T:log4net.Core.Level"/></param>
- <returns>
- <c>true</c> if <paramref name="l"/> is greater than
- <paramref name="r"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.op_LessThan(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Returns a value indicating whether a specified <see cref="T:log4net.Core.Level"/>
- is less than another specified <see cref="T:log4net.Core.Level"/>.
- </summary>
- <param name="l">A <see cref="T:log4net.Core.Level"/></param>
- <param name="r">A <see cref="T:log4net.Core.Level"/></param>
- <returns>
- <c>true</c> if <paramref name="l"/> is less than
- <paramref name="r"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.op_GreaterThanOrEqual(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Returns a value indicating whether a specified <see cref="T:log4net.Core.Level"/>
- is greater than or equal to another specified <see cref="T:log4net.Core.Level"/>.
- </summary>
- <param name="l">A <see cref="T:log4net.Core.Level"/></param>
- <param name="r">A <see cref="T:log4net.Core.Level"/></param>
- <returns>
- <c>true</c> if <paramref name="l"/> is greater than or equal to
- <paramref name="r"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.op_LessThanOrEqual(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Returns a value indicating whether a specified <see cref="T:log4net.Core.Level"/>
- is less than or equal to another specified <see cref="T:log4net.Core.Level"/>.
- </summary>
- <param name="l">A <see cref="T:log4net.Core.Level"/></param>
- <param name="r">A <see cref="T:log4net.Core.Level"/></param>
- <returns>
- <c>true</c> if <paramref name="l"/> is less than or equal to
- <paramref name="r"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.op_Equality(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Returns a value indicating whether two specified <see cref="T:log4net.Core.Level"/>
- objects have the same value.
- </summary>
- <param name="l">A <see cref="T:log4net.Core.Level"/> or <see langword="null"/>.</param>
- <param name="r">A <see cref="T:log4net.Core.Level"/> or <see langword="null"/>.</param>
- <returns>
- <c>true</c> if the value of <paramref name="l"/> is the same as the
- value of <paramref name="r"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.op_Inequality(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Returns a value indicating whether two specified <see cref="T:log4net.Core.Level"/>
- objects have different values.
- </summary>
- <param name="l">A <see cref="T:log4net.Core.Level"/> or <see langword="null"/>.</param>
- <param name="r">A <see cref="T:log4net.Core.Level"/> or <see langword="null"/>.</param>
- <returns>
- <c>true</c> if the value of <paramref name="l"/> is different from
- the value of <paramref name="r"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.Compare(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Compares two specified <see cref="T:log4net.Core.Level"/> instances.
- </summary>
- <param name="l">The first <see cref="T:log4net.Core.Level"/> to compare.</param>
- <param name="r">The second <see cref="T:log4net.Core.Level"/> to compare.</param>
- <returns>
- A 32-bit signed integer that indicates the relative order of the
- two values compared. The return value has these meanings:
- <list type="table">
- <listheader>
- <term>Value</term>
- <description>Meaning</description>
- </listheader>
- <item>
- <term>Less than zero</term>
- <description><paramref name="l"/> is less than <paramref name="r"/>.</description>
- </item>
- <item>
- <term>Zero</term>
- <description><paramref name="l"/> is equal to <paramref name="r"/>.</description>
- </item>
- <item>
- <term>Greater than zero</term>
- <description><paramref name="l"/> is greater than <paramref name="r"/>.</description>
- </item>
- </list>
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.Level.Off">
- <summary>
- The <see cref="F:log4net.Core.Level.Off"/> level designates a higher level than all the rest.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Emergency">
- <summary>
- The <see cref="F:log4net.Core.Level.Emergency"/> level designates very severe error events.
- System unusable, emergencies.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Fatal">
- <summary>
- The <see cref="F:log4net.Core.Level.Fatal"/> level designates very severe error events
- that will presumably lead the application to abort.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Alert">
- <summary>
- The <see cref="F:log4net.Core.Level.Alert"/> level designates very severe error events.
- Take immediate action, alerts.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Critical">
- <summary>
- The <see cref="F:log4net.Core.Level.Critical"/> level designates very severe error events.
- Critical condition, critical.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Severe">
- <summary>
- The <see cref="F:log4net.Core.Level.Severe"/> level designates very severe error events.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Error">
- <summary>
- The <see cref="F:log4net.Core.Level.Error"/> level designates error events that might
- still allow the application to continue running.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Warn">
- <summary>
- The <see cref="F:log4net.Core.Level.Warn"/> level designates potentially harmful
- situations.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Notice">
- <summary>
- The <see cref="F:log4net.Core.Level.Notice"/> level designates informational messages
- that highlight the progress of the application at the highest level.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Info">
- <summary>
- The <see cref="F:log4net.Core.Level.Info"/> level designates informational messages that
- highlight the progress of the application at coarse-grained level.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Debug">
- <summary>
- The <see cref="F:log4net.Core.Level.Debug"/> level designates fine-grained informational
- events that are most useful to debug an application.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Fine">
- <summary>
- The <see cref="F:log4net.Core.Level.Fine"/> level designates fine-grained informational
- events that are most useful to debug an application.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Trace">
- <summary>
- The <see cref="F:log4net.Core.Level.Trace"/> level designates fine-grained informational
- events that are most useful to debug an application.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Finer">
- <summary>
- The <see cref="F:log4net.Core.Level.Finer"/> level designates fine-grained informational
- events that are most useful to debug an application.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Verbose">
- <summary>
- The <see cref="F:log4net.Core.Level.Verbose"/> level designates fine-grained informational
- events that are most useful to debug an application.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Finest">
- <summary>
- The <see cref="F:log4net.Core.Level.Finest"/> level designates fine-grained informational
- events that are most useful to debug an application.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.All">
- <summary>
- The <see cref="F:log4net.Core.Level.All"/> level designates the lowest level possible.
- </summary>
- </member>
- <member name="P:log4net.Core.Level.Name">
- <summary>
- Gets the name of this level.
- </summary>
- <value>
- The name of this level.
- </value>
- <remarks>
- <para>
- Gets the name of this level.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.Level.Value">
- <summary>
- Gets the value of this level.
- </summary>
- <value>
- The value of this level.
- </value>
- <remarks>
- <para>
- Gets the value of this level.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.Level.DisplayName">
- <summary>
- Gets the display name of this level.
- </summary>
- <value>
- The display name of this level.
- </value>
- <remarks>
- <para>
- Gets the display name of this level.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LevelCollection">
- <summary>
- A strongly-typed collection of <see cref="T:log4net.Core.Level"/> objects.
- </summary>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Core.LevelCollection.ReadOnly(log4net.Core.LevelCollection)">
- <summary>
- Creates a read-only wrapper for a <c>LevelCollection</c> instance.
- </summary>
- <param name="list">list to create a readonly wrapper arround</param>
- <returns>
- A <c>LevelCollection</c> wrapper that is read-only.
- </returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.#ctor">
- <summary>
- Initializes a new instance of the <c>LevelCollection</c> class
- that is empty and has the default initial capacity.
- </summary>
- </member>
- <member name="M:log4net.Core.LevelCollection.#ctor(System.Int32)">
- <summary>
- Initializes a new instance of the <c>LevelCollection</c> class
- that has the specified initial capacity.
- </summary>
- <param name="capacity">
- The number of elements that the new <c>LevelCollection</c> is initially capable of storing.
- </param>
- </member>
- <member name="M:log4net.Core.LevelCollection.#ctor(log4net.Core.LevelCollection)">
- <summary>
- Initializes a new instance of the <c>LevelCollection</c> class
- that contains elements copied from the specified <c>LevelCollection</c>.
- </summary>
- <param name="c">The <c>LevelCollection</c> whose elements are copied to the new collection.</param>
- </member>
- <member name="M:log4net.Core.LevelCollection.#ctor(log4net.Core.Level[])">
- <summary>
- Initializes a new instance of the <c>LevelCollection</c> class
- that contains elements copied from the specified <see cref="T:log4net.Core.Level"/> array.
- </summary>
- <param name="a">The <see cref="T:log4net.Core.Level"/> array whose elements are copied to the new list.</param>
- </member>
- <member name="M:log4net.Core.LevelCollection.#ctor(System.Collections.ICollection)">
- <summary>
- Initializes a new instance of the <c>LevelCollection</c> class
- that contains elements copied from the specified <see cref="T:log4net.Core.Level"/> collection.
- </summary>
- <param name="col">The <see cref="T:log4net.Core.Level"/> collection whose elements are copied to the new list.</param>
- </member>
- <member name="M:log4net.Core.LevelCollection.#ctor(log4net.Core.LevelCollection.Tag)">
- <summary>
- Allow subclasses to avoid our default constructors
- </summary>
- <param name="tag"></param>
- </member>
- <member name="M:log4net.Core.LevelCollection.CopyTo(log4net.Core.Level[])">
- <summary>
- Copies the entire <c>LevelCollection</c> to a one-dimensional
- <see cref="T:log4net.Core.Level"/> array.
- </summary>
- <param name="array">The one-dimensional <see cref="T:log4net.Core.Level"/> array to copy to.</param>
- </member>
- <member name="M:log4net.Core.LevelCollection.CopyTo(log4net.Core.Level[],System.Int32)">
- <summary>
- Copies the entire <c>LevelCollection</c> to a one-dimensional
- <see cref="T:log4net.Core.Level"/> array, starting at the specified index of the target array.
- </summary>
- <param name="array">The one-dimensional <see cref="T:log4net.Core.Level"/> array to copy to.</param>
- <param name="start">The zero-based index in <paramref name="array"/> at which copying begins.</param>
- </member>
- <member name="M:log4net.Core.LevelCollection.Add(log4net.Core.Level)">
- <summary>
- Adds a <see cref="T:log4net.Core.Level"/> to the end of the <c>LevelCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Core.Level"/> to be added to the end of the <c>LevelCollection</c>.</param>
- <returns>The index at which the value has been added.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.Clear">
- <summary>
- Removes all elements from the <c>LevelCollection</c>.
- </summary>
- </member>
- <member name="M:log4net.Core.LevelCollection.Clone">
- <summary>
- Creates a shallow copy of the <see cref="T:log4net.Core.LevelCollection"/>.
- </summary>
- <returns>A new <see cref="T:log4net.Core.LevelCollection"/> with a shallow copy of the collection data.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.Contains(log4net.Core.Level)">
- <summary>
- Determines whether a given <see cref="T:log4net.Core.Level"/> is in the <c>LevelCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Core.Level"/> to check for.</param>
- <returns><c>true</c> if <paramref name="item"/> is found in the <c>LevelCollection</c>; otherwise, <c>false</c>.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.IndexOf(log4net.Core.Level)">
- <summary>
- Returns the zero-based index of the first occurrence of a <see cref="T:log4net.Core.Level"/>
- in the <c>LevelCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Core.Level"/> to locate in the <c>LevelCollection</c>.</param>
- <returns>
- The zero-based index of the first occurrence of <paramref name="item"/>
- in the entire <c>LevelCollection</c>, if found; otherwise, -1.
- </returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.Insert(System.Int32,log4net.Core.Level)">
- <summary>
- Inserts an element into the <c>LevelCollection</c> at the specified index.
- </summary>
- <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
- <param name="item">The <see cref="T:log4net.Core.Level"/> to insert.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Core.LevelCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Core.LevelCollection.Remove(log4net.Core.Level)">
- <summary>
- Removes the first occurrence of a specific <see cref="T:log4net.Core.Level"/> from the <c>LevelCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Core.Level"/> to remove from the <c>LevelCollection</c>.</param>
- <exception cref="T:System.ArgumentException">
- The specified <see cref="T:log4net.Core.Level"/> was not found in the <c>LevelCollection</c>.
- </exception>
- </member>
- <member name="M:log4net.Core.LevelCollection.RemoveAt(System.Int32)">
- <summary>
- Removes the element at the specified index of the <c>LevelCollection</c>.
- </summary>
- <param name="index">The zero-based index of the element to remove.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Core.LevelCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Core.LevelCollection.GetEnumerator">
- <summary>
- Returns an enumerator that can iterate through the <c>LevelCollection</c>.
- </summary>
- <returns>An <see cref="T:log4net.Core.LevelCollection.Enumerator"/> for the entire <c>LevelCollection</c>.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.AddRange(log4net.Core.LevelCollection)">
- <summary>
- Adds the elements of another <c>LevelCollection</c> to the current <c>LevelCollection</c>.
- </summary>
- <param name="x">The <c>LevelCollection</c> whose elements should be added to the end of the current <c>LevelCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Core.LevelCollection.Count"/> of the <c>LevelCollection</c>.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.AddRange(log4net.Core.Level[])">
- <summary>
- Adds the elements of a <see cref="T:log4net.Core.Level"/> array to the current <c>LevelCollection</c>.
- </summary>
- <param name="x">The <see cref="T:log4net.Core.Level"/> array whose elements should be added to the end of the <c>LevelCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Core.LevelCollection.Count"/> of the <c>LevelCollection</c>.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.AddRange(System.Collections.ICollection)">
- <summary>
- Adds the elements of a <see cref="T:log4net.Core.Level"/> collection to the current <c>LevelCollection</c>.
- </summary>
- <param name="col">The <see cref="T:log4net.Core.Level"/> collection whose elements should be added to the end of the <c>LevelCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Core.LevelCollection.Count"/> of the <c>LevelCollection</c>.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.TrimToSize">
- <summary>
- Sets the capacity to the actual number of elements.
- </summary>
- </member>
- <member name="M:log4net.Core.LevelCollection.ValidateIndex(System.Int32)">
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Core.LevelCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Core.LevelCollection.ValidateIndex(System.Int32,System.Boolean)">
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Core.LevelCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="P:log4net.Core.LevelCollection.Count">
- <summary>
- Gets the number of elements actually contained in the <c>LevelCollection</c>.
- </summary>
- </member>
- <member name="P:log4net.Core.LevelCollection.IsSynchronized">
- <summary>
- Gets a value indicating whether access to the collection is synchronized (thread-safe).
- </summary>
- <value>true if access to the ICollection is synchronized (thread-safe); otherwise, false.</value>
- </member>
- <member name="P:log4net.Core.LevelCollection.SyncRoot">
- <summary>
- Gets an object that can be used to synchronize access to the collection.
- </summary>
- </member>
- <member name="P:log4net.Core.LevelCollection.Item(System.Int32)">
- <summary>
- Gets or sets the <see cref="T:log4net.Core.Level"/> at the specified index.
- </summary>
- <param name="index">The zero-based index of the element to get or set.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Core.LevelCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="P:log4net.Core.LevelCollection.IsFixedSize">
- <summary>
- Gets a value indicating whether the collection has a fixed size.
- </summary>
- <value>true if the collection has a fixed size; otherwise, false. The default is false</value>
- </member>
- <member name="P:log4net.Core.LevelCollection.IsReadOnly">
- <summary>
- Gets a value indicating whether the IList is read-only.
- </summary>
- <value>true if the collection is read-only; otherwise, false. The default is false</value>
- </member>
- <member name="P:log4net.Core.LevelCollection.Capacity">
- <summary>
- Gets or sets the number of elements the <c>LevelCollection</c> can contain.
- </summary>
- </member>
- <member name="T:log4net.Core.LevelCollection.ILevelCollectionEnumerator">
- <summary>
- Supports type-safe iteration over a <see cref="T:log4net.Core.LevelCollection"/>.
- </summary>
- </member>
- <member name="M:log4net.Core.LevelCollection.ILevelCollectionEnumerator.MoveNext">
- <summary>
- Advances the enumerator to the next element in the collection.
- </summary>
- <returns>
- <c>true</c> if the enumerator was successfully advanced to the next element;
- <c>false</c> if the enumerator has passed the end of the collection.
- </returns>
- <exception cref="T:System.InvalidOperationException">
- The collection was modified after the enumerator was created.
- </exception>
- </member>
- <member name="M:log4net.Core.LevelCollection.ILevelCollectionEnumerator.Reset">
- <summary>
- Sets the enumerator to its initial position, before the first element in the collection.
- </summary>
- </member>
- <member name="P:log4net.Core.LevelCollection.ILevelCollectionEnumerator.Current">
- <summary>
- Gets the current element in the collection.
- </summary>
- </member>
- <member name="T:log4net.Core.LevelCollection.Tag">
- <summary>
- Type visible only to our subclasses
- Used to access protected constructor
- </summary>
- </member>
- <member name="F:log4net.Core.LevelCollection.Tag.Default">
- <summary>
- A value
- </summary>
- </member>
- <member name="T:log4net.Core.LevelCollection.Enumerator">
- <summary>
- Supports simple iteration over a <see cref="T:log4net.Core.LevelCollection"/>.
- </summary>
- </member>
- <member name="M:log4net.Core.LevelCollection.Enumerator.#ctor(log4net.Core.LevelCollection)">
- <summary>
- Initializes a new instance of the <c>Enumerator</c> class.
- </summary>
- <param name="tc"></param>
- </member>
- <member name="M:log4net.Core.LevelCollection.Enumerator.MoveNext">
- <summary>
- Advances the enumerator to the next element in the collection.
- </summary>
- <returns>
- <c>true</c> if the enumerator was successfully advanced to the next element;
- <c>false</c> if the enumerator has passed the end of the collection.
- </returns>
- <exception cref="T:System.InvalidOperationException">
- The collection was modified after the enumerator was created.
- </exception>
- </member>
- <member name="M:log4net.Core.LevelCollection.Enumerator.Reset">
- <summary>
- Sets the enumerator to its initial position, before the first element in the collection.
- </summary>
- </member>
- <member name="P:log4net.Core.LevelCollection.Enumerator.Current">
- <summary>
- Gets the current element in the collection.
- </summary>
- </member>
- <member name="T:log4net.Core.LevelEvaluator">
- <summary>
- An evaluator that triggers at a threshold level
- </summary>
- <remarks>
- <para>
- This evaluator will trigger if the level of the event
- passed to <see cref="M:log4net.Core.LevelEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)"/>
- is equal to or greater than the <see cref="P:log4net.Core.LevelEvaluator.Threshold"/>
- level.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Core.LevelEvaluator.m_threshold">
- <summary>
- The threshold for triggering
- </summary>
- </member>
- <member name="M:log4net.Core.LevelEvaluator.#ctor">
- <summary>
- Create a new evaluator using the <see cref="F:log4net.Core.Level.Off"/> threshold.
- </summary>
- <remarks>
- <para>
- Create a new evaluator using the <see cref="F:log4net.Core.Level.Off"/> threshold.
- </para>
- <para>
- This evaluator will trigger if the level of the event
- passed to <see cref="M:log4net.Core.LevelEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)"/>
- is equal to or greater than the <see cref="P:log4net.Core.LevelEvaluator.Threshold"/>
- level.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LevelEvaluator.#ctor(log4net.Core.Level)">
- <summary>
- Create a new evaluator using the specified <see cref="T:log4net.Core.Level"/> threshold.
- </summary>
- <param name="threshold">the threshold to trigger at</param>
- <remarks>
- <para>
- Create a new evaluator using the specified <see cref="T:log4net.Core.Level"/> threshold.
- </para>
- <para>
- This evaluator will trigger if the level of the event
- passed to <see cref="M:log4net.Core.LevelEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)"/>
- is equal to or greater than the <see cref="P:log4net.Core.LevelEvaluator.Threshold"/>
- level.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LevelEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)">
- <summary>
- Is this <paramref name="loggingEvent"/> the triggering event?
- </summary>
- <param name="loggingEvent">The event to check</param>
- <returns>This method returns <c>true</c>, if the event level
- is equal or higher than the <see cref="P:log4net.Core.LevelEvaluator.Threshold"/>.
- Otherwise it returns <c>false</c></returns>
- <remarks>
- <para>
- This evaluator will trigger if the level of the event
- passed to <see cref="M:log4net.Core.LevelEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)"/>
- is equal to or greater than the <see cref="P:log4net.Core.LevelEvaluator.Threshold"/>
- level.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LevelEvaluator.Threshold">
- <summary>
- the threshold to trigger at
- </summary>
- <value>
- The <see cref="T:log4net.Core.Level"/> that will cause this evaluator to trigger
- </value>
- <remarks>
- <para>
- This evaluator will trigger if the level of the event
- passed to <see cref="M:log4net.Core.LevelEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)"/>
- is equal to or greater than the <see cref="P:log4net.Core.LevelEvaluator.Threshold"/>
- level.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LevelMap">
- <summary>
- Mapping between string name and Level object
- </summary>
- <remarks>
- <para>
- Mapping between string name and <see cref="T:log4net.Core.Level"/> object.
- This mapping is held separately for each <see cref="T:log4net.Repository.ILoggerRepository"/>.
- The level name is case insensitive.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Core.LevelMap.m_mapName2Level">
- <summary>
- Mapping from level name to Level object. The
- level name is case insensitive
- </summary>
- </member>
- <member name="M:log4net.Core.LevelMap.#ctor">
- <summary>
- Construct the level map
- </summary>
- <remarks>
- <para>
- Construct the level map.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LevelMap.Clear">
- <summary>
- Clear the internal maps of all levels
- </summary>
- <remarks>
- <para>
- Clear the internal maps of all levels
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LevelMap.Add(System.String,System.Int32)">
- <summary>
- Create a new Level and add it to the map
- </summary>
- <param name="name">the string to display for the Level</param>
- <param name="value">the level value to give to the Level</param>
- <remarks>
- <para>
- Create a new Level and add it to the map
- </para>
- </remarks>
- <seealso cref="M:log4net.Core.LevelMap.Add(System.String,System.Int32,System.String)"/>
- </member>
- <member name="M:log4net.Core.LevelMap.Add(System.String,System.Int32,System.String)">
- <summary>
- Create a new Level and add it to the map
- </summary>
- <param name="name">the string to display for the Level</param>
- <param name="value">the level value to give to the Level</param>
- <param name="displayName">the display name to give to the Level</param>
- <remarks>
- <para>
- Create a new Level and add it to the map
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LevelMap.Add(log4net.Core.Level)">
- <summary>
- Add a Level to the map
- </summary>
- <param name="level">the Level to add</param>
- <remarks>
- <para>
- Add a Level to the map
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LevelMap.LookupWithDefault(log4net.Core.Level)">
- <summary>
- Lookup a named level from the map
- </summary>
- <param name="defaultLevel">the name of the level to lookup is taken from this level.
- If the level is not set on the map then this level is added</param>
- <returns>the level in the map with the name specified</returns>
- <remarks>
- <para>
- Lookup a named level from the map. The name of the level to lookup is taken
- from the <see cref="P:log4net.Core.Level.Name"/> property of the <paramref name="defaultLevel"/>
- argument.
- </para>
- <para>
- If no level with the specified name is found then the
- <paramref name="defaultLevel"/> argument is added to the level map
- and returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LevelMap.Item(System.String)">
- <summary>
- Lookup a <see cref="T:log4net.Core.Level"/> by name
- </summary>
- <param name="name">The name of the Level to lookup</param>
- <returns>a Level from the map with the name specified</returns>
- <remarks>
- <para>
- Returns the <see cref="T:log4net.Core.Level"/> from the
- map with the name specified. If the no level is
- found then <c>null</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LevelMap.AllLevels">
- <summary>
- Return all possible levels as a list of Level objects.
- </summary>
- <returns>all possible levels as a list of Level objects</returns>
- <remarks>
- <para>
- Return all possible levels as a list of Level objects.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LocationInfo">
- <summary>
- The internal representation of caller location information.
- </summary>
- <remarks>
- <para>
- This class uses the <c>System.Diagnostics.StackTrace</c> class to generate
- a call stack. The caller's information is then extracted from this stack.
- </para>
- <para>
- The <c>System.Diagnostics.StackTrace</c> class is not supported on the
- .NET Compact Framework 1.0 therefore caller location information is not
- available on that framework.
- </para>
- <para>
- The <c>System.Diagnostics.StackTrace</c> class has this to say about Release builds:
- </para>
- <para>
- "StackTrace information will be most informative with Debug build configurations.
- By default, Debug builds include debug symbols, while Release builds do not. The
- debug symbols contain most of the file, method name, line number, and column
- information used in constructing StackFrame and StackTrace objects. StackTrace
- might not report as many method calls as expected, due to code transformations
- that occur during optimization."
- </para>
- <para>
- This means that in a Release build the caller information may be incomplete or may
- not exist at all! Therefore caller location information cannot be relied upon in a Release build.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Core.LocationInfo.NA">
- <summary>
- When location information is not available the constant
- <c>NA</c> is returned. Current value of this string
- constant is <b>?</b>.
- </summary>
- </member>
- <member name="M:log4net.Core.LocationInfo.#ctor(System.Type)">
- <summary>
- Constructor
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LocationInfo"/>
- class based on the current thread.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LocationInfo.#ctor(System.String,System.String,System.String,System.String)">
- <summary>
- Constructor
- </summary>
- <param name="className">The fully qualified class name.</param>
- <param name="methodName">The method name.</param>
- <param name="fileName">The file name.</param>
- <param name="lineNumber">The line number of the method within the file.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LocationInfo"/>
- class with the specified data.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LocationInfo.ClassName">
- <summary>
- Gets the fully qualified class name of the caller making the logging
- request.
- </summary>
- <value>
- The fully qualified class name of the caller making the logging
- request.
- </value>
- <remarks>
- <para>
- Gets the fully qualified class name of the caller making the logging
- request.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LocationInfo.FileName">
- <summary>
- Gets the file name of the caller.
- </summary>
- <value>
- The file name of the caller.
- </value>
- <remarks>
- <para>
- Gets the file name of the caller.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LocationInfo.LineNumber">
- <summary>
- Gets the line number of the caller.
- </summary>
- <value>
- The line number of the caller.
- </value>
- <remarks>
- <para>
- Gets the line number of the caller.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LocationInfo.MethodName">
- <summary>
- Gets the method name of the caller.
- </summary>
- <value>
- The method name of the caller.
- </value>
- <remarks>
- <para>
- Gets the method name of the caller.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LocationInfo.FullInfo">
- <summary>
- Gets all available caller information
- </summary>
- <value>
- All available caller information, in the format
- <c>fully.qualified.classname.of.caller.methodName(Filename:line)</c>
- </value>
- <remarks>
- <para>
- Gets all available caller information, in the format
- <c>fully.qualified.classname.of.caller.methodName(Filename:line)</c>
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LoggerManager">
- <summary>
- Static manager that controls the creation of repositories
- </summary>
- <remarks>
- <para>
- Static manager that controls the creation of repositories
- </para>
- <para>
- This class is used by the wrapper managers (e.g. <see cref="T:log4net.LogManager"/>)
- to provide access to the <see cref="T:log4net.Core.ILogger"/> objects.
- </para>
- <para>
- This manager also holds the <see cref="T:log4net.Core.IRepositorySelector"/> that is used to
- lookup and create repositories. The selector can be set either programmatically using
- the <see cref="P:log4net.Core.LoggerManager.RepositorySelector"/> property, or by setting the <c>log4net.RepositorySelector</c>
- AppSetting in the applications config file to the fully qualified type name of the
- selector to use.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.LoggerManager.#ctor">
- <summary>
- Private constructor to prevent instances. Only static methods should be used.
- </summary>
- <remarks>
- <para>
- Private constructor to prevent instances. Only static methods should be used.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.#cctor">
- <summary>
- Hook the shutdown event
- </summary>
- <remarks>
- <para>
- On the full .NET runtime, the static constructor hooks up the
- <c>AppDomain.ProcessExit</c> and <c>AppDomain.DomainUnload</c>> events.
- These are used to shutdown the log4net system as the application exits.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.RegisterAppDomainEvents">
- <summary>
- Register for ProcessExit and DomainUnload events on the AppDomain
- </summary>
- <remarks>
- <para>
- This needs to be in a separate method because the events make
- a LinkDemand for the ControlAppDomain SecurityPermission. Because
- this is a LinkDemand it is demanded at JIT time. Therefore we cannot
- catch the exception in the method itself, we have to catch it in the
- caller.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetLoggerRepository(System.String)">
- <summary>
- Return the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <param name="repository">the repository to lookup in</param>
- <returns>Return the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the <paramref name="repository"/> argument.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetLoggerRepository(System.Reflection.Assembly)">
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.</returns>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetRepository(System.String)">
- <summary>
- Return the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <param name="repository">the repository to lookup in</param>
- <returns>Return the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the <paramref name="repository"/> argument.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetRepository(System.Reflection.Assembly)">
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.</returns>
- <remarks>
- <para>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.Exists(System.String,System.String)">
- <summary>
- Returns the named logger if it exists.
- </summary>
- <param name="repository">The repository to lookup in.</param>
- <param name="name">The fully qualified logger name to look for.</param>
- <returns>
- The logger found, or <c>null</c> if the named logger does not exist in the
- specified repository.
- </returns>
- <remarks>
- <para>
- If the named logger exists (in the specified repository) then it
- returns a reference to the logger, otherwise it returns
- <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.Exists(System.Reflection.Assembly,System.String)">
- <summary>
- Returns the named logger if it exists.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <param name="name">The fully qualified logger name to look for.</param>
- <returns>
- The logger found, or <c>null</c> if the named logger does not exist in the
- specified assembly's repository.
- </returns>
- <remarks>
- <para>
- If the named logger exists (in the specified assembly's repository) then it
- returns a reference to the logger, otherwise it returns
- <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetCurrentLoggers(System.String)">
- <summary>
- Returns all the currently defined loggers in the specified repository.
- </summary>
- <param name="repository">The repository to lookup in.</param>
- <returns>All the defined loggers.</returns>
- <remarks>
- <para>
- The root logger is <b>not</b> included in the returned array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetCurrentLoggers(System.Reflection.Assembly)">
- <summary>
- Returns all the currently defined loggers in the specified assembly's repository.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <returns>All the defined loggers.</returns>
- <remarks>
- <para>
- The root logger is <b>not</b> included in the returned array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetLogger(System.String,System.String)">
- <summary>
- Retrieves or creates a named logger.
- </summary>
- <param name="repository">The repository to lookup in.</param>
- <param name="name">The name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- <remarks>
- <para>
- Retrieves a logger named as the <paramref name="name"/>
- parameter. If the named logger already exists, then the
- existing instance will be returned. Otherwise, a new instance is
- created.
- </para>
- <para>
- By default, loggers do not have a set level but inherit
- it from the hierarchy. This is one of the central features of
- log4net.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetLogger(System.Reflection.Assembly,System.String)">
- <summary>
- Retrieves or creates a named logger.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <param name="name">The name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- <remarks>
- <para>
- Retrieves a logger named as the <paramref name="name"/>
- parameter. If the named logger already exists, then the
- existing instance will be returned. Otherwise, a new instance is
- created.
- </para>
- <para>
- By default, loggers do not have a set level but inherit
- it from the hierarchy. This is one of the central features of
- log4net.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetLogger(System.String,System.Type)">
- <summary>
- Shorthand for <see cref="M:log4net.LogManager.GetLogger(System.String)"/>.
- </summary>
- <param name="repository">The repository to lookup in.</param>
- <param name="type">The <paramref name="type"/> of which the fullname will be used as the name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- <remarks>
- <para>
- Gets the logger for the fully qualified name of the type specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetLogger(System.Reflection.Assembly,System.Type)">
- <summary>
- Shorthand for <see cref="M:log4net.LogManager.GetLogger(System.String)"/>.
- </summary>
- <param name="repositoryAssembly">the assembly to use to lookup the repository</param>
- <param name="type">The <paramref name="type"/> of which the fullname will be used as the name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- <remarks>
- <para>
- Gets the logger for the fully qualified name of the type specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.Shutdown">
- <summary>
- Shuts down the log4net system.
- </summary>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in all the
- default repositories.
- </para>
- <para>
- Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>
- The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.ShutdownRepository(System.String)">
- <summary>
- Shuts down the repository for the repository specified.
- </summary>
- <param name="repository">The repository to shutdown.</param>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in the
- repository for the <paramref name="repository"/> specified.
- </para>
- <para>
- Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>
- The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.ShutdownRepository(System.Reflection.Assembly)">
- <summary>
- Shuts down the repository for the repository specified.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in the
- repository for the repository. The repository is looked up using
- the <paramref name="repositoryAssembly"/> specified.
- </para>
- <para>
- Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>
- The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.ResetConfiguration(System.String)">
- <summary>
- Resets all values contained in this repository instance to their defaults.
- </summary>
- <param name="repository">The repository to reset.</param>
- <remarks>
- <para>
- Resets all values contained in the repository instance to their
- defaults. This removes all appenders from all loggers, sets
- the level of all non-root loggers to <c>null</c>,
- sets their additivity flag to <c>true</c> and sets the level
- of the root logger to <see cref="F:log4net.Core.Level.Debug"/>. Moreover,
- message disabling is set its default "off" value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.ResetConfiguration(System.Reflection.Assembly)">
- <summary>
- Resets all values contained in this repository instance to their defaults.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository to reset.</param>
- <remarks>
- <para>
- Resets all values contained in the repository instance to their
- defaults. This removes all appenders from all loggers, sets
- the level of all non-root loggers to <c>null</c>,
- sets their additivity flag to <c>true</c> and sets the level
- of the root logger to <see cref="F:log4net.Core.Level.Debug"/>. Moreover,
- message disabling is set its default "off" value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.CreateDomain(System.String)">
- <summary>
- Creates a repository with the specified name.
- </summary>
- <param name="repository">The name of the repository, this must be unique amongst repositories.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- Creates the default type of <see cref="T:log4net.Repository.ILoggerRepository"/> which is a
- <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> object.
- </para>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An <see cref="T:System.Exception"/> will be thrown if the repository already exists.
- </para>
- </remarks>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.Core.LoggerManager.CreateRepository(System.String)">
- <summary>
- Creates a repository with the specified name.
- </summary>
- <param name="repository">The name of the repository, this must be unique amongst repositories.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- Creates the default type of <see cref="T:log4net.Repository.ILoggerRepository"/> which is a
- <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> object.
- </para>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An <see cref="T:System.Exception"/> will be thrown if the repository already exists.
- </para>
- </remarks>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.Core.LoggerManager.CreateDomain(System.String,System.Type)">
- <summary>
- Creates a repository with the specified name and repository type.
- </summary>
- <param name="repository">The name of the repository, this must be unique to the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An Exception will be thrown if the repository already exists.
- </para>
- </remarks>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.Core.LoggerManager.CreateRepository(System.String,System.Type)">
- <summary>
- Creates a repository with the specified name and repository type.
- </summary>
- <param name="repository">The name of the repository, this must be unique to the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An Exception will be thrown if the repository already exists.
- </para>
- </remarks>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.Core.LoggerManager.CreateDomain(System.Reflection.Assembly,System.Type)">
- <summary>
- Creates a repository for the specified assembly and repository type.
- </summary>
- <param name="repositoryAssembly">The assembly to use to get the name of the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.Core.LoggerManager.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.CreateRepository(System.Reflection.Assembly,System.Type)">
- <summary>
- Creates a repository for the specified assembly and repository type.
- </summary>
- <param name="repositoryAssembly">The assembly to use to get the name of the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.Core.LoggerManager.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetAllRepositories">
- <summary>
- Gets an array of all currently defined repositories.
- </summary>
- <returns>An array of all the known <see cref="T:log4net.Repository.ILoggerRepository"/> objects.</returns>
- <remarks>
- <para>
- Gets an array of all currently defined repositories.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetVersionInfo">
- <summary>
- Internal method to get pertinent version info.
- </summary>
- <returns>A string of version info.</returns>
- </member>
- <member name="M:log4net.Core.LoggerManager.OnDomainUnload(System.Object,System.EventArgs)">
- <summary>
- Called when the <see cref="E:System.AppDomain.DomainUnload"/> event fires
- </summary>
- <param name="sender">the <see cref="T:System.AppDomain"/> that is exiting</param>
- <param name="e">null</param>
- <remarks>
- <para>
- Called when the <see cref="E:System.AppDomain.DomainUnload"/> event fires.
- </para>
- <para>
- When the event is triggered the log4net system is <see cref="M:log4net.Core.LoggerManager.Shutdown"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.OnProcessExit(System.Object,System.EventArgs)">
- <summary>
- Called when the <see cref="E:System.AppDomain.ProcessExit"/> event fires
- </summary>
- <param name="sender">the <see cref="T:System.AppDomain"/> that is exiting</param>
- <param name="e">null</param>
- <remarks>
- <para>
- Called when the <see cref="E:System.AppDomain.ProcessExit"/> event fires.
- </para>
- <para>
- When the event is triggered the log4net system is <see cref="M:log4net.Core.LoggerManager.Shutdown"/>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggerManager.s_repositorySelector">
- <summary>
- Initialize the default repository selector
- </summary>
- </member>
- <member name="P:log4net.Core.LoggerManager.RepositorySelector">
- <summary>
- Gets or sets the repository selector used by the <see cref="T:log4net.LogManager"/>.
- </summary>
- <value>
- The repository selector used by the <see cref="T:log4net.LogManager"/>.
- </value>
- <remarks>
- <para>
- The repository selector (<see cref="T:log4net.Core.IRepositorySelector"/>) is used by
- the <see cref="T:log4net.LogManager"/> to create and select repositories
- (<see cref="T:log4net.Repository.ILoggerRepository"/>).
- </para>
- <para>
- The caller to <see cref="T:log4net.LogManager"/> supplies either a string name
- or an assembly (if not supplied the assembly is inferred using
- <see cref="M:System.Reflection.Assembly.GetCallingAssembly"/>).
- </para>
- <para>
- This context is used by the selector to lookup a specific repository.
- </para>
- <para>
- For the full .NET Framework, the default repository is <c>DefaultRepositorySelector</c>;
- for the .NET Compact Framework <c>CompactRepositorySelector</c> is the default
- repository.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LoggerWrapperImpl">
- <summary>
- Implementation of the <see cref="T:log4net.Core.ILoggerWrapper"/> interface.
- </summary>
- <remarks>
- <para>
- This class should be used as the base for all wrapper implementations.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.LoggerWrapperImpl.#ctor(log4net.Core.ILogger)">
- <summary>
- Constructs a new wrapper for the specified logger.
- </summary>
- <param name="logger">The logger to wrap.</param>
- <remarks>
- <para>
- Constructs a new wrapper for the specified logger.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggerWrapperImpl.m_logger">
- <summary>
- The logger that this object is wrapping
- </summary>
- </member>
- <member name="P:log4net.Core.LoggerWrapperImpl.Logger">
- <summary>
- Gets the implementation behind this wrapper object.
- </summary>
- <value>
- The <see cref="T:log4net.Core.ILogger"/> object that this object is implementing.
- </value>
- <remarks>
- <para>
- The <c>Logger</c> object may not be the same object as this object
- because of logger decorators.
- </para>
- <para>
- This gets the actual underlying objects that is used to process
- the log events.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LoggingEventData">
- <summary>
- Portable data structure used by <see cref="T:log4net.Core.LoggingEvent"/>
- </summary>
- <remarks>
- <para>
- Portable data structure used by <see cref="T:log4net.Core.LoggingEvent"/>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Core.LoggingEventData.LoggerName">
- <summary>
- The logger name.
- </summary>
- <remarks>
- <para>
- The logger name.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.Level">
- <summary>
- Level of logging event.
- </summary>
- <remarks>
- <para>
- Level of logging event. Level cannot be Serializable
- because it is a flyweight. Due to its special serialization it
- cannot be declared final either.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.Message">
- <summary>
- The application supplied message.
- </summary>
- <remarks>
- <para>
- The application supplied message of logging event.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.ThreadName">
- <summary>
- The name of thread
- </summary>
- <remarks>
- <para>
- The name of thread in which this logging event was generated
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.TimeStamp">
- <summary>
- The time the event was logged
- </summary>
- <remarks>
- <para>
- The TimeStamp is stored in the local time zone for this computer.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.LocationInfo">
- <summary>
- Location information for the caller.
- </summary>
- <remarks>
- <para>
- Location information for the caller.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.UserName">
- <summary>
- String representation of the user
- </summary>
- <remarks>
- <para>
- String representation of the user's windows name,
- like DOMAIN\username
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.Identity">
- <summary>
- String representation of the identity.
- </summary>
- <remarks>
- <para>
- String representation of the current thread's principal identity.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.ExceptionString">
- <summary>
- The string representation of the exception
- </summary>
- <remarks>
- <para>
- The string representation of the exception
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.Domain">
- <summary>
- String representation of the AppDomain.
- </summary>
- <remarks>
- <para>
- String representation of the AppDomain.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.Properties">
- <summary>
- Additional event specific properties
- </summary>
- <remarks>
- <para>
- A logger or an appender may attach additional
- properties to specific events. These properties
- have a string key and an object value.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.FixFlags">
- <summary>
- Flags passed to the <see cref="P:log4net.Core.LoggingEvent.Fix"/> property
- </summary>
- <remarks>
- <para>
- Flags passed to the <see cref="P:log4net.Core.LoggingEvent.Fix"/> property
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Core.FixFlags.Mdc">
- <summary>
- Fix the MDC
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.Ndc">
- <summary>
- Fix the NDC
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.Message">
- <summary>
- Fix the rendered message
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.ThreadName">
- <summary>
- Fix the thread name
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.LocationInfo">
- <summary>
- Fix the callers location information
- </summary>
- <remarks>
- CAUTION: Very slow to generate
- </remarks>
- </member>
- <member name="F:log4net.Core.FixFlags.UserName">
- <summary>
- Fix the callers windows user name
- </summary>
- <remarks>
- CAUTION: Slow to generate
- </remarks>
- </member>
- <member name="F:log4net.Core.FixFlags.Domain">
- <summary>
- Fix the domain friendly name
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.Identity">
- <summary>
- Fix the callers principal name
- </summary>
- <remarks>
- CAUTION: May be slow to generate
- </remarks>
- </member>
- <member name="F:log4net.Core.FixFlags.Exception">
- <summary>
- Fix the exception text
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.Properties">
- <summary>
- Fix the event properties
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.None">
- <summary>
- No fields fixed
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.All">
- <summary>
- All fields fixed
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.Partial">
- <summary>
- Partial fields fixed
- </summary>
- <remarks>
- <para>
- This set of partial fields gives good performance. The following fields are fixed:
- </para>
- <list type="bullet">
- <item><description><see cref="F:log4net.Core.FixFlags.Message"/></description></item>
- <item><description><see cref="F:log4net.Core.FixFlags.ThreadName"/></description></item>
- <item><description><see cref="F:log4net.Core.FixFlags.Exception"/></description></item>
- <item><description><see cref="F:log4net.Core.FixFlags.Domain"/></description></item>
- <item><description><see cref="F:log4net.Core.FixFlags.Properties"/></description></item>
- </list>
- </remarks>
- </member>
- <member name="T:log4net.Core.LoggingEvent">
- <summary>
- The internal representation of logging events.
- </summary>
- <remarks>
- <para>
- When an affirmative decision is made to log then a
- <see cref="T:log4net.Core.LoggingEvent"/> instance is created. This instance
- is passed around to the different log4net components.
- </para>
- <para>
- This class is of concern to those wishing to extend log4net.
- </para>
- <para>
- Some of the values in instances of <see cref="T:log4net.Core.LoggingEvent"/>
- are considered volatile, that is the values are correct at the
- time the event is delivered to appenders, but will not be consistent
- at any time afterwards. If an event is to be stored and then processed
- at a later time these volatile values must be fixed by calling
- <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/>. There is a performance penalty
- for incurred by calling <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/> but it
- is essential to maintaining data consistency.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Douglas de la Torre</author>
- <author>Daniel Cazzulino</author>
- </member>
- <member name="F:log4net.Core.LoggingEvent.HostNameProperty">
- <summary>
- The key into the Properties map for the host name value.
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.IdentityProperty">
- <summary>
- The key into the Properties map for the thread identity value.
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.UserNameProperty">
- <summary>
- The key into the Properties map for the user name value.
- </summary>
- </member>
- <member name="M:log4net.Core.LoggingEvent.#ctor(System.Type,log4net.Repository.ILoggerRepository,System.String,log4net.Core.Level,System.Object,System.Exception)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Core.LoggingEvent"/> class
- from the supplied parameters.
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <param name="repository">The repository this event is logged in.</param>
- <param name="loggerName">The name of the logger of this event.</param>
- <param name="level">The level of this event.</param>
- <param name="message">The message of this event.</param>
- <param name="exception">The exception for this event.</param>
- <remarks>
- <para>
- Except <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/>, <see cref="P:log4net.Core.LoggingEvent.Level"/> and <see cref="P:log4net.Core.LoggingEvent.LoggerName"/>,
- all fields of <c>LoggingEvent</c> are filled when actually needed. Call
- <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/> to cache all data locally
- to prevent inconsistencies.
- </para>
- <para>This method is called by the log4net framework
- to create a logging event.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.#ctor(System.Type,log4net.Repository.ILoggerRepository,log4net.Core.LoggingEventData,log4net.Core.FixFlags)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Core.LoggingEvent"/> class
- using specific data.
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <param name="repository">The repository this event is logged in.</param>
- <param name="data">Data used to initialize the logging event.</param>
- <param name="fixedData">The fields in the <paranref name="data"/> struct that have already been fixed.</param>
- <remarks>
- <para>
- This constructor is provided to allow a <see cref="T:log4net.Core.LoggingEvent"/>
- to be created independently of the log4net framework. This can
- be useful if you require a custom serialization scheme.
- </para>
- <para>
- Use the <see cref="M:log4net.Core.LoggingEvent.GetLoggingEventData(log4net.Core.FixFlags)"/> method to obtain an
- instance of the <see cref="T:log4net.Core.LoggingEventData"/> class.
- </para>
- <para>
- The <paramref name="fixedData"/> parameter should be used to specify which fields in the
- <paramref name="data"/> struct have been preset. Fields not specified in the <paramref name="fixedData"/>
- will be captured from the environment if requested or fixed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.#ctor(System.Type,log4net.Repository.ILoggerRepository,log4net.Core.LoggingEventData)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Core.LoggingEvent"/> class
- using specific data.
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <param name="repository">The repository this event is logged in.</param>
- <param name="data">Data used to initialize the logging event.</param>
- <remarks>
- <para>
- This constructor is provided to allow a <see cref="T:log4net.Core.LoggingEvent"/>
- to be created independently of the log4net framework. This can
- be useful if you require a custom serialization scheme.
- </para>
- <para>
- Use the <see cref="M:log4net.Core.LoggingEvent.GetLoggingEventData(log4net.Core.FixFlags)"/> method to obtain an
- instance of the <see cref="T:log4net.Core.LoggingEventData"/> class.
- </para>
- <para>
- This constructor sets this objects <see cref="P:log4net.Core.LoggingEvent.Fix"/> flags to <see cref="F:log4net.Core.FixFlags.All"/>,
- this assumes that all the data relating to this event is passed in via the <paramref name="data"/>
- parameter and no other data should be captured from the environment.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.#ctor(log4net.Core.LoggingEventData)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Core.LoggingEvent"/> class
- using specific data.
- </summary>
- <param name="data">Data used to initialize the logging event.</param>
- <remarks>
- <para>
- This constructor is provided to allow a <see cref="T:log4net.Core.LoggingEvent"/>
- to be created independently of the log4net framework. This can
- be useful if you require a custom serialization scheme.
- </para>
- <para>
- Use the <see cref="M:log4net.Core.LoggingEvent.GetLoggingEventData(log4net.Core.FixFlags)"/> method to obtain an
- instance of the <see cref="T:log4net.Core.LoggingEventData"/> class.
- </para>
- <para>
- This constructor sets this objects <see cref="P:log4net.Core.LoggingEvent.Fix"/> flags to <see cref="F:log4net.Core.FixFlags.All"/>,
- this assumes that all the data relating to this event is passed in via the <paramref name="data"/>
- parameter and no other data should be captured from the environment.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Serialization constructor
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data.</param>
- <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LoggingEvent"/> class
- with serialized data.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.EnsureRepository(log4net.Repository.ILoggerRepository)">
- <summary>
- Ensure that the repository is set.
- </summary>
- <param name="repository">the value for the repository</param>
- </member>
- <member name="M:log4net.Core.LoggingEvent.WriteRenderedMessage(System.IO.TextWriter)">
- <summary>
- Write the rendered message to a TextWriter
- </summary>
- <param name="writer">the writer to write the message to</param>
- <remarks>
- <para>
- Unlike the <see cref="P:log4net.Core.LoggingEvent.RenderedMessage"/> property this method
- does store the message data in the internal cache. Therefore
- if called only once this method should be faster than the
- <see cref="P:log4net.Core.LoggingEvent.RenderedMessage"/> property, however if the message is
- to be accessed multiple times then the property will be more efficient.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Serializes this object into the <see cref="T:System.Runtime.Serialization.SerializationInfo"/> provided.
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
- <param name="context">The destination for this serialization.</param>
- <remarks>
- <para>
- The data in this event must be fixed before it can be serialized.
- </para>
- <para>
- The <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/> method must be called during the
- <see cref="M:log4net.Appender.IAppender.DoAppend(log4net.Core.LoggingEvent)"/> method call if this event
- is to be used outside that method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.GetLoggingEventData">
- <summary>
- Gets the portable data for this <see cref="T:log4net.Core.LoggingEvent"/>.
- </summary>
- <returns>The <see cref="T:log4net.Core.LoggingEventData"/> for this event.</returns>
- <remarks>
- <para>
- A new <see cref="T:log4net.Core.LoggingEvent"/> can be constructed using a
- <see cref="T:log4net.Core.LoggingEventData"/> instance.
- </para>
- <para>
- Does a <see cref="F:log4net.Core.FixFlags.Partial"/> fix of the data
- in the logging event before returning the event data.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.GetLoggingEventData(log4net.Core.FixFlags)">
- <summary>
- Gets the portable data for this <see cref="T:log4net.Core.LoggingEvent"/>.
- </summary>
- <param name="fixFlags">The set of data to ensure is fixed in the LoggingEventData</param>
- <returns>The <see cref="T:log4net.Core.LoggingEventData"/> for this event.</returns>
- <remarks>
- <para>
- A new <see cref="T:log4net.Core.LoggingEvent"/> can be constructed using a
- <see cref="T:log4net.Core.LoggingEventData"/> instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.GetExceptionStrRep">
- <summary>
- Returns this event's exception's rendered using the
- <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </summary>
- <returns>
- This event's exception's rendered using the <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </returns>
- <remarks>
- <para>
- <b>Obsolete. Use <see cref="M:log4net.Core.LoggingEvent.GetExceptionString"/> instead.</b>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.GetExceptionString">
- <summary>
- Returns this event's exception's rendered using the
- <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </summary>
- <returns>
- This event's exception's rendered using the <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </returns>
- <remarks>
- <para>
- Returns this event's exception's rendered using the
- <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.FixVolatileData">
- <summary>
- Fix instance fields that hold volatile data.
- </summary>
- <remarks>
- <para>
- Some of the values in instances of <see cref="T:log4net.Core.LoggingEvent"/>
- are considered volatile, that is the values are correct at the
- time the event is delivered to appenders, but will not be consistent
- at any time afterwards. If an event is to be stored and then processed
- at a later time these volatile values must be fixed by calling
- <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/>. There is a performance penalty
- incurred by calling <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/> but it
- is essential to maintaining data consistency.
- </para>
- <para>
- Calling <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/> is equivalent to
- calling <see cref="M:log4net.Core.LoggingEvent.FixVolatileData(System.Boolean)"/> passing the parameter
- <c>false</c>.
- </para>
- <para>
- See <see cref="M:log4net.Core.LoggingEvent.FixVolatileData(System.Boolean)"/> for more
- information.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.FixVolatileData(System.Boolean)">
- <summary>
- Fixes instance fields that hold volatile data.
- </summary>
- <param name="fastButLoose">Set to <c>true</c> to not fix data that takes a long time to fix.</param>
- <remarks>
- <para>
- Some of the values in instances of <see cref="T:log4net.Core.LoggingEvent"/>
- are considered volatile, that is the values are correct at the
- time the event is delivered to appenders, but will not be consistent
- at any time afterwards. If an event is to be stored and then processed
- at a later time these volatile values must be fixed by calling
- <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/>. There is a performance penalty
- for incurred by calling <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/> but it
- is essential to maintaining data consistency.
- </para>
- <para>
- The <paramref name="fastButLoose"/> param controls the data that
- is fixed. Some of the data that can be fixed takes a long time to
- generate, therefore if you do not require those settings to be fixed
- they can be ignored by setting the <paramref name="fastButLoose"/> param
- to <c>true</c>. This setting will ignore the <see cref="P:log4net.Core.LoggingEvent.LocationInformation"/>
- and <see cref="P:log4net.Core.LoggingEvent.UserName"/> settings.
- </para>
- <para>
- Set <paramref name="fastButLoose"/> to <c>false</c> to ensure that all
- settings are fixed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.FixVolatileData(log4net.Core.FixFlags)">
- <summary>
- Fix the fields specified by the <see cref="T:log4net.Core.FixFlags"/> parameter
- </summary>
- <param name="flags">the fields to fix</param>
- <remarks>
- <para>
- Only fields specified in the <paramref name="flags"/> will be fixed.
- Fields will not be fixed if they have previously been fixed.
- It is not possible to 'unfix' a field.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.LookupProperty(System.String)">
- <summary>
- Lookup a composite property in this event
- </summary>
- <param name="key">the key for the property to lookup</param>
- <returns>the value for the property</returns>
- <remarks>
- <para>
- This event has composite properties that combine together properties from
- several different contexts in the following order:
- <list type="definition">
- <item>
- <term>this events properties</term>
- <description>
- This event has <see cref="P:log4net.Core.LoggingEvent.Properties"/> that can be set. These
- properties are specific to this event only.
- </description>
- </item>
- <item>
- <term>the thread properties</term>
- <description>
- The <see cref="P:log4net.ThreadContext.Properties"/> that are set on the current
- thread. These properties are shared by all events logged on this thread.
- </description>
- </item>
- <item>
- <term>the global properties</term>
- <description>
- The <see cref="P:log4net.GlobalContext.Properties"/> that are set globally. These
- properties are shared by all the threads in the AppDomain.
- </description>
- </item>
- </list>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.GetProperties">
- <summary>
- Get all the composite properties in this event
- </summary>
- <returns>the <see cref="T:log4net.Util.PropertiesDictionary"/> containing all the properties</returns>
- <remarks>
- <para>
- See <see cref="M:log4net.Core.LoggingEvent.LookupProperty(System.String)"/> for details of the composite properties
- stored by the event.
- </para>
- <para>
- This method returns a single <see cref="T:log4net.Util.PropertiesDictionary"/> containing all the
- properties defined for this event.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_data">
- <summary>
- The internal logging event data.
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_compositeProperties">
- <summary>
- The internal logging event data.
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_eventProperties">
- <summary>
- The internal logging event data.
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_callerStackBoundaryDeclaringType">
- <summary>
- The fully qualified Type of the calling
- logger class in the stack frame (i.e. the declaring type of the method).
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_message">
- <summary>
- The application supplied message of logging event.
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_thrownException">
- <summary>
- The exception that was thrown.
- </summary>
- <remarks>
- This is not serialized. The string representation
- is serialized instead.
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_repository">
- <summary>
- The repository that generated the logging event
- </summary>
- <remarks>
- This is not serialized.
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_fixFlags">
- <summary>
- The fix state for this event
- </summary>
- <remarks>
- These flags indicate which fields have been fixed.
- Not serialized.
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_cacheUpdatable">
- <summary>
- Indicated that the internal cache is updateable (ie not fixed)
- </summary>
- <remarks>
- This is a seperate flag to m_fixFlags as it allows incrementel fixing and simpler
- changes in the caching strategy.
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.StartTime">
- <summary>
- Gets the time when the current process started.
- </summary>
- <value>
- This is the time when this process started.
- </value>
- <remarks>
- <para>
- The TimeStamp is stored in the local time zone for this computer.
- </para>
- <para>
- Tries to get the start time for the current process.
- Failing that it returns the time of the first call to
- this property.
- </para>
- <para>
- Note that AppDomains may be loaded and unloaded within the
- same process without the process terminating and therefore
- without the process start time being reset.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.Level">
- <summary>
- Gets the <see cref="P:log4net.Core.LoggingEvent.Level"/> of the logging event.
- </summary>
- <value>
- The <see cref="P:log4net.Core.LoggingEvent.Level"/> of the logging event.
- </value>
- <remarks>
- <para>
- Gets the <see cref="P:log4net.Core.LoggingEvent.Level"/> of the logging event.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.TimeStamp">
- <summary>
- Gets the time of the logging event.
- </summary>
- <value>
- The time of the logging event.
- </value>
- <remarks>
- <para>
- The TimeStamp is stored in the local time zone for this computer.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.LoggerName">
- <summary>
- Gets the name of the logger that logged the event.
- </summary>
- <value>
- The name of the logger that logged the event.
- </value>
- <remarks>
- <para>
- Gets the name of the logger that logged the event.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.LocationInformation">
- <summary>
- Gets the location information for this logging event.
- </summary>
- <value>
- The location information for this logging event.
- </value>
- <remarks>
- <para>
- The collected information is cached for future use.
- </para>
- <para>
- See the <see cref="T:log4net.Core.LocationInfo"/> class for more information on
- supported frameworks and the different behavior in Debug and
- Release builds.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.MessageObject">
- <summary>
- Gets the message object used to initialize this event.
- </summary>
- <value>
- The message object used to initialize this event.
- </value>
- <remarks>
- <para>
- Gets the message object used to initialize this event.
- Note that this event may not have a valid message object.
- If the event is serialized the message object will not
- be transferred. To get the text of the message the
- <see cref="P:log4net.Core.LoggingEvent.RenderedMessage"/> property must be used
- not this property.
- </para>
- <para>
- If there is no defined message object for this event then
- null will be returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.ExceptionObject">
- <summary>
- Gets the exception object used to initialize this event.
- </summary>
- <value>
- The exception object used to initialize this event.
- </value>
- <remarks>
- <para>
- Gets the exception object used to initialize this event.
- Note that this event may not have a valid exception object.
- If the event is serialized the exception object will not
- be transferred. To get the text of the exception the
- <see cref="M:log4net.Core.LoggingEvent.GetExceptionString"/> method must be used
- not this property.
- </para>
- <para>
- If there is no defined exception object for this event then
- null will be returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.Repository">
- <summary>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that this event was created in.
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that this event was created in.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.RenderedMessage">
- <summary>
- Gets the message, rendered through the <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </summary>
- <value>
- The message rendered through the <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </value>
- <remarks>
- <para>
- The collected information is cached for future use.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.ThreadName">
- <summary>
- Gets the name of the current thread.
- </summary>
- <value>
- The name of the current thread, or the thread ID when
- the name is not available.
- </value>
- <remarks>
- <para>
- The collected information is cached for future use.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.UserName">
- <summary>
- Gets the name of the current user.
- </summary>
- <value>
- The name of the current user, or <c>NOT AVAILABLE</c> when the
- underlying runtime has no support for retrieving the name of the
- current user.
- </value>
- <remarks>
- <para>
- Calls <c>WindowsIdentity.GetCurrent().Name</c> to get the name of
- the current windows user.
- </para>
- <para>
- To improve performance, we could cache the string representation of
- the name, and reuse that as long as the identity stayed constant.
- Once the identity changed, we would need to re-assign and re-render
- the string.
- </para>
- <para>
- However, the <c>WindowsIdentity.GetCurrent()</c> call seems to
- return different objects every time, so the current implementation
- doesn't do this type of caching.
- </para>
- <para>
- Timing for these operations:
- </para>
- <list type="table">
- <listheader>
- <term>Method</term>
- <description>Results</description>
- </listheader>
- <item>
- <term><c>WindowsIdentity.GetCurrent()</c></term>
- <description>10000 loops, 00:00:00.2031250 seconds</description>
- </item>
- <item>
- <term><c>WindowsIdentity.GetCurrent().Name</c></term>
- <description>10000 loops, 00:00:08.0468750 seconds</description>
- </item>
- </list>
- <para>
- This means we could speed things up almost 40 times by caching the
- value of the <c>WindowsIdentity.GetCurrent().Name</c> property, since
- this takes (8.04-0.20) = 7.84375 seconds.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.Identity">
- <summary>
- Gets the identity of the current thread principal.
- </summary>
- <value>
- The string name of the identity of the current thread principal.
- </value>
- <remarks>
- <para>
- Calls <c>System.Threading.Thread.CurrentPrincipal.Identity.Name</c> to get
- the name of the current thread principal.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.Domain">
- <summary>
- Gets the AppDomain friendly name.
- </summary>
- <value>
- The AppDomain friendly name.
- </value>
- <remarks>
- <para>
- Gets the AppDomain friendly name.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.Properties">
- <summary>
- Additional event specific properties.
- </summary>
- <value>
- Additional event specific properties.
- </value>
- <remarks>
- <para>
- A logger or an appender may attach additional
- properties to specific events. These properties
- have a string key and an object value.
- </para>
- <para>
- This property is for events that have been added directly to
- this event. The aggregate properties (which include these
- event properties) can be retrieved using <see cref="M:log4net.Core.LoggingEvent.LookupProperty(System.String)"/>
- and <see cref="M:log4net.Core.LoggingEvent.GetProperties"/>.
- </para>
- <para>
- Once the properties have been fixed <see cref="P:log4net.Core.LoggingEvent.Fix"/> this property
- returns the combined cached properties. This ensures that updates to
- this property are always reflected in the underlying storage. When
- returning the combined properties there may be more keys in the
- Dictionary than expected.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.Fix">
- <summary>
- The fixed fields in this event
- </summary>
- <value>
- The set of fields that are fixed in this event
- </value>
- <remarks>
- <para>
- Fields will not be fixed if they have previously been fixed.
- It is not possible to 'unfix' a field.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LogImpl">
- <summary>
- Implementation of <see cref="T:log4net.ILog"/> wrapper interface.
- </summary>
- <remarks>
- <para>
- This implementation of the <see cref="T:log4net.ILog"/> interface
- forwards to the <see cref="T:log4net.Core.ILogger"/> held by the base class.
- </para>
- <para>
- This logger has methods to allow the caller to log at the following
- levels:
- </para>
- <list type="definition">
- <item>
- <term>DEBUG</term>
- <description>
- The <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/> and <see cref="M:log4net.Core.LogImpl.DebugFormat(System.String,System.Object[])"/> methods log messages
- at the <c>DEBUG</c> level. That is the level with that name defined in the
- repositories <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/>. The default value
- for this level is <see cref="F:log4net.Core.Level.Debug"/>. The <see cref="P:log4net.Core.LogImpl.IsDebugEnabled"/>
- property tests if this level is enabled for logging.
- </description>
- </item>
- <item>
- <term>INFO</term>
- <description>
- The <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/> and <see cref="M:log4net.Core.LogImpl.InfoFormat(System.String,System.Object[])"/> methods log messages
- at the <c>INFO</c> level. That is the level with that name defined in the
- repositories <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/>. The default value
- for this level is <see cref="F:log4net.Core.Level.Info"/>. The <see cref="P:log4net.Core.LogImpl.IsInfoEnabled"/>
- property tests if this level is enabled for logging.
- </description>
- </item>
- <item>
- <term>WARN</term>
- <description>
- The <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/> and <see cref="M:log4net.Core.LogImpl.WarnFormat(System.String,System.Object[])"/> methods log messages
- at the <c>WARN</c> level. That is the level with that name defined in the
- repositories <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/>. The default value
- for this level is <see cref="F:log4net.Core.Level.Warn"/>. The <see cref="P:log4net.Core.LogImpl.IsWarnEnabled"/>
- property tests if this level is enabled for logging.
- </description>
- </item>
- <item>
- <term>ERROR</term>
- <description>
- The <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/> and <see cref="M:log4net.Core.LogImpl.ErrorFormat(System.String,System.Object[])"/> methods log messages
- at the <c>ERROR</c> level. That is the level with that name defined in the
- repositories <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/>. The default value
- for this level is <see cref="F:log4net.Core.Level.Error"/>. The <see cref="P:log4net.Core.LogImpl.IsErrorEnabled"/>
- property tests if this level is enabled for logging.
- </description>
- </item>
- <item>
- <term>FATAL</term>
- <description>
- The <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/> and <see cref="M:log4net.Core.LogImpl.FatalFormat(System.String,System.Object[])"/> methods log messages
- at the <c>FATAL</c> level. That is the level with that name defined in the
- repositories <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/>. The default value
- for this level is <see cref="F:log4net.Core.Level.Fatal"/>. The <see cref="P:log4net.Core.LogImpl.IsFatalEnabled"/>
- property tests if this level is enabled for logging.
- </description>
- </item>
- </list>
- <para>
- The values for these levels and their semantic meanings can be changed by
- configuring the <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/> for the repository.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.ILog">
- <summary>
- The ILog interface is use by application to log messages into
- the log4net framework.
- </summary>
- <remarks>
- <para>
- Use the <see cref="T:log4net.LogManager"/> to obtain logger instances
- that implement this interface. The <see cref="M:log4net.LogManager.GetLogger(System.Reflection.Assembly,System.Type)"/>
- static method is used to get logger instances.
- </para>
- <para>
- This class contains methods for logging at different levels and also
- has properties for determining if those logging levels are
- enabled in the current configuration.
- </para>
- <para>
- This interface can be implemented in different ways. This documentation
- specifies reasonable behavior that a caller can expect from the actual
- implementation, however different implementations reserve the right to
- do things differently.
- </para>
- </remarks>
- <example>Simple example of logging messages
- <code lang="C#">
- ILog log = LogManager.GetLogger("application-log");
-
- log.Info("Application Start");
- log.Debug("This is a debug message");
-
- if (log.IsDebugEnabled)
- {
- log.Debug("This is another debug message");
- }
- </code>
- </example>
- <seealso cref="T:log4net.LogManager"/>
- <seealso cref="M:log4net.LogManager.GetLogger(System.Reflection.Assembly,System.Type)"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.ILog.Debug(System.Object)">
- <overloads>Log a message object with the <see cref="F:log4net.Core.Level.Debug"/> level.</overloads>
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <param name="message">The message object to log.</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>DEBUG</c>
- enabled by comparing the level of this logger with the
- <see cref="F:log4net.Core.Level.Debug"/> level. If this logger is
- <c>DEBUG</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of
- the additivity flag.
- </para>
- <para><b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.Debug(System.Object,System.Exception)">
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Debug"/> level including
- the stack trace of the <see cref="T:System.Exception"/> passed
- as a parameter.
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- See the <see cref="M:log4net.ILog.Debug(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.DebugFormat(System.String,System.Object[])">
- <overloads>Log a formatted string with the <see cref="F:log4net.Core.Level.Debug"/> level.</overloads>
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.DebugFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.DebugFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.DebugFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.DebugFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.Info(System.Object)">
- <overloads>Log a message object with the <see cref="F:log4net.Core.Level.Info"/> level.</overloads>
- <summary>
- Logs a message object with the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <remarks>
- <para>
- This method first checks if this logger is <c>INFO</c>
- enabled by comparing the level of this logger with the
- <see cref="F:log4net.Core.Level.Info"/> level. If this logger is
- <c>INFO</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para><b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.ILog.Info(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- <param name="message">The message object to log.</param>
- <seealso cref="M:log4net.ILog.Info(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.Info(System.Object,System.Exception)">
- <summary>
- Logs a message object with the <c>INFO</c> level including
- the stack trace of the <see cref="T:System.Exception"/> passed
- as a parameter.
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- See the <see cref="M:log4net.ILog.Info(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.InfoFormat(System.String,System.Object[])">
- <overloads>Log a formatted message string with the <see cref="F:log4net.Core.Level.Info"/> level.</overloads>
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.InfoFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Info(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.InfoFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Info(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.InfoFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Info(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.InfoFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.Warn(System.Object)">
- <overloads>Log a message object with the <see cref="F:log4net.Core.Level.Warn"/> level.</overloads>
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <remarks>
- <para>
- This method first checks if this logger is <c>WARN</c>
- enabled by comparing the level of this logger with the
- <see cref="F:log4net.Core.Level.Warn"/> level. If this logger is
- <c>WARN</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para><b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- <param name="message">The message object to log.</param>
- <seealso cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.Warn(System.Object,System.Exception)">
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Warn"/> level including
- the stack trace of the <see cref="T:System.Exception"/> passed
- as a parameter.
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- See the <see cref="M:log4net.ILog.Warn(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.WarnFormat(System.String,System.Object[])">
- <overloads>Log a formatted message string with the <see cref="F:log4net.Core.Level.Warn"/> level.</overloads>
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.WarnFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.WarnFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.WarnFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.WarnFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.Error(System.Object)">
- <overloads>Log a message object with the <see cref="F:log4net.Core.Level.Error"/> level.</overloads>
- <summary>
- Logs a message object with the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <param name="message">The message object to log.</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>ERROR</c>
- enabled by comparing the level of this logger with the
- <see cref="F:log4net.Core.Level.Error"/> level. If this logger is
- <c>ERROR</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para><b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.ILog.Error(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.Error(System.Object,System.Exception)">
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Error"/> level including
- the stack trace of the <see cref="T:System.Exception"/> passed
- as a parameter.
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- See the <see cref="M:log4net.ILog.Error(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.ErrorFormat(System.String,System.Object[])">
- <overloads>Log a formatted message string with the <see cref="F:log4net.Core.Level.Error"/> level.</overloads>
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.ErrorFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Error(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.ErrorFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Error(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.ErrorFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Error(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.ErrorFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.Fatal(System.Object)">
- <overloads>Log a message object with the <see cref="F:log4net.Core.Level.Fatal"/> level.</overloads>
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <remarks>
- <para>
- This method first checks if this logger is <c>FATAL</c>
- enabled by comparing the level of this logger with the
- <see cref="F:log4net.Core.Level.Fatal"/> level. If this logger is
- <c>FATAL</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para><b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- <param name="message">The message object to log.</param>
- <seealso cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="M:log4net.ILog.Fatal(System.Object,System.Exception)">
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Fatal"/> level including
- the stack trace of the <see cref="T:System.Exception"/> passed
- as a parameter.
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- See the <see cref="M:log4net.ILog.Fatal(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="M:log4net.ILog.FatalFormat(System.String,System.Object[])">
- <overloads>Log a formatted message string with the <see cref="F:log4net.Core.Level.Fatal"/> level.</overloads>
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="M:log4net.ILog.FatalFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="M:log4net.ILog.FatalFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="M:log4net.ILog.FatalFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="M:log4net.ILog.FatalFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="P:log4net.ILog.IsDebugEnabled">
- <summary>
- Checks if this logger is enabled for the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <see cref="F:log4net.Core.Level.Debug"/> events, <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- This function is intended to lessen the computational cost of
- disabled log debug statements.
- </para>
- <para> For some ILog interface <c>log</c>, when you write:</para>
- <code lang="C#">
- log.Debug("This is entry number: " + i );
- </code>
- <para>
- You incur the cost constructing the message, string construction and concatenation in
- this case, regardless of whether the message is logged or not.
- </para>
- <para>
- If you are worried about speed (who isn't), then you should write:
- </para>
- <code lang="C#">
- if (log.IsDebugEnabled)
- {
- log.Debug("This is entry number: " + i );
- }
- </code>
- <para>
- This way you will not incur the cost of parameter
- construction if debugging is disabled for <c>log</c>. On
- the other hand, if the <c>log</c> is debug enabled, you
- will incur the cost of evaluating whether the logger is debug
- enabled twice. Once in <see cref="P:log4net.ILog.IsDebugEnabled"/> and once in
- the <see cref="M:log4net.ILog.Debug(System.Object)"/>. This is an insignificant overhead
- since evaluating a logger takes about 1% of the time it
- takes to actually log. This is the preferred style of logging.
- </para>
- <para>Alternatively if your logger is available statically then the is debug
- enabled state can be stored in a static variable like this:
- </para>
- <code lang="C#">
- private static readonly bool isDebugEnabled = log.IsDebugEnabled;
- </code>
- <para>
- Then when you come to log you can write:
- </para>
- <code lang="C#">
- if (isDebugEnabled)
- {
- log.Debug("This is entry number: " + i );
- }
- </code>
- <para>
- This way the debug enabled state is only queried once
- when the class is loaded. Using a <c>private static readonly</c>
- variable is the most efficient because it is a run time constant
- and can be heavily optimized by the JIT compiler.
- </para>
- <para>
- Of course if you use a static readonly variable to
- hold the enabled state of the logger then you cannot
- change the enabled state at runtime to vary the logging
- that is produced. You have to decide if you need absolute
- speed or runtime flexibility.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="M:log4net.ILog.DebugFormat(System.IFormatProvider,System.String,System.Object[])"/>
- </member>
- <member name="P:log4net.ILog.IsInfoEnabled">
- <summary>
- Checks if this logger is enabled for the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <see cref="F:log4net.Core.Level.Info"/> events, <c>false</c> otherwise.
- </value>
- <remarks>
- For more information see <see cref="P:log4net.ILog.IsDebugEnabled"/>.
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object)"/>
- <seealso cref="M:log4net.ILog.InfoFormat(System.IFormatProvider,System.String,System.Object[])"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="P:log4net.ILog.IsWarnEnabled">
- <summary>
- Checks if this logger is enabled for the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <see cref="F:log4net.Core.Level.Warn"/> events, <c>false</c> otherwise.
- </value>
- <remarks>
- For more information see <see cref="P:log4net.ILog.IsDebugEnabled"/>.
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object)"/>
- <seealso cref="M:log4net.ILog.WarnFormat(System.IFormatProvider,System.String,System.Object[])"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="P:log4net.ILog.IsErrorEnabled">
- <summary>
- Checks if this logger is enabled for the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <see cref="F:log4net.Core.Level.Error"/> events, <c>false</c> otherwise.
- </value>
- <remarks>
- For more information see <see cref="P:log4net.ILog.IsDebugEnabled"/>.
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object)"/>
- <seealso cref="M:log4net.ILog.ErrorFormat(System.IFormatProvider,System.String,System.Object[])"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="P:log4net.ILog.IsFatalEnabled">
- <summary>
- Checks if this logger is enabled for the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <see cref="F:log4net.Core.Level.Fatal"/> events, <c>false</c> otherwise.
- </value>
- <remarks>
- For more information see <see cref="P:log4net.ILog.IsDebugEnabled"/>.
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object)"/>
- <seealso cref="M:log4net.ILog.FatalFormat(System.IFormatProvider,System.String,System.Object[])"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.Core.LogImpl.#ctor(log4net.Core.ILogger)">
- <summary>
- Construct a new wrapper for the specified logger.
- </summary>
- <param name="logger">The logger to wrap.</param>
- <remarks>
- <para>
- Construct a new wrapper for the specified logger.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.ReloadLevels(log4net.Repository.ILoggerRepository)">
- <summary>
- Virtual method called when the configuration of the repository changes
- </summary>
- <param name="repository">the repository holding the levels</param>
- <remarks>
- <para>
- Virtual method called when the configuration of the repository changes
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Debug(System.Object)">
- <summary>
- Logs a message object with the <c>DEBUG</c> level.
- </summary>
- <param name="message">The message object to log.</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>DEBUG</c>
- enabled by comparing the level of this logger with the
- <c>DEBUG</c> level. If this logger is
- <c>DEBUG</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para>
- <b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.Core.LogImpl.Debug(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Debug(System.Object,System.Exception)">
- <summary>
- Logs a message object with the <c>DEBUG</c> level
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Logs a message object with the <c>DEBUG</c> level including
- the stack trace of the <see cref="T:System.Exception"/> <paramref name="exception"/> passed
- as a parameter.
- </para>
- <para>
- See the <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.Core.LogImpl.Debug(System.Object)"/>
- </member>
- <member name="M:log4net.Core.LogImpl.DebugFormat(System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>DEBUG</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.DebugFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.DebugFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <c>DEBUG</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.DebugFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.DebugFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>DEBUG</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.DebugFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.DebugFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>DEBUG</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.DebugFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.DebugFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>DEBUG</c> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Info(System.Object)">
- <summary>
- Logs a message object with the <c>INFO</c> level.
- </summary>
- <param name="message">The message object to log.</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>INFO</c>
- enabled by comparing the level of this logger with the
- <c>INFO</c> level. If this logger is
- <c>INFO</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of
- the additivity flag.
- </para>
- <para>
- <b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.Core.LogImpl.Info(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Info(System.Object,System.Exception)">
- <summary>
- Logs a message object with the <c>INFO</c> level.
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Logs a message object with the <c>INFO</c> level including
- the stack trace of the <see cref="T:System.Exception"/> <paramref name="exception"/>
- passed as a parameter.
- </para>
- <para>
- See the <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.Core.LogImpl.Info(System.Object)"/>
- </member>
- <member name="M:log4net.Core.LogImpl.InfoFormat(System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>INFO</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.InfoFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.InfoFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <c>INFO</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.InfoFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.InfoFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>INFO</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.InfoFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.InfoFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>INFO</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.InfoFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.InfoFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>INFO</c> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Warn(System.Object)">
- <summary>
- Logs a message object with the <c>WARN</c> level.
- </summary>
- <param name="message">the message object to log</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>WARN</c>
- enabled by comparing the level of this logger with the
- <c>WARN</c> level. If this logger is
- <c>WARN</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger and
- also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para>
- <b>WARNING</b> Note that passing an <see cref="T:System.Exception"/> to this
- method will print the name of the <see cref="T:System.Exception"/> but no
- stack trace. To print a stack trace use the
- <see cref="M:log4net.Core.LogImpl.Warn(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Warn(System.Object,System.Exception)">
- <summary>
- Logs a message object with the <c>WARN</c> level
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Logs a message object with the <c>WARN</c> level including
- the stack trace of the <see cref="T:System.Exception"/> <paramref name="exception"/>
- passed as a parameter.
- </para>
- <para>
- See the <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.Core.LogImpl.Warn(System.Object)"/>
- </member>
- <member name="M:log4net.Core.LogImpl.WarnFormat(System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>WARN</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.WarnFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.WarnFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <c>WARN</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.WarnFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.WarnFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>WARN</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.WarnFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.WarnFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>WARN</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.WarnFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.WarnFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>WARN</c> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Error(System.Object)">
- <summary>
- Logs a message object with the <c>ERROR</c> level.
- </summary>
- <param name="message">The message object to log.</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>ERROR</c>
- enabled by comparing the level of this logger with the
- <c>ERROR</c> level. If this logger is
- <c>ERROR</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger and
- also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para>
- <b>WARNING</b> Note that passing an <see cref="T:System.Exception"/> to this
- method will print the name of the <see cref="T:System.Exception"/> but no
- stack trace. To print a stack trace use the
- <see cref="M:log4net.Core.LogImpl.Error(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Error(System.Object,System.Exception)">
- <summary>
- Logs a message object with the <c>ERROR</c> level
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Logs a message object with the <c>ERROR</c> level including
- the stack trace of the <see cref="T:System.Exception"/> <paramref name="exception"/>
- passed as a parameter.
- </para>
- <para>
- See the <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.Core.LogImpl.Error(System.Object)"/>
- </member>
- <member name="M:log4net.Core.LogImpl.ErrorFormat(System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>ERROR</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.ErrorFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.ErrorFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <c>ERROR</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.ErrorFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.ErrorFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>ERROR</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.ErrorFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.ErrorFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>ERROR</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.ErrorFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.ErrorFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>ERROR</c> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Fatal(System.Object)">
- <summary>
- Logs a message object with the <c>FATAL</c> level.
- </summary>
- <param name="message">The message object to log.</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>FATAL</c>
- enabled by comparing the level of this logger with the
- <c>FATAL</c> level. If this logger is
- <c>FATAL</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger and
- also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para>
- <b>WARNING</b> Note that passing an <see cref="T:System.Exception"/> to this
- method will print the name of the <see cref="T:System.Exception"/> but no
- stack trace. To print a stack trace use the
- <see cref="M:log4net.Core.LogImpl.Fatal(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Fatal(System.Object,System.Exception)">
- <summary>
- Logs a message object with the <c>FATAL</c> level
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Logs a message object with the <c>FATAL</c> level including
- the stack trace of the <see cref="T:System.Exception"/> <paramref name="exception"/>
- passed as a parameter.
- </para>
- <para>
- See the <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/>
- </member>
- <member name="M:log4net.Core.LogImpl.FatalFormat(System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>FATAL</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.FatalFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.FatalFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <c>FATAL</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.FatalFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.FatalFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>FATAL</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.FatalFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.FatalFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>FATAL</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.FatalFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.FatalFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>FATAL</c> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.LoggerRepositoryConfigurationChanged(System.Object,System.EventArgs)">
- <summary>
- Event handler for the <see cref="E:log4net.Repository.ILoggerRepository.ConfigurationChanged"/> event
- </summary>
- <param name="sender">the repository</param>
- <param name="e">Empty</param>
- </member>
- <member name="F:log4net.Core.LogImpl.ThisDeclaringType">
- <summary>
- The fully qualified name of this declaring type not the type of any subclass.
- </summary>
- </member>
- <member name="P:log4net.Core.LogImpl.IsDebugEnabled">
- <summary>
- Checks if this logger is enabled for the <c>DEBUG</c>
- level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <c>DEBUG</c> events,
- <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- This function is intended to lessen the computational cost of
- disabled log debug statements.
- </para>
- <para>
- For some <c>log</c> Logger object, when you write:
- </para>
- <code lang="C#">
- log.Debug("This is entry number: " + i );
- </code>
- <para>
- You incur the cost constructing the message, concatenation in
- this case, regardless of whether the message is logged or not.
- </para>
- <para>
- If you are worried about speed, then you should write:
- </para>
- <code lang="C#">
- if (log.IsDebugEnabled())
- {
- log.Debug("This is entry number: " + i );
- }
- </code>
- <para>
- This way you will not incur the cost of parameter
- construction if debugging is disabled for <c>log</c>. On
- the other hand, if the <c>log</c> is debug enabled, you
- will incur the cost of evaluating whether the logger is debug
- enabled twice. Once in <c>IsDebugEnabled</c> and once in
- the <c>Debug</c>. This is an insignificant overhead
- since evaluating a logger takes about 1% of the time it
- takes to actually log.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LogImpl.IsInfoEnabled">
- <summary>
- Checks if this logger is enabled for the <c>INFO</c> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <c>INFO</c> events,
- <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- See <see cref="P:log4net.Core.LogImpl.IsDebugEnabled"/> for more information and examples
- of using this method.
- </para>
- </remarks>
- <seealso cref="P:log4net.Core.LogImpl.IsDebugEnabled"/>
- </member>
- <member name="P:log4net.Core.LogImpl.IsWarnEnabled">
- <summary>
- Checks if this logger is enabled for the <c>WARN</c> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <c>WARN</c> events,
- <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- See <see cref="P:log4net.Core.LogImpl.IsDebugEnabled"/> for more information and examples
- of using this method.
- </para>
- </remarks>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="P:log4net.Core.LogImpl.IsErrorEnabled">
- <summary>
- Checks if this logger is enabled for the <c>ERROR</c> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <c>ERROR</c> events,
- <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- See <see cref="P:log4net.Core.LogImpl.IsDebugEnabled"/> for more information and examples of using this method.
- </para>
- </remarks>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="P:log4net.Core.LogImpl.IsFatalEnabled">
- <summary>
- Checks if this logger is enabled for the <c>FATAL</c> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <c>FATAL</c> events,
- <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- See <see cref="P:log4net.Core.LogImpl.IsDebugEnabled"/> for more information and examples of using this method.
- </para>
- </remarks>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="T:log4net.Core.SecurityContext">
- <summary>
- A SecurityContext used by log4net when interacting with protected resources
- </summary>
- <remarks>
- <para>
- A SecurityContext used by log4net when interacting with protected resources
- for example with operating system services. This can be used to impersonate
- a principal that has been granted privileges on the system resources.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Core.SecurityContext.Impersonate(System.Object)">
- <summary>
- Impersonate this SecurityContext
- </summary>
- <param name="state">State supplied by the caller</param>
- <returns>An <see cref="T:System.IDisposable"/> instance that will
- revoke the impersonation of this SecurityContext, or <c>null</c></returns>
- <remarks>
- <para>
- Impersonate this security context. Further calls on the current
- thread should now be made in the security context provided
- by this object. When the <see cref="T:System.IDisposable"/> result
- <see cref="M:System.IDisposable.Dispose"/> method is called the security
- context of the thread should be reverted to the state it was in
- before <see cref="M:log4net.Core.SecurityContext.Impersonate(System.Object)"/> was called.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.SecurityContextProvider">
- <summary>
- The <see cref="T:log4net.Core.SecurityContextProvider"/> providers default <see cref="T:log4net.Core.SecurityContext"/> instances.
- </summary>
- <remarks>
- <para>
- A configured component that interacts with potentially protected system
- resources uses a <see cref="T:log4net.Core.SecurityContext"/> to provide the elevated
- privileges required. If the <see cref="T:log4net.Core.SecurityContext"/> object has
- been not been explicitly provided to the component then the component
- will request one from this <see cref="T:log4net.Core.SecurityContextProvider"/>.
- </para>
- <para>
- By default the <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> is
- an instance of <see cref="T:log4net.Core.SecurityContextProvider"/> which returns only
- <see cref="T:log4net.Util.NullSecurityContext"/> objects. This is a reasonable default
- where the privileges required are not know by the system.
- </para>
- <para>
- This default behavior can be overridden by subclassing the <see cref="T:log4net.Core.SecurityContextProvider"/>
- and overriding the <see cref="M:log4net.Core.SecurityContextProvider.CreateSecurityContext(System.Object)"/> method to return
- the desired <see cref="T:log4net.Core.SecurityContext"/> objects. The default provider
- can be replaced by programmatically setting the value of the
- <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> property.
- </para>
- <para>
- An alternative is to use the <c>log4net.Config.SecurityContextProviderAttribute</c>
- This attribute can be applied to an assembly in the same way as the
- <c>log4net.Config.XmlConfiguratorAttribute"</c>. The attribute takes
- the type to use as the <see cref="T:log4net.Core.SecurityContextProvider"/> as an argument.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Core.SecurityContextProvider.s_defaultProvider">
- <summary>
- The default provider
- </summary>
- </member>
- <member name="M:log4net.Core.SecurityContextProvider.#ctor">
- <summary>
- Protected default constructor to allow subclassing
- </summary>
- <remarks>
- <para>
- Protected default constructor to allow subclassing
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.SecurityContextProvider.CreateSecurityContext(System.Object)">
- <summary>
- Create a SecurityContext for a consumer
- </summary>
- <param name="consumer">The consumer requesting the SecurityContext</param>
- <returns>An impersonation context</returns>
- <remarks>
- <para>
- The default implementation is to return a <see cref="T:log4net.Util.NullSecurityContext"/>.
- </para>
- <para>
- Subclasses should override this method to provide their own
- behavior.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.SecurityContextProvider.DefaultProvider">
- <summary>
- Gets or sets the default SecurityContextProvider
- </summary>
- <value>
- The default SecurityContextProvider
- </value>
- <remarks>
- <para>
- The default provider is used by configured components that
- require a <see cref="T:log4net.Core.SecurityContext"/> and have not had one
- given to them.
- </para>
- <para>
- By default this is an instance of <see cref="T:log4net.Core.SecurityContextProvider"/>
- that returns <see cref="T:log4net.Util.NullSecurityContext"/> objects.
- </para>
- <para>
- The default provider can be set programmatically by setting
- the value of this property to a sub class of <see cref="T:log4net.Core.SecurityContextProvider"/>
- that has the desired behavior.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.WrapperCreationHandler">
- <summary>
- Delegate used to handle creation of new wrappers.
- </summary>
- <param name="logger">The logger to wrap in a wrapper.</param>
- <remarks>
- <para>
- Delegate used to handle creation of new wrappers. This delegate
- is called from the <see cref="M:log4net.Core.WrapperMap.CreateNewWrapperObject(log4net.Core.ILogger)"/>
- method to construct the wrapper for the specified logger.
- </para>
- <para>
- The delegate to use is supplied to the <see cref="T:log4net.Core.WrapperMap"/>
- constructor.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.WrapperMap">
- <summary>
- Maps between logger objects and wrapper objects.
- </summary>
- <remarks>
- <para>
- This class maintains a mapping between <see cref="T:log4net.Core.ILogger"/> objects and
- <see cref="T:log4net.Core.ILoggerWrapper"/> objects. Use the <see cref="M:log4net.Core.WrapperMap.GetWrapper(log4net.Core.ILogger)"/> method to
- lookup the <see cref="T:log4net.Core.ILoggerWrapper"/> for the specified <see cref="T:log4net.Core.ILogger"/>.
- </para>
- <para>
- New wrapper instances are created by the <see cref="M:log4net.Core.WrapperMap.CreateNewWrapperObject(log4net.Core.ILogger)"/>
- method. The default behavior is for this method to delegate construction
- of the wrapper to the <see cref="T:log4net.Core.WrapperCreationHandler"/> delegate supplied
- to the constructor. This allows specialization of the behavior without
- requiring subclassing of this type.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.WrapperMap.#ctor(log4net.Core.WrapperCreationHandler)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Core.WrapperMap"/>
- </summary>
- <param name="createWrapperHandler">The handler to use to create the wrapper objects.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.WrapperMap"/> class with
- the specified handler to create the wrapper objects.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.WrapperMap.GetWrapper(log4net.Core.ILogger)">
- <summary>
- Gets the wrapper object for the specified logger.
- </summary>
- <returns>The wrapper object for the specified logger</returns>
- <remarks>
- <para>
- If the logger is null then the corresponding wrapper is null.
- </para>
- <para>
- Looks up the wrapper it it has previously been requested and
- returns it. If the wrapper has never been requested before then
- the <see cref="M:log4net.Core.WrapperMap.CreateNewWrapperObject(log4net.Core.ILogger)"/> virtual method is
- called.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.WrapperMap.CreateNewWrapperObject(log4net.Core.ILogger)">
- <summary>
- Creates the wrapper object for the specified logger.
- </summary>
- <param name="logger">The logger to wrap in a wrapper.</param>
- <returns>The wrapper object for the logger.</returns>
- <remarks>
- <para>
- This implementation uses the <see cref="T:log4net.Core.WrapperCreationHandler"/>
- passed to the constructor to create the wrapper. This method
- can be overridden in a subclass.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.WrapperMap.RepositoryShutdown(log4net.Repository.ILoggerRepository)">
- <summary>
- Called when a monitored repository shutdown event is received.
- </summary>
- <param name="repository">The <see cref="T:log4net.Repository.ILoggerRepository"/> that is shutting down</param>
- <remarks>
- <para>
- This method is called when a <see cref="T:log4net.Repository.ILoggerRepository"/> that this
- <see cref="T:log4net.Core.WrapperMap"/> is holding loggers for has signaled its shutdown
- event <see cref="E:log4net.Repository.ILoggerRepository.ShutdownEvent"/>. The default
- behavior of this method is to release the references to the loggers
- and their wrappers generated for this repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.WrapperMap.ILoggerRepository_Shutdown(System.Object,System.EventArgs)">
- <summary>
- Event handler for repository shutdown event.
- </summary>
- <param name="sender">The sender of the event.</param>
- <param name="e">The event args.</param>
- </member>
- <member name="F:log4net.Core.WrapperMap.m_repositories">
- <summary>
- Map of logger repositories to hashtables of ILogger to ILoggerWrapper mappings
- </summary>
- </member>
- <member name="F:log4net.Core.WrapperMap.m_createWrapperHandler">
- <summary>
- The handler to use to create the extension wrapper objects.
- </summary>
- </member>
- <member name="F:log4net.Core.WrapperMap.m_shutdownHandler">
- <summary>
- Internal reference to the delegate used to register for repository shutdown events.
- </summary>
- </member>
- <member name="P:log4net.Core.WrapperMap.Repositories">
- <summary>
- Gets the map of logger repositories.
- </summary>
- <value>
- Map of logger repositories.
- </value>
- <remarks>
- <para>
- Gets the hashtable that is keyed on <see cref="T:log4net.Repository.ILoggerRepository"/>. The
- values are hashtables keyed on <see cref="T:log4net.Core.ILogger"/> with the
- value being the corresponding <see cref="T:log4net.Core.ILoggerWrapper"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.DateFormatter.AbsoluteTimeDateFormatter">
- <summary>
- Formats a <see cref="T:System.DateTime"/> as <c>"HH:mm:ss,fff"</c>.
- </summary>
- <remarks>
- <para>
- Formats a <see cref="T:System.DateTime"/> in the format <c>"HH:mm:ss,fff"</c> for example, <c>"15:49:37,459"</c>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.DateFormatter.IDateFormatter">
- <summary>
- Render a <see cref="T:System.DateTime"/> as a string.
- </summary>
- <remarks>
- <para>
- Interface to abstract the rendering of a <see cref="T:System.DateTime"/>
- instance into a string.
- </para>
- <para>
- The <see cref="M:log4net.DateFormatter.IDateFormatter.FormatDate(System.DateTime,System.IO.TextWriter)"/> method is used to render the
- date to a text writer.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.DateFormatter.IDateFormatter.FormatDate(System.DateTime,System.IO.TextWriter)">
- <summary>
- Formats the specified date as a string.
- </summary>
- <param name="dateToFormat">The date to format.</param>
- <param name="writer">The writer to write to.</param>
- <remarks>
- <para>
- Format the <see cref="T:System.DateTime"/> as a string and write it
- to the <see cref="T:System.IO.TextWriter"/> provided.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.DateFormatter.AbsoluteTimeDateFormatter.AbsoluteTimeDateFormat">
- <summary>
- String constant used to specify AbsoluteTimeDateFormat in layouts. Current value is <b>ABSOLUTE</b>.
- </summary>
- </member>
- <member name="F:log4net.DateFormatter.AbsoluteTimeDateFormatter.DateAndTimeDateFormat">
- <summary>
- String constant used to specify DateTimeDateFormat in layouts. Current value is <b>DATE</b>.
- </summary>
- </member>
- <member name="F:log4net.DateFormatter.AbsoluteTimeDateFormatter.Iso8601TimeDateFormat">
- <summary>
- String constant used to specify ISO8601DateFormat in layouts. Current value is <b>ISO8601</b>.
- </summary>
- </member>
- <member name="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)">
- <summary>
- Renders the date into a string. Format is <c>"HH:mm:ss"</c>.
- </summary>
- <param name="dateToFormat">The date to render into a string.</param>
- <param name="buffer">The string builder to write to.</param>
- <remarks>
- <para>
- Subclasses should override this method to render the date
- into a string using a precision up to the second. This method
- will be called at most once per second and the result will be
- reused if it is needed again during the same second.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDate(System.DateTime,System.IO.TextWriter)">
- <summary>
- Renders the date into a string. Format is "HH:mm:ss,fff".
- </summary>
- <param name="dateToFormat">The date to render into a string.</param>
- <param name="writer">The writer to write to.</param>
- <remarks>
- <para>
- Uses the <see cref="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)"/> method to generate the
- time string up to the seconds and then appends the current
- milliseconds. The results from <see cref="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)"/> are
- cached and <see cref="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)"/> is called at most once
- per second.
- </para>
- <para>
- Sub classes should override <see cref="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)"/>
- rather than <see cref="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDate(System.DateTime,System.IO.TextWriter)"/>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.DateFormatter.AbsoluteTimeDateFormatter.s_lastTimeToTheSecond">
- <summary>
- Last stored time with precision up to the second.
- </summary>
- </member>
- <member name="F:log4net.DateFormatter.AbsoluteTimeDateFormatter.s_lastTimeBuf">
- <summary>
- Last stored time with precision up to the second, formatted
- as a string.
- </summary>
- </member>
- <member name="F:log4net.DateFormatter.AbsoluteTimeDateFormatter.s_lastTimeString">
- <summary>
- Last stored time with precision up to the second, formatted
- as a string.
- </summary>
- </member>
- <member name="T:log4net.DateFormatter.DateTimeDateFormatter">
- <summary>
- Formats a <see cref="T:System.DateTime"/> as <c>"dd MMM yyyy HH:mm:ss,fff"</c>
- </summary>
- <remarks>
- <para>
- Formats a <see cref="T:System.DateTime"/> in the format
- <c>"dd MMM yyyy HH:mm:ss,fff"</c> for example,
- <c>"06 Nov 1994 15:49:37,459"</c>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Angelika Schnagl</author>
- </member>
- <member name="M:log4net.DateFormatter.DateTimeDateFormatter.#ctor">
- <summary>
- Default constructor.
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.DateFormatter.DateTimeDateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)">
- <summary>
- Formats the date without the milliseconds part
- </summary>
- <param name="dateToFormat">The date to format.</param>
- <param name="buffer">The string builder to write to.</param>
- <remarks>
- <para>
- Formats a DateTime in the format <c>"dd MMM yyyy HH:mm:ss"</c>
- for example, <c>"06 Nov 1994 15:49:37"</c>.
- </para>
- <para>
- The base class will append the <c>",fff"</c> milliseconds section.
- This method will only be called at most once per second.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.DateFormatter.DateTimeDateFormatter.m_dateTimeFormatInfo">
- <summary>
- The format info for the invariant culture.
- </summary>
- </member>
- <member name="T:log4net.DateFormatter.Iso8601DateFormatter">
- <summary>
- Formats the <see cref="T:System.DateTime"/> as <c>"yyyy-MM-dd HH:mm:ss,fff"</c>.
- </summary>
- <remarks>
- <para>
- Formats the <see cref="T:System.DateTime"/> specified as a string: <c>"yyyy-MM-dd HH:mm:ss,fff"</c>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.DateFormatter.Iso8601DateFormatter.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.DateFormatter.Iso8601DateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)">
- <summary>
- Formats the date without the milliseconds part
- </summary>
- <param name="dateToFormat">The date to format.</param>
- <param name="buffer">The string builder to write to.</param>
- <remarks>
- <para>
- Formats the date specified as a string: <c>"yyyy-MM-dd HH:mm:ss"</c>.
- </para>
- <para>
- The base class will append the <c>",fff"</c> milliseconds section.
- This method will only be called at most once per second.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.DateFormatter.SimpleDateFormatter">
- <summary>
- Formats the <see cref="T:System.DateTime"/> using the <see cref="M:System.DateTime.ToString(System.String,System.IFormatProvider)"/> method.
- </summary>
- <remarks>
- <para>
- Formats the <see cref="T:System.DateTime"/> using the <see cref="T:System.DateTime"/> <see cref="M:System.DateTime.ToString(System.String,System.IFormatProvider)"/> method.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.DateFormatter.SimpleDateFormatter.#ctor(System.String)">
- <summary>
- Constructor
- </summary>
- <param name="format">The format string.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.DateFormatter.SimpleDateFormatter"/> class
- with the specified format string.
- </para>
- <para>
- The format string must be compatible with the options
- that can be supplied to <see cref="M:System.DateTime.ToString(System.String,System.IFormatProvider)"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.DateFormatter.SimpleDateFormatter.FormatDate(System.DateTime,System.IO.TextWriter)">
- <summary>
- Formats the date using <see cref="M:System.DateTime.ToString(System.String,System.IFormatProvider)"/>.
- </summary>
- <param name="dateToFormat">The date to convert to a string.</param>
- <param name="writer">The writer to write to.</param>
- <remarks>
- <para>
- Uses the date format string supplied to the constructor to call
- the <see cref="M:System.DateTime.ToString(System.String,System.IFormatProvider)"/> method to format the date.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.DateFormatter.SimpleDateFormatter.m_formatString">
- <summary>
- The format string used to format the <see cref="T:System.DateTime"/>.
- </summary>
- <remarks>
- <para>
- The format string must be compatible with the options
- that can be supplied to <see cref="M:System.DateTime.ToString(System.String,System.IFormatProvider)"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Filter.DenyAllFilter">
- <summary>
- This filter drops all <see cref="T:log4net.Core.LoggingEvent"/>.
- </summary>
- <remarks>
- <para>
- You can add this filter to the end of a filter chain to
- switch from the default "accept all unless instructed otherwise"
- filtering behavior to a "deny all unless instructed otherwise"
- behavior.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Filter.FilterSkeleton">
- <summary>
- Subclass this type to implement customized logging event filtering
- </summary>
- <remarks>
- <para>
- Users should extend this class to implement customized logging
- event filtering. Note that <see cref="T:log4net.Repository.Hierarchy.Logger"/> and
- <see cref="T:log4net.Appender.AppenderSkeleton"/>, the parent class of all standard
- appenders, have built-in filtering rules. It is suggested that you
- first use and understand the built-in rules before rushing to write
- your own custom filters.
- </para>
- <para>
- This abstract class assumes and also imposes that filters be
- organized in a linear chain. The <see cref="M:log4net.Filter.FilterSkeleton.Decide(log4net.Core.LoggingEvent)"/>
- method of each filter is called sequentially, in the order of their
- addition to the chain.
- </para>
- <para>
- The <see cref="M:log4net.Filter.FilterSkeleton.Decide(log4net.Core.LoggingEvent)"/> method must return one
- of the integer constants <see cref="F:log4net.Filter.FilterDecision.Deny"/>,
- <see cref="F:log4net.Filter.FilterDecision.Neutral"/> or <see cref="F:log4net.Filter.FilterDecision.Accept"/>.
- </para>
- <para>
- If the value <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned, then the log event is dropped
- immediately without consulting with the remaining filters.
- </para>
- <para>
- If the value <see cref="F:log4net.Filter.FilterDecision.Neutral"/> is returned, then the next filter
- in the chain is consulted. If there are no more filters in the
- chain, then the log event is logged. Thus, in the presence of no
- filters, the default behavior is to log all logging events.
- </para>
- <para>
- If the value <see cref="F:log4net.Filter.FilterDecision.Accept"/> is returned, then the log
- event is logged without consulting the remaining filters.
- </para>
- <para>
- The philosophy of log4net filters is largely inspired from the
- Linux ipchains.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Filter.IFilter">
- <summary>
- Implement this interface to provide customized logging event filtering
- </summary>
- <remarks>
- <para>
- Users should implement this interface to implement customized logging
- event filtering. Note that <see cref="T:log4net.Repository.Hierarchy.Logger"/> and
- <see cref="T:log4net.Appender.AppenderSkeleton"/>, the parent class of all standard
- appenders, have built-in filtering rules. It is suggested that you
- first use and understand the built-in rules before rushing to write
- your own custom filters.
- </para>
- <para>
- This abstract class assumes and also imposes that filters be
- organized in a linear chain. The <see cref="M:log4net.Filter.IFilter.Decide(log4net.Core.LoggingEvent)"/>
- method of each filter is called sequentially, in the order of their
- addition to the chain.
- </para>
- <para>
- The <see cref="M:log4net.Filter.IFilter.Decide(log4net.Core.LoggingEvent)"/> method must return one
- of the integer constants <see cref="F:log4net.Filter.FilterDecision.Deny"/>,
- <see cref="F:log4net.Filter.FilterDecision.Neutral"/> or <see cref="F:log4net.Filter.FilterDecision.Accept"/>.
- </para>
- <para>
- If the value <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned, then the log event is dropped
- immediately without consulting with the remaining filters.
- </para>
- <para>
- If the value <see cref="F:log4net.Filter.FilterDecision.Neutral"/> is returned, then the next filter
- in the chain is consulted. If there are no more filters in the
- chain, then the log event is logged. Thus, in the presence of no
- filters, the default behavior is to log all logging events.
- </para>
- <para>
- If the value <see cref="F:log4net.Filter.FilterDecision.Accept"/> is returned, then the log
- event is logged without consulting the remaining filters.
- </para>
- <para>
- The philosophy of log4net filters is largely inspired from the
- Linux ipchains.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Filter.IFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Decide if the logging event should be logged through an appender.
- </summary>
- <param name="loggingEvent">The LoggingEvent to decide upon</param>
- <returns>The decision of the filter</returns>
- <remarks>
- <para>
- If the decision is <see cref="F:log4net.Filter.FilterDecision.Deny"/>, then the event will be
- dropped. If the decision is <see cref="F:log4net.Filter.FilterDecision.Neutral"/>, then the next
- filter, if any, will be invoked. If the decision is <see cref="F:log4net.Filter.FilterDecision.Accept"/> then
- the event will be logged without consulting with other filters in
- the chain.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.IFilter.Next">
- <summary>
- Property to get and set the next filter
- </summary>
- <value>
- The next filter in the chain
- </value>
- <remarks>
- <para>
- Filters are typically composed into chains. This property allows the next filter in
- the chain to be accessed.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Filter.FilterSkeleton.m_next">
- <summary>
- Points to the next filter in the filter chain.
- </summary>
- <remarks>
- <para>
- See <see cref="P:log4net.Filter.FilterSkeleton.Next"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Filter.FilterSkeleton.ActivateOptions">
- <summary>
- Initialize the filter with the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Filter.FilterSkeleton.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Filter.FilterSkeleton.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Filter.FilterSkeleton.ActivateOptions"/> must be called again.
- </para>
- <para>
- Typically filter's options become active immediately on set,
- however this method must still be called.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Filter.FilterSkeleton.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Decide if the <see cref="T:log4net.Core.LoggingEvent"/> should be logged through an appender.
- </summary>
- <param name="loggingEvent">The <see cref="T:log4net.Core.LoggingEvent"/> to decide upon</param>
- <returns>The decision of the filter</returns>
- <remarks>
- <para>
- If the decision is <see cref="F:log4net.Filter.FilterDecision.Deny"/>, then the event will be
- dropped. If the decision is <see cref="F:log4net.Filter.FilterDecision.Neutral"/>, then the next
- filter, if any, will be invoked. If the decision is <see cref="F:log4net.Filter.FilterDecision.Accept"/> then
- the event will be logged without consulting with other filters in
- the chain.
- </para>
- <para>
- This method is marked <c>abstract</c> and must be implemented
- in a subclass.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.FilterSkeleton.Next">
- <summary>
- Property to get and set the next filter
- </summary>
- <value>
- The next filter in the chain
- </value>
- <remarks>
- <para>
- Filters are typically composed into chains. This property allows the next filter in
- the chain to be accessed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Filter.DenyAllFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Filter.DenyAllFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Always returns the integer constant <see cref="F:log4net.Filter.FilterDecision.Deny"/>
- </summary>
- <param name="loggingEvent">the LoggingEvent to filter</param>
- <returns>Always returns <see cref="F:log4net.Filter.FilterDecision.Deny"/></returns>
- <remarks>
- <para>
- Ignores the event being logged and just returns
- <see cref="F:log4net.Filter.FilterDecision.Deny"/>. This can be used to change the default filter
- chain behavior from <see cref="F:log4net.Filter.FilterDecision.Accept"/> to <see cref="F:log4net.Filter.FilterDecision.Deny"/>. This filter
- should only be used as the last filter in the chain
- as any further filters will be ignored!
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Filter.FilterDecision">
- <summary>
- The return result from <see cref="M:log4net.Filter.IFilter.Decide(log4net.Core.LoggingEvent)"/>
- </summary>
- <remarks>
- <para>
- The return result from <see cref="M:log4net.Filter.IFilter.Decide(log4net.Core.LoggingEvent)"/>
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Filter.FilterDecision.Deny">
- <summary>
- The log event must be dropped immediately without
- consulting with the remaining filters, if any, in the chain.
- </summary>
- </member>
- <member name="F:log4net.Filter.FilterDecision.Neutral">
- <summary>
- This filter is neutral with respect to the log event.
- The remaining filters, if any, should be consulted for a final decision.
- </summary>
- </member>
- <member name="F:log4net.Filter.FilterDecision.Accept">
- <summary>
- The log event must be logged immediately without
- consulting with the remaining filters, if any, in the chain.
- </summary>
- </member>
- <member name="T:log4net.Filter.LevelMatchFilter">
- <summary>
- This is a very simple filter based on <see cref="T:log4net.Core.Level"/> matching.
- </summary>
- <remarks>
- <para>
- The filter admits two options <see cref="P:log4net.Filter.LevelMatchFilter.LevelToMatch"/> and
- <see cref="P:log4net.Filter.LevelMatchFilter.AcceptOnMatch"/>. If there is an exact match between the value
- of the <see cref="P:log4net.Filter.LevelMatchFilter.LevelToMatch"/> option and the <see cref="T:log4net.Core.Level"/> of the
- <see cref="T:log4net.Core.LoggingEvent"/>, then the <see cref="M:log4net.Filter.LevelMatchFilter.Decide(log4net.Core.LoggingEvent)"/> method returns <see cref="F:log4net.Filter.FilterDecision.Accept"/> in
- case the <see cref="P:log4net.Filter.LevelMatchFilter.AcceptOnMatch"/> option value is set
- to <c>true</c>, if it is <c>false</c> then
- <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned. If the <see cref="T:log4net.Core.Level"/> does not match then
- the result will be <see cref="F:log4net.Filter.FilterDecision.Neutral"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Filter.LevelMatchFilter.m_acceptOnMatch">
- <summary>
- flag to indicate if the filter should <see cref="F:log4net.Filter.FilterDecision.Accept"/> on a match
- </summary>
- </member>
- <member name="F:log4net.Filter.LevelMatchFilter.m_levelToMatch">
- <summary>
- the <see cref="T:log4net.Core.Level"/> to match against
- </summary>
- </member>
- <member name="M:log4net.Filter.LevelMatchFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Filter.LevelMatchFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Tests if the <see cref="T:log4net.Core.Level"/> of the logging event matches that of the filter
- </summary>
- <param name="loggingEvent">the event to filter</param>
- <returns>see remarks</returns>
- <remarks>
- <para>
- If the <see cref="T:log4net.Core.Level"/> of the event matches the level of the
- filter then the result of the function depends on the
- value of <see cref="P:log4net.Filter.LevelMatchFilter.AcceptOnMatch"/>. If it is true then
- the function will return <see cref="F:log4net.Filter.FilterDecision.Accept"/>, it it is false then it
- will return <see cref="F:log4net.Filter.FilterDecision.Deny"/>. If the <see cref="T:log4net.Core.Level"/> does not match then
- the result will be <see cref="F:log4net.Filter.FilterDecision.Neutral"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LevelMatchFilter.AcceptOnMatch">
- <summary>
- <see cref="F:log4net.Filter.FilterDecision.Accept"/> when matching <see cref="P:log4net.Filter.LevelMatchFilter.LevelToMatch"/>
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Filter.LevelMatchFilter.AcceptOnMatch"/> property is a flag that determines
- the behavior when a matching <see cref="T:log4net.Core.Level"/> is found. If the
- flag is set to true then the filter will <see cref="F:log4net.Filter.FilterDecision.Accept"/> the
- logging event, otherwise it will <see cref="F:log4net.Filter.FilterDecision.Deny"/> the event.
- </para>
- <para>
- The default is <c>true</c> i.e. to <see cref="F:log4net.Filter.FilterDecision.Accept"/> the event.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LevelMatchFilter.LevelToMatch">
- <summary>
- The <see cref="T:log4net.Core.Level"/> that the filter will match
- </summary>
- <remarks>
- <para>
- The level that this filter will attempt to match against the
- <see cref="T:log4net.Core.LoggingEvent"/> level. If a match is found then
- the result depends on the value of <see cref="P:log4net.Filter.LevelMatchFilter.AcceptOnMatch"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Filter.LevelRangeFilter">
- <summary>
- This is a simple filter based on <see cref="T:log4net.Core.Level"/> matching.
- </summary>
- <remarks>
- <para>
- The filter admits three options <see cref="P:log4net.Filter.LevelRangeFilter.LevelMin"/> and <see cref="P:log4net.Filter.LevelRangeFilter.LevelMax"/>
- that determine the range of priorities that are matched, and
- <see cref="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch"/>. If there is a match between the range
- of priorities and the <see cref="T:log4net.Core.Level"/> of the <see cref="T:log4net.Core.LoggingEvent"/>, then the
- <see cref="M:log4net.Filter.LevelRangeFilter.Decide(log4net.Core.LoggingEvent)"/> method returns <see cref="F:log4net.Filter.FilterDecision.Accept"/> in case the <see cref="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch"/>
- option value is set to <c>true</c>, if it is <c>false</c>
- then <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned. If there is no match, <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Filter.LevelRangeFilter.m_acceptOnMatch">
- <summary>
- Flag to indicate the behavior when matching a <see cref="T:log4net.Core.Level"/>
- </summary>
- </member>
- <member name="F:log4net.Filter.LevelRangeFilter.m_levelMin">
- <summary>
- the minimum <see cref="T:log4net.Core.Level"/> value to match
- </summary>
- </member>
- <member name="F:log4net.Filter.LevelRangeFilter.m_levelMax">
- <summary>
- the maximum <see cref="T:log4net.Core.Level"/> value to match
- </summary>
- </member>
- <member name="M:log4net.Filter.LevelRangeFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Filter.LevelRangeFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Check if the event should be logged.
- </summary>
- <param name="loggingEvent">the logging event to check</param>
- <returns>see remarks</returns>
- <remarks>
- <para>
- If the <see cref="T:log4net.Core.Level"/> of the logging event is outside the range
- matched by this filter then <see cref="F:log4net.Filter.FilterDecision.Deny"/>
- is returned. If the <see cref="T:log4net.Core.Level"/> is matched then the value of
- <see cref="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch"/> is checked. If it is true then
- <see cref="F:log4net.Filter.FilterDecision.Accept"/> is returned, otherwise
- <see cref="F:log4net.Filter.FilterDecision.Neutral"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch">
- <summary>
- <see cref="F:log4net.Filter.FilterDecision.Accept"/> when matching <see cref="P:log4net.Filter.LevelRangeFilter.LevelMin"/> and <see cref="P:log4net.Filter.LevelRangeFilter.LevelMax"/>
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch"/> property is a flag that determines
- the behavior when a matching <see cref="T:log4net.Core.Level"/> is found. If the
- flag is set to true then the filter will <see cref="F:log4net.Filter.FilterDecision.Accept"/> the
- logging event, otherwise it will <see cref="F:log4net.Filter.FilterDecision.Neutral"/> the event.
- </para>
- <para>
- The default is <c>true</c> i.e. to <see cref="F:log4net.Filter.FilterDecision.Accept"/> the event.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LevelRangeFilter.LevelMin">
- <summary>
- Set the minimum matched <see cref="T:log4net.Core.Level"/>
- </summary>
- <remarks>
- <para>
- The minimum level that this filter will attempt to match against the
- <see cref="T:log4net.Core.LoggingEvent"/> level. If a match is found then
- the result depends on the value of <see cref="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LevelRangeFilter.LevelMax">
- <summary>
- Sets the maximum matched <see cref="T:log4net.Core.Level"/>
- </summary>
- <remarks>
- <para>
- The maximum level that this filter will attempt to match against the
- <see cref="T:log4net.Core.LoggingEvent"/> level. If a match is found then
- the result depends on the value of <see cref="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Filter.LoggerMatchFilter">
- <summary>
- Simple filter to match a string in the event's logger name.
- </summary>
- <remarks>
- <para>
- The works very similar to the <see cref="T:log4net.Filter.LevelMatchFilter"/>. It admits two
- options <see cref="P:log4net.Filter.LoggerMatchFilter.LoggerToMatch"/> and <see cref="P:log4net.Filter.LoggerMatchFilter.AcceptOnMatch"/>. If the
- <see cref="P:log4net.Core.LoggingEvent.LoggerName"/> of the <see cref="T:log4net.Core.LoggingEvent"/> starts
- with the value of the <see cref="P:log4net.Filter.LoggerMatchFilter.LoggerToMatch"/> option, then the
- <see cref="M:log4net.Filter.LoggerMatchFilter.Decide(log4net.Core.LoggingEvent)"/> method returns <see cref="F:log4net.Filter.FilterDecision.Accept"/> in
- case the <see cref="P:log4net.Filter.LoggerMatchFilter.AcceptOnMatch"/> option value is set to <c>true</c>,
- if it is <c>false</c> then <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned.
- </para>
- </remarks>
- <author>Daniel Cazzulino</author>
- </member>
- <member name="F:log4net.Filter.LoggerMatchFilter.m_acceptOnMatch">
- <summary>
- Flag to indicate the behavior when we have a match
- </summary>
- </member>
- <member name="F:log4net.Filter.LoggerMatchFilter.m_loggerToMatch">
- <summary>
- The logger name string to substring match against the event
- </summary>
- </member>
- <member name="M:log4net.Filter.LoggerMatchFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Filter.LoggerMatchFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Check if this filter should allow the event to be logged
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <returns>see remarks</returns>
- <remarks>
- <para>
- The rendered message is matched against the <see cref="P:log4net.Filter.LoggerMatchFilter.LoggerToMatch"/>.
- If the <see cref="P:log4net.Filter.LoggerMatchFilter.LoggerToMatch"/> equals the beginning of
- the incoming <see cref="P:log4net.Core.LoggingEvent.LoggerName"/> (<see cref="M:System.String.StartsWith(System.String)"/>)
- then a match will have occurred. If no match occurs
- this function will return <see cref="F:log4net.Filter.FilterDecision.Neutral"/>
- allowing other filters to check the event. If a match occurs then
- the value of <see cref="P:log4net.Filter.LoggerMatchFilter.AcceptOnMatch"/> is checked. If it is
- true then <see cref="F:log4net.Filter.FilterDecision.Accept"/> is returned otherwise
- <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LoggerMatchFilter.AcceptOnMatch">
- <summary>
- <see cref="F:log4net.Filter.FilterDecision.Accept"/> when matching <see cref="P:log4net.Filter.LoggerMatchFilter.LoggerToMatch"/>
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Filter.LoggerMatchFilter.AcceptOnMatch"/> property is a flag that determines
- the behavior when a matching <see cref="T:log4net.Core.Level"/> is found. If the
- flag is set to true then the filter will <see cref="F:log4net.Filter.FilterDecision.Accept"/> the
- logging event, otherwise it will <see cref="F:log4net.Filter.FilterDecision.Deny"/> the event.
- </para>
- <para>
- The default is <c>true</c> i.e. to <see cref="F:log4net.Filter.FilterDecision.Accept"/> the event.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LoggerMatchFilter.LoggerToMatch">
- <summary>
- The <see cref="P:log4net.Core.LoggingEvent.LoggerName"/> that the filter will match
- </summary>
- <remarks>
- <para>
- This filter will attempt to match this value against logger name in
- the following way. The match will be done against the beginning of the
- logger name (using <see cref="M:System.String.StartsWith(System.String)"/>). The match is
- case sensitive. If a match is found then
- the result depends on the value of <see cref="P:log4net.Filter.LoggerMatchFilter.AcceptOnMatch"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Filter.MdcFilter">
- <summary>
- Simple filter to match a keyed string in the <see cref="T:log4net.MDC"/>
- </summary>
- <remarks>
- <para>
- Simple filter to match a keyed string in the <see cref="T:log4net.MDC"/>
- </para>
- <para>
- As the MDC has been replaced with layered properties the
- <see cref="T:log4net.Filter.PropertyFilter"/> should be used instead.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Filter.PropertyFilter">
- <summary>
- Simple filter to match a string an event property
- </summary>
- <remarks>
- <para>
- Simple filter to match a string in the value for a
- specific event property
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="T:log4net.Filter.StringMatchFilter">
- <summary>
- Simple filter to match a string in the rendered message
- </summary>
- <remarks>
- <para>
- Simple filter to match a string in the rendered message
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Filter.StringMatchFilter.m_acceptOnMatch">
- <summary>
- Flag to indicate the behavior when we have a match
- </summary>
- </member>
- <member name="F:log4net.Filter.StringMatchFilter.m_stringToMatch">
- <summary>
- The string to substring match against the message
- </summary>
- </member>
- <member name="F:log4net.Filter.StringMatchFilter.m_stringRegexToMatch">
- <summary>
- A string regex to match
- </summary>
- </member>
- <member name="F:log4net.Filter.StringMatchFilter.m_regexToMatch">
- <summary>
- A regex object to match (generated from m_stringRegexToMatch)
- </summary>
- </member>
- <member name="M:log4net.Filter.StringMatchFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Filter.StringMatchFilter.ActivateOptions">
- <summary>
- Initialize and precompile the Regex if required
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Filter.StringMatchFilter.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Filter.StringMatchFilter.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Filter.StringMatchFilter.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Filter.StringMatchFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Check if this filter should allow the event to be logged
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <returns>see remarks</returns>
- <remarks>
- <para>
- The rendered message is matched against the <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/>.
- If the <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/> occurs as a substring within
- the message then a match will have occurred. If no match occurs
- this function will return <see cref="F:log4net.Filter.FilterDecision.Neutral"/>
- allowing other filters to check the event. If a match occurs then
- the value of <see cref="P:log4net.Filter.StringMatchFilter.AcceptOnMatch"/> is checked. If it is
- true then <see cref="F:log4net.Filter.FilterDecision.Accept"/> is returned otherwise
- <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.StringMatchFilter.AcceptOnMatch">
- <summary>
- <see cref="F:log4net.Filter.FilterDecision.Accept"/> when matching <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/> or <see cref="P:log4net.Filter.StringMatchFilter.RegexToMatch"/>
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Filter.StringMatchFilter.AcceptOnMatch"/> property is a flag that determines
- the behavior when a matching <see cref="T:log4net.Core.Level"/> is found. If the
- flag is set to true then the filter will <see cref="F:log4net.Filter.FilterDecision.Accept"/> the
- logging event, otherwise it will <see cref="F:log4net.Filter.FilterDecision.Neutral"/> the event.
- </para>
- <para>
- The default is <c>true</c> i.e. to <see cref="F:log4net.Filter.FilterDecision.Accept"/> the event.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.StringMatchFilter.StringToMatch">
- <summary>
- Sets the static string to match
- </summary>
- <remarks>
- <para>
- The string that will be substring matched against
- the rendered message. If the message contains this
- string then the filter will match. If a match is found then
- the result depends on the value of <see cref="P:log4net.Filter.StringMatchFilter.AcceptOnMatch"/>.
- </para>
- <para>
- One of <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/> or <see cref="P:log4net.Filter.StringMatchFilter.RegexToMatch"/>
- must be specified.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.StringMatchFilter.RegexToMatch">
- <summary>
- Sets the regular expression to match
- </summary>
- <remarks>
- <para>
- The regular expression pattern that will be matched against
- the rendered message. If the message matches this
- pattern then the filter will match. If a match is found then
- the result depends on the value of <see cref="P:log4net.Filter.StringMatchFilter.AcceptOnMatch"/>.
- </para>
- <para>
- One of <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/> or <see cref="P:log4net.Filter.StringMatchFilter.RegexToMatch"/>
- must be specified.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Filter.PropertyFilter.m_key">
- <summary>
- The key to use to lookup the string from the event properties
- </summary>
- </member>
- <member name="M:log4net.Filter.PropertyFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Filter.PropertyFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Check if this filter should allow the event to be logged
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <returns>see remarks</returns>
- <remarks>
- <para>
- The event property for the <see cref="P:log4net.Filter.PropertyFilter.Key"/> is matched against
- the <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/>.
- If the <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/> occurs as a substring within
- the property value then a match will have occurred. If no match occurs
- this function will return <see cref="F:log4net.Filter.FilterDecision.Neutral"/>
- allowing other filters to check the event. If a match occurs then
- the value of <see cref="P:log4net.Filter.StringMatchFilter.AcceptOnMatch"/> is checked. If it is
- true then <see cref="F:log4net.Filter.FilterDecision.Accept"/> is returned otherwise
- <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.PropertyFilter.Key">
- <summary>
- The key to lookup in the event properties and then match against.
- </summary>
- <remarks>
- <para>
- The key name to use to lookup in the properties map of the
- <see cref="T:log4net.Core.LoggingEvent"/>. The match will be performed against
- the value of this property if it exists.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Filter.NdcFilter">
- <summary>
- Simple filter to match a string in the <see cref="T:log4net.NDC"/>
- </summary>
- <remarks>
- <para>
- Simple filter to match a string in the <see cref="T:log4net.NDC"/>
- </para>
- <para>
- As the MDC has been replaced with named stacks stored in the
- properties collections the <see cref="T:log4net.Filter.PropertyFilter"/> should
- be used instead.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Filter.NdcFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Sets the <see cref="P:log4net.Filter.PropertyFilter.Key"/> to <c>"NDC"</c>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.AppDomainPatternConverter">
- <summary>
- Write the event appdomain name to the output
- </summary>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.LoggingEvent.Domain"/> to the output writer.
- </para>
- </remarks>
- <author>Daniel Cazzulino</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="T:log4net.Layout.Pattern.PatternLayoutConverter">
- <summary>
- Abstract class that provides the formatting functionality that
- derived classes need.
- </summary>
- <remarks>
- Conversion specifiers in a conversion patterns are parsed to
- individual PatternConverters. Each of which is responsible for
- converting a logging event in a converter specific manner.
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="T:log4net.Util.PatternConverter">
- <summary>
- Abstract class that provides the formatting functionality that
- derived classes need.
- </summary>
- <remarks>
- <para>
- Conversion specifiers in a conversion patterns are parsed to
- individual PatternConverters. Each of which is responsible for
- converting a logging event in a converter specific manner.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Util.PatternConverter.c_renderBufferSize">
- <summary>
- Initial buffer size
- </summary>
- </member>
- <member name="F:log4net.Util.PatternConverter.c_renderBufferMaxCapacity">
- <summary>
- Maximum buffer size before it is recycled
- </summary>
- </member>
- <member name="M:log4net.Util.PatternConverter.#ctor">
- <summary>
- Protected constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.PatternConverter"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Evaluate this pattern converter and write the output to a writer.
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">The state object on which the pattern converter should be executed.</param>
- <remarks>
- <para>
- Derived pattern converters must override this method in order to
- convert conversion specifiers in the appropriate way.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternConverter.SetNext(log4net.Util.PatternConverter)">
- <summary>
- Set the next pattern converter in the chains
- </summary>
- <param name="patternConverter">the pattern converter that should follow this converter in the chain</param>
- <returns>the next converter</returns>
- <remarks>
- <para>
- The PatternConverter can merge with its neighbor during this method (or a sub class).
- Therefore the return value may or may not be the value of the argument passed in.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternConverter.Format(System.IO.TextWriter,System.Object)">
- <summary>
- Write the pattern converter to the writer with appropriate formatting
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">The state object on which the pattern converter should be executed.</param>
- <remarks>
- <para>
- This method calls <see cref="M:log4net.Util.PatternConverter.Convert(System.IO.TextWriter,System.Object)"/> to allow the subclass to perform
- appropriate conversion of the pattern converter. If formatting options have
- been specified via the <see cref="P:log4net.Util.PatternConverter.FormattingInfo"/> then this method will
- apply those formattings before writing the output.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternConverter.SpacePad(System.IO.TextWriter,System.Int32)">
- <summary>
- Fast space padding method.
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> to which the spaces will be appended.</param>
- <param name="length">The number of spaces to be padded.</param>
- <remarks>
- <para>
- Fast space padding method.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.PatternConverter.m_option">
- <summary>
- The option string to the converter
- </summary>
- </member>
- <member name="M:log4net.Util.PatternConverter.WriteDictionary(System.IO.TextWriter,log4net.Repository.ILoggerRepository,System.Collections.IDictionary)">
- <summary>
- Write an dictionary to a <see cref="T:System.IO.TextWriter"/>
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="repository">a <see cref="T:log4net.Repository.ILoggerRepository"/> to use for object conversion</param>
- <param name="value">the value to write to the writer</param>
- <remarks>
- <para>
- Writes the <see cref="T:System.Collections.IDictionary"/> to a writer in the form:
- </para>
- <code>
- {key1=value1, key2=value2, key3=value3}
- </code>
- <para>
- If the <see cref="T:log4net.Repository.ILoggerRepository"/> specified
- is not null then it is used to render the key and value to text, otherwise
- the object's ToString method is called.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternConverter.WriteObject(System.IO.TextWriter,log4net.Repository.ILoggerRepository,System.Object)">
- <summary>
- Write an object to a <see cref="T:System.IO.TextWriter"/>
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="repository">a <see cref="T:log4net.Repository.ILoggerRepository"/> to use for object conversion</param>
- <param name="value">the value to write to the writer</param>
- <remarks>
- <para>
- Writes the Object to a writer. If the <see cref="T:log4net.Repository.ILoggerRepository"/> specified
- is not null then it is used to render the object to text, otherwise
- the object's ToString method is called.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PatternConverter.Next">
- <summary>
- Get the next pattern converter in the chain
- </summary>
- <value>
- the next pattern converter in the chain
- </value>
- <remarks>
- <para>
- Get the next pattern converter in the chain
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PatternConverter.FormattingInfo">
- <summary>
- Gets or sets the formatting info for this converter
- </summary>
- <value>
- The formatting info for this converter
- </value>
- <remarks>
- <para>
- Gets or sets the formatting info for this converter
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PatternConverter.Option">
- <summary>
- Gets or sets the option value for this converter
- </summary>
- <summary>
- The option for this converter
- </summary>
- <remarks>
- <para>
- Gets or sets the option value for this converter
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.PatternLayoutConverter.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Layout.Pattern.PatternLayoutConverter"/> class.
- </summary>
- </member>
- <member name="M:log4net.Layout.Pattern.PatternLayoutConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Derived pattern converters must override this method in order to
- convert conversion specifiers in the correct way.
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">The <see cref="T:log4net.Core.LoggingEvent"/> on which the pattern converter should be executed.</param>
- </member>
- <member name="M:log4net.Layout.Pattern.PatternLayoutConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Derived pattern converters must override this method in order to
- convert conversion specifiers in the correct way.
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">The state object on which the pattern converter should be executed.</param>
- </member>
- <member name="F:log4net.Layout.Pattern.PatternLayoutConverter.m_ignoresException">
- <summary>
- Flag indicating if this converter handles exceptions
- </summary>
- <remarks>
- <c>false</c> if this converter handles exceptions
- </remarks>
- </member>
- <member name="P:log4net.Layout.Pattern.PatternLayoutConverter.IgnoresException">
- <summary>
- Flag indicating if this converter handles the logging event exception
- </summary>
- <value><c>false</c> if this converter handles the logging event exception</value>
- <remarks>
- <para>
- If this converter handles the exception object contained within
- <see cref="T:log4net.Core.LoggingEvent"/>, then this property should be set to
- <c>false</c>. Otherwise, if the layout ignores the exception
- object, then the property should be set to <c>true</c>.
- </para>
- <para>
- Set this value to override a this default setting. The default
- value is <c>true</c>, this converter does not handle the exception.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.AppDomainPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the event appdomain name to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.LoggingEvent.Domain"/> to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.DatePatternConverter">
- <summary>
- Date pattern converter, uses a <see cref="T:log4net.DateFormatter.IDateFormatter"/> to format
- the date of a <see cref="T:log4net.Core.LoggingEvent"/>.
- </summary>
- <remarks>
- <para>
- Render the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> to the writer as a string.
- </para>
- <para>
- The value of the <see cref="P:log4net.Util.PatternConverter.Option"/> determines
- the formatting of the date. The following values are allowed:
- <list type="definition">
- <listheader>
- <term>Option value</term>
- <description>Output</description>
- </listheader>
- <item>
- <term>ISO8601</term>
- <description>
- Uses the <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/> formatter.
- Formats using the <c>"yyyy-MM-dd HH:mm:ss,fff"</c> pattern.
- </description>
- </item>
- <item>
- <term>DATE</term>
- <description>
- Uses the <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> formatter.
- Formats using the <c>"dd MMM yyyy HH:mm:ss,fff"</c> for example, <c>"06 Nov 1994 15:49:37,459"</c>.
- </description>
- </item>
- <item>
- <term>ABSOLUTE</term>
- <description>
- Uses the <see cref="T:log4net.DateFormatter.AbsoluteTimeDateFormatter"/> formatter.
- Formats using the <c>"HH:mm:ss,yyyy"</c> for example, <c>"15:49:37,459"</c>.
- </description>
- </item>
- <item>
- <term>other</term>
- <description>
- Any other pattern string uses the <see cref="T:log4net.DateFormatter.SimpleDateFormatter"/> formatter.
- This formatter passes the pattern string to the <see cref="T:System.DateTime"/>
- <see cref="M:System.DateTime.ToString(System.String)"/> method.
- For details on valid patterns see
- <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemglobalizationdatetimeformatinfoclasstopic.asp">DateTimeFormatInfo Class</a>.
- </description>
- </item>
- </list>
- </para>
- <para>
- The <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> is in the local time zone and is rendered in that zone.
- To output the time in Universal time see <see cref="T:log4net.Layout.Pattern.UtcDatePatternConverter"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Layout.Pattern.DatePatternConverter.m_dateFormatter">
- <summary>
- The <see cref="T:log4net.DateFormatter.IDateFormatter"/> used to render the date to a string
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.DateFormatter.IDateFormatter"/> used to render the date to a string
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.DatePatternConverter.ActivateOptions">
- <summary>
- Initialize the converter pattern based on the <see cref="P:log4net.Util.PatternConverter.Option"/> property.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.Pattern.DatePatternConverter.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.Pattern.DatePatternConverter.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.Pattern.DatePatternConverter.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.DatePatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Convert the pattern into the rendered message
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Pass the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> to the <see cref="T:log4net.DateFormatter.IDateFormatter"/>
- for it to render it to the writer.
- </para>
- <para>
- The <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> passed is in the local time zone.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.ExceptionPatternConverter">
- <summary>
- Write the exception text to the output
- </summary>
- <remarks>
- <para>
- If an exception object is stored in the logging event
- it will be rendered into the pattern output with a
- trailing newline.
- </para>
- <para>
- If there is no exception then nothing will be output
- and no trailing newline will be appended.
- It is typical to put a newline before the exception
- and to have the exception as the last data in the pattern.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.ExceptionPatternConverter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Layout.Pattern.ExceptionPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the exception text to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- If an exception object is stored in the logging event
- it will be rendered into the pattern output with a
- trailing newline.
- </para>
- <para>
- If there is no exception then nothing will be output
- and no trailing newline will be appended.
- It is typical to put a newline before the exception
- and to have the exception as the last data in the pattern.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.FileLocationPatternConverter">
- <summary>
- Writes the caller location file name to the output
- </summary>
- <remarks>
- <para>
- Writes the value of the <see cref="P:log4net.Core.LocationInfo.FileName"/> for
- the event to the output writer.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.FileLocationPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the caller location file name to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the value of the <see cref="P:log4net.Core.LocationInfo.FileName"/> for
- the <paramref name="loggingEvent"/> to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.FullLocationPatternConverter">
- <summary>
- Write the caller location info to the output
- </summary>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.LocationInfo.FullInfo"/> to the output writer.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.FullLocationPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the caller location info to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.LocationInfo.FullInfo"/> to the output writer.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.IdentityPatternConverter">
- <summary>
- Writes the event identity to the output
- </summary>
- <remarks>
- <para>
- Writes the value of the <see cref="P:log4net.Core.LoggingEvent.Identity"/> to
- the output writer.
- </para>
- </remarks>
- <author>Daniel Cazzulino</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.IdentityPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Writes the event identity to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the value of the <paramref name="loggingEvent"/>
- <see cref="P:log4net.Core.LoggingEvent.Identity"/> to
- the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.LevelPatternConverter">
- <summary>
- Write the event level to the output
- </summary>
- <remarks>
- <para>
- Writes the display name of the event <see cref="P:log4net.Core.LoggingEvent.Level"/>
- to the writer.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.LevelPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the event level to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.Level.DisplayName"/> of the <paramref name="loggingEvent"/> <see cref="P:log4net.Core.LoggingEvent.Level"/>
- to the <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.LineLocationPatternConverter">
- <summary>
- Write the caller location line number to the output
- </summary>
- <remarks>
- <para>
- Writes the value of the <see cref="P:log4net.Core.LocationInfo.LineNumber"/> for
- the event to the output writer.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.LineLocationPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the caller location line number to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the value of the <see cref="P:log4net.Core.LocationInfo.LineNumber"/> for
- the <paramref name="loggingEvent"/> to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.LoggerPatternConverter">
- <summary>
- Converter for logger name
- </summary>
- <remarks>
- <para>
- Outputs the <see cref="P:log4net.Core.LoggingEvent.LoggerName"/> of the event.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="T:log4net.Layout.Pattern.NamedPatternConverter">
- <summary>
- Converter to output and truncate <c>'.'</c> separated strings
- </summary>
- <remarks>
- <para>
- This abstract class supports truncating a <c>'.'</c> separated string
- to show a specified number of elements from the right hand side.
- This is used to truncate class names that are fully qualified.
- </para>
- <para>
- Subclasses should override the <see cref="M:log4net.Layout.Pattern.NamedPatternConverter.GetFullyQualifiedName(log4net.Core.LoggingEvent)"/> method to
- return the fully qualified string.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.NamedPatternConverter.ActivateOptions">
- <summary>
- Initialize the converter
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.Pattern.NamedPatternConverter.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.Pattern.NamedPatternConverter.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.Pattern.NamedPatternConverter.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.NamedPatternConverter.GetFullyQualifiedName(log4net.Core.LoggingEvent)">
- <summary>
- Get the fully qualified string data
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <returns>the fully qualified name</returns>
- <remarks>
- <para>
- Overridden by subclasses to get the fully qualified name before the
- precision is applied to it.
- </para>
- <para>
- Return the fully qualified <c>'.'</c> (dot/period) separated string.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.NamedPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Convert the pattern to the rendered message
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- Render the <see cref="M:log4net.Layout.Pattern.NamedPatternConverter.GetFullyQualifiedName(log4net.Core.LoggingEvent)"/> to the precision
- specified by the <see cref="P:log4net.Util.PatternConverter.Option"/> property.
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.LoggerPatternConverter.GetFullyQualifiedName(log4net.Core.LoggingEvent)">
- <summary>
- Gets the fully qualified name of the logger
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <returns>The fully qualified logger name</returns>
- <remarks>
- <para>
- Returns the <see cref="P:log4net.Core.LoggingEvent.LoggerName"/> of the <paramref name="loggingEvent"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.MessagePatternConverter">
- <summary>
- Writes the event message to the output
- </summary>
- <remarks>
- <para>
- Uses the <see cref="M:log4net.Core.LoggingEvent.WriteRenderedMessage(System.IO.TextWriter)"/> method
- to write out the event message.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.MessagePatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Writes the event message to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Uses the <see cref="M:log4net.Core.LoggingEvent.WriteRenderedMessage(System.IO.TextWriter)"/> method
- to write out the event message.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.MethodLocationPatternConverter">
- <summary>
- Write the method name to the output
- </summary>
- <remarks>
- <para>
- Writes the caller location <see cref="P:log4net.Core.LocationInfo.MethodName"/> to
- the output.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.MethodLocationPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the method name to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the caller location <see cref="P:log4net.Core.LocationInfo.MethodName"/> to
- the output.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.NdcPatternConverter">
- <summary>
- Converter to include event NDC
- </summary>
- <remarks>
- <para>
- Outputs the value of the event property named <c>NDC</c>.
- </para>
- <para>
- The <see cref="T:log4net.Layout.Pattern.PropertyPatternConverter"/> should be used instead.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.NdcPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the event NDC to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- As the thread context stacks are now stored in named event properties
- this converter simply looks up the value of the <c>NDC</c> property.
- </para>
- <para>
- The <see cref="T:log4net.Layout.Pattern.PropertyPatternConverter"/> should be used instead.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.PropertyPatternConverter">
- <summary>
- Property pattern converter
- </summary>
- <remarks>
- <para>
- Writes out the value of a named property. The property name
- should be set in the <see cref="P:log4net.Util.PatternConverter.Option"/>
- property.
- </para>
- <para>
- If the <see cref="P:log4net.Util.PatternConverter.Option"/> is set to <c>null</c>
- then all the properties are written as key value pairs.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.PropertyPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the property value to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes out the value of a named property. The property name
- should be set in the <see cref="P:log4net.Util.PatternConverter.Option"/>
- property.
- </para>
- <para>
- If the <see cref="P:log4net.Util.PatternConverter.Option"/> is set to <c>null</c>
- then all the properties are written as key value pairs.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.RelativeTimePatternConverter">
- <summary>
- Converter to output the relative time of the event
- </summary>
- <remarks>
- <para>
- Converter to output the time of the event relative to the start of the program.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.RelativeTimePatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the relative time to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes out the relative time of the event in milliseconds.
- That is the number of milliseconds between the event <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/>
- and the <see cref="P:log4net.Core.LoggingEvent.StartTime"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.RelativeTimePatternConverter.TimeDifferenceInMillis(System.DateTime,System.DateTime)">
- <summary>
- Helper method to get the time difference between two DateTime objects
- </summary>
- <param name="start">start time (in the current local time zone)</param>
- <param name="end">end time (in the current local time zone)</param>
- <returns>the time difference in milliseconds</returns>
- </member>
- <member name="T:log4net.Layout.Pattern.ThreadPatternConverter">
- <summary>
- Converter to include event thread name
- </summary>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.LoggingEvent.ThreadName"/> to the output.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.ThreadPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the ThreadName to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.LoggingEvent.ThreadName"/> to the <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.TypeNamePatternConverter">
- <summary>
- Pattern converter for the class name
- </summary>
- <remarks>
- <para>
- Outputs the <see cref="P:log4net.Core.LocationInfo.ClassName"/> of the event.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.TypeNamePatternConverter.GetFullyQualifiedName(log4net.Core.LoggingEvent)">
- <summary>
- Gets the fully qualified name of the class
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <returns>The fully qualified type name for the caller location</returns>
- <remarks>
- <para>
- Returns the <see cref="P:log4net.Core.LocationInfo.ClassName"/> of the <paramref name="loggingEvent"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.UserNamePatternConverter">
- <summary>
- Converter to include event user name
- </summary>
- <author>Douglas de la Torre</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.UserNamePatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Convert the pattern to the rendered message
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- </member>
- <member name="T:log4net.Layout.Pattern.UtcDatePatternConverter">
- <summary>
- Write the TimeStamp to the output
- </summary>
- <remarks>
- <para>
- Date pattern converter, uses a <see cref="T:log4net.DateFormatter.IDateFormatter"/> to format
- the date of a <see cref="T:log4net.Core.LoggingEvent"/>.
- </para>
- <para>
- Uses a <see cref="T:log4net.DateFormatter.IDateFormatter"/> to format the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/>
- in Universal time.
- </para>
- <para>
- See the <see cref="T:log4net.Layout.Pattern.DatePatternConverter"/> for details on the date pattern syntax.
- </para>
- </remarks>
- <seealso cref="T:log4net.Layout.Pattern.DatePatternConverter"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.UtcDatePatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the TimeStamp to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Pass the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> to the <see cref="T:log4net.DateFormatter.IDateFormatter"/>
- for it to render it to the writer.
- </para>
- <para>
- The <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> passed is in the local time zone, this is converted
- to Universal time before it is rendered.
- </para>
- </remarks>
- <seealso cref="T:log4net.Layout.Pattern.DatePatternConverter"/>
- </member>
- <member name="T:log4net.Layout.ExceptionLayout">
- <summary>
- A Layout that renders only the Exception text from the logging event
- </summary>
- <remarks>
- <para>
- A Layout that renders only the Exception text from the logging event.
- </para>
- <para>
- This Layout should only be used with appenders that utilize multiple
- layouts (e.g. <see cref="T:log4net.Appender.AdoNetAppender"/>).
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Layout.LayoutSkeleton">
- <summary>
- Extend this abstract class to create your own log layout format.
- </summary>
- <remarks>
- <para>
- This is the base implementation of the <see cref="T:log4net.Layout.ILayout"/>
- interface. Most layout objects should extend this class.
- </para>
- </remarks>
- <remarks>
- <note type="inheritinfo">
- <para>
- Subclasses must implement the <see cref="M:log4net.Layout.LayoutSkeleton.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)"/>
- method.
- </para>
- <para>
- Subclasses should set the <see cref="P:log4net.Layout.LayoutSkeleton.IgnoresException"/> in their default
- constructor.
- </para>
- </note>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Layout.ILayout">
- <summary>
- Interface implemented by layout objects
- </summary>
- <remarks>
- <para>
- An <see cref="T:log4net.Layout.ILayout"/> object is used to format a <see cref="T:log4net.Core.LoggingEvent"/>
- as text. The <see cref="M:log4net.Layout.ILayout.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)"/> method is called by an
- appender to transform the <see cref="T:log4net.Core.LoggingEvent"/> into a string.
- </para>
- <para>
- The layout can also supply <see cref="P:log4net.Layout.ILayout.Header"/> and <see cref="P:log4net.Layout.ILayout.Footer"/>
- text that is appender before any events and after all the events respectively.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Layout.ILayout.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Implement this method to create your own layout format.
- </summary>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <param name="loggingEvent">The event to format</param>
- <remarks>
- <para>
- This method is called by an appender to format
- the <paramref name="loggingEvent"/> as text and output to a writer.
- </para>
- <para>
- If the caller does not have a <see cref="T:System.IO.TextWriter"/> and prefers the
- event to be formatted as a <see cref="T:System.String"/> then the following
- code can be used to format the event into a <see cref="T:System.IO.StringWriter"/>.
- </para>
- <code lang="C#">
- StringWriter writer = new StringWriter();
- Layout.Format(writer, loggingEvent);
- string formattedEvent = writer.ToString();
- </code>
- </remarks>
- </member>
- <member name="P:log4net.Layout.ILayout.ContentType">
- <summary>
- The content type output by this layout.
- </summary>
- <value>The content type</value>
- <remarks>
- <para>
- The content type output by this layout.
- </para>
- <para>
- This is a MIME type e.g. <c>"text/plain"</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.ILayout.Header">
- <summary>
- The header for the layout format.
- </summary>
- <value>the layout header</value>
- <remarks>
- <para>
- The Header text will be appended before any logging events
- are formatted and appended.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.ILayout.Footer">
- <summary>
- The footer for the layout format.
- </summary>
- <value>the layout footer</value>
- <remarks>
- <para>
- The Footer text will be appended after all the logging events
- have been formatted and appended.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.ILayout.IgnoresException">
- <summary>
- Flag indicating if this layout handle exceptions
- </summary>
- <value><c>false</c> if this layout handles exceptions</value>
- <remarks>
- <para>
- If this layout handles the exception object contained within
- <see cref="T:log4net.Core.LoggingEvent"/>, then the layout should return
- <c>false</c>. Otherwise, if the layout ignores the exception
- object, then the layout should return <c>true</c>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.LayoutSkeleton.m_header">
- <summary>
- The header text
- </summary>
- <remarks>
- <para>
- See <see cref="P:log4net.Layout.LayoutSkeleton.Header"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.LayoutSkeleton.m_footer">
- <summary>
- The footer text
- </summary>
- <remarks>
- <para>
- See <see cref="P:log4net.Layout.LayoutSkeleton.Footer"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.LayoutSkeleton.m_ignoresException">
- <summary>
- Flag indicating if this layout handles exceptions
- </summary>
- <remarks>
- <para>
- <c>false</c> if this layout handles exceptions
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.LayoutSkeleton.#ctor">
- <summary>
- Empty default constructor
- </summary>
- <remarks>
- <para>
- Empty default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.LayoutSkeleton.ActivateOptions">
- <summary>
- Activate component options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.LayoutSkeleton.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.LayoutSkeleton.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.LayoutSkeleton.ActivateOptions"/> must be called again.
- </para>
- <para>
- This method must be implemented by the subclass.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.LayoutSkeleton.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Implement this method to create your own layout format.
- </summary>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <param name="loggingEvent">The event to format</param>
- <remarks>
- <para>
- This method is called by an appender to format
- the <paramref name="loggingEvent"/> as text.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.LayoutSkeleton.ContentType">
- <summary>
- The content type output by this layout.
- </summary>
- <value>The content type is <c>"text/plain"</c></value>
- <remarks>
- <para>
- The content type output by this layout.
- </para>
- <para>
- This base class uses the value <c>"text/plain"</c>.
- To change this value a subclass must override this
- property.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.LayoutSkeleton.Header">
- <summary>
- The header for the layout format.
- </summary>
- <value>the layout header</value>
- <remarks>
- <para>
- The Header text will be appended before any logging events
- are formatted and appended.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.LayoutSkeleton.Footer">
- <summary>
- The footer for the layout format.
- </summary>
- <value>the layout footer</value>
- <remarks>
- <para>
- The Footer text will be appended after all the logging events
- have been formatted and appended.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.LayoutSkeleton.IgnoresException">
- <summary>
- Flag indicating if this layout handles exceptions
- </summary>
- <value><c>false</c> if this layout handles exceptions</value>
- <remarks>
- <para>
- If this layout handles the exception object contained within
- <see cref="T:log4net.Core.LoggingEvent"/>, then the layout should return
- <c>false</c>. Otherwise, if the layout ignores the exception
- object, then the layout should return <c>true</c>.
- </para>
- <para>
- Set this value to override a this default setting. The default
- value is <c>true</c>, this layout does not handle the exception.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.ExceptionLayout.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Constructs a ExceptionLayout
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.ExceptionLayout.ActivateOptions">
- <summary>
- Activate component options
- </summary>
- <remarks>
- <para>
- Part of the <see cref="T:log4net.Core.IOptionHandler"/> component activation
- framework.
- </para>
- <para>
- This method does nothing as options become effective immediately.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.ExceptionLayout.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Gets the exception text from the logging event
- </summary>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Write the exception string to the <see cref="T:System.IO.TextWriter"/>.
- The exception string is retrieved from <see cref="M:log4net.Core.LoggingEvent.GetExceptionString"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.IRawLayout">
- <summary>
- Interface for raw layout objects
- </summary>
- <remarks>
- <para>
- Interface used to format a <see cref="T:log4net.Core.LoggingEvent"/>
- to an object.
- </para>
- <para>
- This interface should not be confused with the
- <see cref="T:log4net.Layout.ILayout"/> interface. This interface is used in
- only certain specialized situations where a raw object is
- required rather than a formatted string. The <see cref="T:log4net.Layout.ILayout"/>
- is not generally useful than this interface.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Layout.IRawLayout.Format(log4net.Core.LoggingEvent)">
- <summary>
- Implement this method to create your own layout format.
- </summary>
- <param name="loggingEvent">The event to format</param>
- <returns>returns the formatted event</returns>
- <remarks>
- <para>
- Implement this method to create your own layout format.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Layout2RawLayoutAdapter">
- <summary>
- Adapts any <see cref="T:log4net.Layout.ILayout"/> to a <see cref="T:log4net.Layout.IRawLayout"/>
- </summary>
- <remarks>
- <para>
- Where an <see cref="T:log4net.Layout.IRawLayout"/> is required this adapter
- allows a <see cref="T:log4net.Layout.ILayout"/> to be specified.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Layout.Layout2RawLayoutAdapter.m_layout">
- <summary>
- The layout to adapt
- </summary>
- </member>
- <member name="M:log4net.Layout.Layout2RawLayoutAdapter.#ctor(log4net.Layout.ILayout)">
- <summary>
- Construct a new adapter
- </summary>
- <param name="layout">the layout to adapt</param>
- <remarks>
- <para>
- Create the adapter for the specified <paramref name="layout"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Layout2RawLayoutAdapter.Format(log4net.Core.LoggingEvent)">
- <summary>
- Format the logging event as an object.
- </summary>
- <param name="loggingEvent">The event to format</param>
- <returns>returns the formatted event</returns>
- <remarks>
- <para>
- Format the logging event as an object.
- </para>
- <para>
- Uses the <see cref="T:log4net.Layout.ILayout"/> object supplied to
- the constructor to perform the formatting.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.PatternLayout">
- <summary>
- A flexible layout configurable with pattern string.
- </summary>
- <remarks>
- <para>
- The goal of this class is to <see cref="M:log4net.Layout.PatternLayout.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)"/> a
- <see cref="T:log4net.Core.LoggingEvent"/> as a string. The results
- depend on the <i>conversion pattern</i>.
- </para>
- <para>
- The conversion pattern is closely related to the conversion
- pattern of the printf function in C. A conversion pattern is
- composed of literal text and format control expressions called
- <i>conversion specifiers</i>.
- </para>
- <para>
- <i>You are free to insert any literal text within the conversion
- pattern.</i>
- </para>
- <para>
- Each conversion specifier starts with a percent sign (%) and is
- followed by optional <i>format modifiers</i> and a <i>conversion
- pattern name</i>. The conversion pattern name specifies the type of
- data, e.g. logger, level, date, thread name. The format
- modifiers control such things as field width, padding, left and
- right justification. The following is a simple example.
- </para>
- <para>
- Let the conversion pattern be <b>"%-5level [%thread]: %message%newline"</b> and assume
- that the log4net environment was set to use a PatternLayout. Then the
- statements
- </para>
- <code lang="C#">
- ILog log = LogManager.GetLogger(typeof(TestApp));
- log.Debug("Message 1");
- log.Warn("Message 2");
- </code>
- <para>would yield the output</para>
- <code>
- DEBUG [main]: Message 1
- WARN [main]: Message 2
- </code>
- <para>
- Note that there is no explicit separator between text and
- conversion specifiers. The pattern parser knows when it has reached
- the end of a conversion specifier when it reads a conversion
- character. In the example above the conversion specifier
- <b>%-5level</b> means the level of the logging event should be left
- justified to a width of five characters.
- </para>
- <para>
- The recognized conversion pattern names are:
- </para>
- <list type="table">
- <listheader>
- <term>Conversion Pattern Name</term>
- <description>Effect</description>
- </listheader>
- <item>
- <term>a</term>
- <description>Equivalent to <b>appdomain</b></description>
- </item>
- <item>
- <term>appdomain</term>
- <description>
- Used to output the friendly name of the AppDomain where the
- logging event was generated.
- </description>
- </item>
- <item>
- <term>c</term>
- <description>Equivalent to <b>logger</b></description>
- </item>
- <item>
- <term>C</term>
- <description>Equivalent to <b>type</b></description>
- </item>
- <item>
- <term>class</term>
- <description>Equivalent to <b>type</b></description>
- </item>
- <item>
- <term>d</term>
- <description>Equivalent to <b>date</b></description>
- </item>
- <item>
- <term>date</term>
- <description>
- <para>
- Used to output the date of the logging event in the local time zone.
- To output the date in universal time use the <c>%utcdate</c> pattern.
- The date conversion
- specifier may be followed by a <i>date format specifier</i> enclosed
- between braces. For example, <b>%date{HH:mm:ss,fff}</b> or
- <b>%date{dd MMM yyyy HH:mm:ss,fff}</b>. If no date format specifier is
- given then ISO8601 format is
- assumed (<see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>).
- </para>
- <para>
- The date format specifier admits the same syntax as the
- time pattern string of the <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- <para>
- For better results it is recommended to use the log4net date
- formatters. These can be specified using one of the strings
- "ABSOLUTE", "DATE" and "ISO8601" for specifying
- <see cref="T:log4net.DateFormatter.AbsoluteTimeDateFormatter"/>,
- <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> and respectively
- <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>. For example,
- <b>%date{ISO8601}</b> or <b>%date{ABSOLUTE}</b>.
- </para>
- <para>
- These dedicated date formatters perform significantly
- better than <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- </description>
- </item>
- <item>
- <term>exception</term>
- <description>
- <para>
- Used to output the exception passed in with the log message.
- </para>
- <para>
- If an exception object is stored in the logging event
- it will be rendered into the pattern output with a
- trailing newline.
- If there is no exception then nothing will be output
- and no trailing newline will be appended.
- It is typical to put a newline before the exception
- and to have the exception as the last data in the pattern.
- </para>
- </description>
- </item>
- <item>
- <term>F</term>
- <description>Equivalent to <b>file</b></description>
- </item>
- <item>
- <term>file</term>
- <description>
- <para>
- Used to output the file name where the logging request was
- issued.
- </para>
- <para>
- <b>WARNING</b> Generating caller location information is
- extremely slow. Its use should be avoided unless execution speed
- is not an issue.
- </para>
- <para>
- See the note below on the availability of caller location information.
- </para>
- </description>
- </item>
- <item>
- <term>identity</term>
- <description>
- <para>
- Used to output the user name for the currently active user
- (Principal.Identity.Name).
- </para>
- <para>
- <b>WARNING</b> Generating caller information is
- extremely slow. Its use should be avoided unless execution speed
- is not an issue.
- </para>
- </description>
- </item>
- <item>
- <term>l</term>
- <description>Equivalent to <b>location</b></description>
- </item>
- <item>
- <term>L</term>
- <description>Equivalent to <b>line</b></description>
- </item>
- <item>
- <term>location</term>
- <description>
- <para>
- Used to output location information of the caller which generated
- the logging event.
- </para>
- <para>
- The location information depends on the CLI implementation but
- usually consists of the fully qualified name of the calling
- method followed by the callers source the file name and line
- number between parentheses.
- </para>
- <para>
- The location information can be very useful. However, its
- generation is <b>extremely</b> slow. Its use should be avoided
- unless execution speed is not an issue.
- </para>
- <para>
- See the note below on the availability of caller location information.
- </para>
- </description>
- </item>
- <item>
- <term>level</term>
- <description>
- <para>
- Used to output the level of the logging event.
- </para>
- </description>
- </item>
- <item>
- <term>line</term>
- <description>
- <para>
- Used to output the line number from where the logging request
- was issued.
- </para>
- <para>
- <b>WARNING</b> Generating caller location information is
- extremely slow. Its use should be avoided unless execution speed
- is not an issue.
- </para>
- <para>
- See the note below on the availability of caller location information.
- </para>
- </description>
- </item>
- <item>
- <term>logger</term>
- <description>
- <para>
- Used to output the logger of the logging event. The
- logger conversion specifier can be optionally followed by
- <i>precision specifier</i>, that is a decimal constant in
- brackets.
- </para>
- <para>
- If a precision specifier is given, then only the corresponding
- number of right most components of the logger name will be
- printed. By default the logger name is printed in full.
- </para>
- <para>
- For example, for the logger name "a.b.c" the pattern
- <b>%logger{2}</b> will output "b.c".
- </para>
- </description>
- </item>
- <item>
- <term>m</term>
- <description>Equivalent to <b>message</b></description>
- </item>
- <item>
- <term>M</term>
- <description>Equivalent to <b>method</b></description>
- </item>
- <item>
- <term>message</term>
- <description>
- <para>
- Used to output the application supplied message associated with
- the logging event.
- </para>
- </description>
- </item>
- <item>
- <term>mdc</term>
- <description>
- <para>
- The MDC (old name for the ThreadContext.Properties) is now part of the
- combined event properties. This pattern is supported for compatibility
- but is equivalent to <b>property</b>.
- </para>
- </description>
- </item>
- <item>
- <term>method</term>
- <description>
- <para>
- Used to output the method name where the logging request was
- issued.
- </para>
- <para>
- <b>WARNING</b> Generating caller location information is
- extremely slow. Its use should be avoided unless execution speed
- is not an issue.
- </para>
- <para>
- See the note below on the availability of caller location information.
- </para>
- </description>
- </item>
- <item>
- <term>n</term>
- <description>Equivalent to <b>newline</b></description>
- </item>
- <item>
- <term>newline</term>
- <description>
- <para>
- Outputs the platform dependent line separator character or
- characters.
- </para>
- <para>
- This conversion pattern offers the same performance as using
- non-portable line separator strings such as "\n", or "\r\n".
- Thus, it is the preferred way of specifying a line separator.
- </para>
- </description>
- </item>
- <item>
- <term>ndc</term>
- <description>
- <para>
- Used to output the NDC (nested diagnostic context) associated
- with the thread that generated the logging event.
- </para>
- </description>
- </item>
- <item>
- <term>p</term>
- <description>Equivalent to <b>level</b></description>
- </item>
- <item>
- <term>P</term>
- <description>Equivalent to <b>property</b></description>
- </item>
- <item>
- <term>properties</term>
- <description>Equivalent to <b>property</b></description>
- </item>
- <item>
- <term>property</term>
- <description>
- <para>
- Used to output the an event specific property. The key to
- lookup must be specified within braces and directly following the
- pattern specifier, e.g. <b>%property{user}</b> would include the value
- from the property that is keyed by the string 'user'. Each property value
- that is to be included in the log must be specified separately.
- Properties are added to events by loggers or appenders. By default
- the <c>log4net:HostName</c> property is set to the name of machine on
- which the event was originally logged.
- </para>
- <para>
- If no key is specified, e.g. <b>%property</b> then all the keys and their
- values are printed in a comma separated list.
- </para>
- <para>
- The properties of an event are combined from a number of different
- contexts. These are listed below in the order in which they are searched.
- </para>
- <list type="definition">
- <item>
- <term>the event properties</term>
- <description>
- The event has <see cref="P:log4net.Core.LoggingEvent.Properties"/> that can be set. These
- properties are specific to this event only.
- </description>
- </item>
- <item>
- <term>the thread properties</term>
- <description>
- The <see cref="P:log4net.ThreadContext.Properties"/> that are set on the current
- thread. These properties are shared by all events logged on this thread.
- </description>
- </item>
- <item>
- <term>the global properties</term>
- <description>
- The <see cref="P:log4net.GlobalContext.Properties"/> that are set globally. These
- properties are shared by all the threads in the AppDomain.
- </description>
- </item>
- </list>
-
- </description>
- </item>
- <item>
- <term>r</term>
- <description>Equivalent to <b>timestamp</b></description>
- </item>
- <item>
- <term>t</term>
- <description>Equivalent to <b>thread</b></description>
- </item>
- <item>
- <term>timestamp</term>
- <description>
- <para>
- Used to output the number of milliseconds elapsed since the start
- of the application until the creation of the logging event.
- </para>
- </description>
- </item>
- <item>
- <term>thread</term>
- <description>
- <para>
- Used to output the name of the thread that generated the
- logging event. Uses the thread number if no name is available.
- </para>
- </description>
- </item>
- <item>
- <term>type</term>
- <description>
- <para>
- Used to output the fully qualified type name of the caller
- issuing the logging request. This conversion specifier
- can be optionally followed by <i>precision specifier</i>, that
- is a decimal constant in brackets.
- </para>
- <para>
- If a precision specifier is given, then only the corresponding
- number of right most components of the class name will be
- printed. By default the class name is output in fully qualified form.
- </para>
- <para>
- For example, for the class name "log4net.Layout.PatternLayout", the
- pattern <b>%type{1}</b> will output "PatternLayout".
- </para>
- <para>
- <b>WARNING</b> Generating the caller class information is
- slow. Thus, its use should be avoided unless execution speed is
- not an issue.
- </para>
- <para>
- See the note below on the availability of caller location information.
- </para>
- </description>
- </item>
- <item>
- <term>u</term>
- <description>Equivalent to <b>identity</b></description>
- </item>
- <item>
- <term>username</term>
- <description>
- <para>
- Used to output the WindowsIdentity for the currently
- active user.
- </para>
- <para>
- <b>WARNING</b> Generating caller WindowsIdentity information is
- extremely slow. Its use should be avoided unless execution speed
- is not an issue.
- </para>
- </description>
- </item>
- <item>
- <term>utcdate</term>
- <description>
- <para>
- Used to output the date of the logging event in universal time.
- The date conversion
- specifier may be followed by a <i>date format specifier</i> enclosed
- between braces. For example, <b>%utcdate{HH:mm:ss,fff}</b> or
- <b>%utcdate{dd MMM yyyy HH:mm:ss,fff}</b>. If no date format specifier is
- given then ISO8601 format is
- assumed (<see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>).
- </para>
- <para>
- The date format specifier admits the same syntax as the
- time pattern string of the <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- <para>
- For better results it is recommended to use the log4net date
- formatters. These can be specified using one of the strings
- "ABSOLUTE", "DATE" and "ISO8601" for specifying
- <see cref="T:log4net.DateFormatter.AbsoluteTimeDateFormatter"/>,
- <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> and respectively
- <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>. For example,
- <b>%utcdate{ISO8601}</b> or <b>%utcdate{ABSOLUTE}</b>.
- </para>
- <para>
- These dedicated date formatters perform significantly
- better than <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- </description>
- </item>
- <item>
- <term>w</term>
- <description>Equivalent to <b>username</b></description>
- </item>
- <item>
- <term>x</term>
- <description>Equivalent to <b>ndc</b></description>
- </item>
- <item>
- <term>X</term>
- <description>Equivalent to <b>mdc</b></description>
- </item>
- <item>
- <term>%</term>
- <description>
- <para>
- The sequence %% outputs a single percent sign.
- </para>
- </description>
- </item>
- </list>
- <para>
- The single letter patterns are deprecated in favor of the
- longer more descriptive pattern names.
- </para>
- <para>
- By default the relevant information is output as is. However,
- with the aid of format modifiers it is possible to change the
- minimum field width, the maximum field width and justification.
- </para>
- <para>
- The optional format modifier is placed between the percent sign
- and the conversion pattern name.
- </para>
- <para>
- The first optional format modifier is the <i>left justification
- flag</i> which is just the minus (-) character. Then comes the
- optional <i>minimum field width</i> modifier. This is a decimal
- constant that represents the minimum number of characters to
- output. If the data item requires fewer characters, it is padded on
- either the left or the right until the minimum width is
- reached. The default is to pad on the left (right justify) but you
- can specify right padding with the left justification flag. The
- padding character is space. If the data item is larger than the
- minimum field width, the field is expanded to accommodate the
- data. The value is never truncated.
- </para>
- <para>
- This behavior can be changed using the <i>maximum field
- width</i> modifier which is designated by a period followed by a
- decimal constant. If the data item is longer than the maximum
- field, then the extra characters are removed from the
- <i>beginning</i> of the data item and not from the end. For
- example, it the maximum field width is eight and the data item is
- ten characters long, then the first two characters of the data item
- are dropped. This behavior deviates from the printf function in C
- where truncation is done from the end.
- </para>
- <para>
- Below are various format modifier examples for the logger
- conversion specifier.
- </para>
- <div class="tablediv">
- <table class="dtTABLE" cellspacing="0">
- <tr>
- <th>Format modifier</th>
- <th>left justify</th>
- <th>minimum width</th>
- <th>maximum width</th>
- <th>comment</th>
- </tr>
- <tr>
- <td align="center">%20logger</td>
- <td align="center">false</td>
- <td align="center">20</td>
- <td align="center">none</td>
- <td>
- <para>
- Left pad with spaces if the logger name is less than 20
- characters long.
- </para>
- </td>
- </tr>
- <tr>
- <td align="center">%-20logger</td>
- <td align="center">true</td>
- <td align="center">20</td>
- <td align="center">none</td>
- <td>
- <para>
- Right pad with spaces if the logger
- name is less than 20 characters long.
- </para>
- </td>
- </tr>
- <tr>
- <td align="center">%.30logger</td>
- <td align="center">NA</td>
- <td align="center">none</td>
- <td align="center">30</td>
- <td>
- <para>
- Truncate from the beginning if the logger
- name is longer than 30 characters.
- </para>
- </td>
- </tr>
- <tr>
- <td align="center"><nobr>%20.30logger</nobr></td>
- <td align="center">false</td>
- <td align="center">20</td>
- <td align="center">30</td>
- <td>
- <para>
- Left pad with spaces if the logger name is shorter than 20
- characters. However, if logger name is longer than 30 characters,
- then truncate from the beginning.
- </para>
- </td>
- </tr>
- <tr>
- <td align="center">%-20.30logger</td>
- <td align="center">true</td>
- <td align="center">20</td>
- <td align="center">30</td>
- <td>
- <para>
- Right pad with spaces if the logger name is shorter than 20
- characters. However, if logger name is longer than 30 characters,
- then truncate from the beginning.
- </para>
- </td>
- </tr>
- </table>
- </div>
- <para>
- <b>Note about caller location information.</b><br/>
- The following patterns <c>%type %file %line %method %location %class %C %F %L %l %M</c>
- all generate caller location information.
- Location information uses the <c>System.Diagnostics.StackTrace</c> class to generate
- a call stack. The caller's information is then extracted from this stack.
- </para>
- <note type="caution">
- <para>
- The <c>System.Diagnostics.StackTrace</c> class is not supported on the
- .NET Compact Framework 1.0 therefore caller location information is not
- available on that framework.
- </para>
- </note>
- <note type="caution">
- <para>
- The <c>System.Diagnostics.StackTrace</c> class has this to say about Release builds:
- </para>
- <para>
- "StackTrace information will be most informative with Debug build configurations.
- By default, Debug builds include debug symbols, while Release builds do not. The
- debug symbols contain most of the file, method name, line number, and column
- information used in constructing StackFrame and StackTrace objects. StackTrace
- might not report as many method calls as expected, due to code transformations
- that occur during optimization."
- </para>
- <para>
- This means that in a Release build the caller information may be incomplete or may
- not exist at all! Therefore caller location information cannot be relied upon in a Release build.
- </para>
- </note>
- <para>
- Additional pattern converters may be registered with a specific <see cref="T:log4net.Layout.PatternLayout"/>
- instance using the <see cref="M:log4net.Layout.PatternLayout.AddConverter(System.String,System.Type)"/> method.
- </para>
- </remarks>
- <example>
- This is a more detailed pattern.
- <code><b>%timestamp [%thread] %level %logger %ndc - %message%newline</b></code>
- </example>
- <example>
- A similar pattern except that the relative time is
- right padded if less than 6 digits, thread name is right padded if
- less than 15 characters and truncated if longer and the logger
- name is left padded if shorter than 30 characters and truncated if
- longer.
- <code><b>%-6timestamp [%15.15thread] %-5level %30.30logger %ndc - %message%newline</b></code>
- </example>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Douglas de la Torre</author>
- <author>Daniel Cazzulino</author>
- </member>
- <member name="F:log4net.Layout.PatternLayout.DefaultConversionPattern">
- <summary>
- Default pattern string for log output.
- </summary>
- <remarks>
- <para>
- Default pattern string for log output.
- Currently set to the string <b>"%message%newline"</b>
- which just prints the application supplied message.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.PatternLayout.DetailConversionPattern">
- <summary>
- A detailed conversion pattern
- </summary>
- <remarks>
- <para>
- A conversion pattern which includes Time, Thread, Logger, and Nested Context.
- Current value is <b>%timestamp [%thread] %level %logger %ndc - %message%newline</b>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.PatternLayout.s_globalRulesRegistry">
- <summary>
- Internal map of converter identifiers to converter types.
- </summary>
- <remarks>
- <para>
- This static map is overridden by the m_converterRegistry instance map
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.PatternLayout.m_pattern">
- <summary>
- the pattern
- </summary>
- </member>
- <member name="F:log4net.Layout.PatternLayout.m_head">
- <summary>
- the head of the pattern converter chain
- </summary>
- </member>
- <member name="F:log4net.Layout.PatternLayout.m_instanceRulesRegistry">
- <summary>
- patterns defined on this PatternLayout only
- </summary>
- </member>
- <member name="M:log4net.Layout.PatternLayout.#cctor">
- <summary>
- Initialize the global registry
- </summary>
- <remarks>
- <para>
- Defines the builtin global rules.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.#ctor">
- <summary>
- Constructs a PatternLayout using the DefaultConversionPattern
- </summary>
- <remarks>
- <para>
- The default pattern just produces the application supplied message.
- </para>
- <para>
- Note to Inheritors: This constructor calls the virtual method
- <see cref="M:log4net.Layout.PatternLayout.CreatePatternParser(System.String)"/>. If you override this method be
- aware that it will be called before your is called constructor.
- </para>
- <para>
- As per the <see cref="T:log4net.Core.IOptionHandler"/> contract the <see cref="M:log4net.Layout.PatternLayout.ActivateOptions"/>
- method must be called after the properties on this object have been
- configured.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.#ctor(System.String)">
- <summary>
- Constructs a PatternLayout using the supplied conversion pattern
- </summary>
- <param name="pattern">the pattern to use</param>
- <remarks>
- <para>
- Note to Inheritors: This constructor calls the virtual method
- <see cref="M:log4net.Layout.PatternLayout.CreatePatternParser(System.String)"/>. If you override this method be
- aware that it will be called before your is called constructor.
- </para>
- <para>
- When using this constructor the <see cref="M:log4net.Layout.PatternLayout.ActivateOptions"/> method
- need not be called. This may not be the case when using a subclass.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.CreatePatternParser(System.String)">
- <summary>
- Create the pattern parser instance
- </summary>
- <param name="pattern">the pattern to parse</param>
- <returns>The <see cref="T:log4net.Util.PatternParser"/> that will format the event</returns>
- <remarks>
- <para>
- Creates the <see cref="T:log4net.Util.PatternParser"/> used to parse the conversion string. Sets the
- global and instance rules on the <see cref="T:log4net.Util.PatternParser"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.ActivateOptions">
- <summary>
- Initialize layout options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.PatternLayout.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.PatternLayout.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.PatternLayout.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Produces a formatted string as specified by the conversion pattern.
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <remarks>
- <para>
- Parse the <see cref="T:log4net.Core.LoggingEvent"/> using the patter format
- specified in the <see cref="P:log4net.Layout.PatternLayout.ConversionPattern"/> property.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.AddConverter(log4net.Layout.PatternLayout.ConverterInfo)">
- <summary>
- Add a converter to this PatternLayout
- </summary>
- <param name="converterInfo">the converter info</param>
- <remarks>
- <para>
- This version of the method is used by the configurator.
- Programmatic users should use the alternative <see cref="M:log4net.Layout.PatternLayout.AddConverter(System.String,System.Type)"/> method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.AddConverter(System.String,System.Type)">
- <summary>
- Add a converter to this PatternLayout
- </summary>
- <param name="name">the name of the conversion pattern for this converter</param>
- <param name="type">the type of the converter</param>
- <remarks>
- <para>
- Add a named pattern converter to this instance. This
- converter will be used in the formatting of the event.
- This method must be called before <see cref="M:log4net.Layout.PatternLayout.ActivateOptions"/>.
- </para>
- <para>
- The <paramref name="type"/> specified must extend the
- <see cref="T:log4net.Util.PatternConverter"/> type.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.PatternLayout.ConversionPattern">
- <summary>
- The pattern formatting string
- </summary>
- <remarks>
- <para>
- The <b>ConversionPattern</b> option. This is the string which
- controls formatting and consists of a mix of literal content and
- conversion specifiers.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.PatternLayout.ConverterInfo">
- <summary>
- Wrapper class used to map converter names to converter types
- </summary>
- <remarks>
- <para>
- Pattern converter info class used during configuration to
- pass to the <see cref="M:log4net.Layout.PatternLayout.AddConverter(log4net.Layout.PatternLayout.ConverterInfo)"/>
- method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.ConverterInfo.#ctor">
- <summary>
- default constructor
- </summary>
- </member>
- <member name="P:log4net.Layout.PatternLayout.ConverterInfo.Name">
- <summary>
- Gets or sets the name of the conversion pattern
- </summary>
- <remarks>
- <para>
- The name of the pattern in the format string
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.PatternLayout.ConverterInfo.Type">
- <summary>
- Gets or sets the type of the converter
- </summary>
- <remarks>
- <para>
- The value specified must extend the
- <see cref="T:log4net.Util.PatternConverter"/> type.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.RawLayoutConverter">
- <summary>
- Type converter for the <see cref="T:log4net.Layout.IRawLayout"/> interface
- </summary>
- <remarks>
- <para>
- Used to convert objects to the <see cref="T:log4net.Layout.IRawLayout"/> interface.
- Supports converting from the <see cref="T:log4net.Layout.ILayout"/> interface to
- the <see cref="T:log4net.Layout.IRawLayout"/> interface using the <see cref="T:log4net.Layout.Layout2RawLayoutAdapter"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Util.TypeConverters.IConvertFrom">
- <summary>
- Interface supported by type converters
- </summary>
- <remarks>
- <para>
- This interface supports conversion from arbitrary types
- to a single target type. See <see cref="T:log4net.Util.TypeConverters.TypeConverterAttribute"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.IConvertFrom.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Test if the <paramref name="sourceType"/> can be converted to the
- type supported by this converter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.IConvertFrom.ConvertFrom(System.Object)">
- <summary>
- Convert the source object to the type supported by this object
- </summary>
- <param name="source">the object to convert</param>
- <returns>the converted object</returns>
- <remarks>
- <para>
- Converts the <paramref name="source"/> to the type supported
- by this converter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.RawLayoutConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the sourceType be converted to an <see cref="T:log4net.Layout.IRawLayout"/>
- </summary>
- <param name="sourceType">the source to be to be converted</param>
- <returns><c>true</c> if the source type can be converted to <see cref="T:log4net.Layout.IRawLayout"/></returns>
- <remarks>
- <para>
- Test if the <paramref name="sourceType"/> can be converted to a
- <see cref="T:log4net.Layout.IRawLayout"/>. Only <see cref="T:log4net.Layout.ILayout"/> is supported
- as the <paramref name="sourceType"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.RawLayoutConverter.ConvertFrom(System.Object)">
- <summary>
- Convert the value to a <see cref="T:log4net.Layout.IRawLayout"/> object
- </summary>
- <param name="source">the value to convert</param>
- <returns>the <see cref="T:log4net.Layout.IRawLayout"/> object</returns>
- <remarks>
- <para>
- Convert the <paramref name="source"/> object to a
- <see cref="T:log4net.Layout.IRawLayout"/> object. If the <paramref name="source"/> object
- is a <see cref="T:log4net.Layout.ILayout"/> then the <see cref="T:log4net.Layout.Layout2RawLayoutAdapter"/>
- is used to adapt between the two interfaces, otherwise an
- exception is thrown.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.RawPropertyLayout">
- <summary>
- Extract the value of a property from the <see cref="T:log4net.Core.LoggingEvent"/>
- </summary>
- <remarks>
- <para>
- Extract the value of a property from the <see cref="T:log4net.Core.LoggingEvent"/>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.RawPropertyLayout.#ctor">
- <summary>
- Constructs a RawPropertyLayout
- </summary>
- </member>
- <member name="M:log4net.Layout.RawPropertyLayout.Format(log4net.Core.LoggingEvent)">
- <summary>
- Lookup the property for <see cref="P:log4net.Layout.RawPropertyLayout.Key"/>
- </summary>
- <param name="loggingEvent">The event to format</param>
- <returns>returns property value</returns>
- <remarks>
- <para>
- Looks up and returns the object value of the property
- named <see cref="P:log4net.Layout.RawPropertyLayout.Key"/>. If there is no property defined
- with than name then <c>null</c> will be returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.RawPropertyLayout.Key">
- <summary>
- The name of the value to lookup in the LoggingEvent Properties collection.
- </summary>
- <value>
- Value to lookup in the LoggingEvent Properties collection
- </value>
- <remarks>
- <para>
- String name of the property to lookup in the <see cref="T:log4net.Core.LoggingEvent"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.RawTimeStampLayout">
- <summary>
- Extract the date from the <see cref="T:log4net.Core.LoggingEvent"/>
- </summary>
- <remarks>
- <para>
- Extract the date from the <see cref="T:log4net.Core.LoggingEvent"/>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Layout.RawTimeStampLayout.#ctor">
- <summary>
- Constructs a RawTimeStampLayout
- </summary>
- </member>
- <member name="M:log4net.Layout.RawTimeStampLayout.Format(log4net.Core.LoggingEvent)">
- <summary>
- Gets the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> as a <see cref="T:System.DateTime"/>.
- </summary>
- <param name="loggingEvent">The event to format</param>
- <returns>returns the time stamp</returns>
- <remarks>
- <para>
- Gets the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> as a <see cref="T:System.DateTime"/>.
- </para>
- <para>
- The time stamp is in local time. To format the time stamp
- in universal time use <see cref="T:log4net.Layout.RawUtcTimeStampLayout"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.RawUtcTimeStampLayout">
- <summary>
- Extract the date from the <see cref="T:log4net.Core.LoggingEvent"/>
- </summary>
- <remarks>
- <para>
- Extract the date from the <see cref="T:log4net.Core.LoggingEvent"/>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Layout.RawUtcTimeStampLayout.#ctor">
- <summary>
- Constructs a RawUtcTimeStampLayout
- </summary>
- </member>
- <member name="M:log4net.Layout.RawUtcTimeStampLayout.Format(log4net.Core.LoggingEvent)">
- <summary>
- Gets the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> as a <see cref="T:System.DateTime"/>.
- </summary>
- <param name="loggingEvent">The event to format</param>
- <returns>returns the time stamp</returns>
- <remarks>
- <para>
- Gets the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> as a <see cref="T:System.DateTime"/>.
- </para>
- <para>
- The time stamp is in universal time. To format the time stamp
- in local time use <see cref="T:log4net.Layout.RawTimeStampLayout"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.SimpleLayout">
- <summary>
- A very simple layout
- </summary>
- <remarks>
- <para>
- SimpleLayout consists of the level of the log statement,
- followed by " - " and then the log message itself. For example,
- <code>
- DEBUG - Hello world
- </code>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Layout.SimpleLayout.#ctor">
- <summary>
- Constructs a SimpleLayout
- </summary>
- </member>
- <member name="M:log4net.Layout.SimpleLayout.ActivateOptions">
- <summary>
- Initialize layout options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.SimpleLayout.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.SimpleLayout.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.SimpleLayout.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.SimpleLayout.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Produces a simple formatted output.
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <remarks>
- <para>
- Formats the event as the level of the even,
- followed by " - " and then the log message itself. The
- output is terminated by a newline.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.XmlLayout">
- <summary>
- Layout that formats the log events as XML elements.
- </summary>
- <remarks>
- <para>
- The output of the <see cref="T:log4net.Layout.XmlLayout"/> consists of a series of
- log4net:event elements. It does not output a complete well-formed XML
- file. The output is designed to be included as an <em>external entity</em>
- in a separate file to form a correct XML file.
- </para>
- <para>
- For example, if <c>abc</c> is the name of the file where
- the <see cref="T:log4net.Layout.XmlLayout"/> output goes, then a well-formed XML file would
- be:
- </para>
- <code lang="XML">
- &lt;?xml version="1.0" ?&gt;
-
- &lt;!DOCTYPE log4net:events SYSTEM "log4net-events.dtd" [&lt;!ENTITY data SYSTEM "abc"&gt;]&gt;
-
- &lt;log4net:events version="1.2" xmlns:log4net="http://logging.apache.org/log4net/schemas/log4net-events-1.2&gt;
- &amp;data;
- &lt;/log4net:events&gt;
- </code>
- <para>
- This approach enforces the independence of the <see cref="T:log4net.Layout.XmlLayout"/>
- and the appender where it is embedded.
- </para>
- <para>
- The <c>version</c> attribute helps components to correctly
- interpret output generated by <see cref="T:log4net.Layout.XmlLayout"/>. The value of
- this attribute should be "1.2" for release 1.2 and later.
- </para>
- <para>
- Alternatively the <c>Header</c> and <c>Footer</c> properties can be
- configured to output the correct XML header, open tag and close tag.
- When setting the <c>Header</c> and <c>Footer</c> properties it is essential
- that the underlying data store not be appendable otherwise the data
- will become invalid XML.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Layout.XmlLayoutBase">
- <summary>
- Layout that formats the log events as XML elements.
- </summary>
- <remarks>
- <para>
- This is an abstract class that must be subclassed by an implementation
- to conform to a specific schema.
- </para>
- <para>
- Deriving classes must implement the <see cref="M:log4net.Layout.XmlLayoutBase.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)"/> method.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Layout.XmlLayoutBase.#ctor">
- <summary>
- Protected constructor to support subclasses
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Layout.XmlLayoutBase"/> class
- with no location info.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayoutBase.#ctor(System.Boolean)">
- <summary>
- Protected constructor to support subclasses
- </summary>
- <remarks>
- <para>
- The <paramref name="locationInfo" /> parameter determines whether
- location information will be output by the layout. If
- <paramref name="locationInfo" /> is set to <c>true</c>, then the
- file name and line number of the statement at the origin of the log
- statement will be output.
- </para>
- <para>
- If you are embedding this layout within an SMTPAppender
- then make sure to set the <b>LocationInfo</b> option of that
- appender as well.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayoutBase.ActivateOptions">
- <summary>
- Initialize layout options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.XmlLayoutBase.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.XmlLayoutBase.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.XmlLayoutBase.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayoutBase.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Produces a formatted string.
- </summary>
- <param name="loggingEvent">The event being logged.</param>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <remarks>
- <para>
- Format the <see cref="T:log4net.Core.LoggingEvent"/> and write it to the <see cref="T:System.IO.TextWriter"/>.
- </para>
- <para>
- This method creates an <see cref="T:System.Xml.XmlTextWriter"/> that writes to the
- <paramref name="writer"/>. The <see cref="T:System.Xml.XmlTextWriter"/> is passed
- to the <see cref="M:log4net.Layout.XmlLayoutBase.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)"/> method. Subclasses should override the
- <see cref="M:log4net.Layout.XmlLayoutBase.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)"/> method rather than this method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayoutBase.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)">
- <summary>
- Does the actual writing of the XML.
- </summary>
- <param name="writer">The writer to use to output the event to.</param>
- <param name="loggingEvent">The event to write.</param>
- <remarks>
- <para>
- Subclasses should override this method to format
- the <see cref="T:log4net.Core.LoggingEvent"/> as XML.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.XmlLayoutBase.m_locationInfo">
- <summary>
- Flag to indicate if location information should be included in
- the XML events.
- </summary>
- </member>
- <member name="F:log4net.Layout.XmlLayoutBase.m_protectCloseTextWriter">
- <summary>
- Writer adapter that ignores Close
- </summary>
- </member>
- <member name="F:log4net.Layout.XmlLayoutBase.m_invalidCharReplacement">
- <summary>
- The string to replace invalid chars with
- </summary>
- </member>
- <member name="P:log4net.Layout.XmlLayoutBase.LocationInfo">
- <summary>
- Gets a value indicating whether to include location information in
- the XML events.
- </summary>
- <value>
- <c>true</c> if location information should be included in the XML
- events; otherwise, <c>false</c>.
- </value>
- <remarks>
- <para>
- If <see cref="P:log4net.Layout.XmlLayoutBase.LocationInfo"/> is set to <c>true</c>, then the file
- name and line number of the statement at the origin of the log
- statement will be output.
- </para>
- <para>
- If you are embedding this layout within an <c>SMTPAppender</c>
- then make sure to set the <b>LocationInfo</b> option of that
- appender as well.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.XmlLayoutBase.InvalidCharReplacement">
- <summary>
- The string to replace characters that can not be expressed in XML with.
- <remarks>
- <para>
- Not all characters may be expressed in XML. This property contains the
- string to replace those that can not with. This defaults to a ?. Set it
- to the empty string to simply remove offending characters. For more
- details on the allowed character ranges see http://www.w3.org/TR/REC-xml/#charsets
- Character replacement will occur in the log message, the property names
- and the property values.
- </para>
- </remarks>
- </summary>
- </member>
- <member name="P:log4net.Layout.XmlLayoutBase.ContentType">
- <summary>
- Gets the content type output by this layout.
- </summary>
- <value>
- As this is the XML layout, the value is always <c>"text/xml"</c>.
- </value>
- <remarks>
- <para>
- As this is the XML layout, the value is always <c>"text/xml"</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayout.#ctor">
- <summary>
- Constructs an XmlLayout
- </summary>
- </member>
- <member name="M:log4net.Layout.XmlLayout.#ctor(System.Boolean)">
- <summary>
- Constructs an XmlLayout.
- </summary>
- <remarks>
- <para>
- The <b>LocationInfo</b> option takes a boolean value. By
- default, it is set to false which means there will be no location
- information output by this layout. If the the option is set to
- true, then the file name and line number of the statement
- at the origin of the log statement will be output.
- </para>
- <para>
- If you are embedding this layout within an SmtpAppender
- then make sure to set the <b>LocationInfo</b> option of that
- appender as well.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayout.ActivateOptions">
- <summary>
- Initialize layout options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.XmlLayout.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.XmlLayout.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.XmlLayout.ActivateOptions"/> must be called again.
- </para>
- <para>
- Builds a cache of the element names
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayout.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)">
- <summary>
- Does the actual writing of the XML.
- </summary>
- <param name="writer">The writer to use to output the event to.</param>
- <param name="loggingEvent">The event to write.</param>
- <remarks>
- <para>
- Override the base class <see cref="M:log4net.Layout.XmlLayoutBase.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)"/> method
- to write the <see cref="T:log4net.Core.LoggingEvent"/> to the <see cref="T:System.Xml.XmlWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.XmlLayout.m_prefix">
- <summary>
- The prefix to use for all generated element names
- </summary>
- </member>
- <member name="P:log4net.Layout.XmlLayout.Prefix">
- <summary>
- The prefix to use for all element names
- </summary>
- <remarks>
- <para>
- The default prefix is <b>log4net</b>. Set this property
- to change the prefix. If the prefix is set to an empty string
- then no prefix will be written.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.XmlLayout.Base64EncodeMessage">
- <summary>
- Set whether or not to base64 encode the message.
- </summary>
- <remarks>
- <para>
- By default the log message will be written as text to the xml
- output. This can cause problems when the message contains binary
- data. By setting this to true the contents of the message will be
- base64 encoded. If this is set then invalid character replacement
- (see <see cref="P:log4net.Layout.XmlLayoutBase.InvalidCharReplacement"/>) will not be performed
- on the log message.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.XmlLayout.Base64EncodeProperties">
- <summary>
- Set whether or not to base64 encode the property values.
- </summary>
- <remarks>
- <para>
- By default the properties will be written as text to the xml
- output. This can cause problems when one or more properties contain
- binary data. By setting this to true the values of the properties
- will be base64 encoded. If this is set then invalid character replacement
- (see <see cref="P:log4net.Layout.XmlLayoutBase.InvalidCharReplacement"/>) will not be performed
- on the property values.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.XmlLayoutSchemaLog4j">
- <summary>
- Layout that formats the log events as XML elements compatible with the log4j schema
- </summary>
- <remarks>
- <para>
- Formats the log events according to the http://logging.apache.org/log4j schema.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Layout.XmlLayoutSchemaLog4j.s_date1970">
- <summary>
- The 1st of January 1970 in UTC
- </summary>
- </member>
- <member name="M:log4net.Layout.XmlLayoutSchemaLog4j.#ctor">
- <summary>
- Constructs an XMLLayoutSchemaLog4j
- </summary>
- </member>
- <member name="M:log4net.Layout.XmlLayoutSchemaLog4j.#ctor(System.Boolean)">
- <summary>
- Constructs an XMLLayoutSchemaLog4j.
- </summary>
- <remarks>
- <para>
- The <b>LocationInfo</b> option takes a boolean value. By
- default, it is set to false which means there will be no location
- information output by this layout. If the the option is set to
- true, then the file name and line number of the statement
- at the origin of the log statement will be output.
- </para>
- <para>
- If you are embedding this layout within an SMTPAppender
- then make sure to set the <b>LocationInfo</b> option of that
- appender as well.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayoutSchemaLog4j.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)">
- <summary>
- Actually do the writing of the xml
- </summary>
- <param name="writer">the writer to use</param>
- <param name="loggingEvent">the event to write</param>
- <remarks>
- <para>
- Generate XML that is compatible with the log4j schema.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.XmlLayoutSchemaLog4j.Version">
- <summary>
- The version of the log4j schema to use.
- </summary>
- <remarks>
- <para>
- Only version 1.2 of the log4j schema is supported.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.ObjectRenderer.DefaultRenderer">
- <summary>
- The default object Renderer.
- </summary>
- <remarks>
- <para>
- The default renderer supports rendering objects and collections to strings.
- </para>
- <para>
- See the <see cref="M:log4net.ObjectRenderer.DefaultRenderer.RenderObject(log4net.ObjectRenderer.RendererMap,System.Object,System.IO.TextWriter)"/> method for details of the output.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.ObjectRenderer.IObjectRenderer">
- <summary>
- Implement this interface in order to render objects as strings
- </summary>
- <remarks>
- <para>
- Certain types require special case conversion to
- string form. This conversion is done by an object renderer.
- Object renderers implement the <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>
- interface.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.ObjectRenderer.IObjectRenderer.RenderObject(log4net.ObjectRenderer.RendererMap,System.Object,System.IO.TextWriter)">
- <summary>
- Render the object <paramref name="obj"/> to a string
- </summary>
- <param name="rendererMap">The map used to lookup renderers</param>
- <param name="obj">The object to render</param>
- <param name="writer">The writer to render to</param>
- <remarks>
- <para>
- Render the object <paramref name="obj"/> to a
- string.
- </para>
- <para>
- The <paramref name="rendererMap"/> parameter is
- provided to lookup and render other objects. This is
- very useful where <paramref name="obj"/> contains
- nested objects of unknown type. The <see cref="M:log4net.ObjectRenderer.RendererMap.FindAndRender(System.Object,System.IO.TextWriter)"/>
- method can be used to render these objects.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.DefaultRenderer.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.DefaultRenderer.RenderObject(log4net.ObjectRenderer.RendererMap,System.Object,System.IO.TextWriter)">
- <summary>
- Render the object <paramref name="obj"/> to a string
- </summary>
- <param name="rendererMap">The map used to lookup renderers</param>
- <param name="obj">The object to render</param>
- <param name="writer">The writer to render to</param>
- <remarks>
- <para>
- Render the object <paramref name="obj"/> to a string.
- </para>
- <para>
- The <paramref name="rendererMap"/> parameter is
- provided to lookup and render other objects. This is
- very useful where <paramref name="obj"/> contains
- nested objects of unknown type. The <see cref="M:log4net.ObjectRenderer.RendererMap.FindAndRender(System.Object)"/>
- method can be used to render these objects.
- </para>
- <para>
- The default renderer supports rendering objects to strings as follows:
- </para>
- <list type="table">
- <listheader>
- <term>Value</term>
- <description>Rendered String</description>
- </listheader>
- <item>
- <term><c>null</c></term>
- <description>
- <para>"(null)"</para>
- </description>
- </item>
- <item>
- <term><see cref="T:System.Array"/></term>
- <description>
- <para>
- For a one dimensional array this is the
- array type name, an open brace, followed by a comma
- separated list of the elements (using the appropriate
- renderer), followed by a close brace.
- </para>
- <para>
- For example: <c>int[] {1, 2, 3}</c>.
- </para>
- <para>
- If the array is not one dimensional the
- <c>Array.ToString()</c> is returned.
- </para>
- </description>
- </item>
- <item>
- <term><see cref="T:System.Collections.IEnumerable"/>, <see cref="T:System.Collections.ICollection"/> &amp; <see cref="T:System.Collections.IEnumerator"/></term>
- <description>
- <para>
- Rendered as an open brace, followed by a comma
- separated list of the elements (using the appropriate
- renderer), followed by a close brace.
- </para>
- <para>
- For example: <c>{a, b, c}</c>.
- </para>
- <para>
- All collection classes that implement <see cref="T:System.Collections.ICollection"/> its subclasses,
- or generic equivalents all implement the <see cref="T:System.Collections.IEnumerable"/> interface.
- </para>
- </description>
- </item>
- <item>
- <term><see cref="T:System.Collections.DictionaryEntry"/></term>
- <description>
- <para>
- Rendered as the key, an equals sign ('='), and the value (using the appropriate
- renderer).
- </para>
- <para>
- For example: <c>key=value</c>.
- </para>
- </description>
- </item>
- <item>
- <term>other</term>
- <description>
- <para><c>Object.ToString()</c></para>
- </description>
- </item>
- </list>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.DefaultRenderer.RenderArray(log4net.ObjectRenderer.RendererMap,System.Array,System.IO.TextWriter)">
- <summary>
- Render the array argument into a string
- </summary>
- <param name="rendererMap">The map used to lookup renderers</param>
- <param name="array">the array to render</param>
- <param name="writer">The writer to render to</param>
- <remarks>
- <para>
- For a one dimensional array this is the
- array type name, an open brace, followed by a comma
- separated list of the elements (using the appropriate
- renderer), followed by a close brace. For example:
- <c>int[] {1, 2, 3}</c>.
- </para>
- <para>
- If the array is not one dimensional the
- <c>Array.ToString()</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.DefaultRenderer.RenderEnumerator(log4net.ObjectRenderer.RendererMap,System.Collections.IEnumerator,System.IO.TextWriter)">
- <summary>
- Render the enumerator argument into a string
- </summary>
- <param name="rendererMap">The map used to lookup renderers</param>
- <param name="enumerator">the enumerator to render</param>
- <param name="writer">The writer to render to</param>
- <remarks>
- <para>
- Rendered as an open brace, followed by a comma
- separated list of the elements (using the appropriate
- renderer), followed by a close brace. For example:
- <c>{a, b, c}</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.DefaultRenderer.RenderDictionaryEntry(log4net.ObjectRenderer.RendererMap,System.Collections.DictionaryEntry,System.IO.TextWriter)">
- <summary>
- Render the DictionaryEntry argument into a string
- </summary>
- <param name="rendererMap">The map used to lookup renderers</param>
- <param name="entry">the DictionaryEntry to render</param>
- <param name="writer">The writer to render to</param>
- <remarks>
- <para>
- Render the key, an equals sign ('='), and the value (using the appropriate
- renderer). For example: <c>key=value</c>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.ObjectRenderer.RendererMap">
- <summary>
- Map class objects to an <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>.
- </summary>
- <remarks>
- <para>
- Maintains a mapping between types that require special
- rendering and the <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/> that
- is used to render them.
- </para>
- <para>
- The <see cref="M:log4net.ObjectRenderer.RendererMap.FindAndRender(System.Object)"/> method is used to render an
- <c>object</c> using the appropriate renderers defined in this map.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.#ctor">
- <summary>
- Default Constructor
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.FindAndRender(System.Object)">
- <summary>
- Render <paramref name="obj"/> using the appropriate renderer.
- </summary>
- <param name="obj">the object to render to a string</param>
- <returns>the object rendered as a string</returns>
- <remarks>
- <para>
- This is a convenience method used to render an object to a string.
- The alternative method <see cref="M:log4net.ObjectRenderer.RendererMap.FindAndRender(System.Object,System.IO.TextWriter)"/>
- should be used when streaming output to a <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.FindAndRender(System.Object,System.IO.TextWriter)">
- <summary>
- Render <paramref name="obj"/> using the appropriate renderer.
- </summary>
- <param name="obj">the object to render to a string</param>
- <param name="writer">The writer to render to</param>
- <remarks>
- <para>
- Find the appropriate renderer for the type of the
- <paramref name="obj"/> parameter. This is accomplished by calling the
- <see cref="M:log4net.ObjectRenderer.RendererMap.Get(System.Type)"/> method. Once a renderer is found, it is
- applied on the object <paramref name="obj"/> and the result is returned
- as a <see cref="T:System.String"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.Get(System.Object)">
- <summary>
- Gets the renderer for the specified object type
- </summary>
- <param name="obj">the object to lookup the renderer for</param>
- <returns>the renderer for <paramref name="obj"/></returns>
- <remarks>
- <param>
- Gets the renderer for the specified object type.
- </param>
- <param>
- Syntactic sugar method that calls <see cref="M:log4net.ObjectRenderer.RendererMap.Get(System.Type)"/>
- with the type of the object parameter.
- </param>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.Get(System.Type)">
- <summary>
- Gets the renderer for the specified type
- </summary>
- <param name="type">the type to lookup the renderer for</param>
- <returns>the renderer for the specified type</returns>
- <remarks>
- <para>
- Returns the renderer for the specified type.
- If no specific renderer has been defined the
- <see cref="P:log4net.ObjectRenderer.RendererMap.DefaultRenderer"/> will be returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.SearchTypeAndInterfaces(System.Type)">
- <summary>
- Internal function to recursively search interfaces
- </summary>
- <param name="type">the type to lookup the renderer for</param>
- <returns>the renderer for the specified type</returns>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.Clear">
- <summary>
- Clear the map of renderers
- </summary>
- <remarks>
- <para>
- Clear the custom renderers defined by using
- <see cref="M:log4net.ObjectRenderer.RendererMap.Put(System.Type,log4net.ObjectRenderer.IObjectRenderer)"/>. The <see cref="P:log4net.ObjectRenderer.RendererMap.DefaultRenderer"/>
- cannot be removed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.Put(System.Type,log4net.ObjectRenderer.IObjectRenderer)">
- <summary>
- Register an <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/> for <paramref name="typeToRender"/>.
- </summary>
- <param name="typeToRender">the type that will be rendered by <paramref name="renderer"/></param>
- <param name="renderer">the renderer for <paramref name="typeToRender"/></param>
- <remarks>
- <para>
- Register an object renderer for a specific source type.
- This renderer will be returned from a call to <see cref="M:log4net.ObjectRenderer.RendererMap.Get(System.Type)"/>
- specifying the same <paramref name="typeToRender"/> as an argument.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.ObjectRenderer.RendererMap.DefaultRenderer">
- <summary>
- Get the default renderer instance
- </summary>
- <value>the default renderer</value>
- <remarks>
- <para>
- Get the default renderer
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Plugin.IPlugin">
- <summary>
- Interface implemented by logger repository plugins.
- </summary>
- <remarks>
- <para>
- Plugins define additional behavior that can be associated
- with a <see cref="T:log4net.Repository.ILoggerRepository"/>.
- The <see cref="T:log4net.Plugin.PluginMap"/> held by the <see cref="P:log4net.Repository.ILoggerRepository.PluginMap"/>
- property is used to store the plugins for a repository.
- </para>
- <para>
- The <c>log4net.Config.PluginAttribute</c> can be used to
- attach plugins to repositories created using configuration
- attributes.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Plugin.IPlugin.Attach(log4net.Repository.ILoggerRepository)">
- <summary>
- Attaches the plugin to the specified <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </summary>
- <param name="repository">The <see cref="T:log4net.Repository.ILoggerRepository"/> that this plugin should be attached to.</param>
- <remarks>
- <para>
- A plugin may only be attached to a single repository.
- </para>
- <para>
- This method is called when the plugin is attached to the repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.IPlugin.Shutdown">
- <summary>
- Is called when the plugin is to shutdown.
- </summary>
- <remarks>
- <para>
- This method is called to notify the plugin that
- it should stop operating and should detach from
- the repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Plugin.IPlugin.Name">
- <summary>
- Gets the name of the plugin.
- </summary>
- <value>
- The name of the plugin.
- </value>
- <remarks>
- <para>
- Plugins are stored in the <see cref="T:log4net.Plugin.PluginMap"/>
- keyed by name. Each plugin instance attached to a
- repository must be a unique name.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Plugin.PluginCollection">
- <summary>
- A strongly-typed collection of <see cref="T:log4net.Plugin.IPlugin"/> objects.
- </summary>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.ReadOnly(log4net.Plugin.PluginCollection)">
- <summary>
- Creates a read-only wrapper for a <c>PluginCollection</c> instance.
- </summary>
- <param name="list">list to create a readonly wrapper arround</param>
- <returns>
- A <c>PluginCollection</c> wrapper that is read-only.
- </returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.#ctor">
- <summary>
- Initializes a new instance of the <c>PluginCollection</c> class
- that is empty and has the default initial capacity.
- </summary>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.#ctor(System.Int32)">
- <summary>
- Initializes a new instance of the <c>PluginCollection</c> class
- that has the specified initial capacity.
- </summary>
- <param name="capacity">
- The number of elements that the new <c>PluginCollection</c> is initially capable of storing.
- </param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.#ctor(log4net.Plugin.PluginCollection)">
- <summary>
- Initializes a new instance of the <c>PluginCollection</c> class
- that contains elements copied from the specified <c>PluginCollection</c>.
- </summary>
- <param name="c">The <c>PluginCollection</c> whose elements are copied to the new collection.</param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.#ctor(log4net.Plugin.IPlugin[])">
- <summary>
- Initializes a new instance of the <c>PluginCollection</c> class
- that contains elements copied from the specified <see cref="T:log4net.Plugin.IPlugin"/> array.
- </summary>
- <param name="a">The <see cref="T:log4net.Plugin.IPlugin"/> array whose elements are copied to the new list.</param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.#ctor(System.Collections.ICollection)">
- <summary>
- Initializes a new instance of the <c>PluginCollection</c> class
- that contains elements copied from the specified <see cref="T:log4net.Plugin.IPlugin"/> collection.
- </summary>
- <param name="col">The <see cref="T:log4net.Plugin.IPlugin"/> collection whose elements are copied to the new list.</param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.#ctor(log4net.Plugin.PluginCollection.Tag)">
- <summary>
- Allow subclasses to avoid our default constructors
- </summary>
- <param name="tag"></param>
- <exclude/>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.CopyTo(log4net.Plugin.IPlugin[])">
- <summary>
- Copies the entire <c>PluginCollection</c> to a one-dimensional
- <see cref="T:log4net.Plugin.IPlugin"/> array.
- </summary>
- <param name="array">The one-dimensional <see cref="T:log4net.Plugin.IPlugin"/> array to copy to.</param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.CopyTo(log4net.Plugin.IPlugin[],System.Int32)">
- <summary>
- Copies the entire <c>PluginCollection</c> to a one-dimensional
- <see cref="T:log4net.Plugin.IPlugin"/> array, starting at the specified index of the target array.
- </summary>
- <param name="array">The one-dimensional <see cref="T:log4net.Plugin.IPlugin"/> array to copy to.</param>
- <param name="start">The zero-based index in <paramref name="array"/> at which copying begins.</param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Add(log4net.Plugin.IPlugin)">
- <summary>
- Adds a <see cref="T:log4net.Plugin.IPlugin"/> to the end of the <c>PluginCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Plugin.IPlugin"/> to be added to the end of the <c>PluginCollection</c>.</param>
- <returns>The index at which the value has been added.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Clear">
- <summary>
- Removes all elements from the <c>PluginCollection</c>.
- </summary>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Clone">
- <summary>
- Creates a shallow copy of the <see cref="T:log4net.Plugin.PluginCollection"/>.
- </summary>
- <returns>A new <see cref="T:log4net.Plugin.PluginCollection"/> with a shallow copy of the collection data.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Contains(log4net.Plugin.IPlugin)">
- <summary>
- Determines whether a given <see cref="T:log4net.Plugin.IPlugin"/> is in the <c>PluginCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Plugin.IPlugin"/> to check for.</param>
- <returns><c>true</c> if <paramref name="item"/> is found in the <c>PluginCollection</c>; otherwise, <c>false</c>.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.IndexOf(log4net.Plugin.IPlugin)">
- <summary>
- Returns the zero-based index of the first occurrence of a <see cref="T:log4net.Plugin.IPlugin"/>
- in the <c>PluginCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Plugin.IPlugin"/> to locate in the <c>PluginCollection</c>.</param>
- <returns>
- The zero-based index of the first occurrence of <paramref name="item"/>
- in the entire <c>PluginCollection</c>, if found; otherwise, -1.
- </returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Insert(System.Int32,log4net.Plugin.IPlugin)">
- <summary>
- Inserts an element into the <c>PluginCollection</c> at the specified index.
- </summary>
- <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
- <param name="item">The <see cref="T:log4net.Plugin.IPlugin"/> to insert.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Plugin.PluginCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Remove(log4net.Plugin.IPlugin)">
- <summary>
- Removes the first occurrence of a specific <see cref="T:log4net.Plugin.IPlugin"/> from the <c>PluginCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Plugin.IPlugin"/> to remove from the <c>PluginCollection</c>.</param>
- <exception cref="T:System.ArgumentException">
- The specified <see cref="T:log4net.Plugin.IPlugin"/> was not found in the <c>PluginCollection</c>.
- </exception>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.RemoveAt(System.Int32)">
- <summary>
- Removes the element at the specified index of the <c>PluginCollection</c>.
- </summary>
- <param name="index">The zero-based index of the element to remove.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero.</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Plugin.PluginCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.GetEnumerator">
- <summary>
- Returns an enumerator that can iterate through the <c>PluginCollection</c>.
- </summary>
- <returns>An <see cref="T:log4net.Plugin.PluginCollection.Enumerator"/> for the entire <c>PluginCollection</c>.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.AddRange(log4net.Plugin.PluginCollection)">
- <summary>
- Adds the elements of another <c>PluginCollection</c> to the current <c>PluginCollection</c>.
- </summary>
- <param name="x">The <c>PluginCollection</c> whose elements should be added to the end of the current <c>PluginCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Plugin.PluginCollection.Count"/> of the <c>PluginCollection</c>.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.AddRange(log4net.Plugin.IPlugin[])">
- <summary>
- Adds the elements of a <see cref="T:log4net.Plugin.IPlugin"/> array to the current <c>PluginCollection</c>.
- </summary>
- <param name="x">The <see cref="T:log4net.Plugin.IPlugin"/> array whose elements should be added to the end of the <c>PluginCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Plugin.PluginCollection.Count"/> of the <c>PluginCollection</c>.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.AddRange(System.Collections.ICollection)">
- <summary>
- Adds the elements of a <see cref="T:log4net.Plugin.IPlugin"/> collection to the current <c>PluginCollection</c>.
- </summary>
- <param name="col">The <see cref="T:log4net.Plugin.IPlugin"/> collection whose elements should be added to the end of the <c>PluginCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Plugin.PluginCollection.Count"/> of the <c>PluginCollection</c>.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.TrimToSize">
- <summary>
- Sets the capacity to the actual number of elements.
- </summary>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.ValidateIndex(System.Int32)">
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero.</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Plugin.PluginCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.ValidateIndex(System.Int32,System.Boolean)">
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero.</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Plugin.PluginCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.Count">
- <summary>
- Gets the number of elements actually contained in the <c>PluginCollection</c>.
- </summary>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.IsSynchronized">
- <summary>
- Gets a value indicating whether access to the collection is synchronized (thread-safe).
- </summary>
- <returns>true if access to the ICollection is synchronized (thread-safe); otherwise, false.</returns>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.SyncRoot">
- <summary>
- Gets an object that can be used to synchronize access to the collection.
- </summary>
- <value>
- An object that can be used to synchronize access to the collection.
- </value>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.Item(System.Int32)">
- <summary>
- Gets or sets the <see cref="T:log4net.Plugin.IPlugin"/> at the specified index.
- </summary>
- <value>
- The <see cref="T:log4net.Plugin.IPlugin"/> at the specified index.
- </value>
- <param name="index">The zero-based index of the element to get or set.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero.</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Plugin.PluginCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.IsFixedSize">
- <summary>
- Gets a value indicating whether the collection has a fixed size.
- </summary>
- <value><c>true</c> if the collection has a fixed size; otherwise, <c>false</c>. The default is <c>false</c>.</value>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.IsReadOnly">
- <summary>
- Gets a value indicating whether the IList is read-only.
- </summary>
- <value><c>true</c> if the collection is read-only; otherwise, <c>false</c>. The default is <c>false</c>.</value>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.Capacity">
- <summary>
- Gets or sets the number of elements the <c>PluginCollection</c> can contain.
- </summary>
- <value>
- The number of elements the <c>PluginCollection</c> can contain.
- </value>
- </member>
- <member name="T:log4net.Plugin.PluginCollection.IPluginCollectionEnumerator">
- <summary>
- Supports type-safe iteration over a <see cref="T:log4net.Plugin.PluginCollection"/>.
- </summary>
- <exclude/>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.IPluginCollectionEnumerator.MoveNext">
- <summary>
- Advances the enumerator to the next element in the collection.
- </summary>
- <returns>
- <c>true</c> if the enumerator was successfully advanced to the next element;
- <c>false</c> if the enumerator has passed the end of the collection.
- </returns>
- <exception cref="T:System.InvalidOperationException">
- The collection was modified after the enumerator was created.
- </exception>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.IPluginCollectionEnumerator.Reset">
- <summary>
- Sets the enumerator to its initial position, before the first element in the collection.
- </summary>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.IPluginCollectionEnumerator.Current">
- <summary>
- Gets the current element in the collection.
- </summary>
- </member>
- <member name="T:log4net.Plugin.PluginCollection.Tag">
- <summary>
- Type visible only to our subclasses
- Used to access protected constructor
- </summary>
- <exclude/>
- </member>
- <member name="F:log4net.Plugin.PluginCollection.Tag.Default">
- <summary>
- A value
- </summary>
- </member>
- <member name="T:log4net.Plugin.PluginCollection.Enumerator">
- <summary>
- Supports simple iteration over a <see cref="T:log4net.Plugin.PluginCollection"/>.
- </summary>
- <exclude/>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Enumerator.#ctor(log4net.Plugin.PluginCollection)">
- <summary>
- Initializes a new instance of the <c>Enumerator</c> class.
- </summary>
- <param name="tc"></param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Enumerator.MoveNext">
- <summary>
- Advances the enumerator to the next element in the collection.
- </summary>
- <returns>
- <c>true</c> if the enumerator was successfully advanced to the next element;
- <c>false</c> if the enumerator has passed the end of the collection.
- </returns>
- <exception cref="T:System.InvalidOperationException">
- The collection was modified after the enumerator was created.
- </exception>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Enumerator.Reset">
- <summary>
- Sets the enumerator to its initial position, before the first element in the collection.
- </summary>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.Enumerator.Current">
- <summary>
- Gets the current element in the collection.
- </summary>
- <value>
- The current element in the collection.
- </value>
- </member>
- <member name="T:log4net.Plugin.PluginCollection.ReadOnlyPluginCollection">
- <exclude/>
- </member>
- <member name="T:log4net.Plugin.PluginMap">
- <summary>
- Map of repository plugins.
- </summary>
- <remarks>
- <para>
- This class is a name keyed map of the plugins that are
- attached to a repository.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Plugin.PluginMap.#ctor(log4net.Repository.ILoggerRepository)">
- <summary>
- Constructor
- </summary>
- <param name="repository">The repository that the plugins should be attached to.</param>
- <remarks>
- <para>
- Initialize a new instance of the <see cref="T:log4net.Plugin.PluginMap"/> class with a
- repository that the plugins should be attached to.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.PluginMap.Add(log4net.Plugin.IPlugin)">
- <summary>
- Adds a <see cref="T:log4net.Plugin.IPlugin"/> to the map.
- </summary>
- <param name="plugin">The <see cref="T:log4net.Plugin.IPlugin"/> to add to the map.</param>
- <remarks>
- <para>
- The <see cref="T:log4net.Plugin.IPlugin"/> will be attached to the repository when added.
- </para>
- <para>
- If there already exists a plugin with the same name
- attached to the repository then the old plugin will
- be <see cref="M:log4net.Plugin.IPlugin.Shutdown"/> and replaced with
- the new plugin.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.PluginMap.Remove(log4net.Plugin.IPlugin)">
- <summary>
- Removes a <see cref="T:log4net.Plugin.IPlugin"/> from the map.
- </summary>
- <param name="plugin">The <see cref="T:log4net.Plugin.IPlugin"/> to remove from the map.</param>
- <remarks>
- <para>
- Remove a specific plugin from this map.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Plugin.PluginMap.Item(System.String)">
- <summary>
- Gets a <see cref="T:log4net.Plugin.IPlugin"/> by name.
- </summary>
- <param name="name">The name of the <see cref="T:log4net.Plugin.IPlugin"/> to lookup.</param>
- <returns>
- The <see cref="T:log4net.Plugin.IPlugin"/> from the map with the name specified, or
- <c>null</c> if no plugin is found.
- </returns>
- <remarks>
- <para>
- Lookup a plugin by name. If the plugin is not found <c>null</c>
- will be returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Plugin.PluginMap.AllPlugins">
- <summary>
- Gets all possible plugins as a list of <see cref="T:log4net.Plugin.IPlugin"/> objects.
- </summary>
- <value>All possible plugins as a list of <see cref="T:log4net.Plugin.IPlugin"/> objects.</value>
- <remarks>
- <para>
- Get a collection of all the plugins defined in this map.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Plugin.PluginSkeleton">
- <summary>
- Base implementation of <see cref="T:log4net.Plugin.IPlugin"/>
- </summary>
- <remarks>
- <para>
- Default abstract implementation of the <see cref="T:log4net.Plugin.IPlugin"/>
- interface. This base class can be used by implementors
- of the <see cref="T:log4net.Plugin.IPlugin"/> interface.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Plugin.PluginSkeleton.#ctor(System.String)">
- <summary>
- Constructor
- </summary>
- <param name="name">the name of the plugin</param>
- <remarks>
- Initializes a new Plugin with the specified name.
- </remarks>
- </member>
- <member name="M:log4net.Plugin.PluginSkeleton.Attach(log4net.Repository.ILoggerRepository)">
- <summary>
- Attaches this plugin to a <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </summary>
- <param name="repository">The <see cref="T:log4net.Repository.ILoggerRepository"/> that this plugin should be attached to.</param>
- <remarks>
- <para>
- A plugin may only be attached to a single repository.
- </para>
- <para>
- This method is called when the plugin is attached to the repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.PluginSkeleton.Shutdown">
- <summary>
- Is called when the plugin is to shutdown.
- </summary>
- <remarks>
- <para>
- This method is called to notify the plugin that
- it should stop operating and should detach from
- the repository.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Plugin.PluginSkeleton.m_name">
- <summary>
- The name of this plugin.
- </summary>
- </member>
- <member name="F:log4net.Plugin.PluginSkeleton.m_repository">
- <summary>
- The repository this plugin is attached to.
- </summary>
- </member>
- <member name="P:log4net.Plugin.PluginSkeleton.Name">
- <summary>
- Gets or sets the name of the plugin.
- </summary>
- <value>
- The name of the plugin.
- </value>
- <remarks>
- <para>
- Plugins are stored in the <see cref="T:log4net.Plugin.PluginMap"/>
- keyed by name. Each plugin instance attached to a
- repository must be a unique name.
- </para>
- <para>
- The name of the plugin must not change one the
- plugin has been attached to a repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Plugin.PluginSkeleton.LoggerRepository">
- <summary>
- The repository for this plugin
- </summary>
- <value>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that this plugin is attached to.
- </value>
- <remarks>
- <para>
- Gets or sets the <see cref="T:log4net.Repository.ILoggerRepository"/> that this plugin is
- attached to.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Plugin.RemoteLoggingServerPlugin">
- <summary>
- Plugin that listens for events from the <see cref="T:log4net.Appender.RemotingAppender"/>
- </summary>
- <remarks>
- <para>
- This plugin publishes an instance of <see cref="T:log4net.Appender.RemotingAppender.IRemoteLoggingSink"/>
- on a specified <see cref="P:log4net.Plugin.RemoteLoggingServerPlugin.SinkUri"/>. This listens for logging events delivered from
- a remote <see cref="T:log4net.Appender.RemotingAppender"/>.
- </para>
- <para>
- When an event is received it is relogged within the attached repository
- as if it had been raised locally.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Plugin.RemoteLoggingServerPlugin"/> class.
- </para>
- <para>
- The <see cref="P:log4net.Plugin.RemoteLoggingServerPlugin.SinkUri"/> property must be set.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.#ctor(System.String)">
- <summary>
- Construct with sink Uri.
- </summary>
- <param name="sinkUri">The name to publish the sink under in the remoting infrastructure.
- See <see cref="P:log4net.Plugin.RemoteLoggingServerPlugin.SinkUri"/> for more details.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Plugin.RemoteLoggingServerPlugin"/> class
- with specified name.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.Attach(log4net.Repository.ILoggerRepository)">
- <summary>
- Attaches this plugin to a <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </summary>
- <param name="repository">The <see cref="T:log4net.Repository.ILoggerRepository"/> that this plugin should be attached to.</param>
- <remarks>
- <para>
- A plugin may only be attached to a single repository.
- </para>
- <para>
- This method is called when the plugin is attached to the repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.Shutdown">
- <summary>
- Is called when the plugin is to shutdown.
- </summary>
- <remarks>
- <para>
- When the plugin is shutdown the remote logging
- sink is disconnected.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Plugin.RemoteLoggingServerPlugin.SinkUri">
- <summary>
- Gets or sets the URI of this sink.
- </summary>
- <value>
- The URI of this sink.
- </value>
- <remarks>
- <para>
- This is the name under which the object is marshaled.
- <see cref="M:System.Runtime.Remoting.RemotingServices.Marshal(System.MarshalByRefObject,System.String,System.Type)"/>
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Plugin.RemoteLoggingServerPlugin.RemoteLoggingSinkImpl">
- <summary>
- Delivers <see cref="T:log4net.Core.LoggingEvent"/> objects to a remote sink.
- </summary>
- <remarks>
- <para>
- Internal class used to listen for logging events
- and deliver them to the local repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.RemoteLoggingSinkImpl.#ctor(log4net.Repository.ILoggerRepository)">
- <summary>
- Constructor
- </summary>
- <param name="repository">The repository to log to.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Plugin.RemoteLoggingServerPlugin.RemoteLoggingSinkImpl"/> for the
- specified <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.RemoteLoggingSinkImpl.LogEvents(log4net.Core.LoggingEvent[])">
- <summary>
- Logs the events to the repository.
- </summary>
- <param name="events">The events to log.</param>
- <remarks>
- <para>
- The events passed are logged to the <see cref="T:log4net.Repository.ILoggerRepository"/>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.RemoteLoggingSinkImpl.InitializeLifetimeService">
- <summary>
- Obtains a lifetime service object to control the lifetime
- policy for this instance.
- </summary>
- <returns><c>null</c> to indicate that this instance should live forever.</returns>
- <remarks>
- <para>
- Obtains a lifetime service object to control the lifetime
- policy for this instance. This object should live forever
- therefore this implementation returns <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Plugin.RemoteLoggingServerPlugin.RemoteLoggingSinkImpl.m_repository">
- <summary>
- The underlying <see cref="T:log4net.Repository.ILoggerRepository"/> that events should
- be logged to.
- </summary>
- </member>
- <member name="T:log4net.Repository.Hierarchy.DefaultLoggerFactory">
- <summary>
- Default implementation of <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/>
- </summary>
- <remarks>
- <para>
- This default implementation of the <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/>
- interface is used to create the default subclass
- of the <see cref="T:log4net.Repository.Hierarchy.Logger"/> object.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Repository.Hierarchy.ILoggerFactory">
- <summary>
- Interface abstracts creation of <see cref="T:log4net.Repository.Hierarchy.Logger"/> instances
- </summary>
- <remarks>
- <para>
- This interface is used by the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> to
- create new <see cref="T:log4net.Repository.Hierarchy.Logger"/> objects.
- </para>
- <para>
- The <see cref="M:log4net.Repository.Hierarchy.ILoggerFactory.CreateLogger(System.String)"/> method is called
- to create a named <see cref="T:log4net.Repository.Hierarchy.Logger"/>.
- </para>
- <para>
- Implement this interface to create new subclasses of <see cref="T:log4net.Repository.Hierarchy.Logger"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.Hierarchy.ILoggerFactory.CreateLogger(System.String)">
- <summary>
- Create a new <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance
- </summary>
- <param name="name">The name of the <see cref="T:log4net.Repository.Hierarchy.Logger"/>.</param>
- <returns>The <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance for the specified name.</returns>
- <remarks>
- <para>
- Create a new <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance with the
- specified name.
- </para>
- <para>
- Called by the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> to create
- new named <see cref="T:log4net.Repository.Hierarchy.Logger"/> instances.
- </para>
- <para>
- If the <paramref name="name"/> is <c>null</c> then the root logger
- must be returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.DefaultLoggerFactory.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.DefaultLoggerFactory"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.DefaultLoggerFactory.CreateLogger(System.String)">
- <summary>
- Create a new <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance
- </summary>
- <param name="name">The name of the <see cref="T:log4net.Repository.Hierarchy.Logger"/>.</param>
- <returns>The <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance for the specified name.</returns>
- <remarks>
- <para>
- Create a new <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance with the
- specified name.
- </para>
- <para>
- Called by the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> to create
- new named <see cref="T:log4net.Repository.Hierarchy.Logger"/> instances.
- </para>
- <para>
- If the <paramref name="name"/> is <c>null</c> then the root logger
- must be returned.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.DefaultLoggerFactory.LoggerImpl">
- <summary>
- Default internal subclass of <see cref="T:log4net.Repository.Hierarchy.Logger"/>
- </summary>
- <remarks>
- <para>
- This subclass has no additional behavior over the
- <see cref="T:log4net.Repository.Hierarchy.Logger"/> class but does allow instances
- to be created.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.Logger">
- <summary>
- Implementation of <see cref="T:log4net.Core.ILogger"/> used by <see cref="P:log4net.Repository.Hierarchy.Logger.Hierarchy"/>
- </summary>
- <remarks>
- <para>
- Internal class used to provide implementation of <see cref="T:log4net.Core.ILogger"/>
- interface. Applications should use <see cref="T:log4net.LogManager"/> to get
- logger instances.
- </para>
- <para>
- This is one of the central classes in the log4net implementation. One of the
- distinctive features of log4net are hierarchical loggers and their
- evaluation. The <see cref="P:log4net.Repository.Hierarchy.Logger.Hierarchy"/> organizes the <see cref="T:log4net.Repository.Hierarchy.Logger"/>
- instances into a rooted tree hierarchy.
- </para>
- <para>
- The <see cref="T:log4net.Repository.Hierarchy.Logger"/> class is abstract. Only concrete subclasses of
- <see cref="T:log4net.Repository.Hierarchy.Logger"/> can be created. The <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/>
- is used to create instances of this type for the <see cref="P:log4net.Repository.Hierarchy.Logger.Hierarchy"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Aspi Havewala</author>
- <author>Douglas de la Torre</author>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.#ctor(System.String)">
- <summary>
- This constructor created a new <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance and
- sets its name.
- </summary>
- <param name="name">The name of the <see cref="T:log4net.Repository.Hierarchy.Logger"/>.</param>
- <remarks>
- <para>
- This constructor is protected and designed to be used by
- a subclass that is not abstract.
- </para>
- <para>
- Loggers are constructed by <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/>
- objects. See <see cref="T:log4net.Repository.Hierarchy.DefaultLoggerFactory"/> for the default
- logger creator.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.AddAppender(log4net.Appender.IAppender)">
- <summary>
- Add <paramref name="newAppender"/> to the list of appenders of this
- Logger instance.
- </summary>
- <param name="newAppender">An appender to add to this logger</param>
- <remarks>
- <para>
- Add <paramref name="newAppender"/> to the list of appenders of this
- Logger instance.
- </para>
- <para>
- If <paramref name="newAppender"/> is already in the list of
- appenders, then it won't be added again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.GetAppender(System.String)">
- <summary>
- Look for the appender named as <c>name</c>
- </summary>
- <param name="name">The name of the appender to lookup</param>
- <returns>The appender with the name specified, or <c>null</c>.</returns>
- <remarks>
- <para>
- Returns the named appender, or null if the appender is not found.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.RemoveAllAppenders">
- <summary>
- Remove all previously added appenders from this Logger instance.
- </summary>
- <remarks>
- <para>
- Remove all previously added appenders from this Logger instance.
- </para>
- <para>
- This is useful when re-reading configuration information.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.RemoveAppender(log4net.Appender.IAppender)">
- <summary>
- Remove the appender passed as parameter form the list of appenders.
- </summary>
- <param name="appender">The appender to remove</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- <para>
- Remove the appender passed as parameter form the list of appenders.
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.RemoveAppender(System.String)">
- <summary>
- Remove the appender passed as parameter form the list of appenders.
- </summary>
- <param name="name">The name of the appender to remove</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- <para>
- Remove the named appender passed as parameter form the list of appenders.
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.Log(System.Type,log4net.Core.Level,System.Object,System.Exception)">
- <summary>
- This generic form is intended to be used by wrappers.
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <param name="level">The level of the message to be logged.</param>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Generate a logging event for the specified <paramref name="level"/> using
- the <paramref name="message"/> and <paramref name="exception"/>.
- </para>
- <para>
- This method must not throw any exception to the caller.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.Log(log4net.Core.LoggingEvent)">
- <summary>
- This is the most generic printing method that is intended to be used
- by wrappers.
- </summary>
- <param name="logEvent">The event being logged.</param>
- <remarks>
- <para>
- Logs the specified logging event through this logger.
- </para>
- <para>
- This method must not throw any exception to the caller.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.IsEnabledFor(log4net.Core.Level)">
- <summary>
- Checks if this logger is enabled for a given <see cref="P:log4net.Repository.Hierarchy.Logger.Level"/> passed as parameter.
- </summary>
- <param name="level">The level to check.</param>
- <returns>
- <c>true</c> if this logger is enabled for <c>level</c>, otherwise <c>false</c>.
- </returns>
- <remarks>
- <para>
- Test if this logger is going to log events of the specified <paramref name="level"/>.
- </para>
- <para>
- This method must not throw any exception to the caller.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.CallAppenders(log4net.Core.LoggingEvent)">
- <summary>
- Deliver the <see cref="T:log4net.Core.LoggingEvent"/> to the attached appenders.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Call the appenders in the hierarchy starting at
- <c>this</c>. If no appenders could be found, emit a
- warning.
- </para>
- <para>
- This method calls all the appenders inherited from the
- hierarchy circumventing any evaluation of whether to log or not
- to log the particular log request.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.CloseNestedAppenders">
- <summary>
- Closes all attached appenders implementing the <see cref="T:log4net.Core.IAppenderAttachable"/> interface.
- </summary>
- <remarks>
- <para>
- Used to ensure that the appenders are correctly shutdown.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.Log(log4net.Core.Level,System.Object,System.Exception)">
- <summary>
- This is the most generic printing method. This generic form is intended to be used by wrappers
- </summary>
- <param name="level">The level of the message to be logged.</param>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Generate a logging event for the specified <paramref name="level"/> using
- the <paramref name="message"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.ForcedLog(System.Type,log4net.Core.Level,System.Object,System.Exception)">
- <summary>
- Creates a new logging event and logs the event without further checks.
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <param name="level">The level of the message to be logged.</param>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Generates a logging event and delivers it to the attached
- appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.ForcedLog(log4net.Core.LoggingEvent)">
- <summary>
- Creates a new logging event and logs the event without further checks.
- </summary>
- <param name="logEvent">The event being logged.</param>
- <remarks>
- <para>
- Delivers the logging event to the attached appenders.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.ThisDeclaringType">
- <summary>
- The fully qualified type of the Logger class.
- </summary>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_name">
- <summary>
- The name of this logger.
- </summary>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_level">
- <summary>
- The assigned level of this logger.
- </summary>
- <remarks>
- <para>
- The <c>level</c> variable need not be
- assigned a value in which case it is inherited
- form the hierarchy.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_parent">
- <summary>
- The parent of this logger.
- </summary>
- <remarks>
- <para>
- The parent of this logger.
- All loggers have at least one ancestor which is the root logger.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_hierarchy">
- <summary>
- Loggers need to know what Hierarchy they are in.
- </summary>
- <remarks>
- <para>
- Loggers need to know what Hierarchy they are in.
- The hierarchy that this logger is a member of is stored
- here.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_appenderAttachedImpl">
- <summary>
- Helper implementation of the <see cref="T:log4net.Core.IAppenderAttachable"/> interface
- </summary>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_additive">
- <summary>
- Flag indicating if child loggers inherit their parents appenders
- </summary>
- <remarks>
- <para>
- Additivity is set to true by default, that is children inherit
- the appenders of their ancestors by default. If this variable is
- set to <c>false</c> then the appenders found in the
- ancestors of this logger are not used. However, the children
- of this logger will inherit its appenders, unless the children
- have their additivity flag set to <c>false</c> too. See
- the user manual for more details.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_appenderLock">
- <summary>
- Lock to protect AppenderAttachedImpl variable m_appenderAttachedImpl
- </summary>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Parent">
- <summary>
- Gets or sets the parent logger in the hierarchy.
- </summary>
- <value>
- The parent logger in the hierarchy.
- </value>
- <remarks>
- <para>
- Part of the Composite pattern that makes the hierarchy.
- The hierarchy is parent linked rather than child linked.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Additivity">
- <summary>
- Gets or sets a value indicating if child loggers inherit their parent's appenders.
- </summary>
- <value>
- <c>true</c> if child loggers inherit their parent's appenders.
- </value>
- <remarks>
- <para>
- Additivity is set to <c>true</c> by default, that is children inherit
- the appenders of their ancestors by default. If this variable is
- set to <c>false</c> then the appenders found in the
- ancestors of this logger are not used. However, the children
- of this logger will inherit its appenders, unless the children
- have their additivity flag set to <c>false</c> too. See
- the user manual for more details.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.EffectiveLevel">
- <summary>
- Gets the effective level for this logger.
- </summary>
- <returns>The nearest level in the logger hierarchy.</returns>
- <remarks>
- <para>
- Starting from this logger, searches the logger hierarchy for a
- non-null level and returns it. Otherwise, returns the level of the
- root logger.
- </para>
- <para>The Logger class is designed so that this method executes as
- quickly as possible.</para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Hierarchy">
- <summary>
- Gets or sets the <see cref="P:log4net.Repository.Hierarchy.Logger.Hierarchy"/> where this
- <c>Logger</c> instance is attached to.
- </summary>
- <value>The hierarchy that this logger belongs to.</value>
- <remarks>
- <para>
- This logger must be attached to a single <see cref="P:log4net.Repository.Hierarchy.Logger.Hierarchy"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Level">
- <summary>
- Gets or sets the assigned <see cref="P:log4net.Repository.Hierarchy.Logger.Level"/>, if any, for this Logger.
- </summary>
- <value>
- The <see cref="P:log4net.Repository.Hierarchy.Logger.Level"/> of this logger.
- </value>
- <remarks>
- <para>
- The assigned <see cref="P:log4net.Repository.Hierarchy.Logger.Level"/> can be <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Appenders">
- <summary>
- Get the appenders contained in this logger as an
- <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <returns>A collection of the appenders in this logger</returns>
- <remarks>
- <para>
- Get the appenders contained in this logger as an
- <see cref="T:System.Collections.ICollection"/>. If no appenders
- can be found, then a <see cref="T:log4net.Util.EmptyCollection"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Name">
- <summary>
- Gets the logger name.
- </summary>
- <value>
- The name of the logger.
- </value>
- <remarks>
- <para>
- The name of this logger
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Repository">
- <summary>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> where this
- <c>Logger</c> instance is attached to.
- </summary>
- <value>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that this logger belongs to.
- </value>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> where this
- <c>Logger</c> instance is attached to.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.DefaultLoggerFactory.LoggerImpl.#ctor(System.String)">
- <summary>
- Construct a new Logger
- </summary>
- <param name="name">the name of the logger</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.DefaultLoggerFactory.LoggerImpl"/> class
- with the specified name.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.LoggerCreationEventHandler">
- <summary>
- Delegate used to handle logger creation event notifications.
- </summary>
- <param name="sender">The <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> in which the <see cref="T:log4net.Repository.Hierarchy.Logger"/> has been created.</param>
- <param name="e">The <see cref="T:log4net.Repository.Hierarchy.LoggerCreationEventArgs"/> event args that hold the <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance that has been created.</param>
- <remarks>
- <para>
- Delegate used to handle logger creation event notifications.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.LoggerCreationEventArgs">
- <summary>
- Provides data for the <see cref="E:log4net.Repository.Hierarchy.Hierarchy.LoggerCreatedEvent"/> event.
- </summary>
- <remarks>
- <para>
- A <see cref="E:log4net.Repository.Hierarchy.Hierarchy.LoggerCreatedEvent"/> event is raised every time a
- <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/> is created.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.LoggerCreationEventArgs.m_log">
- <summary>
- The <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/> created
- </summary>
- </member>
- <member name="M:log4net.Repository.Hierarchy.LoggerCreationEventArgs.#ctor(log4net.Repository.Hierarchy.Logger)">
- <summary>
- Constructor
- </summary>
- <param name="log">The <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/> that has been created.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.LoggerCreationEventArgs"/> event argument
- class,with the specified <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger">
- <summary>
- Gets the <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/> that has been created.
- </summary>
- <value>
- The <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/> that has been created.
- </value>
- <remarks>
- <para>
- The <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/> that has been created.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.Hierarchy">
- <summary>
- Hierarchical organization of loggers
- </summary>
- <remarks>
- <para>
- <i>The casual user should not have to deal with this class
- directly.</i>
- </para>
- <para>
- This class is specialized in retrieving loggers by name and
- also maintaining the logger hierarchy. Implements the
- <see cref="T:log4net.Repository.ILoggerRepository"/> interface.
- </para>
- <para>
- The structure of the logger hierarchy is maintained by the
- <see cref="M:log4net.Repository.Hierarchy.Hierarchy.GetLogger(System.String)"/> method. The hierarchy is such that children
- link to their parent but parents do not have any references to their
- children. Moreover, loggers can be instantiated in any order, in
- particular descendant before ancestor.
- </para>
- <para>
- In case a descendant is created before a particular ancestor,
- then it creates a provision node for the ancestor and adds itself
- to the provision node. Other descendants of the same ancestor add
- themselves to the previously created provision node.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Repository.LoggerRepositorySkeleton">
- <summary>
- Base implementation of <see cref="T:log4net.Repository.ILoggerRepository"/>
- </summary>
- <remarks>
- <para>
- Default abstract implementation of the <see cref="T:log4net.Repository.ILoggerRepository"/> interface.
- </para>
- <para>
- Skeleton implementation of the <see cref="T:log4net.Repository.ILoggerRepository"/> interface.
- All <see cref="T:log4net.Repository.ILoggerRepository"/> types can extend this type.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Repository.ILoggerRepository">
- <summary>
- Interface implemented by logger repositories.
- </summary>
- <remarks>
- <para>
- This interface is implemented by logger repositories. e.g.
- <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>.
- </para>
- <para>
- This interface is used by the <see cref="T:log4net.LogManager"/>
- to obtain <see cref="T:log4net.ILog"/> interfaces.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.Exists(System.String)">
- <summary>
- Check if the named logger exists in the repository. If so return
- its reference, otherwise returns <c>null</c>.
- </summary>
- <param name="name">The name of the logger to lookup</param>
- <returns>The Logger object with the name specified</returns>
- <remarks>
- <para>
- If the names logger exists it is returned, otherwise
- <c>null</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.GetCurrentLoggers">
- <summary>
- Returns all the currently defined loggers as an Array.
- </summary>
- <returns>All the defined loggers</returns>
- <remarks>
- <para>
- Returns all the currently defined loggers as an Array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.GetLogger(System.String)">
- <summary>
- Returns a named logger instance
- </summary>
- <param name="name">The name of the logger to retrieve</param>
- <returns>The logger object with the name specified</returns>
- <remarks>
- <para>
- Returns a named logger instance.
- </para>
- <para>
- If a logger of that name already exists, then it will be
- returned. Otherwise, a new logger will be instantiated and
- then linked with its existing ancestors as well as children.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.Shutdown">
- <summary>Shutdown the repository</summary>
- <remarks>
- <para>
- Shutting down a repository will <i>safely</i> close and remove
- all appenders in all loggers including the root logger.
- </para>
- <para>
- Some appenders need to be closed before the
- application exists. Otherwise, pending logging events might be
- lost.
- </para>
- <para>
- The <see cref="M:log4net.Repository.ILoggerRepository.Shutdown"/> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.ResetConfiguration">
- <summary>
- Reset the repositories configuration to a default state
- </summary>
- <remarks>
- <para>
- Reset all values contained in this instance to their
- default state.
- </para>
- <para>
- Existing loggers are not removed. They are just reset.
- </para>
- <para>
- This method should be used sparingly and with care as it will
- block all logging until it is completed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.Log(log4net.Core.LoggingEvent)">
- <summary>
- Log the <see cref="T:log4net.Core.LoggingEvent"/> through this repository.
- </summary>
- <param name="logEvent">the event to log</param>
- <remarks>
- <para>
- This method should not normally be used to log.
- The <see cref="T:log4net.ILog"/> interface should be used
- for routine logging. This interface can be obtained
- using the <see cref="M:log4net.LogManager.GetLogger(System.String)"/> method.
- </para>
- <para>
- The <c>logEvent</c> is delivered to the appropriate logger and
- that logger is then responsible for logging the event.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.GetAppenders">
- <summary>
- Returns all the Appenders that are configured as an Array.
- </summary>
- <returns>All the Appenders</returns>
- <remarks>
- <para>
- Returns all the Appenders that are configured as an Array.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.Name">
- <summary>
- The name of the repository
- </summary>
- <value>
- The name of the repository
- </value>
- <remarks>
- <para>
- The name of the repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.RendererMap">
- <summary>
- RendererMap accesses the object renderer map for this repository.
- </summary>
- <value>
- RendererMap accesses the object renderer map for this repository.
- </value>
- <remarks>
- <para>
- RendererMap accesses the object renderer map for this repository.
- </para>
- <para>
- The RendererMap holds a mapping between types and
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/> objects.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.PluginMap">
- <summary>
- The plugin map for this repository.
- </summary>
- <value>
- The plugin map for this repository.
- </value>
- <remarks>
- <para>
- The plugin map holds the <see cref="T:log4net.Plugin.IPlugin"/> instances
- that have been attached to this repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.LevelMap">
- <summary>
- Get the level map for the Repository.
- </summary>
- <remarks>
- <para>
- Get the level map for the Repository.
- </para>
- <para>
- The level map defines the mappings between
- level names and <see cref="T:log4net.Core.Level"/> objects in
- this repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.Threshold">
- <summary>
- The threshold for all events in this repository
- </summary>
- <value>
- The threshold for all events in this repository
- </value>
- <remarks>
- <para>
- The threshold for all events in this repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.Configured">
- <summary>
- Flag indicates if this repository has been configured.
- </summary>
- <value>
- Flag indicates if this repository has been configured.
- </value>
- <remarks>
- <para>
- Flag indicates if this repository has been configured.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.ILoggerRepository.ShutdownEvent">
- <summary>
- Event to notify that the repository has been shutdown.
- </summary>
- <value>
- Event to notify that the repository has been shutdown.
- </value>
- <remarks>
- <para>
- Event raised when the repository has been shutdown.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.ILoggerRepository.ConfigurationReset">
- <summary>
- Event to notify that the repository has had its configuration reset.
- </summary>
- <value>
- Event to notify that the repository has had its configuration reset.
- </value>
- <remarks>
- <para>
- Event raised when the repository's configuration has been
- reset to default.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.ILoggerRepository.ConfigurationChanged">
- <summary>
- Event to notify that the repository has had its configuration changed.
- </summary>
- <value>
- Event to notify that the repository has had its configuration changed.
- </value>
- <remarks>
- <para>
- Event raised when the repository's configuration has been changed.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.Properties">
- <summary>
- Repository specific properties
- </summary>
- <value>
- Repository specific properties
- </value>
- <remarks>
- <para>
- These properties can be specified on a repository specific basis.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.#ctor">
- <summary>
- Default Constructor
- </summary>
- <remarks>
- <para>
- Initializes the repository with default (empty) properties.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.#ctor(log4net.Util.PropertiesDictionary)">
- <summary>
- Construct the repository using specific properties
- </summary>
- <param name="properties">the properties to set for this repository</param>
- <remarks>
- <para>
- Initializes the repository with specified properties.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.Exists(System.String)">
- <summary>
- Test if logger exists
- </summary>
- <param name="name">The name of the logger to lookup</param>
- <returns>The Logger object with the name specified</returns>
- <remarks>
- <para>
- Check if the named logger exists in the repository. If so return
- its reference, otherwise returns <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.GetCurrentLoggers">
- <summary>
- Returns all the currently defined loggers in the repository
- </summary>
- <returns>All the defined loggers</returns>
- <remarks>
- <para>
- Returns all the currently defined loggers in the repository as an Array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.GetLogger(System.String)">
- <summary>
- Return a new logger instance
- </summary>
- <param name="name">The name of the logger to retrieve</param>
- <returns>The logger object with the name specified</returns>
- <remarks>
- <para>
- Return a new logger instance.
- </para>
- <para>
- If a logger of that name already exists, then it will be
- returned. Otherwise, a new logger will be instantiated and
- then linked with its existing ancestors as well as children.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.Shutdown">
- <summary>
- Shutdown the repository
- </summary>
- <remarks>
- <para>
- Shutdown the repository. Can be overridden in a subclass.
- This base class implementation notifies the <see cref="E:log4net.Repository.LoggerRepositorySkeleton.ShutdownEvent"/>
- listeners and all attached plugins of the shutdown event.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.ResetConfiguration">
- <summary>
- Reset the repositories configuration to a default state
- </summary>
- <remarks>
- <para>
- Reset all values contained in this instance to their
- default state.
- </para>
- <para>
- Existing loggers are not removed. They are just reset.
- </para>
- <para>
- This method should be used sparingly and with care as it will
- block all logging until it is completed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.Log(log4net.Core.LoggingEvent)">
- <summary>
- Log the logEvent through this repository.
- </summary>
- <param name="logEvent">the event to log</param>
- <remarks>
- <para>
- This method should not normally be used to log.
- The <see cref="T:log4net.ILog"/> interface should be used
- for routine logging. This interface can be obtained
- using the <see cref="M:log4net.LogManager.GetLogger(System.String)"/> method.
- </para>
- <para>
- The <c>logEvent</c> is delivered to the appropriate logger and
- that logger is then responsible for logging the event.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.GetAppenders">
- <summary>
- Returns all the Appenders that are configured as an Array.
- </summary>
- <returns>All the Appenders</returns>
- <remarks>
- <para>
- Returns all the Appenders that are configured as an Array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.AddRenderer(System.Type,log4net.ObjectRenderer.IObjectRenderer)">
- <summary>
- Adds an object renderer for a specific class.
- </summary>
- <param name="typeToRender">The type that will be rendered by the renderer supplied.</param>
- <param name="rendererInstance">The object renderer used to render the object.</param>
- <remarks>
- <para>
- Adds an object renderer for a specific class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.OnShutdown(System.EventArgs)">
- <summary>
- Notify the registered listeners that the repository is shutting down
- </summary>
- <param name="e">Empty EventArgs</param>
- <remarks>
- <para>
- Notify any listeners that this repository is shutting down.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.OnConfigurationReset(System.EventArgs)">
- <summary>
- Notify the registered listeners that the repository has had its configuration reset
- </summary>
- <param name="e">Empty EventArgs</param>
- <remarks>
- <para>
- Notify any listeners that this repository's configuration has been reset.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.OnConfigurationChanged(System.EventArgs)">
- <summary>
- Notify the registered listeners that the repository has had its configuration changed
- </summary>
- <param name="e">Empty EventArgs</param>
- <remarks>
- <para>
- Notify any listeners that this repository's configuration has changed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.RaiseConfigurationChanged(System.EventArgs)">
- <summary>
- Raise a configuration changed event on this repository
- </summary>
- <param name="e">EventArgs.Empty</param>
- <remarks>
- <para>
- Applications that programmatically change the configuration of the repository should
- raise this event notification to notify listeners.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.Name">
- <summary>
- The name of the repository
- </summary>
- <value>
- The string name of the repository
- </value>
- <remarks>
- <para>
- The name of this repository. The name is
- used to store and lookup the repositories
- stored by the <see cref="T:log4net.Core.IRepositorySelector"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.Threshold">
- <summary>
- The threshold for all events in this repository
- </summary>
- <value>
- The threshold for all events in this repository
- </value>
- <remarks>
- <para>
- The threshold for all events in this repository
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.RendererMap">
- <summary>
- RendererMap accesses the object renderer map for this repository.
- </summary>
- <value>
- RendererMap accesses the object renderer map for this repository.
- </value>
- <remarks>
- <para>
- RendererMap accesses the object renderer map for this repository.
- </para>
- <para>
- The RendererMap holds a mapping between types and
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/> objects.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.PluginMap">
- <summary>
- The plugin map for this repository.
- </summary>
- <value>
- The plugin map for this repository.
- </value>
- <remarks>
- <para>
- The plugin map holds the <see cref="T:log4net.Plugin.IPlugin"/> instances
- that have been attached to this repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.LevelMap">
- <summary>
- Get the level map for the Repository.
- </summary>
- <remarks>
- <para>
- Get the level map for the Repository.
- </para>
- <para>
- The level map defines the mappings between
- level names and <see cref="T:log4net.Core.Level"/> objects in
- this repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.Configured">
- <summary>
- Flag indicates if this repository has been configured.
- </summary>
- <value>
- Flag indicates if this repository has been configured.
- </value>
- <remarks>
- <para>
- Flag indicates if this repository has been configured.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.LoggerRepositorySkeleton.ShutdownEvent">
- <summary>
- Event to notify that the repository has been shutdown.
- </summary>
- <value>
- Event to notify that the repository has been shutdown.
- </value>
- <remarks>
- <para>
- Event raised when the repository has been shutdown.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.LoggerRepositorySkeleton.ConfigurationReset">
- <summary>
- Event to notify that the repository has had its configuration reset.
- </summary>
- <value>
- Event to notify that the repository has had its configuration reset.
- </value>
- <remarks>
- <para>
- Event raised when the repository's configuration has been
- reset to default.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.LoggerRepositorySkeleton.ConfigurationChanged">
- <summary>
- Event to notify that the repository has had its configuration changed.
- </summary>
- <value>
- Event to notify that the repository has had its configuration changed.
- </value>
- <remarks>
- <para>
- Event raised when the repository's configuration has been changed.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.Properties">
- <summary>
- Repository specific properties
- </summary>
- <value>
- Repository specific properties
- </value>
- <remarks>
- These properties can be specified on a repository specific basis
- </remarks>
- </member>
- <member name="T:log4net.Repository.IBasicRepositoryConfigurator">
- <summary>
- Basic Configurator interface for repositories
- </summary>
- <remarks>
- <para>
- Interface used by basic configurator to configure a <see cref="T:log4net.Repository.ILoggerRepository"/>
- with a default <see cref="T:log4net.Appender.IAppender"/>.
- </para>
- <para>
- A <see cref="T:log4net.Repository.ILoggerRepository"/> should implement this interface to support
- configuration by the <see cref="T:log4net.Config.BasicConfigurator"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.IBasicRepositoryConfigurator.Configure(log4net.Appender.IAppender)">
- <summary>
- Initialize the repository using the specified appender
- </summary>
- <param name="appender">the appender to use to log all logging events</param>
- <remarks>
- <para>
- Configure the repository to route all logging events to the
- specified appender.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.IXmlRepositoryConfigurator">
- <summary>
- Configure repository using XML
- </summary>
- <remarks>
- <para>
- Interface used by Xml configurator to configure a <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </para>
- <para>
- A <see cref="T:log4net.Repository.ILoggerRepository"/> should implement this interface to support
- configuration by the <see cref="T:log4net.Config.XmlConfigurator"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.IXmlRepositoryConfigurator.Configure(System.Xml.XmlElement)">
- <summary>
- Initialize the repository using the specified config
- </summary>
- <param name="element">the element containing the root of the config</param>
- <remarks>
- <para>
- The schema for the XML configuration data is defined by
- the implementation.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.#ctor(log4net.Util.PropertiesDictionary)">
- <summary>
- Construct with properties
- </summary>
- <param name="properties">The properties to pass to this repository.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.#ctor(log4net.Repository.Hierarchy.ILoggerFactory)">
- <summary>
- Construct with a logger factory
- </summary>
- <param name="loggerFactory">The factory to use to create new logger instances.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> class with
- the specified <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.#ctor(log4net.Util.PropertiesDictionary,log4net.Repository.Hierarchy.ILoggerFactory)">
- <summary>
- Construct with properties and a logger factory
- </summary>
- <param name="properties">The properties to pass to this repository.</param>
- <param name="loggerFactory">The factory to use to create new logger instances.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> class with
- the specified <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.Exists(System.String)">
- <summary>
- Test if a logger exists
- </summary>
- <param name="name">The name of the logger to lookup</param>
- <returns>The Logger object with the name specified</returns>
- <remarks>
- <para>
- Check if the named logger exists in the hierarchy. If so return
- its reference, otherwise returns <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.GetCurrentLoggers">
- <summary>
- Returns all the currently defined loggers in the hierarchy as an Array
- </summary>
- <returns>All the defined loggers</returns>
- <remarks>
- <para>
- Returns all the currently defined loggers in the hierarchy as an Array.
- The root logger is <b>not</b> included in the returned
- enumeration.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.GetLogger(System.String)">
- <summary>
- Return a new logger instance named as the first parameter using
- the default factory.
- </summary>
- <remarks>
- <para>
- Return a new logger instance named as the first parameter using
- the default factory.
- </para>
- <para>
- If a logger of that name already exists, then it will be
- returned. Otherwise, a new logger will be instantiated and
- then linked with its existing ancestors as well as children.
- </para>
- </remarks>
- <param name="name">The name of the logger to retrieve</param>
- <returns>The logger object with the name specified</returns>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.Shutdown">
- <summary>
- Shutting down a hierarchy will <i>safely</i> close and remove
- all appenders in all loggers including the root logger.
- </summary>
- <remarks>
- <para>
- Shutting down a hierarchy will <i>safely</i> close and remove
- all appenders in all loggers including the root logger.
- </para>
- <para>
- Some appenders need to be closed before the
- application exists. Otherwise, pending logging events might be
- lost.
- </para>
- <para>
- The <c>Shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.ResetConfiguration">
- <summary>
- Reset all values contained in this hierarchy instance to their default.
- </summary>
- <remarks>
- <para>
- Reset all values contained in this hierarchy instance to their
- default. This removes all appenders from all loggers, sets
- the level of all non-root loggers to <c>null</c>,
- sets their additivity flag to <c>true</c> and sets the level
- of the root logger to <see cref="F:log4net.Core.Level.Debug"/>. Moreover,
- message disabling is set its default "off" value.
- </para>
- <para>
- Existing loggers are not removed. They are just reset.
- </para>
- <para>
- This method should be used sparingly and with care as it will
- block all logging until it is completed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.Log(log4net.Core.LoggingEvent)">
- <summary>
- Log the logEvent through this hierarchy.
- </summary>
- <param name="logEvent">the event to log</param>
- <remarks>
- <para>
- This method should not normally be used to log.
- The <see cref="T:log4net.ILog"/> interface should be used
- for routine logging. This interface can be obtained
- using the <see cref="M:log4net.LogManager.GetLogger(System.String)"/> method.
- </para>
- <para>
- The <c>logEvent</c> is delivered to the appropriate logger and
- that logger is then responsible for logging the event.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.GetAppenders">
- <summary>
- Returns all the Appenders that are currently configured
- </summary>
- <returns>An array containing all the currently configured appenders</returns>
- <remarks>
- <para>
- Returns all the <see cref="T:log4net.Appender.IAppender"/> instances that are currently configured.
- All the loggers are searched for appenders. The appenders may also be containers
- for appenders and these are also searched for additional loggers.
- </para>
- <para>
- The list returned is unordered but does not contain duplicates.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.CollectAppender(System.Collections.ArrayList,log4net.Appender.IAppender)">
- <summary>
- Collect the appenders from an <see cref="T:log4net.Core.IAppenderAttachable"/>.
- The appender may also be a container.
- </summary>
- <param name="appenderList"></param>
- <param name="appender"></param>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.CollectAppenders(System.Collections.ArrayList,log4net.Core.IAppenderAttachable)">
- <summary>
- Collect the appenders from an <see cref="T:log4net.Core.IAppenderAttachable"/> container
- </summary>
- <param name="appenderList"></param>
- <param name="container"></param>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.log4net#Repository#IBasicRepositoryConfigurator#Configure(log4net.Appender.IAppender)">
- <summary>
- Initialize the log4net system using the specified appender
- </summary>
- <param name="appender">the appender to use to log all logging events</param>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.BasicRepositoryConfigure(log4net.Appender.IAppender)">
- <summary>
- Initialize the log4net system using the specified appender
- </summary>
- <param name="appender">the appender to use to log all logging events</param>
- <remarks>
- <para>
- This method provides the same functionality as the
- <see cref="M:log4net.Repository.IBasicRepositoryConfigurator.Configure(log4net.Appender.IAppender)"/> method implemented
- on this object, but it is protected and therefore can be called by subclasses.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.log4net#Repository#IXmlRepositoryConfigurator#Configure(System.Xml.XmlElement)">
- <summary>
- Initialize the log4net system using the specified config
- </summary>
- <param name="element">the element containing the root of the config</param>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.XmlRepositoryConfigure(System.Xml.XmlElement)">
- <summary>
- Initialize the log4net system using the specified config
- </summary>
- <param name="element">the element containing the root of the config</param>
- <remarks>
- <para>
- This method provides the same functionality as the
- <see cref="M:log4net.Repository.IBasicRepositoryConfigurator.Configure(log4net.Appender.IAppender)"/> method implemented
- on this object, but it is protected and therefore can be called by subclasses.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.IsDisabled(log4net.Core.Level)">
- <summary>
- Test if this hierarchy is disabled for the specified <see cref="T:log4net.Core.Level"/>.
- </summary>
- <param name="level">The level to check against.</param>
- <returns>
- <c>true</c> if the repository is disabled for the level argument, <c>false</c> otherwise.
- </returns>
- <remarks>
- <para>
- If this hierarchy has not been configured then this method will
- always return <c>true</c>.
- </para>
- <para>
- This method will return <c>true</c> if this repository is
- disabled for <c>level</c> object passed as parameter and
- <c>false</c> otherwise.
- </para>
- <para>
- See also the <see cref="P:log4net.Repository.ILoggerRepository.Threshold"/> property.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.Clear">
- <summary>
- Clear all logger definitions from the internal hashtable
- </summary>
- <remarks>
- <para>
- This call will clear all logger definitions from the internal
- hashtable. Invoking this method will irrevocably mess up the
- logger hierarchy.
- </para>
- <para>
- You should <b>really</b> know what you are doing before
- invoking this method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.GetLogger(System.String,log4net.Repository.Hierarchy.ILoggerFactory)">
- <summary>
- Return a new logger instance named as the first parameter using
- <paramref name="factory"/>.
- </summary>
- <param name="name">The name of the logger to retrieve</param>
- <param name="factory">The factory that will make the new logger instance</param>
- <returns>The logger object with the name specified</returns>
- <remarks>
- <para>
- If a logger of that name already exists, then it will be
- returned. Otherwise, a new logger will be instantiated by the
- <paramref name="factory"/> parameter and linked with its existing
- ancestors as well as children.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.OnLoggerCreationEvent(log4net.Repository.Hierarchy.Logger)">
- <summary>
- Sends a logger creation event to all registered listeners
- </summary>
- <param name="logger">The newly created logger</param>
- <remarks>
- Raises the logger creation event.
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.UpdateParents(log4net.Repository.Hierarchy.Logger)">
- <summary>
- Updates all the parents of the specified logger
- </summary>
- <param name="log">The logger to update the parents for</param>
- <remarks>
- <para>
- This method loops through all the <i>potential</i> parents of
- <paramref name="log"/>. There 3 possible cases:
- </para>
- <list type="number">
- <item>
- <term>No entry for the potential parent of <paramref name="log"/> exists</term>
- <description>
- We create a ProvisionNode for this potential
- parent and insert <paramref name="log"/> in that provision node.
- </description>
- </item>
- <item>
- <term>The entry is of type Logger for the potential parent.</term>
- <description>
- The entry is <paramref name="log"/>'s nearest existing parent. We
- update <paramref name="log"/>'s parent field with this entry. We also break from
- he loop because updating our parent's parent is our parent's
- responsibility.
- </description>
- </item>
- <item>
- <term>The entry is of type ProvisionNode for this potential parent.</term>
- <description>
- We add <paramref name="log"/> to the list of children for this
- potential parent.
- </description>
- </item>
- </list>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.UpdateChildren(log4net.Repository.Hierarchy.ProvisionNode,log4net.Repository.Hierarchy.Logger)">
- <summary>
- Replace a <see cref="T:log4net.Repository.Hierarchy.ProvisionNode"/> with a <see cref="T:log4net.Repository.Hierarchy.Logger"/> in the hierarchy.
- </summary>
- <param name="pn"></param>
- <param name="log"></param>
- <remarks>
- <para>
- We update the links for all the children that placed themselves
- in the provision node 'pn'. The second argument 'log' is a
- reference for the newly created Logger, parent of all the
- children in 'pn'.
- </para>
- <para>
- We loop on all the children 'c' in 'pn'.
- </para>
- <para>
- If the child 'c' has been already linked to a child of
- 'log' then there is no need to update 'c'.
- </para>
- <para>
- Otherwise, we set log's parent field to c's parent and set
- c's parent field to log.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.AddLevel(log4net.Repository.Hierarchy.Hierarchy.LevelEntry)">
- <summary>
- Define or redefine a Level using the values in the <see cref="T:log4net.Repository.Hierarchy.Hierarchy.LevelEntry"/> argument
- </summary>
- <param name="levelEntry">the level values</param>
- <remarks>
- <para>
- Define or redefine a Level using the values in the <see cref="T:log4net.Repository.Hierarchy.Hierarchy.LevelEntry"/> argument
- </para>
- <para>
- Supports setting levels via the configuration file.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.AddProperty(log4net.Repository.Hierarchy.Hierarchy.PropertyEntry)">
- <summary>
- Set a Property using the values in the <see cref="T:log4net.Repository.Hierarchy.Hierarchy.LevelEntry"/> argument
- </summary>
- <param name="propertyEntry">the property value</param>
- <remarks>
- <para>
- Set a Property using the values in the <see cref="T:log4net.Repository.Hierarchy.Hierarchy.LevelEntry"/> argument.
- </para>
- <para>
- Supports setting property values via the configuration file.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.Hierarchy.Hierarchy.LoggerCreatedEvent">
- <summary>
- Event used to notify that a logger has been created.
- </summary>
- <remarks>
- <para>
- Event raised when a logger is created.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.EmittedNoAppenderWarning">
- <summary>
- Has no appender warning been emitted
- </summary>
- <remarks>
- <para>
- Flag to indicate if we have already issued a warning
- about not having an appender warning.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.Root">
- <summary>
- Get the root of this hierarchy
- </summary>
- <remarks>
- <para>
- Get the root of this hierarchy.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.LoggerFactory">
- <summary>
- Gets or sets the default <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/> instance.
- </summary>
- <value>The default <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/></value>
- <remarks>
- <para>
- The logger factory is used to create logger instances.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.Hierarchy.LevelEntry">
- <summary>
- A class to hold the value, name and display name for a level
- </summary>
- <remarks>
- <para>
- A class to hold the value, name and display name for a level
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.LevelEntry.ToString">
- <summary>
- Override <c>Object.ToString</c> to return sensible debug info
- </summary>
- <returns>string info about this object</returns>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.LevelEntry.Value">
- <summary>
- Value of the level
- </summary>
- <remarks>
- <para>
- If the value is not set (defaults to -1) the value will be looked
- up for the current level with the same name.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.LevelEntry.Name">
- <summary>
- Name of the level
- </summary>
- <value>
- The name of the level
- </value>
- <remarks>
- <para>
- The name of the level.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.LevelEntry.DisplayName">
- <summary>
- Display name for the level
- </summary>
- <value>
- The display name of the level
- </value>
- <remarks>
- <para>
- The display name of the level.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.Hierarchy.PropertyEntry">
- <summary>
- A class to hold the key and data for a property set in the config file
- </summary>
- <remarks>
- <para>
- A class to hold the key and data for a property set in the config file
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.PropertyEntry.ToString">
- <summary>
- Override <c>Object.ToString</c> to return sensible debug info
- </summary>
- <returns>string info about this object</returns>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.PropertyEntry.Key">
- <summary>
- Property Key
- </summary>
- <value>
- Property Key
- </value>
- <remarks>
- <para>
- Property Key.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.PropertyEntry.Value">
- <summary>
- Property Value
- </summary>
- <value>
- Property Value
- </value>
- <remarks>
- <para>
- Property Value.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.LoggerKey">
- <summary>
- Used internally to accelerate hash table searches.
- </summary>
- <remarks>
- <para>
- Internal class used to improve performance of
- string keyed hashtables.
- </para>
- <para>
- The hashcode of the string is cached for reuse.
- The string is stored as an interned value.
- When comparing two <see cref="T:log4net.Repository.Hierarchy.LoggerKey"/> objects for equality
- the reference equality of the interned strings is compared.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.Hierarchy.LoggerKey.#ctor(System.String)">
- <summary>
- Construct key with string name
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.LoggerKey"/> class
- with the specified name.
- </para>
- <para>
- Stores the hashcode of the string and interns
- the string key to optimize comparisons.
- </para>
- <note>
- The Compact Framework 1.0 the <see cref="M:System.String.Intern(System.String)"/>
- method does not work. On the Compact Framework
- the string keys are not interned nor are they
- compared by reference.
- </note>
- </remarks>
- <param name="name">The name of the logger.</param>
- </member>
- <member name="M:log4net.Repository.Hierarchy.LoggerKey.GetHashCode">
- <summary>
- Returns a hash code for the current instance.
- </summary>
- <returns>A hash code for the current instance.</returns>
- <remarks>
- <para>
- Returns the cached hashcode.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.LoggerKey.Equals(System.Object)">
- <summary>
- Determines whether two <see cref="T:log4net.Repository.Hierarchy.LoggerKey"/> instances
- are equal.
- </summary>
- <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:log4net.Repository.Hierarchy.LoggerKey"/>.</param>
- <returns>
- <c>true</c> if the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:log4net.Repository.Hierarchy.LoggerKey"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares the references of the interned strings.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.ProvisionNode">
- <summary>
- Provision nodes are used where no logger instance has been specified
- </summary>
- <remarks>
- <para>
- <see cref="T:log4net.Repository.Hierarchy.ProvisionNode"/> instances are used in the
- <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> when there is no specified
- <see cref="T:log4net.Repository.Hierarchy.Logger"/> for that node.
- </para>
- <para>
- A provision node holds a list of child loggers on behalf of
- a logger that does not exist.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.Hierarchy.ProvisionNode.#ctor(log4net.Repository.Hierarchy.Logger)">
- <summary>
- Create a new provision node with child node
- </summary>
- <param name="log">A child logger to add to this node.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.ProvisionNode"/> class
- with the specified child logger.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.RootLogger">
- <summary>
- The <see cref="T:log4net.Repository.Hierarchy.RootLogger"/> sits at the root of the logger hierarchy tree.
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.Hierarchy.RootLogger"/> is a regular <see cref="T:log4net.Repository.Hierarchy.Logger"/> except
- that it provides several guarantees.
- </para>
- <para>
- First, it cannot be assigned a <c>null</c>
- level. Second, since the root logger cannot have a parent, the
- <see cref="P:log4net.Repository.Hierarchy.RootLogger.EffectiveLevel"/> property always returns the value of the
- level field without walking the hierarchy.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.Hierarchy.RootLogger.#ctor(log4net.Core.Level)">
- <summary>
- Construct a <see cref="T:log4net.Repository.Hierarchy.RootLogger"/>
- </summary>
- <param name="level">The level to assign to the root logger.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.RootLogger"/> class with
- the specified logging level.
- </para>
- <para>
- The root logger names itself as "root". However, the root
- logger cannot be retrieved by name.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.RootLogger.EffectiveLevel">
- <summary>
- Gets the assigned level value without walking the logger hierarchy.
- </summary>
- <value>The assigned level value without walking the logger hierarchy.</value>
- <remarks>
- <para>
- Because the root logger cannot have a parent and its level
- must not be <c>null</c> this property just returns the
- value of <see cref="P:log4net.Repository.Hierarchy.Logger.Level"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.RootLogger.Level">
- <summary>
- Gets or sets the assigned <see cref="P:log4net.Repository.Hierarchy.RootLogger.Level"/> for the root logger.
- </summary>
- <value>
- The <see cref="P:log4net.Repository.Hierarchy.RootLogger.Level"/> of the root logger.
- </value>
- <remarks>
- <para>
- Setting the level of the root logger to a <c>null</c> reference
- may have catastrophic results. We prevent this here.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.XmlHierarchyConfigurator">
- <summary>
- Initializes the log4net environment using an XML DOM.
- </summary>
- <remarks>
- <para>
- Configures a <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> using an XML DOM.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.#ctor(log4net.Repository.Hierarchy.Hierarchy)">
- <summary>
- Construct the configurator for a hierarchy
- </summary>
- <param name="hierarchy">The hierarchy to build.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.XmlHierarchyConfigurator"/> class
- with the specified <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.Configure(System.Xml.XmlElement)">
- <summary>
- Configure the hierarchy by parsing a DOM tree of XML elements.
- </summary>
- <param name="element">The root element to parse.</param>
- <remarks>
- <para>
- Configure the hierarchy by parsing a DOM tree of XML elements.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.FindAppenderByReference(System.Xml.XmlElement)">
- <summary>
- Parse appenders by IDREF.
- </summary>
- <param name="appenderRef">The appender ref element.</param>
- <returns>The instance of the appender that the ref refers to.</returns>
- <remarks>
- <para>
- Parse an XML element that represents an appender and return
- the appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(System.Xml.XmlElement)">
- <summary>
- Parses an appender element.
- </summary>
- <param name="appenderElement">The appender element.</param>
- <returns>The appender instance or <c>null</c> when parsing failed.</returns>
- <remarks>
- <para>
- Parse an XML element that represents an appender and return
- the appender instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseLogger(System.Xml.XmlElement)">
- <summary>
- Parses a logger element.
- </summary>
- <param name="loggerElement">The logger element.</param>
- <remarks>
- <para>
- Parse an XML element that represents a logger.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseRoot(System.Xml.XmlElement)">
- <summary>
- Parses the root logger element.
- </summary>
- <param name="rootElement">The root element.</param>
- <remarks>
- <para>
- Parse an XML element that represents the root logger.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseChildrenOfLoggerElement(System.Xml.XmlElement,log4net.Repository.Hierarchy.Logger,System.Boolean)">
- <summary>
- Parses the children of a logger element.
- </summary>
- <param name="catElement">The category element.</param>
- <param name="log">The logger instance.</param>
- <param name="isRoot">Flag to indicate if the logger is the root logger.</param>
- <remarks>
- <para>
- Parse the child elements of a &lt;logger&gt; element.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseRenderer(System.Xml.XmlElement)">
- <summary>
- Parses an object renderer.
- </summary>
- <param name="element">The renderer element.</param>
- <remarks>
- <para>
- Parse an XML element that represents a renderer.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseLevel(System.Xml.XmlElement,log4net.Repository.Hierarchy.Logger,System.Boolean)">
- <summary>
- Parses a level element.
- </summary>
- <param name="element">The level element.</param>
- <param name="log">The logger object to set the level on.</param>
- <param name="isRoot">Flag to indicate if the logger is the root logger.</param>
- <remarks>
- <para>
- Parse an XML element that represents a level.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.SetParameter(System.Xml.XmlElement,System.Object)">
- <summary>
- Sets a parameter on an object.
- </summary>
- <param name="element">The parameter element.</param>
- <param name="target">The object to set the parameter on.</param>
- <remarks>
- The parameter name must correspond to a writable property
- on the object. The value of the parameter is a string,
- therefore this function will attempt to set a string
- property first. If unable to set a string property it
- will inspect the property and its argument type. It will
- attempt to call a static method called <c>Parse</c> on the
- type of the property. This method will take a single
- string argument and return a value that can be used to
- set the property.
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.HasAttributesOrElements(System.Xml.XmlElement)">
- <summary>
- Test if an element has no attributes or child elements
- </summary>
- <param name="element">the element to inspect</param>
- <returns><c>true</c> if the element has any attributes or child elements, <c>false</c> otherwise</returns>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.IsTypeConstructible(System.Type)">
- <summary>
- Test if a <see cref="T:System.Type"/> is constructible with <c>Activator.CreateInstance</c>.
- </summary>
- <param name="type">the type to inspect</param>
- <returns><c>true</c> if the type is creatable using a default constructor, <c>false</c> otherwise</returns>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.FindMethodInfo(System.Type,System.String)">
- <summary>
- Look for a method on the <paramref name="targetType"/> that matches the <paramref name="name"/> supplied
- </summary>
- <param name="targetType">the type that has the method</param>
- <param name="name">the name of the method</param>
- <returns>the method info found</returns>
- <remarks>
- <para>
- The method must be a public instance method on the <paramref name="targetType"/>.
- The method must be named <paramref name="name"/> or "Add" followed by <paramref name="name"/>.
- The method must take a single parameter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ConvertStringTo(System.Type,System.String)">
- <summary>
- Converts a string value to a target type.
- </summary>
- <param name="type">The type of object to convert the string to.</param>
- <param name="value">The string value to use as the value of the object.</param>
- <returns>
- <para>
- An object of type <paramref name="type"/> with value <paramref name="value"/> or
- <c>null</c> when the conversion could not be performed.
- </para>
- </returns>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.CreateObjectFromXml(System.Xml.XmlElement,System.Type,System.Type)">
- <summary>
- Creates an object as specified in XML.
- </summary>
- <param name="element">The XML element that contains the definition of the object.</param>
- <param name="defaultTargetType">The object type to use if not explicitly specified.</param>
- <param name="typeConstraint">The type that the returned object must be or must inherit from.</param>
- <returns>The object or <c>null</c></returns>
- <remarks>
- <para>
- Parse an XML element and create an object instance based on the configuration
- data.
- </para>
- <para>
- The type of the instance may be specified in the XML. If not
- specified then the <paramref name="defaultTargetType"/> is used
- as the type. However the type is specified it must support the
- <paramref name="typeConstraint"/> type.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.m_appenderBag">
- <summary>
- key: appenderName, value: appender.
- </summary>
- </member>
- <member name="F:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.m_hierarchy">
- <summary>
- The Hierarchy being configured.
- </summary>
- </member>
- <member name="T:log4net.Repository.LoggerRepositoryShutdownEventHandler">
- <summary>
- Delegate used to handle logger repository shutdown event notifications
- </summary>
- <param name="sender">The <see cref="T:log4net.Repository.ILoggerRepository"/> that is shutting down.</param>
- <param name="e">Empty event args</param>
- <remarks>
- <para>
- Delegate used to handle logger repository shutdown event notifications.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.LoggerRepositoryConfigurationResetEventHandler">
- <summary>
- Delegate used to handle logger repository configuration reset event notifications
- </summary>
- <param name="sender">The <see cref="T:log4net.Repository.ILoggerRepository"/> that has had its configuration reset.</param>
- <param name="e">Empty event args</param>
- <remarks>
- <para>
- Delegate used to handle logger repository configuration reset event notifications.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.LoggerRepositoryConfigurationChangedEventHandler">
- <summary>
- Delegate used to handle event notifications for logger repository configuration changes.
- </summary>
- <param name="sender">The <see cref="T:log4net.Repository.ILoggerRepository"/> that has had its configuration changed.</param>
- <param name="e">Empty event arguments.</param>
- <remarks>
- <para>
- Delegate used to handle event notifications for logger repository configuration changes.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.AppDomainPatternConverter">
- <summary>
- Write the name of the current AppDomain to the output
- </summary>
- <remarks>
- <para>
- Write the name of the current AppDomain to the output writer
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.AppDomainPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the name of the current AppDomain to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Writes name of the current AppDomain to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.DatePatternConverter">
- <summary>
- Write the current date to the output
- </summary>
- <remarks>
- <para>
- Date pattern converter, uses a <see cref="T:log4net.DateFormatter.IDateFormatter"/> to format
- the current date and time to the writer as a string.
- </para>
- <para>
- The value of the <see cref="P:log4net.Util.PatternConverter.Option"/> determines
- the formatting of the date. The following values are allowed:
- <list type="definition">
- <listheader>
- <term>Option value</term>
- <description>Output</description>
- </listheader>
- <item>
- <term>ISO8601</term>
- <description>
- Uses the <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/> formatter.
- Formats using the <c>"yyyy-MM-dd HH:mm:ss,fff"</c> pattern.
- </description>
- </item>
- <item>
- <term>DATE</term>
- <description>
- Uses the <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> formatter.
- Formats using the <c>"dd MMM yyyy HH:mm:ss,fff"</c> for example, <c>"06 Nov 1994 15:49:37,459"</c>.
- </description>
- </item>
- <item>
- <term>ABSOLUTE</term>
- <description>
- Uses the <see cref="T:log4net.DateFormatter.AbsoluteTimeDateFormatter"/> formatter.
- Formats using the <c>"HH:mm:ss,fff"</c> for example, <c>"15:49:37,459"</c>.
- </description>
- </item>
- <item>
- <term>other</term>
- <description>
- Any other pattern string uses the <see cref="T:log4net.DateFormatter.SimpleDateFormatter"/> formatter.
- This formatter passes the pattern string to the <see cref="T:System.DateTime"/>
- <see cref="M:System.DateTime.ToString(System.String)"/> method.
- For details on valid patterns see
- <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemglobalizationdatetimeformatinfoclasstopic.asp">DateTimeFormatInfo Class</a>.
- </description>
- </item>
- </list>
- </para>
- <para>
- The date and time is in the local time zone and is rendered in that zone.
- To output the time in Universal time see <see cref="T:log4net.Util.PatternStringConverters.UtcDatePatternConverter"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.PatternStringConverters.DatePatternConverter.m_dateFormatter">
- <summary>
- The <see cref="T:log4net.DateFormatter.IDateFormatter"/> used to render the date to a string
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.DateFormatter.IDateFormatter"/> used to render the date to a string
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.DatePatternConverter.ActivateOptions">
- <summary>
- Initialize the converter options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Util.PatternStringConverters.DatePatternConverter.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Util.PatternStringConverters.DatePatternConverter.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Util.PatternStringConverters.DatePatternConverter.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.DatePatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the current date to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Pass the current date and time to the <see cref="T:log4net.DateFormatter.IDateFormatter"/>
- for it to render it to the writer.
- </para>
- <para>
- The date and time passed is in the local time zone.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.EnvironmentPatternConverter">
- <summary>
- Write an environment variable to the output
- </summary>
- <remarks>
- <para>
- Write an environment variable to the output writer.
- The value of the <see cref="P:log4net.Util.PatternConverter.Option"/> determines
- the name of the variable to output.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.EnvironmentPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write an environment variable to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Writes the environment variable to the output <paramref name="writer"/>.
- The name of the environment variable to output must be set
- using the <see cref="P:log4net.Util.PatternConverter.Option"/>
- property.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.IdentityPatternConverter">
- <summary>
- Write the current thread identity to the output
- </summary>
- <remarks>
- <para>
- Write the current thread identity to the output writer
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.IdentityPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the current thread identity to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Writes the current thread identity to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.LiteralPatternConverter">
- <summary>
- Pattern converter for literal string instances in the pattern
- </summary>
- <remarks>
- <para>
- Writes the literal string value specified in the
- <see cref="P:log4net.Util.PatternConverter.Option"/> property to
- the output.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.LiteralPatternConverter.SetNext(log4net.Util.PatternConverter)">
- <summary>
- Set the next converter in the chain
- </summary>
- <param name="pc">The next pattern converter in the chain</param>
- <returns>The next pattern converter</returns>
- <remarks>
- <para>
- Special case the building of the pattern converter chain
- for <see cref="T:log4net.Util.PatternStringConverters.LiteralPatternConverter"/> instances. Two adjacent
- literals in the pattern can be represented by a single combined
- pattern converter. This implementation detects when a
- <see cref="T:log4net.Util.PatternStringConverters.LiteralPatternConverter"/> is added to the chain
- after this converter and combines its value with this converter's
- literal value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.LiteralPatternConverter.Format(System.IO.TextWriter,System.Object)">
- <summary>
- Write the literal to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, not set</param>
- <remarks>
- <para>
- Override the formatting behavior to ignore the FormattingInfo
- because we have a literal instead.
- </para>
- <para>
- Writes the value of <see cref="P:log4net.Util.PatternConverter.Option"/>
- to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.LiteralPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Convert this pattern into the rendered message
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">null, not set</param>
- <remarks>
- <para>
- This method is not used.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.NewLinePatternConverter">
- <summary>
- Writes a newline to the output
- </summary>
- <remarks>
- <para>
- Writes the system dependent line terminator to the output.
- This behavior can be overridden by setting the <see cref="P:log4net.Util.PatternConverter.Option"/>:
- </para>
- <list type="definition">
- <listheader>
- <term>Option Value</term>
- <description>Output</description>
- </listheader>
- <item>
- <term>DOS</term>
- <description>DOS or Windows line terminator <c>"\r\n"</c></description>
- </item>
- <item>
- <term>UNIX</term>
- <description>UNIX line terminator <c>"\n"</c></description>
- </item>
- </list>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.NewLinePatternConverter.ActivateOptions">
- <summary>
- Initialize the converter
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Util.PatternStringConverters.NewLinePatternConverter.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Util.PatternStringConverters.NewLinePatternConverter.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Util.PatternStringConverters.NewLinePatternConverter.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.ProcessIdPatternConverter">
- <summary>
- Write the current process ID to the output
- </summary>
- <remarks>
- <para>
- Write the current process ID to the output writer
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.ProcessIdPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the current process ID to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Write the current process ID to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.PropertyPatternConverter">
- <summary>
- Property pattern converter
- </summary>
- <remarks>
- <para>
- This pattern converter reads the thread and global properties.
- The thread properties take priority over global properties.
- See <see cref="P:log4net.ThreadContext.Properties"/> for details of the
- thread properties. See <see cref="P:log4net.GlobalContext.Properties"/> for
- details of the global properties.
- </para>
- <para>
- If the <see cref="P:log4net.Util.PatternConverter.Option"/> is specified then that will be used to
- lookup a single property. If no <see cref="P:log4net.Util.PatternConverter.Option"/> is specified
- then all properties will be dumped as a list of key value pairs.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.PropertyPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the property value to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Writes out the value of a named property. The property name
- should be set in the <see cref="P:log4net.Util.PatternConverter.Option"/>
- property.
- </para>
- <para>
- If the <see cref="P:log4net.Util.PatternConverter.Option"/> is set to <c>null</c>
- then all the properties are written as key value pairs.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.RandomStringPatternConverter">
- <summary>
- A Pattern converter that generates a string of random characters
- </summary>
- <remarks>
- <para>
- The converter generates a string of random characters. By default
- the string is length 4. This can be changed by setting the <see cref="P:log4net.Util.PatternConverter.Option"/>
- to the string value of the length required.
- </para>
- <para>
- The random characters in the string are limited to uppercase letters
- and numbers only.
- </para>
- <para>
- The random number generator used by this class is not cryptographically secure.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.PatternStringConverters.RandomStringPatternConverter.s_random">
- <summary>
- Shared random number generator
- </summary>
- </member>
- <member name="F:log4net.Util.PatternStringConverters.RandomStringPatternConverter.m_length">
- <summary>
- Length of random string to generate. Default length 4.
- </summary>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.RandomStringPatternConverter.ActivateOptions">
- <summary>
- Initialize the converter options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Util.PatternStringConverters.RandomStringPatternConverter.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Util.PatternStringConverters.RandomStringPatternConverter.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Util.PatternStringConverters.RandomStringPatternConverter.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.RandomStringPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write a randoim string to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Write a randoim string to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.UserNamePatternConverter">
- <summary>
- Write the current threads username to the output
- </summary>
- <remarks>
- <para>
- Write the current threads username to the output writer
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.UserNamePatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the current threads username to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Write the current threads username to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.UtcDatePatternConverter">
- <summary>
- Write the UTC date time to the output
- </summary>
- <remarks>
- <para>
- Date pattern converter, uses a <see cref="T:log4net.DateFormatter.IDateFormatter"/> to format
- the current date and time in Universal time.
- </para>
- <para>
- See the <see cref="T:log4net.Util.PatternStringConverters.DatePatternConverter"/> for details on the date pattern syntax.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.PatternStringConverters.DatePatternConverter"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.UtcDatePatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the current date and time to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Pass the current date and time to the <see cref="T:log4net.DateFormatter.IDateFormatter"/>
- for it to render it to the writer.
- </para>
- <para>
- The date is in Universal time when it is rendered.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.PatternStringConverters.DatePatternConverter"/>
- </member>
- <member name="T:log4net.Util.TypeConverters.BooleanConverter">
- <summary>
- Type converter for Boolean.
- </summary>
- <remarks>
- <para>
- Supports conversion from string to <c>bool</c> type.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.ConverterRegistry"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertTo"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.BooleanConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="sourceType"/> is
- the <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.BooleanConverter.ConvertFrom(System.Object)">
- <summary>
- Convert the source object to the type supported by this object
- </summary>
- <param name="source">the object to convert</param>
- <returns>the converted object</returns>
- <remarks>
- <para>
- Uses the <see cref="M:System.Boolean.Parse(System.String)"/> method to convert the
- <see cref="T:System.String"/> argument to a <see cref="T:System.Boolean"/>.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- target type. To check for this condition use the <see cref="M:log4net.Util.TypeConverters.BooleanConverter.CanConvertFrom(System.Type)"/>
- method.
- </exception>
- </member>
- <member name="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- <summary>
- Exception base type for conversion errors.
- </summary>
- <remarks>
- <para>
- This type extends <see cref="T:System.ApplicationException"/>. It
- does not add any new functionality but does differentiate the
- type of exception being thrown.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConversionNotSupportedException.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConversionNotSupportedException.#ctor(System.String)">
- <summary>
- Constructor
- </summary>
- <param name="message">A message to include with the exception.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class
- with the specified message.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConversionNotSupportedException.#ctor(System.String,System.Exception)">
- <summary>
- Constructor
- </summary>
- <param name="message">A message to include with the exception.</param>
- <param name="innerException">A nested exception to include.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class
- with the specified message and inner exception.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConversionNotSupportedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Serialization constructor
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
- <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class
- with serialized data.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConversionNotSupportedException.Create(System.Type,System.Object)">
- <summary>
- Creates a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class.
- </summary>
- <param name="destinationType">The conversion destination type.</param>
- <param name="sourceValue">The value to convert.</param>
- <returns>An instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/>.</returns>
- <remarks>
- <para>
- Creates a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConversionNotSupportedException.Create(System.Type,System.Object,System.Exception)">
- <summary>
- Creates a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class.
- </summary>
- <param name="destinationType">The conversion destination type.</param>
- <param name="sourceValue">The value to convert.</param>
- <param name="innerException">A nested exception to include.</param>
- <returns>An instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/>.</returns>
- <remarks>
- <para>
- Creates a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.TypeConverters.ConverterRegistry">
- <summary>
- Register of type converters for specific types.
- </summary>
- <remarks>
- <para>
- Maintains a registry of type converters used to convert between
- types.
- </para>
- <para>
- Use the <see cref="M:log4net.Util.TypeConverters.ConverterRegistry.AddConverter(System.Type,System.Object)"/> and
- <see cref="M:log4net.Util.TypeConverters.ConverterRegistry.AddConverter(System.Type,System.Type)"/> methods to register new converters.
- The <see cref="M:log4net.Util.TypeConverters.ConverterRegistry.GetConvertTo(System.Type,System.Type)"/> and <see cref="M:log4net.Util.TypeConverters.ConverterRegistry.GetConvertFrom(System.Type)"/> methods
- lookup appropriate converters to use.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertTo"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.#ctor">
- <summary>
- Private constructor
- </summary>
- <remarks>
- Initializes a new instance of the <see cref="T:log4net.Util.TypeConverters.ConverterRegistry"/> class.
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.#cctor">
- <summary>
- Static constructor.
- </summary>
- <remarks>
- <para>
- This constructor defines the intrinsic type converters.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.AddConverter(System.Type,System.Object)">
- <summary>
- Adds a converter for a specific type.
- </summary>
- <param name="destinationType">The type being converted to.</param>
- <param name="converter">The type converter to use to convert to the destination type.</param>
- <remarks>
- <para>
- Adds a converter instance for a specific type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.AddConverter(System.Type,System.Type)">
- <summary>
- Adds a converter for a specific type.
- </summary>
- <param name="destinationType">The type being converted to.</param>
- <param name="converterType">The type of the type converter to use to convert to the destination type.</param>
- <remarks>
- <para>
- Adds a converter <see cref="T:System.Type"/> for a specific type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.GetConvertTo(System.Type,System.Type)">
- <summary>
- Gets the type converter to use to convert values to the destination type.
- </summary>
- <param name="sourceType">The type being converted from.</param>
- <param name="destinationType">The type being converted to.</param>
- <returns>
- The type converter instance to use for type conversions or <c>null</c>
- if no type converter is found.
- </returns>
- <remarks>
- <para>
- Gets the type converter to use to convert values to the destination type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.GetConvertFrom(System.Type)">
- <summary>
- Gets the type converter to use to convert values to the destination type.
- </summary>
- <param name="destinationType">The type being converted to.</param>
- <returns>
- The type converter instance to use for type conversions or <c>null</c>
- if no type converter is found.
- </returns>
- <remarks>
- <para>
- Gets the type converter to use to convert values to the destination type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.GetConverterFromAttribute(System.Type)">
- <summary>
- Lookups the type converter to use as specified by the attributes on the
- destination type.
- </summary>
- <param name="destinationType">The type being converted to.</param>
- <returns>
- The type converter instance to use for type conversions or <c>null</c>
- if no type converter is found.
- </returns>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.CreateConverterInstance(System.Type)">
- <summary>
- Creates the instance of the type converter.
- </summary>
- <param name="converterType">The type of the type converter.</param>
- <returns>
- The type converter instance to use for type conversions or <c>null</c>
- if no type converter is found.
- </returns>
- <remarks>
- <para>
- The type specified for the type converter must implement
- the <see cref="T:log4net.Util.TypeConverters.IConvertFrom"/> or <see cref="T:log4net.Util.TypeConverters.IConvertTo"/> interfaces
- and must have a public default (no argument) constructor.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.TypeConverters.ConverterRegistry.s_type2converter">
- <summary>
- Mapping from <see cref="T:System.Type"/> to type converter.
- </summary>
- </member>
- <member name="T:log4net.Util.TypeConverters.EncodingConverter">
- <summary>
- Supports conversion from string to <see cref="T:System.Text.Encoding"/> type.
- </summary>
- <remarks>
- <para>
- Supports conversion from string to <see cref="T:System.Text.Encoding"/> type.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.ConverterRegistry"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertTo"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.EncodingConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="sourceType"/> is
- the <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.EncodingConverter.ConvertFrom(System.Object)">
- <summary>
- Overrides the ConvertFrom method of IConvertFrom.
- </summary>
- <param name="source">the object to convert to an encoding</param>
- <returns>the encoding</returns>
- <remarks>
- <para>
- Uses the <see cref="M:System.Text.Encoding.GetEncoding(System.String)"/> method to
- convert the <see cref="T:System.String"/> argument to an <see cref="T:System.Text.Encoding"/>.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- target type. To check for this condition use the <see cref="M:log4net.Util.TypeConverters.EncodingConverter.CanConvertFrom(System.Type)"/>
- method.
- </exception>
- </member>
- <member name="T:log4net.Util.TypeConverters.IConvertTo">
- <summary>
- Interface supported by type converters
- </summary>
- <remarks>
- <para>
- This interface supports conversion from a single type to arbitrary types.
- See <see cref="T:log4net.Util.TypeConverters.TypeConverterAttribute"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.IConvertTo.CanConvertTo(System.Type)">
- <summary>
- Returns whether this converter can convert the object to the specified type
- </summary>
- <param name="targetType">A Type that represents the type you want to convert to</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Test if the type supported by this converter can be converted to the
- <paramref name="targetType"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.IConvertTo.ConvertTo(System.Object,System.Type)">
- <summary>
- Converts the given value object to the specified type, using the arguments
- </summary>
- <param name="source">the object to convert</param>
- <param name="targetType">The Type to convert the value parameter to</param>
- <returns>the converted object</returns>
- <remarks>
- <para>
- Converts the <paramref name="source"/> (which must be of the type supported
- by this converter) to the <paramref name="targetType"/> specified..
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.TypeConverters.IPAddressConverter">
- <summary>
- Supports conversion from string to <see cref="T:System.Net.IPAddress"/> type.
- </summary>
- <remarks>
- <para>
- Supports conversion from string to <see cref="T:System.Net.IPAddress"/> type.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.ConverterRegistry"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.IPAddressConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="sourceType"/> is
- the <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.IPAddressConverter.ConvertFrom(System.Object)">
- <summary>
- Overrides the ConvertFrom method of IConvertFrom.
- </summary>
- <param name="source">the object to convert to an IPAddress</param>
- <returns>the IPAddress</returns>
- <remarks>
- <para>
- Uses the <see cref="M:System.Net.IPAddress.Parse(System.String)"/> method to convert the
- <see cref="T:System.String"/> argument to an <see cref="T:System.Net.IPAddress"/>.
- If that fails then the string is resolved as a DNS hostname.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- target type. To check for this condition use the <see cref="M:log4net.Util.TypeConverters.IPAddressConverter.CanConvertFrom(System.Type)"/>
- method.
- </exception>
- </member>
- <member name="F:log4net.Util.TypeConverters.IPAddressConverter.validIpAddressChars">
- <summary>
- Valid characters in an IPv4 or IPv6 address string. (Does not support subnets)
- </summary>
- </member>
- <member name="T:log4net.Util.TypeConverters.PatternLayoutConverter">
- <summary>
- Supports conversion from string to <see cref="T:log4net.Layout.PatternLayout"/> type.
- </summary>
- <remarks>
- <para>
- Supports conversion from string to <see cref="T:log4net.Layout.PatternLayout"/> type.
- </para>
- <para>
- The string is used as the <see cref="P:log4net.Layout.PatternLayout.ConversionPattern"/>
- of the <see cref="T:log4net.Layout.PatternLayout"/>.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.ConverterRegistry"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertTo"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.PatternLayoutConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="sourceType"/> is
- the <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.PatternLayoutConverter.ConvertFrom(System.Object)">
- <summary>
- Overrides the ConvertFrom method of IConvertFrom.
- </summary>
- <param name="source">the object to convert to a PatternLayout</param>
- <returns>the PatternLayout</returns>
- <remarks>
- <para>
- Creates and returns a new <see cref="T:log4net.Layout.PatternLayout"/> using
- the <paramref name="source"/> <see cref="T:System.String"/> as the
- <see cref="P:log4net.Layout.PatternLayout.ConversionPattern"/>.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- target type. To check for this condition use the <see cref="M:log4net.Util.TypeConverters.PatternLayoutConverter.CanConvertFrom(System.Type)"/>
- method.
- </exception>
- </member>
- <member name="T:log4net.Util.TypeConverters.PatternStringConverter">
- <summary>
- Convert between string and <see cref="T:log4net.Util.PatternString"/>
- </summary>
- <remarks>
- <para>
- Supports conversion from string to <see cref="T:log4net.Util.PatternString"/> type,
- and from a <see cref="T:log4net.Util.PatternString"/> type to a string.
- </para>
- <para>
- The string is used as the <see cref="P:log4net.Util.PatternString.ConversionPattern"/>
- of the <see cref="T:log4net.Util.PatternString"/>.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.ConverterRegistry"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertTo"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.PatternStringConverter.CanConvertTo(System.Type)">
- <summary>
- Can the target type be converted to the type supported by this object
- </summary>
- <param name="targetType">A <see cref="T:System.Type"/> that represents the type you want to convert to</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="targetType"/> is
- assignable from a <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.PatternStringConverter.ConvertTo(System.Object,System.Type)">
- <summary>
- Converts the given value object to the specified type, using the arguments
- </summary>
- <param name="source">the object to convert</param>
- <param name="targetType">The Type to convert the value parameter to</param>
- <returns>the converted object</returns>
- <remarks>
- <para>
- Uses the <see cref="M:log4net.Util.PatternString.Format"/> method to convert the
- <see cref="T:log4net.Util.PatternString"/> argument to a <see cref="T:System.String"/>.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- <paramref name="targetType"/>. To check for this condition use the
- <see cref="M:log4net.Util.TypeConverters.PatternStringConverter.CanConvertTo(System.Type)"/> method.
- </exception>
- </member>
- <member name="M:log4net.Util.TypeConverters.PatternStringConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="sourceType"/> is
- the <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.PatternStringConverter.ConvertFrom(System.Object)">
- <summary>
- Overrides the ConvertFrom method of IConvertFrom.
- </summary>
- <param name="source">the object to convert to a PatternString</param>
- <returns>the PatternString</returns>
- <remarks>
- <para>
- Creates and returns a new <see cref="T:log4net.Util.PatternString"/> using
- the <paramref name="source"/> <see cref="T:System.String"/> as the
- <see cref="P:log4net.Util.PatternString.ConversionPattern"/>.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- target type. To check for this condition use the <see cref="M:log4net.Util.TypeConverters.PatternStringConverter.CanConvertFrom(System.Type)"/>
- method.
- </exception>
- </member>
- <member name="T:log4net.Util.TypeConverters.TypeConverter">
- <summary>
- Supports conversion from string to <see cref="T:System.Type"/> type.
- </summary>
- <remarks>
- <para>
- Supports conversion from string to <see cref="T:System.Type"/> type.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.ConverterRegistry"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertTo"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.TypeConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="sourceType"/> is
- the <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.TypeConverter.ConvertFrom(System.Object)">
- <summary>
- Overrides the ConvertFrom method of IConvertFrom.
- </summary>
- <param name="source">the object to convert to a Type</param>
- <returns>the Type</returns>
- <remarks>
- <para>
- Uses the <see cref="M:System.Type.GetType(System.String,System.Boolean)"/> method to convert the
- <see cref="T:System.String"/> argument to a <see cref="T:System.Type"/>.
- Additional effort is made to locate partially specified types
- by searching the loaded assemblies.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- target type. To check for this condition use the <see cref="M:log4net.Util.TypeConverters.TypeConverter.CanConvertFrom(System.Type)"/>
- method.
- </exception>
- </member>
- <member name="T:log4net.Util.TypeConverters.TypeConverterAttribute">
- <summary>
- Attribute used to associate a type converter
- </summary>
- <remarks>
- <para>
- Class and Interface level attribute that specifies a type converter
- to use with the associated type.
- </para>
- <para>
- To associate a type converter with a target type apply a
- <c>TypeConverterAttribute</c> to the target type. Specify the
- type of the type converter on the attribute.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Util.TypeConverters.TypeConverterAttribute.m_typeName">
- <summary>
- The string type name of the type converter
- </summary>
- </member>
- <member name="M:log4net.Util.TypeConverters.TypeConverterAttribute.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.TypeConverterAttribute.#ctor(System.String)">
- <summary>
- Create a new type converter attribute for the specified type name
- </summary>
- <param name="typeName">The string type name of the type converter</param>
- <remarks>
- <para>
- The type specified must implement the <see cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- or the <see cref="T:log4net.Util.TypeConverters.IConvertTo"/> interfaces.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.TypeConverterAttribute.#ctor(System.Type)">
- <summary>
- Create a new type converter attribute for the specified type
- </summary>
- <param name="converterType">The type of the type converter</param>
- <remarks>
- <para>
- The type specified must implement the <see cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- or the <see cref="T:log4net.Util.TypeConverters.IConvertTo"/> interfaces.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.TypeConverters.TypeConverterAttribute.ConverterTypeName">
- <summary>
- The string type name of the type converter
- </summary>
- <value>
- The string type name of the type converter
- </value>
- <remarks>
- <para>
- The type specified must implement the <see cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- or the <see cref="T:log4net.Util.TypeConverters.IConvertTo"/> interfaces.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.AppenderAttachedImpl">
- <summary>
- A straightforward implementation of the <see cref="T:log4net.Core.IAppenderAttachable"/> interface.
- </summary>
- <remarks>
- <para>
- This is the default implementation of the <see cref="T:log4net.Core.IAppenderAttachable"/>
- interface. Implementors of the <see cref="T:log4net.Core.IAppenderAttachable"/> interface
- should aggregate an instance of this type.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.AppenderAttachedImpl"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.AppendLoopOnAppenders(log4net.Core.LoggingEvent)">
- <summary>
- Append on on all attached appenders.
- </summary>
- <param name="loggingEvent">The event being logged.</param>
- <returns>The number of appenders called.</returns>
- <remarks>
- <para>
- Calls the <see cref="M:log4net.Appender.IAppender.DoAppend(log4net.Core.LoggingEvent)"/> method on all
- attached appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.AppendLoopOnAppenders(log4net.Core.LoggingEvent[])">
- <summary>
- Append on on all attached appenders.
- </summary>
- <param name="loggingEvents">The array of events being logged.</param>
- <returns>The number of appenders called.</returns>
- <remarks>
- <para>
- Calls the <see cref="M:log4net.Appender.IAppender.DoAppend(log4net.Core.LoggingEvent)"/> method on all
- attached appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.CallAppend(log4net.Appender.IAppender,log4net.Core.LoggingEvent[])">
- <summary>
- Calls the DoAppende method on the <see cref="T:log4net.Appender.IAppender"/> with
- the <see cref="T:log4net.Core.LoggingEvent"/> objects supplied.
- </summary>
- <param name="appender">The appender</param>
- <param name="loggingEvents">The events</param>
- <remarks>
- <para>
- If the <paramref name="appender"/> supports the <see cref="T:log4net.Appender.IBulkAppender"/>
- interface then the <paramref name="loggingEvents"/> will be passed
- through using that interface. Otherwise the <see cref="T:log4net.Core.LoggingEvent"/>
- objects in the array will be passed one at a time.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.AddAppender(log4net.Appender.IAppender)">
- <summary>
- Attaches an appender.
- </summary>
- <param name="newAppender">The appender to add.</param>
- <remarks>
- <para>
- If the appender is already in the list it won't be added again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.GetAppender(System.String)">
- <summary>
- Gets an attached appender with the specified name.
- </summary>
- <param name="name">The name of the appender to get.</param>
- <returns>
- The appender with the name specified, or <c>null</c> if no appender with the
- specified name is found.
- </returns>
- <remarks>
- <para>
- Lookup an attached appender by name.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.RemoveAllAppenders">
- <summary>
- Removes all attached appenders.
- </summary>
- <remarks>
- <para>
- Removes and closes all attached appenders
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.RemoveAppender(log4net.Appender.IAppender)">
- <summary>
- Removes the specified appender from the list of attached appenders.
- </summary>
- <param name="appender">The appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- <para>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.RemoveAppender(System.String)">
- <summary>
- Removes the appender with the specified name from the list of appenders.
- </summary>
- <param name="name">The name of the appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- <para>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.AppenderAttachedImpl.m_appenderList">
- <summary>
- List of appenders
- </summary>
- </member>
- <member name="F:log4net.Util.AppenderAttachedImpl.m_appenderArray">
- <summary>
- Array of appenders, used to cache the m_appenderList
- </summary>
- </member>
- <member name="P:log4net.Util.AppenderAttachedImpl.Appenders">
- <summary>
- Gets all attached appenders.
- </summary>
- <returns>
- A collection of attached appenders, or <c>null</c> if there
- are no attached appenders.
- </returns>
- <remarks>
- <para>
- The read only collection of all currently attached appenders.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.CompositeProperties">
- <summary>
- This class aggregates several PropertiesDictionary collections together.
- </summary>
- <remarks>
- <para>
- Provides a dictionary style lookup over an ordered list of
- <see cref="T:log4net.Util.PropertiesDictionary"/> collections.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.CompositeProperties.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.CompositeProperties"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CompositeProperties.Add(log4net.Util.ReadOnlyPropertiesDictionary)">
- <summary>
- Add a Properties Dictionary to this composite collection
- </summary>
- <param name="properties">the properties to add</param>
- <remarks>
- <para>
- Properties dictionaries added first take precedence over dictionaries added
- later.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CompositeProperties.Flatten">
- <summary>
- Flatten this composite collection into a single properties dictionary
- </summary>
- <returns>the flattened dictionary</returns>
- <remarks>
- <para>
- Reduces the collection of ordered dictionaries to a single dictionary
- containing the resultant values for the keys.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.CompositeProperties.Item(System.String)">
- <summary>
- Gets the value of a property
- </summary>
- <value>
- The value for the property with the specified key
- </value>
- <remarks>
- <para>
- Looks up the value for the <paramref name="key"/> specified.
- The <see cref="T:log4net.Util.PropertiesDictionary"/> collections are searched
- in the order in which they were added to this collection. The value
- returned is the value held by the first collection that contains
- the specified key.
- </para>
- <para>
- If none of the collections contain the specified key then
- <c>null</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ContextPropertiesBase">
- <summary>
- Base class for Context Properties implementations
- </summary>
- <remarks>
- <para>
- This class defines a basic property get set accessor
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="P:log4net.Util.ContextPropertiesBase.Item(System.String)">
- <summary>
- Gets or sets the value of a property
- </summary>
- <value>
- The value for the property with the specified key
- </value>
- <remarks>
- <para>
- Gets or sets the value of a property
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.CountingQuietTextWriter">
- <summary>
- Subclass of <see cref="T:log4net.Util.QuietTextWriter"/> that maintains a count of
- the number of bytes written.
- </summary>
- <remarks>
- <para>
- This writer counts the number of bytes written.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Util.QuietTextWriter">
- <summary>
- <see cref="T:System.IO.TextWriter"/> that does not leak exceptions
- </summary>
- <remarks>
- <para>
- <see cref="T:log4net.Util.QuietTextWriter"/> does not throw exceptions when things go wrong.
- Instead, it delegates error handling to its <see cref="T:log4net.Core.IErrorHandler"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Util.TextWriterAdapter">
- <summary>
- Adapter that extends <see cref="T:System.IO.TextWriter"/> and forwards all
- messages to an instance of <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <remarks>
- <para>
- Adapter that extends <see cref="T:System.IO.TextWriter"/> and forwards all
- messages to an instance of <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.TextWriterAdapter.m_writer">
- <summary>
- The writer to forward messages to
- </summary>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.#ctor(System.IO.TextWriter)">
- <summary>
- Create an instance of <see cref="T:log4net.Util.TextWriterAdapter"/> that forwards all
- messages to a <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <param name="writer">The <see cref="T:System.IO.TextWriter"/> to forward to</param>
- <remarks>
- <para>
- Create an instance of <see cref="T:log4net.Util.TextWriterAdapter"/> that forwards all
- messages to a <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.Close">
- <summary>
- Closes the writer and releases any system resources associated with the writer
- </summary>
- <remarks>
- <para>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.Dispose(System.Boolean)">
- <summary>
- Dispose this writer
- </summary>
- <param name="disposing">flag indicating if we are being disposed</param>
- <remarks>
- <para>
- Dispose this writer
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.Flush">
- <summary>
- Flushes any buffered output
- </summary>
- <remarks>
- <para>
- Clears all buffers for the writer and causes any buffered data to be written
- to the underlying device
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.Write(System.Char)">
- <summary>
- Writes a character to the wrapped TextWriter
- </summary>
- <param name="value">the value to write to the TextWriter</param>
- <remarks>
- <para>
- Writes a character to the wrapped TextWriter
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.Write(System.Char[],System.Int32,System.Int32)">
- <summary>
- Writes a character buffer to the wrapped TextWriter
- </summary>
- <param name="buffer">the data buffer</param>
- <param name="index">the start index</param>
- <param name="count">the number of characters to write</param>
- <remarks>
- <para>
- Writes a character buffer to the wrapped TextWriter
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.Write(System.String)">
- <summary>
- Writes a string to the wrapped TextWriter
- </summary>
- <param name="value">the value to write to the TextWriter</param>
- <remarks>
- <para>
- Writes a string to the wrapped TextWriter
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.TextWriterAdapter.Writer">
- <summary>
- Gets or sets the underlying <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <value>
- The underlying <see cref="T:System.IO.TextWriter"/>.
- </value>
- <remarks>
- <para>
- Gets or sets the underlying <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.TextWriterAdapter.Encoding">
- <summary>
- The Encoding in which the output is written
- </summary>
- <value>
- The <see cref="P:log4net.Util.TextWriterAdapter.Encoding"/>
- </value>
- <remarks>
- <para>
- The Encoding in which the output is written
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.TextWriterAdapter.FormatProvider">
- <summary>
- Gets an object that controls formatting
- </summary>
- <value>
- The format provider
- </value>
- <remarks>
- <para>
- Gets an object that controls formatting
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.TextWriterAdapter.NewLine">
- <summary>
- Gets or sets the line terminator string used by the TextWriter
- </summary>
- <value>
- The line terminator to use
- </value>
- <remarks>
- <para>
- Gets or sets the line terminator string used by the TextWriter
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.QuietTextWriter.#ctor(System.IO.TextWriter,log4net.Core.IErrorHandler)">
- <summary>
- Constructor
- </summary>
- <param name="writer">the writer to actually write to</param>
- <param name="errorHandler">the error handler to report error to</param>
- <remarks>
- <para>
- Create a new QuietTextWriter using a writer and error handler
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.QuietTextWriter.Write(System.Char)">
- <summary>
- Writes a character to the underlying writer
- </summary>
- <param name="value">the char to write</param>
- <remarks>
- <para>
- Writes a character to the underlying writer
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.QuietTextWriter.Write(System.Char[],System.Int32,System.Int32)">
- <summary>
- Writes a buffer to the underlying writer
- </summary>
- <param name="buffer">the buffer to write</param>
- <param name="index">the start index to write from</param>
- <param name="count">the number of characters to write</param>
- <remarks>
- <para>
- Writes a buffer to the underlying writer
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.QuietTextWriter.Write(System.String)">
- <summary>
- Writes a string to the output.
- </summary>
- <param name="value">The string data to write to the output.</param>
- <remarks>
- <para>
- Writes a string to the output.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.QuietTextWriter.Close">
- <summary>
- Closes the underlying output writer.
- </summary>
- <remarks>
- <para>
- Closes the underlying output writer.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.QuietTextWriter.m_errorHandler">
- <summary>
- The error handler instance to pass all errors to
- </summary>
- </member>
- <member name="F:log4net.Util.QuietTextWriter.m_closed">
- <summary>
- Flag to indicate if this writer is closed
- </summary>
- </member>
- <member name="P:log4net.Util.QuietTextWriter.ErrorHandler">
- <summary>
- Gets or sets the error handler that all errors are passed to.
- </summary>
- <value>
- The error handler that all errors are passed to.
- </value>
- <remarks>
- <para>
- Gets or sets the error handler that all errors are passed to.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.QuietTextWriter.Closed">
- <summary>
- Gets a value indicating whether this writer is closed.
- </summary>
- <value>
- <c>true</c> if this writer is closed, otherwise <c>false</c>.
- </value>
- <remarks>
- <para>
- Gets a value indicating whether this writer is closed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CountingQuietTextWriter.#ctor(System.IO.TextWriter,log4net.Core.IErrorHandler)">
- <summary>
- Constructor
- </summary>
- <param name="writer">The <see cref="T:System.IO.TextWriter"/> to actually write to.</param>
- <param name="errorHandler">The <see cref="T:log4net.Core.IErrorHandler"/> to report errors to.</param>
- <remarks>
- <para>
- Creates a new instance of the <see cref="T:log4net.Util.CountingQuietTextWriter"/> class
- with the specified <see cref="T:System.IO.TextWriter"/> and <see cref="T:log4net.Core.IErrorHandler"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CountingQuietTextWriter.Write(System.Char)">
- <summary>
- Writes a character to the underlying writer and counts the number of bytes written.
- </summary>
- <param name="value">the char to write</param>
- <remarks>
- <para>
- Overrides implementation of <see cref="T:log4net.Util.QuietTextWriter"/>. Counts
- the number of bytes written.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CountingQuietTextWriter.Write(System.Char[],System.Int32,System.Int32)">
- <summary>
- Writes a buffer to the underlying writer and counts the number of bytes written.
- </summary>
- <param name="buffer">the buffer to write</param>
- <param name="index">the start index to write from</param>
- <param name="count">the number of characters to write</param>
- <remarks>
- <para>
- Overrides implementation of <see cref="T:log4net.Util.QuietTextWriter"/>. Counts
- the number of bytes written.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CountingQuietTextWriter.Write(System.String)">
- <summary>
- Writes a string to the output and counts the number of bytes written.
- </summary>
- <param name="str">The string data to write to the output.</param>
- <remarks>
- <para>
- Overrides implementation of <see cref="T:log4net.Util.QuietTextWriter"/>. Counts
- the number of bytes written.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.CountingQuietTextWriter.m_countBytes">
- <summary>
- Total number of bytes written.
- </summary>
- </member>
- <member name="P:log4net.Util.CountingQuietTextWriter.Count">
- <summary>
- Gets or sets the total number of bytes written.
- </summary>
- <value>
- The total number of bytes written.
- </value>
- <remarks>
- <para>
- Gets or sets the total number of bytes written.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.CyclicBuffer">
- <summary>
- A fixed size rolling buffer of logging events.
- </summary>
- <remarks>
- <para>
- An array backed fixed size leaky bucket.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.CyclicBuffer.#ctor(System.Int32)">
- <summary>
- Constructor
- </summary>
- <param name="maxSize">The maximum number of logging events in the buffer.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.CyclicBuffer"/> class with
- the specified maximum number of buffered logging events.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="maxSize"/> argument is not a positive integer.</exception>
- </member>
- <member name="M:log4net.Util.CyclicBuffer.Append(log4net.Core.LoggingEvent)">
- <summary>
- Appends a <paramref name="loggingEvent"/> to the buffer.
- </summary>
- <param name="loggingEvent">The event to append to the buffer.</param>
- <returns>The event discarded from the buffer, if the buffer is full, otherwise <c>null</c>.</returns>
- <remarks>
- <para>
- Append an event to the buffer. If the buffer still contains free space then
- <c>null</c> is returned. If the buffer is full then an event will be dropped
- to make space for the new event, the event dropped is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CyclicBuffer.PopOldest">
- <summary>
- Get and remove the oldest event in the buffer.
- </summary>
- <returns>The oldest logging event in the buffer</returns>
- <remarks>
- <para>
- Gets the oldest (first) logging event in the buffer and removes it
- from the buffer.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CyclicBuffer.PopAll">
- <summary>
- Pops all the logging events from the buffer into an array.
- </summary>
- <returns>An array of all the logging events in the buffer.</returns>
- <remarks>
- <para>
- Get all the events in the buffer and clear the buffer.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CyclicBuffer.Clear">
- <summary>
- Clear the buffer
- </summary>
- <remarks>
- <para>
- Clear the buffer of all events. The events in the buffer are lost.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.CyclicBuffer.Item(System.Int32)">
- <summary>
- Gets the <paramref name="i"/>th oldest event currently in the buffer.
- </summary>
- <value>The <paramref name="i"/>th oldest event currently in the buffer.</value>
- <remarks>
- <para>
- If <paramref name="i"/> is outside the range 0 to the number of events
- currently in the buffer, then <c>null</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.CyclicBuffer.MaxSize">
- <summary>
- Gets the maximum size of the buffer.
- </summary>
- <value>The maximum size of the buffer.</value>
- <remarks>
- <para>
- Gets the maximum size of the buffer
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.CyclicBuffer.Length">
- <summary>
- Gets the number of logging events in the buffer.
- </summary>
- <value>The number of logging events in the buffer.</value>
- <remarks>
- <para>
- This number is guaranteed to be in the range 0 to <see cref="P:log4net.Util.CyclicBuffer.MaxSize"/>
- (inclusive).
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.EmptyCollection">
- <summary>
- An always empty <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <remarks>
- <para>
- A singleton implementation of the <see cref="T:System.Collections.ICollection"/>
- interface that always represents an empty collection.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.EmptyCollection.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.EmptyCollection"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to enforce the singleton pattern.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyCollection.CopyTo(System.Array,System.Int32)">
- <summary>
- Copies the elements of the <see cref="T:System.Collections.ICollection"/> to an
- <see cref="T:System.Array"/>, starting at a particular Array index.
- </summary>
- <param name="array">The one-dimensional <see cref="T:System.Array"/>
- that is the destination of the elements copied from
- <see cref="T:System.Collections.ICollection"/>. The Array must have zero-based
- indexing.</param>
- <param name="index">The zero-based index in array at which
- copying begins.</param>
- <remarks>
- <para>
- As the collection is empty no values are copied into the array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyCollection.GetEnumerator">
- <summary>
- Returns an enumerator that can iterate through a collection.
- </summary>
- <returns>
- An <see cref="T:System.Collections.IEnumerator"/> that can be used to
- iterate through the collection.
- </returns>
- <remarks>
- <para>
- As the collection is empty a <see cref="T:log4net.Util.NullEnumerator"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.EmptyCollection.s_instance">
- <summary>
- The singleton instance of the empty collection.
- </summary>
- </member>
- <member name="P:log4net.Util.EmptyCollection.Instance">
- <summary>
- Gets the singleton instance of the empty collection.
- </summary>
- <returns>The singleton instance of the empty collection.</returns>
- <remarks>
- <para>
- Gets the singleton instance of the empty collection.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyCollection.IsSynchronized">
- <summary>
- Gets a value indicating if access to the <see cref="T:System.Collections.ICollection"/> is synchronized (thread-safe).
- </summary>
- <value>
- <b>true</b> if access to the <see cref="T:System.Collections.ICollection"/> is synchronized (thread-safe); otherwise, <b>false</b>.
- </value>
- <remarks>
- <para>
- For the <see cref="T:log4net.Util.EmptyCollection"/> this property is always <c>true</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyCollection.Count">
- <summary>
- Gets the number of elements contained in the <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <value>
- The number of elements contained in the <see cref="T:System.Collections.ICollection"/>.
- </value>
- <remarks>
- <para>
- As the collection is empty the <see cref="P:log4net.Util.EmptyCollection.Count"/> is always <c>0</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyCollection.SyncRoot">
- <summary>
- Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <value>
- An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"/>.
- </value>
- <remarks>
- <para>
- As the collection is empty and thread safe and synchronized this instance is also
- the <see cref="P:log4net.Util.EmptyCollection.SyncRoot"/> object.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.EmptyDictionary">
- <summary>
- An always empty <see cref="T:System.Collections.IDictionary"/>.
- </summary>
- <remarks>
- <para>
- A singleton implementation of the <see cref="T:System.Collections.IDictionary"/>
- interface that always represents an empty collection.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.EmptyDictionary"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to enforce the singleton pattern.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.CopyTo(System.Array,System.Int32)">
- <summary>
- Copies the elements of the <see cref="T:System.Collections.ICollection"/> to an
- <see cref="T:System.Array"/>, starting at a particular Array index.
- </summary>
- <param name="array">The one-dimensional <see cref="T:System.Array"/>
- that is the destination of the elements copied from
- <see cref="T:System.Collections.ICollection"/>. The Array must have zero-based
- indexing.</param>
- <param name="index">The zero-based index in array at which
- copying begins.</param>
- <remarks>
- <para>
- As the collection is empty no values are copied into the array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.System#Collections#IEnumerable#GetEnumerator">
- <summary>
- Returns an enumerator that can iterate through a collection.
- </summary>
- <returns>
- An <see cref="T:System.Collections.IEnumerator"/> that can be used to
- iterate through the collection.
- </returns>
- <remarks>
- <para>
- As the collection is empty a <see cref="T:log4net.Util.NullEnumerator"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.Add(System.Object,System.Object)">
- <summary>
- Adds an element with the provided key and value to the
- <see cref="T:log4net.Util.EmptyDictionary"/>.
- </summary>
- <param name="key">The <see cref="T:System.Object"/> to use as the key of the element to add.</param>
- <param name="value">The <see cref="T:System.Object"/> to use as the value of the element to add.</param>
- <remarks>
- <para>
- As the collection is empty no new values can be added. A <see cref="T:System.InvalidOperationException"/>
- is thrown if this method is called.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">This dictionary is always empty and cannot be modified.</exception>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.Clear">
- <summary>
- Removes all elements from the <see cref="T:log4net.Util.EmptyDictionary"/>.
- </summary>
- <remarks>
- <para>
- As the collection is empty no values can be removed. A <see cref="T:System.InvalidOperationException"/>
- is thrown if this method is called.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">This dictionary is always empty and cannot be modified.</exception>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.Contains(System.Object)">
- <summary>
- Determines whether the <see cref="T:log4net.Util.EmptyDictionary"/> contains an element
- with the specified key.
- </summary>
- <param name="key">The key to locate in the <see cref="T:log4net.Util.EmptyDictionary"/>.</param>
- <returns><c>false</c></returns>
- <remarks>
- <para>
- As the collection is empty the <see cref="M:log4net.Util.EmptyDictionary.Contains(System.Object)"/> method always returns <c>false</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.GetEnumerator">
- <summary>
- Returns an enumerator that can iterate through a collection.
- </summary>
- <returns>
- An <see cref="T:System.Collections.IEnumerator"/> that can be used to
- iterate through the collection.
- </returns>
- <remarks>
- <para>
- As the collection is empty a <see cref="T:log4net.Util.NullEnumerator"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.Remove(System.Object)">
- <summary>
- Removes the element with the specified key from the <see cref="T:log4net.Util.EmptyDictionary"/>.
- </summary>
- <param name="key">The key of the element to remove.</param>
- <remarks>
- <para>
- As the collection is empty no values can be removed. A <see cref="T:System.InvalidOperationException"/>
- is thrown if this method is called.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">This dictionary is always empty and cannot be modified.</exception>
- </member>
- <member name="F:log4net.Util.EmptyDictionary.s_instance">
- <summary>
- The singleton instance of the empty dictionary.
- </summary>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.Instance">
- <summary>
- Gets the singleton instance of the <see cref="T:log4net.Util.EmptyDictionary"/>.
- </summary>
- <returns>The singleton instance of the <see cref="T:log4net.Util.EmptyDictionary"/>.</returns>
- <remarks>
- <para>
- Gets the singleton instance of the <see cref="T:log4net.Util.EmptyDictionary"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.IsSynchronized">
- <summary>
- Gets a value indicating if access to the <see cref="T:System.Collections.ICollection"/> is synchronized (thread-safe).
- </summary>
- <value>
- <b>true</b> if access to the <see cref="T:System.Collections.ICollection"/> is synchronized (thread-safe); otherwise, <b>false</b>.
- </value>
- <remarks>
- <para>
- For the <see cref="T:log4net.Util.EmptyCollection"/> this property is always <b>true</b>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.Count">
- <summary>
- Gets the number of elements contained in the <see cref="T:System.Collections.ICollection"/>
- </summary>
- <value>
- The number of elements contained in the <see cref="T:System.Collections.ICollection"/>.
- </value>
- <remarks>
- <para>
- As the collection is empty the <see cref="P:log4net.Util.EmptyDictionary.Count"/> is always <c>0</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.SyncRoot">
- <summary>
- Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <value>
- An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"/>.
- </value>
- <remarks>
- <para>
- As the collection is empty and thread safe and synchronized this instance is also
- the <see cref="P:log4net.Util.EmptyDictionary.SyncRoot"/> object.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.IsFixedSize">
- <summary>
- Gets a value indicating whether the <see cref="T:log4net.Util.EmptyDictionary"/> has a fixed size.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- As the collection is empty <see cref="P:log4net.Util.EmptyDictionary.IsFixedSize"/> always returns <c>true</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.IsReadOnly">
- <summary>
- Gets a value indicating whether the <see cref="T:log4net.Util.EmptyDictionary"/> is read-only.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- As the collection is empty <see cref="P:log4net.Util.EmptyDictionary.IsReadOnly"/> always returns <c>true</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.Keys">
- <summary>
- Gets an <see cref="T:System.Collections.ICollection"/> containing the keys of the <see cref="T:log4net.Util.EmptyDictionary"/>.
- </summary>
- <value>An <see cref="T:System.Collections.ICollection"/> containing the keys of the <see cref="T:log4net.Util.EmptyDictionary"/>.</value>
- <remarks>
- <para>
- As the collection is empty a <see cref="T:log4net.Util.EmptyCollection"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.Values">
- <summary>
- Gets an <see cref="T:System.Collections.ICollection"/> containing the values of the <see cref="T:log4net.Util.EmptyDictionary"/>.
- </summary>
- <value>An <see cref="T:System.Collections.ICollection"/> containing the values of the <see cref="T:log4net.Util.EmptyDictionary"/>.</value>
- <remarks>
- <para>
- As the collection is empty a <see cref="T:log4net.Util.EmptyCollection"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.Item(System.Object)">
- <summary>
- Gets or sets the element with the specified key.
- </summary>
- <param name="key">The key of the element to get or set.</param>
- <value><c>null</c></value>
- <remarks>
- <para>
- As the collection is empty no values can be looked up or stored.
- If the index getter is called then <c>null</c> is returned.
- A <see cref="T:System.InvalidOperationException"/> is thrown if the setter is called.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">This dictionary is always empty and cannot be modified.</exception>
- </member>
- <member name="T:log4net.Util.FormattingInfo">
- <summary>
- Contain the information obtained when parsing formatting modifiers
- in conversion modifiers.
- </summary>
- <remarks>
- <para>
- Holds the formatting information extracted from the format string by
- the <see cref="T:log4net.Util.PatternParser"/>. This is used by the <see cref="T:log4net.Util.PatternConverter"/>
- objects when rendering the output.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.FormattingInfo.#ctor">
- <summary>
- Defaut Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.FormattingInfo"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.FormattingInfo.#ctor(System.Int32,System.Int32,System.Boolean)">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.FormattingInfo"/> class
- with the specified parameters.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.FormattingInfo.Min">
- <summary>
- Gets or sets the minimum value.
- </summary>
- <value>
- The minimum value.
- </value>
- <remarks>
- <para>
- Gets or sets the minimum value.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.FormattingInfo.Max">
- <summary>
- Gets or sets the maximum value.
- </summary>
- <value>
- The maximum value.
- </value>
- <remarks>
- <para>
- Gets or sets the maximum value.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.FormattingInfo.LeftAlign">
- <summary>
- Gets or sets a flag indicating whether left align is enabled
- or not.
- </summary>
- <value>
- A flag indicating whether left align is enabled or not.
- </value>
- <remarks>
- <para>
- Gets or sets a flag indicating whether left align is enabled or not.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.GlobalContextProperties">
- <summary>
- Implementation of Properties collection for the <see cref="T:log4net.GlobalContext"/>
- </summary>
- <remarks>
- <para>
- This class implements a properties collection that is thread safe and supports both
- storing properties and capturing a read only copy of the current propertied.
- </para>
- <para>
- This class is optimized to the scenario where the properties are read frequently
- and are modified infrequently.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.GlobalContextProperties.m_readOnlyProperties">
- <summary>
- The read only copy of the properties.
- </summary>
- <remarks>
- <para>
- This variable is declared <c>volatile</c> to prevent the compiler and JIT from
- reordering reads and writes of this thread performed on different threads.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.GlobalContextProperties.m_syncRoot">
- <summary>
- Lock object used to synchronize updates within this instance
- </summary>
- </member>
- <member name="M:log4net.Util.GlobalContextProperties.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.GlobalContextProperties"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.GlobalContextProperties.Remove(System.String)">
- <summary>
- Remove a property from the global context
- </summary>
- <param name="key">the key for the entry to remove</param>
- <remarks>
- <para>
- Removing an entry from the global context properties is relatively expensive compared
- with reading a value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.GlobalContextProperties.Clear">
- <summary>
- Clear the global context properties
- </summary>
- </member>
- <member name="M:log4net.Util.GlobalContextProperties.GetReadOnlyProperties">
- <summary>
- Get a readonly immutable copy of the properties
- </summary>
- <returns>the current global context properties</returns>
- <remarks>
- <para>
- This implementation is fast because the GlobalContextProperties class
- stores a readonly copy of the properties.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.GlobalContextProperties.Item(System.String)">
- <summary>
- Gets or sets the value of a property
- </summary>
- <value>
- The value for the property with the specified key
- </value>
- <remarks>
- <para>
- Reading the value for a key is faster than setting the value.
- When the value is written a new read only copy of
- the properties is created.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.LevelMapping">
- <summary>
- Manages a mapping from levels to <see cref="T:log4net.Util.LevelMappingEntry"/>
- </summary>
- <remarks>
- <para>
- Manages an ordered mapping from <see cref="T:log4net.Core.Level"/> instances
- to <see cref="T:log4net.Util.LevelMappingEntry"/> subclasses.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.LevelMapping.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Initialise a new instance of <see cref="T:log4net.Util.LevelMapping"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LevelMapping.Add(log4net.Util.LevelMappingEntry)">
- <summary>
- Add a <see cref="T:log4net.Util.LevelMappingEntry"/> to this mapping
- </summary>
- <param name="entry">the entry to add</param>
- <remarks>
- <para>
- If a <see cref="T:log4net.Util.LevelMappingEntry"/> has previously been added
- for the same <see cref="T:log4net.Core.Level"/> then that entry will be
- overwritten.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LevelMapping.Lookup(log4net.Core.Level)">
- <summary>
- Lookup the mapping for the specified level
- </summary>
- <param name="level">the level to lookup</param>
- <returns>the <see cref="T:log4net.Util.LevelMappingEntry"/> for the level or <c>null</c> if no mapping found</returns>
- <remarks>
- <para>
- Lookup the value for the specified level. Finds the nearest
- mapping value for the level that is equal to or less than the
- <paramref name="level"/> specified.
- </para>
- <para>
- If no mapping could be found then <c>null</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LevelMapping.ActivateOptions">
- <summary>
- Initialize options
- </summary>
- <remarks>
- <para>
- Caches the sorted list of <see cref="T:log4net.Util.LevelMappingEntry"/> in an array
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.LogicalThreadContextProperties">
- <summary>
- Implementation of Properties collection for the <see cref="T:log4net.LogicalThreadContext"/>
- </summary>
- <remarks>
- <para>
- Class implements a collection of properties that is specific to each thread.
- The class is not synchronized as each thread has its own <see cref="T:log4net.Util.PropertiesDictionary"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.LogicalThreadContextProperties.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.LogicalThreadContextProperties"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogicalThreadContextProperties.Remove(System.String)">
- <summary>
- Remove a property
- </summary>
- <param name="key">the key for the entry to remove</param>
- <remarks>
- <para>
- Remove the value for the specified <paramref name="key"/> from the context.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogicalThreadContextProperties.Clear">
- <summary>
- Clear all the context properties
- </summary>
- <remarks>
- <para>
- Clear all the context properties
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogicalThreadContextProperties.GetProperties(System.Boolean)">
- <summary>
- Get the PropertiesDictionary stored in the LocalDataStoreSlot for this thread.
- </summary>
- <param name="create">create the dictionary if it does not exist, otherwise return null if is does not exist</param>
- <returns>the properties for this thread</returns>
- <remarks>
- <para>
- The collection returned is only to be used on the calling thread. If the
- caller needs to share the collection between different threads then the
- caller must clone the collection before doings so.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.LogicalThreadContextProperties.Item(System.String)">
- <summary>
- Gets or sets the value of a property
- </summary>
- <value>
- The value for the property with the specified key
- </value>
- <remarks>
- <para>
- Get or set the property value for the <paramref name="key"/> specified.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.LogLog">
- <summary>
- Outputs log statements from within the log4net assembly.
- </summary>
- <remarks>
- <para>
- Log4net components cannot make log4net logging calls. However, it is
- sometimes useful for the user to learn about what log4net is
- doing.
- </para>
- <para>
- All log4net internal debug calls go to the standard output stream
- whereas internal error messages are sent to the standard error output
- stream.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.LogLog.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.LogLog"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to prevent instantiation of this class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.#cctor">
- <summary>
- Static constructor that initializes logging by reading
- settings from the application configuration file.
- </summary>
- <remarks>
- <para>
- The <c>log4net.Internal.Debug</c> application setting
- controls internal debugging. This setting should be set
- to <c>true</c> to enable debugging.
- </para>
- <para>
- The <c>log4net.Internal.Quiet</c> application setting
- suppresses all internal logging including error messages.
- This setting should be set to <c>true</c> to enable message
- suppression.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.Debug(System.String)">
- <summary>
- Writes log4net internal debug messages to the
- standard output stream.
- </summary>
- <param name="message">The message to log.</param>
- <remarks>
- <para>
- All internal debug messages are prepended with
- the string "log4net: ".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.Debug(System.String,System.Exception)">
- <summary>
- Writes log4net internal debug messages to the
- standard output stream.
- </summary>
- <param name="message">The message to log.</param>
- <param name="exception">An exception to log.</param>
- <remarks>
- <para>
- All internal debug messages are prepended with
- the string "log4net: ".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.Warn(System.String)">
- <summary>
- Writes log4net internal warning messages to the
- standard error stream.
- </summary>
- <param name="message">The message to log.</param>
- <remarks>
- <para>
- All internal warning messages are prepended with
- the string "log4net:WARN ".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.Warn(System.String,System.Exception)">
- <summary>
- Writes log4net internal warning messages to the
- standard error stream.
- </summary>
- <param name="message">The message to log.</param>
- <param name="exception">An exception to log.</param>
- <remarks>
- <para>
- All internal warning messages are prepended with
- the string "log4net:WARN ".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.Error(System.String)">
- <summary>
- Writes log4net internal error messages to the
- standard error stream.
- </summary>
- <param name="message">The message to log.</param>
- <remarks>
- <para>
- All internal error messages are prepended with
- the string "log4net:ERROR ".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.Error(System.String,System.Exception)">
- <summary>
- Writes log4net internal error messages to the
- standard error stream.
- </summary>
- <param name="message">The message to log.</param>
- <param name="exception">An exception to log.</param>
- <remarks>
- <para>
- All internal debug messages are prepended with
- the string "log4net:ERROR ".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.EmitOutLine(System.String)">
- <summary>
- Writes output to the standard output stream.
- </summary>
- <param name="message">The message to log.</param>
- <remarks>
- <para>
- Writes to both Console.Out and System.Diagnostics.Trace.
- Note that the System.Diagnostics.Trace is not supported
- on the Compact Framework.
- </para>
- <para>
- If the AppDomain is not configured with a config file then
- the call to System.Diagnostics.Trace may fail. This is only
- an issue if you are programmatically creating your own AppDomains.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.EmitErrorLine(System.String)">
- <summary>
- Writes output to the standard error stream.
- </summary>
- <param name="message">The message to log.</param>
- <remarks>
- <para>
- Writes to both Console.Error and System.Diagnostics.Trace.
- Note that the System.Diagnostics.Trace is not supported
- on the Compact Framework.
- </para>
- <para>
- If the AppDomain is not configured with a config file then
- the call to System.Diagnostics.Trace may fail. This is only
- an issue if you are programmatically creating your own AppDomains.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.LogLog.s_debugEnabled">
- <summary>
- Default debug level
- </summary>
- </member>
- <member name="F:log4net.Util.LogLog.s_quietMode">
- <summary>
- In quietMode not even errors generate any output.
- </summary>
- </member>
- <member name="P:log4net.Util.LogLog.InternalDebugging">
- <summary>
- Gets or sets a value indicating whether log4net internal logging
- is enabled or disabled.
- </summary>
- <value>
- <c>true</c> if log4net internal logging is enabled, otherwise
- <c>false</c>.
- </value>
- <remarks>
- <para>
- When set to <c>true</c>, internal debug level logging will be
- displayed.
- </para>
- <para>
- This value can be set by setting the application setting
- <c>log4net.Internal.Debug</c> in the application configuration
- file.
- </para>
- <para>
- The default value is <c>false</c>, i.e. debugging is
- disabled.
- </para>
- </remarks>
- <example>
- <para>
- The following example enables internal debugging using the
- application configuration file :
- </para>
- <code lang="XML" escaped="true">
- <configuration>
- <appSettings>
- <add key="log4net.Internal.Debug" value="true" />
- </appSettings>
- </configuration>
- </code>
- </example>
- </member>
- <member name="P:log4net.Util.LogLog.QuietMode">
- <summary>
- Gets or sets a value indicating whether log4net should generate no output
- from internal logging, not even for errors.
- </summary>
- <value>
- <c>true</c> if log4net should generate no output at all from internal
- logging, otherwise <c>false</c>.
- </value>
- <remarks>
- <para>
- When set to <c>true</c> will cause internal logging at all levels to be
- suppressed. This means that no warning or error reports will be logged.
- This option overrides the <see cref="P:log4net.Util.LogLog.InternalDebugging"/> setting and
- disables all debug also.
- </para>
- <para>This value can be set by setting the application setting
- <c>log4net.Internal.Quiet</c> in the application configuration file.
- </para>
- <para>
- The default value is <c>false</c>, i.e. internal logging is not
- disabled.
- </para>
- </remarks>
- <example>
- The following example disables internal logging using the
- application configuration file :
- <code lang="XML" escaped="true">
- <configuration>
- <appSettings>
- <add key="log4net.Internal.Quiet" value="true"/>
- </appSettings>
- </configuration>
- </code>
- </example>
- </member>
- <member name="P:log4net.Util.LogLog.IsDebugEnabled">
- <summary>
- Test if LogLog.Debug is enabled for output.
- </summary>
- <value>
- <c>true</c> if Debug is enabled
- </value>
- <remarks>
- <para>
- Test if LogLog.Debug is enabled for output.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.LogLog.IsWarnEnabled">
- <summary>
- Test if LogLog.Warn is enabled for output.
- </summary>
- <value>
- <c>true</c> if Warn is enabled
- </value>
- <remarks>
- <para>
- Test if LogLog.Warn is enabled for output.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.LogLog.IsErrorEnabled">
- <summary>
- Test if LogLog.Error is enabled for output.
- </summary>
- <value>
- <c>true</c> if Error is enabled
- </value>
- <remarks>
- <para>
- Test if LogLog.Error is enabled for output.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.NativeError">
- <summary>
- Represents a native error code and message.
- </summary>
- <remarks>
- <para>
- Represents a Win32 platform native error.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.NativeError.#ctor(System.Int32,System.String)">
- <summary>
- Create an instance of the <see cref="T:log4net.Util.NativeError"/> class with the specified
- error number and message.
- </summary>
- <param name="number">The number of the native error.</param>
- <param name="message">The message of the native error.</param>
- <remarks>
- <para>
- Create an instance of the <see cref="T:log4net.Util.NativeError"/> class with the specified
- error number and message.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NativeError.GetLastError">
- <summary>
- Create a new instance of the <see cref="T:log4net.Util.NativeError"/> class for the last Windows error.
- </summary>
- <returns>
- An instance of the <see cref="T:log4net.Util.NativeError"/> class for the last windows error.
- </returns>
- <remarks>
- <para>
- The message for the <see cref="M:System.Runtime.InteropServices.Marshal.GetLastWin32Error"/> error number is lookup up using the
- native Win32 <c>FormatMessage</c> function.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NativeError.GetError(System.Int32)">
- <summary>
- Create a new instance of the <see cref="T:log4net.Util.NativeError"/> class.
- </summary>
- <param name="number">the error number for the native error</param>
- <returns>
- An instance of the <see cref="T:log4net.Util.NativeError"/> class for the specified
- error number.
- </returns>
- <remarks>
- <para>
- The message for the specified error number is lookup up using the
- native Win32 <c>FormatMessage</c> function.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NativeError.GetErrorMessage(System.Int32)">
- <summary>
- Retrieves the message corresponding with a Win32 message identifier.
- </summary>
- <param name="messageId">Message identifier for the requested message.</param>
- <returns>
- The message corresponding with the specified message identifier.
- </returns>
- <remarks>
- <para>
- The message will be searched for in system message-table resource(s)
- using the native <c>FormatMessage</c> function.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NativeError.ToString">
- <summary>
- Return error information string
- </summary>
- <returns>error information string</returns>
- <remarks>
- <para>
- Return error information string
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NativeError.FormatMessage(System.Int32,System.IntPtr@,System.Int32,System.Int32,System.String@,System.Int32,System.IntPtr)">
- <summary>
- Formats a message string.
- </summary>
- <param name="dwFlags">Formatting options, and how to interpret the <paramref name="lpSource"/> parameter.</param>
- <param name="lpSource">Location of the message definition.</param>
- <param name="dwMessageId">Message identifier for the requested message.</param>
- <param name="dwLanguageId">Language identifier for the requested message.</param>
- <param name="lpBuffer">If <paramref name="dwFlags"/> includes FORMAT_MESSAGE_ALLOCATE_BUFFER, the function allocates a buffer using the <c>LocalAlloc</c> function, and places the pointer to the buffer at the address specified in <paramref name="lpBuffer"/>.</param>
- <param name="nSize">If the FORMAT_MESSAGE_ALLOCATE_BUFFER flag is not set, this parameter specifies the maximum number of TCHARs that can be stored in the output buffer. If FORMAT_MESSAGE_ALLOCATE_BUFFER is set, this parameter specifies the minimum number of TCHARs to allocate for an output buffer.</param>
- <param name="Arguments">Pointer to an array of values that are used as insert values in the formatted message.</param>
- <remarks>
- <para>
- The function requires a message definition as input. The message definition can come from a
- buffer passed into the function. It can come from a message table resource in an
- already-loaded module. Or the caller can ask the function to search the system's message
- table resource(s) for the message definition. The function finds the message definition
- in a message table resource based on a message identifier and a language identifier.
- The function copies the formatted message text to an output buffer, processing any embedded
- insert sequences if requested.
- </para>
- <para>
- To prevent the usage of unsafe code, this stub does not support inserting values in the formatted message.
- </para>
- </remarks>
- <returns>
- <para>
- If the function succeeds, the return value is the number of TCHARs stored in the output
- buffer, excluding the terminating null character.
- </para>
- <para>
- If the function fails, the return value is zero. To get extended error information,
- call <see cref="M:System.Runtime.InteropServices.Marshal.GetLastWin32Error"/>.
- </para>
- </returns>
- </member>
- <member name="P:log4net.Util.NativeError.Number">
- <summary>
- Gets the number of the native error.
- </summary>
- <value>
- The number of the native error.
- </value>
- <remarks>
- <para>
- Gets the number of the native error.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.NativeError.Message">
- <summary>
- Gets the message of the native error.
- </summary>
- <value>
- The message of the native error.
- </value>
- <remarks>
- <para>
- </para>
- Gets the message of the native error.
- </remarks>
- </member>
- <member name="T:log4net.Util.NullDictionaryEnumerator">
- <summary>
- An always empty <see cref="T:System.Collections.IDictionaryEnumerator"/>.
- </summary>
- <remarks>
- <para>
- A singleton implementation of the <see cref="T:System.Collections.IDictionaryEnumerator"/> over a collection
- that is empty and not modifiable.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.NullDictionaryEnumerator.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.NullDictionaryEnumerator"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to enforce the singleton pattern.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NullDictionaryEnumerator.MoveNext">
- <summary>
- Test if the enumerator can advance, if so advance.
- </summary>
- <returns><c>false</c> as the <see cref="T:log4net.Util.NullDictionaryEnumerator"/> cannot advance.</returns>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="M:log4net.Util.NullDictionaryEnumerator.MoveNext"/>
- will always return <c>false</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NullDictionaryEnumerator.Reset">
- <summary>
- Resets the enumerator back to the start.
- </summary>
- <remarks>
- <para>
- As the enumerator is over an empty collection <see cref="M:log4net.Util.NullDictionaryEnumerator.Reset"/> does nothing.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.NullDictionaryEnumerator.s_instance">
- <summary>
- The singleton instance of the <see cref="T:log4net.Util.NullDictionaryEnumerator"/>.
- </summary>
- </member>
- <member name="P:log4net.Util.NullDictionaryEnumerator.Instance">
- <summary>
- Gets the singleton instance of the <see cref="T:log4net.Util.NullDictionaryEnumerator"/>.
- </summary>
- <returns>The singleton instance of the <see cref="T:log4net.Util.NullDictionaryEnumerator"/>.</returns>
- <remarks>
- <para>
- Gets the singleton instance of the <see cref="T:log4net.Util.NullDictionaryEnumerator"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.NullDictionaryEnumerator.Current">
- <summary>
- Gets the current object from the enumerator.
- </summary>
- <remarks>
- Throws an <see cref="T:System.InvalidOperationException"/> because the
- <see cref="T:log4net.Util.NullDictionaryEnumerator"/> never has a current value.
- </remarks>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- will throw an <see cref="T:System.InvalidOperationException"/>.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">The collection is empty and <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- cannot be positioned over a valid location.</exception>
- </member>
- <member name="P:log4net.Util.NullDictionaryEnumerator.Key">
- <summary>
- Gets the current key from the enumerator.
- </summary>
- <remarks>
- Throws an exception because the <see cref="T:log4net.Util.NullDictionaryEnumerator"/>
- never has a current value.
- </remarks>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="P:log4net.Util.NullDictionaryEnumerator.Key"/>
- will throw an <see cref="T:System.InvalidOperationException"/>.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">The collection is empty and <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- cannot be positioned over a valid location.</exception>
- </member>
- <member name="P:log4net.Util.NullDictionaryEnumerator.Value">
- <summary>
- Gets the current value from the enumerator.
- </summary>
- <value>The current value from the enumerator.</value>
- <remarks>
- Throws an <see cref="T:System.InvalidOperationException"/> because the
- <see cref="T:log4net.Util.NullDictionaryEnumerator"/> never has a current value.
- </remarks>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="P:log4net.Util.NullDictionaryEnumerator.Value"/>
- will throw an <see cref="T:System.InvalidOperationException"/>.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">The collection is empty and <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- cannot be positioned over a valid location.</exception>
- </member>
- <member name="P:log4net.Util.NullDictionaryEnumerator.Entry">
- <summary>
- Gets the current entry from the enumerator.
- </summary>
- <remarks>
- Throws an <see cref="T:System.InvalidOperationException"/> because the
- <see cref="T:log4net.Util.NullDictionaryEnumerator"/> never has a current entry.
- </remarks>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="P:log4net.Util.NullDictionaryEnumerator.Entry"/>
- will throw an <see cref="T:System.InvalidOperationException"/>.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">The collection is empty and <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- cannot be positioned over a valid location.</exception>
- </member>
- <member name="T:log4net.Util.NullEnumerator">
- <summary>
- An always empty <see cref="T:System.Collections.IEnumerator"/>.
- </summary>
- <remarks>
- <para>
- A singleton implementation of the <see cref="T:System.Collections.IEnumerator"/> over a collection
- that is empty and not modifiable.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.NullEnumerator.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.NullEnumerator"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to enforce the singleton pattern.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NullEnumerator.MoveNext">
- <summary>
- Test if the enumerator can advance, if so advance
- </summary>
- <returns><c>false</c> as the <see cref="T:log4net.Util.NullEnumerator"/> cannot advance.</returns>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="M:log4net.Util.NullEnumerator.MoveNext"/>
- will always return <c>false</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NullEnumerator.Reset">
- <summary>
- Resets the enumerator back to the start.
- </summary>
- <remarks>
- <para>
- As the enumerator is over an empty collection <see cref="M:log4net.Util.NullEnumerator.Reset"/> does nothing.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.NullEnumerator.s_instance">
- <summary>
- The singleton instance of the <see cref="T:log4net.Util.NullEnumerator"/>.
- </summary>
- </member>
- <member name="P:log4net.Util.NullEnumerator.Instance">
- <summary>
- Get the singleton instance of the <see cref="T:log4net.Util.NullEnumerator"/>.
- </summary>
- <returns>The singleton instance of the <see cref="T:log4net.Util.NullEnumerator"/>.</returns>
- <remarks>
- <para>
- Gets the singleton instance of the <see cref="T:log4net.Util.NullEnumerator"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.NullEnumerator.Current">
- <summary>
- Gets the current object from the enumerator.
- </summary>
- <remarks>
- Throws an <see cref="T:System.InvalidOperationException"/> because the
- <see cref="T:log4net.Util.NullDictionaryEnumerator"/> never has a current value.
- </remarks>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="P:log4net.Util.NullEnumerator.Current"/>
- will throw an <see cref="T:System.InvalidOperationException"/>.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">The collection is empty and <see cref="P:log4net.Util.NullEnumerator.Current"/>
- cannot be positioned over a valid location.</exception>
- </member>
- <member name="T:log4net.Util.NullSecurityContext">
- <summary>
- A SecurityContext used when a SecurityContext is not required
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.Util.NullSecurityContext"/> is a no-op implementation of the
- <see cref="T:log4net.Core.SecurityContext"/> base class. It is used where a <see cref="T:log4net.Core.SecurityContext"/>
- is required but one has not been provided.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.NullSecurityContext.Instance">
- <summary>
- Singleton instance of <see cref="T:log4net.Util.NullSecurityContext"/>
- </summary>
- <remarks>
- <para>
- Singleton instance of <see cref="T:log4net.Util.NullSecurityContext"/>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NullSecurityContext.#ctor">
- <summary>
- Private constructor
- </summary>
- <remarks>
- <para>
- Private constructor for singleton pattern.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NullSecurityContext.Impersonate(System.Object)">
- <summary>
- Impersonate this SecurityContext
- </summary>
- <param name="state">State supplied by the caller</param>
- <returns><c>null</c></returns>
- <remarks>
- <para>
- No impersonation is done and <c>null</c> is always returned.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.OnlyOnceErrorHandler">
- <summary>
- Implements log4net's default error handling policy which consists
- of emitting a message for the first error in an appender and
- ignoring all subsequent errors.
- </summary>
- <remarks>
- <para>
- The error message is printed on the standard error output stream.
- </para>
- <para>
- This policy aims at protecting an otherwise working application
- from being flooded with error messages when logging fails.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.OnlyOnceErrorHandler.#ctor">
- <summary>
- Default Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.OnlyOnceErrorHandler"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OnlyOnceErrorHandler.#ctor(System.String)">
- <summary>
- Constructor
- </summary>
- <param name="prefix">The prefix to use for each message.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.OnlyOnceErrorHandler"/> class
- with the specified prefix.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OnlyOnceErrorHandler.Error(System.String,System.Exception,log4net.Core.ErrorCode)">
- <summary>
- Log an Error
- </summary>
- <param name="message">The error message.</param>
- <param name="e">The exception.</param>
- <param name="errorCode">The internal error code.</param>
- <remarks>
- <para>
- Prints the message and the stack trace of the exception on the standard
- error output stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OnlyOnceErrorHandler.Error(System.String,System.Exception)">
- <summary>
- Log an Error
- </summary>
- <param name="message">The error message.</param>
- <param name="e">The exception.</param>
- <remarks>
- <para>
- Prints the message and the stack trace of the exception on the standard
- error output stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OnlyOnceErrorHandler.Error(System.String)">
- <summary>
- Log an error
- </summary>
- <param name="message">The error message.</param>
- <remarks>
- <para>
- Print a the error message passed as parameter on the standard
- error output stream.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.OnlyOnceErrorHandler.m_firstTime">
- <summary>
- Flag to indicate if it is the first error
- </summary>
- </member>
- <member name="F:log4net.Util.OnlyOnceErrorHandler.m_prefix">
- <summary>
- String to prefix each message with
- </summary>
- </member>
- <member name="P:log4net.Util.OnlyOnceErrorHandler.IsEnabled">
- <summary>
- Is error logging enabled
- </summary>
- <remarks>
- <para>
- Is error logging enabled. Logging is only enabled for the
- first error delivered to the <see cref="T:log4net.Util.OnlyOnceErrorHandler"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.OptionConverter">
- <summary>
- A convenience class to convert property values to specific types.
- </summary>
- <remarks>
- <para>
- Utility functions for converting types and parsing values.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.OptionConverter.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.OptionConverter"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to prevent instantiation of this class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.ToBoolean(System.String,System.Boolean)">
- <summary>
- Converts a string to a <see cref="T:System.Boolean"/> value.
- </summary>
- <param name="argValue">String to convert.</param>
- <param name="defaultValue">The default value.</param>
- <returns>The <see cref="T:System.Boolean"/> value of <paramref name="argValue"/>.</returns>
- <remarks>
- <para>
- If <paramref name="argValue"/> is "true", then <c>true</c> is returned.
- If <paramref name="argValue"/> is "false", then <c>false</c> is returned.
- Otherwise, <paramref name="defaultValue"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.ToFileSize(System.String,System.Int64)">
- <summary>
- Parses a file size into a number.
- </summary>
- <param name="argValue">String to parse.</param>
- <param name="defaultValue">The default value.</param>
- <returns>The <see cref="T:System.Int64"/> value of <paramref name="argValue"/>.</returns>
- <remarks>
- <para>
- Parses a file size of the form: number[KB|MB|GB] into a
- long value. It is scaled with the appropriate multiplier.
- </para>
- <para>
- <paramref name="defaultValue"/> is returned when <paramref name="argValue"/>
- cannot be converted to a <see cref="T:System.Int64"/> value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.ConvertStringTo(System.Type,System.String)">
- <summary>
- Converts a string to an object.
- </summary>
- <param name="target">The target type to convert to.</param>
- <param name="txt">The string to convert to an object.</param>
- <returns>
- The object converted from a string or <c>null</c> when the
- conversion failed.
- </returns>
- <remarks>
- <para>
- Converts a string to an object. Uses the converter registry to try
- to convert the string value into the specified target type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.CanConvertTypeTo(System.Type,System.Type)">
- <summary>
- Checks if there is an appropriate type conversion from the source type to the target type.
- </summary>
- <param name="sourceType">The type to convert from.</param>
- <param name="targetType">The type to convert to.</param>
- <returns><c>true</c> if there is a conversion from the source type to the target type.</returns>
- <remarks>
- Checks if there is an appropriate type conversion from the source type to the target type.
- <para>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.ConvertTypeTo(System.Object,System.Type)">
- <summary>
- Converts an object to the target type.
- </summary>
- <param name="sourceInstance">The object to convert to the target type.</param>
- <param name="targetType">The type to convert to.</param>
- <returns>The converted object.</returns>
- <remarks>
- <para>
- Converts an object to the target type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.InstantiateByClassName(System.String,System.Type,System.Object)">
- <summary>
- Instantiates an object given a class name.
- </summary>
- <param name="className">The fully qualified class name of the object to instantiate.</param>
- <param name="superClass">The class to which the new object should belong.</param>
- <param name="defaultValue">The object to return in case of non-fulfillment.</param>
- <returns>
- An instance of the <paramref name="className"/> or <paramref name="defaultValue"/>
- if the object could not be instantiated.
- </returns>
- <remarks>
- <para>
- Checks that the <paramref name="className"/> is a subclass of
- <paramref name="superClass"/>. If that test fails or the object could
- not be instantiated, then <paramref name="defaultValue"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.SubstituteVariables(System.String,System.Collections.IDictionary)">
- <summary>
- Performs variable substitution in string <paramref name="val"/> from the
- values of keys found in <paramref name="props"/>.
- </summary>
- <param name="value">The string on which variable substitution is performed.</param>
- <param name="props">The dictionary to use to lookup variables.</param>
- <returns>The result of the substitutions.</returns>
- <remarks>
- <para>
- The variable substitution delimiters are <b>${</b> and <b>}</b>.
- </para>
- <para>
- For example, if props contains <c>key=value</c>, then the call
- </para>
- <para>
- <code lang="C#">
- string s = OptionConverter.SubstituteVariables("Value of key is ${key}.");
- </code>
- </para>
- <para>
- will set the variable <c>s</c> to "Value of key is value.".
- </para>
- <para>
- If no value could be found for the specified key, then substitution
- defaults to an empty string.
- </para>
- <para>
- For example, if system properties contains no value for the key
- "nonExistentKey", then the call
- </para>
- <para>
- <code lang="C#">
- string s = OptionConverter.SubstituteVariables("Value of nonExistentKey is [${nonExistentKey}]");
- </code>
- </para>
- <para>
- will set <s>s</s> to "Value of nonExistentKey is []".
- </para>
- <para>
- An Exception is thrown if <paramref name="value"/> contains a start
- delimiter "${" which is not balanced by a stop delimiter "}".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.ParseEnum(System.Type,System.String,System.Boolean)">
- <summary>
- Converts the string representation of the name or numeric value of one or
- more enumerated constants to an equivalent enumerated object.
- </summary>
- <param name="enumType">The type to convert to.</param>
- <param name="value">The enum string value.</param>
- <param name="ignoreCase">If <c>true</c>, ignore case; otherwise, regard case.</param>
- <returns>An object of type <paramref name="enumType" /> whose value is represented by <paramref name="value" />.</returns>
- </member>
- <member name="T:log4net.Util.PatternParser">
- <summary>
- Most of the work of the <see cref="T:log4net.Layout.PatternLayout"/> class
- is delegated to the PatternParser class.
- </summary>
- <remarks>
- <para>
- The <c>PatternParser</c> processes a pattern string and
- returns a chain of <see cref="T:log4net.Util.PatternConverter"/> objects.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.PatternParser.#ctor(System.String)">
- <summary>
- Constructor
- </summary>
- <param name="pattern">The pattern to parse.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.PatternParser"/> class
- with the specified pattern string.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternParser.Parse">
- <summary>
- Parses the pattern into a chain of pattern converters.
- </summary>
- <returns>The head of a chain of pattern converters.</returns>
- <remarks>
- <para>
- Parses the pattern into a chain of pattern converters.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternParser.BuildCache">
- <summary>
- Build the unified cache of converters from the static and instance maps
- </summary>
- <returns>the list of all the converter names</returns>
- <remarks>
- <para>
- Build the unified cache of converters from the static and instance maps
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternParser.ParseInternal(System.String,System.String[])">
- <summary>
- Internal method to parse the specified pattern to find specified matches
- </summary>
- <param name="pattern">the pattern to parse</param>
- <param name="matches">the converter names to match in the pattern</param>
- <remarks>
- <para>
- The matches param must be sorted such that longer strings come before shorter ones.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternParser.ProcessLiteral(System.String)">
- <summary>
- Process a parsed literal
- </summary>
- <param name="text">the literal text</param>
- </member>
- <member name="M:log4net.Util.PatternParser.ProcessConverter(System.String,System.String,log4net.Util.FormattingInfo)">
- <summary>
- Process a parsed converter pattern
- </summary>
- <param name="converterName">the name of the converter</param>
- <param name="option">the optional option for the converter</param>
- <param name="formattingInfo">the formatting info for the converter</param>
- </member>
- <member name="M:log4net.Util.PatternParser.AddConverter(log4net.Util.PatternConverter)">
- <summary>
- Resets the internal state of the parser and adds the specified pattern converter
- to the chain.
- </summary>
- <param name="pc">The pattern converter to add.</param>
- </member>
- <member name="F:log4net.Util.PatternParser.m_head">
- <summary>
- The first pattern converter in the chain
- </summary>
- </member>
- <member name="F:log4net.Util.PatternParser.m_tail">
- <summary>
- the last pattern converter in the chain
- </summary>
- </member>
- <member name="F:log4net.Util.PatternParser.m_pattern">
- <summary>
- The pattern
- </summary>
- </member>
- <member name="F:log4net.Util.PatternParser.m_patternConverters">
- <summary>
- Internal map of converter identifiers to converter types
- </summary>
- <remarks>
- <para>
- This map overrides the static s_globalRulesRegistry map.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PatternParser.PatternConverters">
- <summary>
- Get the converter registry used by this parser
- </summary>
- <value>
- The converter registry used by this parser
- </value>
- <remarks>
- <para>
- Get the converter registry used by this parser
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternParser.StringLengthComparer">
- <summary>
- Sort strings by length
- </summary>
- <remarks>
- <para>
- <see cref="T:System.Collections.IComparer"/> that orders strings by string length.
- The longest strings are placed first
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternString">
- <summary>
- This class implements a patterned string.
- </summary>
- <remarks>
- <para>
- This string has embedded patterns that are resolved and expanded
- when the string is formatted.
- </para>
- <para>
- This class functions similarly to the <see cref="T:log4net.Layout.PatternLayout"/>
- in that it accepts a pattern and renders it to a string. Unlike the
- <see cref="T:log4net.Layout.PatternLayout"/> however the <c>PatternString</c>
- does not render the properties of a specific <see cref="T:log4net.Core.LoggingEvent"/> but
- of the process in general.
- </para>
- <para>
- The recognized conversion pattern names are:
- </para>
- <list type="table">
- <listheader>
- <term>Conversion Pattern Name</term>
- <description>Effect</description>
- </listheader>
- <item>
- <term>appdomain</term>
- <description>
- <para>
- Used to output the friendly name of the current AppDomain.
- </para>
- </description>
- </item>
- <item>
- <term>date</term>
- <description>
- <para>
- Used to output the date of the logging event in the local time zone.
- To output the date in universal time use the <c>%utcdate</c> pattern.
- The date conversion
- specifier may be followed by a <i>date format specifier</i> enclosed
- between braces. For example, <b>%date{HH:mm:ss,fff}</b> or
- <b>%date{dd MMM yyyy HH:mm:ss,fff}</b>. If no date format specifier is
- given then ISO8601 format is
- assumed (<see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>).
- </para>
- <para>
- The date format specifier admits the same syntax as the
- time pattern string of the <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- <para>
- For better results it is recommended to use the log4net date
- formatters. These can be specified using one of the strings
- "ABSOLUTE", "DATE" and "ISO8601" for specifying
- <see cref="T:log4net.DateFormatter.AbsoluteTimeDateFormatter"/>,
- <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> and respectively
- <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>. For example,
- <b>%date{ISO8601}</b> or <b>%date{ABSOLUTE}</b>.
- </para>
- <para>
- These dedicated date formatters perform significantly
- better than <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- </description>
- </item>
- <item>
- <term>env</term>
- <description>
- <para>
- Used to output the a specific environment variable. The key to
- lookup must be specified within braces and directly following the
- pattern specifier, e.g. <b>%env{COMPUTERNAME}</b> would include the value
- of the <c>COMPUTERNAME</c> environment variable.
- </para>
- <para>
- The <c>env</c> pattern is not supported on the .NET Compact Framework.
- </para>
- </description>
- </item>
- <item>
- <term>identity</term>
- <description>
- <para>
- Used to output the user name for the currently active user
- (Principal.Identity.Name).
- </para>
- </description>
- </item>
- <item>
- <term>newline</term>
- <description>
- <para>
- Outputs the platform dependent line separator character or
- characters.
- </para>
- <para>
- This conversion pattern name offers the same performance as using
- non-portable line separator strings such as "\n", or "\r\n".
- Thus, it is the preferred way of specifying a line separator.
- </para>
- </description>
- </item>
- <item>
- <term>processid</term>
- <description>
- <para>
- Used to output the system process ID for the current process.
- </para>
- </description>
- </item>
- <item>
- <term>property</term>
- <description>
- <para>
- Used to output a specific context property. The key to
- lookup must be specified within braces and directly following the
- pattern specifier, e.g. <b>%property{user}</b> would include the value
- from the property that is keyed by the string 'user'. Each property value
- that is to be included in the log must be specified separately.
- Properties are stored in logging contexts. By default
- the <c>log4net:HostName</c> property is set to the name of machine on
- which the event was originally logged.
- </para>
- <para>
- If no key is specified, e.g. <b>%property</b> then all the keys and their
- values are printed in a comma separated list.
- </para>
- <para>
- The properties of an event are combined from a number of different
- contexts. These are listed below in the order in which they are searched.
- </para>
- <list type="definition">
- <item>
- <term>the thread properties</term>
- <description>
- The <see cref="P:log4net.ThreadContext.Properties"/> that are set on the current
- thread. These properties are shared by all events logged on this thread.
- </description>
- </item>
- <item>
- <term>the global properties</term>
- <description>
- The <see cref="P:log4net.GlobalContext.Properties"/> that are set globally. These
- properties are shared by all the threads in the AppDomain.
- </description>
- </item>
- </list>
- </description>
- </item>
- <item>
- <term>random</term>
- <description>
- <para>
- Used to output a random string of characters. The string is made up of
- uppercase letters and numbers. By default the string is 4 characters long.
- The length of the string can be specified within braces directly following the
- pattern specifier, e.g. <b>%random{8}</b> would output an 8 character string.
- </para>
- </description>
- </item>
- <item>
- <term>username</term>
- <description>
- <para>
- Used to output the WindowsIdentity for the currently
- active user.
- </para>
- </description>
- </item>
- <item>
- <term>utcdate</term>
- <description>
- <para>
- Used to output the date of the logging event in universal time.
- The date conversion
- specifier may be followed by a <i>date format specifier</i> enclosed
- between braces. For example, <b>%utcdate{HH:mm:ss,fff}</b> or
- <b>%utcdate{dd MMM yyyy HH:mm:ss,fff}</b>. If no date format specifier is
- given then ISO8601 format is
- assumed (<see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>).
- </para>
- <para>
- The date format specifier admits the same syntax as the
- time pattern string of the <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- <para>
- For better results it is recommended to use the log4net date
- formatters. These can be specified using one of the strings
- "ABSOLUTE", "DATE" and "ISO8601" for specifying
- <see cref="T:log4net.DateFormatter.AbsoluteTimeDateFormatter"/>,
- <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> and respectively
- <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>. For example,
- <b>%utcdate{ISO8601}</b> or <b>%utcdate{ABSOLUTE}</b>.
- </para>
- <para>
- These dedicated date formatters perform significantly
- better than <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- </description>
- </item>
- <item>
- <term>%</term>
- <description>
- <para>
- The sequence %% outputs a single percent sign.
- </para>
- </description>
- </item>
- </list>
- <para>
- Additional pattern converters may be registered with a specific <see cref="T:log4net.Util.PatternString"/>
- instance using <see cref="M:log4net.Util.PatternString.AddConverter(log4net.Util.PatternString.ConverterInfo)"/> or
- <see cref="M:log4net.Util.PatternString.AddConverter(System.String,System.Type)"/>.
- </para>
- <para>
- See the <see cref="T:log4net.Layout.PatternLayout"/> for details on the
- <i>format modifiers</i> supported by the patterns.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.PatternString.s_globalRulesRegistry">
- <summary>
- Internal map of converter identifiers to converter types.
- </summary>
- </member>
- <member name="F:log4net.Util.PatternString.m_pattern">
- <summary>
- the pattern
- </summary>
- </member>
- <member name="F:log4net.Util.PatternString.m_head">
- <summary>
- the head of the pattern converter chain
- </summary>
- </member>
- <member name="F:log4net.Util.PatternString.m_instanceRulesRegistry">
- <summary>
- patterns defined on this PatternString only
- </summary>
- </member>
- <member name="M:log4net.Util.PatternString.#cctor">
- <summary>
- Initialize the global registry
- </summary>
- </member>
- <member name="M:log4net.Util.PatternString.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Initialize a new instance of <see cref="T:log4net.Util.PatternString"/>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.#ctor(System.String)">
- <summary>
- Constructs a PatternString
- </summary>
- <param name="pattern">The pattern to use with this PatternString</param>
- <remarks>
- <para>
- Initialize a new instance of <see cref="T:log4net.Util.PatternString"/> with the pattern specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.ActivateOptions">
- <summary>
- Initialize object options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Util.PatternString.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Util.PatternString.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Util.PatternString.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.CreatePatternParser(System.String)">
- <summary>
- Create the <see cref="T:log4net.Util.PatternParser"/> used to parse the pattern
- </summary>
- <param name="pattern">the pattern to parse</param>
- <returns>The <see cref="T:log4net.Util.PatternParser"/></returns>
- <remarks>
- <para>
- Returns PatternParser used to parse the conversion string. Subclasses
- may override this to return a subclass of PatternParser which recognize
- custom conversion pattern name.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.Format(System.IO.TextWriter)">
- <summary>
- Produces a formatted string as specified by the conversion pattern.
- </summary>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <remarks>
- <para>
- Format the pattern to the <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.Format">
- <summary>
- Format the pattern as a string
- </summary>
- <returns>the pattern formatted as a string</returns>
- <remarks>
- <para>
- Format the pattern to a string.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.AddConverter(log4net.Util.PatternString.ConverterInfo)">
- <summary>
- Add a converter to this PatternString
- </summary>
- <param name="converterInfo">the converter info</param>
- <remarks>
- <para>
- This version of the method is used by the configurator.
- Programmatic users should use the alternative <see cref="M:log4net.Util.PatternString.AddConverter(System.String,System.Type)"/> method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.AddConverter(System.String,System.Type)">
- <summary>
- Add a converter to this PatternString
- </summary>
- <param name="name">the name of the conversion pattern for this converter</param>
- <param name="type">the type of the converter</param>
- <remarks>
- <para>
- Add a converter to this PatternString
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PatternString.ConversionPattern">
- <summary>
- Gets or sets the pattern formatting string
- </summary>
- <value>
- The pattern formatting string
- </value>
- <remarks>
- <para>
- The <b>ConversionPattern</b> option. This is the string which
- controls formatting and consists of a mix of literal content and
- conversion specifiers.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternString.ConverterInfo">
- <summary>
- Wrapper class used to map converter names to converter types
- </summary>
- <remarks>
- <para>
- Wrapper class used to map converter names to converter types
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.ConverterInfo.#ctor">
- <summary>
- default constructor
- </summary>
- </member>
- <member name="P:log4net.Util.PatternString.ConverterInfo.Name">
- <summary>
- Gets or sets the name of the conversion pattern
- </summary>
- <value>
- The name of the conversion pattern
- </value>
- <remarks>
- <para>
- Gets or sets the name of the conversion pattern
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PatternString.ConverterInfo.Type">
- <summary>
- Gets or sets the type of the converter
- </summary>
- <value>
- The type of the converter
- </value>
- <remarks>
- <para>
- Gets or sets the type of the converter
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PropertiesDictionary">
- <summary>
- String keyed object map.
- </summary>
- <remarks>
- <para>
- While this collection is serializable only member
- objects that are serializable will
- be serialized along with this collection.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Util.ReadOnlyPropertiesDictionary">
- <summary>
- String keyed object map that is read only.
- </summary>
- <remarks>
- <para>
- This collection is readonly and cannot be modified.
- </para>
- <para>
- While this collection is serializable only member
- objects that are serializable will
- be serialized along with this collection.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Util.ReadOnlyPropertiesDictionary.m_hashtable">
- <summary>
- The Hashtable used to store the properties data
- </summary>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ReadOnlyPropertiesDictionary"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.#ctor(log4net.Util.ReadOnlyPropertiesDictionary)">
- <summary>
- Copy Constructor
- </summary>
- <param name="propertiesDictionary">properties to copy</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ReadOnlyPropertiesDictionary"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Deserialization constructor
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data.</param>
- <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ReadOnlyPropertiesDictionary"/> class
- with serialized data.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.GetKeys">
- <summary>
- Gets the key names.
- </summary>
- <returns>An array of all the keys.</returns>
- <remarks>
- <para>
- Gets the key names.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.Contains(System.String)">
- <summary>
- Test if the dictionary contains a specified key
- </summary>
- <param name="key">the key to look for</param>
- <returns>true if the dictionary contains the specified key</returns>
- <remarks>
- <para>
- Test if the dictionary contains a specified key
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Serializes this object into the <see cref="T:System.Runtime.Serialization.SerializationInfo"/> provided.
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
- <param name="context">The destination for this serialization.</param>
- <remarks>
- <para>
- Serializes this object into the <see cref="T:System.Runtime.Serialization.SerializationInfo"/> provided.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#GetEnumerator">
- <summary>
- See <see cref="M:System.Collections.IDictionary.GetEnumerator"/>
- </summary>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#Remove(System.Object)">
- <summary>
- See <see cref="M:System.Collections.IDictionary.Remove(System.Object)"/>
- </summary>
- <param name="key"></param>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#Contains(System.Object)">
- <summary>
- See <see cref="M:System.Collections.IDictionary.Contains(System.Object)"/>
- </summary>
- <param name="key"></param>
- <returns></returns>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.Clear">
- <summary>
- Remove all properties from the properties collection
- </summary>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#Add(System.Object,System.Object)">
- <summary>
- See <see cref="M:System.Collections.IDictionary.Add(System.Object,System.Object)"/>
- </summary>
- <param name="key"></param>
- <param name="value"></param>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#ICollection#CopyTo(System.Array,System.Int32)">
- <summary>
- See <see cref="M:System.Collections.ICollection.CopyTo(System.Array,System.Int32)"/>
- </summary>
- <param name="array"></param>
- <param name="index"></param>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IEnumerable#GetEnumerator">
- <summary>
- See <see cref="M:System.Collections.IEnumerable.GetEnumerator"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.Item(System.String)">
- <summary>
- Gets or sets the value of the property with the specified key.
- </summary>
- <value>
- The value of the property with the specified key.
- </value>
- <param name="key">The key of the property to get or set.</param>
- <remarks>
- <para>
- The property value will only be serialized if it is serializable.
- If it cannot be serialized it will be silently ignored if
- a serialization operation is performed.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.InnerHashtable">
- <summary>
- The hashtable used to store the properties
- </summary>
- <value>
- The internal collection used to store the properties
- </value>
- <remarks>
- <para>
- The hashtable used to store the properties
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#IsReadOnly">
- <summary>
- See <see cref="P:System.Collections.IDictionary.IsReadOnly"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#Item(System.Object)">
- <summary>
- See <see cref="P:System.Collections.IDictionary.Item(System.Object)"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#Values">
- <summary>
- See <see cref="P:System.Collections.IDictionary.Values"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#Keys">
- <summary>
- See <see cref="P:System.Collections.IDictionary.Keys"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#IsFixedSize">
- <summary>
- See <see cref="P:System.Collections.IDictionary.IsFixedSize"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#ICollection#IsSynchronized">
- <summary>
- See <see cref="P:System.Collections.ICollection.IsSynchronized"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.Count">
- <summary>
- The number of properties in this collection
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#ICollection#SyncRoot">
- <summary>
- See <see cref="P:System.Collections.ICollection.SyncRoot"/>
- </summary>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.PropertiesDictionary"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.#ctor(log4net.Util.ReadOnlyPropertiesDictionary)">
- <summary>
- Constructor
- </summary>
- <param name="propertiesDictionary">properties to copy</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.PropertiesDictionary"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.PropertiesDictionary"/> class
- with serialized data.
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data.</param>
- <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
- <remarks>
- <para>
- Because this class is sealed the serialization constructor is private.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.Remove(System.String)">
- <summary>
- Remove the entry with the specified key from this dictionary
- </summary>
- <param name="key">the key for the entry to remove</param>
- <remarks>
- <para>
- Remove the entry with the specified key from this dictionary
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#GetEnumerator">
- <summary>
- See <see cref="M:System.Collections.IDictionary.GetEnumerator"/>
- </summary>
- <returns>an enumerator</returns>
- <remarks>
- <para>
- Returns a <see cref="T:System.Collections.IDictionaryEnumerator"/> over the contest of this collection.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#Remove(System.Object)">
- <summary>
- See <see cref="M:System.Collections.IDictionary.Remove(System.Object)"/>
- </summary>
- <param name="key">the key to remove</param>
- <remarks>
- <para>
- Remove the entry with the specified key from this dictionary
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#Contains(System.Object)">
- <summary>
- See <see cref="M:System.Collections.IDictionary.Contains(System.Object)"/>
- </summary>
- <param name="key">the key to lookup in the collection</param>
- <returns><c>true</c> if the collection contains the specified key</returns>
- <remarks>
- <para>
- Test if this collection contains a specified key.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.Clear">
- <summary>
- Remove all properties from the properties collection
- </summary>
- <remarks>
- <para>
- Remove all properties from the properties collection
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#Add(System.Object,System.Object)">
- <summary>
- See <see cref="M:System.Collections.IDictionary.Add(System.Object,System.Object)"/>
- </summary>
- <param name="key">the key</param>
- <param name="value">the value to store for the key</param>
- <remarks>
- <para>
- Store a value for the specified <see cref="T:System.String"/> <paramref name="key"/>.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentException">Thrown if the <paramref name="key"/> is not a string</exception>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.System#Collections#ICollection#CopyTo(System.Array,System.Int32)">
- <summary>
- See <see cref="M:System.Collections.ICollection.CopyTo(System.Array,System.Int32)"/>
- </summary>
- <param name="array"></param>
- <param name="index"></param>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.System#Collections#IEnumerable#GetEnumerator">
- <summary>
- See <see cref="M:System.Collections.IEnumerable.GetEnumerator"/>
- </summary>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.Item(System.String)">
- <summary>
- Gets or sets the value of the property with the specified key.
- </summary>
- <value>
- The value of the property with the specified key.
- </value>
- <param name="key">The key of the property to get or set.</param>
- <remarks>
- <para>
- The property value will only be serialized if it is serializable.
- If it cannot be serialized it will be silently ignored if
- a serialization operation is performed.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#IsReadOnly">
- <summary>
- See <see cref="P:System.Collections.IDictionary.IsReadOnly"/>
- </summary>
- <value>
- <c>false</c>
- </value>
- <remarks>
- <para>
- This collection is modifiable. This property always
- returns <c>false</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#Item(System.Object)">
- <summary>
- See <see cref="P:System.Collections.IDictionary.Item(System.Object)"/>
- </summary>
- <value>
- The value for the key specified.
- </value>
- <remarks>
- <para>
- Get or set a value for the specified <see cref="T:System.String"/> <paramref name="key"/>.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentException">Thrown if the <paramref name="key"/> is not a string</exception>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#Values">
- <summary>
- See <see cref="P:System.Collections.IDictionary.Values"/>
- </summary>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#Keys">
- <summary>
- See <see cref="P:System.Collections.IDictionary.Keys"/>
- </summary>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#IsFixedSize">
- <summary>
- See <see cref="P:System.Collections.IDictionary.IsFixedSize"/>
- </summary>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#ICollection#IsSynchronized">
- <summary>
- See <see cref="P:System.Collections.ICollection.IsSynchronized"/>
- </summary>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#ICollection#SyncRoot">
- <summary>
- See <see cref="P:System.Collections.ICollection.SyncRoot"/>
- </summary>
- </member>
- <member name="T:log4net.Util.ProtectCloseTextWriter">
- <summary>
- A <see cref="T:System.IO.TextWriter"/> that ignores the <see cref="M:log4net.Util.ProtectCloseTextWriter.Close"/> message
- </summary>
- <remarks>
- <para>
- This writer is used in special cases where it is necessary
- to protect a writer from being closed by a client.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.ProtectCloseTextWriter.#ctor(System.IO.TextWriter)">
- <summary>
- Constructor
- </summary>
- <param name="writer">the writer to actually write to</param>
- <remarks>
- <para>
- Create a new ProtectCloseTextWriter using a writer
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ProtectCloseTextWriter.Attach(System.IO.TextWriter)">
- <summary>
- Attach this instance to a different underlying <see cref="T:System.IO.TextWriter"/>
- </summary>
- <param name="writer">the writer to attach to</param>
- <remarks>
- <para>
- Attach this instance to a different underlying <see cref="T:System.IO.TextWriter"/>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ProtectCloseTextWriter.Close">
- <summary>
- Does not close the underlying output writer.
- </summary>
- <remarks>
- <para>
- Does not close the underlying output writer.
- This method does nothing.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ReaderWriterLock">
- <summary>
- Defines a lock that supports single writers and multiple readers
- </summary>
- <remarks>
- <para>
- <c>ReaderWriterLock</c> is used to synchronize access to a resource.
- At any given time, it allows either concurrent read access for
- multiple threads, or write access for a single thread. In a
- situation where a resource is changed infrequently, a
- <c>ReaderWriterLock</c> provides better throughput than a simple
- one-at-a-time lock, such as <see cref="T:System.Threading.Monitor"/>.
- </para>
- <para>
- If a platform does not support a <c>System.Threading.ReaderWriterLock</c>
- implementation then all readers and writers are serialized. Therefore
- the caller must not rely on multiple simultaneous readers.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.ReaderWriterLock.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ReaderWriterLock"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReaderWriterLock.AcquireReaderLock">
- <summary>
- Acquires a reader lock
- </summary>
- <remarks>
- <para>
- <see cref="M:log4net.Util.ReaderWriterLock.AcquireReaderLock"/> blocks if a different thread has the writer
- lock, or if at least one thread is waiting for the writer lock.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReaderWriterLock.ReleaseReaderLock">
- <summary>
- Decrements the lock count
- </summary>
- <remarks>
- <para>
- <see cref="M:log4net.Util.ReaderWriterLock.ReleaseReaderLock"/> decrements the lock count. When the count
- reaches zero, the lock is released.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReaderWriterLock.AcquireWriterLock">
- <summary>
- Acquires the writer lock
- </summary>
- <remarks>
- <para>
- This method blocks if another thread has a reader lock or writer lock.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReaderWriterLock.ReleaseWriterLock">
- <summary>
- Decrements the lock count on the writer lock
- </summary>
- <remarks>
- <para>
- ReleaseWriterLock decrements the writer lock count.
- When the count reaches zero, the writer lock is released.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ReusableStringWriter">
- <summary>
- A <see cref="T:System.IO.StringWriter"/> that can be <see cref="M:log4net.Util.ReusableStringWriter.Reset(System.Int32,System.Int32)"/> and reused
- </summary>
- <remarks>
- <para>
- A <see cref="T:System.IO.StringWriter"/> that can be <see cref="M:log4net.Util.ReusableStringWriter.Reset(System.Int32,System.Int32)"/> and reused.
- This uses a single buffer for string operations.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.ReusableStringWriter.#ctor(System.IFormatProvider)">
- <summary>
- Create an instance of <see cref="T:log4net.Util.ReusableStringWriter"/>
- </summary>
- <param name="formatProvider">the format provider to use</param>
- <remarks>
- <para>
- Create an instance of <see cref="T:log4net.Util.ReusableStringWriter"/>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReusableStringWriter.Dispose(System.Boolean)">
- <summary>
- Override Dispose to prevent closing of writer
- </summary>
- <param name="disposing">flag</param>
- <remarks>
- <para>
- Override Dispose to prevent closing of writer
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReusableStringWriter.Reset(System.Int32,System.Int32)">
- <summary>
- Reset this string writer so that it can be reused.
- </summary>
- <param name="maxCapacity">the maximum buffer capacity before it is trimmed</param>
- <param name="defaultSize">the default size to make the buffer</param>
- <remarks>
- <para>
- Reset this string writer so that it can be reused.
- The internal buffers are cleared and reset.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.SystemInfo">
- <summary>
- Utility class for system specific information.
- </summary>
- <remarks>
- <para>
- Utility class of static methods for system specific information.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Alexey Solofnenko</author>
- </member>
- <member name="M:log4net.Util.SystemInfo.#ctor">
- <summary>
- Private constructor to prevent instances.
- </summary>
- <remarks>
- <para>
- Only static methods are exposed from this type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.#cctor">
- <summary>
- Initialize default values for private static fields.
- </summary>
- <remarks>
- <para>
- Only static methods are exposed from this type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.AssemblyLocationInfo(System.Reflection.Assembly)">
- <summary>
- Gets the assembly location path for the specified assembly.
- </summary>
- <param name="myAssembly">The assembly to get the location for.</param>
- <returns>The location of the assembly.</returns>
- <remarks>
- <para>
- This method does not guarantee to return the correct path
- to the assembly. If only tries to give an indication as to
- where the assembly was loaded from.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.AssemblyQualifiedName(System.Type)">
- <summary>
- Gets the fully qualified name of the <see cref="T:System.Type"/>, including
- the name of the assembly from which the <see cref="T:System.Type"/> was
- loaded.
- </summary>
- <param name="type">The <see cref="T:System.Type"/> to get the fully qualified name for.</param>
- <returns>The fully qualified name for the <see cref="T:System.Type"/>.</returns>
- <remarks>
- <para>
- This is equivalent to the <c>Type.AssemblyQualifiedName</c> property,
- but this method works on the .NET Compact Framework 1.0 as well as
- the full .NET runtime.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.AssemblyShortName(System.Reflection.Assembly)">
- <summary>
- Gets the short name of the <see cref="T:System.Reflection.Assembly"/>.
- </summary>
- <param name="myAssembly">The <see cref="T:System.Reflection.Assembly"/> to get the name for.</param>
- <returns>The short name of the <see cref="T:System.Reflection.Assembly"/>.</returns>
- <remarks>
- <para>
- The short name of the assembly is the <see cref="P:System.Reflection.Assembly.FullName"/>
- without the version, culture, or public key. i.e. it is just the
- assembly's file name without the extension.
- </para>
- <para>
- Use this rather than <c>Assembly.GetName().Name</c> because that
- is not available on the Compact Framework.
- </para>
- <para>
- Because of a FileIOPermission security demand we cannot do
- the obvious Assembly.GetName().Name. We are allowed to get
- the <see cref="P:System.Reflection.Assembly.FullName"/> of the assembly so we
- start from there and strip out just the assembly name.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.AssemblyFileName(System.Reflection.Assembly)">
- <summary>
- Gets the file name portion of the <see cref="T:System.Reflection.Assembly"/>, including the extension.
- </summary>
- <param name="myAssembly">The <see cref="T:System.Reflection.Assembly"/> to get the file name for.</param>
- <returns>The file name of the assembly.</returns>
- <remarks>
- <para>
- Gets the file name portion of the <see cref="T:System.Reflection.Assembly"/>, including the extension.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.GetTypeFromString(System.Type,System.String,System.Boolean,System.Boolean)">
- <summary>
- Loads the type specified in the type string.
- </summary>
- <param name="relativeType">A sibling type to use to load the type.</param>
- <param name="typeName">The name of the type to load.</param>
- <param name="throwOnError">Flag set to <c>true</c> to throw an exception if the type cannot be loaded.</param>
- <param name="ignoreCase"><c>true</c> to ignore the case of the type name; otherwise, <c>false</c></param>
- <returns>The type loaded or <c>null</c> if it could not be loaded.</returns>
- <remarks>
- <para>
- If the type name is fully qualified, i.e. if contains an assembly name in
- the type name, the type will be loaded from the system using
- <see cref="M:System.Type.GetType(System.String,System.Boolean)"/>.
- </para>
- <para>
- If the type name is not fully qualified, it will be loaded from the assembly
- containing the specified relative type. If the type is not found in the assembly
- then all the loaded assemblies will be searched for the type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.GetTypeFromString(System.String,System.Boolean,System.Boolean)">
- <summary>
- Loads the type specified in the type string.
- </summary>
- <param name="typeName">The name of the type to load.</param>
- <param name="throwOnError">Flag set to <c>true</c> to throw an exception if the type cannot be loaded.</param>
- <param name="ignoreCase"><c>true</c> to ignore the case of the type name; otherwise, <c>false</c></param>
- <returns>The type loaded or <c>null</c> if it could not be loaded.</returns>
- <remarks>
- <para>
- If the type name is fully qualified, i.e. if contains an assembly name in
- the type name, the type will be loaded from the system using
- <see cref="M:System.Type.GetType(System.String,System.Boolean)"/>.
- </para>
- <para>
- If the type name is not fully qualified it will be loaded from the
- assembly that is directly calling this method. If the type is not found
- in the assembly then all the loaded assemblies will be searched for the type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.GetTypeFromString(System.Reflection.Assembly,System.String,System.Boolean,System.Boolean)">
- <summary>
- Loads the type specified in the type string.
- </summary>
- <param name="relativeAssembly">An assembly to load the type from.</param>
- <param name="typeName">The name of the type to load.</param>
- <param name="throwOnError">Flag set to <c>true</c> to throw an exception if the type cannot be loaded.</param>
- <param name="ignoreCase"><c>true</c> to ignore the case of the type name; otherwise, <c>false</c></param>
- <returns>The type loaded or <c>null</c> if it could not be loaded.</returns>
- <remarks>
- <para>
- If the type name is fully qualified, i.e. if contains an assembly name in
- the type name, the type will be loaded from the system using
- <see cref="M:System.Type.GetType(System.String,System.Boolean)"/>.
- </para>
- <para>
- If the type name is not fully qualified it will be loaded from the specified
- assembly. If the type is not found in the assembly then all the loaded assemblies
- will be searched for the type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.NewGuid">
- <summary>
- Generate a new guid
- </summary>
- <returns>A new Guid</returns>
- <remarks>
- <para>
- Generate a new guid
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.CreateArgumentOutOfRangeException(System.String,System.Object,System.String)">
- <summary>
- Create an <see cref="T:System.ArgumentOutOfRangeException"/>
- </summary>
- <param name="parameterName">The name of the parameter that caused the exception</param>
- <param name="actualValue">The value of the argument that causes this exception</param>
- <param name="message">The message that describes the error</param>
- <returns>the ArgumentOutOfRangeException object</returns>
- <remarks>
- <para>
- Create a new instance of the <see cref="T:System.ArgumentOutOfRangeException"/> class
- with a specified error message, the parameter name, and the value
- of the argument.
- </para>
- <para>
- The Compact Framework does not support the 3 parameter constructor for the
- <see cref="T:System.ArgumentOutOfRangeException"/> type. This method provides an
- implementation that works for all platforms.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.TryParse(System.String,System.Int32@)">
- <summary>
- Parse a string into an <see cref="T:System.Int32"/> value
- </summary>
- <param name="s">the string to parse</param>
- <param name="val">out param where the parsed value is placed</param>
- <returns><c>true</c> if the string was able to be parsed into an integer</returns>
- <remarks>
- <para>
- Attempts to parse the string into an integer. If the string cannot
- be parsed then this method returns <c>false</c>. The method does not throw an exception.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.TryParse(System.String,System.Int64@)">
- <summary>
- Parse a string into an <see cref="T:System.Int64"/> value
- </summary>
- <param name="s">the string to parse</param>
- <param name="val">out param where the parsed value is placed</param>
- <returns><c>true</c> if the string was able to be parsed into an integer</returns>
- <remarks>
- <para>
- Attempts to parse the string into an integer. If the string cannot
- be parsed then this method returns <c>false</c>. The method does not throw an exception.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.GetAppSetting(System.String)">
- <summary>
- Lookup an application setting
- </summary>
- <param name="key">the application settings key to lookup</param>
- <returns>the value for the key, or <c>null</c></returns>
- <remarks>
- <para>
- Configuration APIs are not supported under the Compact Framework
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.ConvertToFullPath(System.String)">
- <summary>
- Convert a path into a fully qualified local file path.
- </summary>
- <param name="path">The path to convert.</param>
- <returns>The fully qualified path.</returns>
- <remarks>
- <para>
- Converts the path specified to a fully
- qualified path. If the path is relative it is
- taken as relative from the application base
- directory.
- </para>
- <para>
- The path specified must be a local file path, a URI is not supported.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.CreateCaseInsensitiveHashtable">
- <summary>
- Creates a new case-insensitive instance of the <see cref="T:System.Collections.Hashtable"/> class with the default initial capacity.
- </summary>
- <returns>A new case-insensitive instance of the <see cref="T:System.Collections.Hashtable"/> class with the default initial capacity</returns>
- <remarks>
- <para>
- The new Hashtable instance uses the default load factor, the CaseInsensitiveHashCodeProvider, and the CaseInsensitiveComparer.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.SystemInfo.EmptyTypes">
- <summary>
- Gets an empty array of types.
- </summary>
- <remarks>
- <para>
- The <c>Type.EmptyTypes</c> field is not available on
- the .NET Compact Framework 1.0.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.SystemInfo.s_hostName">
- <summary>
- Cache the host name for the current machine
- </summary>
- </member>
- <member name="F:log4net.Util.SystemInfo.s_appFriendlyName">
- <summary>
- Cache the application friendly name
- </summary>
- </member>
- <member name="F:log4net.Util.SystemInfo.s_nullText">
- <summary>
- Text to output when a <c>null</c> is encountered.
- </summary>
- </member>
- <member name="F:log4net.Util.SystemInfo.s_notAvailableText">
- <summary>
- Text to output when an unsupported feature is requested.
- </summary>
- </member>
- <member name="F:log4net.Util.SystemInfo.s_processStartTime">
- <summary>
- Start time for the current process.
- </summary>
- </member>
- <member name="P:log4net.Util.SystemInfo.NewLine">
- <summary>
- Gets the system dependent line terminator.
- </summary>
- <value>
- The system dependent line terminator.
- </value>
- <remarks>
- <para>
- Gets the system dependent line terminator.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.ApplicationBaseDirectory">
- <summary>
- Gets the base directory for this <see cref="T:System.AppDomain"/>.
- </summary>
- <value>The base directory path for the current <see cref="T:System.AppDomain"/>.</value>
- <remarks>
- <para>
- Gets the base directory for this <see cref="T:System.AppDomain"/>.
- </para>
- <para>
- The value returned may be either a local file path or a URI.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.ConfigurationFileLocation">
- <summary>
- Gets the path to the configuration file for the current <see cref="T:System.AppDomain"/>.
- </summary>
- <value>The path to the configuration file for the current <see cref="T:System.AppDomain"/>.</value>
- <remarks>
- <para>
- The .NET Compact Framework 1.0 does not have a concept of a configuration
- file. For this runtime, we use the entry assembly location as the root for
- the configuration file name.
- </para>
- <para>
- The value returned may be either a local file path or a URI.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.EntryAssemblyLocation">
- <summary>
- Gets the path to the file that first executed in the current <see cref="T:System.AppDomain"/>.
- </summary>
- <value>The path to the entry assembly.</value>
- <remarks>
- <para>
- Gets the path to the file that first executed in the current <see cref="T:System.AppDomain"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.CurrentThreadId">
- <summary>
- Gets the ID of the current thread.
- </summary>
- <value>The ID of the current thread.</value>
- <remarks>
- <para>
- On the .NET framework, the <c>AppDomain.GetCurrentThreadId</c> method
- is used to obtain the thread ID for the current thread. This is the
- operating system ID for the thread.
- </para>
- <para>
- On the .NET Compact Framework 1.0 it is not possible to get the
- operating system thread ID for the current thread. The native method
- <c>GetCurrentThreadId</c> is implemented inline in a header file
- and cannot be called.
- </para>
- <para>
- On the .NET Framework 2.0 the <c>Thread.ManagedThreadId</c> is used as this
- gives a stable id unrelated to the operating system thread ID which may
- change if the runtime is using fibers.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.HostName">
- <summary>
- Get the host name or machine name for the current machine
- </summary>
- <value>
- The hostname or machine name
- </value>
- <remarks>
- <para>
- Get the host name or machine name for the current machine
- </para>
- <para>
- The host name (<see cref="M:System.Net.Dns.GetHostName"/>) or
- the machine name (<c>Environment.MachineName</c>) for
- the current machine, or if neither of these are available
- then <c>NOT AVAILABLE</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.ApplicationFriendlyName">
- <summary>
- Get this application's friendly name
- </summary>
- <value>
- The friendly name of this application as a string
- </value>
- <remarks>
- <para>
- If available the name of the application is retrieved from
- the <c>AppDomain</c> using <c>AppDomain.CurrentDomain.FriendlyName</c>.
- </para>
- <para>
- Otherwise the file name of the entry assembly is used.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.ProcessStartTime">
- <summary>
- Get the start time for the current process.
- </summary>
- <remarks>
- <para>
- This is the time at which the log4net library was loaded into the
- AppDomain. Due to reports of a hang in the call to <c>System.Diagnostics.Process.StartTime</c>
- this is not the start time for the current process.
- </para>
- <para>
- The log4net library should be loaded by an application early during its
- startup, therefore this start time should be a good approximation for
- the actual start time.
- </para>
- <para>
- Note that AppDomains may be loaded and unloaded within the
- same process without the process terminating, however this start time
- will be set per AppDomain.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.NullText">
- <summary>
- Text to output when a <c>null</c> is encountered.
- </summary>
- <remarks>
- <para>
- Use this value to indicate a <c>null</c> has been encountered while
- outputting a string representation of an item.
- </para>
- <para>
- The default value is <c>(null)</c>. This value can be overridden by specifying
- a value for the <c>log4net.NullText</c> appSetting in the application's
- .config file.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.NotAvailableText">
- <summary>
- Text to output when an unsupported feature is requested.
- </summary>
- <remarks>
- <para>
- Use this value when an unsupported feature is requested.
- </para>
- <para>
- The default value is <c>NOT AVAILABLE</c>. This value can be overridden by specifying
- a value for the <c>log4net.NotAvailableText</c> appSetting in the application's
- .config file.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.SystemStringFormat">
- <summary>
- Utility class that represents a format string.
- </summary>
- <remarks>
- <para>
- Utility class that represents a format string.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.SystemStringFormat.#ctor(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Initialise the <see cref="T:log4net.Util.SystemStringFormat"/>
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information.</param>
- <param name="format">A <see cref="T:System.String"/> containing zero or more format items.</param>
- <param name="args">An <see cref="T:System.Object"/> array containing zero or more objects to format.</param>
- </member>
- <member name="M:log4net.Util.SystemStringFormat.ToString">
- <summary>
- Format the string and arguments
- </summary>
- <returns>the formatted string</returns>
- </member>
- <member name="M:log4net.Util.SystemStringFormat.StringFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Replaces the format item in a specified <see cref="T:System.String"/> with the text equivalent
- of the value of a corresponding <see cref="T:System.Object"/> instance in a specified array.
- A specified parameter supplies culture-specific formatting information.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information.</param>
- <param name="format">A <see cref="T:System.String"/> containing zero or more format items.</param>
- <param name="args">An <see cref="T:System.Object"/> array containing zero or more objects to format.</param>
- <returns>
- A copy of format in which the format items have been replaced by the <see cref="T:System.String"/>
- equivalent of the corresponding instances of <see cref="T:System.Object"/> in args.
- </returns>
- <remarks>
- <para>
- This method does not throw exceptions. If an exception thrown while formatting the result the
- exception and arguments are returned in the result string.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemStringFormat.StringFormatError(System.Exception,System.String,System.Object[])">
- <summary>
- Process an error during StringFormat
- </summary>
- </member>
- <member name="M:log4net.Util.SystemStringFormat.RenderArray(System.Array,System.Text.StringBuilder)">
- <summary>
- Dump the contents of an array into a string builder
- </summary>
- </member>
- <member name="M:log4net.Util.SystemStringFormat.RenderObject(System.Object,System.Text.StringBuilder)">
- <summary>
- Dump an object to a string
- </summary>
- </member>
- <member name="T:log4net.Util.ThreadContextProperties">
- <summary>
- Implementation of Properties collection for the <see cref="T:log4net.ThreadContext"/>
- </summary>
- <remarks>
- <para>
- Class implements a collection of properties that is specific to each thread.
- The class is not synchronized as each thread has its own <see cref="T:log4net.Util.PropertiesDictionary"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.ThreadContextProperties.s_threadLocalSlot">
- <summary>
- The thread local data slot to use to store a PropertiesDictionary.
- </summary>
- </member>
- <member name="M:log4net.Util.ThreadContextProperties.#ctor">
- <summary>
- Internal constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ThreadContextProperties"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextProperties.Remove(System.String)">
- <summary>
- Remove a property
- </summary>
- <param name="key">the key for the entry to remove</param>
- <remarks>
- <para>
- Remove a property
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextProperties.Clear">
- <summary>
- Clear all properties
- </summary>
- <remarks>
- <para>
- Clear all properties
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextProperties.GetProperties(System.Boolean)">
- <summary>
- Get the <c>PropertiesDictionary</c> for this thread.
- </summary>
- <param name="create">create the dictionary if it does not exist, otherwise return null if is does not exist</param>
- <returns>the properties for this thread</returns>
- <remarks>
- <para>
- The collection returned is only to be used on the calling thread. If the
- caller needs to share the collection between different threads then the
- caller must clone the collection before doing so.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ThreadContextProperties.Item(System.String)">
- <summary>
- Gets or sets the value of a property
- </summary>
- <value>
- The value for the property with the specified key
- </value>
- <remarks>
- <para>
- Gets or sets the value of a property
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ThreadContextStack">
- <summary>
- Implementation of Stack for the <see cref="T:log4net.ThreadContext"/>
- </summary>
- <remarks>
- <para>
- Implementation of Stack for the <see cref="T:log4net.ThreadContext"/>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.ThreadContextStack.m_stack">
- <summary>
- The stack store.
- </summary>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.#ctor">
- <summary>
- Internal constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ThreadContextStack"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.Clear">
- <summary>
- Clears all the contextual information held in this stack.
- </summary>
- <remarks>
- <para>
- Clears all the contextual information held in this stack.
- Only call this if you think that this tread is being reused after
- a previous call execution which may not have completed correctly.
- You do not need to use this method if you always guarantee to call
- the <see cref="M:System.IDisposable.Dispose"/> method of the <see cref="T:System.IDisposable"/>
- returned from <see cref="M:log4net.Util.ThreadContextStack.Push(System.String)"/> even in exceptional circumstances,
- for example by using the <c>using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message"))</c>
- syntax.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.Pop">
- <summary>
- Removes the top context from this stack.
- </summary>
- <returns>The message in the context that was removed from the top of this stack.</returns>
- <remarks>
- <para>
- Remove the top context from this stack, and return
- it to the caller. If this stack is empty then an
- empty string (not <see langword="null"/>) is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.Push(System.String)">
- <summary>
- Pushes a new context message into this stack.
- </summary>
- <param name="message">The new context message.</param>
- <returns>
- An <see cref="T:System.IDisposable"/> that can be used to clean up the context stack.
- </returns>
- <remarks>
- <para>
- Pushes a new context onto this stack. An <see cref="T:System.IDisposable"/>
- is returned that can be used to clean up this stack. This
- can be easily combined with the <c>using</c> keyword to scope the
- context.
- </para>
- </remarks>
- <example>Simple example of using the <c>Push</c> method with the <c>using</c> keyword.
- <code lang="C#">
- using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message"))
- {
- log.Warn("This should have an ThreadContext Stack message");
- }
- </code>
- </example>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.GetFullMessage">
- <summary>
- Gets the current context information for this stack.
- </summary>
- <returns>The current context information.</returns>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.ToString">
- <summary>
- Gets the current context information for this stack.
- </summary>
- <returns>Gets the current context information</returns>
- <remarks>
- <para>
- Gets the current context information for this stack.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.log4net#Core#IFixingRequired#GetFixedObject">
- <summary>
- Get a portable version of this object
- </summary>
- <returns>the portable instance of this object</returns>
- <remarks>
- <para>
- Get a cross thread portable version of this object
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ThreadContextStack.Count">
- <summary>
- The number of messages in the stack
- </summary>
- <value>
- The current number of messages in the stack
- </value>
- <remarks>
- <para>
- The current number of messages in the stack. That is
- the number of times <see cref="M:log4net.Util.ThreadContextStack.Push(System.String)"/> has been called
- minus the number of times <see cref="M:log4net.Util.ThreadContextStack.Pop"/> has been called.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ThreadContextStack.InternalStack">
- <summary>
- Gets and sets the internal stack used by this <see cref="T:log4net.Util.ThreadContextStack"/>
- </summary>
- <value>The internal storage stack</value>
- <remarks>
- <para>
- This property is provided only to support backward compatability
- of the <see cref="T:log4net.NDC"/>. Tytpically the internal stack should not
- be modified.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ThreadContextStack.StackFrame">
- <summary>
- Inner class used to represent a single context frame in the stack.
- </summary>
- <remarks>
- <para>
- Inner class used to represent a single context frame in the stack.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.StackFrame.#ctor(System.String,log4net.Util.ThreadContextStack.StackFrame)">
- <summary>
- Constructor
- </summary>
- <param name="message">The message for this context.</param>
- <param name="parent">The parent context in the chain.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ThreadContextStack.StackFrame"/> class
- with the specified message and parent context.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ThreadContextStack.StackFrame.Message">
- <summary>
- Get the message.
- </summary>
- <value>The message.</value>
- <remarks>
- <para>
- Get the message.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ThreadContextStack.StackFrame.FullMessage">
- <summary>
- Gets the full text of the context down to the root level.
- </summary>
- <value>
- The full text of the context down to the root level.
- </value>
- <remarks>
- <para>
- Gets the full text of the context down to the root level.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ThreadContextStack.AutoPopStackFrame">
- <summary>
- Struct returned from the <see cref="M:log4net.Util.ThreadContextStack.Push(System.String)"/> method.
- </summary>
- <remarks>
- <para>
- This struct implements the <see cref="T:System.IDisposable"/> and is designed to be used
- with the <see langword="using"/> pattern to remove the stack frame at the end of the scope.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.ThreadContextStack.AutoPopStackFrame.m_frameStack">
- <summary>
- The ThreadContextStack internal stack
- </summary>
- </member>
- <member name="F:log4net.Util.ThreadContextStack.AutoPopStackFrame.m_frameDepth">
- <summary>
- The depth to trim the stack to when this instance is disposed
- </summary>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.AutoPopStackFrame.#ctor(System.Collections.Stack,System.Int32)">
- <summary>
- Constructor
- </summary>
- <param name="frameStack">The internal stack used by the ThreadContextStack.</param>
- <param name="frameDepth">The depth to return the stack to when this object is disposed.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ThreadContextStack.AutoPopStackFrame"/> class with
- the specified stack and return depth.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.AutoPopStackFrame.Dispose">
- <summary>
- Returns the stack to the correct depth.
- </summary>
- <remarks>
- <para>
- Returns the stack to the correct depth.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ThreadContextStacks">
- <summary>
- Implementation of Stacks collection for the <see cref="T:log4net.ThreadContext"/>
- </summary>
- <remarks>
- <para>
- Implementation of Stacks collection for the <see cref="T:log4net.ThreadContext"/>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.ThreadContextStacks.#ctor(log4net.Util.ContextPropertiesBase)">
- <summary>
- Internal constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ThreadContextStacks"/> class.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ThreadContextStacks.Item(System.String)">
- <summary>
- Gets the named thread context stack
- </summary>
- <value>
- The named stack
- </value>
- <remarks>
- <para>
- Gets the named thread context stack
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.Transform">
- <summary>
- Utility class for transforming strings.
- </summary>
- <remarks>
- <para>
- Utility class for transforming strings.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.Transform.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.Transform"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to prevent instantiation of this class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.Transform.WriteEscapedXmlString(System.Xml.XmlWriter,System.String,System.String)">
- <summary>
- Write a string to an <see cref="T:System.Xml.XmlWriter"/>
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="textData">the string to write</param>
- <param name="invalidCharReplacement">The string to replace non XML compliant chars with</param>
- <remarks>
- <para>
- The test is escaped either using XML escape entities
- or using CDATA sections.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.Transform.MaskXmlInvalidCharacters(System.String,System.String)">
- <summary>
- Replace invalid XML characters in text string
- </summary>
- <param name="textData">the XML text input string</param>
- <param name="mask">the string to use in place of invalid characters</param>
- <returns>A string that does not contain invalid XML characters.</returns>
- <remarks>
- <para>
- Certain Unicode code points are not allowed in the XML InfoSet, for
- details see: <a href="http://www.w3.org/TR/REC-xml/#charsets">http://www.w3.org/TR/REC-xml/#charsets</a>.
- </para>
- <para>
- This method replaces any illegal characters in the input string
- with the mask string specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.Transform.CountSubstrings(System.String,System.String)">
- <summary>
- Count the number of times that the substring occurs in the text
- </summary>
- <param name="text">the text to search</param>
- <param name="substring">the substring to find</param>
- <returns>the number of times the substring occurs in the text</returns>
- <remarks>
- <para>
- The substring is assumed to be non repeating within itself.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.WindowsSecurityContext">
- <summary>
- Impersonate a Windows Account
- </summary>
- <remarks>
- <para>
- This <see cref="T:log4net.Core.SecurityContext"/> impersonates a Windows account.
- </para>
- <para>
- How the impersonation is done depends on the value of <see cref="M:log4net.Util.WindowsSecurityContext.Impersonate(System.Object)"/>.
- This allows the context to either impersonate a set of user credentials specified
- using username, domain name and password or to revert to the process credentials.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.WindowsSecurityContext.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.WindowsSecurityContext.ActivateOptions">
- <summary>
- Initialize the SecurityContext based on the options set.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Util.WindowsSecurityContext.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Util.WindowsSecurityContext.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Util.WindowsSecurityContext.ActivateOptions"/> must be called again.
- </para>
- <para>
- The security context will try to Logon the specified user account and
- capture a primary token for impersonation.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">The required <see cref="P:log4net.Util.WindowsSecurityContext.UserName"/>,
- <see cref="P:log4net.Util.WindowsSecurityContext.DomainName"/> or <see cref="P:log4net.Util.WindowsSecurityContext.Password"/> properties were not specified.</exception>
- </member>
- <member name="M:log4net.Util.WindowsSecurityContext.Impersonate(System.Object)">
- <summary>
- Impersonate the Windows account specified by the <see cref="P:log4net.Util.WindowsSecurityContext.UserName"/> and <see cref="P:log4net.Util.WindowsSecurityContext.DomainName"/> properties.
- </summary>
- <param name="state">caller provided state</param>
- <returns>
- An <see cref="T:System.IDisposable"/> instance that will revoke the impersonation of this SecurityContext
- </returns>
- <remarks>
- <para>
- Depending on the <see cref="P:log4net.Util.WindowsSecurityContext.Credentials"/> property either
- impersonate a user using credentials supplied or revert
- to the process credentials.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.WindowsSecurityContext.LogonUser(System.String,System.String,System.String)">
- <summary>
- Create a <see cref="T:System.Security.Principal.WindowsIdentity"/> given the userName, domainName and password.
- </summary>
- <param name="userName">the user name</param>
- <param name="domainName">the domain name</param>
- <param name="password">the password</param>
- <returns>the <see cref="T:System.Security.Principal.WindowsIdentity"/> for the account specified</returns>
- <remarks>
- <para>
- Uses the Windows API call LogonUser to get a principal token for the account. This
- token is used to initialize the WindowsIdentity.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.WindowsSecurityContext.Credentials">
- <summary>
- Gets or sets the impersonation mode for this security context
- </summary>
- <value>
- The impersonation mode for this security context
- </value>
- <remarks>
- <para>
- Impersonate either a user with user credentials or
- revert this thread to the credentials of the process.
- The value is one of the <see cref="T:log4net.Util.WindowsSecurityContext.ImpersonationMode"/>
- enum.
- </para>
- <para>
- The default value is <see cref="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.User"/>
- </para>
- <para>
- When the mode is set to <see cref="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.User"/>
- the user's credentials are established using the
- <see cref="P:log4net.Util.WindowsSecurityContext.UserName"/>, <see cref="P:log4net.Util.WindowsSecurityContext.DomainName"/> and <see cref="P:log4net.Util.WindowsSecurityContext.Password"/>
- values.
- </para>
- <para>
- When the mode is set to <see cref="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.Process"/>
- no other properties need to be set. If the calling thread is
- impersonating then it will be reverted back to the process credentials.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.WindowsSecurityContext.UserName">
- <summary>
- Gets or sets the Windows username for this security context
- </summary>
- <value>
- The Windows username for this security context
- </value>
- <remarks>
- <para>
- This property must be set if <see cref="P:log4net.Util.WindowsSecurityContext.Credentials"/>
- is set to <see cref="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.User"/> (the default setting).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.WindowsSecurityContext.DomainName">
- <summary>
- Gets or sets the Windows domain name for this security context
- </summary>
- <value>
- The Windows domain name for this security context
- </value>
- <remarks>
- <para>
- The default value for <see cref="P:log4net.Util.WindowsSecurityContext.DomainName"/> is the local machine name
- taken from the <see cref="P:System.Environment.MachineName"/> property.
- </para>
- <para>
- This property must be set if <see cref="P:log4net.Util.WindowsSecurityContext.Credentials"/>
- is set to <see cref="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.User"/> (the default setting).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.WindowsSecurityContext.Password">
- <summary>
- Sets the password for the Windows account specified by the <see cref="P:log4net.Util.WindowsSecurityContext.UserName"/> and <see cref="P:log4net.Util.WindowsSecurityContext.DomainName"/> properties.
- </summary>
- <value>
- The password for the Windows account specified by the <see cref="P:log4net.Util.WindowsSecurityContext.UserName"/> and <see cref="P:log4net.Util.WindowsSecurityContext.DomainName"/> properties.
- </value>
- <remarks>
- <para>
- This property must be set if <see cref="P:log4net.Util.WindowsSecurityContext.Credentials"/>
- is set to <see cref="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.User"/> (the default setting).
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.WindowsSecurityContext.ImpersonationMode">
- <summary>
- The impersonation modes for the <see cref="T:log4net.Util.WindowsSecurityContext"/>
- </summary>
- <remarks>
- <para>
- See the <see cref="P:log4net.Util.WindowsSecurityContext.Credentials"/> property for
- details.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.User">
- <summary>
- Impersonate a user using the credentials supplied
- </summary>
- </member>
- <member name="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.Process">
- <summary>
- Revert this the thread to the credentials of the process
- </summary>
- </member>
- <member name="T:log4net.Util.WindowsSecurityContext.DisposableImpersonationContext">
- <summary>
- Adds <see cref="T:System.IDisposable"/> to <see cref="T:System.Security.Principal.WindowsImpersonationContext"/>
- </summary>
- <remarks>
- <para>
- Helper class to expose the <see cref="T:System.Security.Principal.WindowsImpersonationContext"/>
- through the <see cref="T:System.IDisposable"/> interface.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.WindowsSecurityContext.DisposableImpersonationContext.#ctor(System.Security.Principal.WindowsImpersonationContext)">
- <summary>
- Constructor
- </summary>
- <param name="impersonationContext">the impersonation context being wrapped</param>
- <remarks>
- <para>
- Constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.WindowsSecurityContext.DisposableImpersonationContext.Dispose">
- <summary>
- Revert the impersonation
- </summary>
- <remarks>
- <para>
- Revert the impersonation
- </para>
- </remarks>
- </member>
- <member name="T:log4net.GlobalContext">
- <summary>
- The log4net Global Context.
- </summary>
- <remarks>
- <para>
- The <c>GlobalContext</c> provides a location for global debugging
- information to be stored.
- </para>
- <para>
- The global context has a properties map and these properties can
- be included in the output of log messages. The <see cref="T:log4net.Layout.PatternLayout"/>
- supports selecting and outputing these properties.
- </para>
- <para>
- By default the <c>log4net:HostName</c> property is set to the name of
- the current machine.
- </para>
- </remarks>
- <example>
- <code lang="C#">
- GlobalContext.Properties["hostname"] = Environment.MachineName;
- </code>
- </example>
- <threadsafety static="true" instance="true"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.GlobalContext.#ctor">
- <summary>
- Private Constructor.
- </summary>
- <remarks>
- Uses a private access modifier to prevent instantiation of this class.
- </remarks>
- </member>
- <member name="F:log4net.GlobalContext.s_properties">
- <summary>
- The global context properties instance
- </summary>
- </member>
- <member name="P:log4net.GlobalContext.Properties">
- <summary>
- The global properties map.
- </summary>
- <value>
- The global properties map.
- </value>
- <remarks>
- <para>
- The global properties map.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.LogicalThreadContext">
- <summary>
- The log4net Logical Thread Context.
- </summary>
- <remarks>
- <para>
- The <c>LogicalThreadContext</c> provides a location for <see cref="T:System.Runtime.Remoting.Messaging.CallContext"/> specific debugging
- information to be stored.
- The <c>LogicalThreadContext</c> properties override any <see cref="T:log4net.ThreadContext"/> or <see cref="T:log4net.GlobalContext"/>
- properties with the same name.
- </para>
- <para>
- The Logical Thread Context has a properties map and a stack.
- The properties and stack can
- be included in the output of log messages. The <see cref="T:log4net.Layout.PatternLayout"/>
- supports selecting and outputting these properties.
- </para>
- <para>
- The Logical Thread Context provides a diagnostic context for the current call context.
- This is an instrument for distinguishing interleaved log
- output from different sources. Log output is typically interleaved
- when a server handles multiple clients near-simultaneously.
- </para>
- <para>
- The Logical Thread Context is managed on a per <see cref="T:System.Runtime.Remoting.Messaging.CallContext"/> basis.
- </para>
- </remarks>
- <example>Example of using the thread context properties to store a username.
- <code lang="C#">
- LogicalThreadContext.Properties["user"] = userName;
- log.Info("This log message has a LogicalThreadContext Property called 'user'");
- </code>
- </example>
- <example>Example of how to push a message into the context stack
- <code lang="C#">
- using(LogicalThreadContext.Stacks["LDC"].Push("my context message"))
- {
- log.Info("This log message has a LogicalThreadContext Stack message that includes 'my context message'");
-
- } // at the end of the using block the message is automatically popped
- </code>
- </example>
- <threadsafety static="true" instance="true"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.LogicalThreadContext.#ctor">
- <summary>
- Private Constructor.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to prevent instantiation of this class.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.LogicalThreadContext.s_properties">
- <summary>
- The thread context properties instance
- </summary>
- </member>
- <member name="F:log4net.LogicalThreadContext.s_stacks">
- <summary>
- The thread context stacks instance
- </summary>
- </member>
- <member name="P:log4net.LogicalThreadContext.Properties">
- <summary>
- The thread properties map
- </summary>
- <value>
- The thread properties map
- </value>
- <remarks>
- <para>
- The <c>LogicalThreadContext</c> properties override any <see cref="T:log4net.ThreadContext"/>
- or <see cref="T:log4net.GlobalContext"/> properties with the same name.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.LogicalThreadContext.Stacks">
- <summary>
- The thread stacks
- </summary>
- <value>
- stack map
- </value>
- <remarks>
- <para>
- The logical thread stacks.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.LogManager">
- <summary>
- This class is used by client applications to request logger instances.
- </summary>
- <remarks>
- <para>
- This class has static methods that are used by a client to request
- a logger instance. The <see cref="M:log4net.LogManager.GetLogger(System.String)"/> method is
- used to retrieve a logger.
- </para>
- <para>
- See the <see cref="T:log4net.ILog"/> interface for more details.
- </para>
- </remarks>
- <example>Simple example of logging messages
- <code lang="C#">
- ILog log = LogManager.GetLogger("application-log");
-
- log.Info("Application Start");
- log.Debug("This is a debug message");
-
- if (log.IsDebugEnabled)
- {
- log.Debug("This is another debug message");
- }
- </code>
- </example>
- <threadsafety static="true" instance="true"/>
- <seealso cref="T:log4net.ILog"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.LogManager.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.LogManager"/> class.
- </summary>
- <remarks>
- Uses a private access modifier to prevent instantiation of this class.
- </remarks>
- </member>
- <member name="M:log4net.LogManager.Exists(System.String)">
- <overloads>Returns the named logger if it exists.</overloads>
- <summary>
- Returns the named logger if it exists.
- </summary>
- <remarks>
- <para>
- If the named logger exists (in the default repository) then it
- returns a reference to the logger, otherwise it returns <c>null</c>.
- </para>
- </remarks>
- <param name="name">The fully qualified logger name to look for.</param>
- <returns>The logger found, or <c>null</c> if no logger could be found.</returns>
- </member>
- <member name="M:log4net.LogManager.Exists(System.String,System.String)">
- <summary>
- Returns the named logger if it exists.
- </summary>
- <remarks>
- <para>
- If the named logger exists (in the specified repository) then it
- returns a reference to the logger, otherwise it returns
- <c>null</c>.
- </para>
- </remarks>
- <param name="repository">The repository to lookup in.</param>
- <param name="name">The fully qualified logger name to look for.</param>
- <returns>
- The logger found, or <c>null</c> if the logger doesn't exist in the specified
- repository.
- </returns>
- </member>
- <member name="M:log4net.LogManager.Exists(System.Reflection.Assembly,System.String)">
- <summary>
- Returns the named logger if it exists.
- </summary>
- <remarks>
- <para>
- If the named logger exists (in the repository for the specified assembly) then it
- returns a reference to the logger, otherwise it returns
- <c>null</c>.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <param name="name">The fully qualified logger name to look for.</param>
- <returns>
- The logger, or <c>null</c> if the logger doesn't exist in the specified
- assembly's repository.
- </returns>
- </member>
- <member name="M:log4net.LogManager.GetCurrentLoggers">
- <overloads>Get the currently defined loggers.</overloads>
- <summary>
- Returns all the currently defined loggers in the default repository.
- </summary>
- <remarks>
- <para>The root logger is <b>not</b> included in the returned array.</para>
- </remarks>
- <returns>All the defined loggers.</returns>
- </member>
- <member name="M:log4net.LogManager.GetCurrentLoggers(System.String)">
- <summary>
- Returns all the currently defined loggers in the specified repository.
- </summary>
- <param name="repository">The repository to lookup in.</param>
- <remarks>
- The root logger is <b>not</b> included in the returned array.
- </remarks>
- <returns>All the defined loggers.</returns>
- </member>
- <member name="M:log4net.LogManager.GetCurrentLoggers(System.Reflection.Assembly)">
- <summary>
- Returns all the currently defined loggers in the specified assembly's repository.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <remarks>
- The root logger is <b>not</b> included in the returned array.
- </remarks>
- <returns>All the defined loggers.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLogger(System.String)">
- <overloads>Get or create a logger.</overloads>
- <summary>
- Retrieves or creates a named logger.
- </summary>
- <remarks>
- <para>
- Retrieves a logger named as the <paramref name="name"/>
- parameter. If the named logger already exists, then the
- existing instance will be returned. Otherwise, a new instance is
- created.
- </para>
- <para>By default, loggers do not have a set level but inherit
- it from the hierarchy. This is one of the central features of
- log4net.
- </para>
- </remarks>
- <param name="name">The name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLogger(System.String,System.String)">
- <summary>
- Retrieves or creates a named logger.
- </summary>
- <remarks>
- <para>
- Retrieve a logger named as the <paramref name="name"/>
- parameter. If the named logger already exists, then the
- existing instance will be returned. Otherwise, a new instance is
- created.
- </para>
- <para>
- By default, loggers do not have a set level but inherit
- it from the hierarchy. This is one of the central features of
- log4net.
- </para>
- </remarks>
- <param name="repository">The repository to lookup in.</param>
- <param name="name">The name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLogger(System.Reflection.Assembly,System.String)">
- <summary>
- Retrieves or creates a named logger.
- </summary>
- <remarks>
- <para>
- Retrieve a logger named as the <paramref name="name"/>
- parameter. If the named logger already exists, then the
- existing instance will be returned. Otherwise, a new instance is
- created.
- </para>
- <para>
- By default, loggers do not have a set level but inherit
- it from the hierarchy. This is one of the central features of
- log4net.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <param name="name">The name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLogger(System.Type)">
- <summary>
- Shorthand for <see cref="M:log4net.LogManager.GetLogger(System.String)"/>.
- </summary>
- <remarks>
- Get the logger for the fully qualified name of the type specified.
- </remarks>
- <param name="type">The full name of <paramref name="type"/> will be used as the name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLogger(System.String,System.Type)">
- <summary>
- Shorthand for <see cref="M:log4net.LogManager.GetLogger(System.String)"/>.
- </summary>
- <remarks>
- Gets the logger for the fully qualified name of the type specified.
- </remarks>
- <param name="repository">The repository to lookup in.</param>
- <param name="type">The full name of <paramref name="type"/> will be used as the name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLogger(System.Reflection.Assembly,System.Type)">
- <summary>
- Shorthand for <see cref="M:log4net.LogManager.GetLogger(System.String)"/>.
- </summary>
- <remarks>
- Gets the logger for the fully qualified name of the type specified.
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <param name="type">The full name of <paramref name="type"/> will be used as the name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- </member>
- <member name="M:log4net.LogManager.Shutdown">
- <summary>
- Shuts down the log4net system.
- </summary>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in all the
- default repositories.
- </para>
- <para>
- Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.LogManager.ShutdownRepository">
- <overloads>Shutdown a logger repository.</overloads>
- <summary>
- Shuts down the default repository.
- </summary>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in the
- default repository.
- </para>
- <para>Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.LogManager.ShutdownRepository(System.String)">
- <summary>
- Shuts down the repository for the repository specified.
- </summary>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in the
- <paramref name="repository"/> specified.
- </para>
- <para>
- Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- <param name="repository">The repository to shutdown.</param>
- </member>
- <member name="M:log4net.LogManager.ShutdownRepository(System.Reflection.Assembly)">
- <summary>
- Shuts down the repository specified.
- </summary>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in the
- repository. The repository is looked up using
- the <paramref name="repositoryAssembly"/> specified.
- </para>
- <para>
- Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>
- The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- </member>
- <member name="M:log4net.LogManager.ResetConfiguration">
- <overloads>Reset the configuration of a repository</overloads>
- <summary>
- Resets all values contained in this repository instance to their defaults.
- </summary>
- <remarks>
- <para>
- Resets all values contained in the repository instance to their
- defaults. This removes all appenders from all loggers, sets
- the level of all non-root loggers to <c>null</c>,
- sets their additivity flag to <c>true</c> and sets the level
- of the root logger to <see cref="F:log4net.Core.Level.Debug"/>. Moreover,
- message disabling is set to its default "off" value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.LogManager.ResetConfiguration(System.String)">
- <summary>
- Resets all values contained in this repository instance to their defaults.
- </summary>
- <remarks>
- <para>
- Reset all values contained in the repository instance to their
- defaults. This removes all appenders from all loggers, sets
- the level of all non-root loggers to <c>null</c>,
- sets their additivity flag to <c>true</c> and sets the level
- of the root logger to <see cref="F:log4net.Core.Level.Debug"/>. Moreover,
- message disabling is set to its default "off" value.
- </para>
- </remarks>
- <param name="repository">The repository to reset.</param>
- </member>
- <member name="M:log4net.LogManager.ResetConfiguration(System.Reflection.Assembly)">
- <summary>
- Resets all values contained in this repository instance to their defaults.
- </summary>
- <remarks>
- <para>
- Reset all values contained in the repository instance to their
- defaults. This removes all appenders from all loggers, sets
- the level of all non-root loggers to <c>null</c>,
- sets their additivity flag to <c>true</c> and sets the level
- of the root logger to <see cref="F:log4net.Core.Level.Debug"/>. Moreover,
- message disabling is set to its default "off" value.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository to reset.</param>
- </member>
- <member name="M:log4net.LogManager.GetLoggerRepository">
- <overloads>Get the logger repository.</overloads>
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the callers assembly (<see cref="M:System.Reflection.Assembly.GetCallingAssembly"/>).
- </para>
- </remarks>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> instance for the default repository.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLoggerRepository(System.String)">
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the <paramref name="repository"/> argument.
- </para>
- </remarks>
- <param name="repository">The repository to lookup in.</param>
- </member>
- <member name="M:log4net.LogManager.GetLoggerRepository(System.Reflection.Assembly)">
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the <paramref name="repositoryAssembly"/> argument.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- </member>
- <member name="M:log4net.LogManager.GetRepository">
- <overloads>Get a logger repository.</overloads>
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the callers assembly (<see cref="M:System.Reflection.Assembly.GetCallingAssembly"/>).
- </para>
- </remarks>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> instance for the default repository.</returns>
- </member>
- <member name="M:log4net.LogManager.GetRepository(System.String)">
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the <paramref name="repository"/> argument.
- </para>
- </remarks>
- <param name="repository">The repository to lookup in.</param>
- </member>
- <member name="M:log4net.LogManager.GetRepository(System.Reflection.Assembly)">
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the <paramref name="repositoryAssembly"/> argument.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- </member>
- <member name="M:log4net.LogManager.CreateDomain(System.Type)">
- <overloads>Create a domain</overloads>
- <summary>
- Creates a repository with the specified repository type.
- </summary>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.LogManager.GetRepository"/> will return
- the same repository instance.
- </para>
- </remarks>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- </member>
- <member name="M:log4net.LogManager.CreateRepository(System.Type)">
- <overloads>Create a logger repository.</overloads>
- <summary>
- Creates a repository with the specified repository type.
- </summary>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.LogManager.GetRepository"/> will return
- the same repository instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.LogManager.CreateDomain(System.String)">
- <summary>
- Creates a repository with the specified name.
- </summary>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- Creates the default type of <see cref="T:log4net.Repository.ILoggerRepository"/> which is a
- <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> object.
- </para>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An <see cref="T:System.Exception"/> will be thrown if the repository already exists.
- </para>
- </remarks>
- <param name="repository">The name of the repository, this must be unique amongst repositories.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.LogManager.CreateRepository(System.String)">
- <summary>
- Creates a repository with the specified name.
- </summary>
- <remarks>
- <para>
- Creates the default type of <see cref="T:log4net.Repository.ILoggerRepository"/> which is a
- <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> object.
- </para>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An <see cref="T:System.Exception"/> will be thrown if the repository already exists.
- </para>
- </remarks>
- <param name="repository">The name of the repository, this must be unique amongst repositories.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.LogManager.CreateDomain(System.String,System.Type)">
- <summary>
- Creates a repository with the specified name and repository type.
- </summary>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An <see cref="T:System.Exception"/> will be thrown if the repository already exists.
- </para>
- </remarks>
- <param name="repository">The name of the repository, this must be unique to the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.LogManager.CreateRepository(System.String,System.Type)">
- <summary>
- Creates a repository with the specified name and repository type.
- </summary>
- <remarks>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An <see cref="T:System.Exception"/> will be thrown if the repository already exists.
- </para>
- </remarks>
- <param name="repository">The name of the repository, this must be unique to the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.LogManager.CreateDomain(System.Reflection.Assembly,System.Type)">
- <summary>
- Creates a repository for the specified assembly and repository type.
- </summary>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.LogManager.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to get the name of the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- </member>
- <member name="M:log4net.LogManager.CreateRepository(System.Reflection.Assembly,System.Type)">
- <summary>
- Creates a repository for the specified assembly and repository type.
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.LogManager.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to get the name of the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- </member>
- <member name="M:log4net.LogManager.GetAllRepositories">
- <summary>
- Gets the list of currently defined repositories.
- </summary>
- <remarks>
- <para>
- Get an array of all the <see cref="T:log4net.Repository.ILoggerRepository"/> objects that have been created.
- </para>
- </remarks>
- <returns>An array of all the known <see cref="T:log4net.Repository.ILoggerRepository"/> objects.</returns>
- </member>
- <member name="M:log4net.LogManager.WrapLogger(log4net.Core.ILogger)">
- <summary>
- Looks up the wrapper object for the logger specified.
- </summary>
- <param name="logger">The logger to get the wrapper for.</param>
- <returns>The wrapper for the logger specified.</returns>
- </member>
- <member name="M:log4net.LogManager.WrapLoggers(log4net.Core.ILogger[])">
- <summary>
- Looks up the wrapper objects for the loggers specified.
- </summary>
- <param name="loggers">The loggers to get the wrappers for.</param>
- <returns>The wrapper objects for the loggers specified.</returns>
- </member>
- <member name="M:log4net.LogManager.WrapperCreationHandler(log4net.Core.ILogger)">
- <summary>
- Create the <see cref="T:log4net.Core.ILoggerWrapper"/> objects used by
- this manager.
- </summary>
- <param name="logger">The logger to wrap.</param>
- <returns>The wrapper for the logger specified.</returns>
- </member>
- <member name="F:log4net.LogManager.s_wrapperMap">
- <summary>
- The wrapper map to use to hold the <see cref="T:log4net.Core.LogImpl"/> objects.
- </summary>
- </member>
- <member name="T:log4net.MDC">
- <summary>
- Implementation of Mapped Diagnostic Contexts.
- </summary>
- <remarks>
- <note>
- <para>
- The MDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Properties"/>.
- The current MDC implementation forwards to the <c>ThreadContext.Properties</c>.
- </para>
- </note>
- <para>
- The MDC class is similar to the <see cref="T:log4net.NDC"/> class except that it is
- based on a map instead of a stack. It provides <i>mapped
- diagnostic contexts</i>. A <i>Mapped Diagnostic Context</i>, or
- MDC in short, is an instrument for distinguishing interleaved log
- output from different sources. Log output is typically interleaved
- when a server handles multiple clients near-simultaneously.
- </para>
- <para>
- The MDC is managed on a per thread basis.
- </para>
- </remarks>
- <threadsafety static="true" instance="true"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.MDC.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.MDC"/> class.
- </summary>
- <remarks>
- Uses a private access modifier to prevent instantiation of this class.
- </remarks>
- </member>
- <member name="M:log4net.MDC.Get(System.String)">
- <summary>
- Gets the context value identified by the <paramref name="key"/> parameter.
- </summary>
- <param name="key">The key to lookup in the MDC.</param>
- <returns>The string value held for the key, or a <c>null</c> reference if no corresponding value is found.</returns>
- <remarks>
- <note>
- <para>
- The MDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Properties"/>.
- The current MDC implementation forwards to the <c>ThreadContext.Properties</c>.
- </para>
- </note>
- <para>
- If the <paramref name="key"/> parameter does not look up to a
- previously defined context then <c>null</c> will be returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.MDC.Set(System.String,System.String)">
- <summary>
- Add an entry to the MDC
- </summary>
- <param name="key">The key to store the value under.</param>
- <param name="value">The value to store.</param>
- <remarks>
- <note>
- <para>
- The MDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Properties"/>.
- The current MDC implementation forwards to the <c>ThreadContext.Properties</c>.
- </para>
- </note>
- <para>
- Puts a context value (the <paramref name="val"/> parameter) as identified
- with the <paramref name="key"/> parameter into the current thread's
- context map.
- </para>
- <para>
- If a value is already defined for the <paramref name="key"/>
- specified then the value will be replaced. If the <paramref name="val"/>
- is specified as <c>null</c> then the key value mapping will be removed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.MDC.Remove(System.String)">
- <summary>
- Removes the key value mapping for the key specified.
- </summary>
- <param name="key">The key to remove.</param>
- <remarks>
- <note>
- <para>
- The MDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Properties"/>.
- The current MDC implementation forwards to the <c>ThreadContext.Properties</c>.
- </para>
- </note>
- <para>
- Remove the specified entry from this thread's MDC
- </para>
- </remarks>
- </member>
- <member name="M:log4net.MDC.Clear">
- <summary>
- Clear all entries in the MDC
- </summary>
- <remarks>
- <note>
- <para>
- The MDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Properties"/>.
- The current MDC implementation forwards to the <c>ThreadContext.Properties</c>.
- </para>
- </note>
- <para>
- Remove all the entries from this thread's MDC
- </para>
- </remarks>
- </member>
- <member name="T:log4net.NDC">
- <summary>
- Implementation of Nested Diagnostic Contexts.
- </summary>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- A Nested Diagnostic Context, or NDC in short, is an instrument
- to distinguish interleaved log output from different sources. Log
- output is typically interleaved when a server handles multiple
- clients near-simultaneously.
- </para>
- <para>
- Interleaved log output can still be meaningful if each log entry
- from different contexts had a distinctive stamp. This is where NDCs
- come into play.
- </para>
- <para>
- Note that NDCs are managed on a per thread basis. The NDC class
- is made up of static methods that operate on the context of the
- calling thread.
- </para>
- </remarks>
- <example>How to push a message into the context
- <code lang="C#">
- using(NDC.Push("my context message"))
- {
- ... all log calls will have 'my context message' included ...
-
- } // at the end of the using block the message is automatically removed
- </code>
- </example>
- <threadsafety static="true" instance="true"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.NDC.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.NDC"/> class.
- </summary>
- <remarks>
- Uses a private access modifier to prevent instantiation of this class.
- </remarks>
- </member>
- <member name="M:log4net.NDC.Clear">
- <summary>
- Clears all the contextual information held on the current thread.
- </summary>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- Clears the stack of NDC data held on the current thread.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.NDC.CloneStack">
- <summary>
- Creates a clone of the stack of context information.
- </summary>
- <returns>A clone of the context info for this thread.</returns>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- The results of this method can be passed to the <see cref="M:log4net.NDC.Inherit(System.Collections.Stack)"/>
- method to allow child threads to inherit the context of their
- parent thread.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.NDC.Inherit(System.Collections.Stack)">
- <summary>
- Inherits the contextual information from another thread.
- </summary>
- <param name="stack">The context stack to inherit.</param>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- This thread will use the context information from the stack
- supplied. This can be used to initialize child threads with
- the same contextual information as their parent threads. These
- contexts will <b>NOT</b> be shared. Any further contexts that
- are pushed onto the stack will not be visible to the other.
- Call <see cref="M:log4net.NDC.CloneStack"/> to obtain a stack to pass to
- this method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.NDC.Pop">
- <summary>
- Removes the top context from the stack.
- </summary>
- <returns>
- The message in the context that was removed from the top
- of the stack.
- </returns>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- Remove the top context from the stack, and return
- it to the caller. If the stack is empty then an
- empty string (not <c>null</c>) is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.NDC.Push(System.String)">
- <summary>
- Pushes a new context message.
- </summary>
- <param name="message">The new context message.</param>
- <returns>
- An <see cref="T:System.IDisposable"/> that can be used to clean up
- the context stack.
- </returns>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- Pushes a new context onto the context stack. An <see cref="T:System.IDisposable"/>
- is returned that can be used to clean up the context stack. This
- can be easily combined with the <c>using</c> keyword to scope the
- context.
- </para>
- </remarks>
- <example>Simple example of using the <c>Push</c> method with the <c>using</c> keyword.
- <code lang="C#">
- using(log4net.NDC.Push("NDC_Message"))
- {
- log.Warn("This should have an NDC message");
- }
- </code>
- </example>
- </member>
- <member name="M:log4net.NDC.Remove">
- <summary>
- Removes the context information for this thread. It is
- not required to call this method.
- </summary>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- This method is not implemented.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.NDC.SetMaxDepth(System.Int32)">
- <summary>
- Forces the stack depth to be at most <paramref name="maxDepth"/>.
- </summary>
- <param name="maxDepth">The maximum depth of the stack</param>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- Forces the stack depth to be at most <paramref name="maxDepth"/>.
- This may truncate the head of the stack. This only affects the
- stack in the current thread. Also it does not prevent it from
- growing, it only sets the maximum depth at the time of the
- call. This can be used to return to a known context depth.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.NDC.Depth">
- <summary>
- Gets the current context depth.
- </summary>
- <value>The current context depth.</value>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- The number of context values pushed onto the context stack.
- </para>
- <para>
- Used to record the current depth of the context. This can then
- be restored using the <see cref="M:log4net.NDC.SetMaxDepth(System.Int32)"/> method.
- </para>
- </remarks>
- <seealso cref="M:log4net.NDC.SetMaxDepth(System.Int32)"/>
- </member>
- <member name="T:log4net.ThreadContext">
- <summary>
- The log4net Thread Context.
- </summary>
- <remarks>
- <para>
- The <c>ThreadContext</c> provides a location for thread specific debugging
- information to be stored.
- The <c>ThreadContext</c> properties override any <see cref="T:log4net.GlobalContext"/>
- properties with the same name.
- </para>
- <para>
- The thread context has a properties map and a stack.
- The properties and stack can
- be included in the output of log messages. The <see cref="T:log4net.Layout.PatternLayout"/>
- supports selecting and outputting these properties.
- </para>
- <para>
- The Thread Context provides a diagnostic context for the current thread.
- This is an instrument for distinguishing interleaved log
- output from different sources. Log output is typically interleaved
- when a server handles multiple clients near-simultaneously.
- </para>
- <para>
- The Thread Context is managed on a per thread basis.
- </para>
- </remarks>
- <example>Example of using the thread context properties to store a username.
- <code lang="C#">
- ThreadContext.Properties["user"] = userName;
- log.Info("This log message has a ThreadContext Property called 'user'");
- </code>
- </example>
- <example>Example of how to push a message into the context stack
- <code lang="C#">
- using(ThreadContext.Stacks["NDC"].Push("my context message"))
- {
- log.Info("This log message has a ThreadContext Stack message that includes 'my context message'");
-
- } // at the end of the using block the message is automatically popped
- </code>
- </example>
- <threadsafety static="true" instance="true"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.ThreadContext.#ctor">
- <summary>
- Private Constructor.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to prevent instantiation of this class.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.ThreadContext.s_properties">
- <summary>
- The thread context properties instance
- </summary>
- </member>
- <member name="F:log4net.ThreadContext.s_stacks">
- <summary>
- The thread context stacks instance
- </summary>
- </member>
- <member name="P:log4net.ThreadContext.Properties">
- <summary>
- The thread properties map
- </summary>
- <value>
- The thread properties map
- </value>
- <remarks>
- <para>
- The <c>ThreadContext</c> properties override any <see cref="T:log4net.GlobalContext"/>
- properties with the same name.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.ThreadContext.Stacks">
- <summary>
- The thread stacks
- </summary>
- <value>
- stack map
- </value>
- <remarks>
- <para>
- The thread local stacks.
- </para>
- </remarks>
- </member>
- </members>
-</doc>
diff --git a/qpid/dotnet/Qpid.Common/lib/saxon/saxon-licence.txt b/qpid/dotnet/Qpid.Common/lib/saxon/saxon-licence.txt
deleted file mode 100644
index 1bf2b1279d..0000000000
--- a/qpid/dotnet/Qpid.Common/lib/saxon/saxon-licence.txt
+++ /dev/null
@@ -1,471 +0,0 @@
- MOZILLA PUBLIC LICENSE
- Version 1.1
-
- ---------------
-
-1. Definitions.
-
- 1.0.1. "Commercial Use" means distribution or otherwise making the
- Covered Code available to a third party.
-
- 1.1. "Contributor" means each entity that creates or contributes to
- the creation of Modifications.
-
- 1.2. "Contributor Version" means the combination of the Original
- Code, prior Modifications used by a Contributor, and the Modifications
- made by that particular Contributor.
-
- 1.3. "Covered Code" means the Original Code or Modifications or the
- combination of the Original Code and Modifications, in each case
- including portions thereof.
-
- 1.4. "Electronic Distribution Mechanism" means a mechanism generally
- accepted in the software development community for the electronic
- transfer of data.
-
- 1.5. "Executable" means Covered Code in any form other than Source
- Code.
-
- 1.6. "Initial Developer" means the individual or entity identified
- as the Initial Developer in the Source Code notice required by Exhibit
- A.
-
- 1.7. "Larger Work" means a work which combines Covered Code or
- portions thereof with code not governed by the terms of this License.
-
- 1.8. "License" means this document.
-
- 1.8.1. "Licensable" means having the right to grant, to the maximum
- extent possible, whether at the time of the initial grant or
- subsequently acquired, any and all of the rights conveyed herein.
-
- 1.9. "Modifications" means any addition to or deletion from the
- substance or structure of either the Original Code or any previous
- Modifications. When Covered Code is released as a series of files, a
- Modification is:
- A. Any addition to or deletion from the contents of a file
- containing Original Code or previous Modifications.
-
- B. Any new file that contains any part of the Original Code or
- previous Modifications.
-
- 1.10. "Original Code" means Source Code of computer software code
- which is described in the Source Code notice required by Exhibit A as
- Original Code, and which, at the time of its release under this
- License is not already Covered Code governed by this License.
-
- 1.10.1. "Patent Claims" means any patent claim(s), now owned or
- hereafter acquired, including without limitation, method, process,
- and apparatus claims, in any patent Licensable by grantor.
-
- 1.11. "Source Code" means the preferred form of the Covered Code for
- making modifications to it, including all modules it contains, plus
- any associated interface definition files, scripts used to control
- compilation and installation of an Executable, or source code
- differential comparisons against either the Original Code or another
- well known, available Covered Code of the Contributor's choice. The
- Source Code can be in a compressed or archival form, provided the
- appropriate decompression or de-archiving software is widely available
- for no charge.
-
- 1.12. "You" (or "Your") means an individual or a legal entity
- exercising rights under, and complying with all of the terms of, this
- License or a future version of this License issued under Section 6.1.
- For legal entities, "You" includes any entity which controls, is
- controlled by, or is under common control with You. For purposes of
- this definition, "control" means (a) the power, direct or indirect,
- to cause the direction or management of such entity, whether by
- contract or otherwise, or (b) ownership of more than fifty percent
- (50%) of the outstanding shares or beneficial ownership of such
- entity.
-
-2. Source Code License.
-
- 2.1. The Initial Developer Grant.
- The Initial Developer hereby grants You a world-wide, royalty-free,
- non-exclusive license, subject to third party intellectual property
- claims:
- (a) under intellectual property rights (other than patent or
- trademark) Licensable by Initial Developer to use, reproduce,
- modify, display, perform, sublicense and distribute the Original
- Code (or portions thereof) with or without Modifications, and/or
- as part of a Larger Work; and
-
- (b) under Patents Claims infringed by the making, using or
- selling of Original Code, to make, have made, use, practice,
- sell, and offer for sale, and/or otherwise dispose of the
- Original Code (or portions thereof).
-
- (c) the licenses granted in this Section 2.1(a) and (b) are
- effective on the date Initial Developer first distributes
- Original Code under the terms of this License.
-
- (d) Notwithstanding Section 2.1(b) above, no patent license is
- granted: 1) for code that You delete from the Original Code; 2)
- separate from the Original Code; or 3) for infringements caused
- by: i) the modification of the Original Code or ii) the
- combination of the Original Code with other software or devices.
-
- 2.2. Contributor Grant.
- Subject to third party intellectual property claims, each Contributor
- hereby grants You a world-wide, royalty-free, non-exclusive license
-
- (a) under intellectual property rights (other than patent or
- trademark) Licensable by Contributor, to use, reproduce, modify,
- display, perform, sublicense and distribute the Modifications
- created by such Contributor (or portions thereof) either on an
- unmodified basis, with other Modifications, as Covered Code
- and/or as part of a Larger Work; and
-
- (b) under Patent Claims infringed by the making, using, or
- selling of Modifications made by that Contributor either alone
- and/or in combination with its Contributor Version (or portions
- of such combination), to make, use, sell, offer for sale, have
- made, and/or otherwise dispose of: 1) Modifications made by that
- Contributor (or portions thereof); and 2) the combination of
- Modifications made by that Contributor with its Contributor
- Version (or portions of such combination).
-
- (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
- effective on the date Contributor first makes Commercial Use of
- the Covered Code.
-
- (d) Notwithstanding Section 2.2(b) above, no patent license is
- granted: 1) for any code that Contributor has deleted from the
- Contributor Version; 2) separate from the Contributor Version;
- 3) for infringements caused by: i) third party modifications of
- Contributor Version or ii) the combination of Modifications made
- by that Contributor with other software (except as part of the
- Contributor Version) or other devices; or 4) under Patent Claims
- infringed by Covered Code in the absence of Modifications made by
- that Contributor.
-
-3. Distribution Obligations.
-
- 3.1. Application of License.
- The Modifications which You create or to which You contribute are
- governed by the terms of this License, including without limitation
- Section 2.2. The Source Code version of Covered Code may be
- distributed only under the terms of this License or a future version
- of this License released under Section 6.1, and You must include a
- copy of this License with every copy of the Source Code You
- distribute. You may not offer or impose any terms on any Source Code
- version that alters or restricts the applicable version of this
- License or the recipients' rights hereunder. However, You may include
- an additional document offering the additional rights described in
- Section 3.5.
-
- 3.2. Availability of Source Code.
- Any Modification which You create or to which You contribute must be
- made available in Source Code form under the terms of this License
- either on the same media as an Executable version or via an accepted
- Electronic Distribution Mechanism to anyone to whom you made an
- Executable version available; and if made available via Electronic
- Distribution Mechanism, must remain available for at least twelve (12)
- months after the date it initially became available, or at least six
- (6) months after a subsequent version of that particular Modification
- has been made available to such recipients. You are responsible for
- ensuring that the Source Code version remains available even if the
- Electronic Distribution Mechanism is maintained by a third party.
-
- 3.3. Description of Modifications.
- You must cause all Covered Code to which You contribute to contain a
- file documenting the changes You made to create that Covered Code and
- the date of any change. You must include a prominent statement that
- the Modification is derived, directly or indirectly, from Original
- Code provided by the Initial Developer and including the name of the
- Initial Developer in (a) the Source Code, and (b) in any notice in an
- Executable version or related documentation in which You describe the
- origin or ownership of the Covered Code.
-
- 3.4. Intellectual Property Matters
- (a) Third Party Claims.
- If Contributor has knowledge that a license under a third party's
- intellectual property rights is required to exercise the rights
- granted by such Contributor under Sections 2.1 or 2.2,
- Contributor must include a text file with the Source Code
- distribution titled "LEGAL" which describes the claim and the
- party making the claim in sufficient detail that a recipient will
- know whom to contact. If Contributor obtains such knowledge after
- the Modification is made available as described in Section 3.2,
- Contributor shall promptly modify the LEGAL file in all copies
- Contributor makes available thereafter and shall take other steps
- (such as notifying appropriate mailing lists or newsgroups)
- reasonably calculated to inform those who received the Covered
- Code that new knowledge has been obtained.
-
- (b) Contributor APIs.
- If Contributor's Modifications include an application programming
- interface and Contributor has knowledge of patent licenses which
- are reasonably necessary to implement that API, Contributor must
- also include this information in the LEGAL file.
-
- (c) Representations.
- Contributor represents that, except as disclosed pursuant to
- Section 3.4(a) above, Contributor believes that Contributor's
- Modifications are Contributor's original creation(s) and/or
- Contributor has sufficient rights to grant the rights conveyed by
- this License.
-
- 3.5. Required Notices.
- You must duplicate the notice in Exhibit A in each file of the Source
- Code. If it is not possible to put such notice in a particular Source
- Code file due to its structure, then You must include such notice in a
- location (such as a relevant directory) where a user would be likely
- to look for such a notice. If You created one or more Modification(s)
- You may add your name as a Contributor to the notice described in
- Exhibit A. You must also duplicate this License in any documentation
- for the Source Code where You describe recipients' rights or ownership
- rights relating to Covered Code. You may choose to offer, and to
- charge a fee for, warranty, support, indemnity or liability
- obligations to one or more recipients of Covered Code. However, You
- may do so only on Your own behalf, and not on behalf of the Initial
- Developer or any Contributor. You must make it absolutely clear than
- any such warranty, support, indemnity or liability obligation is
- offered by You alone, and You hereby agree to indemnify the Initial
- Developer and every Contributor for any liability incurred by the
- Initial Developer or such Contributor as a result of warranty,
- support, indemnity or liability terms You offer.
-
- 3.6. Distribution of Executable Versions.
- You may distribute Covered Code in Executable form only if the
- requirements of Section 3.1-3.5 have been met for that Covered Code,
- and if You include a notice stating that the Source Code version of
- the Covered Code is available under the terms of this License,
- including a description of how and where You have fulfilled the
- obligations of Section 3.2. The notice must be conspicuously included
- in any notice in an Executable version, related documentation or
- collateral in which You describe recipients' rights relating to the
- Covered Code. You may distribute the Executable version of Covered
- Code or ownership rights under a license of Your choice, which may
- contain terms different from this License, provided that You are in
- compliance with the terms of this License and that the license for the
- Executable version does not attempt to limit or alter the recipient's
- rights in the Source Code version from the rights set forth in this
- License. If You distribute the Executable version under a different
- license You must make it absolutely clear that any terms which differ
- from this License are offered by You alone, not by the Initial
- Developer or any Contributor. You hereby agree to indemnify the
- Initial Developer and every Contributor for any liability incurred by
- the Initial Developer or such Contributor as a result of any such
- terms You offer.
-
- 3.7. Larger Works.
- You may create a Larger Work by combining Covered Code with other code
- not governed by the terms of this License and distribute the Larger
- Work as a single product. In such a case, You must make sure the
- requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
- If it is impossible for You to comply with any of the terms of this
- License with respect to some or all of the Covered Code due to
- statute, judicial order, or regulation then You must: (a) comply with
- the terms of this License to the maximum extent possible; and (b)
- describe the limitations and the code they affect. Such description
- must be included in the LEGAL file described in Section 3.4 and must
- be included with all distributions of the Source Code. Except to the
- extent prohibited by statute or regulation, such description must be
- sufficiently detailed for a recipient of ordinary skill to be able to
- understand it.
-
-5. Application of this License.
-
- This License applies to code to which the Initial Developer has
- attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
- 6.1. New Versions.
- Netscape Communications Corporation ("Netscape") may publish revised
- and/or new versions of the License from time to time. Each version
- will be given a distinguishing version number.
-
- 6.2. Effect of New Versions.
- Once Covered Code has been published under a particular version of the
- License, You may always continue to use it under the terms of that
- version. You may also choose to use such Covered Code under the terms
- of any subsequent version of the License published by Netscape. No one
- other than Netscape has the right to modify the terms applicable to
- Covered Code created under this License.
-
- 6.3. Derivative Works.
- If You create or use a modified version of this License (which you may
- only do in order to apply it to code which is not already Covered Code
- governed by this License), You must (a) rename Your license so that
- the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
- "MPL", "NPL" or any confusingly similar phrase do not appear in your
- license (except to note that your license differs from this License)
- and (b) otherwise make it clear that Your version of the license
- contains terms which differ from the Mozilla Public License and
- Netscape Public License. (Filling in the name of the Initial
- Developer, Original Code or Contributor in the notice described in
- Exhibit A shall not of themselves be deemed to be modifications of
- this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
- COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
- DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
- THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
- IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
- YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
- COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
- OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
- ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
- 8.1. This License and the rights granted hereunder will terminate
- automatically if You fail to comply with terms herein and fail to cure
- such breach within 30 days of becoming aware of the breach. All
- sublicenses to the Covered Code which are properly granted shall
- survive any termination of this License. Provisions which, by their
- nature, must remain in effect beyond the termination of this License
- shall survive.
-
- 8.2. If You initiate litigation by asserting a patent infringement
- claim (excluding declatory judgment actions) against Initial Developer
- or a Contributor (the Initial Developer or Contributor against whom
- You file such action is referred to as "Participant") alleging that:
-
- (a) such Participant's Contributor Version directly or indirectly
- infringes any patent, then any and all rights granted by such
- Participant to You under Sections 2.1 and/or 2.2 of this License
- shall, upon 60 days notice from Participant terminate prospectively,
- unless if within 60 days after receipt of notice You either: (i)
- agree in writing to pay Participant a mutually agreeable reasonable
- royalty for Your past and future use of Modifications made by such
- Participant, or (ii) withdraw Your litigation claim with respect to
- the Contributor Version against such Participant. If within 60 days
- of notice, a reasonable royalty and payment arrangement are not
- mutually agreed upon in writing by the parties or the litigation claim
- is not withdrawn, the rights granted by Participant to You under
- Sections 2.1 and/or 2.2 automatically terminate at the expiration of
- the 60 day notice period specified above.
-
- (b) any software, hardware, or device, other than such Participant's
- Contributor Version, directly or indirectly infringes any patent, then
- any rights granted to You by such Participant under Sections 2.1(b)
- and 2.2(b) are revoked effective as of the date You first made, used,
- sold, distributed, or had made, Modifications made by that
- Participant.
-
- 8.3. If You assert a patent infringement claim against Participant
- alleging that such Participant's Contributor Version directly or
- indirectly infringes any patent where such claim is resolved (such as
- by license or settlement) prior to the initiation of patent
- infringement litigation, then the reasonable value of the licenses
- granted by such Participant under Sections 2.1 or 2.2 shall be taken
- into account in determining the amount or value of any payment or
- license.
-
- 8.4. In the event of termination under Sections 8.1 or 8.2 above,
- all end user license agreements (excluding distributors and resellers)
- which have been validly granted by You or any distributor hereunder
- prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
- UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
- (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
- DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
- OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
- ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
- CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
- WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
- COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
- INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
- LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
- RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
- PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
- EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
- THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
- The Covered Code is a "commercial item," as that term is defined in
- 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
- software" and "commercial computer software documentation," as such
- terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
- C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
- all U.S. Government End Users acquire Covered Code with only those
- rights set forth herein.
-
-11. MISCELLANEOUS.
-
- This License represents the complete agreement concerning subject
- matter hereof. If any provision of this License is held to be
- unenforceable, such provision shall be reformed only to the extent
- necessary to make it enforceable. This License shall be governed by
- California law provisions (except to the extent applicable law, if
- any, provides otherwise), excluding its conflict-of-law provisions.
- With respect to disputes in which at least one party is a citizen of,
- or an entity chartered or registered to do business in the United
- States of America, any litigation relating to this License shall be
- subject to the jurisdiction of the Federal Courts of the Northern
- District of California, with venue lying in Santa Clara County,
- California, with the losing party responsible for costs, including
- without limitation, court costs and reasonable attorneys' fees and
- expenses. The application of the United Nations Convention on
- Contracts for the International Sale of Goods is expressly excluded.
- Any law or regulation which provides that the language of a contract
- shall be construed against the drafter shall not apply to this
- License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
- As between Initial Developer and the Contributors, each party is
- responsible for claims and damages arising, directly or indirectly,
- out of its utilization of rights under this License and You agree to
- work with Initial Developer and Contributors to distribute such
- responsibility on an equitable basis. Nothing herein is intended or
- shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
- Initial Developer may designate portions of the Covered Code as
- "Multiple-Licensed". "Multiple-Licensed" means that the Initial
- Developer permits you to utilize portions of the Covered Code under
- Your choice of the NPL or the alternative licenses, if any, specified
- by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A -Mozilla Public License.
-
- ``The contents of this file are subject to the Mozilla Public License
- Version 1.1 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- License for the specific language governing rights and limitations
- under the License.
-
- The Original Code is ______________________________________.
-
- The Initial Developer of the Original Code is ________________________.
- Portions created by ______________________ are Copyright (C) ______
- _______________________. All Rights Reserved.
-
- Contributor(s): ______________________________________.
-
- Alternatively, the contents of this file may be used under the terms
- of the _____ license (the "[___] License"), in which case the
- provisions of [______] License are applicable instead of those
- above. If you wish to allow use of your version of this file only
- under the terms of the [____] License and not to allow others to use
- your version of this file under the MPL, indicate your decision by
- deleting the provisions above and replace them with the notice and
- other provisions required by the [___] License. If you do not delete
- the provisions above, a recipient may use your version of this file
- under either the MPL or the [___] License."
-
- [NOTE: The text of this Exhibit A may differ slightly from the text of
- the notices in the Source Code files of the Original Code. You should
- use the text of this Exhibit A rather than the text found in the
- Original Code Source Code for Your Modifications.]
-
-
diff --git a/qpid/dotnet/Qpid.Common/lib/saxon/saxon8.jar b/qpid/dotnet/Qpid.Common/lib/saxon/saxon8.jar
deleted file mode 100644
index 197ce75c5b..0000000000
--- a/qpid/dotnet/Qpid.Common/lib/saxon/saxon8.jar
+++ /dev/null
Binary files differ
diff --git a/qpid/dotnet/Qpid.Common/lib/seclib-1.0.0/Org.Mentalis.Security.dll b/qpid/dotnet/Qpid.Common/lib/seclib-1.0.0/Org.Mentalis.Security.dll
deleted file mode 100644
index c3b95d71ba..0000000000
--- a/qpid/dotnet/Qpid.Common/lib/seclib-1.0.0/Org.Mentalis.Security.dll
+++ /dev/null
Binary files differ
diff --git a/qpid/dotnet/Qpid.Common/lib/seclib-1.0.0/seclib-license.txt b/qpid/dotnet/Qpid.Common/lib/seclib-1.0.0/seclib-license.txt
deleted file mode 100644
index e837183135..0000000000
--- a/qpid/dotnet/Qpid.Common/lib/seclib-1.0.0/seclib-license.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-Source Code License
-
-Copyright © 2002-2006, The Mentalis.org Team
-All rights reserved.
-http://www.mentalis.org/
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-- Neither the name of the Mentalis.org Team, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/qpid/dotnet/Qpid.Common/resources/registry.template b/qpid/dotnet/Qpid.Common/resources/registry.template
deleted file mode 100644
index d870ef3866..0000000000
--- a/qpid/dotnet/Qpid.Common/resources/registry.template
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<registries>
- <registry name="MainRegistry"/>
-</registries>
diff --git a/qpid/dotnet/Qpid.Common/stylesheets/csharp.xsl b/qpid/dotnet/Qpid.Common/stylesheets/csharp.xsl
deleted file mode 100644
index ed04a40403..0000000000
--- a/qpid/dotnet/Qpid.Common/stylesheets/csharp.xsl
+++ /dev/null
@@ -1,251 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:amq="http://amq.org">
-
-<!-- this class contains the templates for generating C# source code for a given framing model -->
-<xsl:import href="utils.xsl"/>
-<xsl:output method="text" indent="yes" name="textFormat"/>
-
-<xsl:param name="registry_name"/>
-
-<xsl:template match="/">
- <xsl:apply-templates mode="generate-multi" select="frames"/>
- <xsl:apply-templates mode="generate-registry" select="frames"/>
-</xsl:template>
-
-<!-- processes all frames outputting the classes in a single stream -->
-<!-- (useful for debugging etc) -->
-<xsl:template match="frame" mode="generate-single">
- <xsl:call-template name="generate-class">
- <xsl:with-param name="f" select="."/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- generates seperate file for each class/frame -->
-<xsl:template match="frame" mode="generate-multi">
- <xsl:variable name="uri" select="concat(@name, '.cs')"/>
- wrote <xsl:value-of select="$uri"/>
- <xsl:result-document href="{$uri}" format="textFormat">
- <xsl:call-template name="generate-class">
- <xsl:with-param name="f" select="."/>
- </xsl:call-template>
- </xsl:result-document>
-</xsl:template>
-
-<!-- main class generation template -->
-<xsl:template name="generate-class">
- <xsl:param name="f"/>
-using Apache.Qpid.Buffer;
-using System.Text;
-
-namespace Apache.Qpid.Framing
-{
- ///
- /// <summary>This class is autogenerated
- /// Do not modify.
- ///</summary>
- /// @author Code Generator Script by robert.j.greig@jpmorgan.com
- public class <xsl:value-of select="$f/@name"/> : AMQMethodBody , IEncodableAMQDataBlock
- {
- public const int CLASS_ID = <xsl:value-of select="$f/@class-id"/>;
- public const int METHOD_ID = <xsl:value-of select="$f/@method-id"/>;
-
- <xsl:for-each select="$f/field">
- <xsl:text>public </xsl:text><xsl:value-of select="@csharp-type"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>;
- </xsl:for-each>
-
- protected override ushort Clazz
- {
- get
- {
- return <xsl:value-of select="$f/@class-id"/>;
- }
- }
-
- protected override ushort Method
- {
- get
- {
- return <xsl:value-of select="$f/@method-id"/>;
- }
- }
-
- protected override uint BodySize
- {
- get
- {
- <xsl:choose>
- <xsl:when test="$f/field">
- return (uint)
- <xsl:for-each select="$f/field">
- <xsl:if test="position() != 1">+
- </xsl:if>
- <xsl:value-of select="amq:field-length(.)"/>
- </xsl:for-each>
- ;
- </xsl:when>
- <xsl:otherwise>return 0;</xsl:otherwise>
- </xsl:choose>
- }
- }
-
- protected override void WriteMethodPayload(ByteBuffer buffer)
- {
- <xsl:for-each select="$f/field">
- <xsl:if test="@type != 'bit'">
- <xsl:value-of select="amq:encoder(.)"/>;
- </xsl:if>
- <xsl:if test="@type = 'bit' and @boolean-index = 1">
- <xsl:text>EncodingUtils.WriteBooleans(buffer, new bool[]{</xsl:text>
- <xsl:value-of select="$f/field[@type='bit']/@name" separator=", "/>});
- </xsl:if>
- </xsl:for-each>
- }
-
- protected override void PopulateMethodBodyFromBuffer(ByteBuffer buffer)
- {
- <xsl:for-each select="$f/field">
- <xsl:value-of select="amq:decoder(.)"/>;
- </xsl:for-each>
- }
-
- public override string ToString()
- {
- StringBuilder buf = new StringBuilder(base.ToString());
- <xsl:for-each select="$f/field">
- <xsl:text>buf.Append(" </xsl:text><xsl:value-of select="@name"/>: ").Append(<xsl:value-of select="@name"/>);
- </xsl:for-each>
- return buf.ToString();
- }
-
- public static AMQFrame CreateAMQFrame(ushort channelId<xsl:if test="$f/field">, </xsl:if><xsl:value-of select="$f/field/concat(@csharp-type, ' ', @name)" separator=", "/>)
- {
- <xsl:value-of select="@name"/> body = new <xsl:value-of select="@name"/>();
- <xsl:for-each select="$f/field">
- <xsl:value-of select="concat('body.', @name, ' = ', @name)"/>;
- </xsl:for-each>
- AMQFrame frame = new AMQFrame();
- frame.Channel = channelId;
- frame.BodyFrame = body;
- return frame;
- }
-}
-}
-</xsl:template>
-
-<xsl:template match="/" mode="generate-registry">
- <xsl:text>Matching root for registry mode!</xsl:text>
- <xsl:value-of select="."/>
- <xsl:apply-templates select="frames" mode="generate-registry"/>
-</xsl:template>
-
-<xsl:template match="registries" mode="generate-registry">
-Wrote MethodBodyDecoderRegistry.cs
- <xsl:result-document href="MethodBodyDecoderRegistry.cs" format="textFormat">
-using System;
-using System.Collections;
-using log4net;
-
-namespace Apache.Qpid.Framing
-{
-
-
- ///
- /// <summary>This class is autogenerated
- /// Do not modify.
- /// </summary>
- /// @author Code Generator Script by robert.j.greig@jpmorgan.com
-
- public class MethodBodyDecoderRegistry
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(MethodBodyDecoderRegistry));
-
- private static readonly Hashtable _classMethodProductToMethodBodyMap = new Hashtable();
-
- static MethodBodyDecoderRegistry()
- {
- <xsl:for-each select="registry">
- <xsl:value-of select="concat(@name, '.Register(_classMethodProductToMethodBodyMap)')"/>;
- </xsl:for-each>
- }
-
- public static AMQMethodBody Get(int clazz, int method)
- {
- Type bodyClass = (Type) _classMethodProductToMethodBodyMap[clazz * 1000 + method];
- if (bodyClass != null)
- {
- try
- {
- return (AMQMethodBody) Activator.CreateInstance(bodyClass);
- }
- catch (Exception e)
- {
- throw new AMQFrameDecodingException(_log, "Unable to instantiate body class for class " + clazz + " and method " + method + ": " + e, e);
- }
- }
- else
- {
- throw new AMQFrameDecodingException(_log, "Unable to find a suitable decoder for class " + clazz + " and method " + method);
- }
- }
- }
- }
- </xsl:result-document>
-</xsl:template>
-
-<xsl:template match="frames" mode="list-registry">
- <xsl:if test="$registry_name">
-
- <xsl:variable name="file" select="concat($registry_name, '.cs')"/>
- wrote <xsl:value-of select="$file"/>
- <xsl:result-document href="{$file}" format="textFormat">
-
-using System.Collections;
-namespace Apache.Qpid.Framing
-{
- /**
- * This class is autogenerated, do not modify. [From <xsl:value-of select="@protocol"/>]
- */
- class <xsl:value-of select="$registry_name"/>
- {
- internal static void Register(Hashtable map)
- {
- <xsl:for-each select="frame">
- <xsl:text>map[</xsl:text>
- <xsl:value-of select="@class-id"/>
- <xsl:text> * 1000 + </xsl:text>
- <xsl:value-of select="@method-id"/>
- <xsl:text>] = typeof(</xsl:text>
- <xsl:value-of select="@name"/>);
- </xsl:for-each>
- }
-}
-}
- </xsl:result-document>
-
- </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/qpid/dotnet/Qpid.Common/stylesheets/framing.xsl b/qpid/dotnet/Qpid.Common/stylesheets/framing.xsl
deleted file mode 100644
index 119f439599..0000000000
--- a/qpid/dotnet/Qpid.Common/stylesheets/framing.xsl
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:amq="http://amq.org">
-
-<xsl:import href="prepare1.xsl"/>
-<xsl:import href="prepare2.xsl"/>
-<xsl:import href="prepare3.xsl"/>
-<xsl:import href="csharp.xsl"/>
-
-<xsl:output indent="yes"/>
-<xsl:output method="text" indent="yes" name="textFormat"/>
-
-<xsl:template match="/">
- <xsl:variable name="prepare1">
- <xsl:apply-templates mode="prepare1" select="."/>
- </xsl:variable>
-
- <xsl:variable name="prepare2">
- <xsl:apply-templates mode="prepare2" select="$prepare1"/>
- </xsl:variable>
-
- <xsl:variable name="model">
- <xsl:apply-templates mode="prepare3" select="$prepare2"/>
- </xsl:variable>
-
- <xsl:apply-templates mode="generate-multi" select="$model"/>
- <xsl:apply-templates mode="list-registry" select="$model"/>
-
- <!-- dump out the intermediary files for debugging -->
- <!--
- <xsl:result-document href="prepare1.out">
- <xsl:copy-of select="$prepare1"/>
- </xsl:result-document>
-
- <xsl:result-document href="prepare2.out">
- <xsl:copy-of select="$prepare2"/>
- </xsl:result-document>
-
- <xsl:result-document href="model.out">
- <xsl:copy-of select="$model"/>
- </xsl:result-document>
- -->
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/qpid/dotnet/Qpid.Common/stylesheets/java.xsl b/qpid/dotnet/Qpid.Common/stylesheets/java.xsl
deleted file mode 100644
index 7297c6ae62..0000000000
--- a/qpid/dotnet/Qpid.Common/stylesheets/java.xsl
+++ /dev/null
@@ -1,230 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:amq="http://amq.org">
-
-<!-- this class contains the templates for generating java source code for a given framing model -->
-<xsl:import href="utils.xsl"/>
-<xsl:output method="text" indent="yes" name="textFormat"/>
-
-<xsl:param name="registry_name"/>
-
-<xsl:template match="/">
- <xsl:apply-templates mode="generate-multi" select="frames"/>
- <xsl:apply-templates mode="generate-registry" select="frames"/>
-</xsl:template>
-
-<!-- processes all frames outputting the classes in a single stream -->
-<!-- (useful for debugging etc) -->
-<xsl:template match="frame" mode="generate-single">
- <xsl:call-template name="generate-class">
- <xsl:with-param name="f" select="."/>
- </xsl:call-template>
-</xsl:template>
-
-<!-- generates seperate file for each class/frame -->
-<xsl:template match="frame" mode="generate-multi">
- <xsl:variable name="uri" select="concat(@name, '.java')"/>
- wrote <xsl:value-of select="$uri"/>
- <xsl:result-document href="{$uri}" format="textFormat">
- <xsl:call-template name="generate-class">
- <xsl:with-param name="f" select="."/>
- </xsl:call-template>
- </xsl:result-document>
-</xsl:template>
-
-<!-- main class generation template -->
-<xsl:template name="generate-class">
- <xsl:param name="f"/>
-package org.openamq.framing;
-
-import org.apache.mina.common.ByteBuffer;
-
-/**
- * This class is autogenerated, do not modify. [From <xsl:value-of select="$f/parent::frames/@protocol"/>]
- */
-public class <xsl:value-of select="$f/@name"/> extends AMQMethodBody implements EncodableAMQDataBlock
-{
- public static final int CLASS_ID = <xsl:value-of select="$f/@class-id"/>;
- public static final int METHOD_ID = <xsl:value-of select="$f/@method-id"/>;
-
- <xsl:for-each select="$f/field">
- <xsl:text>public </xsl:text><xsl:value-of select="@java-type"/>
- <xsl:text> </xsl:text>
- <xsl:value-of select="@name"/>;
- </xsl:for-each>
-
- protected int getClazz()
- {
- return <xsl:value-of select="$f/@class-id"/>;
- }
-
- protected int getMethod()
- {
- return <xsl:value-of select="$f/@method-id"/>;
- }
-
- protected int getBodySize()
- {
- <xsl:choose>
- <xsl:when test="$f/field">
- return
- <xsl:for-each select="$f/field">
- <xsl:if test="position() != 1">+
- </xsl:if>
- <xsl:value-of select="amq:field-length(.)"/>
- </xsl:for-each>
- ;
- </xsl:when>
- <xsl:otherwise>return 0;</xsl:otherwise>
- </xsl:choose>
- }
-
- protected void writeMethodPayload(ByteBuffer buffer)
- {
- <xsl:for-each select="$f/field">
- <xsl:if test="@type != 'bit'">
- <xsl:value-of select="amq:encoder(.)"/>;
- </xsl:if>
- <xsl:if test="@type = 'bit' and @boolean-index = 1">
- <xsl:text>EncodingUtils.writeBooleans(buffer, new boolean[]{</xsl:text>
- <xsl:value-of select="$f/field[@type='bit']/@name" separator=", "/>});
- </xsl:if>
- </xsl:for-each>
- }
-
- public void populateMethodBodyFromBuffer(ByteBuffer buffer) throws AMQFrameDecodingException
- {
- <xsl:for-each select="$f/field">
- <xsl:value-of select="amq:decoder(.)"/>;
- </xsl:for-each>
- }
-
- public String toString()
- {
- StringBuffer buf = new StringBuffer(super.toString());
- <xsl:for-each select="$f/field">
- <xsl:text>buf.append(" </xsl:text><xsl:value-of select="@name"/>: ").append(<xsl:value-of select="@name"/>);
- </xsl:for-each>
- return buf.toString();
- }
-
- public static AMQFrame createAMQFrame(int channelId<xsl:if test="$f/field">, </xsl:if><xsl:value-of select="$f/field/concat(@java-type, ' ', @name)" separator=", "/>)
- {
- <xsl:value-of select="@name"/> body = new <xsl:value-of select="@name"/>();
- <xsl:for-each select="$f/field">
- <xsl:value-of select="concat('body.', @name, ' = ', @name)"/>;
- </xsl:for-each>
- AMQFrame frame = new AMQFrame();
- frame.channel = channelId;
- frame.bodyFrame = body;
- return frame;
- }
-}
-</xsl:template>
-
-<xsl:template match="/" mode="generate-registry">
- <xsl:text>Matching root for registry mode!</xsl:text>
- <xsl:value-of select="."/>
- <xsl:apply-templates select="frames" mode="generate-registry"/>
-</xsl:template>
-
-<xsl:template match="registries" mode="generate-registry">
-Wrote MethodBodyDecoderRegistry.java
- <xsl:result-document href="MethodBodyDecoderRegistry.java" format="textFormat">package org.openamq.framing;
-
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.log4j.Logger;
-import org.openamq.AMQException;
-
-/**
- * This class is autogenerated, do not modify.
- */
-public final class MethodBodyDecoderRegistry
-{
- private static final Logger _log = Logger.getLogger(MethodBodyDecoderRegistry.class);
-
- private static final Map _classMethodProductToMethodBodyMap = new HashMap();
-
- static
- {
- <xsl:for-each select="registry">
- <xsl:value-of select="concat(@name, '.register(_classMethodProductToMethodBodyMap)')"/>;
- </xsl:for-each>
- }
-
- public static AMQMethodBody get(int clazz, int method) throws AMQFrameDecodingException
- {
- Class bodyClass = (Class) _classMethodProductToMethodBodyMap.get(new Integer(clazz * 1000 + method));
- if (bodyClass != null)
- {
- try
- {
- return (AMQMethodBody) bodyClass.newInstance();
- }
- catch (Exception e)
- {
- throw new AMQFrameDecodingException(_log, "Unable to instantiate body class for class " + clazz + " and method " + method + ": " + e, e);
- }
- }
- else
- {
- throw new AMQFrameDecodingException(_log, "Unable to find a suitable decoder for class " + clazz + " and method " + method);
- }
- }
-}
-</xsl:result-document>
-</xsl:template>
-
-<xsl:template match="frames" mode="list-registry">
- <xsl:if test="$registry_name">
-
- <xsl:variable name="file" select="concat($registry_name, '.java')"/>
- wrote <xsl:value-of select="$file"/>
- <xsl:result-document href="{$file}" format="textFormat">package org.openamq.framing;
-
-import java.util.Map;
-
-/**
- * This class is autogenerated, do not modify. [From <xsl:value-of select="@protocol"/>]
- */
-class <xsl:value-of select="$registry_name"/>
-{
- static void register(Map map)
- {
- <xsl:for-each select="frame">
- <xsl:text>map.put(new Integer(</xsl:text>
- <xsl:value-of select="@class-id"/>
- <xsl:text> * 1000 + </xsl:text>
- <xsl:value-of select="@method-id"/>
- <xsl:text>), </xsl:text>
- <xsl:value-of select="concat(@name, '.class')"/>);
- </xsl:for-each>
- }
-}
- </xsl:result-document>
-
- </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/qpid/dotnet/Qpid.Common/stylesheets/prepare1.xsl b/qpid/dotnet/Qpid.Common/stylesheets/prepare1.xsl
deleted file mode 100644
index e266b0a9cc..0000000000
--- a/qpid/dotnet/Qpid.Common/stylesheets/prepare1.xsl
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:amq="http://amq.org">
-
-<xsl:import href="utils.xsl"/>
-
-<xsl:output indent="yes"/>
-<xsl:param name="asl_base"/>
-
-<!-- pre-process, phase 1 -->
-
-<xsl:template match="/">
- <xsl:apply-templates select="protocol" mode="prepare1"/>
-</xsl:template>
-
-<xsl:template match="amqp" mode="prepare1">
- <frames>
- <xsl:attribute name="protocol">
- <xsl:value-of select="@comment"/>
- <xsl:text> (</xsl:text>
- <xsl:text>major=</xsl:text><xsl:value-of select="option[@name='protocol_major']/@value"/>
- <xsl:text>, minor=</xsl:text><xsl:value-of select="option[@name='protocol_minor']/@value"/>
- <xsl:text>)</xsl:text>
- </xsl:attribute>
- <xsl:apply-templates mode="prepare1" select="inherit"/>
- <xsl:apply-templates mode="prepare1" select="include"/>
- <xsl:apply-templates mode="prepare1" select="domain"/>
- <xsl:apply-templates mode="prepare1" select="class"/>
- </frames>
-</xsl:template>
-
-<xsl:template match="include" mode="prepare1">
- <xsl:if test="@filename != 'asl_constants.asl'">
- <!-- skip asl_constants.asl, we don't need it and it is not well formed so causes error warnings -->
- <xsl:apply-templates select="document(@filename)" mode="prepare1"/>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="inherit" mode="prepare1">
- <xsl:variable name="ibase" select="concat('file:///', $asl_base, '/', @name, '.asl')"/>
- <xsl:choose>
- <xsl:when test="document($ibase)">
- <xsl:apply-templates select="document($ibase)" mode="prepare1"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>
- Could not inherit from <xsl:value-of select="$ibase"/>; file not found.
- </xsl:message>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:template>
-
-<xsl:template match="class[@index]" mode="prepare1">
- <xsl:apply-templates select="method" mode="prepare1"/>
-</xsl:template>
-
-<xsl:template match="method" mode="prepare1">
- <xsl:if test="parent::class[@index]"><!-- there is a template class that has no index, which we want to skip -->
- <frame>
- <xsl:attribute name="name"><xsl:value-of select="amq:class-name(parent::class/@name, @name)"/></xsl:attribute>
- <xsl:attribute name="class-id"><xsl:value-of select="parent::class/@index"/></xsl:attribute>
- <xsl:if test="@index">
- <xsl:attribute name="method-id"><xsl:value-of select="@index"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="not(@index)">
- <xsl:attribute name="method-id"><xsl:number count="method"/></xsl:attribute>
- </xsl:if>
-
- <xsl:apply-templates select="field" mode="prepare1"/>
- </frame>
- </xsl:if>
-</xsl:template>
-
-<xsl:template match="domain" mode="prepare1">
- <domain>
- <name><xsl:value-of select="@name"/></name>
- <type><xsl:value-of select="@type"/></type>
- </domain>
-</xsl:template>
-
-<xsl:template match="field" mode="prepare1">
- <field>
- <xsl:copy-of select="@name"/>
- <xsl:copy-of select="@type"/>
- <xsl:copy-of select="@domain"/>
- </field>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/qpid/dotnet/Qpid.Common/stylesheets/prepare2.xsl b/qpid/dotnet/Qpid.Common/stylesheets/prepare2.xsl
deleted file mode 100644
index 0a64eb6f86..0000000000
--- a/qpid/dotnet/Qpid.Common/stylesheets/prepare2.xsl
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:amq="http://amq.org">
-
-<xsl:import href="utils.xsl"/>
-
-<xsl:output indent="yes"/>
-
-<!-- pre-process, phase 2 -->
-
-<xsl:key name="domain-lookup" match="domain" use="name"/>
-
-<xsl:template match="/">
- <xsl:apply-templates mode="prepare2" select="frames"/>
-</xsl:template>
-
-<xsl:template match="field[@domain]" mode="prepare2">
- <field>
- <xsl:variable name="t1" select="key('domain-lookup', @domain)/type"/>
- <xsl:attribute name="name"><xsl:value-of select="amq:field-name(@name)"/></xsl:attribute>
- <xsl:attribute name="type"><xsl:value-of select="$t1"/></xsl:attribute>
- </field>
-</xsl:template>
-
-<xsl:template match="field[@type]" mode="prepare2">
- <field>
- <xsl:attribute name="name"><xsl:value-of select="amq:field-name(@name)"/></xsl:attribute>
- <xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute>
- </field>
-</xsl:template>
-
-<xsl:template match="frames" mode="prepare2">
- <frames>
- <xsl:copy-of select="@protocol"/>
- <xsl:apply-templates mode="prepare2"/>
- </frames>
-</xsl:template>
-
-<xsl:template match="frame" mode="prepare2">
- <xsl:element name="{name()}">
- <xsl:copy-of select="@*"/>
- <xsl:apply-templates mode="prepare2" select="field"/>
- </xsl:element>
-</xsl:template>
-
-<xsl:template match="domain" mode="prepare2"></xsl:template>
-
-</xsl:stylesheet>
diff --git a/qpid/dotnet/Qpid.Common/stylesheets/prepare3.xsl b/qpid/dotnet/Qpid.Common/stylesheets/prepare3.xsl
deleted file mode 100644
index a921160dd0..0000000000
--- a/qpid/dotnet/Qpid.Common/stylesheets/prepare3.xsl
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:amq="http://amq.org">
-
-<xsl:import href="utils.xsl"/>
-
-<xsl:output indent="yes"/>
-
-<!-- final preparation of the model -->
-
-<xsl:template match="/">
- <xsl:apply-templates mode="prepare3"/>
-</xsl:template>
-
-<xsl:template match="frames" mode="prepare3">
- <frames>
- <xsl:copy-of select="@protocol"/>
- <xsl:apply-templates mode="prepare3"/>
- </frames>
-</xsl:template>
-
-<xsl:template match="frame" mode="prepare3">
- <xsl:element name="frame">
- <xsl:copy-of select="@*"/>
- <xsl:if test="field[@type='bit']"><xsl:attribute name="has-bit-field">true</xsl:attribute></xsl:if>
- <xsl:apply-templates mode="prepare3"/>
- </xsl:element>
-</xsl:template>
-
-
-<xsl:template match="field" mode="prepare3">
- <field>
- <xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute>
- <!-- ensure the field name is processed to be a valid java name -->
- <xsl:attribute name="name"><xsl:value-of select="amq:field-name(@name)"/></xsl:attribute>
- <!-- add some attributes to make code generation easier -->
- <xsl:attribute name="csharp-type"><xsl:value-of select="amq:csharp-type(@type)"/></xsl:attribute>
- <xsl:if test="@type='bit'">
- <xsl:attribute name="boolean-index"><xsl:number count="field[@type='bit']"/></xsl:attribute>
- </xsl:if>
- </field>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/qpid/dotnet/Qpid.Common/stylesheets/readme.txt b/qpid/dotnet/Qpid.Common/stylesheets/readme.txt
deleted file mode 100644
index c2f98050a6..0000000000
--- a/qpid/dotnet/Qpid.Common/stylesheets/readme.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-This directory contains the xsl stylesheets used to generate the code from the
-OpenAMQ protocol specification. They require an XSLT2.0 processor, currently
-Saxon 8 is used.
-
-The generation process is controlled by the framing.xsl stylesheet. This performs
-several phases of transformation, using the other stylesheets. The transformation
-in each phase is defined in a separate file, and these are designed to also allow
-then to be run individually.
-
-The generation takes the amq.asl as input, it also requires that the path to the
-directory where the base asl definitions reside (those definitions that the main
-amq.asl defintion inherits from) be passed in via a paramter called asl_base.
-
-The files involved are as follows:
-
- framing.xsl The control file for the entire generation process
-
- prepare1.xsl Resolves the separate files that make up the protocol
- definition, building a single tree containing all the
- information as a set of 'frame' elements, each of which
- has attributes for its name, and ids for the class and
- method it refers to and contains zero or more field
- elements.
-
- A method id is generated based on the order of the
- method elements within the class elements in the original
- specification. The class id is taken from the enclosing
- class element.
-
- prepare2.xsl Resolves domains into their corresponding types. (This is
- much easier when all the information is in a single tree,
- hence the separate frame).
-
- prepare3.xsl Converts names into valid java names and augments the
- tree to include information that makes the subsequent
- generation phase simpler e.g. the index of boolean
- fields as several boolean flags are combined into a
- single byte. (This is easier once the domains have been
- resolved, hence the separate phase).
-
- java.xsl Generates java classes for each frame, and a registry of
- all the frames to a 'magic' number generated from their
- class and method id.
-
- utils.xsl Contains some utility methods for e.g. producing valid
- java names.
-
-For debugging the framing.xsl can output the intermediary files. This can be
-enabled by uncommenting the relevant lines (a comment explaining this is
-provided inline).
-
- \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Common/stylesheets/registry.xsl b/qpid/dotnet/Qpid.Common/stylesheets/registry.xsl
deleted file mode 100644
index 47a2a29069..0000000000
--- a/qpid/dotnet/Qpid.Common/stylesheets/registry.xsl
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:amq="http://amq.org">
-
-<xsl:import href="csharp.xsl"/>
-
-<xsl:output method="text" indent="yes" name="textFormat"/>
-
-<xsl:template match="/">
- <xsl:apply-templates mode="generate-registry" select="registries"/>
-</xsl:template>
-
-</xsl:stylesheet>
diff --git a/qpid/dotnet/Qpid.Common/stylesheets/utils.xsl b/qpid/dotnet/Qpid.Common/stylesheets/utils.xsl
deleted file mode 100644
index d097bbc4eb..0000000000
--- a/qpid/dotnet/Qpid.Common/stylesheets/utils.xsl
+++ /dev/null
@@ -1,185 +0,0 @@
-<?xml version='1.0'?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:amq="http://amq.org">
-
-<!-- This file contains functions that are used in the generation of the java classes for framing -->
-
-<!-- retrieve the java type of a given amq type -->
-<xsl:function name="amq:csharp-type">
- <xsl:param name="t"/>
- <xsl:choose>
- <xsl:when test="$t='char'">char</xsl:when>
- <xsl:when test="$t='octet'">byte</xsl:when>
- <xsl:when test="$t='short'">ushort</xsl:when>
- <xsl:when test="$t='shortstr'">string</xsl:when>
- <xsl:when test="$t='longstr'">byte[]</xsl:when>
- <xsl:when test="$t='bit'">bool</xsl:when>
- <xsl:when test="$t='long'">uint</xsl:when>
- <xsl:when test="$t='longlong'">ulong</xsl:when>
- <xsl:when test="$t='table'">FieldTable</xsl:when>
- <xsl:otherwise>Object /*WARNING: undefined type*/</xsl:otherwise>
- </xsl:choose>
-</xsl:function>
-
-<!-- retrieve the code to get the field size of a given amq type -->
-<xsl:function name="amq:field-length">
- <xsl:param name="f"/>
- <xsl:choose>
- <xsl:when test="$f/@type='bit' and $f/@boolean-index=1">
- <xsl:value-of select="concat('1 /*', $f/@name, '*/')"/>
- </xsl:when>
- <xsl:when test="$f/@type='bit' and $f/@boolean-index &gt; 1">
- <xsl:value-of select="concat('0 /*', $f/@name, '*/')"/>
- </xsl:when>
- <xsl:when test="$f/@type='char'">
- <xsl:value-of select="concat('1 /*', $f/@name, '*/')"/>
- </xsl:when>
- <xsl:when test="$f/@type='octet'">
- <xsl:value-of select="concat('1 /*', $f/@name, '*/')"/>
- </xsl:when>
- <xsl:when test="$f/@type='short'">
- <xsl:value-of select="concat('2 /*', $f/@name, '*/')"/>
- </xsl:when>
- <xsl:when test="$f/@type='long'">
- <xsl:value-of select="concat('4 /*', $f/@name, '*/')"/>
- </xsl:when>
- <xsl:when test="$f/@type='longlong'">
- <xsl:value-of select="concat('8 /*', $f/@name, '*/')"/>
- </xsl:when>
- <xsl:when test="$f/@type='shortstr'">
- <xsl:value-of select="concat('(uint)EncodingUtils.EncodedShortStringLength(', $f/@name, ')')"/>
- </xsl:when>
- <xsl:when test="$f/@type='longstr'">
- <xsl:value-of select="concat('4 + (uint) (', $f/@name, ' == null ? 0 : ', $f/@name, '.Length)')"/>
- </xsl:when>
- <xsl:when test="$f/@type='table'">
- <xsl:value-of select="concat('(uint)EncodingUtils.EncodedFieldTableLength(', $f/@name, ')')"/>
- </xsl:when>
- <xsl:otherwise><xsl:text>/* WARNING: COULD NOT DETERMINE FIELD SIZE */</xsl:text></xsl:otherwise>
- </xsl:choose>
-</xsl:function>
-
-<!-- retrieve the code to encode a field of a given amq type -->
-<!-- Note:
- This method will not provide an encoder for a bit field.
- Bit fields should be encoded together separately. -->
-
-<xsl:function name="amq:encoder">
- <xsl:param name="f"/>
- <xsl:choose>
- <xsl:when test="$f/@type='char'">
- <xsl:value-of select="concat('buffer.Put(', $f/@name, ')')"/>
- </xsl:when>
- <xsl:when test="$f/@type='octet'">
- <xsl:value-of select="concat('buffer.Put(', $f/@name, ')')"/>
- </xsl:when>
- <xsl:when test="$f/@type='short'">
- <xsl:value-of select="concat('buffer.Put(', $f/@name, ')')"/>
- </xsl:when>
- <xsl:when test="$f/@type='long'">
- <xsl:value-of select="concat('buffer.Put(', $f/@name, ')')"/>
- </xsl:when>
- <xsl:when test="$f/@type='longlong'">
- <xsl:value-of select="concat('buffer.Put(', $f/@name, ')')"/>
- </xsl:when>
- <xsl:when test="$f/@type='shortstr'">
- <xsl:value-of select="concat('EncodingUtils.WriteShortStringBytes(buffer, ', $f/@name, ')')"/>
- </xsl:when>
- <xsl:when test="$f/@type='longstr'">
- <xsl:value-of select="concat('EncodingUtils.WriteLongstr(buffer, ', $f/@name, ')')"/>
- </xsl:when>
- <xsl:when test="$f/@type='table'">
- <xsl:value-of select="concat('EncodingUtils.WriteFieldTableBytes(buffer, ', $f/@name, ')')"/>
- </xsl:when>
- <xsl:otherwise><xsl:text>/* WARNING: COULD NOT DETERMINE ENCODER */</xsl:text></xsl:otherwise>
- </xsl:choose>
-</xsl:function>
-
-<!-- retrieve the code to decode a field of a given amq type -->
-<xsl:function name="amq:decoder">
- <xsl:param name="f"/>
- <xsl:choose>
- <xsl:when test="$f/@type='bit'">
- <xsl:if test="$f/@boolean-index = 1">
- <xsl:text>bool[] bools = EncodingUtils.ReadBooleans(buffer);</xsl:text>
- </xsl:if>
- <xsl:value-of select="concat($f/@name, ' = bools[', $f/@boolean-index - 1 , ']')"/>
- </xsl:when>
- <xsl:when test="$f/@type='char'">
- <xsl:value-of select="concat($f/@name, ' = buffer.GetChar()')"/>
- </xsl:when>
- <xsl:when test="$f/@type='octet'">
- <xsl:value-of select="concat($f/@name, ' = buffer.GetByte()')"/>
- </xsl:when>
- <xsl:when test="$f/@type='short'">
- <xsl:value-of select="concat($f/@name, ' = buffer.GetUInt16()')"/>
- </xsl:when>
- <xsl:when test="$f/@type='long'">
- <xsl:value-of select="concat($f/@name, ' = buffer.GetUInt32()')"/>
- </xsl:when>
- <xsl:when test="$f/@type='longlong'">
- <xsl:value-of select="concat($f/@name, ' = buffer.GetUInt64()')"/>
- </xsl:when>
- <xsl:when test="$f/@type='shortstr'">
- <xsl:value-of select="concat($f/@name, ' = EncodingUtils.ReadShortString(buffer)')"/>
- </xsl:when>
- <xsl:when test="$f/@type='longstr'">
- <xsl:value-of select="concat($f/@name, ' = EncodingUtils.ReadLongstr(buffer)')"/>
- </xsl:when>
- <xsl:when test="$f/@type='table'">
- <xsl:value-of select="concat($f/@name, ' = EncodingUtils.ReadFieldTable(buffer)')"/>
- </xsl:when>
- <xsl:otherwise><xsl:text>/* WARNING: COULD NOT DETERMINE DECODER */</xsl:text></xsl:otherwise>
- </xsl:choose>
-</xsl:function>
-
-<!-- create the class name for a frame, based on class and method (passed in) -->
-<xsl:function name="amq:class-name">
- <xsl:param name="class"/>
- <xsl:param name="method"/>
- <xsl:value-of select="concat(amq:upper-first($class),amq:upper-first(amq:field-name($method)), 'Body')"/>
-</xsl:function>
-
-<!-- get a valid field name, processing spaces and '-'s where appropriate -->
-<xsl:function name="amq:field-name">
- <xsl:param name="name"/>
- <xsl:choose>
- <xsl:when test="contains($name, ' ')">
- <xsl:value-of select="amq:upper-first(concat(substring-before($name, ' '), amq:upper-first(substring-after($name, ' '))))"/>
- </xsl:when>
- <xsl:when test="contains($name, '-')">
- <xsl:value-of select="amq:upper-first(concat(substring-before($name, '-'), amq:upper-first(substring-after($name, '-'))))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="amq:upper-first($name)"/>
- </xsl:otherwise>
- </xsl:choose>
-</xsl:function>
-
-<!-- convert the first character of the input to upper-case -->
-<xsl:function name="amq:upper-first">
- <xsl:param name="in"/>
- <xsl:value-of select="concat(upper-case(substring($in, 1, 1)), substring($in, 2))"/>
-</xsl:function>
-
-</xsl:stylesheet>
diff --git a/qpid/dotnet/Qpid.Integration.Tests/Properties/AssemblyInfo.cs b/qpid/dotnet/Qpid.Integration.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index e19650559f..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Reflection;
-using System.Runtime.InteropServices;
-using log4net.Config;
-[assembly: XmlConfigurator(ConfigFile="log4net.config")]
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Apache.Qpid.Integration.Tests")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Apache.Qpid.Integration.Tests")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("7ebdea21-1352-4673-b66e-fdc0beff461f")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
diff --git a/qpid/dotnet/Qpid.Integration.Tests/Qpid.Integration.Tests.csproj b/qpid/dotnet/Qpid.Integration.Tests/Qpid.Integration.Tests.csproj
deleted file mode 100755
index e7d6e59cf5..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/Qpid.Integration.Tests.csproj
+++ /dev/null
@@ -1,124 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <ProjectGuid>{DE21CEBC-F38C-43EA-B576-38CA9738A00A}</ProjectGuid>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <OutputType>Library</OutputType>
- <RootNamespace>Qpid.Integration.Tests</RootNamespace>
- <AssemblyName>Qpid.Integration.Tests</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <PublishUrl>http://localhost/Qpid.Integration.Tests/</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Web</InstallFrom>
- <UpdateEnabled>true</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>true</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
- <OutputPath>bin\Debug\</OutputPath>
- <DebugSymbols>True</DebugSymbols>
- <DebugType>Full</DebugType>
- <Optimize>False</Optimize>
- <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
- <OutputPath>bin\Release\</OutputPath>
- <DebugSymbols>False</DebugSymbols>
- <DebugType>None</DebugType>
- <Optimize>True</Optimize>
- <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
- <DefineConstants>TRACE</DefineConstants>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
- <ItemGroup>
- <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\client-010\lib\log4net\log4net.dll</HintPath>
- </Reference>
- <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\client-010\lib\nunit\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Qpid.Client\Qpid.Client.csproj">
- <Project>{68987C05-3768-452C-A6FC-6BA1D372852F}</Project>
- <Name>Qpid.Client</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Common\Qpid.Common.csproj">
- <Project>{77064C42-24D2-4CEB-9EA2-0EF481A43205}</Project>
- <Name>Qpid.Common</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Messaging\Qpid.Messaging.csproj">
- <Project>{6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}</Project>
- <Name>Qpid.Messaging</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
-</Project>
diff --git a/qpid/dotnet/Qpid.Integration.Tests/README.txt b/qpid/dotnet/Qpid.Integration.Tests/README.txt
deleted file mode 100644
index 389e3b2c6c..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/README.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-This directory contains NUnit tests, which are 'integration' oriented. These differ
-from 'pure unit' tests which run against the code only. The integration tests require
-a broker to be available to connect to, and apply test cases that interact with it.
diff --git a/qpid/dotnet/Qpid.Integration.Tests/default.build b/qpid/dotnet/Qpid.Integration.Tests/default.build
deleted file mode 100644
index 187aa15894..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/default.build
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Apache.Qpid.Integration.Tests" default="test">
-
- <!-- Creates a .dll for this module. -->
- <target name="build">
-
- <csc target="library"
- define="${build.defines}"
- warnaserror="false"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.dll">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
-
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/nunit.framework.dll" />
- <include name="${build.dir}/Apache.Qpid.Common.dll" />
- <include name="${build.dir}/Apache.Qpid.Messaging.dll" />
- <include name="${build.dir}/Apache.Qpid.Client.dll" />
- <include name="${build.dir}/Apache.Qpid.Sasl.dll" />
- </references>
- </csc>
-
- <!--<copy tofile="${build.dir}/${project::get-name()}.dll.config" file="App.config" />-->
- <copy todir="${build.dir}" file="log4net.config"/>
-
- </target>
-
- <!-- Runs all of the tests in this module. -->
- <target name="test" depends="build">
- <nunit2 verbose="true">
- <formatter type="${nant.formatter}" usefile="true" outputdir="${build.dir}/testresults/" extension="txt"/>
- <formatter type="Plain" usefile="false"/>
- <test>
- <assemblies>
- <include name="${build.dir}/${project::get-name()}.dll"/>
- </assemblies>
- <categories>
- <include name="Integration"/>
- </categories>
- </test>
- </nunit2>
- </target>
-
-</project>
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/Assertion.cs b/qpid/dotnet/Qpid.Integration.Tests/framework/Assertion.cs
deleted file mode 100644
index de12de6522..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/Assertion.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// Assertion models an assertion on a test <see cref="Circuit"/>.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Indicate whether or not the assertion passes when applied.
- /// </table>
- /// </summary>
- public interface Assertion
- {
- /// <summary>
- /// Applies the assertion.
- /// </summary>
- /// <return> <tt>true</tt> if the assertion passes, <tt>false</tt> if it fails. </return>
- bool apply();
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/Assertion.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/Assertion.csx
deleted file mode 100644
index 183315fec1..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/Assertion.csx
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// Assertion models an assertion on a test <see cref="Circuit"/>.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Indicate whether or not the assertion passes when applied.
- /// </table>
- /// </summary>
- public interface Assertion
- {
- /// <summary>
- /// Applies the assertion.
- /// </summary>
- /// <return> <tt>true</tt> if the assertion passes, <tt>false</tt> if it fails. </return>
- public bool apply();
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/AssertionBase.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/AssertionBase.csx
deleted file mode 100644
index 7de3f6c4a5..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/AssertionBase.csx
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Collections.Generic.LinkedList;
-using System.Collections.Generic.IList;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// AssertionBase is a base class for implenmenting assertions. It provides a mechanism to store error messages, and
- /// report all error messages when its <see cref="#ToString()"/> method is called.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Collect error messages.
- /// </table>
- /// </summary>
- public abstract class AssertionBase : Assertion
- {
- /// <summary> Holds the error messages. </summary>
- IList<String> errors = new LinkedList<String>();
-
- /// <summary>
- /// Adds an error message to the assertion.
- /// </summary>
- /// <param name="error"> An error message to add to the assertion. </param>
- public void addError(string error)
- {
- errors.add(error);
- }
-
- /// <summary>
- /// Prints all of the error messages in the assertion into a string.
- /// </summary>
- /// <return> All of the error messages in the assertion as a string. </return>
- public string ToString()
- {
- string result = "";
-
- for (string error : errors)
- {
- result += error;
- }
-
- return result;
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/BrokerLifecycleAware.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/BrokerLifecycleAware.csx
deleted file mode 100644
index 9ef1f54064..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/BrokerLifecycleAware.csx
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// BrokerLifecycleAware is an awareness interface implemented by test cases that can run control the life-cycle of
- /// the brokers on which they run. Its purpose is to expose additional instrumentation of brokers during testing, that
- /// enables tests to use an automated failure mechanism to simulate broker failures, and to re-start failed brokers.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Indicate whether or not a test case is using an in-vm broker.
- /// <tr><td> Track which in-vm broker is currently in use.
- /// <tr><td> Accept setting of a failure mechanism. <td> <see cref="CauseFailure"/>.
- /// </table>
- /// </summary>
- ///
- /// <remarks> Need to think about how to present the brokers through this interface. Thinking numbering the available
- /// brokers from 1 will do. Then can kill 1 and assume failing onto 2. Restart 1 and kill 2 and fail back onto
- /// 1 again? </remarks>
- public interface BrokerLifecycleAware
- {
- public void setInVmBrokers();
-
- /// <summary>
- /// Indicates whether or not a test case is using in-vm brokers.
- /// </summary>
- /// <return> <tt>true</tt> if the test is using in-vm brokers, <tt>false</tt> otherwise. </return>
- public bool usingInVmBroker();
-
- /// <summary>
- /// Sets the currently live in-vm broker.
- /// </summary>
- /// <param name="i"> The currently live in-vm broker. </param>
- public void setLiveBroker(int i);
-
- /// <summary>
- /// Reports the currently live in-vm broker.
- /// </summary>
- /// <return> The currently live in-vm broker. </return>
- public int getLiveBroker();
-
- /// <summary>
- /// Accepts a failure mechanism.
- /// </summary>
- /// <param name="failureMechanism"> The failure mechanism. </param>
- public void setFailureMechanism(CauseFailure failureMechanism);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/CauseFailure.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/CauseFailure.csx
deleted file mode 100644
index 1fe8918e60..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/CauseFailure.csx
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// CauseFailure provides a method to cause a failure in a messaging broker, usually used in conjunction with fail-over
- /// or other failure mode testing. In some cases failures may be automated, for example by shutting down an in-vm broker,
- /// or by sending a special control signal to a broker over a network connection. In other cases, it may be preferable
- /// to ask a user interactively to cause a failure scenario, in which case an implementation may display a prompt or
- /// dialog box asking for notification once the failure has been caused. The purpose of this interface is to abstract
- /// the exact cause and nature of a failure out of failure test cases.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Cause messaging broker failure.
- /// </table>
- /// </summary>
- public interface CauseFailure
- {
- /// <summary> Causes the active message broker to fail. </summary>
- void causeFailure();
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/CauseFailureUserPrompt.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/CauseFailureUserPrompt.csx
deleted file mode 100644
index 96f4ec53d0..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/CauseFailureUserPrompt.csx
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Integration.Tests.framework.CauseFailure;
-
-using java.io.IOException;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// Causes a message broker failure by interactively prompting the user to cause it.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Cause messaging broker failure.
- /// </table>
- /// </summary>
- public class CauseFailureUserPrompt : CauseFailure
- {
- /// <summary> Causes the active message broker to fail.</summary>
- public void causeFailure()
- {
- waitForUser("Cause a broker failure now, then press Return.");
- }
-
- /// <summary>
- /// Outputs a prompt to the console and waits for the user to press return.
- /// </summary>
- /// <param name="prompt"> The prompt to display on the console. </param>
- private void waitForUser(string prompt)
- {
- System.out.println(prompt);
-
- try
- {
- System.in.read();
- }
- catch (IOException e)
- {
- // Ignored.
- }
-
- System.out.println("Continuing.");
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/Circuit.cs b/qpid/dotnet/Qpid.Integration.Tests/framework/Circuit.cs
deleted file mode 100644
index aae9ca0496..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/Circuit.cs
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Collections.Generic;//.IList;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A Circuit is the basic test unit against which test cases are to be written. A circuit consists of two 'ends', an
- /// instigating 'publisher' end and a more passive 'receivers' end.
- ///
- /// <p/>Once created, the life-cycle of a circuit may be controlled by <see cref="#start()"/>ing it, or <see cref="#close()"/>ing it.
- /// Once started, the circuit is ready to send messages over. Once closed the circuit can no longer be used.
- ///
- /// <p/>The state of the circuit may be taken with the <see cref="#check()"/> method, and asserted against by the
- /// <see cref="#applyAssertions(System.Collections.Generic.IList)"/> method.
- ///
- /// <p/>There is a default test procedure which may be performed against the circuit. The outline of this procedure is:
- ///
- /// <p/><pre>
- /// Start the circuit.
- /// Send test messages.
- /// Request a status report.
- /// Assert conditions on the publishing end of the circuit.
- /// Assert conditions on the receiving end of the circuit.
- /// Close the circuit.
- /// Pass with no failed assertions or fail with a list of failed assertions.
- /// </pre>
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Supply the publishing and receiving ends of a test messaging circuit.
- /// <tr><td> Start the circuit running.
- /// <tr><td> Close the circuit down.
- /// <tr><td> Take a reading of the circuits state.
- /// <tr><td> Apply assertions against the circuits state.
- /// <tr><td> Send test messages over the circuit.
- /// <tr><td> Perform the default test procedue on the circuit.
- /// </table>
- /// </summary>
- public interface Circuit
- {
- /// <summary> Gets the interface on the publishing end of the circuit. </summary>
- ///
- /// <return> The publishing end of the circuit. </return>
- Publisher GetPublisher();
-
- /// <summary> Gets the interface on the receiving end of the circuit. </summary>
- ///
- /// <return> The receiving end of the circuit. </return>
- Receiver GetReceiver();
-
- /// <summary> Connects and starts the circuit. After this method is called the circuit is ready to send messages. </summary>
- void Start();
-
- /// <summary>
- /// Checks the test circuit. The effect of this is to gather the circuits state, for both ends of the circuit,
- /// into a report, against which assertions may be checked.
- /// </summary>
- void Check();
-
- /// <summary> Closes the circuit. All associated resources are closed. </summary>
- void Close();
-
- /// <summary>
- /// Applied a list of assertions against the test circuit. The <see cref="#check()"/> method should be called before doing
- /// this, to ensure that the circuit has gathered its state into a report to assert against.
- /// </summary>
- ///
- /// <param name="assertions"> The list of assertions to apply to the circuit. </param>
- ///
- /// <return> Any assertions that failed. </return>
- IList<Assertion> ApplyAssertions(IList<Assertion> assertions);
-
- /// <summary>
- /// Runs the default test procedure against the circuit, and checks that all of the specified assertions hold.
- /// </summary>
- ///
- /// <param name="numMessages"> The number of messages to send using the default test procedure. </param>
- /// <param name="assertions"> The list of assertions to apply. </param>
- ///
- /// <return> Any assertions that failed. </return>
- IList<Assertion> Test(int numMessages, IList<Assertion> assertions);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/Circuit.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/Circuit.csx
deleted file mode 100644
index bf2c623cff..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/Circuit.csx
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Collections.Generic.IList;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A Circuit is the basic test unit against which test cases are to be written. A circuit consists of two 'ends', an
- /// instigating 'publisher' end and a more passive 'receivers' end.
- ///
- /// <p/>Once created, the life-cycle of a circuit may be controlled by <see cref="#start()"/>ing it, or <see cref="#close()"/>ing it.
- /// Once started, the circuit is ready to send messages over. Once closed the circuit can no longer be used.
- ///
- /// <p/>The state of the circuit may be taken with the <see cref="#check()"/> method, and asserted against by the
- /// <see cref="#applyAssertions(System.Collections.Generic.IList)"/> method.
- ///
- /// <p/>There is a default test procedure which may be performed against the circuit. The outline of this procedure is:
- ///
- /// <p/><pre>
- /// Start the circuit.
- /// Send test messages.
- /// Request a status report.
- /// Assert conditions on the publishing end of the circuit.
- /// Assert conditions on the receiving end of the circuit.
- /// Close the circuit.
- /// Pass with no failed assertions or fail with a list of failed assertions.
- /// </pre>
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Supply the publishing and receiving ends of a test messaging circuit.
- /// <tr><td> Start the circuit running.
- /// <tr><td> Close the circuit down.
- /// <tr><td> Take a reading of the circuits state.
- /// <tr><td> Apply assertions against the circuits state.
- /// <tr><td> Send test messages over the circuit.
- /// <tr><td> Perform the default test procedue on the circuit.
- /// </table>
- /// </summary>
- public interface Circuit
- {
- /// <summary>
- /// Gets the interface on the publishing end of the circuit.
- /// </summary>
- /// <return> The publishing end of the circuit. </return>
- public Publisher getPublisher();
-
- /// <summary>
- /// Gets the interface on the receiving end of the circuit.
- /// </summary>
- /// <return> The receiving end of the circuit. </return>
- public Receiver getReceiver();
-
- /// <summary>
- /// Connects and starts the circuit. After this method is called the circuit is ready to send messages.
- public void start();
-
- /// <summary>
- /// Checks the test circuit. The effect of this is to gather the circuits state, for both ends of the circuit,
- /// into a report, against which assertions may be checked.
- public void check();
-
- /// <summary>
- /// Closes the circuit. All associated resources are closed.
- public void close();
-
- /// <summary>
- /// Applied a list of assertions against the test circuit. The <see cref="#check()"/> method should be called before doing
- /// this, to ensure that the circuit has gathered its state into a report to assert against.
- /// </summary>
- /// <param name="assertions"> The list of assertions to apply to the circuit. </param>
- ///
- /// <return> Any assertions that failed. </return>
- public IList<Assertion> applyAssertions(List<Assertion> assertions);
-
- /// <summary>
- /// Runs the default test procedure against the circuit, and checks that all of the specified assertions hold.
- /// </summary>
- /// <param name="numMessages"> The number of messages to send using the default test procedure. </param>
- /// <param name="assertions"> The list of assertions to apply. </param>
- ///
- /// <return> Any assertions that failed. </return>
- public IList<Assertion> test(int numMessages, List<Assertion> assertions);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/CircuitEnd.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/CircuitEnd.csx
deleted file mode 100644
index 6edaf428de..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/CircuitEnd.csx
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-//using javax.jms.*;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A CircuitEnd is a pair consisting of one message producer and one message consumer, that represents one end of a
- /// test circuit. It is a standard unit of connectivity allowing a full-duplex conversation to be held, provided both
- /// the consumer and producer are instantiated and configured.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Provide a message producer for sending messages.
- /// <tr><td> Provide a message consumer for receiving messages.
- /// </table>
- /// </summary>
- ///
- /// <remarks> Update the <see cref="org.apache.qpid.util.ConversationFactory"/> so that it accepts these as the basic conversation
- /// connection units.</remarks>
- public interface CircuitEnd
- {
- /// <summary>
- /// Gets the message producer at this circuit end point.
- /// </summary>
- /// <return> The message producer at with this circuit end point. </return>
- public IMessagePublisher GetProducer();
-
- /// <summary>
- /// Gets the message consumer at this circuit end point.
- /// </summary>
- /// <return> The message consumer at this circuit end point. </return>
- public IMessageConsumer GetConsumer();
-
- /// <summary>
- /// Send the specified message over the producer at this end point.
- /// </summary>
- /// <param name="message"> The message to send. </param>
- ///
- /// <exception cref="JMSException"> Any JMS exception occuring during the send is allowed to fall through. </exception>
- public void Send(IMessage message);
-
- /// <summary>
- /// Gets the JMS Session associated with this circuit end point.
- /// </summary>
- /// <return> The JMS Session associated with this circuit end point. </return>
- public IChannel GetSession();
-
- /// <summary>
- /// Closes the message producers and consumers and the sessions, associated with this circuit end point.
- /// </summary>
- /// <exception cref="JMSException"> Any JMSExceptions occurring during the close are allowed to fall through. </exception>
- public void Close();
-
- /// <summary>
- /// Returns the message monitor for reporting on received messages on this circuit end.
- /// </summary>
- /// <return> The message monitor for this circuit end. </return>
- public MessageMonitor GetMessageMonitor();
-
- /// <summary>
- /// Returns the exception monitor for reporting on exceptions received on this circuit end.
- /// </summary>
- /// <return> The exception monitor for this circuit end. </return>
- public ExceptionMonitor GetExceptionMonitor();
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/CircuitEndBase.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/CircuitEndBase.csx
deleted file mode 100644
index db7fbde6ea..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/CircuitEndBase.csx
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-//using javax.jms.*;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A CircuitEndBase is a pair consisting of one message producer and one message consumer, that represents one end of a
- /// test circuit. It is a standard unit of connectivity allowing a full-duplex conversation to be held, provided both
- /// the consumer and producer are instantiated and configured.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Provide a message producer for sending messages.
- /// <tr><td> Provide a message consumer for receiving messages.
- /// </table>
- /// </summary>
- public class CircuitEndBase : CircuitEnd
- {
- /// <summary> Holds the single message producer. </summary>
- MessageProducer producer;
-
- /// <summary> Holds the single message consumer. </summary>
- MessageConsumer consumer;
-
- /// <summary> Holds the controlSession for the circuit end. </summary>
- Session session;
-
- /// <summary> Holds the message monitor for the circuit end. </summary>
- MessageMonitor messageMonitor;
-
- /// <summary> Holds the exception monitor for the circuit end. </summary>
- ExceptionMonitor exceptionMonitor;
-
- /// <summary>
- /// Creates a circuit end point on the specified producer, consumer and controlSession. Monitors are also configured
- /// for messages and exceptions received by the circuit end.
- /// </summary>
- /// <param name="producer"> The message producer for the circuit end point. </param>
- /// <param name="consumer"> The message consumer for the circuit end point. </param>
- /// <param name="session"> The controlSession for the circuit end point. </param>
- /// <param name="messageMonitor"> The monitor to notify of all messages received by the circuit end. </param>
- /// <param name="exceptionMonitor"> The monitor to notify of all exceptions received by the circuit end. </param>
- public CircuitEndBase(MessageProducer producer, MessageConsumer consumer, Session session, MessageMonitor messageMonitor,
- ExceptionMonitor exceptionMonitor)
- {
- this.producer = producer;
- this.consumer = consumer;
- this.session = session;
-
- this.messageMonitor = messageMonitor;
- this.exceptionMonitor = exceptionMonitor;
- }
-
- /// <summary>
- /// Gets the message producer at this circuit end point.
- /// </summary>
- /// <return> The message producer at with this circuit end point. </return>
- public IMessagePublisher GetProducer()
- {
- return producer;
- }
-
- /// <summary>
- /// Gets the message consumer at this circuit end point.
- /// </summary>
- /// <return> The message consumer at this circuit end point. </return>
- public IMessageConsumer GetConsumer()
- {
- return consumer;
- }
-
- /// <summary>
- /// Send the specified message over the producer at this end point.
- /// </summary>
- /// <param name="message"> The message to send. </param>
- /// <exception cref="javax.jms.JMSException"> Any JMS exception occuring during the send is allowed to fall through. </exception>
- public void Send(IMessage message)
- {
- producer.send(message);
- }
-
- /// <summary>
- /// Gets the JMS Session associated with this circuit end point.
- /// </summary>
- /// <return> The JMS Session associated with this circuit end point. </return>
- public IChannel GetSession()
- {
- return session;
- }
-
- /// <summary>
- /// Closes the message producers and consumers and the sessions, associated with this circuit end point.
- /// </summary>
- /// <exception cref="javax.jms.JMSException"> Any JMSExceptions occurring during the close are allowed to fall through. </exception>
- public void Close()
- {
- if (producer != null)
- {
- producer.Close();
- }
-
- if (consumer != null)
- {
- consumer.Close();
- }
- }
-
- /// <summary>
- /// Returns the message monitor for reporting on received messages on this circuit end.
- /// </summary>
- /// <return> The message monitor for this circuit end. </return>
- public MessageMonitor GetMessageMonitor()
- {
- return messageMonitor;
- }
-
- /// <summary>
- /// Returns the exception monitor for reporting on exceptions received on this circuit end.
- /// </summary>
- /// <return> The exception monitor for this circuit end. </return>
- public ExceptionMonitor GetExceptionMonitor()
- {
- return exceptionMonitor;
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/ExceptionMonitor.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/ExceptionMonitor.csx
deleted file mode 100644
index b2a989b940..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/ExceptionMonitor.csx
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using javax.jms.ExceptionListener;
-using javax.jms.JMSException;
-
-using java.io.PrintWriter;
-using java.io.StringWriter;
-using java.util.ArrayList;
-using System.Collections.Generic.IList;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// An exception monitor, listens for JMS exception on a connection or consumer. It record all exceptions that it receives
- /// and provides methods to test the number and type of exceptions received.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Record all exceptions received.
- /// </table>
- /// </summary>
- public class ExceptionMonitor : ExceptionListener
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(ExceptionMonitor));
-
- /// <summary> Holds the received exceptions. </summary>
- IList<Exception> exceptions = new ArrayList<Exception>();
-
- /// <summary>
- /// Receives incoming exceptions.
- /// </summary>
- /// <param name="e"> The exception to record. </param>
- public synchronized void onException(JMSException e)
- {
- log.debug("public void onException(JMSException e): called", e);
-
- exceptions.add(e);
- }
-
- /// <summary>
- /// Checks that no exceptions have been received.
- /// </summary>
- /// <return> <tt>true</tt> if no exceptions have been received, <tt>false</tt> otherwise. </return>
- public synchronized bool assertNoExceptions()
- {
- return exceptions.isEmpty();
- }
-
- /// <summary>
- /// Checks that exactly one exception has been received.
- /// </summary>
- /// <return> <tt>true</tt> if exactly one exception been received, <tt>false</tt> otherwise. </return>
- public synchronized bool assertOneJMSException()
- {
- return exceptions.size() == 1;
- }
-
- /// <summary>
- /// Checks that exactly one exception, with a linked cause of the specified type, has been received.
- /// </summary>
- /// <param name="aClass"> The type of the linked cause. </param>
- ///
- /// <return> <tt>true</tt> if exactly one exception, with a linked cause of the specified type, been received, </return>
- /// <tt>false</tt> otherwise.
- public synchronized bool assertOneJMSExceptionWithLinkedCause(Class aClass)
- {
- if (exceptions.size() == 1)
- {
- Exception e = exceptions.get(0);
-
- if (e instanceof JMSException)
- {
- JMSException jmse = (JMSException) e;
-
- Exception linkedCause = jmse.getLinkedException();
-
- if ((linkedCause != null) && aClass.isInstance(linkedCause))
- {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /// <summary>
- /// Checks that at least one exception of the the specified type, has been received.
- /// </summary>
- /// <param name="exceptionClass"> The type of the exception. </param>
- ///
- /// <return> <tt>true</tt> if at least one exception of the specified type has been received, <tt>false</tt> otherwise. </return>
- public synchronized bool assertExceptionOfType(Class exceptionClass)
- {
- // Start by assuming that the exception has no been received.
- bool passed = false;
-
- // Scan all the exceptions for a match.
- for (Exception e : exceptions)
- {
- if (exceptionClass.isInstance(e))
- {
- passed = true;
-
- break;
- }
- }
-
- return passed;
- }
-
- /// <summary>
- /// Reports the number of exceptions held by this monitor.
- /// </summary>
- /// <return> The number of exceptions held by this monitor. </return>
- public synchronized int size()
- {
- return exceptions.size();
- }
-
- /// <summary>
- /// Clears the record of received exceptions.
- /// </summary>
- public synchronized void reset()
- {
- exceptions = new ArrayList<Exception>();
- }
-
- /// <summary>
- /// Provides a dump of the stack traces of all exceptions that this exception monitor was notified of. Mainly
- /// use for debugging/test failure reporting purposes.
- /// </summary>
- /// <return> A string containing a dump of the stack traces of all exceptions. </return>
- public synchronized string ToString()
- {
- string result = "ExceptionMonitor: holds " + exceptions.size() + " exceptions.\n\n";
-
- for (Exception ex : exceptions)
- {
- result += getStackTrace(ex) + "\n";
- }
-
- return result;
- }
-
- /// <summary>
- /// Prints an exception stack trace into a string.
- /// </summary>
- /// <param name="t"> The throwable to get the stack trace from. </param>
- ///
- /// <return> A string containing the throwables stack trace. </return>
- public static string getStackTrace(Throwable t)
- {
- StringWriter sw = new StringWriter();
- PrintWriter pw = new PrintWriter(sw, true);
- t.printStackTrace(pw);
- pw.flush();
- sw.flush();
-
- return sw.ToString();
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/FrameworkBaseCase.cs b/qpid/dotnet/Qpid.Integration.Tests/framework/FrameworkBaseCase.cs
deleted file mode 100644
index 77c1cae0ad..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/FrameworkBaseCase.cs
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using NUnit.Framework;
-//using org.apache.log4j.NDC;
-
-using Apache.Qpid.Integration.Tests.framework.sequencers;//.CircuitFactory;
-
-//using uk.co.thebadgerset.junit.extensions.AsymptoticTestCase;
-//using uk.co.thebadgerset.junit.extensions.SetupTaskAware;
-//using uk.co.thebadgerset.junit.extensions.SetupTaskHandler;
-//using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-//using uk.co.thebadgerset.junit.extensions.util.TestContextProperties;
-
-//using java.util.ArrayList;
-using System.Collections.Generic;//.IList;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// FrameworkBaseCase provides a starting point for writing test cases against the test framework. Its main purpose is
- /// to provide some convenience methods for testing.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Create and clean up in-vm brokers on every test case.
- /// <tr><td> Produce lists of assertions from assertion creation calls.
- /// <tr><td> Produce JUnit failures from assertion failures.
- /// <tr><td> Convert failed assertions to error messages.
- /// </table>
- /// </summary>
- public class FrameworkBaseCase //extends AsymptoticTestCase : FrameworkTestContext, SetupTaskAware, BrokerLifecycleAware
- {
- /// <summary> Used for debugging purposes. </summary>
- private static ILog log = LogManager.GetLogger(typeof(FrameworkBaseCase));
-
- /// <summary> Holds the test sequencer to create and run test circuits with. </summary>
- protected CircuitFactory circuitFactory;// = new LocalCircuitFactory();
-
- /// <summary> Used to read the tests configurable properties through. </summary>
- protected TestModel testProps;
-
- /// <summary> A default setup task processor to delegate setup tasks to. </summary>
- //protected SetupTaskHandler taskHandler = new SetupTaskHandler();
-
- /// <summary> Flag used to track whether the test is in-vm or not. </summary>
- //protected bool isUsingInVM;
-
- /// <summary> Holds the failure mechanism. </summary>
- //protected CauseFailure failureMechanism = new CauseFailureUserPrompt();
-
- /*
- /// <summary>
- /// Creates a new test case with the specified name.
- /// </summary>
- /// <param name="name"> The test case name. </param>
- public FrameworkBaseCase(string name) : base(name)
- {
- }
- */
-
- /// <summary>
- /// Returns the test case sequencer that provides test circuit, and test sequence implementations. The sequencer
- /// that this base case returns by default is suitable for running a test circuit with both circuit ends colocated
- /// on the same JVM.
- /// </summary>
- /// <return> The test case sequencer. </return>
- protected CircuitFactory GetCircuitFactory()
- {
- return circuitFactory;
- }
-
- /// <summary>
- /// Overrides the default test circuit factory. Test decorators can use this to supply distributed test sequencers or
- /// other test circuit factory specializations.
- /// </summary>
- /// <param name="circuitFactory"> The new test circuit factory. </param>
- public void SetCircuitFactory(CircuitFactory circuitFactory)
- {
- this.circuitFactory = circuitFactory;
- }
-
- /*
- /// <summary>
- /// Reports the current test case name.
- /// </summary>
- /// <return> The current test case name. </return>
- public TestCaseVector GetTestCaseVector()
- {
- return new TestCaseVector(this.getName(), 0);
- }
- */
-
- /// <summary>
- /// Reports the current test case parameters.
- /// </summary>
- /// <return> The current test case parameters. </return>
- public TestModel getTestParameters()
- {
- return testProps;
- }
-
- /// <summary>
- /// Creates a list of assertions.
- /// </summary>
- /// <param name="asserts"> The assertions to compile in a list. </param>
- ///
- /// <return> A list of assertions. </return>
- protected IList<Assertion> AssertionList(params Assertion[] asserts)
- {
- IList<Assertion> result = new List<Assertion>();
-
- foreach (Assertion assertion in asserts)
- {
- result.Add(assertion);
- }
-
- return result;
- }
-
- /// <summary>
- /// Generates a JUnit assertion exception (failure) if any assertions are passed into this method, also concatenating
- /// all of the error messages in the assertions together to form an error message to diagnose the test failure with.
- /// </summary>
- /// <param name="asserts"> The list of failed assertions. </param>
- protected static void AssertNoFailures(List<Assertion> asserts)
- {
- log.Debug("protected void assertNoFailures(List<Assertion> asserts = " + asserts + "): called");
-
- // Check if there are no assertion failures, and return without doing anything if so.
- if ((asserts == null) || (asserts.Count == 0))
- {
- return;
- }
-
- // Compile all of the assertion failure messages together.
- string errorMessage = AssertionsToString(asserts);
-
- // Fail with the error message from all of the assertions.
- Assert.Fail(errorMessage);
- }
-
- /// <summary>
- /// Converts a list of failed assertions into an error message.
- /// </summary>
- /// <param name="asserts"> The failed assertions. </param>
- ///
- /// <return> The error message. </return>
- protected static string AssertionsToString(List<Assertion> asserts)
- {
- string errorMessage = "";
-
- foreach (Assertion assertion in asserts)
- {
- errorMessage += assertion.ToString() + "\n";
- }
-
- return errorMessage;
- }
-
- /// <summary>
- /// Ensures that the in-vm broker is created and initialized.
- /// </summary>
- ///
- /// <exception cref="Exception"> Any exceptions allowed to fall through and fail the test. </exception>
- [SetUp]
- protected void SetUp()
- {
- //NDC.Push(Name);
-
- //testProps = TestContextProperties.getInstance(TestModel.defaults);
-
- // Process all optional setup tasks. This may include in-vm broker creation, if a decorator has added it.
- //taskHandler.runSetupTasks();
- }
-
- /// <summary> Ensures that the in-vm broker is cleaned up after each test run. </summary>
- [TearDown]
- protected void TearDown()
- {
- //NDC.Pop();
-
- // Process all optional tear down tasks. This may include in-vm broker clean up, if a decorator has added it.
- //taskHandler.runTearDownTasks();
- }
-
- /*
- /// <summary>
- /// Adds the specified task to the tests setup.
- /// </summary>
- /// <param name="task"> The task to add to the tests setup. </param>
- public void chainSetupTask(Runnable task)
- {
- taskHandler.chainSetupTask(task);
- }
- */
-
- /*
- /// <summary>
- /// Adds the specified task to the tests tear down.
- /// </summary>
- /// <param name="task"> The task to add to the tests tear down. </param>
- public void chainTearDownTask(Runnable task)
- {
- taskHandler.chainTearDownTask(task);
- }
- */
-
- /*
- /// <summary>
- /// Should provide a translation from the junit method name of a test to its test case name as known to the test
- /// clients that will run the test. The purpose of this is to convert the JUnit method name into the correct test
- /// case name to place into the test invite. For example the method "testP2P" might map onto the interop test case
- /// name "TC2_BasicP2P".
- /// </summary>
- /// <param name="methodName"> The name of the JUnit test method. </param>
- ///
- /// <return> The name of the corresponding interop test case. </return>
- public string getTestCaseNameForTestMethod(string methodName)
- {
- return methodName;
- }
-
- public void setInVmBrokers()
- {
- isUsingInVM = true;
- }
-
- /// <summary>
- /// Indicates whether or not a test case is using in-vm brokers.
- /// </summary>
- /// <return> <tt>true</tt> if the test is using in-vm brokers, <tt>false</tt> otherwise. </return>
- public bool usingInVmBroker()
- {
- return isUsingInVM;
- }
-
- /// <summary>
- /// Sets the currently live in-vm broker.
- /// </summary>
- /// <param name="i"> The currently live in-vm broker. </param>
- public void setLiveBroker(int i)
- { }
-
- /// <summary>
- /// Reports the currently live in-vm broker.
- /// </summary>
- /// <return> The currently live in-vm broker. </return>
- public int getLiveBroker()
- {
- return 0;
- }
-
- /// <summary>
- /// Accepts a failure mechanism.
- /// </summary>
- /// <param name="failureMechanism"> The failure mechanism. </param>
- public void setFailureMechanism(CauseFailure failureMechanism)
- {
- this.failureMechanism = failureMechanism;
- }
- */
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/FrameworkBaseCase.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/FrameworkBaseCase.csx
deleted file mode 100644
index 00ed572603..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/FrameworkBaseCase.csx
+++ /dev/null
@@ -1,272 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using org.apache.log4j.NDC;
-
-using Apache.Qpid.Integration.Tests.framework.BrokerLifecycleAware;
-using Apache.Qpid.Integration.Tests.framework.sequencers.CircuitFactory;
-
-using uk.co.thebadgerset.junit.extensions.AsymptoticTestCase;
-using uk.co.thebadgerset.junit.extensions.SetupTaskAware;
-using uk.co.thebadgerset.junit.extensions.SetupTaskHandler;
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-using uk.co.thebadgerset.junit.extensions.util.TestContextProperties;
-
-using java.util.ArrayList;
-using System.Collections.Generic.IList;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// FrameworkBaseCase provides a starting point for writing test cases against the test framework. Its main purpose is
- /// to provide some convenience methods for testing.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Create and clean up in-vm brokers on every test case.
- /// <tr><td> Produce lists of assertions from assertion creation calls.
- /// <tr><td> Produce JUnit failures from assertion failures.
- /// <tr><td> Convert failed assertions to error messages.
- /// </table>
- /// </summary>
- public class FrameworkBaseCase extends AsymptoticTestCase : FrameworkTestContext, SetupTaskAware,
- BrokerLifecycleAware
- {
- /// <summary> Used for debugging purposes. </summary>
- private static ILog log = LogManager.GetLogger(typeof(FrameworkBaseCase));
-
- /// <summary> Holds the test sequencer to create and run test circuits with. </summary>
- protected CircuitFactory circuitFactory = new LocalCircuitFactory();
-
- /// <summary> Used to read the tests configurable properties through. </summary>
- protected ParsedProperties testProps;
-
- /// <summary> A default setup task processor to delegate setup tasks to. </summary>
- protected SetupTaskHandler taskHandler = new SetupTaskHandler();
-
- /// <summary> Flag used to track whether the test is in-vm or not. </summary>
- protected bool isUsingInVM;
-
- /// <summary> Holds the failure mechanism. </summary>
- protected CauseFailure failureMechanism = new CauseFailureUserPrompt();
-
- /// <summary>
- /// Creates a new test case with the specified name.
- /// </summary>
- /// <param name="name"> The test case name. </param>
- public FrameworkBaseCase(string name)
- {
- super(name);
- }
-
- /// <summary>
- /// Returns the test case sequencer that provides test circuit, and test sequence implementations. The sequencer
- /// that this base case returns by default is suitable for running a test circuit with both circuit ends colocated
- /// on the same JVM.
- /// </summary>
- /// <return> The test case sequencer. </return>
- protected CircuitFactory getCircuitFactory()
- {
- return circuitFactory;
- }
-
- /// <summary>
- /// Overrides the default test circuit factory. Test decorators can use this to supply distributed test sequencers or
- /// other test circuit factory specializations.
- /// </summary>
- /// <param name="circuitFactory"> The new test circuit factory. </param>
- public void setCircuitFactory(CircuitFactory circuitFactory)
- {
- this.circuitFactory = circuitFactory;
- }
-
- /// <summary>
- /// Reports the current test case name.
- /// </summary>
- /// <return> The current test case name. </return>
- public TestCaseVector getTestCaseVector()
- {
- return new TestCaseVector(this.getName(), 0);
- }
-
- /// <summary>
- /// Reports the current test case parameters.
- /// </summary>
- /// <return> The current test case parameters. </return>
- public MessagingTestConfigProperties getTestParameters()
- {
- return new MessagingTestConfigProperties(testProps);
- }
-
- /// <summary>
- /// Creates a list of assertions.
- /// </summary>
- /// <param name="asserts"> The assertions to compile in a list. </param>
- ///
- /// <return> A list of assertions. </return>
- protected IList<Assertion> assertionList(Assertion... asserts)
- {
- IList<Assertion> result = new ArrayList<Assertion>();
-
- for (Assertion assertion : asserts)
- {
- result.add(assertion);
- }
-
- return result;
- }
-
- /// <summary>
- /// Generates a JUnit assertion exception (failure) if any assertions are passed into this method, also concatenating
- /// all of the error messages in the assertions together to form an error message to diagnose the test failure with.
- /// </summary>
- /// <param name="asserts"> The list of failed assertions. </param>
- protected static void assertNoFailures(List<Assertion> asserts)
- {
- log.debug("protected void assertNoFailures(List<Assertion> asserts = " + asserts + "): called");
-
- // Check if there are no assertion failures, and return without doing anything if so.
- if ((asserts == null) || asserts.isEmpty())
- {
- return;
- }
-
- // Compile all of the assertion failure messages together.
- string errorMessage = assertionsToString(asserts);
-
- // Fail with the error message from all of the assertions.
- fail(errorMessage);
- }
-
- /// <summary>
- /// Converts a list of failed assertions into an error message.
- /// </summary>
- /// <param name="asserts"> The failed assertions. </param>
- ///
- /// <return> The error message. </return>
- protected static string assertionsToString(List<Assertion> asserts)
- {
- string errorMessage = "";
-
- for (Assertion assertion : asserts)
- {
- errorMessage += assertion.ToString() + "\n";
- }
-
- return errorMessage;
- }
-
- /// <summary>
- /// Ensures that the in-vm broker is created and initialized.
- /// </summary>
- ///
- /// <exception cref="Exception"> Any exceptions allowed to fall through and fail the test. </exception>
- protected void setUp() throws Exception
- {
- NDC.push(getName());
-
- testProps = TestContextProperties.getInstance(MessagingTestConfigProperties.defaults);
-
- // Process all optional setup tasks. This may include in-vm broker creation, if a decorator has added it.
- taskHandler.runSetupTasks();
- }
-
- /// <summary> Ensures that the in-vm broker is cleaned up after each test run. </summary>
- protected void tearDown()
- {
- NDC.pop();
-
- // Process all optional tear down tasks. This may include in-vm broker clean up, if a decorator has added it.
- taskHandler.runTearDownTasks();
- }
-
- /// <summary>
- /// Adds the specified task to the tests setup.
- /// </summary>
- /// <param name="task"> The task to add to the tests setup. </param>
- public void chainSetupTask(Runnable task)
- {
- taskHandler.chainSetupTask(task);
- }
-
- /// <summary>
- /// Adds the specified task to the tests tear down.
- /// </summary>
- /// <param name="task"> The task to add to the tests tear down. </param>
- public void chainTearDownTask(Runnable task)
- {
- taskHandler.chainTearDownTask(task);
- }
-
- /// <summary>
- /// Should provide a translation from the junit method name of a test to its test case name as known to the test
- /// clients that will run the test. The purpose of this is to convert the JUnit method name into the correct test
- /// case name to place into the test invite. For example the method "testP2P" might map onto the interop test case
- /// name "TC2_BasicP2P".
- /// </summary>
- /// <param name="methodName"> The name of the JUnit test method. </param>
- ///
- /// <return> The name of the corresponding interop test case. </return>
- public string getTestCaseNameForTestMethod(string methodName)
- {
- return methodName;
- }
-
- public void setInVmBrokers()
- {
- isUsingInVM = true;
- }
-
- /// <summary>
- /// Indicates whether or not a test case is using in-vm brokers.
- /// </summary>
- /// <return> <tt>true</tt> if the test is using in-vm brokers, <tt>false</tt> otherwise. </return>
- public bool usingInVmBroker()
- {
- return isUsingInVM;
- }
-
- /// <summary>
- /// Sets the currently live in-vm broker.
- /// </summary>
- /// <param name="i"> The currently live in-vm broker. </param>
- public void setLiveBroker(int i)
- { }
-
- /// <summary>
- /// Reports the currently live in-vm broker.
- /// </summary>
- /// <return> The currently live in-vm broker. </return>
- public int getLiveBroker()
- {
- return 0;
- }
-
- /// <summary>
- /// Accepts a failure mechanism.
- /// </summary>
- /// <param name="failureMechanism"> The failure mechanism. </param>
- public void setFailureMechanism(CauseFailure failureMechanism)
- {
- this.failureMechanism = failureMechanism;
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/LocalCircuitFactory.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/LocalCircuitFactory.csx
deleted file mode 100644
index 45ecf26ffe..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/LocalCircuitFactory.csx
+++ /dev/null
@@ -1,301 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.localcircuit;//.LocalCircuitImpl;
-//using Apache.Qpid.Integration.Tests.framework.localcircuit.LocalPublisherImpl;
-//using Apache.Qpid.Integration.Tests.framework.localcircuit.LocalReceiverImpl;
-//using Apache.Qpid.Integration.Tests.framework.sequencers.CircuitFactory;
-//using org.apache.qpid.util.ConversationFactory;
-
-//using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-//using javax.jms.*;
-
-using System.Collections.Generic;//.IList;
-//using java.util.Properties;
-//using java.util.concurrent.atomic.AtomicLong;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// LocalCircuitFactory is a circuit factory that creates test circuits with publishing and receiving ends rooted
- /// on the same JVM. The ends of the circuit are presented as <see cref="Publisher"/> and <see cref="Receiver"/> interfaces, which
- /// in turn provide methods to apply assertions to the circuit. The creation of the circuit ends, and the presentation
- /// of the ends as publisher/receiver interfaces, are designed to be overriden, so that circuits and assertions that
- /// use messaging features not available in JMS can be written. This provides an extension point for writing tests
- /// against proprietary features of JMS implementations.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide a standard test procedure over a test circuit.
- /// <tr><td> Construct test circuits appropriate to a tests context.
- /// </table>
- /// </summary>
- public class LocalCircuitFactory : CircuitFactory
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(LocalCircuitFactory));
-
- /// <summary> Used to create unique destination names for each test. </summary>
- protected static AtomicLong uniqueDestsId = new AtomicLong();
-
- /// <summary>
- /// Holds a test coordinating conversation with the test clients. This should consist of assigning the test roles,
- /// begining the test and gathering the test reports from the participants.
- /// </summary>
- /// <param name="testCircuit"> The test circuit. </param>
- /// <param name="assertions"> The list of assertions to apply to the test circuit. </param>
- /// <param name="testProperties"> The test case definition. </param>
- public void sequenceTest(Circuit testCircuit, IList<Assertion> assertions, Properties testProperties)
- {
- FrameworkBaseCase.assertNoFailures(testCircuit.test(1, assertions));
- }
-
- /// <summary>
- /// Creates a test circuit for the test, configered by the test parameters specified.
- /// </summary>
- /// <param name="testProperties"> The test parameters. </param>
- ///
- /// <return> A test circuit. </return>
- public Circuit createCircuit(TestModel testProperties)
- {
- Circuit result;
-
- // Create a standard publisher/receivers test client pair on a shared connection, individual sessions.
- try
- {
- // Get a unique offset to append to destination names to make them unique to the connection.
- long uniqueId = uniqueDestsId.incrementAndGet();
-
- // Set up the connection.
- Connection connection = TestUtils.createConnection(testProperties);
-
- // Add the connection exception listener to assert on exception conditions with.
- // ExceptionMonitor exceptionMonitor = new ExceptionMonitor();
- // connection.setExceptionListener(exceptionMonitor);
-
- // Set up the publisher.
- CircuitEndBase publisherEnd = createPublisherCircuitEnd(connection, testProps, uniqueId);
-
- // Set up the receiver.
- CircuitEndBase receiverEnd = createReceiverCircuitEnd(connection, testProps, uniqueId);
-
- // Start listening for incoming messages.
- connection.start();
-
- // Namespace everything up.
- LocalPublisherImpl publisher = createPublisherFromCircuitEnd(publisherEnd);
- LocalReceiverImpl receiver = createReceiverFromCircuitEnd(receiverEnd);
-
- result = new LocalCircuitImpl(testProperties, publisher, receiver, connection, publisher.getExceptionMonitor());
- }
- catch (JMSException e)
- {
- throw new RuntimeException("Could not create publisher/receivers pair due to a JMSException.", e);
- }
-
- return result;
- }
-
- /// <summary>
- /// Creates a local <see cref="Receiver"/> from a <see cref="CircuitEnd"/>. Sub-classes may override this to provide more
- /// specialized receivers if necessary.
- /// </summary>
- /// <param name="receiverEnd"> The receiving circuit end. </param>
- ///
- /// <return> A <see cref="Receiver"/>. </return>
- protected LocalReceiverImpl createReceiverFromCircuitEnd(CircuitEndBase receiverEnd)
- {
- return new LocalReceiverImpl(receiverEnd);
- }
-
- /// <summary>
- /// Creates a local <see cref="Publisher"/> from a <see cref="CircuitEnd"/>. Sub-classes may override this to provide more
- /// specialized receivers if necessary.
- /// </summary>
- /// <param name="publisherEnd"> The publishing circuit end. </param>
- ///
- /// <return> A <see cref="Receiver"/>. </return>
- protected LocalPublisherImpl createPublisherFromCircuitEnd(CircuitEndBase publisherEnd)
- {
- return new LocalPublisherImpl(publisherEnd);
- }
-
- /// <summary>
- /// Builds a circuit end suitable for the publishing side of a test circuit, from standard test parameters.
- /// </summary>
- /// <param name="connection"> The connection to build the circuit end on. </param>
- /// <param name="testProps"> The test parameters to configure the circuit end construction. </param>
- /// <param name="uniqueId"> A unique number to being numbering destinations from, to make this circuit unique. </param>
- ///
- /// <return> A circuit end suitable for the publishing side of a test circuit. </return>
- ///
- /// <exception cref="JMSException"> Any underlying JMSExceptions are allowed to fall through and fail the creation. </exception>
- public CircuitEndBase createPublisherCircuitEnd(Connection connection, TestModel testProps, long uniqueId)
- throws JMSException
- {
- log.debug(
- "public CircuitEndBase createPublisherCircuitEnd(Connection connection, TestModel testProps, long uniqueId = "
- + uniqueId + "): called");
-
- // Check that the test properties do not contain AMQP/Qpid specific settings, and fail if they do.
- if (testProps.getImmediate() || testProps.getMandatory())
- {
- throw new RuntimeException(
- "Cannot create a pure JMS circuit as the test properties require AMQP specific options.");
- }
-
- Session session = connection.createSession(testProps.getPublisherTransacted(), testProps.getAckMode());
-
- Destination destination =
- testProps.getPubsub() ? session.createTopic(testProps.getSendDestinationNameRoot() + "_" + uniqueId)
- : session.createQueue(testProps.getSendDestinationNameRoot() + "_" + uniqueId);
-
- MessageProducer producer = testProps.getPublisherProducerBind() ? session.createProducer(destination) : null;
-
- MessageConsumer consumer =
- testProps.getPublisherConsumerBind()
- ? session.createConsumer(session.createQueue(testProps.getReceiveDestinationNameRoot() + "_" + uniqueId)) : null;
-
- MessageMonitor messageMonitor = new MessageMonitor();
-
- if (consumer != null)
- {
- consumer.setMessageListener(messageMonitor);
- }
-
- ExceptionMonitor exceptionMonitor = new ExceptionMonitor();
- connection.setExceptionListener(exceptionMonitor);
-
- if (!testProps.getPublisherConsumerActive() && (consumer != null))
- {
- consumer.close();
- }
-
- return new CircuitEndBase(producer, consumer, session, messageMonitor, exceptionMonitor);
- }
-
- /// <summary>
- /// Builds a circuit end suitable for the receiving side of a test circuit, from standard test parameters.
- /// </summary>
- /// <param name="connection"> The connection to build the circuit end on. </param>
- /// <param name="testProps"> The test parameters to configure the circuit end construction. </param>
- /// <param name="uniqueId"> A unique number to being numbering destinations from, to make this circuit unique. </param>
- ///
- /// <return> A circuit end suitable for the receiving side of a test circuit. </return>
- ///
- /// <exception cref="JMSException"> Any underlying JMSExceptions are allowed to fall through and fail the creation. </exception>
- public CircuitEndBase createReceiverCircuitEnd(Connection connection, TestModel testProps, long uniqueId)
- throws JMSException
- {
- log.debug(
- "public CircuitEndBase createReceiverCircuitEnd(Connection connection, TestModel testProps, long uniqueId = "
- + uniqueId + "): called");
-
- // Check that the test properties do not contain AMQP/Qpid specific settings, and fail if they do.
- if (testProps.getImmediate() || testProps.getMandatory())
- {
- throw new RuntimeException(
- "Cannot create a pure JMS circuit as the test properties require AMQP specific options.");
- }
-
- Session session = connection.createSession(testProps.getPublisherTransacted(), testProps.getAckMode());
-
- MessageProducer producer =
- testProps.getReceiverProducerBind()
- ? session.createProducer(session.createQueue(testProps.getReceiveDestinationNameRoot() + "_" + uniqueId)) : null;
-
- Destination destination =
- testProps.getPubsub() ? session.createTopic(testProps.getSendDestinationNameRoot() + "_" + uniqueId)
- : session.createQueue(testProps.getSendDestinationNameRoot() + "_" + uniqueId);
-
- MessageConsumer consumer =
- testProps.getReceiverConsumerBind()
- ? ((testProps.getDurableSubscription() && testProps.getPubsub())
- ? session.createDurableSubscriber((Topic) destination, "testsub") : session.createConsumer(destination))
- : null;
-
- MessageMonitor messageMonitor = new MessageMonitor();
-
- if (consumer != null)
- {
- consumer.setMessageListener(messageMonitor);
- }
-
- if (!testProps.getReceiverConsumerActive() && (consumer != null))
- {
- consumer.close();
- }
-
- return new CircuitEndBase(producer, consumer, session, messageMonitor, null);
- }
-
- /*
- /// <summary>
- /// Sets the sender test client to coordinate the test with.
- /// </summary>
- /// <param name="sender"> The contact details of the sending client in the test. </param>
- public void setSender(TestClientDetails sender)
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Sets the receiving test client to coordinate the test with.
- /// </summary>
- /// <param name="receiver"> The contact details of the sending client in the test. </param>
- public void setReceiver(TestClientDetails receiver)
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Supplies the sending test client.
- /// </summary>
- /// <return> The sending test client. </return>
- public TestClientDetails getSender()
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Supplies the receiving test client.
- /// </summary>
- /// <return> The receiving test client. </return>
- public IList<TestClientDetails> getReceivers()
- {
- throw new RuntimeException("Not implemented.");
- }
- */
-
- /*
- /// <summary>
- /// Accepts the conversation factory over which to hold the test coordinating conversation.
- /// </summary>
- /// <param name="conversationFactory"> The conversation factory to coordinate the test over. </param>
- public void setConversationFactory(ConversationFactory conversationFactory)
- {
- throw new RuntimeException("Not implemented.");
- }
- */
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/MessageMonitor.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/MessageMonitor.csx
deleted file mode 100644
index 440d0761e5..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/MessageMonitor.csx
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using Apache.Qpid.Messaging;
-
-//using javax.jms.Message;
-//using javax.jms.MessageListener;
-
-//using java.util.concurrent.atomic.AtomicInteger;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// MessageMonitor is used to record information about messages received. This will provide methods to check various
- /// properties, such as the type, number and content of messages received in order to verify the correct behaviour of
- /// tests.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Count incoming messages.
- /// <tr><td> Record time ellapsed since the arrival of the first message.
- /// <tr><td> Reset all counts and timings.
- /// </table>
- /// </summary>
- public class MessageMonitor : MessageListener
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(MessageMonitor));
-
- /// <summary> Holds the count of messages received since the last query. </summary>
- protected AtomicInteger numMessages = new AtomicInteger();
-
- /// <summary> Holds the time of arrival of the first message. </summary>
- protected Long firstMessageTime = null;
-
- /// <summary>
- /// Handles received messages. Does Nothing.
- /// </summary>
- /// <param name="message"> The message. Ignored. </param>
- public void onMessage(Message message)
- {
- // log.debug("public void onMessage(Message message): called");
-
- numMessages.getAndIncrement();
- }
-
- /// <summary>
- /// Gets the count of messages.
- /// </summary>
- /// <return> The count of messages. </return>
- public int getNumMessage()
- {
- if (firstMessageTime == null)
- {
- firstMessageTime = System.nanoTime();
- }
-
- return numMessages.get();
- }
-
- /// <summary>
- /// Gets the time elapsed since the first message arrived, in nanos, or zero if no messages have arrived yet.
- /// </summary>
- /// <return> The time elapsed since the first message arrived, in nanos, or zero if no messages have arrived yet. </return>
- public long getTime()
- {
- if (firstMessageTime != null)
- {
- return System.nanoTime() - firstMessageTime;
- }
- else
- {
- return 0L;
- }
- }
-
- /// <summary> Resets the message count and timer to zero. </summary>
- public void reset()
- {
- numMessages.set(0);
- firstMessageTime = null;
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/MessagingTestConfigProperties.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/MessagingTestConfigProperties.csx
deleted file mode 100644
index db19b5c2e0..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/MessagingTestConfigProperties.csx
+++ /dev/null
@@ -1,652 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.Session;
-
-using java.util.Properties;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// MessagingTestConfigProperties defines a set of property names and default values for specifying a messaging topology,
- /// and test parameters for running a messaging test over that topology. A Properties object holding some of these
- /// properties, superimposed onto the defaults, is used to establish test topologies and control test behaviour.
- ///
- /// <p/>A complete list of the parameters, default values and comments on their usage is provided here:
- ///
- /// <p/><table><caption>Parameters</caption>
- /// <tr><th> Parameter <th> Default <th> Comments
- /// <tr><td> messageSize <td> 0 <td> Message size in bytes. Not including any headers.
- /// <tr><td> destinationName <td> ping <td> The root name to use to generate destination names to ping.
- /// <tr><td> persistent <td> false <td> Determines whether peristent delivery is used.
- /// <tr><td> transacted <td> false <td> Determines whether messages are sent/received in transactions.
- /// <tr><td> broker <td> tcp://localhost:5672 <td> Determines the broker to connect to.
- /// <tr><td> virtualHost <td> test <td> Determines the virtual host to send all ping over.
- /// <tr><td> rate <td> 0 <td> The maximum rate (in hertz) to send messages at. 0 means no limit.
- /// <tr><td> verbose <td> false <td> The verbose flag for debugging. Prints to console on every message.
- /// <tr><td> pubsub <td> false <td> Whether to ping topics or queues. Uses p2p by default.
- /// <tr><td> username <td> guest <td> The username to access the broker with.
- /// <tr><td> password <td> guest <td> The password to access the broker with.
- /// <tr><td> selector <td> null <td> Not used. Defines a message selector to filter pings with.
- /// <tr><td> destinationCount <td> 1 <td> The number of receivers listening to the pings.
- /// <tr><td> timeout <td> 30000 <td> In milliseconds. The timeout to stop waiting for replies.
- /// <tr><td> commitBatchSize <td> 1 <td> The number of messages per transaction in transactional mode.
- /// <tr><td> uniqueDests <td> true <td> Whether each receivers only listens to one ping destination or all.
- /// <tr><td> durableDests <td> false <td> Whether or not durable destinations are used.
- /// <tr><td> ackMode <td> AUTO_ACK <td> The message acknowledgement mode. Possible values are:
- /// 0 - SESSION_TRANSACTED
- /// 1 - AUTO_ACKNOWLEDGE
- /// 2 - CLIENT_ACKNOWLEDGE
- /// 3 - DUPS_OK_ACKNOWLEDGE
- /// 257 - NO_ACKNOWLEDGE
- /// 258 - PRE_ACKNOWLEDGE
- /// <tr><td> maxPending <td> 0 <td> The maximum size in bytes, of messages sent but not yet received.
- /// Limits the volume of messages currently buffered on the client
- /// or broker. Can help scale test clients by limiting amount of buffered
- /// data to avoid out of memory errors.
- /// </table>
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide the names and defaults of all test parameters.
- /// </table>
- /// </summary>
- ///
- /// <remarks> Put a type-safe wrapper around these properties, but continue to store the parameters as properties. This is
- /// simply to ensure that it is a simple matter to serialize/deserialize string/string pairs onto messages.</remarks>
- public class MessagingTestConfigProperties extends ParsedProperties
- {
- // ====================== Connection Properties ==================================
-
- /// <summary> Holds the name of the default connection configuration. </summary>
- public static final string CONNECTION_NAME = "broker";
-
- /// <summary> Holds the name of the property to get the initial context factory name from. </summary>
- public static final string INITIAL_CONTEXT_FACTORY_PROPNAME = "java.naming.factory.initial";
-
- /// <summary> Defines the class to use as the initial context factory by default. </summary>
- public static final string INITIAL_CONTEXT_FACTORY_DEFAULT = "org.apache.qpid.jndi.PropertiesFileInitialContextFactory";
-
- /// <summary> Holds the name of the property to get the test broker url from. </summary>
- public static final string BROKER_PROPNAME = "qpid.test.broker";
-
- /// <summary> Holds the default broker url for the test. </summary>
- public static final string BROKER_DEFAULT = "vm://:1";
-
- /// <summary> Holds the name of the property to get the test broker virtual path. </summary>
- public static final string VIRTUAL_HOST_PROPNAME = "virtualHost";
-
- /// <summary> Holds the default virtual path for the test. </summary>
- public static final string VIRTUAL_HOST_DEFAULT = "";
-
- /// <summary> Holds the name of the property to get the broker access username from. </summary>
- public static final string USERNAME_PROPNAME = "username";
-
- /// <summary> Holds the default broker log on username. </summary>
- public static final string USERNAME_DEFAULT = "guest";
-
- /// <summary> Holds the name of the property to get the broker access password from. </summary>
- public static final string PASSWORD_PROPNAME = "password";
-
- /// <summary> Holds the default broker log on password. </summary>
- public static final string PASSWORD_DEFAULT = "guest";
-
- // ====================== Messaging Topology Properties ==========================
-
- /// <summary> Holds the name of the property to get the bind publisher procuder flag from. </summary>
- public static final string PUBLISHER_PRODUCER_BIND_PROPNAME = "publisherProducerBind";
-
- /// <summary> Holds the default value of the publisher producer flag. </summary>
- public static final bool PUBLISHER_PRODUCER_BIND_DEFAULT = true;
-
- /// <summary> Holds the name of the property to get the bind publisher procuder flag from. </summary>
- public static final string PUBLISHER_CONSUMER_BIND_PROPNAME = "publisherConsumerBind";
-
- /// <summary> Holds the default value of the publisher consumer flag. </summary>
- public static final bool PUBLISHER_CONSUMER_BIND_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the bind receivers procuder flag from. </summary>
- public static final string RECEIVER_PRODUCER_BIND_PROPNAME = "receiverProducerBind";
-
- /// <summary> Holds the default value of the receivers producer flag. </summary>
- public static final bool RECEIVER_PRODUCER_BIND_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the bind receivers procuder flag from. </summary>
- public static final string RECEIVER_CONSUMER_BIND_PROPNAME = "receiverConsumerBind";
-
- /// <summary> Holds the default value of the receivers consumer flag. </summary>
- public static final bool RECEIVER_CONSUMER_BIND_DEFAULT = true;
-
- /// <summary> Holds the name of the property to get the publishers consumer active flag from. </summary>
- public static final string PUBLISHER_CONSUMER_ACTIVE_PROPNAME = "publisherConsumerActive";
-
- /// <summary> Holds the default value of the publishers consumer active flag. </summary>
- public static final bool PUBLISHER_CONSUMER_ACTIVE_DEFAULT = true;
-
- /// <summary> Holds the name of the property to get the receivers consumer active flag from. </summary>
- public static final string RECEIVER_CONSUMER_ACTIVE_PROPNAME = "receiverConsumerActive";
-
- /// <summary> Holds the default value of the receivers consumer active flag. </summary>
- public static final bool RECEIVER_CONSUMER_ACTIVE_DEFAULT = true;
-
- /// <summary> Holds the name of the property to get the destination name root from. </summary>
- public static final string SEND_DESTINATION_NAME_ROOT_PROPNAME = "sendDestinationRoot";
-
- /// <summary> Holds the root of the name of the default destination to send to. </summary>
- public static final string SEND_DESTINATION_NAME_ROOT_DEFAULT = "sendTo";
-
- /// <summary> Holds the name of the property to get the destination name root from. </summary>
- public static final string RECEIVE_DESTINATION_NAME_ROOT_PROPNAME = "receiveDestinationRoot";
-
- /// <summary> Holds the root of the name of the default destination to send to. </summary>
- public static final string RECEIVE_DESTINATION_NAME_ROOT_DEFAULT = "receiveFrom";
-
- /// <summary> Holds the name of the proeprty to get the destination count from. </summary>
- public static final string DESTINATION_COUNT_PROPNAME = "destinationCount";
-
- /// <summary> Defines the default number of destinations to ping. </summary>
- public static final int DESTINATION_COUNT_DEFAULT = 1;
-
- /// <summary> Holds the name of the property to get the p2p or pub/sub messaging mode from. </summary>
- public static final string PUBSUB_PROPNAME = "pubsub";
-
- /// <summary> Holds the pub/sub mode default, true means ping a topic, false means ping a queue. </summary>
- public static final bool PUBSUB_DEFAULT = false;
-
- // ====================== JMS Options and Flags =================================
-
- /// <summary> Holds the name of the property to get the test delivery mode from. </summary>
- public static final string PERSISTENT_MODE_PROPNAME = "persistent";
-
- /// <summary> Holds the message delivery mode to use for the test. </summary>
- public static final bool PERSISTENT_MODE_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the test transactional mode from. </summary>
- public static final string TRANSACTED_PUBLISHER_PROPNAME = "transactedPublisher";
-
- /// <summary> Holds the transactional mode to use for the test. </summary>
- public static final bool TRANSACTED_PUBLISHER_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the test transactional mode from. </summary>
- public static final string TRANSACTED_RECEIVER_PROPNAME = "transactedReceiver";
-
- /// <summary> Holds the transactional mode to use for the test. </summary>
- public static final bool TRANSACTED_RECEIVER_DEFAULT = false;
-
- /// <summary> Holds the name of the property to set the no local flag from. </summary>
- public static final string NO_LOCAL_PROPNAME = "noLocal";
-
- /// <summary> Defines the default value of the no local flag to use when consuming messages. </summary>
- public static final bool NO_LOCAL_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the message acknowledgement mode from. </summary>
- public static final string ACK_MODE_PROPNAME = "ackMode";
-
- /// <summary> Defines the default message acknowledgement mode. </summary>
- public static final int ACK_MODE_DEFAULT = Session.AUTO_ACKNOWLEDGE;
-
- /// <summary> Holds the name of the property to get the durable subscriptions flag from, when doing pub/sub messaging. </summary>
- public static final string DURABLE_SUBSCRIPTION_PROPNAME = "durableSubscription";
-
- /// <summary> Defines the default value of the durable subscriptions flag. </summary>
- public static final bool DURABLE_SUBSCRIPTION_DEFAULT = false;
-
- // ====================== Qpid/AMQP Options and Flags ================================
-
- /// <summary> Holds the name of the property to set the exclusive flag from. </summary>
- public static final string EXCLUSIVE_PROPNAME = "exclusive";
-
- /// <summary> Defines the default value of the exclusive flag to use when consuming messages. </summary>
- public static final bool EXCLUSIVE_DEFAULT = false;
-
- /// <summary> Holds the name of the property to set the immediate flag from. </summary>
- public static final string IMMEDIATE_PROPNAME = "immediate";
-
- /// <summary> Defines the default value of the immediate flag to use when sending messages. </summary>
- public static final bool IMMEDIATE_DEFAULT = false;
-
- /// <summary> Holds the name of the property to set the mandatory flag from. </summary>
- public static final string MANDATORY_PROPNAME = "mandatory";
-
- /// <summary> Defines the default value of the mandatory flag to use when sending messages. </summary>
- public static final bool MANDATORY_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the durable destinations flag from. </summary>
- public static final string DURABLE_DESTS_PROPNAME = "durableDests";
-
- /// <summary> Default value for the durable destinations flag. </summary>
- public static final bool DURABLE_DESTS_DEFAULT = false;
-
- /// <summary> Holds the name of the property to set the prefetch size from. </summary>
- public static final string PREFETCH_PROPNAME = "prefetch";
-
- /// <summary> Defines the default prefetch size to use when consuming messages. </summary>
- public static final int PREFETCH_DEFAULT = 100;
-
- // ====================== Common Test Parameters ================================
-
- /// <summary> Holds the name of the property to get the test message size from. </summary>
- public static final string MESSAGE_SIZE_PROPNAME = "messageSize";
-
- /// <summary> Used to set up a default message size. </summary>
- public static final int MESSAGE_SIZE_DEAFULT = 0;
-
- /// <summary> Holds the name of the property to get the message rate from. </summary>
- public static final string RATE_PROPNAME = "rate";
-
- /// <summary> Defines the default rate (in pings per second) to send pings at. 0 means as fast as possible, no restriction. </summary>
- public static final int RATE_DEFAULT = 0;
-
- /// <summary> Holds the name of the proeprty to get the. </summary>
- public static final string SELECTOR_PROPNAME = "selector";
-
- /// <summary> Holds the default message selector. </summary>
- public static final string SELECTOR_DEFAULT = "";
-
- /// <summary> Holds the name of the property to get the waiting timeout for response messages. </summary>
- public static final string TIMEOUT_PROPNAME = "timeout";
-
- /// <summary> Default time to wait before assuming that a ping has timed out. </summary>
- public static final long TIMEOUT_DEFAULT = 30000;
-
- /// <summary> Holds the name of the property to get the commit batch size from. </summary>
- public static final string TX_BATCH_SIZE_PROPNAME = "commitBatchSize";
-
- /// <summary> Defines the default number of pings to send in each transaction when running transactionally. </summary>
- public static final int TX_BATCH_SIZE_DEFAULT = 1;
-
- /// <summary> Holds the name of the property to set the maximum amount of pending message data for a producer to hold. </summary>
- public static final string MAX_PENDING_PROPNAME = "maxPending";
-
- /// <summary> Defines the default maximum quantity of pending message data to allow producers to hold. </summary>
- public static final int MAX_PENDING_DEFAULT = 0;
-
- /// <summary> Holds the name of the property to get the publisher rollback flag from. </summary>
- public static final string ROLLBACK_PUBLISHER_PROPNAME = "rollbackPublisher";
-
- /// <summary> Holds the default publisher roll back setting. </summary>
- public static final bool ROLLBACK_PUBLISHER_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the publisher rollback flag from. </summary>
- public static final string ROLLBACK_RECEIVER_PROPNAME = "rollbackReceiver";
-
- /// <summary> Holds the default publisher roll back setting. </summary>
- public static final bool ROLLBACK_RECEIVER_DEFAULT = false;
-
- // ====================== Options that control the bahviour of the test framework. =========================
-
- /// <summary> Holds the name of the property to get the behavioural mode of not applicable assertions. </summary>
- public static final string NOT_APPLICABLE_ASSERTION_PROPNAME = "notApplicableAssertion";
-
- /// <summary> Holds the default behavioral mode of not applicable assertions, which is logging them as a warning. </summary>
- public static final string NOT_APPLICABLE_ASSERTION_DEFAULT = "warn";
-
- /// <summary> Holds the name of the property to get the verbose mode proeprty from. </summary>
- public static final string VERBOSE_PROPNAME = "verbose";
-
- /// <summary> Holds the default verbose mode. </summary>
- public static final bool VERBOSE_DEFAULT = false;
-
- /// <summary> Holds the default configuration properties. </summary>
- public static ParsedProperties defaults = new ParsedProperties();
-
- static
- {
- defaults.setPropertyIfNull(INITIAL_CONTEXT_FACTORY_PROPNAME, INITIAL_CONTEXT_FACTORY_DEFAULT);
- defaults.setPropertyIfNull(BROKER_PROPNAME, BROKER_DEFAULT);
- defaults.setPropertyIfNull(VIRTUAL_HOST_PROPNAME, VIRTUAL_HOST_DEFAULT);
- defaults.setPropertyIfNull(USERNAME_PROPNAME, USERNAME_DEFAULT);
- defaults.setPropertyIfNull(PASSWORD_PROPNAME, PASSWORD_DEFAULT);
-
- defaults.setPropertyIfNull(PUBLISHER_PRODUCER_BIND_PROPNAME, PUBLISHER_PRODUCER_BIND_DEFAULT);
- defaults.setPropertyIfNull(PUBLISHER_CONSUMER_BIND_PROPNAME, PUBLISHER_CONSUMER_BIND_DEFAULT);
- defaults.setPropertyIfNull(RECEIVER_PRODUCER_BIND_PROPNAME, RECEIVER_PRODUCER_BIND_DEFAULT);
- defaults.setPropertyIfNull(RECEIVER_CONSUMER_BIND_PROPNAME, RECEIVER_CONSUMER_BIND_DEFAULT);
- defaults.setPropertyIfNull(PUBLISHER_CONSUMER_ACTIVE_PROPNAME, PUBLISHER_CONSUMER_ACTIVE_DEFAULT);
- defaults.setPropertyIfNull(RECEIVER_CONSUMER_ACTIVE_PROPNAME, RECEIVER_CONSUMER_ACTIVE_DEFAULT);
- defaults.setPropertyIfNull(SEND_DESTINATION_NAME_ROOT_PROPNAME, SEND_DESTINATION_NAME_ROOT_DEFAULT);
- defaults.setPropertyIfNull(RECEIVE_DESTINATION_NAME_ROOT_PROPNAME, RECEIVE_DESTINATION_NAME_ROOT_DEFAULT);
- defaults.setPropertyIfNull(DESTINATION_COUNT_PROPNAME, DESTINATION_COUNT_DEFAULT);
- defaults.setPropertyIfNull(PUBSUB_PROPNAME, PUBSUB_DEFAULT);
-
- defaults.setPropertyIfNull(PERSISTENT_MODE_PROPNAME, PERSISTENT_MODE_DEFAULT);
- defaults.setPropertyIfNull(TRANSACTED_PUBLISHER_PROPNAME, TRANSACTED_PUBLISHER_DEFAULT);
- defaults.setPropertyIfNull(TRANSACTED_RECEIVER_PROPNAME, TRANSACTED_RECEIVER_DEFAULT);
- defaults.setPropertyIfNull(NO_LOCAL_PROPNAME, NO_LOCAL_DEFAULT);
- defaults.setPropertyIfNull(ACK_MODE_PROPNAME, ACK_MODE_DEFAULT);
- defaults.setPropertyIfNull(DURABLE_SUBSCRIPTION_PROPNAME, DURABLE_SUBSCRIPTION_DEFAULT);
-
- defaults.setPropertyIfNull(EXCLUSIVE_PROPNAME, EXCLUSIVE_DEFAULT);
- defaults.setPropertyIfNull(IMMEDIATE_PROPNAME, IMMEDIATE_DEFAULT);
- defaults.setPropertyIfNull(MANDATORY_PROPNAME, MANDATORY_DEFAULT);
- defaults.setPropertyIfNull(DURABLE_DESTS_PROPNAME, DURABLE_DESTS_DEFAULT);
- defaults.setPropertyIfNull(PREFETCH_PROPNAME, PREFETCH_DEFAULT);
-
- defaults.setPropertyIfNull(MESSAGE_SIZE_PROPNAME, MESSAGE_SIZE_DEAFULT);
- defaults.setPropertyIfNull(RATE_PROPNAME, RATE_DEFAULT);
- defaults.setPropertyIfNull(SELECTOR_PROPNAME, SELECTOR_DEFAULT);
- defaults.setPropertyIfNull(TIMEOUT_PROPNAME, TIMEOUT_DEFAULT);
- defaults.setPropertyIfNull(TX_BATCH_SIZE_PROPNAME, TX_BATCH_SIZE_DEFAULT);
- defaults.setPropertyIfNull(MAX_PENDING_PROPNAME, MAX_PENDING_DEFAULT);
- defaults.setPropertyIfNull(ROLLBACK_PUBLISHER_PROPNAME, ROLLBACK_PUBLISHER_DEFAULT);
- defaults.setPropertyIfNull(ROLLBACK_RECEIVER_PROPNAME, ROLLBACK_RECEIVER_DEFAULT);
-
- defaults.setPropertyIfNull(NOT_APPLICABLE_ASSERTION_PROPNAME, NOT_APPLICABLE_ASSERTION_DEFAULT);
- defaults.setPropertyIfNull(VERBOSE_PROPNAME, VERBOSE_DEFAULT);
- }
-
- /// <summary> Creates a test configuration based on the defaults. </summary>
- public MessagingTestConfigProperties()
- {
- super(defaults);
- }
-
- /// <summary>
- /// Creates a test configuration based on the supplied properties.
- /// </summary>
- /// <param name="properties"> The test configuration. </param>
- public MessagingTestConfigProperties(Properties properties)
- {
- super(properties);
- }
-
- /// <summary>
- /// The size of test messages to send.
- /// </summary>
- /// <return> The size of test messages to send. </return>
- public int getMessageSize()
- {
- return getPropertyAsInteger(MESSAGE_SIZE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the publishing producer should be set up to publish to a destination.
- /// </summary>
- /// <return> Flag to indicate that the publishing producer should be set up to publish to a destination. </return>
- public bool getPublisherProducerBind()
- {
- return getPropertyAsBoolean(PUBLISHER_PRODUCER_BIND_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the publishing consumer should be set up to receive from a destination.
- /// </summary>
- /// <return> Flag to indicate that the publishing consumer should be set up to receive from a destination. </return>
- public bool getPublisherConsumerBind()
- {
- return getPropertyAsBoolean(PUBLISHER_CONSUMER_BIND_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the receiving producer should be set up to publish to a destination.
- /// </summary>
- /// <return> Flag to indicate that the receiving producer should be set up to publish to a destination. </return>
- public bool getReceiverProducerBind()
- {
- return getPropertyAsBoolean(RECEIVER_PRODUCER_BIND_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the receiving consumer should be set up to receive from a destination.
- /// </summary>
- /// <return> Flag to indicate that the receiving consumer should be set up to receive from a destination. </return>
- public bool getReceiverConsumerBind()
- {
- return getPropertyAsBoolean(RECEIVER_CONSUMER_BIND_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the publishing consumer should be created and actively listening.
- /// </summary>
- /// <return> Flag to indicate that the publishing consumer should be created. </return>
- public bool getPublisherConsumerActive()
- {
- return getPropertyAsBoolean(PUBLISHER_CONSUMER_ACTIVE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the receiving consumers should be created and actively listening.
- /// </summary>
- /// <return> Flag to indicate that the receiving consumers should be created and actively listening. </return>
- public bool getReceiverConsumerActive()
- {
- return getPropertyAsBoolean(RECEIVER_CONSUMER_ACTIVE_PROPNAME);
- }
-
- /// <summary>
- /// A root to create all test destination names from.
- /// </summary>
- /// <return> A root to create all test destination names from. </return>
- public string getSendDestinationNameRoot()
- {
- return getProperty(SEND_DESTINATION_NAME_ROOT_PROPNAME);
- }
-
- /// <summary>
- /// A root to create all receiving destination names from.
- /// </summary>
- /// <return> A root to create all receiving destination names from. </return>
- public string getReceiveDestinationNameRoot()
- {
- return getProperty(RECEIVE_DESTINATION_NAME_ROOT_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that persistent messages should be used.
- /// </summary>
- /// <return> Flag to indicate that persistent messages should be used. </return>
- public bool getPersistentMode()
- {
- return getPropertyAsBoolean(PERSISTENT_MODE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that transactional messages should be sent by the publisher.
- /// </summary>
- /// <return> Flag to indicate that transactional messages should be sent by the publisher. </return>
- public bool getPublisherTransacted()
- {
- return getPropertyAsBoolean(TRANSACTED_PUBLISHER_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that transactional receives should be used by the receiver.
- /// </summary>
- /// <return> Flag to indicate that transactional receives should be used by the receiver. </return>
- public bool getReceiverTransacted()
- {
- return getPropertyAsBoolean(TRANSACTED_PUBLISHER_PROPNAME);
- }
-
- /// <summary>
- /// The name of the virtual host to run all tests over.
- /// </summary>
- /// <return> The name of the virtual host to run all tests over. </return>
- public string getVirtualHost()
- {
- return getProperty(VIRTUAL_HOST_PROPNAME);
- }
-
- /// <summary>
- /// Limiting rate for each sender in messages per second, or zero for unlimited.
- /// </summary>
- /// <return> Limiting rate for each sender in messages per second, or zero for unlimited. </return>
- public string getRate()
- {
- return getProperty(RATE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that test messages should be received publish/subscribe style by all receivers.
- /// </summary>
- /// <return> Flag to indicate that test messages should be received publish/subscribe style by all receivers. </return>
- public bool getPubsub()
- {
- return getPropertyAsBoolean(PUBSUB_PROPNAME);
- }
-
- /// <summary>
- /// The username credentials to run tests with.
- /// </summary>
- /// <return> The username credentials to run tests with. </return>
- public string getUsername()
- {
- return getProperty(USERNAME_PROPNAME);
- }
-
- /// <summary>
- /// The password credentials to run tests with.
- /// </summary>
- /// <return> The password credentials to run tests with. </return>
- public string getPassword()
- {
- return getProperty(PASSWORD_PROPNAME);
- }
-
- /// <summary>
- /// The timeout duration to fail tests on, should they receive no messages within it.
- /// </summary>
- /// <return> The timeout duration to fail tests on, should they receive no messages within it. </return>
- public long getTimeout()
- {
- return getPropertyAsLong(TIMEOUT_PROPNAME);
- }
-
- /// <summary>
- /// The number of messages to batch into each transaction in transational tests.
- /// </summary>
- /// <return> The number of messages to batch into each transaction in transational tests. </return>
- public int getTxBatchSize()
- {
- return getPropertyAsInteger(TX_BATCH_SIZE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that tests should use durable destinations.
- /// </summary>
- /// <return> Flag to indicate that tests should use durable destinations. </return>
- public bool getDurableDests()
- {
- return getPropertyAsBoolean(DURABLE_DESTS_PROPNAME);
- }
-
- /// <summary>
- /// The ack mode for message receivers to use.
- /// </summary>
- /// <return> The ack mode for message receivers to use. </return>
- public int getAckMode()
- {
- return getPropertyAsInteger(ACK_MODE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that tests should use durable subscriptions.
- /// </summary>
- /// <return> Flag to indicate that tests should use durable subscriptions. </return>
- public bool getDurableSubscription()
- {
- return getPropertyAsBoolean(DURABLE_SUBSCRIPTION_PROPNAME);
- }
-
- /// <summary>
- /// The maximum amount of in-flight data, in bytes, that tests should send at any time.
- /// </summary>
- /// <return> The maximum amount of in-flight data, in bytes, that tests should send at any time. </return>
- public int getMaxPending()
- {
- return getPropertyAsInteger(MAX_PENDING_PROPNAME);
- }
-
- /// <summary>
- /// The size of the prefetch queue to use.
- /// </summary>
- /// <return> The size of the prefetch queue to use. </return>
- public int getPrefetch()
- {
- return getPropertyAsInteger(PREFETCH_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that subscriptions should be no-local.
- /// </summary>
- /// <return> Flag to indicate that subscriptions should be no-local. </return>
- public bool getNoLocal()
- {
- return getPropertyAsBoolean(NO_LOCAL_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that subscriptions should be exclusive.
- /// </summary>
- /// <return> Flag to indicate that subscriptions should be exclusive. </return>
- public bool getExclusive()
- {
- return getPropertyAsBoolean(EXCLUSIVE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that messages must be delivered immediately.
- /// </summary>
- /// <return> Flag to indicate that messages must be delivered immediately. </return>
- public bool getImmediate()
- {
- return getPropertyAsBoolean(IMMEDIATE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that messages must be routable.
- /// </summary>
- /// <return> Flag to indicate that messages must be routable. </return>
- public bool getMandatory()
- {
- return getPropertyAsBoolean(MANDATORY_PROPNAME);
- }
-
- /// <summary>
- /// Gets the value of a flag to indicate that the publisher should rollback all messages sent.
- /// </summary>
- /// <return> A flag to indicate that the publisher should rollback all messages sent. </return>
- public bool getRollbackPublisher()
- {
- return getPropertyAsBoolean(ROLLBACK_PUBLISHER_PROPNAME);
- }
-
- /// <summary>
- /// Gets the value of a flag to indicate that the receiver should rollback all messages received, then receive them
- /// again.
- /// </summary>
- /// <return> A flag to indicate that the publisher should rollback all messages received. </return>
- public bool getRollbackReceiver()
- {
- return getPropertyAsBoolean(ROLLBACK_RECEIVER_PROPNAME);
- }
-
- /// <summary>
- /// Gets the behavioural mode of not applicable assertions. Should be one of 'quiet', 'warn' or 'fail'.
- /// </summary>
- /// <return> The behavioural mode of not applicable assertions. </return>
- public string getNotApplicableAssertionMode()
- {
- return getProperty(NOT_APPLICABLE_ASSERTION_PROPNAME);
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/NotApplicableAssertion.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/NotApplicableAssertion.csx
deleted file mode 100644
index 3e3505725f..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/NotApplicableAssertion.csx
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// NotApplicableAssertion is a messaging assertion that can be used when an assertion requested by a test-case is not
- /// applicable to the testing scenario. For example an assertion may relate to AMQP functionality, but a test case may be
- /// being run over a non-AMQP JMS implementation, in which case the request to create the assertion may return this
- /// instead of the proper assertion. The test framework is configurable to quietly drop these assertions, log them
- /// as warnings to the console, or raise them as test failures.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Quitely pass.
- /// <tr><td> Log a warning.
- /// <tr><td> Raise a test failure.
- /// </table>
- /// </summary>
- public class NotApplicableAssertion : Assertion
- {
- /// <summary> Used for logging to the console. </summary>
- private static ILog console = LogManager.GetLogger("CONSOLE." + NotApplicableAssertion.class.getName());
-
- /// <summary> The possible behavioural modes of this assertion. </summary>
- private enum Mode
- {
- /// <summary> Quietly ignore the assertion by passing. </summary>
- Quiet,
-
- /// <summary> Ignore the assertion by passing but log a warning about it. </summary>
- Warn,
-
- /// <summary> Fail the assertion. </summary>
- Fail;
- }
-
- /// <summary> The behavioural mode of the assertion. </summary>
- private Mode mode;
-
- /// <summary>
- /// Creates an assertion that is driven by the value of the 'notApplicableAssertion' property of the test
- /// configuration. Its value should match one of 'quiet', 'warn' or 'fail' and if it does not it is automatically
- /// read as 'fail'.
- /// </summary>
- /// <param name="testProperties"> The test configuration properties. </param>
- public NotApplicableAssertion(ParsedProperties testProperties)
- {
- // Cast the test properties into a typed interface for convenience.
- MessagingTestConfigProperties props = new MessagingTestConfigProperties(testProperties);
-
- string modeName = props.getNotApplicableAssertionMode();
-
- if ("quiet".equals(modeName))
- {
- mode = Mode.Quiet;
- }
- else if ("warn".equals(modeName))
- {
- mode = Mode.Warn;
- }
- else
- {
- mode = Mode.Fail;
- }
- }
-
- /// <summary>
- /// Applies the assertion.
- /// </summary>
- /// <return> <tt>true</tt> if the assertion passes, <tt>false</tt> if it fails. </return>
- public bool apply()
- {
- switch (mode)
- {
- case Quiet:
- return true;
-
- case Warn:
- console.warn("Warning: Not applicable assertion being ignored.");
-
- return true;
-
- case Fail:
- default:
- return false;
- }
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/Publisher.cs b/qpid/dotnet/Qpid.Integration.Tests/framework/Publisher.cs
deleted file mode 100644
index 5fbdc7a907..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/Publisher.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-//using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-using System;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A Publisher represents the status of the publishing side of a test circuit. Its main purpose is to provide assertions
- /// that can be applied to test the behaviour of the publishers.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Provide assertion that the publishers received no exceptions.
- /// </table>
- /// </summary>
- public interface Publisher
- {
- /// <summary>
- /// Provides an assertion that the publisher encountered no exceptions.
- /// </summary>
- ///
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the publisher encountered no exceptions. </return>
- Assertion NoExceptionsAssertion(TestModel testProps);
-
- /// <summary>
- /// Provides an assertion that the AMQP channel was forcibly closed by an error condition.
- /// </summary>
- ///
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the AMQP channel was forcibly closed by an error condition. </return>
- Assertion ChannelClosedAssertion(TestModel testProps);
-
- /// <summary>
- /// Provides an assertion that the publisher got a given exception during the test.
- /// </summary>
- ///
- /// <param name="testProps"> The test configuration properties. </param>
- /// <param name="exceptionClass"> The exception class to check for. </param>
- ///
- /// <return> An assertion that the publisher got a given exception during the test. </return>
- Assertion ExceptionAssertion(TestModel testProps, Type exceptionClass);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/Publisher.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/Publisher.csx
deleted file mode 100644
index b23b8c1e59..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/Publisher.csx
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A Publisher represents the status of the publishing side of a test circuit. Its main purpose is to provide assertions
- /// that can be applied to test the behaviour of the publishers.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Provide assertion that the publishers received no exceptions.
- /// </table>
- /// </summary>
- ///
- /// <remarks> There are mixtures of AMQP and JMS assertions in this interface. Either keep them here, but quietly (or with a
- /// warning or error) drop them from test cases where they are not relevant, or push them down into sub-classes.
- /// I am tempted to go with the dropping/warning/error approach, that would imply that it makes sense to pull
- /// the assertions back from AMQPPublisher to here.</remarks>
- public interface Publisher
- {
- // Assertions that are meaningfull to AMQP and to JMS.
-
- /// <summary>
- /// Provides an assertion that the publisher encountered no exceptions.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the publisher encountered no exceptions. </return>
- public Assertion noExceptionsAssertion(ParsedProperties testProps);
-
- // Assertions that are meaningfull only to AMQP.
-
- /// <summary>
- /// Provides an assertion that the AMQP channel was forcibly closed by an error condition.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the AMQP channel was forcibly closed by an error condition. </return>
- public Assertion channelClosedAssertion(ParsedProperties testProps);
-
- // Assertions that are meaningfull only to Java/JMS.
-
- /// <summary>
- /// Provides an assertion that the publisher got a given exception during the test.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <param name="exceptionClass"> The exception class to check for. </param>
- ///
- /// <return> An assertion that the publisher got a given exception during the test. </return>
- public Assertion exceptionAssertion(ParsedProperties testProps, Class<? extends Exception> exceptionClass);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/README.txt b/qpid/dotnet/Qpid.Integration.Tests/framework/README.txt
deleted file mode 100644
index 927c3415e5..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/README.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-What are all these .csx files?
-
-This code is being ported over from the java. Some of the conversion was automated using search/replace/regex under emacs, but that cannot do all of it. The files were saved as .csx files with the 'x' standing for in-cross-over state. They will gradually be copied into .cs files as the conversion is completed and they are able to compile.
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/Receiver.cs b/qpid/dotnet/Qpid.Integration.Tests/framework/Receiver.cs
deleted file mode 100644
index 96820b5980..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/Receiver.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-//using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-using System;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A Receiver is a <see cref="CircuitEnd"/> that represents the status of the receiving side of a test circuit. Its main
- /// purpose is to provide assertions that can be applied to check the behaviour of the receivers.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Provide assertion that the receivers received no exceptions.
- /// <tr><td> Provide assertion that the receivers received all test messages sent to it.
- /// </table>
- /// </summary>
- public interface Receiver
- {
- /// <summary>
- /// Provides an assertion that the receivers encountered no exceptions.
- /// </summary>
- ///
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers encountered no exceptions. </return>
- Assertion NoExceptionsAssertion(TestModel testProps);
-
- /// <summary>
- /// Provides an assertion that the receivers got all messages that were sent to it.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers got all messages that were sent to it. </return>
- Assertion AllMessagesReceivedAssertion(TestModel testProps);
-
- /// <summary>
- /// Provides an assertion that the receivers got none of the messages that were sent to it.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers got none of the messages that were sent to it. </return>
- Assertion NoMessagesReceivedAssertion(TestModel testProps);
-
- /// <summary>
- /// Provides an assertion that the AMQP channel was forcibly closed by an error condition.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the AMQP channel was forcibly closed by an error condition. </return>
- Assertion ChannelClosedAssertion(TestModel testProps);
-
- /// <summary>
- /// Provides an assertion that the receiver got a given exception during the test.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <param name="exceptionClass"> The exception class to check for. </param>
- ///
- /// <return> An assertion that the receiver got a given exception during the test. </return>
- Assertion ExceptionAssertion(TestModel testProps, Type exceptionClass);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/Receiver.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/Receiver.csx
deleted file mode 100644
index bafa57b34b..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/Receiver.csx
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A Receiver is a <see cref="CircuitEnd"/> that represents the status of the receiving side of a test circuit. Its main
- /// purpose is to provide assertions that can be applied to check the behaviour of the receivers.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Provide assertion that the receivers received no exceptions.
- /// <tr><td> Provide assertion that the receivers received all test messages sent to it.
- /// </table>
- /// </summary>
- ///
- /// <remarks> There are mixtures of AMQP and JMS assertions in this interface. Either keep them here, but quietly (or with a
- /// warning or error) drop them from test cases where they are not relevant, or push them down into sub-classes.
- /// I am tempted to go with the dropping/warning/error approach.</remarks>
- public interface Receiver
- {
- // Assertions that are meaningfull to AMQP and to JMS.
-
- /// <summary>
- /// Provides an assertion that the receivers encountered no exceptions.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers encountered no exceptions. </return>
- public Assertion noExceptionsAssertion(ParsedProperties testProps);
-
- /// <summary>
- /// Provides an assertion that the receivers got all messages that were sent to it.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers got all messages that were sent to it. </return>
- public Assertion allMessagesReceivedAssertion(ParsedProperties testProps);
-
- /// <summary>
- /// Provides an assertion that the receivers got none of the messages that were sent to it.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers got none of the messages that were sent to it. </return>
- public Assertion noMessagesReceivedAssertion(ParsedProperties testProps);
-
- // Assertions that are meaningfull only to AMQP.
-
- /// <summary>
- /// Provides an assertion that the AMQP channel was forcibly closed by an error condition.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the AMQP channel was forcibly closed by an error condition. </return>
- public Assertion channelClosedAssertion(ParsedProperties testProps);
-
- // Assertions that are meaningfull only to Java/JMS.
-
- /// <summary>
- /// Provides an assertion that the receiver got a given exception during the test.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <param name="exceptionClass"> The exception class to check for. </param>
- ///
- /// <return> An assertion that the receiver got a given exception during the test. </return>
- public Assertion exceptionAssertion(ParsedProperties testProps, Class<? extends Exception> exceptionClass);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/TestClientDetails.cs b/qpid/dotnet/Qpid.Integration.Tests/framework/TestClientDetails.cs
deleted file mode 100644
index 8be8de3d96..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/TestClientDetails.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// TestClientDetails is used to encapsulate information about an interop test client. It pairs together the unique
- /// name of the client, and the route on which it listens to its control messages.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Record test clients control addresses together with their names.
- /// </table>
- /// </summary>
- public class TestClientDetails
- {
- /// <summary> The test clients name. </summary>
- public string clientName;
-
- /// <summary> The routing key of the test clients control topic. </summary>
- public string privateControlKey;
-
- /// <summary>
- /// Two TestClientDetails are considered to be equal, iff they have the same client name.
- /// </summary>
- /// <param name="o"> The object to compare to. </param>
- ///
- /// <return> <tt>If the object to compare to is a TestClientDetails equal to this one, <tt>false</tt> otherwise. </return>
- public override bool Equals(Object o)
- {
- if (this == o)
- {
- return true;
- }
-
- if (!(o is TestClientDetails))
- {
- return false;
- }
-
- TestClientDetails testClientDetails = (TestClientDetails) o;
-
- return !((clientName != null) ? (!clientName.Equals(testClientDetails.clientName))
- : (testClientDetails.clientName != null));
- }
-
- /// <summary>
- /// Computes a hash code compatible with the equals method; based on the client name alone.
- /// </summary>
- /// <return> A hash code for this. </return>
- public override int GetHashCode()
- {
- return ((clientName != null) ? clientName.GetHashCode() : 0);
- }
-
- /// <summary>
- /// Outputs the client name and address details. Mostly used for debugging purposes.
- /// </summary>
- /// <return> The client name and address. </return>
- public override string ToString()
- {
- return "TestClientDetails: [ clientName = " + clientName + ", privateControlKey = " + privateControlKey + " ]";
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/TestClientDetails.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/TestClientDetails.csx
deleted file mode 100644
index 877367c762..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/TestClientDetails.csx
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// TestClientDetails is used to encapsulate information about an interop test client. It pairs together the unique
- /// name of the client, and the route on which it listens to its control messages.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Record test clients control addresses together with their names.
- /// </table>
- /// </summary>
- public class TestClientDetails
- {
- /// <summary> The test clients name. </summary>
- public string clientName;
-
- /// <summary> The routing key of the test clients control topic. </summary>
- public string privateControlKey;
-
- /// <summary>
- /// Two TestClientDetails are considered to be equal, iff they have the same client name.
- /// </summary>
- /// <param name="o"> The object to compare to. </param>
- ///
- /// <return> <tt>If the object to compare to is a TestClientDetails equal to this one, <tt>false</tt> otherwise. </return>
- public bool equals(Object o)
- {
- if (this == o)
- {
- return true;
- }
-
- if (!(o instanceof TestClientDetails))
- {
- return false;
- }
-
- final TestClientDetails testClientDetails = (TestClientDetails) o;
-
- return !((clientName != null) ? (!clientName.equals(testClientDetails.clientName))
- : (testClientDetails.clientName != null));
- }
-
- /// <summary>
- /// Computes a hash code compatible with the equals method; based on the client name alone.
- /// </summary>
- /// <return> A hash code for this. </return>
- public int hashCode()
- {
- return ((clientName != null) ? clientName.hashCode() : 0);
- }
-
- /// <summary>
- /// Outputs the client name and address details. Mostly used for debugging purposes.
- /// </summary>
- /// <return> The client name and address. </return>
- public string ToString()
- {
- return "TestClientDetails: [ clientName = " + clientName + ", privateControlKey = " + privateControlKey + " ]";
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/TestModel.cs b/qpid/dotnet/Qpid.Integration.Tests/framework/TestModel.cs
deleted file mode 100644
index 88bea1e5ad..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/TestModel.cs
+++ /dev/null
@@ -1,657 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-//using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-//using javax.jms.Session;
-
-//using java.util.Properties;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- public class TestModel //extends ParsedProperties
- {}
-
- /*
- /// <summary>
- /// MessagingTestConfigProperties defines a set of property names and default values for specifying a messaging topology,
- /// and test parameters for running a messaging test over that topology. A Properties object holding some of these
- /// properties, superimposed onto the defaults, is used to establish test topologies and control test behaviour.
- ///
- /// <p/>A complete list of the parameters, default values and comments on their usage is provided here:
- ///
- /// <p/><table><caption>Parameters</caption>
- /// <tr><th> Parameter <th> Default <th> Comments
- /// <tr><td> messageSize <td> 0 <td> Message size in bytes. Not including any headers.
- /// <tr><td> destinationName <td> ping <td> The root name to use to generate destination names to ping.
- /// <tr><td> persistent <td> false <td> Determines whether peristent delivery is used.
- /// <tr><td> transacted <td> false <td> Determines whether messages are sent/received in transactions.
- /// <tr><td> broker <td> tcp://localhost:5672 <td> Determines the broker to connect to.
- /// <tr><td> virtualHost <td> test <td> Determines the virtual host to send all ping over.
- /// <tr><td> rate <td> 0 <td> The maximum rate (in hertz) to send messages at. 0 means no limit.
- /// <tr><td> verbose <td> false <td> The verbose flag for debugging. Prints to console on every message.
- /// <tr><td> pubsub <td> false <td> Whether to ping topics or queues. Uses p2p by default.
- /// <tr><td> username <td> guest <td> The username to access the broker with.
- /// <tr><td> password <td> guest <td> The password to access the broker with.
- /// <tr><td> selector <td> null <td> Not used. Defines a message selector to filter pings with.
- /// <tr><td> destinationCount <td> 1 <td> The number of receivers listening to the pings.
- /// <tr><td> timeout <td> 30000 <td> In milliseconds. The timeout to stop waiting for replies.
- /// <tr><td> commitBatchSize <td> 1 <td> The number of messages per transaction in transactional mode.
- /// <tr><td> uniqueDests <td> true <td> Whether each receivers only listens to one ping destination or all.
- /// <tr><td> durableDests <td> false <td> Whether or not durable destinations are used.
- /// <tr><td> ackMode <td> AUTO_ACK <td> The message acknowledgement mode. Possible values are:
- /// 0 - SESSION_TRANSACTED
- /// 1 - AUTO_ACKNOWLEDGE
- /// 2 - CLIENT_ACKNOWLEDGE
- /// 3 - DUPS_OK_ACKNOWLEDGE
- /// 257 - NO_ACKNOWLEDGE
- /// 258 - PRE_ACKNOWLEDGE
- /// <tr><td> maxPending <td> 0 <td> The maximum size in bytes, of messages sent but not yet received.
- /// Limits the volume of messages currently buffered on the client
- /// or broker. Can help scale test clients by limiting amount of buffered
- /// data to avoid out of memory errors.
- /// </table>
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide the names and defaults of all test parameters.
- /// </table>
- /// </summary>
- ///
- /// <remarks> Put a type-safe wrapper around these properties, but continue to store the parameters as properties. This is
- /// simply to ensure that it is a simple matter to serialize/deserialize string/string pairs onto messages.</remarks>
- public class MessagingTestConfigProperties extends ParsedProperties
- {
- // ====================== Connection Properties ==================================
-
- /// <summary> Holds the name of the default connection configuration. </summary>
- public static final string CONNECTION_NAME = "broker";
-
- /// <summary> Holds the name of the property to get the initial context factory name from. </summary>
- public static final string INITIAL_CONTEXT_FACTORY_PROPNAME = "java.naming.factory.initial";
-
- /// <summary> Defines the class to use as the initial context factory by default. </summary>
- public static final string INITIAL_CONTEXT_FACTORY_DEFAULT = "org.apache.qpid.jndi.PropertiesFileInitialContextFactory";
-
- /// <summary> Holds the name of the property to get the test broker url from. </summary>
- public static final string BROKER_PROPNAME = "qpid.test.broker";
-
- /// <summary> Holds the default broker url for the test. </summary>
- public static final string BROKER_DEFAULT = "vm://:1";
-
- /// <summary> Holds the name of the property to get the test broker virtual path. </summary>
- public static final string VIRTUAL_HOST_PROPNAME = "virtualHost";
-
- /// <summary> Holds the default virtual path for the test. </summary>
- public static final string VIRTUAL_HOST_DEFAULT = "";
-
- /// <summary> Holds the name of the property to get the broker access username from. </summary>
- public static final string USERNAME_PROPNAME = "username";
-
- /// <summary> Holds the default broker log on username. </summary>
- public static final string USERNAME_DEFAULT = "guest";
-
- /// <summary> Holds the name of the property to get the broker access password from. </summary>
- public static final string PASSWORD_PROPNAME = "password";
-
- /// <summary> Holds the default broker log on password. </summary>
- public static final string PASSWORD_DEFAULT = "guest";
-
- // ====================== Messaging Topology Properties ==========================
-
- /// <summary> Holds the name of the property to get the bind publisher procuder flag from. </summary>
- public static final string PUBLISHER_PRODUCER_BIND_PROPNAME = "publisherProducerBind";
-
- /// <summary> Holds the default value of the publisher producer flag. </summary>
- public static final bool PUBLISHER_PRODUCER_BIND_DEFAULT = true;
-
- /// <summary> Holds the name of the property to get the bind publisher procuder flag from. </summary>
- public static final string PUBLISHER_CONSUMER_BIND_PROPNAME = "publisherConsumerBind";
-
- /// <summary> Holds the default value of the publisher consumer flag. </summary>
- public static final bool PUBLISHER_CONSUMER_BIND_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the bind receivers procuder flag from. </summary>
- public static final string RECEIVER_PRODUCER_BIND_PROPNAME = "receiverProducerBind";
-
- /// <summary> Holds the default value of the receivers producer flag. </summary>
- public static final bool RECEIVER_PRODUCER_BIND_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the bind receivers procuder flag from. </summary>
- public static final string RECEIVER_CONSUMER_BIND_PROPNAME = "receiverConsumerBind";
-
- /// <summary> Holds the default value of the receivers consumer flag. </summary>
- public static final bool RECEIVER_CONSUMER_BIND_DEFAULT = true;
-
- /// <summary> Holds the name of the property to get the publishers consumer active flag from. </summary>
- public static final string PUBLISHER_CONSUMER_ACTIVE_PROPNAME = "publisherConsumerActive";
-
- /// <summary> Holds the default value of the publishers consumer active flag. </summary>
- public static final bool PUBLISHER_CONSUMER_ACTIVE_DEFAULT = true;
-
- /// <summary> Holds the name of the property to get the receivers consumer active flag from. </summary>
- public static final string RECEIVER_CONSUMER_ACTIVE_PROPNAME = "receiverConsumerActive";
-
- /// <summary> Holds the default value of the receivers consumer active flag. </summary>
- public static final bool RECEIVER_CONSUMER_ACTIVE_DEFAULT = true;
-
- /// <summary> Holds the name of the property to get the destination name root from. </summary>
- public static final string SEND_DESTINATION_NAME_ROOT_PROPNAME = "sendDestinationRoot";
-
- /// <summary> Holds the root of the name of the default destination to send to. </summary>
- public static final string SEND_DESTINATION_NAME_ROOT_DEFAULT = "sendTo";
-
- /// <summary> Holds the name of the property to get the destination name root from. </summary>
- public static final string RECEIVE_DESTINATION_NAME_ROOT_PROPNAME = "receiveDestinationRoot";
-
- /// <summary> Holds the root of the name of the default destination to send to. </summary>
- public static final string RECEIVE_DESTINATION_NAME_ROOT_DEFAULT = "receiveFrom";
-
- /// <summary> Holds the name of the proeprty to get the destination count from. </summary>
- public static final string DESTINATION_COUNT_PROPNAME = "destinationCount";
-
- /// <summary> Defines the default number of destinations to ping. </summary>
- public static final int DESTINATION_COUNT_DEFAULT = 1;
-
- /// <summary> Holds the name of the property to get the p2p or pub/sub messaging mode from. </summary>
- public static final string PUBSUB_PROPNAME = "pubsub";
-
- /// <summary> Holds the pub/sub mode default, true means ping a topic, false means ping a queue. </summary>
- public static final bool PUBSUB_DEFAULT = false;
-
- // ====================== JMS Options and Flags =================================
-
- /// <summary> Holds the name of the property to get the test delivery mode from. </summary>
- public static final string PERSISTENT_MODE_PROPNAME = "persistent";
-
- /// <summary> Holds the message delivery mode to use for the test. </summary>
- public static final bool PERSISTENT_MODE_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the test transactional mode from. </summary>
- public static final string TRANSACTED_PUBLISHER_PROPNAME = "transactedPublisher";
-
- /// <summary> Holds the transactional mode to use for the test. </summary>
- public static final bool TRANSACTED_PUBLISHER_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the test transactional mode from. </summary>
- public static final string TRANSACTED_RECEIVER_PROPNAME = "transactedReceiver";
-
- /// <summary> Holds the transactional mode to use for the test. </summary>
- public static final bool TRANSACTED_RECEIVER_DEFAULT = false;
-
- /// <summary> Holds the name of the property to set the no local flag from. </summary>
- public static final string NO_LOCAL_PROPNAME = "noLocal";
-
- /// <summary> Defines the default value of the no local flag to use when consuming messages. </summary>
- public static final bool NO_LOCAL_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the message acknowledgement mode from. </summary>
- public static final string ACK_MODE_PROPNAME = "ackMode";
-
- /// <summary> Defines the default message acknowledgement mode. </summary>
- public static final int ACK_MODE_DEFAULT = Session.AUTO_ACKNOWLEDGE;
-
- /// <summary> Holds the name of the property to get the durable subscriptions flag from, when doing pub/sub messaging. </summary>
- public static final string DURABLE_SUBSCRIPTION_PROPNAME = "durableSubscription";
-
- /// <summary> Defines the default value of the durable subscriptions flag. </summary>
- public static final bool DURABLE_SUBSCRIPTION_DEFAULT = false;
-
- // ====================== Qpid/AMQP Options and Flags ================================
-
- /// <summary> Holds the name of the property to set the exclusive flag from. </summary>
- public static final string EXCLUSIVE_PROPNAME = "exclusive";
-
- /// <summary> Defines the default value of the exclusive flag to use when consuming messages. </summary>
- public static final bool EXCLUSIVE_DEFAULT = false;
-
- /// <summary> Holds the name of the property to set the immediate flag from. </summary>
- public static final string IMMEDIATE_PROPNAME = "immediate";
-
- /// <summary> Defines the default value of the immediate flag to use when sending messages. </summary>
- public static final bool IMMEDIATE_DEFAULT = false;
-
- /// <summary> Holds the name of the property to set the mandatory flag from. </summary>
- public static final string MANDATORY_PROPNAME = "mandatory";
-
- /// <summary> Defines the default value of the mandatory flag to use when sending messages. </summary>
- public static final bool MANDATORY_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the durable destinations flag from. </summary>
- public static final string DURABLE_DESTS_PROPNAME = "durableDests";
-
- /// <summary> Default value for the durable destinations flag. </summary>
- public static final bool DURABLE_DESTS_DEFAULT = false;
-
- /// <summary> Holds the name of the property to set the prefetch size from. </summary>
- public static final string PREFETCH_PROPNAME = "prefetch";
-
- /// <summary> Defines the default prefetch size to use when consuming messages. </summary>
- public static final int PREFETCH_DEFAULT = 100;
-
- // ====================== Common Test Parameters ================================
-
- /// <summary> Holds the name of the property to get the test message size from. </summary>
- public static final string MESSAGE_SIZE_PROPNAME = "messageSize";
-
- /// <summary> Used to set up a default message size. </summary>
- public static final int MESSAGE_SIZE_DEAFULT = 0;
-
- /// <summary> Holds the name of the property to get the message rate from. </summary>
- public static final string RATE_PROPNAME = "rate";
-
- /// <summary> Defines the default rate (in pings per second) to send pings at. 0 means as fast as possible, no restriction. </summary>
- public static final int RATE_DEFAULT = 0;
-
- /// <summary> Holds the name of the proeprty to get the. </summary>
- public static final string SELECTOR_PROPNAME = "selector";
-
- /// <summary> Holds the default message selector. </summary>
- public static final string SELECTOR_DEFAULT = "";
-
- /// <summary> Holds the name of the property to get the waiting timeout for response messages. </summary>
- public static final string TIMEOUT_PROPNAME = "timeout";
-
- /// <summary> Default time to wait before assuming that a ping has timed out. </summary>
- public static final long TIMEOUT_DEFAULT = 30000;
-
- /// <summary> Holds the name of the property to get the commit batch size from. </summary>
- public static final string TX_BATCH_SIZE_PROPNAME = "commitBatchSize";
-
- /// <summary> Defines the default number of pings to send in each transaction when running transactionally. </summary>
- public static final int TX_BATCH_SIZE_DEFAULT = 1;
-
- /// <summary> Holds the name of the property to set the maximum amount of pending message data for a producer to hold. </summary>
- public static final string MAX_PENDING_PROPNAME = "maxPending";
-
- /// <summary> Defines the default maximum quantity of pending message data to allow producers to hold. </summary>
- public static final int MAX_PENDING_DEFAULT = 0;
-
- /// <summary> Holds the name of the property to get the publisher rollback flag from. </summary>
- public static final string ROLLBACK_PUBLISHER_PROPNAME = "rollbackPublisher";
-
- /// <summary> Holds the default publisher roll back setting. </summary>
- public static final bool ROLLBACK_PUBLISHER_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the publisher rollback flag from. </summary>
- public static final string ROLLBACK_RECEIVER_PROPNAME = "rollbackReceiver";
-
- /// <summary> Holds the default publisher roll back setting. </summary>
- public static final bool ROLLBACK_RECEIVER_DEFAULT = false;
-
- // ====================== Options that control the bahviour of the test framework. =========================
-
- /// <summary> Holds the name of the property to get the behavioural mode of not applicable assertions. </summary>
- public static final string NOT_APPLICABLE_ASSERTION_PROPNAME = "notApplicableAssertion";
-
- /// <summary> Holds the default behavioral mode of not applicable assertions, which is logging them as a warning. </summary>
- public static final string NOT_APPLICABLE_ASSERTION_DEFAULT = "warn";
-
- /// <summary> Holds the name of the property to get the verbose mode proeprty from. </summary>
- public static final string VERBOSE_PROPNAME = "verbose";
-
- /// <summary> Holds the default verbose mode. </summary>
- public static final bool VERBOSE_DEFAULT = false;
-
- /// <summary> Holds the default configuration properties. </summary>
- public static ParsedProperties defaults = new ParsedProperties();
-
- static
- {
- defaults.setPropertyIfNull(INITIAL_CONTEXT_FACTORY_PROPNAME, INITIAL_CONTEXT_FACTORY_DEFAULT);
- defaults.setPropertyIfNull(BROKER_PROPNAME, BROKER_DEFAULT);
- defaults.setPropertyIfNull(VIRTUAL_HOST_PROPNAME, VIRTUAL_HOST_DEFAULT);
- defaults.setPropertyIfNull(USERNAME_PROPNAME, USERNAME_DEFAULT);
- defaults.setPropertyIfNull(PASSWORD_PROPNAME, PASSWORD_DEFAULT);
-
- defaults.setPropertyIfNull(PUBLISHER_PRODUCER_BIND_PROPNAME, PUBLISHER_PRODUCER_BIND_DEFAULT);
- defaults.setPropertyIfNull(PUBLISHER_CONSUMER_BIND_PROPNAME, PUBLISHER_CONSUMER_BIND_DEFAULT);
- defaults.setPropertyIfNull(RECEIVER_PRODUCER_BIND_PROPNAME, RECEIVER_PRODUCER_BIND_DEFAULT);
- defaults.setPropertyIfNull(RECEIVER_CONSUMER_BIND_PROPNAME, RECEIVER_CONSUMER_BIND_DEFAULT);
- defaults.setPropertyIfNull(PUBLISHER_CONSUMER_ACTIVE_PROPNAME, PUBLISHER_CONSUMER_ACTIVE_DEFAULT);
- defaults.setPropertyIfNull(RECEIVER_CONSUMER_ACTIVE_PROPNAME, RECEIVER_CONSUMER_ACTIVE_DEFAULT);
- defaults.setPropertyIfNull(SEND_DESTINATION_NAME_ROOT_PROPNAME, SEND_DESTINATION_NAME_ROOT_DEFAULT);
- defaults.setPropertyIfNull(RECEIVE_DESTINATION_NAME_ROOT_PROPNAME, RECEIVE_DESTINATION_NAME_ROOT_DEFAULT);
- defaults.setPropertyIfNull(DESTINATION_COUNT_PROPNAME, DESTINATION_COUNT_DEFAULT);
- defaults.setPropertyIfNull(PUBSUB_PROPNAME, PUBSUB_DEFAULT);
-
- defaults.setPropertyIfNull(PERSISTENT_MODE_PROPNAME, PERSISTENT_MODE_DEFAULT);
- defaults.setPropertyIfNull(TRANSACTED_PUBLISHER_PROPNAME, TRANSACTED_PUBLISHER_DEFAULT);
- defaults.setPropertyIfNull(TRANSACTED_RECEIVER_PROPNAME, TRANSACTED_RECEIVER_DEFAULT);
- defaults.setPropertyIfNull(NO_LOCAL_PROPNAME, NO_LOCAL_DEFAULT);
- defaults.setPropertyIfNull(ACK_MODE_PROPNAME, ACK_MODE_DEFAULT);
- defaults.setPropertyIfNull(DURABLE_SUBSCRIPTION_PROPNAME, DURABLE_SUBSCRIPTION_DEFAULT);
-
- defaults.setPropertyIfNull(EXCLUSIVE_PROPNAME, EXCLUSIVE_DEFAULT);
- defaults.setPropertyIfNull(IMMEDIATE_PROPNAME, IMMEDIATE_DEFAULT);
- defaults.setPropertyIfNull(MANDATORY_PROPNAME, MANDATORY_DEFAULT);
- defaults.setPropertyIfNull(DURABLE_DESTS_PROPNAME, DURABLE_DESTS_DEFAULT);
- defaults.setPropertyIfNull(PREFETCH_PROPNAME, PREFETCH_DEFAULT);
-
- defaults.setPropertyIfNull(MESSAGE_SIZE_PROPNAME, MESSAGE_SIZE_DEAFULT);
- defaults.setPropertyIfNull(RATE_PROPNAME, RATE_DEFAULT);
- defaults.setPropertyIfNull(SELECTOR_PROPNAME, SELECTOR_DEFAULT);
- defaults.setPropertyIfNull(TIMEOUT_PROPNAME, TIMEOUT_DEFAULT);
- defaults.setPropertyIfNull(TX_BATCH_SIZE_PROPNAME, TX_BATCH_SIZE_DEFAULT);
- defaults.setPropertyIfNull(MAX_PENDING_PROPNAME, MAX_PENDING_DEFAULT);
- defaults.setPropertyIfNull(ROLLBACK_PUBLISHER_PROPNAME, ROLLBACK_PUBLISHER_DEFAULT);
- defaults.setPropertyIfNull(ROLLBACK_RECEIVER_PROPNAME, ROLLBACK_RECEIVER_DEFAULT);
-
- defaults.setPropertyIfNull(NOT_APPLICABLE_ASSERTION_PROPNAME, NOT_APPLICABLE_ASSERTION_DEFAULT);
- defaults.setPropertyIfNull(VERBOSE_PROPNAME, VERBOSE_DEFAULT);
- }
-
- /// <summary> Creates a test configuration based on the defaults. </summary>
- public MessagingTestConfigProperties()
- {
- super(defaults);
- }
-
- /// <summary>
- /// Creates a test configuration based on the supplied properties.
- /// </summary>
- /// <param name="properties"> The test configuration. </param>
- public MessagingTestConfigProperties(Properties properties)
- {
- super(properties);
- }
-
- /// <summary>
- /// The size of test messages to send.
- /// </summary>
- /// <return> The size of test messages to send. </return>
- public int getMessageSize()
- {
- return getPropertyAsInteger(MESSAGE_SIZE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the publishing producer should be set up to publish to a destination.
- /// </summary>
- /// <return> Flag to indicate that the publishing producer should be set up to publish to a destination. </return>
- public bool getPublisherProducerBind()
- {
- return getPropertyAsBoolean(PUBLISHER_PRODUCER_BIND_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the publishing consumer should be set up to receive from a destination.
- /// </summary>
- /// <return> Flag to indicate that the publishing consumer should be set up to receive from a destination. </return>
- public bool getPublisherConsumerBind()
- {
- return getPropertyAsBoolean(PUBLISHER_CONSUMER_BIND_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the receiving producer should be set up to publish to a destination.
- /// </summary>
- /// <return> Flag to indicate that the receiving producer should be set up to publish to a destination. </return>
- public bool getReceiverProducerBind()
- {
- return getPropertyAsBoolean(RECEIVER_PRODUCER_BIND_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the receiving consumer should be set up to receive from a destination.
- /// </summary>
- /// <return> Flag to indicate that the receiving consumer should be set up to receive from a destination. </return>
- public bool getReceiverConsumerBind()
- {
- return getPropertyAsBoolean(RECEIVER_CONSUMER_BIND_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the publishing consumer should be created and actively listening.
- /// </summary>
- /// <return> Flag to indicate that the publishing consumer should be created. </return>
- public bool getPublisherConsumerActive()
- {
- return getPropertyAsBoolean(PUBLISHER_CONSUMER_ACTIVE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the receiving consumers should be created and actively listening.
- /// </summary>
- /// <return> Flag to indicate that the receiving consumers should be created and actively listening. </return>
- public bool getReceiverConsumerActive()
- {
- return getPropertyAsBoolean(RECEIVER_CONSUMER_ACTIVE_PROPNAME);
- }
-
- /// <summary>
- /// A root to create all test destination names from.
- /// </summary>
- /// <return> A root to create all test destination names from. </return>
- public string getSendDestinationNameRoot()
- {
- return getProperty(SEND_DESTINATION_NAME_ROOT_PROPNAME);
- }
-
- /// <summary>
- /// A root to create all receiving destination names from.
- /// </summary>
- /// <return> A root to create all receiving destination names from. </return>
- public string getReceiveDestinationNameRoot()
- {
- return getProperty(RECEIVE_DESTINATION_NAME_ROOT_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that persistent messages should be used.
- /// </summary>
- /// <return> Flag to indicate that persistent messages should be used. </return>
- public bool getPersistentMode()
- {
- return getPropertyAsBoolean(PERSISTENT_MODE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that transactional messages should be sent by the publisher.
- /// </summary>
- /// <return> Flag to indicate that transactional messages should be sent by the publisher. </return>
- public bool getPublisherTransacted()
- {
- return getPropertyAsBoolean(TRANSACTED_PUBLISHER_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that transactional receives should be used by the receiver.
- /// </summary>
- /// <return> Flag to indicate that transactional receives should be used by the receiver. </return>
- public bool getReceiverTransacted()
- {
- return getPropertyAsBoolean(TRANSACTED_PUBLISHER_PROPNAME);
- }
-
- /// <summary>
- /// The name of the virtual host to run all tests over.
- /// </summary>
- /// <return> The name of the virtual host to run all tests over. </return>
- public string getVirtualHost()
- {
- return getProperty(VIRTUAL_HOST_PROPNAME);
- }
-
- /// <summary>
- /// Limiting rate for each sender in messages per second, or zero for unlimited.
- /// </summary>
- /// <return> Limiting rate for each sender in messages per second, or zero for unlimited. </return>
- public string getRate()
- {
- return getProperty(RATE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that test messages should be received publish/subscribe style by all receivers.
- /// </summary>
- /// <return> Flag to indicate that test messages should be received publish/subscribe style by all receivers. </return>
- public bool getPubsub()
- {
- return getPropertyAsBoolean(PUBSUB_PROPNAME);
- }
-
- /// <summary>
- /// The username credentials to run tests with.
- /// </summary>
- /// <return> The username credentials to run tests with. </return>
- public string getUsername()
- {
- return getProperty(USERNAME_PROPNAME);
- }
-
- /// <summary>
- /// The password credentials to run tests with.
- /// </summary>
- /// <return> The password credentials to run tests with. </return>
- public string getPassword()
- {
- return getProperty(PASSWORD_PROPNAME);
- }
-
- /// <summary>
- /// The timeout duration to fail tests on, should they receive no messages within it.
- /// </summary>
- /// <return> The timeout duration to fail tests on, should they receive no messages within it. </return>
- public long getTimeout()
- {
- return getPropertyAsLong(TIMEOUT_PROPNAME);
- }
-
- /// <summary>
- /// The number of messages to batch into each transaction in transational tests.
- /// </summary>
- /// <return> The number of messages to batch into each transaction in transational tests. </return>
- public int getTxBatchSize()
- {
- return getPropertyAsInteger(TX_BATCH_SIZE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that tests should use durable destinations.
- /// </summary>
- /// <return> Flag to indicate that tests should use durable destinations. </return>
- public bool getDurableDests()
- {
- return getPropertyAsBoolean(DURABLE_DESTS_PROPNAME);
- }
-
- /// <summary>
- /// The ack mode for message receivers to use.
- /// </summary>
- /// <return> The ack mode for message receivers to use. </return>
- public int getAckMode()
- {
- return getPropertyAsInteger(ACK_MODE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that tests should use durable subscriptions.
- /// </summary>
- /// <return> Flag to indicate that tests should use durable subscriptions. </return>
- public bool getDurableSubscription()
- {
- return getPropertyAsBoolean(DURABLE_SUBSCRIPTION_PROPNAME);
- }
-
- /// <summary>
- /// The maximum amount of in-flight data, in bytes, that tests should send at any time.
- /// </summary>
- /// <return> The maximum amount of in-flight data, in bytes, that tests should send at any time. </return>
- public int getMaxPending()
- {
- return getPropertyAsInteger(MAX_PENDING_PROPNAME);
- }
-
- /// <summary>
- /// The size of the prefetch queue to use.
- /// </summary>
- /// <return> The size of the prefetch queue to use. </return>
- public int getPrefetch()
- {
- return getPropertyAsInteger(PREFETCH_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that subscriptions should be no-local.
- /// </summary>
- /// <return> Flag to indicate that subscriptions should be no-local. </return>
- public bool getNoLocal()
- {
- return getPropertyAsBoolean(NO_LOCAL_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that subscriptions should be exclusive.
- /// </summary>
- /// <return> Flag to indicate that subscriptions should be exclusive. </return>
- public bool getExclusive()
- {
- return getPropertyAsBoolean(EXCLUSIVE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that messages must be delivered immediately.
- /// </summary>
- /// <return> Flag to indicate that messages must be delivered immediately. </return>
- public bool getImmediate()
- {
- return getPropertyAsBoolean(IMMEDIATE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that messages must be routable.
- /// </summary>
- /// <return> Flag to indicate that messages must be routable. </return>
- public bool getMandatory()
- {
- return getPropertyAsBoolean(MANDATORY_PROPNAME);
- }
-
- /// <summary>
- /// Gets the value of a flag to indicate that the publisher should rollback all messages sent.
- /// </summary>
- /// <return> A flag to indicate that the publisher should rollback all messages sent. </return>
- public bool getRollbackPublisher()
- {
- return getPropertyAsBoolean(ROLLBACK_PUBLISHER_PROPNAME);
- }
-
- /// <summary>
- /// Gets the value of a flag to indicate that the receiver should rollback all messages received, then receive them
- /// again.
- /// </summary>
- /// <return> A flag to indicate that the publisher should rollback all messages received. </return>
- public bool getRollbackReceiver()
- {
- return getPropertyAsBoolean(ROLLBACK_RECEIVER_PROPNAME);
- }
-
- /// <summary>
- /// Gets the behavioural mode of not applicable assertions. Should be one of 'quiet', 'warn' or 'fail'.
- /// </summary>
- /// <return> The behavioural mode of not applicable assertions. </return>
- public string getNotApplicableAssertionMode()
- {
- return getProperty(NOT_APPLICABLE_ASSERTION_PROPNAME);
- }
- }
- */
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/TestUtils.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/TestUtils.csx
deleted file mode 100644
index bb00bf2683..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/TestUtils.csx
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using static Apache.Qpid.Integration.Tests.framework.MessagingTestConfigProperties.*;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.*;
-using javax.naming.Context;
-using javax.naming.InitialContext;
-using javax.naming.NamingException;
-
-using System.Collections.Generic.IDictionary;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// TestUtils provides static helper methods that are usefull for writing tests against QPid.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Create connections from test properties. <td> <see cref="MessagingTestConfigProperties"/>
- /// <tr><td> Create test messages.
- /// <tr><td> Inject a short pause in a test.
- /// <tr><td> Serialize properties into a message.
- /// </table>
- /// </summary>
- public class TestUtils
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(TestUtils));
-
- /// <summary> Some dummy data to stuff all test messages with. </summary>
- private static final byte[] MESSAGE_DATA_BYTES =
- "Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- "
- .getBytes();
-
- /// <summary>
- /// Establishes a JMS connection using a set of properties and qpids built in JNDI implementation. This is a simple
- /// convenience method for code that does not anticipate handling connection failures. All exceptions that indicate
- /// that the connection has failed, are wrapped as rutime exceptions, presumably handled by a top level failure
- /// handler.
- ///
- /// <p/>This utility makes use of the following test parameters from <see cref="MessagingTestConfigProperties"/> to control
- /// the connection creation:
- ///
- /// <p/><table>
- /// <tr><td> <see cref="MessagingTestConfigProperties#USERNAME_PROPNAME"/> <td> The username.
- /// <tr><td> <see cref="MessagingTestConfigProperties#PASSWORD_PROPNAME"/> <td> The password.
- /// <tr><td> <see cref="MessagingTestConfigProperties#VIRTUAL_HOST_PROPNAME"/> <td> The virtual host name.
- /// <tr><td> <see cref="MessagingTestConfigProperties#BROKER_PROPNAME"/> <td> The broker URL.
- /// <tr><td> <see cref="MessagingTestConfigProperties#CONNECTION_NAME"/> <td> The broker name in the initial context.
- /// </summary>
- /// <param name="messagingProps"> Connection properties as defined in <see cref="MessagingTestConfigProperties"/>. </param>
- ///
- /// <return> A JMS conneciton. </return>
- public static Connection createConnection(ParsedProperties messagingProps)
- {
- log.debug("public static Connection createConnection(ParsedProperties messagingProps = " + messagingProps
- + "): called");
-
- try
- {
- // Extract the configured connection properties from the test configuration.
- string conUsername = messagingProps.getProperty(USERNAME_PROPNAME);
- string conPassword = messagingProps.getProperty(PASSWORD_PROPNAME);
- string virtualHost = messagingProps.getProperty(VIRTUAL_HOST_PROPNAME);
- string brokerUrl = messagingProps.getProperty(BROKER_PROPNAME);
-
- // Create the broker connection url.
- string connectionstring =
- "amqp://" + conUsername + ":" + conPassword + "@clientid/" + ((virtualHost != null) ? virtualHost : "")
- + "?brokerlist='" + brokerUrl + "'";
-
- // Create properties to create the initial context from, and inject the connection factory configuration
- // for the defined connection name into it.
- messagingProps.setProperty("connectionfactory." + CONNECTION_NAME, connectionString);
-
- Context ctx = new InitialContext(messagingProps);
-
- ConnectionFactory cf = (ConnectionFactory) ctx.lookup(CONNECTION_NAME);
-
- return cf.createConnection();
- }
- catch (NamingException e)
- {
- throw new RuntimeException("Got JNDI NamingException whilst looking up the connection factory.", e);
- }
- catch (JMSException e)
- {
- throw new RuntimeException("Could not establish connection due to JMSException.", e);
- }
- }
-
- /// <summary>
- /// Creates a test message of the specified size, on the given JMS session.
- /// </summary>
- /// <param name="session"> The JMS session. </param>
- /// <param name="size"> The size of the message in bytes. </param>
- ///
- /// <return> A bytes message, of the specified size, filled with dummy data. </return>
- ///
- /// <exception cref="JMSException"> Any underlying JMSExceptions are allowed to fall through. </exception>
- public static Message createTestMessageOfSize(Session session, int size) throws JMSException
- {
- BytesMessage message = session.createBytesMessage();
-
- if (size > 0)
- {
- int div = MESSAGE_DATA_BYTES.length / size;
- int mod = MESSAGE_DATA_BYTES.length % size;
-
- for (int i = 0; i < div; i++)
- {
- message.writeBytes(MESSAGE_DATA_BYTES);
- }
-
- if (mod != 0)
- {
- message.writeBytes(MESSAGE_DATA_BYTES, 0, mod);
- }
- }
-
- return message;
- }
-
- /// <summary>
- /// Pauses for the specified length of time. In the event of failing to pause for at least that length of time
- /// due to interuption of the thread, a RutimeException is raised to indicate the failure. The interupted status
- /// of the thread is restores in that case. This method should only be used when it is expected that the pause
- /// will be succesfull, for example in test code that relies on inejecting a pause.
- /// </summary>
- /// <param name="t"> The minimum time to pause for in milliseconds. </param>
- public static void pause(long t)
- {
- try
- {
- Thread.sleep(t);
- }
- catch (InterruptedException e)
- {
- // Restore the interrupted status
- Thread.currentThread().interrupt();
-
- throw new RuntimeException("Failed to generate the requested pause length.", e);
- }
- }
-
- /// <summary>
- /// Sets properties of different types on a JMS Message.
- /// </summary>
- /// <param name="message"> The message to set properties on. </param>
- /// <param name="properties"> The property name/value pairs to set. </param>
- ///
- /// <exception cref="javax.jms.JMSException"> All underlying JMSExceptions are allowed to fall through. </exception>
- ///
- /// <remarks> Move this helper method somewhere else. For example, TestUtils.</remarks>
- public static void setPropertiesOnMessage(Message message, Map<Object, Object> properties) throws JMSException
- {
- for (Map.Entry<Object, Object> entry : properties.entrySet())
- {
- string name = entry.getKey().ToString();
- Object value = entry.getValue();
-
- message.setObjectProperty(name, value);
- }
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/alljava.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/alljava.csx
deleted file mode 100644
index 23ebd53a5b..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/alljava.csx
+++ /dev/null
@@ -1,7851 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// Assertion models an assertion on a test <see cref="Circuit"/>.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Indicate whether or not the assertion passes when applied.
- /// </table>
- /// </summary>
- public interface Assertion
- {
- /// <summary>
- /// Applies the assertion.
- /// </summary>
- /// <return> <tt>true</tt> if the assertion passes, <tt>false</tt> if it fails. </return>
- public bool apply();
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Collections.Generic.LinkedList;
-using System.Collections.Generic.IList;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// AssertionBase is a base class for implenmenting assertions. It provides a mechanism to store error messages, and
- /// report all error messages when its <see cref="#ToString()"/> method is called.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Collect error messages.
- /// </table>
- /// </summary>
- public abstract class AssertionBase : Assertion
- {
- /// <summary> Holds the error messages. </summary>
- IList<String> errors = new LinkedList<String>();
-
- /// <summary>
- /// Adds an error message to the assertion.
- /// </summary>
- /// <param name="error"> An error message to add to the assertion. </param>
- public void addError(string error)
- {
- errors.add(error);
- }
-
- /// <summary>
- /// Prints all of the error messages in the assertion into a string.
- /// </summary>
- /// <return> All of the error messages in the assertion as a string. </return>
- public string ToString()
- {
- string result = "";
-
- for (string error : errors)
- {
- result += error;
- }
-
- return result;
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// BrokerLifecycleAware is an awareness interface implemented by test cases that can run control the life-cycle of
- /// the brokers on which they run. Its purpose is to expose additional instrumentation of brokers during testing, that
- /// enables tests to use an automated failure mechanism to simulate broker failures, and to re-start failed brokers.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Indicate whether or not a test case is using an in-vm broker.
- /// <tr><td> Track which in-vm broker is currently in use.
- /// <tr><td> Accept setting of a failure mechanism. <td> <see cref="CauseFailure"/>.
- /// </table>
- /// </summary>
- ///
- /// <remarks> Need to think about how to present the brokers through this interface. Thinking numbering the available
- /// brokers from 1 will do. Then can kill 1 and assume failing onto 2. Restart 1 and kill 2 and fail back onto
- /// 1 again? </remarks>
- public interface BrokerLifecycleAware
- {
- public void setInVmBrokers();
-
- /// <summary>
- /// Indicates whether or not a test case is using in-vm brokers.
- /// </summary>
- /// <return> <tt>true</tt> if the test is using in-vm brokers, <tt>false</tt> otherwise. </return>
- public bool usingInVmBroker();
-
- /// <summary>
- /// Sets the currently live in-vm broker.
- /// </summary>
- /// <param name="i"> The currently live in-vm broker. </param>
- public void setLiveBroker(int i);
-
- /// <summary>
- /// Reports the currently live in-vm broker.
- /// </summary>
- /// <return> The currently live in-vm broker. </return>
- public int getLiveBroker();
-
- /// <summary>
- /// Accepts a failure mechanism.
- /// </summary>
- /// <param name="failureMechanism"> The failure mechanism. </param>
- public void setFailureMechanism(CauseFailure failureMechanism);
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// CauseFailure provides a method to cause a failure in a messaging broker, usually used in conjunction with fail-over
- /// or other failure mode testing. In some cases failures may be automated, for example by shutting down an in-vm broker,
- /// or by sending a special control signal to a broker over a network connection. In other cases, it may be preferable
- /// to ask a user interactively to cause a failure scenario, in which case an implementation may display a prompt or
- /// dialog box asking for notification once the failure has been caused. The purpose of this interface is to abstract
- /// the exact cause and nature of a failure out of failure test cases.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Cause messaging broker failure.
- /// </table>
- /// </summary>
- public interface CauseFailure
- {
- /// <summary> Causes the active message broker to fail. </summary>
- void causeFailure();
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Integration.Tests.framework.CauseFailure;
-
-using java.io.IOException;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// Causes a message broker failure by interactively prompting the user to cause it.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Cause messaging broker failure.
- /// </table>
- /// </summary>
- public class CauseFailureUserPrompt : CauseFailure
- {
- /// <summary> Causes the active message broker to fail.</summary>
- public void causeFailure()
- {
- waitForUser("Cause a broker failure now, then press Return.");
- }
-
- /// <summary>
- /// Outputs a prompt to the console and waits for the user to press return.
- /// </summary>
- /// <param name="prompt"> The prompt to display on the console. </param>
- private void waitForUser(string prompt)
- {
- System.out.println(prompt);
-
- try
- {
- System.in.read();
- }
- catch (IOException e)
- {
- // Ignored.
- }
-
- System.out.println("Continuing.");
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Collections.Generic.IList;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A Circuit is the basic test unit against which test cases are to be written. A circuit consists of two 'ends', an
- /// instigating 'publisher' end and a more passive 'receivers' end.
- ///
- /// <p/>Once created, the life-cycle of a circuit may be controlled by <see cref="#start()"/>ing it, or <see cref="#close()"/>ing it.
- /// Once started, the circuit is ready to send messages over. Once closed the circuit can no longer be used.
- ///
- /// <p/>The state of the circuit may be taken with the <see cref="#check()"/> method, and asserted against by the
- /// <see cref="#applyAssertions(System.Collections.Generic.IList)"/> method.
- ///
- /// <p/>There is a default test procedure which may be performed against the circuit. The outline of this procedure is:
- ///
- /// <p/><pre>
- /// Start the circuit.
- /// Send test messages.
- /// Request a status report.
- /// Assert conditions on the publishing end of the circuit.
- /// Assert conditions on the receiving end of the circuit.
- /// Close the circuit.
- /// Pass with no failed assertions or fail with a list of failed assertions.
- /// </pre>
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Supply the publishing and receiving ends of a test messaging circuit.
- /// <tr><td> Start the circuit running.
- /// <tr><td> Close the circuit down.
- /// <tr><td> Take a reading of the circuits state.
- /// <tr><td> Apply assertions against the circuits state.
- /// <tr><td> Send test messages over the circuit.
- /// <tr><td> Perform the default test procedue on the circuit.
- /// </table>
- /// </summary>
- public interface Circuit
- {
- /// <summary>
- /// Gets the interface on the publishing end of the circuit.
- /// </summary>
- /// <return> The publishing end of the circuit. </return>
- public Publisher getPublisher();
-
- /// <summary>
- /// Gets the interface on the receiving end of the circuit.
- /// </summary>
- /// <return> The receiving end of the circuit. </return>
- public Receiver getReceiver();
-
- /// <summary>
- /// Connects and starts the circuit. After this method is called the circuit is ready to send messages.
- public void start();
-
- /// <summary>
- /// Checks the test circuit. The effect of this is to gather the circuits state, for both ends of the circuit,
- /// into a report, against which assertions may be checked.
- public void check();
-
- /// <summary>
- /// Closes the circuit. All associated resources are closed.
- public void close();
-
- /// <summary>
- /// Applied a list of assertions against the test circuit. The <see cref="#check()"/> method should be called before doing
- /// this, to ensure that the circuit has gathered its state into a report to assert against.
- /// </summary>
- /// <param name="assertions"> The list of assertions to apply to the circuit. </param>
- ///
- /// <return> Any assertions that failed. </return>
- public IList<Assertion> applyAssertions(List<Assertion> assertions);
-
- /// <summary>
- /// Runs the default test procedure against the circuit, and checks that all of the specified assertions hold.
- /// </summary>
- /// <param name="numMessages"> The number of messages to send using the default test procedure. </param>
- /// <param name="assertions"> The list of assertions to apply. </param>
- ///
- /// <return> Any assertions that failed. </return>
- public IList<Assertion> test(int numMessages, List<Assertion> assertions);
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using javax.jms.*;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A CircuitEnd is a pair consisting of one message producer and one message consumer, that represents one end of a
- /// test circuit. It is a standard unit of connectivity allowing a full-duplex conversation to be held, provided both
- /// the consumer and producer are instantiated and configured.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Provide a message producer for sending messages.
- /// <tr><td> Provide a message consumer for receiving messages.
- /// </table>
- /// </summary>
- ///
- /// <remarks> Update the <see cref="org.apache.qpid.util.ConversationFactory"/> so that it accepts these as the basic conversation
- /// connection units.</remarks>
- public interface CircuitEnd
- {
- /// <summary>
- /// Gets the message producer at this circuit end point.
- /// </summary>
- /// <return> The message producer at with this circuit end point. </return>
- public MessageProducer getProducer();
-
- /// <summary>
- /// Gets the message consumer at this circuit end point.
- /// </summary>
- /// <return> The message consumer at this circuit end point. </return>
- public MessageConsumer getConsumer();
-
- /// <summary>
- /// Send the specified message over the producer at this end point.
- /// </summary>
- /// <param name="message"> The message to send. </param>
- ///
- /// <exception cref="JMSException"> Any JMS exception occuring during the send is allowed to fall through. </exception>
- public void send(Message message) throws JMSException;
-
- /// <summary>
- /// Gets the JMS Session associated with this circuit end point.
- /// </summary>
- /// <return> The JMS Session associated with this circuit end point. </return>
- public Session getSession();
-
- /// <summary>
- /// Closes the message producers and consumers and the sessions, associated with this circuit end point.
- /// </summary>
- /// <exception cref="JMSException"> Any JMSExceptions occurring during the close are allowed to fall through. </exception>
- public void close() throws JMSException;
-
- /// <summary>
- /// Returns the message monitor for reporting on received messages on this circuit end.
- /// </summary>
- /// <return> The message monitor for this circuit end. </return>
- public MessageMonitor getMessageMonitor();
-
- /// <summary>
- /// Returns the exception monitor for reporting on exceptions received on this circuit end.
- /// </summary>
- /// <return> The exception monitor for this circuit end. </return>
- public ExceptionMonitor getExceptionMonitor();
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using javax.jms.*;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A CircuitEndBase is a pair consisting of one message producer and one message consumer, that represents one end of a
- /// test circuit. It is a standard unit of connectivity allowing a full-duplex conversation to be held, provided both
- /// the consumer and producer are instantiated and configured.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Provide a message producer for sending messages.
- /// <tr><td> Provide a message consumer for receiving messages.
- /// </table>
- /// </summary>
- public class CircuitEndBase : CircuitEnd
- {
- /// <summary> Holds the single message producer. </summary>
- MessageProducer producer;
-
- /// <summary> Holds the single message consumer. </summary>
- MessageConsumer consumer;
-
- /// <summary> Holds the controlSession for the circuit end. </summary>
- Session session;
-
- /// <summary> Holds the message monitor for the circuit end. </summary>
- MessageMonitor messageMonitor;
-
- /// <summary> Holds the exception monitor for the circuit end. </summary>
- ExceptionMonitor exceptionMonitor;
-
- /// <summary>
- /// Creates a circuit end point on the specified producer, consumer and controlSession. Monitors are also configured
- /// for messages and exceptions received by the circuit end.
- /// </summary>
- /// <param name="producer"> The message producer for the circuit end point. </param>
- /// <param name="consumer"> The message consumer for the circuit end point. </param>
- /// <param name="session"> The controlSession for the circuit end point. </param>
- /// <param name="messageMonitor"> The monitor to notify of all messages received by the circuit end. </param>
- /// <param name="exceptionMonitor"> The monitor to notify of all exceptions received by the circuit end. </param>
- public CircuitEndBase(MessageProducer producer, MessageConsumer consumer, Session session, MessageMonitor messageMonitor,
- ExceptionMonitor exceptionMonitor)
- {
- this.producer = producer;
- this.consumer = consumer;
- this.session = session;
-
- this.messageMonitor = messageMonitor;
- this.exceptionMonitor = exceptionMonitor;
- }
-
- /// <summary>
- /// Gets the message producer at this circuit end point.
- /// </summary>
- /// <return> The message producer at with this circuit end point. </return>
- public MessageProducer getProducer()
- {
- return producer;
- }
-
- /// <summary>
- /// Gets the message consumer at this circuit end point.
- /// </summary>
- /// <return> The message consumer at this circuit end point. </return>
- public MessageConsumer getConsumer()
- {
- return consumer;
- }
-
- /// <summary>
- /// Send the specified message over the producer at this end point.
- /// </summary>
- /// <param name="message"> The message to send. </param>
- /// <exception cref="javax.jms.JMSException"> Any JMS exception occuring during the send is allowed to fall through. </exception>
- public void send(Message message) throws JMSException
- {
- producer.send(message);
- }
-
- /// <summary>
- /// Gets the JMS Session associated with this circuit end point.
- /// </summary>
- /// <return> The JMS Session associated with this circuit end point. </return>
- public Session getSession()
- {
- return session;
- }
-
- /// <summary>
- /// Closes the message producers and consumers and the sessions, associated with this circuit end point.
- /// </summary>
- /// <exception cref="javax.jms.JMSException"> Any JMSExceptions occurring during the close are allowed to fall through. </exception>
- public void close() throws JMSException
- {
- if (producer != null)
- {
- producer.close();
- }
-
- if (consumer != null)
- {
- consumer.close();
- }
- }
-
- /// <summary>
- /// Returns the message monitor for reporting on received messages on this circuit end.
- /// </summary>
- /// <return> The message monitor for this circuit end. </return>
- public MessageMonitor getMessageMonitor()
- {
- return messageMonitor;
- }
-
- /// <summary>
- /// Returns the exception monitor for reporting on exceptions received on this circuit end.
- /// </summary>
- /// <return> The exception monitor for this circuit end. </return>
- public ExceptionMonitor getExceptionMonitor()
- {
- return exceptionMonitor;
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework.clocksynch
-{
- /// <summary>
- /// ClockSynchFailureException represents failure of a <see cref="ClockSynchronizer"/> to achieve synchronization. For example,
- /// this could be because a reference signal is not available, or because a desired accurracy cannot be attained.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Represent failure to achieve synchronization.
- /// </table>
- /// </summary>
- public class ClockSynchFailureException extends Exception
- {
- /// <summary>
- /// Creates a clock synch failure exception.
- /// </summary>
- /// <param name="message"> The detail message (which is saved for later retrieval by the <see cref="#getMessage()"/> method). </param>
- /// <param name="cause"> The cause (which is saved for later retrieval by the <see cref="#getCause()"/> method). (A <tt>null</tt>
- /// value is permitted, and indicates that the cause is nonexistent or unknown.)</param>
- public ClockSynchFailureException(string message, Throwable cause)
- {
- super(message, cause);
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework.clocksynch
-{
- /// <summary>
- /// ClockSynchronizer provides an interface through which two nodes may synchronize their clocks. It is expected that one
- /// node will act as the reference clock, to which no delta need be applied, and the other node will act as the slave,
- /// and which must apply a delta to its local clock to get a clock synchronized with the reference.
- ///
- /// <p/>The slave side will initiate the computation of a clock delta by calling the <see cref="#synch"/> method. This method
- /// will not return until the delta has been computed, at which point there is a method to return its value, as well as
- /// an estimate of the likely error (usually one standard deviation), in the synchronization. For convenience there is a
- /// <see cref="#nanoTime"/> method to return the value of System.nanoTime() with the delta added in.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Trigger a clock synchronization.
- /// <tr><td> Compute a clock delta to apply to the local clock.
- /// <tr><td> Estimate the error in the synchronzation.
- /// </table>
- /// </summary>
- public interface ClockSynchronizer
- {
- /// <summary>
- /// The slave side should call this to copute a clock delta with the reference.
- /// </summary>
- /// <exception cref="ClockSynchFailureException"> If synchronization cannot be achieved. </exception>
- public void synch() throws ClockSynchFailureException;
-
- /// <summary>
- /// Gets the clock delta in nano seconds.
- /// </summary>
- /// <return> The clock delta in nano seconds. </return>
- public long getDelta();
-
- /// <summary>
- /// Gets an estimate of the clock error in nan seconds.
- /// </summary>
- /// <return> An estimate of the clock error in nan seconds. </return>
- public long getEpsilon();
-
- /// <summary>
- /// Gets the local clock time with any computed delta added in.
- /// </summary>
- /// <return> The local clock time with any computed delta added in. </return>
- public long nanoTime();
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using uk.co.thebadgerset.junit.extensions.ShutdownHookable;
-using uk.co.thebadgerset.junit.extensions.Throttle;
-
-namespace Apache.Qpid.Integration.Tests.framework.clocksynch
-{
- /// <summary>
- /// ClockSynchThread is a convenient utility for running a thread that periodically synchronizes the clock against
- /// a reference. Supply it with a <see cref="ClockSynchronizer"/> and a <see cref="Throttle"/> and it will continually keep the
- /// clock up-to-date at a rate determined by the throttle.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Continually sychronize the clock at a throttled rate.
- /// </table>
- /// </summary>
- public class ClockSynchThread extends Thread : ShutdownHookable
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(ClockSynchThread));
-
- /// <summary> Holds the clock syncher for the synch thread. </summary>
- private ClockSynchronizer clockSyncher;
-
- /// <summary> Holds the throttle to limit the synch rate. </summary>
- private Throttle throttle;
-
- /// <summary> Flag to indicate that the periodic clock syncher should keep running. </summary>
- bool doSynch = true;
-
- /// <summary>
- /// Creates a clock synchronizer thread from a clock synchronizer and a throttle.
- /// </summary>
- /// <param name="syncher"> The clock synchronizer. </param>
- /// <param name="throttle"> The throttle. </param>
- public ClockSynchThread(ClockSynchronizer syncher, Throttle throttle)
- {
- this.clockSyncher = syncher;
- this.throttle = throttle;
- }
-
- /// <summary> Terminates the synchronization thread. </summary>
- public void terminate()
- {
- doSynch = false;
- }
-
- /// <summary> Continually updates the clock, until <see cref="#terminate()"/> is called. </summary>
- public void run()
- {
- while (doSynch)
- {
- // Perform a clock clockSynch.
- try
- {
- // Wait controlled by the throttle before doing the next synch.
- throttle.throttle();
-
- clockSyncher.synch();
- log.debug("Clock synched, delta = " + clockSyncher.getDelta() + ", epsilon = " + clockSyncher.getEpsilon()
- + ".");
- }
- // Terminate the synch thread if the synchronization cannot be achieved.
- catch (ClockSynchFailureException e)
- {
- log.debug("Cannot synchronize the clock (reference service may be down). Terminating the synch thread.");
- doSynch = false;
- }
- }
- }
-
- /// <summary>
- /// Gets the clock synchronizer that is kept continually up to date.
- /// </summary>
- /// <return> The clock synchronizer that is kept continually up to date. </return>
- public ClockSynchronizer getClockSyncher()
- {
- return clockSyncher;
- }
-
- /// <summary>
- /// Supplies a shutdown hook, that terminates the synching thread.
- /// </summary>
- /// <return> The shut down hook. </return>
- public Thread getShutdownHook()
- {
- return new Thread(new Runnable()
- {
- public void run()
- {
- doSynch = false;
- }
- });
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework.clocksynch
-{
-
- /// <summary>
- /// LocalClockSynchronizer is a fake <see cref="ClockSynchronizer"/> that simply calls System.nanoTime(). It exists so that
- /// the same tests can be run distributed or locally, taking timings against the ClockSynchronizer interface without
- /// being aware of how they are being run.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Supply the local clock with no delta.
- /// </table>
- /// </summary>
- public class LocalClockSynchronizer : ClockSynchronizer
- {
- /// <summary>
- /// The slave side should call this to copute a clock delta with the reference.
- /// </summary>
- /// <exception cref="Apache.Qpid.Integration.Tests.framework.clocksynch.ClockSynchFailureException"> If synchronization cannot be achieved. </exception>
- public void synch() throws ClockSynchFailureException
- { }
-
- /// <summary>
- /// Gets the clock delta in nano seconds.
- /// </summary>
- /// <return> The clock delta in nano seconds. </return>
- public long getDelta()
- {
- return 0L;
- }
-
- /// <summary>
- /// Gets an estimate of the clock error in nan seconds.
- /// </summary>
- /// <return> An estimate of the clock error in nan seconds. </return>
- public long getEpsilon()
- {
- return 0L;
- }
-
- /// <summary>
- /// Gets the local clock time with any computed delta added in.
- /// </summary>
- /// <return> The local clock time with any computed delta added in. </return>
- public long nanoTime()
- {
- return System.nanoTime();
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using uk.co.thebadgerset.junit.extensions.ShutdownHookable;
-
-using java.io.IOException;
-using java.net.*;
-using java.nio.ByteBuffer;
-
-namespace Apache.Qpid.Integration.Tests.framework.clocksynch
-{
- /// <summary>
- /// UDPClockReference supplies a refernce clock signal (generated from System.nanoTime()).
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Supply a reference clock signal.
- /// </table>
- /// </summary>
- ///
- /// <remarks> Port hard coded. Make configurable.</remarks>
- ///
- /// <remarks> Errors rethrown as runtimes, or silently terminate the service. Could add better error handling if needed.</remarks>
- public class UDPClockReference : Runnable, ShutdownHookable
- {
- /// <summary> Used for debugging. </summary>
- // private static ILog log = LogManager.GetLogger(typeof(UDPClockReference));
-
- /// <summary> Defines the timeout to use when polling the socket for time requests. </summary>
- private static final int TIMEOUT = 200;
-
- /// <summary> Defines the port to run the clock reference on. </summary>
- public static final int REFERENCE_PORT = 4444;
-
- /// <summary> Holds the socket to receive clock reference requests on. </summary>
- protected DatagramSocket socket = null;
-
- /// <summary> Flag used to indicate that the time server should keep running. Set to false to terminate. </summary>
- protected bool publish = true;
-
- /// <summary> Creates a clock reference service on the standard port. </summary>
- public UDPClockReference()
- {
- try
- {
- socket = new DatagramSocket(REFERENCE_PORT);
- socket.setSoTimeout(TIMEOUT);
- }
- catch (SocketException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- /// <summary>
- /// Implements the run loop for this reference time server. This waits for incoming time requests, and replies to
- /// any, with a message with the local time stamp in it. Periodically (controlled by <see cref="#TIMEOUT"/>), the run
- /// loop will check if the <see cref="#publish"/> flag has been cleared, and terminate the reference time service if so.
- /// </summary>
- public void run()
- {
- byte[] buf = new byte[256];
- ByteBuffer bbuf = ByteBuffer.wrap(buf);
-
- while (publish)
- {
- try
- {
- // Wait for a reference time request.
- DatagramPacket packet = new DatagramPacket(buf, buf.length);
- bool timedOut = false;
-
- try
- {
- socket.receive(packet);
- }
- catch (SocketTimeoutException e)
- {
- timedOut = true;
- }
-
- if (!timedOut)
- {
- // Work out from the received packet, where to reply to.
- InetAddress address = packet.getAddress();
- int port = packet.getPort();
-
- // Respond to the time request by sending back the local clock as the reference time.
- bbuf.putLong(System.nanoTime());
- bbuf.flip();
- packet = new DatagramPacket(bbuf.array(), bbuf.capacity(), address, port);
-
- socket.send(packet);
- }
- }
- catch (IOException e)
- {
- publish = false;
- }
- }
-
- socket.close();
- }
-
- /// <summary>
- /// Supplies a shutdown hook.
- /// </summary>
- /// <return> The shut down hook. </return>
- public Thread getShutdownHook()
- {
- return new Thread(new Runnable()
- {
- public void run()
- {
- publish = false;
- }
- });
- }
-
- /// <summary>
- /// For testing purposes. Runs a reference clock on the default port.
- /// </summary>
- /// <param name="args"> None. </param>
- public static void main(String[] args)
- {
- try
- {
- // Create the clock reference service.
- UDPClockReference clock = new UDPClockReference();
-
- // Set up a shutdown hook for it.
- Runtime.getRuntime().addShutdownHook(clock.getShutdownHook());
-
- // Start the service.
- clock.run();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- System.exit(1);
- }
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using uk.co.thebadgerset.junit.extensions.util.CommandLineParser;
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using java.io.IOException;
-using java.net.*;
-using java.nio.ByteBuffer;
-using java.util.Arrays;
-
-namespace Apache.Qpid.Integration.Tests.framework.clocksynch
-{
- /// <summary>
- /// UDPClockSynchronizer is a <see cref="ClockSynchronizer"/> that sends pings as UDP datagrams, and uses the following simple
- /// algorithm to perform clock synchronization:
- ///
- /// <ol>
- /// <li>Slave initiates synchronization with a Reference clock.</li>
- /// <li>Slave stamps current local time on a "time request" message and sends to the Reference.</li>
- /// <li>Upon receipt by Reference, Reference stamps Reference-time and returns.</li>
- /// <li>Upon receipt by Slave, Slave subtracts current time from sent time and divides by two to compute latency. It
- /// subtracts current time from Reference time to determine Slave-Reference time delta and adds in the
- /// half-latency to get the correct clock delta.</li>
- /// <li>The first result is immediately used to update the clock since it will get the local clock into at least
- /// the right ballpark.</li>
- /// <li>The Slave repeats steps 2 through 4, 15 more times.</li>
- /// <li>The results of the packet receipts are accumulated and sorted in lowest-latency to highest-latency order. The
- /// median latency is determined by picking the mid-point sample from this ordered list.</li>
- /// <li>All samples outside 1 standard-deviation from the median are discarded and the remaining samples
- /// are averaged using an arithmetic mean.</li>
- /// </ol>
- ///
- /// <p/>The use of UDP datagrams, instead of TCP based communication eliminates the hidden delays that TCP can introduce,
- /// as it can transparently re-order or re-send packets, or introduce delays as packets are naggled.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Trigger a clock synchronziation.
- /// <tr><td> Compute a clock delta to apply to the local clock.
- /// <tr><td> Estimate the error in the synchronzation.
- /// </table>
- /// </summary>
- public class UDPClockSynchronizer : ClockSynchronizer
- {
- /// <summary> Used for debugging. </summary>
- // private static ILog log = LogManager.GetLogger(typeof(UDPClockSynchronizer));
-
- /// <summary> Defines the timeout to use when waiting for responses to time requests. </summary>
- private static final int TIMEOUT = 50;
-
- /// <summary> The clock delta. </summary>
- private long delta = 0L;
-
- /// <summary> Holds an estimate of the clock error relative to the reference clock. </summary>
- private long epsilon = 0L;
-
- /// <summary> Holds the address of the reference clock. </summary>
- private InetAddress referenceAddress;
-
- /// <summary> Holds the socket to communicate with the reference service over. </summary>
- private DatagramSocket socket;
-
- /// <summary> Used to control the shutdown in the main test loop. </summary>
- private static bool doSynch = true;
-
- /// <summary>
- /// Creates a clock synchronizer against the specified address for the reference.
- /// </summary>
- /// <param name="address"> The address of the reference service. </param>
- public UDPClockSynchronizer(string address)
- {
- try
- {
- referenceAddress = InetAddress.getByName(address);
- }
- catch (UnknownHostException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- /// <summary>
- /// The slave side should call this to compute a clock delta with the reference.
- /// </summary>
- /// <exception cref="ClockSynchFailureException"> If synchronization cannot be achieved, due to unavailability of the reference
- /// time service. </exception>
- public void synch() throws ClockSynchFailureException
- {
- try
- {
- socket = new DatagramSocket();
- socket.setSoTimeout(TIMEOUT);
-
- // Synchronize on a single ping, to get the clock into the right ball-park.
- synch(1);
-
- // Synchronize on 15 pings.
- synch(15);
-
- // And again, for greater accuracy, on 31.
- synch(31);
-
- socket.close();
- }
- catch (SocketException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- /// <summary>
- /// Updates the synchronization delta by performing the specified number of reference clock requests.
- /// </summary>
- /// <param name="n"> The number of reference clock request cycles to perform. </param>
- ///
- /// <exception cref="ClockSynchFailureException"> If synchronization cannot be achieved, due to unavailability of the reference
- /// time service. </exception>
- protected void synch(int n) throws ClockSynchFailureException
- {
- // log.debug("protected void synch(int n = " + n + "): called");
-
- // Create an array of deltas by performing n reference pings.
- long[] delta = new long[n];
-
- for (int i = 0; i < n; i++)
- {
- delta[i] = ping();
- }
-
- // Reject any deltas that are larger than 1 s.d. above the median.
- long median = median(delta);
- long sd = standardDeviation(delta);
-
- // log.debug("median = " + median);
- // log.debug("sd = " + sd);
-
- long[] tempDeltas = new long[n];
- int count = 0;
-
- for (int i = 0; i < n; i++)
- {
- if ((delta[i] <= (median + sd)) && (delta[i] >= (median - sd)))
- {
- tempDeltas[count] = delta[i];
- count++;
- }
- else
- {
- // log.debug("Rejected: " + delta[i]);
- }
- }
-
- System.arraycopy(tempDeltas, 0, delta, 0, count);
-
- // Estimate the delta as the mean of the remaining deltas.
- this.delta += mean(delta);
-
- // Estimate the error as the standard deviation of the remaining deltas.
- this.epsilon = standardDeviation(delta);
-
- // log.debug("this.delta = " + this.delta);
- // log.debug("this.epsilon = " + this.epsilon);
- }
-
- /// <summary>
- /// Performs a single reference clock request cycle and returns the estimated delta relative to the local clock.
- /// This is computed as the half-latency of the requst cycle, plus the reference clock, minus the local clock.
- /// </summary>
- /// <return> The estimated clock delta. </return>
- ///
- /// <exception cref="ClockSynchFailureException"> If the reference service is not responding. </exception>
- protected long ping() throws ClockSynchFailureException
- {
- // log.debug("protected long ping(): called");
-
- try
- {
- byte[] buf = new byte[256];
-
- bool timedOut = false;
- long start = 0L;
- long refTime = 0L;
- long localTime = 0L;
- long latency = 0L;
- int failCount = 0;
-
- // Keep trying the ping until it gets a response, or 10 tries in a row all time out.
- do
- {
- // Start timing the request latency.
- start = nanoTime();
-
- // Get the reference time.
- DatagramPacket packet =
- new DatagramPacket(buf, buf.length, referenceAddress, UDPClockReference.REFERENCE_PORT);
- socket.send(packet);
- packet = new DatagramPacket(buf, buf.length);
-
- timedOut = false;
-
- try
- {
- socket.receive(packet);
- }
- catch (SocketTimeoutException e)
- {
- timedOut = true;
- failCount++;
-
- continue;
- }
-
- ByteBuffer bbuf = ByteBuffer.wrap(packet.getData());
- refTime = bbuf.getLong();
-
- // Stop timing the request latency.
- localTime = nanoTime();
- latency = localTime - start;
-
- // log.debug("refTime = " + refTime);
- // log.debug("localTime = " + localTime);
- // log.debug("start = " + start);
- // log.debug("latency = " + latency);
- // log.debug("delta = " + ((latency / 2) + (refTime - localTime)));
-
- }
- while (timedOut && (failCount < 10));
-
- // Fail completely if the fail count is too high.
- if (failCount >= 10)
- {
- throw new ClockSynchFailureException("Clock reference not responding.", null);
- }
-
- // Estimate delta as (ref clock + half-latency) - local clock.
- return (latency / 2) + (refTime - localTime);
- }
- catch (IOException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- /// <summary>
- /// Gets the clock delta in nano seconds.
- /// </summary>
- /// <return> The clock delta in nano seconds. </return>
- public long getDelta()
- {
- return delta;
- }
-
- /// <summary>
- /// Gets an estimate of the clock error in nan seconds.
- /// </summary>
- /// <return> An estimate of the clock error in nan seconds. </return>
- public long getEpsilon()
- {
- return epsilon;
- }
-
- /// <summary>
- /// Gets the local clock time with any computed delta added in.
- /// </summary>
- /// <return> The local clock time with any computed delta added in. </return>
- public long nanoTime()
- {
- return System.nanoTime() + delta;
- }
-
- /// <summary>
- /// Computes the median of a series of values.
- /// </summary>
- /// <param name="values"> The values. </param>
- ///
- /// <return> The median. </return>
- public static long median(long[] values)
- {
- // log.debug("public static long median(long[] values = " + Arrays.ToString(values) + "): called");
-
- long median;
-
- // Order the list of values.
- long[] orderedValues = new long[values.length];
- System.arraycopy(values, 0, orderedValues, 0, values.length);
- Arrays.sort(orderedValues);
-
- // Check if the median is computed from a pair of middle value.
- if ((orderedValues.length % 2) == 0)
- {
- int middle = orderedValues.length / 2;
-
- median = (orderedValues[middle] + orderedValues[middle - 1]) / 2;
- }
- // The median is computed from a single middle value.
- else
- {
- median = orderedValues[orderedValues.length / 2];
- }
-
- // log.debug("median = " + median);
-
- return median;
- }
-
- /// <summary>
- /// Computes the mean of a series of values.
- /// </summary>
- /// <param name="values"> The values. </param>
- ///
- /// <return> The mean. </return>
- public static long mean(long[] values)
- {
- // log.debug("public static long mean(long[] values = " + Arrays.ToString(values) + "): called");
-
- long total = 0L;
-
- for (long value : values)
- {
- total += value;
- }
-
- long mean = total / values.length;
-
- // log.debug("mean = " + mean);
-
- return mean;
- }
-
- /// <summary>
- /// Computes the variance of series of values.
- /// </summary>
- /// <param name="values"> The values. </param>
- ///
- /// <return> The variance of the values. </return>
- public static long variance(long[] values)
- {
- // log.debug("public static long variance(long[] values = " + Arrays.ToString(values) + "): called");
-
- long mean = mean(values);
-
- long totalVariance = 0;
-
- for (long value : values)
- {
- long diff = (value - mean);
- totalVariance += diff/// diff;
- }
-
- long variance = totalVariance / values.length;
-
- // log.debug("variance = " + variance);
-
- return variance;
- }
-
- /// <summary>
- /// Computes the standard deviation of a series of values.
- /// </summary>
- /// <param name="values"> The values. </param>
- ///
- /// <return> The standard deviation. </return>
- public static long standardDeviation(long[] values)
- {
- // log.debug("public static long standardDeviation(long[] values = " + Arrays.ToString(values) + "): called");
-
- long sd = Double.valueOf(Math.sqrt(variance(values))).longValue();
-
- // log.debug("sd = " + sd);
-
- return sd;
- }
-
- /// <summary>
- /// For testing purposes. Supply address of reference clock as arg 1.
- /// </summary>
- /// <param name="args"> Address of reference clock as arg 1. </param>
- public static void main(String[] args)
- {
- ParsedProperties options =
- new ParsedProperties(CommandLineParser.processCommandLine(args,
- new CommandLineParser(
- new String[][]
- {
- { "1", "Address of clock reference service.", "address", "true" }
- }), System.getProperties()));
-
- string address = options.getProperty("1");
-
- // Create a clock synchronizer.
- UDPClockSynchronizer clockSyncher = new UDPClockSynchronizer(address);
-
- // Set up a shutdown hook for it.
- Runtime.getRuntime().addShutdownHook(new Thread(new Runnable()
- {
- public void run()
- {
- doSynch = false;
- }
- }));
-
- // Repeat the clock synching until the user kills the progam.
- while (doSynch)
- {
- // Perform a clock clockSynch.
- try
- {
- clockSyncher.synch();
-
- // Print out the clock delta and estimate of the error.
- System.out.println("Delta = " + clockSyncher.getDelta());
- System.out.println("Epsilon = " + clockSyncher.getEpsilon());
-
- try
- {
- Thread.sleep(250);
- }
- catch (InterruptedException e)
- {
- // Restore the interrupted status and terminate the loop.
- Thread.currentThread().interrupt();
- doSynch = false;
- }
- }
- // Terminate if the reference time service is unavailable.
- catch (ClockSynchFailureException e)
- {
- doSynch = false;
- }
- }
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.*;
-using org.apache.qpid.util.ConversationFactory;
-
-using uk.co.thebadgerset.junit.extensions.TimingController;
-using uk.co.thebadgerset.junit.extensions.TimingControllerAware;
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.Destination;
-using javax.jms.JMSException;
-using javax.jms.Message;
-using javax.jms.Session;
-
-using System.Collections.Generic.LinkedList;
-using System.Collections.Generic.IList;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedcircuit
-{
- /// <summary>
- /// DistributedCircuitImpl is a distributed implementation of the test <see cref="Circuit"/>. Many publishers and receivers
- /// accross multiple machines may be combined to form a single test circuit. The test circuit extracts reports from
- /// all of its publishers and receivers, and applies its assertions to these reports.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Supply the publishing and receiving ends of a test messaging circuit.
- /// <tr><td> Start the circuit running.
- /// <tr><td> Close the circuit down.
- /// <tr><td> Take a reading of the circuits state.
- /// <tr><td> Apply assertions against the circuits state.
- /// <tr><td> Send test messages over the circuit.
- /// <tr><td> Perform the default test procedue on the circuit.
- /// </table>
- /// </summary>
- ///
- /// <remarks> There is a short pause after receiving sender reports before asking for receiver reports, because receivers may
- /// not have finished receiving all their test messages before the report request arrives. This is going to be a
- /// problem for taking test timings and needs to be eliminiated. Suggested solution: have receiver send back reports
- /// asynchronously, on test batch size boundaries, and do so automatically rather than having to have the report
- /// request sent to them. Number each test run, or otherwise uniquely identify it, when a receiver does not get
- /// any more messages on a test run for more than a timeout, it can assume the test is complete and send a final
- /// report. On the coordinator end a future will need to be created to wait for all final reports to come in, and
- /// to register results and timings for the test. This must work in such a way that a new test cycle can be started
- /// without waiting for the results of the old one to come in.</remarks>
- ///
- /// <remarks> Add in setting of timing controller, from timing aware test cases.</remarks>
- public class DistributedCircuitImpl : Circuit, TimingControllerAware
- {
- /// <summary> Used for debugging purposes. </summary>
- private static ILog log = LogManager.GetLogger(typeof(DistributedCircuitImpl));
-
- /// <summary> Holds the conversation factory over which to coordinate the test. </summary>
- protected ConversationFactory conversationFactory;
-
- /// <summary> Holds the controlSession over which to hold the control conversation. </summary>
- protected Session controlSession;
-
- /// <summary> Holds the sender nodes in the test circuit. </summary>
- protected IList<TestClientDetails> senders;
-
- /// <summary> Holds the receiver nodes in the test circuit. </summary>
- protected IList<TestClientDetails> receivers;
-
- /// <summary> Holds the sender control conversations. </summary>
- protected ConversationFactory.Conversation[] senderConversation;
-
- /// <summary> Holds the receiver control conversations. </summary>
- protected ConversationFactory.Conversation[] receiverConversation;
-
- /// <summary> Holds the control topics for the senders in the test circuit. </summary>
- protected Destination[] senderControlTopic;
-
- /// <summary> Holds the control topics for the receivers in the test circuit. </summary>
- protected Destination[] receiverControlTopic;
-
- /// <summary> Holds the number of messages to send per test run. </summary>
- protected int numMessages;
-
- /// <summary>
- /// Holds the timing controller for the circuit. This is used to log test times asynchronously, when reciever nodes
- /// return their reports after senders have completed a test case.
- TimingController timingController;
-
- /// <summary>
- /// Creates a distributed test circuit on the specified senders and receivers.
- /// </summary>
- /// <param name="session"> The controlSession for all control conversations. </param>
- /// <param name="senders"> The senders. </param>
- /// <param name="receivers"> The receivers. </param>
- /// <param name="senderConversation"> A control conversation with the senders. </param>
- /// <param name="receiverConversation"> A control conversation with the receivers. </param>
- /// <param name="senderControlTopic"> The senders control topic. </param>
- /// <param name="receiverControlTopic"> The receivers control topic. </param>
- protected DistributedCircuitImpl(Session session, IList<TestClientDetails> senders, List<TestClientDetails> receivers,
- ConversationFactory.Conversation[] senderConversation, ConversationFactory.Conversation[] receiverConversation,
- Destination[] senderControlTopic, Destination[] receiverControlTopic)
- {
- this.controlSession = session;
- this.senders = senders;
- this.receivers = receivers;
- this.senderConversation = senderConversation;
- this.receiverConversation = receiverConversation;
- this.senderControlTopic = senderControlTopic;
- this.receiverControlTopic = receiverControlTopic;
- }
-
- /// <summary>
- /// Creates a distributed test circuit from the specified test parameters, on the senders and receivers
- /// given.
- /// </summary>
- /// <param name="testProps"> The test parameters. </param>
- /// <param name="senders"> The sender ends in the test circuit. </param>
- /// <param name="receivers"> The receiver ends in the test circuit. </param>
- /// <param name="conversationFactory"> A conversation factory for creating the control conversations with senders and receivers. </param>
- ///
- /// <return> A connected and ready to start, test circuit. </return>
- public static Circuit createCircuit(ParsedProperties testProps, IList<TestClientDetails> senders,
- IList<TestClientDetails> receivers, ConversationFactory conversationFactory)
- {
- log.debug("public static Circuit createCircuit(ParsedProperties testProps, IList<TestClientDetails> senders, "
- + " IList<TestClientDetails> receivers, ConversationFactory conversationFactory)");
-
- try
- {
- Session session = conversationFactory.getSession();
-
- // Create control conversations with each of the senders.
- ConversationFactory.Conversation[] senderConversation = new ConversationFactory.Conversation[senders.size()];
- Destination[] senderControlTopic = new Destination[senders.size()];
-
- for (int i = 0; i < senders.size(); i++)
- {
- TestClientDetails sender = senders.get(i);
-
- senderControlTopic[i] = session.createTopic(sender.privateControlKey);
- senderConversation[i] = conversationFactory.startConversation();
- }
-
- log.debug("Sender conversations created.");
-
- // Create control conversations with each of the receivers.
- ConversationFactory.Conversation[] receiverConversation = new ConversationFactory.Conversation[receivers.size()];
- Destination[] receiverControlTopic = new Destination[receivers.size()];
-
- for (int i = 0; i < receivers.size(); i++)
- {
- TestClientDetails receiver = receivers.get(i);
-
- receiverControlTopic[i] = session.createTopic(receiver.privateControlKey);
- receiverConversation[i] = conversationFactory.startConversation();
- }
-
- log.debug("Receiver conversations created.");
-
- // Assign the sender role to each of the sending test clients.
- for (int i = 0; i < senders.size(); i++)
- {
- TestClientDetails sender = senders.get(i);
-
- Message assignSender = conversationFactory.getSession().createMessage();
- TestUtils.setPropertiesOnMessage(assignSender, testProps);
- assignSender.setStringProperty("CONTROL_TYPE", "ASSIGN_ROLE");
- assignSender.setStringProperty("ROLE", "SENDER");
-
- senderConversation[i].send(senderControlTopic[i], assignSender);
- }
-
- log.debug("Sender role assignments sent.");
-
- // Assign the receivers role to each of the receiving test clients.
- for (int i = 0; i < receivers.size(); i++)
- {
- TestClientDetails receiver = receivers.get(i);
-
- Message assignReceiver = session.createMessage();
- TestUtils.setPropertiesOnMessage(assignReceiver, testProps);
- assignReceiver.setStringProperty("CONTROL_TYPE", "ASSIGN_ROLE");
- assignReceiver.setStringProperty("ROLE", "RECEIVER");
-
- receiverConversation[i].send(receiverControlTopic[i], assignReceiver);
- }
-
- log.debug("Receiver role assignments sent.");
-
- // Wait for the senders and receivers to confirm their roles.
- for (int i = 0; i < senders.size(); i++)
- {
- senderConversation[i].receive();
- }
-
- log.debug("Got all sender role confirmations");
-
- for (int i = 0; i < receivers.size(); i++)
- {
- receiverConversation[i].receive();
- }
-
- log.debug("Got all receiver role confirmations");
-
- // Package everything up as a circuit.
- return new DistributedCircuitImpl(session, senders, receivers, senderConversation, receiverConversation,
- senderControlTopic, receiverControlTopic);
- }
- catch (JMSException e)
- {
- throw new RuntimeException("JMSException not handled.");
- }
- }
-
- /// <summary>
- /// Used by tests cases that can supply a <see cref="uk.co.thebadgerset.junit.extensions.TimingController"/> to set the
- /// controller on an aware test.
- /// </summary>
- /// <param name="controller"> The timing controller. </param>
- public void setTimingController(TimingController controller)
- {
- this.timingController = controller;
- }
-
- /// <summary>
- /// Gets the interface on the publishing end of the circuit.
- /// </summary>
- /// <return> The publishing end of the circuit. </return>
- public Publisher getPublisher()
- {
- throw new RuntimeException("Not Implemented.");
- }
-
- /// <summary>
- /// Gets the interface on the receiving end of the circuit.
- /// </summary>
- /// <return> The receiving end of the circuit. </return>
- public Receiver getReceiver()
- {
- throw new RuntimeException("Not Implemented.");
- }
-
- /// <summary>
- /// Connects and starts the circuit. After this method is called the circuit is ready to send messages.
- public void start()
- {
- log.debug("public void start(): called");
-
- try
- {
- // Start the test on each of the senders.
- Message start = controlSession.createMessage();
- start.setStringProperty("CONTROL_TYPE", "START");
- start.setIntProperty("MESSAGE_COUNT", numMessages);
-
- for (int i = 0; i < senders.size(); i++)
- {
- senderConversation[i].send(senderControlTopic[i], start);
- }
-
- log.debug("All senders told to start their tests.");
- }
- catch (JMSException e)
- {
- throw new RuntimeException("Unhandled JMSException.", e);
- }
- }
-
- /// <summary>
- /// Checks the test circuit. The effect of this is to gather the circuits state, for both ends of the circuit,
- /// into a report, against which assertions may be checked.
- /// </summary>
- /// <remarks> Replace the asynch receiver report thread with a choice of direct or asynch executor, so that asynch
- /// or synch logging of test timings is optional. Also need to provide an onMessage method that is capable
- /// of receiving timing reports that receivers will generate during an ongoing test, on the test sample
- /// size boundaries. The message timing logging code should be factored out as a common method that can
- /// be called in response to the final report responses, or the onMessage method. Another alternative is
- /// to abandon the final report request altogether and just use the onMessage method? I think the two
- /// differ though, as the final report is used to apply assertions, and the ongoing report is just for
- /// periodic timing results... In which case, maybe there needs to be a way for the onMessage method
- /// to process just some of the incoming messages, and forward the rest on to the conversion helper, as
- /// a sort of pre-conversation helper filter? Make conversation expose its onMessage method (it should
- /// already) and allow another delivery thread to filter the incoming messages to the conversation.</remarks>
- public void check()
- {
- log.debug("public void check(): called");
-
- try
- {
- // Wait for all the test senders to return their reports.
- for (int i = 0; i < senders.size(); i++)
- {
- Message senderReport = senderConversation[i].receive();
- log.debug("Sender " + senderReport.getStringProperty("CLIENT_NAME") + " reports message count: "
- + senderReport.getIntProperty("MESSAGE_COUNT"));
- log.debug("Sender " + senderReport.getStringProperty("CLIENT_NAME") + " reports message time: "
- + senderReport.getLongProperty("TEST_TIME"));
- }
-
- log.debug("Got all sender test reports.");
-
- // Apply sender assertions to pass/fail the tests.
-
- // Inject a short pause to give the receivers time to finish receiving their test messages.
- TestUtils.pause(500);
-
- // Ask the receivers for their reports.
- Message statusRequest = controlSession.createMessage();
- statusRequest.setStringProperty("CONTROL_TYPE", "STATUS_REQUEST");
-
- for (int i = 0; i < receivers.size(); i++)
- {
- receiverConversation[i].send(receiverControlTopic[i], statusRequest);
- }
-
- log.debug("All receiver test reports requested.");
-
- // Wait for all receiver reports to come in, but do so asynchronously.
- Runnable gatherAllReceiverReports =
- new Runnable()
- {
- public void run()
- {
- try
- {
- // Wait for all the receivers to send their reports.
- for (int i = 0; i < receivers.size(); i++)
- {
- Message receiverReport = receiverConversation[i].receive();
-
- string clientName = receiverReport.getStringProperty("CLIENT_NAME");
- int messageCount = receiverReport.getIntProperty("MESSAGE_COUNT");
- long testTime = receiverReport.getLongProperty("TEST_TIME");
-
- log.debug("Receiver " + clientName + " reports message count: " + messageCount);
- log.debug("Receiver " + receiverReport.getStringProperty("CLIENT_NAME")
- + " reports message time: " + testTime);
-
- // Apply receiver assertions to pass/fail the tests.
-
- // Log the test timings on the asynchronous test timing controller.
- /*try
- {
- timingController.completeTest(true, messageCount, testTime);
- }
- // The timing controll can throw InterruptedException is the current test is to be
- // interrupted.
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }*/
- }
-
- log.debug("All receiver test reports received.");
- }
- catch (JMSException e)
- {
- throw new RuntimeException(e);
- }
- }
- };
-
- Thread receiverReportsThread = new Thread(gatherAllReceiverReports);
- receiverReportsThread.start();
-
- // return new Message[] { senderReport, receiverReport };
-
- }
- catch (JMSException e)
- {
- throw new RuntimeException("Unhandled JMSException.", e);
- }
- }
-
- /// <summary> Closes the circuit. All associated resources are closed. </summary>
- public void close()
- {
- log.debug("public void close(): called");
-
- // End the current test on all senders and receivers.
- }
-
- /// <summary>
- /// Applies a list of assertions against the test circuit. The <see cref="#check()"/> method should be called before doing
- /// this, to ensure that the circuit has gathered its state into a report to assert against.
- /// </summary>
- /// <param name="assertions"> The list of assertions to apply. </param>
- ///
- /// <return> Any assertions that failed. </return>
- public IList<Assertion> applyAssertions(List<Assertion> assertions)
- {
- log.debug("public IList<Assertion> applyAssertions(List<Assertion> assertions = " + assertions + "): called");
-
- IList<Assertion> failures = new LinkedList<Assertion>();
-
- for (Assertion assertion : assertions)
- {
- if (!assertion.apply())
- {
- failures.add(assertion);
- }
- }
-
- return failures;
- }
-
- /// <summary>
- /// Runs the default test procedure against the circuit, and checks that all of the specified assertions hold.
- /// </summary>
- /// <param name="numMessages"> The number of messages to send using the default test procedure. </param>
- /// <param name="assertions"> The list of assertions to apply. </param>
- ///
- /// <return> Any assertions that failed. </return>
- ///
- /// <remarks> From check onwards needs to be handled as a future. The future must call back onto the test case to
- /// report results asynchronously.</remarks>
- public IList<Assertion> test(int numMessages, List<Assertion> assertions)
- {
- log.debug("public IList<Assertion> test(int numMessages = " + numMessages + ", List<Assertion> assertions = "
- + assertions + "): called");
-
- // Keep the number of messages to send per test run, where the send method can reference it.
- this.numMessages = numMessages;
-
- // Start the test running on all sender circuit ends.
- start();
-
- // Request status reports to be handed in.
- check();
-
- // Assert conditions on the publishing end of the circuit.
- // Assert conditions on the receiving end of the circuit.
- IList<Assertion> failures = applyAssertions(assertions);
-
- // Close the circuit ending the current test case.
- close();
-
- // Pass with no failed assertions or fail with a list of failed assertions.
- return failures;
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Integration.Tests.framework.Assertion;
-using Apache.Qpid.Integration.Tests.framework.Publisher;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedcircuit
-{
- /// <summary>
- /// DistributedPublisherImpl represents the status of the publishing side of a test circuit. Its main purpose is to
- /// provide assertions that can be applied to verify the behaviour of a non-local publisher.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide assertion that the publishers received no exceptions.
- /// <tr><td> Provide assertion that the publishers received a no consumers error code on every message.
- /// <tr><td> Provide assertion that the publishers received a no route error code on every message.
- /// </table>
- /// </summary>
- public class DistributedPublisherImpl : Publisher
- {
- /// <summary>
- /// Provides an assertion that the publisher encountered no exceptions.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <return> An assertion that the publisher encountered no exceptions. </return>
- public Assertion noExceptionsAssertion(ParsedProperties testProps)
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Provides an assertion that the publisher got a no consumers exception on every message.
- /// </summary>
- /// <return> An assertion that the publisher got a no consumers exception on every message. </return>
- public Assertion noConsumersAssertion()
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Provides an assertion that the publisher got a no rout exception on every message.
- /// </summary>
- /// <return> An assertion that the publisher got a no rout exception on every message. </return>
- public Assertion noRouteAssertion()
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Provides an assertion that the AMQP channel was forcibly closed by an error condition.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <return> An assertion that the AMQP channel was forcibly closed by an error condition. </return>
- public Assertion channelClosedAssertion(ParsedProperties testProps)
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Provides an assertion that the publisher got a given exception during the test.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <param name="exceptionClass"> The exception class to check for. </param>
- /// <return> An assertion that the publisher got a given exception during the test. </return>
- public Assertion exceptionAssertion(ParsedProperties testProps, Class<? extends Exception> exceptionClass)
- {
- throw new RuntimeException("Not implemented.");
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Integration.Tests.framework.Assertion;
-using Apache.Qpid.Integration.Tests.framework.Receiver;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedcircuit
-{
- /// <summary>
- /// DistributedReceiverImpl represents the status of the receiving side of a test circuit. Its main purpose is to
- /// provide assertions that can be applied to verify the behaviour of a non-local receiver.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide assertion that the receivers received no exceptions.
- /// <tr><td> Provide assertion that the receivers received all test messages sent to it.
- /// </table>
- /// </summary>
- public class DistributedReceiverImpl : Receiver
- {
- /// <summary>
- /// Provides an assertion that the receivers encountered no exceptions.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <return> An assertion that the receivers encountered no exceptions. </return>
- public Assertion noExceptionsAssertion(ParsedProperties testProps)
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Provides an assertion that the receivers got all messages that were sent to it.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <return> An assertion that the receivers got all messages that were sent to it. </return>
- public Assertion allMessagesReceivedAssertion(ParsedProperties testProps)
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Provides an assertion that the receivers got none of the messages that were sent to it.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <return> An assertion that the receivers got none of the messages that were sent to it. </return>
- public Assertion noMessagesReceivedAssertion(ParsedProperties testProps)
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Provides an assertion that the AMQP channel was forcibly closed by an error condition.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <return> An assertion that the AMQP channel was forcibly closed by an error condition. </return>
- public Assertion channelClosedAssertion(ParsedProperties testProps)
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Provides an assertion that the receiver got a given exception during the test.
- ///
- /// <param name="testProps"> The test configuration properties. </param>
- /// <param name="exceptionClass"> The exception class to check for. <return> An assertion that the receiver got a given exception during the test. </return> </param>
- public Assertion exceptionAssertion(ParsedProperties testProps, Class<? extends Exception> exceptionClass)
- {
- throw new RuntimeException("Not implemented.");
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.*;
-using Apache.Qpid.Integration.Tests.framework.distributedtesting.TestClientControlledTest;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-using uk.co.thebadgerset.junit.extensions.util.TestContextProperties;
-
-using javax.jms.*;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedcircuit
-{
- /// <summary>
- /// A TestClientCircuitEnd is a <see cref="CircuitEnd"/> that may be controlled from a
- /// <see cref="Apache.Qpid.Integration.Tests.framework.distributedtesting.TestClient"/>, and that forms a single publishing or
- /// receiving end point in a distributed test <see cref="Apache.Qpid.Integration.Tests.framework.Circuit"/>.
- ///
- /// <p/>When operating in the SENDER role, this circuit end is capable of acting as part of the default circuit test
- /// procedure (described in the class comment for <see cref="Apache.Qpid.Integration.Tests.framework.Circuit"/>). That is, it will
- /// send the number of test messages required, using the test configuration parameters given in the test invite, and
- /// return a report on its activities to the circuit controller.
- ///
- /// <p/>When operation in the RECEIVER role, this circuit end acts as part of the default circuit test procedure. It will
- /// receive test messages, on the setup specified in the test configuration parameters, and keep count of the messages
- /// received, and time taken to receive them. When requested by the circuit controller to provide a report, it will
- /// return this report of its activities.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide a message producer for sending messages.
- /// <td> <see cref="CircuitEnd"/>, <see cref="LocalCircuitFactory"/>, <see cref="TestUtils"/>
- /// <tr><td> Provide a message consumer for receiving messages.
- /// <td> <see cref="CircuitEnd"/>, <see cref="LocalCircuitFactory"/>, <see cref="TestUtils"/>
- /// <tr><td> Supply the name of the test case that this implements.
- /// <tr><td> Accept/Reject invites based on test parameters. <td> <see cref="MessagingTestConfigProperties"/>
- /// <tr><td> Adapt to assigned roles. <td> <see cref="TestClientControlledTest.Roles"/>
- /// <tr><td> Perform test case actions. <td> <see cref="MessageMonitor"/>
- /// <tr><td> Generate test reports. <td> <see cref="MessageMonitor"/>
- /// </table>
- /// </summary>
- public class TestClientCircuitEnd : CircuitEnd, TestClientControlledTest
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(TestClientCircuitEnd));
-
- /// <summary> Holds the test parameters. </summary>
- ParsedProperties testProps;
-
- /// <summary> The number of test messages to send. </summary>
- private int numMessages;
-
- /// <summary> The role to be played by the test. </summary>
- private Roles role;
-
- /// <summary> The connection to send the test messages on. </summary>
- private Connection connection;
-
- /// <summary> Holds the circuit end for this test. </summary>
- CircuitEnd circuitEnd;
-
- /// <summary>
- /// Holds a message monitor for this circuit end, either the monitor on the consumer when in RECEIVER more, or
- /// a monitor updated on every message sent, when acting as a SENDER.
- MessageMonitor messageMonitor;
-
- /// <summary>
- /// Should provide the name of the test case that this class implements. The exact names are defined in the
- /// interop testing spec.
- /// </summary>
- /// <return> The name of the test case that this implements. </return>
- public string getName()
- {
- return "DEFAULT_CIRCUIT_TEST";
- }
-
- /// <summary>
- /// Determines whether the test invite that matched this test case is acceptable.
- /// </summary>
- /// <param name="inviteMessage"> The invitation to accept or reject. </param>
- /// <return> <tt>true</tt> to accept the invitation, <tt>false</tt> to reject it. </return>
- /// </summary>
- /// <exception cref="JMSException"> Any JMSException resulting from reading the message are allowed to fall through. </exception>
- public bool acceptInvite(Message inviteMessage) throws JMSException
- {
- log.debug("public bool acceptInvite(Message inviteMessage): called");
-
- // Populate the test parameters from the invitation.
- testProps = TestContextProperties.getInstance(MessagingTestConfigProperties.defaults);
-
- for (Object key : testProps.keySet())
- {
- string propName = (String) key;
-
- // If the test parameters is overridden by the invitation, use it instead.
- string inviteValue = inviteMessage.getStringProperty(propName);
-
- if (inviteValue != null)
- {
- testProps.setProperty(propName, inviteValue);
- log.debug("Test invite supplied override to " + propName + " of " + inviteValue);
- }
-
- }
-
- // Accept the invitation.
- return true;
- }
-
- /// <summary>
- /// Assigns the role to be played by this test case. The test parameters are fully specified in the
- /// assignment message. When this method return the test case will be ready to execute.
- /// </summary>
- /// <param name="role"> The role to be played; sender or receivers. </param>
- /// <param name="assignRoleMessage"> The role assingment message, contains the full test parameters. </param>
- ///
- /// <exception cref="JMSException"> Any JMSException resulting from reading the message are allowed to fall through. </exception>
- public void assignRole(Roles role, Message assignRoleMessage) throws JMSException
- {
- log.debug("public void assignRole(Roles role, Message assignRoleMessage): called");
-
- // Take note of the role to be played.
- this.role = role;
-
- // Extract and retain the test parameters.
- numMessages = 1; // assignRoleMessage.getIntProperty("NUM_MESSAGES");
-
- // Connect using the test parameters.
- connection = TestUtils.createConnection(testProps);
-
- // Create a circuit end that matches the assigned role and test parameters.
- LocalCircuitFactory circuitFactory = new LocalCircuitFactory();
-
- switch (role)
- {
- // Check if the sender role is being assigned, and set up a message producer if so.
- case SENDER:
-
- // Set up the publisher.
- circuitEnd = circuitFactory.createPublisherCircuitEnd(connection, testProps, 0L);
-
- // Create a custom message monitor that will be updated on every message sent.
- messageMonitor = new MessageMonitor();
-
- break;
-
- // Otherwise the receivers role is being assigned, so set this up to listen for messages.
- case RECEIVER:
-
- // Set up the receiver.
- circuitEnd = circuitFactory.createReceiverCircuitEnd(connection, testProps, 0L);
-
- // Use the message monitor from the consumer for stats.
- messageMonitor = getMessageMonitor();
-
- break;
- }
-
- // Reset all messaging stats for the report.
- messageMonitor.reset();
-
- connection.start();
- }
-
- /// <summary>
- /// Performs the test case actions. Returning from here, indicates that the sending role has completed its test.
- /// </summary>
- /// <param name="numMessages"> The number of test messages to send. </param>
- ///
- /// <exception cref="JMSException"> Any JMSException resulting from reading the message are allowed to fall through. </exception>
- ///
- /// <remarks> Add round robin on destinations where multiple destinations being used.</remarks>
- ///
- /// <remarks> Add rate limiting when rate limit specified on publishers.</remarks>
- ///
- /// <remarks> Add Max pending message size protection. The receiver will have to send back some acks once in a while,
- /// to notify the publisher that its messages are being consumed. This makes the safety valve harder to
- /// implement than in the single VM case. For example, if the limit is 1000 messages, might want to get back
- /// an ack every 500, to notify the publisher that it can keep sending. What about pub/sub tests? Will it be
- /// necessary to wait for an ack from every receiver? This will have the effect of rate limiting to slow
- /// consumers too.</remarks>
- ///
- /// <remarks> Add commits on every commit batch size boundary.</remarks>
- public void start(int numMessages) throws JMSException
- {
- log.debug("public void start(): called");
-
- // If in the SENDER role, send the specified number of test messages to the circuit destinations.
- if (role.equals(Roles.SENDER))
- {
- Message testMessage = getSession().createMessage();
-
- for (int i = 0; i < numMessages; i++)
- {
- getProducer().send(testMessage);
-
- // Increment the message count and timings.
- messageMonitor.onMessage(testMessage);
- }
- }
- }
-
- /// <summary>
- /// Gets a report on the actions performed by the test case in its assigned role.
- /// </summary>
- /// <param name="session"> The controlSession to create the report message in. </param>
- /// <return> The report message. </return>
- ///
- /// <exception cref="JMSException"> Any JMSExceptions resulting from creating the report are allowed to fall through. </exception>
- public Message getReport(Session session) throws JMSException
- {
- Message report = session.createMessage();
- report.setStringProperty("CONTROL_TYPE", "REPORT");
-
- // Add the count of messages sent/received to the report.
- report.setIntProperty("MESSAGE_COUNT", messageMonitor.getNumMessage());
-
- // Add the time to send/receive messages to the report.
- report.setLongProperty("TEST_TIME", messageMonitor.getTime());
-
- // Add any exceptions detected to the report.
-
- return report;
- }
-
- /// <summary>
- /// Gets the message producer at this circuit end point.
- /// </summary>
- /// <return> The message producer at with this circuit end point. </return>
- public MessageProducer getProducer()
- {
- return circuitEnd.getProducer();
- }
-
- /// <summary>
- /// Gets the message consumer at this circuit end point.
- /// </summary>
- /// <return> The message consumer at this circuit end point. </return>
- public MessageConsumer getConsumer()
- {
- return circuitEnd.getConsumer();
- }
-
- /// <summary>
- /// Send the specified message over the producer at this end point.
- /// </summary>
- /// <param name="message"> The message to send. </param>
- ///
- /// <exception cref="JMSException"> Any JMS exception occuring during the send is allowed to fall through. </exception>
- public void send(Message message) throws JMSException
- {
- // Send the message on the circuit ends producer.
- circuitEnd.send(message);
- }
-
- /// <summary>
- /// Gets the JMS Session associated with this circuit end point.
- /// </summary>
- /// <return> The JMS Session associated with this circuit end point. </return>
- public Session getSession()
- {
- return circuitEnd.getSession();
- }
-
- /// <summary>
- /// Closes the message producers and consumers and the sessions, associated with this circuit end point.
- ///
- /// <exception cref="JMSException"> Any JMSExceptions occurring during the close are allowed to fall through. </exception>
- public void close() throws JMSException
- {
- // Close the producer and consumer.
- circuitEnd.close();
- }
-
- /// <summary>
- /// Returns the message monitor for reporting on received messages on this circuit end.
- /// </summary>
- /// <return> The message monitor for this circuit end. </return>
- public MessageMonitor getMessageMonitor()
- {
- return circuitEnd.getMessageMonitor();
- }
-
- /// <summary>
- /// Returns the exception monitor for reporting on exceptions received on this circuit end.
- /// </summary>
- /// <return> The exception monitor for this circuit end. </return>
- public ExceptionMonitor getExceptionMonitor()
- {
- return circuitEnd.getExceptionMonitor();
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using junit.framework.Test;
-using junit.framework.TestResult;
-using junit.framework.TestSuite;
-
-using log4net;
-using org.apache.log4j.NDC;
-
-using Apache.Qpid.Integration.Tests.framework.FrameworkBaseCase;
-using Apache.Qpid.Integration.Tests.framework.MessagingTestConfigProperties;
-using Apache.Qpid.Integration.Tests.framework.TestClientDetails;
-using Apache.Qpid.Integration.Tests.framework.TestUtils;
-using Apache.Qpid.Integration.Tests.framework.clocksynch.UDPClockReference;
-using org.apache.qpid.util.ConversationFactory;
-
-using uk.co.thebadgerset.junit.extensions.TKTestRunner;
-using uk.co.thebadgerset.junit.extensions.WrappedSuiteTestDecorator;
-using uk.co.thebadgerset.junit.extensions.util.CommandLineParser;
-using uk.co.thebadgerset.junit.extensions.util.MathUtils;
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-using uk.co.thebadgerset.junit.extensions.util.TestContextProperties;
-
-using javax.jms.*;
-
-using java.net.InetAddress;
-using java.util.*;
-using java.util.concurrent.LinkedBlockingQueue;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedtesting
-{
- /// <summary>
- /// <p/>Implements the coordinator client described in the interop testing specification
- /// (http://cwiki.apache.org/confluence/display/qpid/Interop+Testing+Specification). This coordinator is built on
- /// top of the JUnit testing framework.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Find out what test clients are available. <td> <see cref="ConversationFactory"/>
- /// <tr><td> Decorate available tests to run on all available clients. <td> <see cref="DistributedTestDecorator"/>
- /// <tr><td> Attach XML test result logger.
- /// <tr><td> Terminate the interop testing framework.
- /// </table>
- /// </summary>
- ///
- /// <remarks> Should accumulate failures over all tests, and return with success or fail code based on all results. May need
- /// to write a special TestResult to do this properly. At the moment only the last one used will be tested for
- /// errors, as the start method creates a fresh one for each test case run.</remarks>
- public class Coordinator extends TKTestRunner
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(Coordinator));
-
- /// <summary> Used for reporting to the console. </summary>
- private static ILog console = LogManager.GetLogger("CONSOLE");
-
- /// <summary> Defines the possible distributed test engines available to run coordinated test cases with. </summary>
- public enum TestEngine
- {
- /// <summary> Specifies the interop test engine. This tests all available clients in pairs. </summary>
- INTEROP,
-
- /// <summary> Specifies the fanout test engine. This sets up one publisher role, and many reciever roles. </summary>
- FANOUT
- }
-
- /// <summary>
- /// Holds the test context properties that provides the default test parameters, plus command line overrides.
- /// This is initialized with the default test parameters, to which command line overrides may be applied.
- protected static ParsedProperties testContextProperties =
- TestContextProperties.getInstance(MessagingTestConfigProperties.defaults);
-
- /// <summary> Holds the URL of the broker to coordinate the tests on. </summary>
- protected string brokerUrl;
-
- /// <summary> Holds the virtual host to coordinate the tests on. If <tt>null</tt>, then the default virtual host is used. </summary>
- protected string virtualHost;
-
- /// <summary> Holds the list of all clients that enlisted, when the compulsory invite was issued. </summary>
- protected Set<TestClientDetails> enlistedClients = new HashSet<TestClientDetails>();
-
- /// <summary> Holds the conversation helper for the control conversation. </summary>
- protected ConversationFactory conversationFactory;
-
- /// <summary> Holds the connection that the coordinating messages are sent over. </summary>
- protected Connection connection;
-
- /// <summary> Holds the path of the directory to output test results too, if one is defined. </summary>
- protected string reportDir;
-
- /// <summary> Holds the coordinating test engine type to run the tests through. </summary>
- protected TestEngine engine;
-
- /// <summary> Flag that indicates that all test clients should be terminated upon completion of the test cases. </summary>
- protected bool terminate;
-
- /// <summary>
- /// Creates an interop test coordinator on the specified broker and virtual host.
- /// </summary>
- /// <param name="repetitions"> The number of times to repeat the test, or test batch size. </param>
- /// <param name="duration"> The length of time to run the tests for. -1 means no duration has been set. </param>
- /// <param name="threads"> The concurrency levels to ramp up to. </param>
- /// <param name="delay"> A delay in milliseconds between test runs. </param>
- /// <param name="params"> The sets of 'size' parameters to pass to test. </param>
- /// <param name="testCaseName"> The name of the test case to run. </param>
- /// <param name="reportDir"> The directory to output the test results to. </param>
- /// <param name="runName"> The name of the test run; used to name the output file. </param>
- /// <param name="verbose"> Whether to print comments during test run. </param>
- /// <param name="brokerUrl"> The URL of the broker to connect to. </param>
- /// <param name="virtualHost"> The virtual host to run all tests on. Optional, may be <tt>null</tt>. </param>
- /// <param name="engine"> The distributed test engine type to run the tests with. </param>
- /// <param name="terminate"> <tt>true</tt> if test client nodes should be terminated at the end of the tests. </param>
- /// <param name="csv"> <tt>true</tt> if the CSV results listener should be attached. </param>
- /// <param name="xml"> <tt>true</tt> if the XML results listener should be attached. </param>
- /// <param name="decoratorFactories"> List of factories for user specified decorators. </param>
- public Coordinator(Integer repetitions, Long duration, int[] threads, int delay, int[] params, string testCaseName,
- string reportDir, string runName, bool verbose, string brokerUrl, string virtualHost, TestEngine engine,
- bool terminate, bool csv, bool xml, IList<TestDecoratorFactory> decoratorFactories)
- {
- super(repetitions, duration, threads, delay, params, testCaseName, reportDir, runName, csv, xml, verbose,
- decoratorFactories);
-
- log.debug("public Coordinator(Integer repetitions = " + repetitions + " , Long duration = " + duration
- + ", int[] threads = " + Arrays.ToString(threads) + ", int delay = " + delay + ", int[] params = "
- + Arrays.ToString(params) + ", string testCaseName = " + testCaseName + ", string reportDir = " + reportDir
- + ", string runName = " + runName + ", bool verbose = " + verbose + ", string brokerUrl = " + brokerUrl
- + ", string virtualHost =" + virtualHost + ", TestEngine engine = " + engine + ", bool terminate = "
- + terminate + ", bool csv = " + csv + ", bool xml = " + xml + "): called");
-
- // Retain the connection parameters.
- this.brokerUrl = brokerUrl;
- this.virtualHost = virtualHost;
- this.reportDir = reportDir;
- this.engine = engine;
- this.terminate = terminate;
- }
-
- /// <summary>
- /// The entry point for the interop test coordinator. This client accepts the following command line arguments:
- ///
- /// <p/><table>
- /// <tr><td> -b <td> The broker URL. <td> Mandatory.
- /// <tr><td> -h <td> The virtual host. <td> Optional.
- /// <tr><td> -o <td> The directory to output test results to. <td> Optional.
- /// <tr><td> -e <td> The type of test distribution engine to use. <td> Optional. One of: interop, fanout.
- /// <tr><td> ... <td> Free arguments. The distributed test cases to run.
- /// <td> Mandatory. At least one must be defined.
- /// <tr><td> name=value <td> Trailing argument define name/value pairs. Added to the test contenxt properties.
- /// <td> Optional.
- /// </table>
- /// </summary>
- /// <param name="args"> The command line arguments. </param>
- public static void main(String[] args)
- {
- NDC.push("coordinator");
- log.debug("public static void main(String[] args = " + Arrays.ToString(args) + "): called");
- console.info("Qpid Distributed Test Coordinator.");
-
- // Override the default broker url to be localhost:5672.
- testContextProperties.setProperty(MessagingTestConfigProperties.BROKER_PROPNAME, "tcp://localhost:5672");
-
- try
- {
- // Use the command line parser to evaluate the command line with standard handling behaviour (print errors
- // and usage then exist if there are errors).
- // Any options and trailing name=value pairs are also injected into the test context properties object,
- // to override any defaults that may have been set up.
- ParsedProperties options =
- new ParsedProperties(CommandLineParser.processCommandLine(args,
- new CommandLineParser(
- new String[][]
- {
- { "b", "The broker URL.", "broker", "false" },
- { "h", "The virtual host to use.", "virtual host", "false" },
- { "o", "The name of the directory to output test timings to.", "dir", "false" },
- {
- "e", "The test execution engine to use. Default is interop.", "engine", "interop",
- "^interop$|^fanout$", "true"
- },
- { "t", "Terminate test clients on completion of tests.", null, "false" },
- { "-csv", "Output test results in CSV format.", null, "false" },
- { "-xml", "Output test results in XML format.", null, "false" },
- {
- "-trefaddr", "To specify an alternative to hostname for time singal reference.",
- "address", "false"
- },
- {
- "c", "The number of tests to run concurrently.", "num", "false",
- MathUtils.SEQUENCE_REGEXP
- },
- { "r", "The number of times to repeat each test.", "num", "false" },
- {
- "d", "The length of time to run the tests for.", "duration", "false",
- MathUtils.DURATION_REGEXP
- },
- {
- "f", "The maximum rate to call the tests at.", "frequency", "false",
- "^([1-9][0-9]*)/([1-9][0-9]*)$"
- },
- { "s", "The size parameter to run tests with.", "size", "false", MathUtils.SEQUENCE_REGEXP },
- { "v", "Verbose mode.", null, "false" },
- { "n", "A name for this test run, used to name the output file.", "name", "true" },
- {
- "X:decorators", "A list of additional test decorators to wrap the tests in.",
- "\"class.name[:class.name]*\"", "false"
- }
- }), testContextProperties));
-
- // Extract the command line options.
- string brokerUrl = options.getProperty("b");
- string virtualHost = options.getProperty("h");
- string reportDir = options.getProperty("o");
- reportDir = (reportDir == null) ? "." : reportDir;
- string testEngine = options.getProperty("e");
- TestEngine engine = "fanout".equals(testEngine) ? TestEngine.FANOUT : TestEngine.INTEROP;
- bool terminate = options.getPropertyAsBoolean("t");
- bool csvResults = options.getPropertyAsBoolean("-csv");
- bool xmlResults = options.getPropertyAsBoolean("-xml");
- string threadsstring = options.getProperty("c");
- Integer repetitions = options.getPropertyAsInteger("r");
- string durationstring = options.getProperty("d");
- string paramsstring = options.getProperty("s");
- bool verbose = options.getPropertyAsBoolean("v");
- string testRunName = options.getProperty("n");
- string decorators = options.getProperty("X:decorators");
-
- int[] threads = (threadsstring == null) ? null : MathUtils.parseSequence(threadsString);
- int[] params = (paramsstring == null) ? null : MathUtils.parseSequence(paramsString);
- Long duration = (durationstring == null) ? null : MathUtils.parseDuration(durationString);
-
- // If broker or virtual host settings were specified as command line options, override the defaults in the
- // test context properties with them.
-
- // Collection all of the test cases to be run.
- Collection<Class<? extends FrameworkBaseCase>> testCaseClasses =
- new ArrayList<Class<? extends FrameworkBaseCase>>();
-
- // Create a list of test decorator factories for use specified decorators to be applied.
- IList<TestDecoratorFactory> decoratorFactories = parseDecorators(decorators);
-
- // Scan for available test cases using a classpath scanner.
- // ClasspathScanner.getMatches(DistributedTestCase.class, "^Test.*", true);
-
- // Hard code the test classes till the classpath scanner is fixed.
- // Collections.addAll(testCaseClasses, InteropTestCase1DummyRun.class, InteropTestCase2BasicP2P.class,
- // InteropTestCase3BasicPubSub.class);
-
- // Parse all of the free arguments as test cases to run.
- for (int i = 1; true; i++)
- {
- string nextFreeArg = options.getProperty(Integer.ToString(i));
-
- // Terminate the loop once all free arguments have been consumed.
- if (nextFreeArg == null)
- {
- break;
- }
-
- try
- {
- Class nextClass = Class.forName(nextFreeArg);
-
- if (FrameworkBaseCase.class.isAssignableFrom(nextClass))
- {
- testCaseClasses.add(nextClass);
- console.info("Found distributed test case: " + nextFreeArg);
- }
- }
- catch (ClassNotFoundException e)
- {
- console.info("Unable to instantiate the test case: " + nextFreeArg + ".");
- }
- }
-
- // Check that some test classes were actually found.
- if (testCaseClasses.isEmpty())
- {
- throw new RuntimeException(
- "No test cases implementing FrameworkBaseCase were specified on the command line.");
- }
-
- // Extract the names of all the test classes, to pass to the start method.
- int i = 0;
- String[] testClassNames = new String[testCaseClasses.size()];
-
- for (Class testClass : testCaseClasses)
- {
- testClassNames[i++] = testClass.getName();
- }
-
- // Create a coordinator and begin its test procedure.
- Coordinator coordinator =
- new Coordinator(repetitions, duration, threads, 0, params, null, reportDir, testRunName, verbose, brokerUrl,
- virtualHost, engine, terminate, csvResults, xmlResults, decoratorFactories);
-
- TestResult testResult = coordinator.start(testClassNames);
-
- // Return different error codes, depending on whether or not there were test failures.
- if (testResult.failureCount() > 0)
- {
- System.exit(FAILURE_EXIT);
- }
- else
- {
- System.exit(SUCCESS_EXIT);
- }
- }
- catch (Exception e)
- {
- log.debug("Top level handler caught execption.", e);
- console.info(e.getMessage());
- e.printStackTrace();
- System.exit(EXCEPTION_EXIT);
- }
- }
-
- /// <summary>
- /// Starts all of the test classes to be run by this coordinator.
- /// </summary>
- /// <param name="testClassNames"> An array of all the coordinating test case implementations. </param>
- ///
- /// <return> A JUnit TestResult to run the tests with. </return>
- ///
- /// <exception cref="Exception"> Any underlying exceptions are allowed to fall through, and fail the test process. </exception>
- public TestResult start(String[] testClassNames) throws Exception
- {
- log.debug("public TestResult start(String[] testClassNames = " + Arrays.ToString(testClassNames) + ": called");
-
- // Connect to the broker.
- connection = TestUtils.createConnection(TestContextProperties.getInstance());
- Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- Destination controlTopic = session.createTopic("iop.control");
- Destination responseQueue = session.createQueue("coordinator");
-
- conversationFactory = new ConversationFactory(connection, responseQueue, LinkedBlockingQueue.class);
- ConversationFactory.Conversation conversation = conversationFactory.startConversation();
-
- connection.start();
-
- // Broadcast the compulsory invitation to find out what clients are available to test.
- Message invite = session.createMessage();
- invite.setStringProperty("CONTROL_TYPE", "INVITE");
- invite.setJMSReplyTo(responseQueue);
-
- conversation.send(controlTopic, invite);
-
- // Wait for a short time, to give test clients an opportunity to reply to the invitation.
- Collection<Message> enlists = conversation.receiveAll(0, 500);
- enlistedClients = extractEnlists(enlists);
-
- for (TestClientDetails client : enlistedClients)
- {
- log.debug("Got enlisted test client: " + client);
- console.info("Test node " + client.clientName + " available.");
- }
-
- // Start the clock reference service running.
- UDPClockReference clockReference = new UDPClockReference();
- Thread clockRefThread = new Thread(clockReference);
- registerShutdownHook(clockReference);
- clockRefThread.start();
-
- // Broadcast to all clients to synchronize their clocks against the coordinators clock reference.
- Message clockSynchRequest = session.createMessage();
- clockSynchRequest.setStringProperty("CONTROL_TYPE", "CLOCK_SYNCH");
-
- string localAddress = InetAddress.getByName(InetAddress.getLocalHost().getHostName()).getHostAddress();
- clockSynchRequest.setStringProperty("ADDRESS", localAddress);
-
- conversation.send(controlTopic, clockSynchRequest);
-
- // Run the test in the suite using JUnit.
- TestResult result = null;
-
- for (string testClassName : testClassNames)
- {
- // Record the current test class, so that the test results can be output to a file incorporating this name.
- this.currentTestClassName = testClassName;
-
- result = super.start(new String[] { testClassName });
- }
-
- // At this point in time, all tests have completed. Broadcast the shutdown message, if the termination option
- // was set on the command line.
- if (terminate)
- {
- Message terminate = session.createMessage();
- terminate.setStringProperty("CONTROL_TYPE", "TERMINATE");
-
- conversation.send(controlTopic, terminate);
- }
-
- return result;
- }
-
- /// <summary>
- /// For a collection of enlist messages, this method pulls out of the client details for the enlisting clients.
- /// </summary>
- /// <param name="enlists"> The enlist messages. </param>
- ///
- /// <return> A set of enlisting clients, extracted from the enlist messages. </return>
- ///
- /// <exception cref="JMSException"> Any underlying JMSException is allowed to fall through. </exception>
- public static Set<TestClientDetails> extractEnlists(Collection<Message> enlists) throws JMSException
- {
- log.debug("public static Set<TestClientDetails> extractEnlists(Collection<Message> enlists = " + enlists
- + "): called");
-
- Set<TestClientDetails> enlistedClients = new HashSet<TestClientDetails>();
-
- // Retain the list of all available clients.
- for (Message enlist : enlists)
- {
- TestClientDetails clientDetails = new TestClientDetails();
- clientDetails.clientName = enlist.getStringProperty("CLIENT_NAME");
- clientDetails.privateControlKey = enlist.getStringProperty("CLIENT_PRIVATE_CONTROL_KEY");
-
- string replyType = enlist.getStringProperty("CONTROL_TYPE");
-
- if ("ENLIST".equals(replyType))
- {
- enlistedClients.add(clientDetails);
- }
- else if ("DECLINE".equals(replyType))
- {
- log.debug("Test client " + clientDetails.clientName + " declined the invite.");
- }
- else
- {
- log.warn("Got an unknown reply type, " + replyType + ", to the invite.");
- }
- }
-
- return enlistedClients;
- }
-
- /// <summary>
- /// Runs a test or suite of tests, using the super class implemenation. This method wraps the test to be run
- /// in any test decorators needed to add in the coordinators ability to invite test clients to participate in
- /// tests.
- /// </summary>
- /// <param name="test"> The test to run. </param>
- /// <param name="wait"> Undocumented. Nothing in the JUnit javadocs to say what this is for. </param>
- ///
- /// <return> The results of the test run. </return>
- public TestResult doRun(Test test, bool wait)
- {
- log.debug("public TestResult doRun(Test \"" + test + "\", bool " + wait + "): called");
-
- // Wrap all tests in the test suite with WrappedSuiteTestDecorators. This is quite ugly and a bit baffling,
- // but the reason it is done is because the JUnit implementation of TestDecorator has some bugs in it.
- WrappedSuiteTestDecorator targetTest = null;
-
- if (test instanceof TestSuite)
- {
- log.debug("targetTest is a TestSuite");
-
- TestSuite suite = (TestSuite) test;
-
- int numTests = suite.countTestCases();
- log.debug("There are " + numTests + " in the suite.");
-
- for (int i = 0; i < numTests; i++)
- {
- Test nextTest = suite.testAt(i);
- log.debug("suite.testAt(" + i + ") = " + nextTest);
-
- if (nextTest instanceof FrameworkBaseCase)
- {
- log.debug("nextTest is a FrameworkBaseCase");
- }
- }
-
- targetTest = new WrappedSuiteTestDecorator(suite);
- log.debug("Wrapped with a WrappedSuiteTestDecorator.");
- }
-
- // Apply any optional user specified decorators.
- targetTest = applyOptionalUserDecorators(targetTest);
-
- // Wrap the tests in a suitable distributed test decorator, to perform the invite/test cycle.
- targetTest = newTestDecorator(targetTest, enlistedClients, conversationFactory, connection);
-
- // TestSuite suite = new TestSuite();
- // suite.addTest(targetTest);
-
- // Wrap the tests in a scaled test decorator to them them as a 'batch' in one thread.
- // targetTest = new ScaledTestDecorator(targetTest, new int[] { 1 });
-
- return super.doRun(targetTest, wait);
- }
-
- /// <summary>
- /// Creates a wrapped test decorator, that is capable of inviting enlisted clients to participate in a specified
- /// test. This is the test engine that sets up the roles and sequences a distributed test case.
- /// </summary>
- /// <param name="targetTest"> The test decorator to wrap. </param>
- /// <param name="enlistedClients"> The enlisted clients available to run the test. </param>
- /// <param name="conversationFactory"> The conversation factory used to build conversation helper over the specified connection. </param>
- /// <param name="connection"> The connection to talk to the enlisted clients over. </param>
- ///
- /// <return> An invititing test decorator, that invites all the enlisted clients to participate in tests, in pairs. </return>
- protected DistributedTestDecorator newTestDecorator(WrappedSuiteTestDecorator targetTest,
- Set<TestClientDetails> enlistedClients, ConversationFactory conversationFactory, Connection connection)
- {
- switch (engine)
- {
- case FANOUT:
- return new FanOutTestDecorator(targetTest, enlistedClients, conversationFactory, connection);
- case INTEROP:
- default:
- return new InteropTestDecorator(targetTest, enlistedClients, conversationFactory, connection);
- }
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using junit.framework.TestResult;
-
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.FrameworkBaseCase;
-using Apache.Qpid.Integration.Tests.framework.TestClientDetails;
-using Apache.Qpid.Integration.Tests.framework.sequencers.CircuitFactory;
-using org.apache.qpid.util.ConversationFactory;
-
-using uk.co.thebadgerset.junit.extensions.WrappedSuiteTestDecorator;
-
-using javax.jms.Connection;
-using javax.jms.Destination;
-using javax.jms.JMSException;
-using javax.jms.Message;
-
-using java.util.*;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedtesting
-{
- /// <summary>
- /// DistributedTestDecorator is a base class for writing test decorators that invite test clients to participate in
- /// distributed test cases. It provides a helper method, <see cref="#signupClients"/>, that broadcasts an invitation and
- /// returns the set of test clients that are available to particiapte in the test.
- ///
- /// <p/>When used to wrap a <see cref="FrameworkBaseCase"/> test, it replaces the default <see cref="CircuitFactory"/> implementations
- /// with a suitable circuit factory for distributed tests. Concrete implementations can use this to configure the sending
- /// and receiving roles on the test.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Broadcast test invitations and collect enlists. <td> <see cref="ConversationFactory"/>.
- /// </table>
- /// </summary>
- public abstract class DistributedTestDecorator extends WrappedSuiteTestDecorator
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(DistributedTestDecorator));
-
- /// <summary> Holds the contact information for all test clients that are available and that may take part in the test. </summary>
- Set<TestClientDetails> allClients;
-
- /// <summary> Holds the conversation helper for the control level conversation for coordinating the test through. </summary>
- ConversationFactory conversationFactory;
-
- /// <summary> Holds the connection that the control conversation is held over. </summary>
- Connection connection;
-
- /// <summary> Holds the underlying test suite that this decorator wraps. </summary>
- WrappedSuiteTestDecorator testSuite;
-
- /// <summary> Holds the control topic, on which test invitations are broadcast. </summary>
- protected Destination controlTopic;
-
- /// <summary>
- /// Creates a wrapped suite test decorator from another one.
- /// </summary>
- /// <param name="suite"> The test suite. </param>
- /// <param name="availableClients"> The list of all clients that responded to the compulsory invite. </param>
- /// <param name="controlConversation"> The conversation helper for the control level, test coordination conversation. </param>
- /// <param name="controlConnection"> The connection that the coordination messages are sent over. </param>
- public DistributedTestDecorator(WrappedSuiteTestDecorator suite, Set<TestClientDetails> availableClients,
- ConversationFactory controlConversation, Connection controlConnection)
- {
- super(suite);
-
- log.debug("public DistributedTestDecorator(WrappedSuiteTestDecorator suite, Set<TestClientDetails> allClients = "
- + availableClients + ", ConversationHelper controlConversation = " + controlConversation + "): called");
-
- testSuite = suite;
- allClients = availableClients;
- conversationFactory = controlConversation;
- connection = controlConnection;
-
- // Set up the test control topic.
- try
- {
- controlTopic = conversationFactory.getSession().createTopic("iop.control");
- }
- catch (JMSException e)
- {
- throw new RuntimeException("Unable to create the coordinating control topic to broadcast test invites on.", e);
- }
- }
-
- /// <summary>
- /// Should run all of the tests in the wrapped test suite.
- /// </summary>
- /// <param name="testResult"> The the results object to monitor the test results with. </param>
- public abstract void run(TestResult testResult);
-
- /// <summary>
- /// Should provide the distributed test sequencer to pass to <see cref="Apache.Qpid.Integration.Tests.framework.FrameworkBaseCase"/>
- /// tests.
- /// </summary>
- /// <return> A distributed test sequencer. </return>
- public abstract CircuitFactory getTestSequencer();
-
- /// <summary>
- /// Broadcasts an invitation to participate in a coordinating test case to find out what clients are available to
- /// run the test case.
- /// </summary>
- /// <param name="coordTest"> The coordinating test case to broadcast an inviate for. </param>
- ///
- /// <return> A set of test clients that accepted the invitation. </return>
- protected Set<TestClientDetails> signupClients(FrameworkBaseCase coordTest)
- {
- // Broadcast the invitation to find out what clients are available to test.
- Set<TestClientDetails> enlists;
- try
- {
- Message invite = conversationFactory.getSession().createMessage();
-
- ConversationFactory.Conversation conversation = conversationFactory.startConversation();
-
- invite.setStringProperty("CONTROL_TYPE", "INVITE");
- invite.setStringProperty("TEST_NAME", coordTest.getTestCaseNameForTestMethod(coordTest.getName()));
-
- conversation.send(controlTopic, invite);
-
- // Wait for a short time, to give test clients an opportunity to reply to the invitation.
- Collection<Message> replies = conversation.receiveAll(allClients.size(), 500);
- enlists = Coordinator.extractEnlists(replies);
- }
- catch (JMSException e)
- {
- throw new RuntimeException("There was a JMSException during the invite/enlist conversation.", e);
- }
-
- return enlists;
- }
-
- /// <summary>
- /// Prints a string summarizing this test decorator, mainly for debugging purposes.
- /// </summary>
- /// <return> string representation for debugging purposes. </return>
- public string ToString()
- {
- return "DistributedTestDecorator: [ testSuite = " + testSuite + " ]";
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using junit.framework.Test;
-using junit.framework.TestResult;
-
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.DropInTest;
-using Apache.Qpid.Integration.Tests.framework.FrameworkBaseCase;
-using Apache.Qpid.Integration.Tests.framework.TestClientDetails;
-using Apache.Qpid.Integration.Tests.framework.sequencers.CircuitFactory;
-using Apache.Qpid.Integration.Tests.framework.sequencers.FanOutCircuitFactory;
-using org.apache.qpid.util.ConversationFactory;
-
-using uk.co.thebadgerset.junit.extensions.WrappedSuiteTestDecorator;
-
-using javax.jms.Connection;
-using javax.jms.JMSException;
-using javax.jms.Message;
-using javax.jms.MessageListener;
-
-using System.Collections.Generic.Collection;
-using java.util.Iterator;
-using java.util.Set;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedtesting
-{
- /// <summary>
- /// FanOutTestDecorator is an <see cref="DistributedTestDecorator"/> that runs one test client in the sender role, and the remainder
- /// in the receivers role. It also has the capability to listen for new test cases joining the test beyond the initial start
- /// point. This feature can be usefull when experimenting with adding more load, in the form of more test clients, to assess
- /// its impact on a running test.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Execute coordinated test cases. <td> <see cref="FrameworkBaseCase"/>
- /// <tr><td> Accept test clients joining a running test.
- /// </table>
- /// </summary>
- public class FanOutTestDecorator extends DistributedTestDecorator : MessageListener
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(FanOutTestDecorator));
-
- /// <summary> Holds the currently running test case. </summary>
- FrameworkBaseCase currentTest = null;
-
- /// <summary>
- /// Creates a wrapped suite test decorator from another one.
- /// </summary>
- /// <param name="suite"> The test suite. </param>
- /// <param name="availableClients"> The list of all clients that responded to the compulsory invite. </param>
- /// <param name="controlConversation"> The conversation helper for the control level, test coordination conversation. </param>
- /// <param name="controlConnection"> The connection that the coordination messages are sent over. </param>
- public FanOutTestDecorator(WrappedSuiteTestDecorator suite, Set<TestClientDetails> availableClients,
- ConversationFactory controlConversation, Connection controlConnection)
- {
- super(suite, availableClients, controlConversation, controlConnection);
-
- log.debug("public DistributedTestDecorator(WrappedSuiteTestDecorator suite, Set<TestClientDetails> allClients = "
- + availableClients + ", ConversationHelper controlConversation = " + controlConversation + "): called");
-
- testSuite = suite;
- allClients = availableClients;
- conversationFactory = controlConversation;
- connection = controlConnection;
-
- // Sign available clients up to the test.
- for (Test test : getAllUnderlyingTests())
- {
- FrameworkBaseCase coordTest = (FrameworkBaseCase) test;
-
- // Get all of the clients able to participate in the test.
- Set<TestClientDetails> enlists = signupClients(coordTest);
-
- // Check that there were some clients available.
- if (enlists.size() == 0)
- {
- throw new RuntimeException("No clients to test with");
- }
-
- // Create a distributed test circuit factory for the test.
- CircuitFactory circuitFactory = getTestSequencer();
-
- // Set up the first client in the sender role, and the remainder in the receivers role.
- Iterator<TestClientDetails> clients = enlists.iterator();
- circuitFactory.setSender(clients.next());
-
- while (clients.hasNext())
- {
- // Set the sending and receiving client details on the test case.
- circuitFactory.setReceiver(clients.next());
- }
-
- // Pass down the connection to hold the coordinating conversation over.
- circuitFactory.setConversationFactory(conversationFactory);
-
- // If the current test case is a drop-in test, set it up as the currently running test for late joiners to
- // add in to. Otherwise the current test field is set to null, to indicate that late joiners are not allowed.
- currentTest = (coordTest instanceof DropInTest) ? coordTest : null;
-
- // Execute the test case.
- coordTest.setCircuitFactory(circuitFactory);
- }
- }
-
- /// <summary>
- /// Broadcasts a test invitation and accepts enlists from participating clients. The wrapped test cases are run
- /// with one test client in the sender role, and the remaining test clients in the receiving role.
- ///
- /// <p/>Any JMSExceptions during the invite/enlist conversation will be allowed to fall through as runtime
- /// exceptions, resulting in the non-completion of the test run.
- /// </summary>
- /// <param name="testResult"> The the results object to monitor the test results with. </param>
- ///
- /// <remarks> Better error recovery for failure of the invite/enlist conversation could be added.</remarks>
- public void run(TestResult testResult)
- {
- log.debug("public void run(TestResult testResult): called");
-
- // Listen for late joiners on the control topic.
- try
- {
- conversationFactory.getSession().createConsumer(controlTopic).setMessageListener(this);
- }
- catch (JMSException e)
- {
- throw new RuntimeException("Unable to set up the message listener on the control topic.", e);
- }
-
- // Run all of the test cases in the test suite.
- /*for (Test test : getAllUnderlyingTests())
- {
- FrameworkBaseCase coordTest = (FrameworkBaseCase) test;
-
- // Get all of the clients able to participate in the test.
- Set<TestClientDetails> enlists = signupClients(coordTest);
-
- // Check that there were some clients available.
- if (enlists.size() == 0)
- {
- throw new RuntimeException("No clients to test with");
- }
-
- // Create a distributed test circuit factory for the test.
- CircuitFactory circuitFactory = getTestSequencer();
-
- // Set up the first client in the sender role, and the remainder in the receivers role.
- Iterator<TestClientDetails> clients = enlists.iterator();
- circuitFactory.setSender(clients.next());
-
- while (clients.hasNext())
- {
- // Set the sending and receiving client details on the test case.
- circuitFactory.setReceiver(clients.next());
- }
-
- // Pass down the connection to hold the coordinating conversation over.
- circuitFactory.setConversationFactory(conversationFactory);
-
- // If the current test case is a drop-in test, set it up as the currently running test for late joiners to
- // add in to. Otherwise the current test field is set to null, to indicate that late joiners are not allowed.
- currentTest = (coordTest instanceof DropInTest) ? coordTest : null;
-
- // Execute the test case.
- coordTest.setCircuitFactory(circuitFactory);
- }*/
-
- // Run all of the test cases in the test suite.
- for (Test test : getAllUnderlyingTests())
- {
- FrameworkBaseCase coordTest = (FrameworkBaseCase) test;
-
- coordTest.run(testResult);
-
- currentTest = null;
- }
- }
-
- /// <summary>
- /// Should provide the distributed test sequencer to pass to <see cref="Apache.Qpid.Integration.Tests.framework.FrameworkBaseCase"/>
- /// tests.
- /// </summary>
- /// <return> A distributed test sequencer. </return>
- public CircuitFactory getTestSequencer()
- {
- return new FanOutCircuitFactory();
- }
-
- /// <summary>
- /// Listens to incoming messages on the control topic. If the messages are 'join' messages, signalling a new
- /// test client wishing to join the current test, then the new client will be added to the current test in the
- /// receivers role.
- /// </summary>
- /// <param name="message"> The incoming control message. </param>
- public void onMessage(Message message)
- {
- try
- {
- // Check if the message is from a test client attempting to join a running test, and join it to the current
- // test case if so.
- if (message.getStringProperty("CONTROL_TYPE").equals("JOIN") && (currentTest != null))
- {
- ((DropInTest) currentTest).lateJoin(message);
- }
- }
- // There is not a lot can be done with this error, so it is deliberately ignored.
- catch (JMSException e)
- {
- log.debug("Unable to process message:" + message);
- }
- }
-
- /// <summary>
- /// Prints a string summarizing this test decorator, mainly for debugging purposes.
- /// </summary>
- /// <return> string representation for debugging purposes. </return>
- public string ToString()
- {
- return "FanOutTestDecorator: [ testSuite = " + testSuite + " ]";
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using junit.framework.Test;
-using junit.framework.TestResult;
-
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.FrameworkBaseCase;
-using Apache.Qpid.Integration.Tests.framework.TestClientDetails;
-using Apache.Qpid.Integration.Tests.framework.sequencers.CircuitFactory;
-using Apache.Qpid.Integration.Tests.framework.sequencers.InteropCircuitFactory;
-using org.apache.qpid.util.ConversationFactory;
-
-using uk.co.thebadgerset.junit.extensions.WrappedSuiteTestDecorator;
-
-using javax.jms.Connection;
-
-using java.util.*;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedtesting
-{
- /// <summary>
- /// DistributedTestDecorator is a test decorator, written to implement the interop test specification. Given a list
- /// of enlisted test clients, that are available to run interop tests, this decorator invites them to participate
- /// in each test in the wrapped test suite. Amongst all the clients that respond to the invite, all pairs are formed,
- /// and each pairing (in both directions, but excluding the reflexive pairings) is split into a sender and receivers
- /// role and a test case run between them. Any enlisted combinations that do not accept a test invite are automatically
- /// failed.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Broadcast test invitations and collect enlists. <td> <see cref="org.apache.qpid.util.ConversationFactory"/>.
- /// <tr><td> Output test failures for clients unwilling to run the test case. <td> <see cref="Coordinator"/>
- /// <tr><td> Execute distributed test cases. <td> <see cref="FrameworkBaseCase"/>
- /// <tr><td> Fail non-participating pairings. <td> <see cref="OptOutTestCase"/>
- /// </table>
- /// </summary>
- public class InteropTestDecorator extends DistributedTestDecorator
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(InteropTestDecorator));
-
- /// <summary>
- /// Creates a wrapped suite test decorator from another one.
- /// </summary>
- /// <param name="suite"> The test suite. </param>
- /// <param name="availableClients"> The list of all clients that responded to the compulsory invite. </param>
- /// <param name="controlConversation"> The conversation helper for the control level, test coordination conversation. </param>
- /// <param name="controlConnection"> The connection that the coordination messages are sent over. </param>
- public InteropTestDecorator(WrappedSuiteTestDecorator suite, Set<TestClientDetails> availableClients,
- ConversationFactory controlConversation, Connection controlConnection)
- {
- super(suite, availableClients, controlConversation, controlConnection);
- }
-
- /// <summary>
- /// Broadcasts a test invitation and accetps enlisting from participating clients. The wrapped test case is
- /// then repeated for every combination of test clients (provided the wrapped test case extends
- /// <see cref="FrameworkBaseCase"/>.
- ///
- /// <p/>Any JMSExceptions during the invite/enlist conversation will be allowed to fall through as runtime exceptions,
- /// resulting in the non-completion of the test run.
- /// </summary>
- /// <remarks> Better error recovery for failure of the invite/enlist conversation could be added.</remarks>
- /// <param name="testResult"> The the results object to monitor the test results with. </param>
- public void run(TestResult testResult)
- {
- log.debug("public void run(TestResult testResult): called");
-
- Collection<Test> tests = testSuite.getAllUnderlyingTests();
-
- for (Test test : getAllUnderlyingTests())
- {
- FrameworkBaseCase coordTest = (FrameworkBaseCase) test;
-
- // Broadcast the invitation to find out what clients are available to test.
- Set<TestClientDetails> enlists = signupClients(coordTest);
-
- // Compare the list of willing clients to the list of all available.
- Set<TestClientDetails> optOuts = new HashSet<TestClientDetails>(allClients);
- optOuts.removeAll(enlists);
-
- // Output test failures for clients that will not particpate in the test.
- Set<List<TestClientDetails>> failPairs = allPairs(optOuts, allClients);
-
- for (List<TestClientDetails> failPair : failPairs)
- {
- // Create a distributed test circuit factory for the test.
- CircuitFactory circuitFactory = getTestSequencer();
-
- // Create an automatic failure test for the opted out test pair.
- FrameworkBaseCase failTest = new OptOutTestCase("testOptOut");
- circuitFactory.setSender(failPair.get(0));
- circuitFactory.setReceiver(failPair.get(1));
- failTest.setCircuitFactory(circuitFactory);
-
- failTest.run(testResult);
- }
-
- // Loop over all combinations of clients, willing to run the test.
- Set<List<TestClientDetails>> enlistedPairs = allPairs(enlists, enlists);
-
- for (List<TestClientDetails> enlistedPair : enlistedPairs)
- {
- // Create a distributed test circuit factory for the test.
- CircuitFactory circuitFactory = getTestSequencer();
-
- // Set the sending and receiving client details on the test circuitFactory.
- circuitFactory.setSender(enlistedPair.get(0));
- circuitFactory.setReceiver(enlistedPair.get(1));
-
- // Pass down the connection to hold the coordination conversation over.
- circuitFactory.setConversationFactory(conversationFactory);
-
- // Execute the test case.
- coordTest.setCircuitFactory(circuitFactory);
- coordTest.run(testResult);
- }
- }
- }
-
- /// <summary>
- /// Should provide the distributed test sequencer to pass to <see cref="Apache.Qpid.Integration.Tests.framework.FrameworkBaseCase"/>
- /// tests.
- /// </summary>
- /// <return> A distributed test sequencer. </return>
- public CircuitFactory getTestSequencer()
- {
- return new InteropCircuitFactory();
- }
-
- /// <summary>
- /// Produces all pairs of combinations of elements from two sets. The ordering of the elements in the pair is
- /// important, that is the pair <l, r> is distinct from <r, l>; both pairs are generated. For any element, i, in
- /// both the left and right sets, the reflexive pair <i, i> is not generated.
- /// </summary>
- /// <param name="left"> The left set. </param>
- /// <param name="right"> The right set. </param>
- /// @param <E> The type of the content of the pairs.
- /// </summary>
- /// <return> All pairs formed from the permutations of all elements of the left and right sets. </return>
- private <E> Set<List<E>> allPairs(Set<E> left, Set<E> right)
- {
- log.debug("private <E> Set<List<E>> allPairs(Set<E> left = " + left + ", Set<E> right = " + right + "): called");
-
- Set<List<E>> results = new HashSet<List<E>>();
-
- // Form all pairs from left to right.
- // Form all pairs from right to left.
- for (E le : left)
- {
- for (E re : right)
- {
- if (!le.equals(re))
- {
- results.add(new Pair<E>(le, re));
- results.add(new Pair<E>(re, le));
- }
- }
- }
-
- log.debug("results = " + results);
-
- return results;
- }
-
- /// <summary> A simple implementation of a pair, using a list. </summary>
- private class Pair<T> extends ArrayList<T>
- {
- /// <summary>
- /// Creates a new pair of elements.
- /// </summary>
- /// <param name="first"> The first element. </param>
- /// <param name="second"> The second element. </param>
- public Pair(T first, T second)
- {
- super();
- super.add(first);
- super.add(second);
- }
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Integration.Tests.framework.sequencers.CircuitFactory;
-using Apache.Qpid.Integration.Tests.framework.FrameworkBaseCase;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedtesting
-{
- /// <summary>
- /// An OptOutTestCase is a test case that automatically fails. It is used when a list of test clients has been generated
- /// from a compulsory invite, but only some of those clients have responded to a specific test case invite. The clients
- /// that did not respond, may automatically be given a fail for some tests.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Fail the test with a suitable reason.
- /// </table>
- /// </summary>
- public class OptOutTestCase extends FrameworkBaseCase
- {
- /// <summary>
- /// Creates a new coordinating test case with the specified name.
- /// </summary>
- /// <param name="name"> The test case name. </param>
- public OptOutTestCase(string name)
- {
- super(name);
- }
-
- /// <summary> Generates an appropriate test failure assertion. </summary>
- public void testOptOut()
- {
- CircuitFactory circuitFactory = getCircuitFactory();
-
- fail("One of " + circuitFactory.getSender() + " and " + getCircuitFactory().getReceivers()
- + " opted out of the test.");
- }
-
- /// <summary>
- /// Should provide a translation from the junit method name of a test to its test case name as defined in the
- /// interop testing specification. For example the method "testP2P" might map onto the interop test case name
- /// "TC2_BasicP2P".
- /// </summary>
- /// <param name="methodName"> The name of the JUnit test method. </param>
- /// <return> The name of the corresponding interop test case. </return>
- public string getTestCaseNameForTestMethod(string methodName)
- {
- return "OptOutTest";
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using org.apache.log4j.NDC;
-
-using Apache.Qpid.Integration.Tests.framework.MessagingTestConfigProperties;
-using Apache.Qpid.Integration.Tests.framework.TestUtils;
-using Apache.Qpid.Integration.Tests.framework.clocksynch.ClockSynchThread;
-using Apache.Qpid.Integration.Tests.framework.clocksynch.UDPClockSynchronizer;
-using org.apache.qpid.util.ReflectionUtils;
-using org.apache.qpid.util.ReflectionUtilsException;
-
-using uk.co.thebadgerset.junit.extensions.SleepThrottle;
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-using uk.co.thebadgerset.junit.extensions.util.TestContextProperties;
-
-using javax.jms.*;
-
-using java.util.*;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedtesting
-{
- /// <summary>
- /// Implements a test client as described in the interop testing spec
- /// (http://cwiki.apache.org/confluence/display/qpid/Interop+Testing+Specification). A test client is an agent that
- /// reacts to control message sequences send by the test <see cref="Coordinator"/>.
- ///
- /// <p/><table><caption>Messages Handled by TestClient</caption>
- /// <tr><th> Message <th> Action
- /// <tr><td> Invite(compulsory) <td> Reply with Enlist.
- /// <tr><td> Invite(test case) <td> Reply with Enlist if test case available.
- /// <tr><td> AssignRole(test case) <td> Reply with Accept Role if matches an enlisted test. Keep test parameters.
- /// <tr><td> Start <td> Send test messages defined by test parameters. Send report on messages sent.
- /// <tr><td> Status Request <td> Send report on messages received.
- /// <tr><td> Terminate <td> Terminate the test client.
- /// <tr><td> ClockSynch <td> Synch clock against the supplied UDP address.
- /// </table>
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Handle all incoming control messages. <td> <see cref="TestClientControlledTest"/>
- /// <tr><td> Configure and look up test cases by name. <td> <see cref="TestClientControlledTest"/>
- /// </table>
- /// </summary>
- public class TestClient : MessageListener
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(TestClient));
-
- /// <summary> Used for reporting to the console. </summary>
- private static ILog console = LogManager.GetLogger("CONSOLE");
-
- /// <summary> Holds the default identifying name of the test client. </summary>
- public static final string CLIENT_NAME = "java";
-
- /// <summary> Holds the URL of the broker to run the tests on. </summary>
- public static string brokerUrl;
-
- /// <summary> Holds the virtual host to run the tests on. If <tt>null</tt>, then the default virtual host is used. </summary>
- public static string virtualHost;
-
- /// <summary>
- /// Holds the test context properties that provides the default test parameters, plus command line overrides.
- /// This is initialized with the default test parameters, to which command line overrides may be applied.
- /// </summary>
- public static ParsedProperties testContextProperties =
- TestContextProperties.getInstance(MessagingTestConfigProperties.defaults);
-
- /// <summary> Holds all the test cases loaded from the classpath. </summary>
- Map<String, TestClientControlledTest> testCases = new HashMap<String, TestClientControlledTest>();
-
- /// <summary> Holds the test case currently being run by this client. </summary>
- protected TestClientControlledTest currentTestCase;
-
- /// <summary> Holds the connection to the broker that the test is being coordinated on. </summary>
- protected Connection connection;
-
- /// <summary> Holds the message producer to hold the test coordination over. </summary>
- protected MessageProducer producer;
-
- /// <summary> Holds the JMS controlSession for the test coordination. </summary>
- protected Session session;
-
- /// <summary> Holds the name of this client, with a default value. </summary>
- protected string clientName = CLIENT_NAME;
-
- /// <summary> This flag indicates that the test client should attempt to join the currently running test case on start up. </summary>
- protected bool join;
-
- /// <summary> Holds the clock synchronizer for the test node. </summary>
- ClockSynchThread clockSynchThread;
-
- /// <summary>
- /// Creates a new interop test client, listenting to the specified broker and virtual host, with the specified client
- /// identifying name.
- /// </summary>
- /// <param name="pBrokerUrl"> The url of the broker to connect to. </param>
- /// <param name="pVirtualHost"> The virtual host to conect to. </param>
- /// <param name="clientName"> The client name to use. </param>
- /// <param name="join"> Flag to indicate that this client should attempt to join running tests. </param>
- public TestClient(string pBrokerUrl, string pVirtualHost, string clientName, bool join)
- {
- log.debug("public TestClient(string pBrokerUrl = " + pBrokerUrl + ", string pVirtualHost = " + pVirtualHost
- + ", string clientName = " + clientName + ", bool join = " + join + "): called");
-
- // Retain the connection parameters.
- brokerUrl = pBrokerUrl;
- virtualHost = pVirtualHost;
- this.clientName = clientName;
- this.join = join;
- }
-
- /// <summary>
- /// The entry point for the interop test coordinator. This client accepts the following command line arguments:
- ///
- /// <p/><table>
- /// <tr><td> -b <td> The broker URL. <td> Optional.
- /// <tr><td> -h <td> The virtual host. <td> Optional.
- /// <tr><td> -n <td> The test client name. <td> Optional.
- /// <tr><td> name=value <td> Trailing argument define name/value pairs. Added to system properties. <td> Optional.
- /// </table>
- /// </summary>
- /// <param name="args"> The command line arguments. </param>
- public static void main(String[] args)
- {
- log.debug("public static void main(String[] args = " + Arrays.ToString(args) + "): called");
- console.info("Qpid Distributed Test Client.");
-
- // Override the default broker url to be localhost:5672.
- testContextProperties.setProperty(MessagingTestConfigProperties.BROKER_PROPNAME, "tcp://localhost:5672");
-
- // Use the command line parser to evaluate the command line with standard handling behaviour (print errors
- // and usage then exist if there are errors).
- // Any options and trailing name=value pairs are also injected into the test context properties object,
- // to override any defaults that may have been set up.
- ParsedProperties options =
- new ParsedProperties(uk.co.thebadgerset.junit.extensions.util.CommandLineParser.processCommandLine(args,
- new uk.co.thebadgerset.junit.extensions.util.CommandLineParser(
- new String[][]
- {
- { "b", "The broker URL.", "broker", "false" },
- { "h", "The virtual host to use.", "virtual host", "false" },
- { "o", "The name of the directory to output test timings to.", "dir", "false" },
- { "n", "The name of the test client.", "name", "false" },
- { "j", "Join this test client to running test.", "false" }
- }), testContextProperties));
-
- // Extract the command line options.
- string brokerUrl = options.getProperty("b");
- string virtualHost = options.getProperty("h");
- string clientName = options.getProperty("n");
- clientName = (clientName == null) ? CLIENT_NAME : clientName;
- bool join = options.getPropertyAsBoolean("j");
-
- // To distinguish logging output set up an NDC on the client name.
- NDC.push(clientName);
-
- // Create a test client and start it running.
- TestClient client = new TestClient(brokerUrl, virtualHost, clientName, join);
-
- // Use a class path scanner to find all the interop test case implementations.
- // Hard code the test classes till the classpath scanner is fixed.
- Collection<Class<? extends TestClientControlledTest>> testCaseClasses =
- new ArrayList<Class<? extends TestClientControlledTest>>();
- // ClasspathScanner.getMatches(TestClientControlledTest.class, "^TestCase.*", true);
- testCaseClasses.addAll(loadTestCases("org.apache.qpid.interop.clienttestcases.TestCase1DummyRun",
- "org.apache.qpid.interop.clienttestcases.TestCase2BasicP2P",
- "org.apache.qpid.interop.clienttestcases.TestCase3BasicPubSub",
- "org.apache.qpid.interop.clienttestcases.TestCase4P2PMessageSize",
- "org.apache.qpid.interop.clienttestcases.TestCase5PubSubMessageSize",
- "Apache.Qpid.Integration.Tests.framework.distributedcircuit.TestClientCircuitEnd"));
-
- try
- {
- client.start(testCaseClasses);
- }
- catch (Exception e)
- {
- log.error("The test client was unable to start.", e);
- console.info(e.getMessage());
- System.exit(1);
- }
- }
-
- /// <summary>
- /// Parses a list of class names, and loads them if they are available on the class path.
- /// </summary>
- /// <param name="classNames"> The names of the classes to load. </param>
- ///
- /// <return> A list of the loaded test case classes. </return>
- public static IList<Class<? extends TestClientControlledTest>> loadTestCases(String... classNames)
- {
- IList<Class<? extends TestClientControlledTest>> testCases =
- new LinkedList<Class<? extends TestClientControlledTest>>();
-
- for (string className : classNames)
- {
- try
- {
- Class<?> cls = ReflectionUtils.forName(className);
- testCases.add((Class<? extends TestClientControlledTest>) cls);
- }
- catch (ReflectionUtilsException e)
- {
- // Ignore, class could not be found, so test not available.
- console.warn("Requested class " + className + " cannot be found, ignoring it.");
- }
- catch (ClassCastException e)
- {
- // Ignore, class was not of correct type to be a test case.
- console.warn("Requested class " + className + " is not an instance of TestClientControlledTest.");
- }
- }
-
- return testCases;
- }
-
- /// <summary>
- /// Starts the interop test client running. This causes it to start listening for incoming test invites.
- /// </summary>
- /// <param name="testCaseClasses"> The classes of the available test cases. The test case names from these are used to </param>
- /// matchin incoming test invites against.
- ///
- /// <exception cref="JMSException"> Any underlying JMSExceptions are allowed to fall through. </exception>
- protected void start(Collection<Class<? extends TestClientControlledTest>> testCaseClasses) throws JMSException
- {
- log.debug("protected void start(Collection<Class<? extends TestClientControlledTest>> testCaseClasses = "
- + testCaseClasses + "): called");
-
- // Create all the test case implementations and index them by the test names.
- for (Class<? extends TestClientControlledTest> nextClass : testCaseClasses)
- {
- try
- {
- TestClientControlledTest testCase = nextClass.newInstance();
- testCases.put(testCase.getName(), testCase);
- }
- catch (InstantiationException e)
- {
- log.warn("Could not instantiate test case class: " + nextClass.getName(), e);
- // Ignored.
- }
- catch (IllegalAccessException e)
- {
- log.warn("Could not instantiate test case class due to illegal access: " + nextClass.getName(), e);
- // Ignored.
- }
- }
-
- // Open a connection to communicate with the coordinator on.
- connection = TestUtils.createConnection(testContextProperties);
- session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- // Set this up to listen for control messages.
- Topic privateControlTopic = session.createTopic("iop.control." + clientName);
- MessageConsumer consumer = session.createConsumer(privateControlTopic);
- consumer.setMessageListener(this);
-
- Topic controlTopic = session.createTopic("iop.control");
- MessageConsumer consumer2 = session.createConsumer(controlTopic);
- consumer2.setMessageListener(this);
-
- // Create a producer to send replies with.
- producer = session.createProducer(null);
-
- // If the join flag was set, then broadcast a join message to notify the coordinator that a new test client
- // is available to join the current test case, if it supports it. This message may be ignored, or it may result
- // in this test client receiving a test invite.
- if (join)
- {
- Message joinMessage = session.createMessage();
-
- joinMessage.setStringProperty("CONTROL_TYPE", "JOIN");
- joinMessage.setStringProperty("CLIENT_NAME", clientName);
- joinMessage.setStringProperty("CLIENT_PRIVATE_CONTROL_KEY", "iop.control." + clientName);
- producer.send(controlTopic, joinMessage);
- }
-
- // Start listening for incoming control messages.
- connection.start();
- }
-
- /// <summary>
- /// Handles all incoming control messages.
- /// </summary>
- /// <param name="message"> The incoming message. </param>
- public void onMessage(Message message)
- {
- NDC.push(clientName);
- log.debug("public void onMessage(Message message = " + message + "): called");
-
- try
- {
- string controlType = message.getStringProperty("CONTROL_TYPE");
- string testName = message.getStringProperty("TEST_NAME");
-
- log.debug("Received control of type '" + controlType + "' for the test '" + testName + "'");
-
- // Check if the message is a test invite.
- if ("INVITE".equals(controlType))
- {
- // Flag used to indicate that an enlist should be sent. Only enlist to compulsory invites or invites
- // for which test cases exist.
- bool enlist = false;
-
- if (testName != null)
- {
- log.debug("Got an invite to test: " + testName);
-
- // Check if the requested test case is available.
- TestClientControlledTest testCase = testCases.get(testName);
-
- if (testCase != null)
- {
- log.debug("Found implementing class for test '" + testName + "', enlisting for it.");
-
- // Check if the test case will accept the invitation.
- enlist = testCase.acceptInvite(message);
-
- log.debug("The test case "
- + (enlist ? " accepted the invite, enlisting for it."
- : " did not accept the invite, not enlisting."));
-
- // Make the requested test case the current test case.
- currentTestCase = testCase;
- }
- else
- {
- log.debug("Received an invite to the test '" + testName + "' but this test is not known.");
- }
- }
- else
- {
- log.debug("Got a compulsory invite, enlisting for it.");
-
- enlist = true;
- }
-
- if (enlist)
- {
- // Reply with the client name in an Enlist message.
- Message enlistMessage = session.createMessage();
- enlistMessage.setStringProperty("CONTROL_TYPE", "ENLIST");
- enlistMessage.setStringProperty("CLIENT_NAME", clientName);
- enlistMessage.setStringProperty("CLIENT_PRIVATE_CONTROL_KEY", "iop.control." + clientName);
- enlistMessage.setJMSCorrelationID(message.getJMSCorrelationID());
-
- log.debug("Sending enlist message '" + enlistMessage + "' to " + message.getJMSReplyTo());
-
- producer.send(message.getJMSReplyTo(), enlistMessage);
- }
- else
- {
- // Reply with the client name in an Decline message.
- Message enlistMessage = session.createMessage();
- enlistMessage.setStringProperty("CONTROL_TYPE", "DECLINE");
- enlistMessage.setStringProperty("CLIENT_NAME", clientName);
- enlistMessage.setStringProperty("CLIENT_PRIVATE_CONTROL_KEY", "iop.control." + clientName);
- enlistMessage.setJMSCorrelationID(message.getJMSCorrelationID());
-
- log.debug("Sending decline message '" + enlistMessage + "' to " + message.getJMSReplyTo());
-
- producer.send(message.getJMSReplyTo(), enlistMessage);
- }
- }
- else if ("ASSIGN_ROLE".equals(controlType))
- {
- // Assign the role to the current test case.
- string roleName = message.getStringProperty("ROLE");
-
- log.debug("Got a role assignment to role: " + roleName);
-
- TestClientControlledTest.Roles role = Enum.valueOf(TestClientControlledTest.Roles.class, roleName);
-
- currentTestCase.assignRole(role, message);
-
- // Reply by accepting the role in an Accept Role message.
- Message acceptRoleMessage = session.createMessage();
- acceptRoleMessage.setStringProperty("CLIENT_NAME", clientName);
- acceptRoleMessage.setStringProperty("CONTROL_TYPE", "ACCEPT_ROLE");
- acceptRoleMessage.setJMSCorrelationID(message.getJMSCorrelationID());
-
- log.debug("Sending accept role message '" + acceptRoleMessage + "' to " + message.getJMSReplyTo());
-
- producer.send(message.getJMSReplyTo(), acceptRoleMessage);
- }
- else if ("START".equals(controlType) || "STATUS_REQUEST".equals(controlType))
- {
- if ("START".equals(controlType))
- {
- log.debug("Got a start notification.");
-
- // Extract the number of test messages to send from the start notification.
- int numMessages;
-
- try
- {
- numMessages = message.getIntProperty("MESSAGE_COUNT");
- }
- catch (NumberFormatException e)
- {
- // If the number of messages is not specified, use the default of one.
- numMessages = 1;
- }
-
- // Start the current test case.
- currentTestCase.start(numMessages);
- }
- else
- {
- log.debug("Got a status request.");
- }
-
- // Generate the report from the test case and reply with it as a Report message.
- Message reportMessage = currentTestCase.getReport(session);
- reportMessage.setStringProperty("CLIENT_NAME", clientName);
- reportMessage.setStringProperty("CONTROL_TYPE", "REPORT");
- reportMessage.setJMSCorrelationID(message.getJMSCorrelationID());
-
- log.debug("Sending report message '" + reportMessage + "' to " + message.getJMSReplyTo());
-
- producer.send(message.getJMSReplyTo(), reportMessage);
- }
- else if ("TERMINATE".equals(controlType))
- {
- console.info("Received termination instruction from coordinator.");
-
- // Is a cleaner shutdown needed?
- connection.close();
- System.exit(0);
- }
- else if ("CLOCK_SYNCH".equals(controlType))
- {
- log.debug("Received clock synch command.");
- string address = message.getStringProperty("ADDRESS");
-
- log.debug("address = " + address);
-
- // Re-create (if necessary) and start the clock synch thread to synch the clock every ten seconds.
- if (clockSynchThread != null)
- {
- clockSynchThread.terminate();
- }
-
- SleepThrottle throttle = new SleepThrottle();
- throttle.setRate(0.1f);
-
- clockSynchThread = new ClockSynchThread(new UDPClockSynchronizer(address), throttle);
- clockSynchThread.start();
- }
- else
- {
- // Log a warning about this but otherwise ignore it.
- log.warn("Got an unknown control message, controlType = " + controlType + ", message = " + message);
- }
- }
- catch (JMSException e)
- {
- // Log a warning about this, but otherwise ignore it.
- log.warn("Got JMSException whilst handling message: " + message, e);
- }
- // Log any runtimes that fall through this message handler. These are fatal errors for the test client.
- catch (RuntimeException e)
- {
- log.error("The test client message handler got an unhandled exception: ", e);
- console.info("The message handler got an unhandled exception, terminating the test client.");
- System.exit(1);
- }
- finally
- {
- NDC.pop();
- }
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using javax.jms.JMSException;
-using javax.jms.Message;
-using javax.jms.MessageListener;
-using javax.jms.Session;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedtesting
-{
- /// <summary>
- /// TestClientControlledTest provides an interface that classes implementing test cases to run on a <see cref="TestClient"/>
- /// node can use. Implementations must be Java beans, that is, to provide a default constructor and to implement the
- /// <see cref="#getName"/> method.
- ///
- /// <p/>The methods specified in this interface are called when the <see cref="TestClient"/> receives control instructions to
- /// apply to the test. There are control instructions to present the test case with the test invite, so that it may
- /// choose whether or not to participate in the test, assign the test to play the sender or receiver role, start the
- /// test and obtain the test status report.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Supply the name of the test case that this implements.
- /// <tr><td> Accept/Reject invites based on test parameters.
- /// <tr><td> Adapt to assigned roles.
- /// <tr><td> Perform test case actions.
- /// <tr><td> Generate test reports.
- /// </table>
- /// </summary>
- public interface TestClientControlledTest
- {
- /// <summary> Defines the possible test case roles that an interop test case can take on. </summary>
- public enum Roles
- {
- /// <summary> Specifies the sender role. </summary>
- SENDER,
-
- /// <summary> Specifies the receivers role. </summary>
- RECEIVER
- }
-
- /// <summary>
- /// Should provide the name of the test case that this class implements. The exact names are defined in the
- /// interop testing spec.
- /// </summary>
- /// <return> The name of the test case that this implements. </return>
- public string getName();
-
- /// <summary>
- /// Determines whether the test invite that matched this test case is acceptable.
- /// </summary>
- /// <param name="inviteMessage"> The invitation to accept or reject. </param>
- ///
- /// <return> <tt>true</tt> to accept the invitation, <tt>false</tt> to reject it. </return>
- ///
- /// <exception cref="JMSException"> Any JMSException resulting from reading the message are allowed to fall through. </exception>
- public bool acceptInvite(Message inviteMessage) throws JMSException;
-
- /// <summary>
- /// Assigns the role to be played by this test case. The test parameters are fully specified in the
- /// assignment message. When this method return the test case will be ready to execute.
- /// </summary>
- /// <param name="role"> The role to be played; sender or receivers. </param>
- /// <param name="assignRoleMessage"> The role assingment message, contains the full test parameters. </param>
- ///
- /// <exception cref="JMSException"> Any JMSException resulting from reading the message are allowed to fall through. </exception>
- public void assignRole(Roles role, Message assignRoleMessage) throws JMSException;
-
- /// <summary>
- /// Performs the test case actions. Returning from here, indicates that the sending role has completed its test.
- /// </summary>
- /// <param name="numMessages"> The number of test messages to send. </param>
- ///
- /// <exception cref="JMSException"> Any JMSException resulting from reading the message are allowed to fall through. </exception>
- public void start(int numMessages) throws JMSException;
-
- /// <summary>
- /// Gets a report on the actions performed by the test case in its assigned role.
- /// </summary>
- /// <param name="session"> The controlSession to create the report message in. </param>
- ///
- /// <return> The report message. </return>
- ///
- /// <exception cref="JMSException"> Any JMSExceptions resulting from creating the report are allowed to fall through. </exception>
- public Message getReport(Session session) throws JMSException;
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using javax.jms.JMSException;
-using javax.jms.Message;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A DropIn test is a test case that can accept late joining test clients into a running test. This can be usefull,
- /// for interactive experimentation.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Accept late joining test clients.
- /// </table>
- /// </summary>
- public interface DropInTest
- {
- /// <summary>
- /// Should accept a late joining client into a running test case. The client will be enlisted with a control message
- /// with the 'CONTROL_TYPE' field set to the value 'LATEJOIN'. It should also provide values for the fields:
- ///
- /// <p/><table>
- /// <tr><td> CLIENT_NAME <td> A unique name for the new client.
- /// <tr><td> CLIENT_PRIVATE_CONTROL_KEY <td> The key for the route on which the client receives its control messages.
- /// </table>
- /// </summary>
- /// <param name="message"> The late joiners join message. </param>
- ///
- /// <exception cref="JMSException"> Any JMS Exception are allowed to fall through, indicating that the join failed. </exception>
- public void lateJoin(Message message) throws JMSException;
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using javax.jms.ExceptionListener;
-using javax.jms.JMSException;
-
-using java.io.PrintWriter;
-using java.io.StringWriter;
-using java.util.ArrayList;
-using System.Collections.Generic.IList;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// An exception monitor, listens for JMS exception on a connection or consumer. It record all exceptions that it receives
- /// and provides methods to test the number and type of exceptions received.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Record all exceptions received.
- /// </table>
- /// </summary>
- public class ExceptionMonitor : ExceptionListener
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(ExceptionMonitor));
-
- /// <summary> Holds the received exceptions. </summary>
- IList<Exception> exceptions = new ArrayList<Exception>();
-
- /// <summary>
- /// Receives incoming exceptions.
- /// </summary>
- /// <param name="e"> The exception to record. </param>
- public synchronized void onException(JMSException e)
- {
- log.debug("public void onException(JMSException e): called", e);
-
- exceptions.add(e);
- }
-
- /// <summary>
- /// Checks that no exceptions have been received.
- /// </summary>
- /// <return> <tt>true</tt> if no exceptions have been received, <tt>false</tt> otherwise. </return>
- public synchronized bool assertNoExceptions()
- {
- return exceptions.isEmpty();
- }
-
- /// <summary>
- /// Checks that exactly one exception has been received.
- /// </summary>
- /// <return> <tt>true</tt> if exactly one exception been received, <tt>false</tt> otherwise. </return>
- public synchronized bool assertOneJMSException()
- {
- return exceptions.size() == 1;
- }
-
- /// <summary>
- /// Checks that exactly one exception, with a linked cause of the specified type, has been received.
- /// </summary>
- /// <param name="aClass"> The type of the linked cause. </param>
- ///
- /// <return> <tt>true</tt> if exactly one exception, with a linked cause of the specified type, been received, </return>
- /// <tt>false</tt> otherwise.
- public synchronized bool assertOneJMSExceptionWithLinkedCause(Class aClass)
- {
- if (exceptions.size() == 1)
- {
- Exception e = exceptions.get(0);
-
- if (e instanceof JMSException)
- {
- JMSException jmse = (JMSException) e;
-
- Exception linkedCause = jmse.getLinkedException();
-
- if ((linkedCause != null) && aClass.isInstance(linkedCause))
- {
- return true;
- }
- }
- }
-
- return false;
- }
-
- /// <summary>
- /// Checks that at least one exception of the the specified type, has been received.
- /// </summary>
- /// <param name="exceptionClass"> The type of the exception. </param>
- ///
- /// <return> <tt>true</tt> if at least one exception of the specified type has been received, <tt>false</tt> otherwise. </return>
- public synchronized bool assertExceptionOfType(Class exceptionClass)
- {
- // Start by assuming that the exception has no been received.
- bool passed = false;
-
- // Scan all the exceptions for a match.
- for (Exception e : exceptions)
- {
- if (exceptionClass.isInstance(e))
- {
- passed = true;
-
- break;
- }
- }
-
- return passed;
- }
-
- /// <summary>
- /// Reports the number of exceptions held by this monitor.
- /// </summary>
- /// <return> The number of exceptions held by this monitor. </return>
- public synchronized int size()
- {
- return exceptions.size();
- }
-
- /// <summary>
- /// Clears the record of received exceptions.
- /// </summary>
- public synchronized void reset()
- {
- exceptions = new ArrayList<Exception>();
- }
-
- /// <summary>
- /// Provides a dump of the stack traces of all exceptions that this exception monitor was notified of. Mainly
- /// use for debugging/test failure reporting purposes.
- /// </summary>
- /// <return> A string containing a dump of the stack traces of all exceptions. </return>
- public synchronized string ToString()
- {
- string result = "ExceptionMonitor: holds " + exceptions.size() + " exceptions.\n\n";
-
- for (Exception ex : exceptions)
- {
- result += getStackTrace(ex) + "\n";
- }
-
- return result;
- }
-
- /// <summary>
- /// Prints an exception stack trace into a string.
- /// </summary>
- /// <param name="t"> The throwable to get the stack trace from. </param>
- ///
- /// <return> A string containing the throwables stack trace. </return>
- public static string getStackTrace(Throwable t)
- {
- StringWriter sw = new StringWriter();
- PrintWriter pw = new PrintWriter(sw, true);
- t.printStackTrace(pw);
- pw.flush();
- sw.flush();
-
- return sw.ToString();
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using org.apache.log4j.NDC;
-
-using Apache.Qpid.Integration.Tests.framework.BrokerLifecycleAware;
-using Apache.Qpid.Integration.Tests.framework.sequencers.CircuitFactory;
-
-using uk.co.thebadgerset.junit.extensions.AsymptoticTestCase;
-using uk.co.thebadgerset.junit.extensions.SetupTaskAware;
-using uk.co.thebadgerset.junit.extensions.SetupTaskHandler;
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-using uk.co.thebadgerset.junit.extensions.util.TestContextProperties;
-
-using java.util.ArrayList;
-using System.Collections.Generic.IList;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// FrameworkBaseCase provides a starting point for writing test cases against the test framework. Its main purpose is
- /// to provide some convenience methods for testing.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Create and clean up in-vm brokers on every test case.
- /// <tr><td> Produce lists of assertions from assertion creation calls.
- /// <tr><td> Produce JUnit failures from assertion failures.
- /// <tr><td> Convert failed assertions to error messages.
- /// </table>
- /// </summary>
- public class FrameworkBaseCase extends AsymptoticTestCase : FrameworkTestContext, SetupTaskAware,
- BrokerLifecycleAware
- {
- /// <summary> Used for debugging purposes. </summary>
- private static ILog log = LogManager.GetLogger(typeof(FrameworkBaseCase));
-
- /// <summary> Holds the test sequencer to create and run test circuits with. </summary>
- protected CircuitFactory circuitFactory = new LocalCircuitFactory();
-
- /// <summary> Used to read the tests configurable properties through. </summary>
- protected ParsedProperties testProps;
-
- /// <summary> A default setup task processor to delegate setup tasks to. </summary>
- protected SetupTaskHandler taskHandler = new SetupTaskHandler();
-
- /// <summary> Flag used to track whether the test is in-vm or not. </summary>
- protected bool isUsingInVM;
-
- /// <summary> Holds the failure mechanism. </summary>
- protected CauseFailure failureMechanism = new CauseFailureUserPrompt();
-
- /// <summary>
- /// Creates a new test case with the specified name.
- /// </summary>
- /// <param name="name"> The test case name. </param>
- public FrameworkBaseCase(string name)
- {
- super(name);
- }
-
- /// <summary>
- /// Returns the test case sequencer that provides test circuit, and test sequence implementations. The sequencer
- /// that this base case returns by default is suitable for running a test circuit with both circuit ends colocated
- /// on the same JVM.
- /// </summary>
- /// <return> The test case sequencer. </return>
- protected CircuitFactory getCircuitFactory()
- {
- return circuitFactory;
- }
-
- /// <summary>
- /// Overrides the default test circuit factory. Test decorators can use this to supply distributed test sequencers or
- /// other test circuit factory specializations.
- /// </summary>
- /// <param name="circuitFactory"> The new test circuit factory. </param>
- public void setCircuitFactory(CircuitFactory circuitFactory)
- {
- this.circuitFactory = circuitFactory;
- }
-
- /// <summary>
- /// Reports the current test case name.
- /// </summary>
- /// <return> The current test case name. </return>
- public TestCaseVector getTestCaseVector()
- {
- return new TestCaseVector(this.getName(), 0);
- }
-
- /// <summary>
- /// Reports the current test case parameters.
- /// </summary>
- /// <return> The current test case parameters. </return>
- public MessagingTestConfigProperties getTestParameters()
- {
- return new MessagingTestConfigProperties(testProps);
- }
-
- /// <summary>
- /// Creates a list of assertions.
- /// </summary>
- /// <param name="asserts"> The assertions to compile in a list. </param>
- ///
- /// <return> A list of assertions. </return>
- protected IList<Assertion> assertionList(Assertion... asserts)
- {
- IList<Assertion> result = new ArrayList<Assertion>();
-
- for (Assertion assertion : asserts)
- {
- result.add(assertion);
- }
-
- return result;
- }
-
- /// <summary>
- /// Generates a JUnit assertion exception (failure) if any assertions are passed into this method, also concatenating
- /// all of the error messages in the assertions together to form an error message to diagnose the test failure with.
- /// </summary>
- /// <param name="asserts"> The list of failed assertions. </param>
- protected static void assertNoFailures(List<Assertion> asserts)
- {
- log.debug("protected void assertNoFailures(List<Assertion> asserts = " + asserts + "): called");
-
- // Check if there are no assertion failures, and return without doing anything if so.
- if ((asserts == null) || asserts.isEmpty())
- {
- return;
- }
-
- // Compile all of the assertion failure messages together.
- string errorMessage = assertionsToString(asserts);
-
- // Fail with the error message from all of the assertions.
- fail(errorMessage);
- }
-
- /// <summary>
- /// Converts a list of failed assertions into an error message.
- /// </summary>
- /// <param name="asserts"> The failed assertions. </param>
- ///
- /// <return> The error message. </return>
- protected static string assertionsToString(List<Assertion> asserts)
- {
- string errorMessage = "";
-
- for (Assertion assertion : asserts)
- {
- errorMessage += assertion.ToString() + "\n";
- }
-
- return errorMessage;
- }
-
- /// <summary>
- /// Ensures that the in-vm broker is created and initialized.
- /// </summary>
- ///
- /// <exception cref="Exception"> Any exceptions allowed to fall through and fail the test. </exception>
- protected void setUp() throws Exception
- {
- NDC.push(getName());
-
- testProps = TestContextProperties.getInstance(MessagingTestConfigProperties.defaults);
-
- // Process all optional setup tasks. This may include in-vm broker creation, if a decorator has added it.
- taskHandler.runSetupTasks();
- }
-
- /// <summary> Ensures that the in-vm broker is cleaned up after each test run. </summary>
- protected void tearDown()
- {
- NDC.pop();
-
- // Process all optional tear down tasks. This may include in-vm broker clean up, if a decorator has added it.
- taskHandler.runTearDownTasks();
- }
-
- /// <summary>
- /// Adds the specified task to the tests setup.
- /// </summary>
- /// <param name="task"> The task to add to the tests setup. </param>
- public void chainSetupTask(Runnable task)
- {
- taskHandler.chainSetupTask(task);
- }
-
- /// <summary>
- /// Adds the specified task to the tests tear down.
- /// </summary>
- /// <param name="task"> The task to add to the tests tear down. </param>
- public void chainTearDownTask(Runnable task)
- {
- taskHandler.chainTearDownTask(task);
- }
-
- /// <summary>
- /// Should provide a translation from the junit method name of a test to its test case name as known to the test
- /// clients that will run the test. The purpose of this is to convert the JUnit method name into the correct test
- /// case name to place into the test invite. For example the method "testP2P" might map onto the interop test case
- /// name "TC2_BasicP2P".
- /// </summary>
- /// <param name="methodName"> The name of the JUnit test method. </param>
- ///
- /// <return> The name of the corresponding interop test case. </return>
- public string getTestCaseNameForTestMethod(string methodName)
- {
- return methodName;
- }
-
- public void setInVmBrokers()
- {
- isUsingInVM = true;
- }
-
- /// <summary>
- /// Indicates whether or not a test case is using in-vm brokers.
- /// </summary>
- /// <return> <tt>true</tt> if the test is using in-vm brokers, <tt>false</tt> otherwise. </return>
- public bool usingInVmBroker()
- {
- return isUsingInVM;
- }
-
- /// <summary>
- /// Sets the currently live in-vm broker.
- /// </summary>
- /// <param name="i"> The currently live in-vm broker. </param>
- public void setLiveBroker(int i)
- { }
-
- /// <summary>
- /// Reports the currently live in-vm broker.
- /// </summary>
- /// <return> The currently live in-vm broker. </return>
- public int getLiveBroker()
- {
- return 0;
- }
-
- /// <summary>
- /// Accepts a failure mechanism.
- /// </summary>
- /// <param name="failureMechanism"> The failure mechanism. </param>
- public void setFailureMechanism(CauseFailure failureMechanism)
- {
- this.failureMechanism = failureMechanism;
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework
-{
-
- /// <summary>
- /// A FrameworkTestContext provides context information to test code about the current test case being run; its name, its
- /// parameters.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide the name of the current test case.
- /// <tr><td> Provide the test parameters.
- /// </table>
- /// </summary>
- public interface FrameworkTestContext
- {
- /// <summary>
- /// Reports the current test case name.
- /// </summary>
- /// <return> The current test case name. </return>
- TestCaseVector getTestCaseVector();
-
- /// <summary>
- /// Reports the current test case parameters.
- /// </summary>
- /// <return> The current test case parameters. </return>
- MessagingTestConfigProperties getTestParameters();
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.*;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.*;
-
-using System.Collections.Generic.LinkedList;
-using System.Collections.Generic.IList;
-
-namespace Apache.Qpid.Integration.Tests.framework.localcircuit
-{
- /// <summary>
- /// LocalCircuitImpl provides an implementation of the test circuit. This is a local only circuit implementation that
- /// supports a single producer/consumer on each end of the circuit, with both ends of the circuit on the same JVM.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Supply the publishing and receiving ends of a test messaging circuit.
- /// <td> <see cref="LocalPublisherImpl"/>, <see cref="LocalReceiverImpl"/>
- /// <tr><td> Start the circuit running.
- /// <tr><td> Close the circuit down.
- /// <tr><td> Take a reading of the circuits state.
- /// <tr><td> Apply assertions against the circuits state. <td> <see cref="Assertion"/>
- /// <tr><td> Send test messages over the circuit.
- /// <tr><td> Perform the default test procedure on the circuit.
- /// <tr><td> Provide access to connection and controlSession exception monitors. <td> <see cref="ExceptionMonitor"/>
- /// </table>
- /// </summary>
- public class LocalCircuitImpl : Circuit
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(LocalCircuitImpl));
-
- /// <summary> Holds the test configuration for the circuit. </summary>
- private ParsedProperties testProps;
-
- /// <summary> Holds the publishing end of the circuit. </summary>
- private LocalPublisherImpl publisher;
-
- /// <summary> Holds the receiving end of the circuit. </summary>
- private LocalReceiverImpl receiver;
-
- /// <summary> Holds the connection for the publishing end of the circuit. </summary>
- private Connection connection;
-
- /// <summary> Holds the exception listener for the connection on the publishing end of the circuit. </summary>
- private ExceptionMonitor connectionExceptionMonitor;
-
- /// <summary> Holds the exception listener for the controlSession on the publishing end of the circuit. </summary>
- private ExceptionMonitor exceptionMonitor;
-
- /// <summary>
- /// Creates a test circuit using the specified test parameters. The publisher, receivers, connection and
- /// connection monitor must already have been created, to assemble the circuit.
- /// </summary>
- /// <param name="testProps"> The test parameters. </param>
- /// <param name="publisher"> The test publisher. </param>
- /// <param name="receiver"> The test receivers. </param>
- /// <param name="connection"> The connection. </param>
- /// <param name="connectionExceptionMonitor"> The connection exception monitor. </param>
- public LocalCircuitImpl(ParsedProperties testProps, LocalPublisherImpl publisher, LocalReceiverImpl receiver,
- Connection connection, ExceptionMonitor connectionExceptionMonitor)
- {
- this.testProps = testProps;
- this.publisher = publisher;
- this.receiver = receiver;
- this.connection = connection;
- this.connectionExceptionMonitor = connectionExceptionMonitor;
- this.exceptionMonitor = new ExceptionMonitor();
-
- // Set this as the parent circuit on the publisher and receivers.
- publisher.setCircuit(this);
- receiver.setCircuit(this);
- }
-
- /// <summary>
- /// Gets the interface on the publishing end of the circuit.
- /// </summary>
- /// <return> The publishing end of the circuit. </return>
- public Publisher getPublisher()
- {
- return publisher;
- }
-
- /// <summary>
- /// Gets the local publishing circuit end, for direct manipulation.
- /// </summary>
- /// <return> The local publishing circuit end. </return>
- public CircuitEnd getLocalPublisherCircuitEnd()
- {
- return publisher;
- }
-
- /// <summary>
- /// Gets the interface on the receiving end of the circuit.
- /// </summary>
- /// <return> The receiving end of the circuit. </return>
- public Receiver getReceiver()
- {
- return receiver;
- }
-
- /// <summary>
- /// Gets the local receiving circuit end, for direct manipulation.
- /// </summary>
- /// <return> The local receiving circuit end. </return>
- public CircuitEnd getLocalReceiverCircuitEnd()
- {
- return receiver;
- }
-
- /// <summary>
- /// Checks the test circuit. The effect of this is to gather the circuits state, for both ends of the circuit,
- /// into a report, against which assertions may be checked.
- /// </summary>
- public void check()
- { }
-
- /// <summary>
- /// Applied a list of assertions against the test circuit. The <see cref="#check()"/> method should be called before doing
- /// this, to ensure that the circuit has gathered its state into a report to assert against.
- /// </summary>
- /// <param name="assertions"> The list of assertions to apply. </param>
- /// <return> Any assertions that failed. </return>
- public IList<Assertion> applyAssertions(List<Assertion> assertions)
- {
- IList<Assertion> failures = new LinkedList<Assertion>();
-
- for (Assertion assertion : assertions)
- {
- if (!assertion.apply())
- {
- failures.add(assertion);
- }
- }
-
- return failures;
- }
-
- /// <summary> Connects and starts the circuit. After this method is called the circuit is ready to send messages. </summary>
- public void start()
- { }
-
- /// <summary> Closes the circuit. All associated resources are closed. </summary>
- public void close()
- {
- try
- {
- publisher.close();
- receiver.close();
- connection.close();
- }
- catch (JMSException e)
- {
- throw new RuntimeException("Got JMSException during close:" + e.getMessage(), e);
- }
- }
-
- /// <summary> Sends a message on the test circuit. The exact nature of the message sent is controlled by the test parameters. </summary>
- protected void send()
- {
- // Cast the test properties into a typed interface for convenience.
- MessagingTestConfigProperties props = new MessagingTestConfigProperties(testProps);
-
- bool transactional = props.getPublisherTransacted();
- bool rollback = props.getRollbackPublisher();
-
- // Send a message through the publisher and log any exceptions raised.
- try
- {
- CircuitEnd end = getLocalPublisherCircuitEnd();
-
- end.send(createTestMessage(end));
-
- if (rollback)
- {
- end.getSession().rollback();
- }
- else if (transactional)
- {
- end.getSession().commit();
- }
- }
- catch (JMSException e)
- {
- exceptionMonitor.onException(e);
- }
- }
-
- /// <summary>
- /// Runs the default test procedure against the circuit, and checks that all of the specified assertions hold. The
- /// outline of the default test procedure is:
- ///
- /// <p/><pre>
- /// Start the circuit.
- /// Send test messages.
- /// Request a status report.
- /// Assert conditions on the publishing end of the circuit.
- /// Assert conditions on the receiving end of the circuit.
- /// Close the circuit.
- /// Pass with no failed assertions or fail with a list of failed assertions.
- /// </pre>
- /// </summary>
- /// <param name="numMessages"> The number of messages to send using the default test procedure. </param>
- /// <param name="assertions"> The list of assertions to apply. </param>
- /// <return> Any assertions that failed. </return>
- public IList<Assertion> test(int numMessages, List<Assertion> assertions)
- {
- // Start the test circuit.
- start();
-
- // Send the requested number of test messages.
- for (int i = 0; i < numMessages; i++)
- {
- send();
- }
-
- // Inject a short pause to allow time for exceptions to come back asynchronously.
- TestUtils.pause(500L);
-
- // Request a status report.
- check();
-
- // Clean up the publisher/receivers/controlSession/connections.
- close();
-
- // Apply all of the requested assertions, keeping record of any that fail.
- IList<Assertion> failures = applyAssertions(assertions);
-
- // Return any failed assertions to the caller.
- return failures;
- }
-
- /// <summary>
- /// Creates a message with the properties defined as per the test parameters.
- /// </summary>
- /// <param name="client"> The circuit end to create the message on. </param>
- ///
- /// <return> The test message. </return>
- ///
- /// <exception cref="JMSException"> Any JMSException occurring during creation of the message is allowed to fall through. </exception>
- private Message createTestMessage(CircuitEnd client) throws JMSException
- {
- // Cast the test properties into a typed interface for convenience.
- MessagingTestConfigProperties props = new MessagingTestConfigProperties(testProps);
-
- return TestUtils.createTestMessageOfSize(client.getSession(), props.getMessageSize());
- }
-
- /// <summary>
- /// Gets the exception monitor for the publishing ends connection.
- /// </summary>
- /// <return> The exception monitor for the publishing ends connection. </return>
- public ExceptionMonitor getConnectionExceptionMonitor()
- {
- return connectionExceptionMonitor;
- }
-
- /// <summary>
- /// Gets the exception monitor for the publishing ends controlSession.
- /// </summary>
- /// <return> The exception monitor for the publishing ends controlSession. </return>
- public ExceptionMonitor getExceptionMonitor()
- {
- return exceptionMonitor;
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Integration.Tests.framework.*;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.MessageConsumer;
-using javax.jms.MessageProducer;
-using javax.jms.Session;
-
-namespace Apache.Qpid.Integration.Tests.framework.localcircuit
-{
- /// <summary>
- /// Provides an implementation of the <see cref="Publisher"/> interface and wraps a single message producer and consumer on
- /// a single controlSession, as a <see cref="CircuitEnd"/>. A local publisher also acts as a circuit end, because for a locally
- /// located circuit the assertions may be applied directly, there does not need to be any inter-process messaging
- /// between the publisher and its single circuit end, in order to ascertain its status.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide a message producer for sending messages.
- /// <tr><td> Provide a message consumer for receiving messages.
- /// <tr><td> Provide assertion that the publisher received no exceptions.
- /// <tr><td> Provide assertion that the publisher received a no consumers error code.
- /// <tr><td> Provide assertion that the publisher received a no route error code.
- /// </table>
- /// </summary>
- public class LocalPublisherImpl extends CircuitEndBase : Publisher
- {
- /// <summary> Holds a reference to the containing circuit. </summary>
- protected LocalCircuitImpl circuit;
-
- /// <summary>
- /// Creates a circuit end point on the specified producer, consumer and controlSession. Monitors are also configured
- /// for messages and exceptions received by the circuit end.
- /// </summary>
- /// <param name="producer"> The message producer for the circuit end point. </param>
- /// <param name="consumer"> The message consumer for the circuit end point. </param>
- /// <param name="session"> The controlSession for the circuit end point. </param>
- /// <param name="messageMonitor"> The monitor to notify of all messages received by the circuit end. </param>
- /// <param name="exceptionMonitor"> The monitor to notify of all exceptions received by the circuit end. </param>
- public LocalPublisherImpl(MessageProducer producer, MessageConsumer consumer, Session session,
- MessageMonitor messageMonitor, ExceptionMonitor exceptionMonitor)
- {
- super(producer, consumer, session, messageMonitor, exceptionMonitor);
- }
-
- /// <summary>
- /// Creates a circuit end point from the producer, consumer and controlSession in a circuit end base implementation.
- /// </summary>
- /// <param name="end"> The circuit end base implementation to take producers and consumers from. </param>
- public LocalPublisherImpl(CircuitEndBase end)
- {
- super(end.getProducer(), end.getConsumer(), end.getSession(), end.getMessageMonitor(), end.getExceptionMonitor());
- }
-
- /// <summary> Provides an assertion that the publisher encountered no exceptions. </summary>
- ///
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the publisher encountered no exceptions. </return>
- public Assertion noExceptionsAssertion(ParsedProperties testProps)
- {
- return new AssertionBase()
- {
- public bool apply()
- {
- bool passed = true;
- ExceptionMonitor sessionExceptionMonitor = circuit.getExceptionMonitor();
- ExceptionMonitor connectionExceptionMonitor = circuit.getConnectionExceptionMonitor();
-
- if (!connectionExceptionMonitor.assertNoExceptions())
- {
- passed = false;
-
- addError("Was expecting no exceptions.\n");
- addError("Got the following exceptions on the connection, "
- + circuit.getConnectionExceptionMonitor());
- }
-
- if (!sessionExceptionMonitor.assertNoExceptions())
- {
- passed = false;
-
- addError("Was expecting no exceptions.\n");
- addError("Got the following exceptions on the producer, " + circuit.getExceptionMonitor());
- }
-
- return passed;
- }
- };
- }
-
- /// <summary>
- /// Provides an assertion that the AMQP channel was forcibly closed by an error condition.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the AMQP channel was forcibly closed by an error condition. </return>
- public Assertion channelClosedAssertion(ParsedProperties testProps)
- {
- return new NotApplicableAssertion(testProps);
- }
-
- /// <summary>
- /// Provides an assertion that the publisher got a given exception during the test.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <param name="exceptionClass"> The exception class to check for. </param>
- ///
- /// <return> An assertion that the publisher got a given exception during the test. </return>
- public Assertion exceptionAssertion(ParsedProperties testProps, final Class<? extends Exception> exceptionClass)
- {
- return new AssertionBase()
- {
- public bool apply()
- {
- bool passed = true;
- ExceptionMonitor connectionExceptionMonitor = circuit.getConnectionExceptionMonitor();
-
- if (!connectionExceptionMonitor.assertExceptionOfType(exceptionClass))
- {
- passed = false;
-
- addError("Was expecting linked exception type " + exceptionClass.getName()
- + " on the connection.\n");
- addError((connectionExceptionMonitor.size() > 0)
- ? ("Actually got the following exceptions on the connection, " + connectionExceptionMonitor)
- : "Got no exceptions on the connection.");
- }
-
- return passed;
- }
- };
- }
-
- /// <summary>
- /// Sets the contianing circuit.
- /// </summary>
- /// <param name="circuit"> The containing circuit. </param>
- public void setCircuit(LocalCircuitImpl circuit)
- {
- this.circuit = circuit;
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Integration.Tests.framework.*;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.MessageConsumer;
-using javax.jms.MessageProducer;
-using javax.jms.Session;
-
-namespace Apache.Qpid.Integration.Tests.framework.localcircuit
-{
- /// <summary>
- /// Provides an implementation of the <see cref="Receiver"/> interface that wraps a single message producer and consumer on
- /// a single controlSession, as a <see cref="CircuitEnd"/>. A local receiver also acts as a circuit end, because for a locally
- /// located circuit the assertions may be applied directly, there does not need to be any inter process messaging
- /// between the publisher and its single circuit end, in order to ascertain its status.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide a message producer for sending messages.
- /// <tr><td> Provide a message consumer for receiving messages.
- /// <tr><td> Provide assertion that the receivers received no exceptions.
- /// <tr><td> Provide assertion that the receivers received all test messages sent to it.
- /// </table>
- /// </summary>
- public class LocalReceiverImpl extends CircuitEndBase : Receiver
- {
- /// <summary> Holds a reference to the containing circuit. </summary>
- private LocalCircuitImpl circuit;
-
- /// <summary>
- /// Creates a circuit end point on the specified producer, consumer and controlSession. Monitors are also configured
- /// for messages and exceptions received by the circuit end.
- /// </summary>
- /// <param name="producer"> The message producer for the circuit end point. </param>
- /// <param name="consumer"> The message consumer for the circuit end point. </param>
- /// <param name="session"> The controlSession for the circuit end point. </param>
- /// <param name="messageMonitor"> The monitor to notify of all messages received by the circuit end. </param>
- /// <param name="exceptionMonitor"> The monitor to notify of all exceptions received by the circuit end. </param>
- public LocalReceiverImpl(MessageProducer producer, MessageConsumer consumer, Session session,
- MessageMonitor messageMonitor, ExceptionMonitor exceptionMonitor)
- {
- super(producer, consumer, session, messageMonitor, exceptionMonitor);
- }
-
- /// <summary>
- /// Creates a circuit end point from the producer, consumer and controlSession in a circuit end base implementation.
- /// </summary>
- /// <param name="end"> The circuit end base implementation to take producers and consumers from. </param>
- public LocalReceiverImpl(CircuitEndBase end)
- {
- super(end.getProducer(), end.getConsumer(), end.getSession(), end.getMessageMonitor(), end.getExceptionMonitor());
- }
-
- /// <summary>
- /// Provides an assertion that the receivers encountered no exceptions.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers encountered no exceptions. </return>
- public Assertion noExceptionsAssertion(ParsedProperties testProps)
- {
- return new NotApplicableAssertion(testProps);
- }
-
- /// <summary>
- /// Provides an assertion that the AMQP channel was forcibly closed by an error condition.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the AMQP channel was forcibly closed by an error condition. </return>
- public Assertion channelClosedAssertion(ParsedProperties testProps)
- {
- return new NotApplicableAssertion(testProps);
- }
-
- /// <summary>
- /// Provides an assertion that the receivers got all messages that were sent to it.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers got all messages that were sent to it. </return>
- public Assertion allMessagesReceivedAssertion(ParsedProperties testProps)
- {
- return new NotApplicableAssertion(testProps);
- }
-
- /// <summary>
- /// Provides an assertion that the receivers got none of the messages that were sent to it.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers got none of the messages that were sent to it. </return>
- public Assertion noMessagesReceivedAssertion(ParsedProperties testProps)
- {
- return new NotApplicableAssertion(testProps);
- }
-
- /// <summary>
- /// Provides an assertion that the receiver got a given exception during the test.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <param name="exceptionClass"> The exception class to check for. <return> An assertion that the receiver got a given exception during the test. </return> </param>
- public Assertion exceptionAssertion(ParsedProperties testProps, Class<? extends Exception> exceptionClass)
- {
- return new NotApplicableAssertion(testProps);
- }
-
- /// <summary>
- /// Sets the contianing circuit.
- /// </summary>
- /// <param name="circuit"> The containing circuit. </param>
- public void setCircuit(LocalCircuitImpl circuit)
- {
- this.circuit = circuit;
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.localcircuit.LocalCircuitImpl;
-using Apache.Qpid.Integration.Tests.framework.localcircuit.LocalPublisherImpl;
-using Apache.Qpid.Integration.Tests.framework.localcircuit.LocalReceiverImpl;
-using Apache.Qpid.Integration.Tests.framework.sequencers.CircuitFactory;
-using org.apache.qpid.util.ConversationFactory;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.*;
-
-using System.Collections.Generic.IList;
-using java.util.Properties;
-using java.util.concurrent.atomic.AtomicLong;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// LocalCircuitFactory is a circuit factory that creates test circuits with publishing and receiving ends rooted
- /// on the same JVM. The ends of the circuit are presented as <see cref="Publisher"/> and <see cref="Receiver"/> interfaces, which
- /// in turn provide methods to apply assertions to the circuit. The creation of the circuit ends, and the presentation
- /// of the ends as publisher/receiver interfaces, are designed to be overriden, so that circuits and assertions that
- /// use messaging features not available in JMS can be written. This provides an extension point for writing tests
- /// against proprietary features of JMS implementations.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide a standard test procedure over a test circuit.
- /// <tr><td> Construct test circuits appropriate to a tests context.
- /// </table>
- /// </summary>
- public class LocalCircuitFactory : CircuitFactory
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(LocalCircuitFactory));
-
- /// <summary> Used to create unique destination names for each test. </summary>
- protected static AtomicLong uniqueDestsId = new AtomicLong();
-
- /// <summary>
- /// Holds a test coordinating conversation with the test clients. This should consist of assigning the test roles,
- /// begining the test and gathering the test reports from the participants.
- /// </summary>
- /// <param name="testCircuit"> The test circuit. </param>
- /// <param name="assertions"> The list of assertions to apply to the test circuit. </param>
- /// <param name="testProperties"> The test case definition. </param>
- public void sequenceTest(Circuit testCircuit, IList<Assertion> assertions, Properties testProperties)
- {
- FrameworkBaseCase.assertNoFailures(testCircuit.test(1, assertions));
- }
-
- /// <summary>
- /// Creates a test circuit for the test, configered by the test parameters specified.
- /// </summary>
- /// <param name="testProperties"> The test parameters. </param>
- ///
- /// <return> A test circuit. </return>
- public Circuit createCircuit(ParsedProperties testProperties)
- {
- Circuit result;
-
- // Cast the test properties into a typed interface for convenience.
- MessagingTestConfigProperties props = new MessagingTestConfigProperties(testProperties);
-
- // Create a standard publisher/receivers test client pair on a shared connection, individual sessions.
- try
- {
- // Get a unique offset to append to destination names to make them unique to the connection.
- long uniqueId = uniqueDestsId.incrementAndGet();
-
- // Set up the connection.
- Connection connection = TestUtils.createConnection(testProperties);
-
- // Add the connection exception listener to assert on exception conditions with.
- // ExceptionMonitor exceptionMonitor = new ExceptionMonitor();
- // connection.setExceptionListener(exceptionMonitor);
-
- // Set up the publisher.
- CircuitEndBase publisherEnd = createPublisherCircuitEnd(connection, props, uniqueId);
-
- // Set up the receiver.
- CircuitEndBase receiverEnd = createReceiverCircuitEnd(connection, props, uniqueId);
-
- // Start listening for incoming messages.
- connection.start();
-
- // Namespace everything up.
- LocalPublisherImpl publisher = createPublisherFromCircuitEnd(publisherEnd);
- LocalReceiverImpl receiver = createReceiverFromCircuitEnd(receiverEnd);
-
- result = new LocalCircuitImpl(testProperties, publisher, receiver, connection, publisher.getExceptionMonitor());
- }
- catch (JMSException e)
- {
- throw new RuntimeException("Could not create publisher/receivers pair due to a JMSException.", e);
- }
-
- return result;
- }
-
- /// <summary>
- /// Creates a local <see cref="Receiver"/> from a <see cref="CircuitEnd"/>. Sub-classes may override this to provide more
- /// specialized receivers if necessary.
- /// </summary>
- /// <param name="receiverEnd"> The receiving circuit end. </param>
- ///
- /// <return> A <see cref="Receiver"/>. </return>
- protected LocalReceiverImpl createReceiverFromCircuitEnd(CircuitEndBase receiverEnd)
- {
- return new LocalReceiverImpl(receiverEnd);
- }
-
- /// <summary>
- /// Creates a local <see cref="Publisher"/> from a <see cref="CircuitEnd"/>. Sub-classes may override this to provide more
- /// specialized receivers if necessary.
- /// </summary>
- /// <param name="publisherEnd"> The publishing circuit end. </param>
- ///
- /// <return> A <see cref="Receiver"/>. </return>
- protected LocalPublisherImpl createPublisherFromCircuitEnd(CircuitEndBase publisherEnd)
- {
- return new LocalPublisherImpl(publisherEnd);
- }
-
- /// <summary>
- /// Builds a circuit end suitable for the publishing side of a test circuit, from standard test parameters.
- /// </summary>
- /// <param name="connection"> The connection to build the circuit end on. </param>
- /// <param name="testProps"> The test parameters to configure the circuit end construction. </param>
- /// <param name="uniqueId"> A unique number to being numbering destinations from, to make this circuit unique. </param>
- ///
- /// <return> A circuit end suitable for the publishing side of a test circuit. </return>
- ///
- /// <exception cref="JMSException"> Any underlying JMSExceptions are allowed to fall through and fail the creation. </exception>
- public CircuitEndBase createPublisherCircuitEnd(Connection connection, ParsedProperties testProps, long uniqueId)
- throws JMSException
- {
- log.debug(
- "public CircuitEndBase createPublisherCircuitEnd(Connection connection, ParsedProperties testProps, long uniqueId = "
- + uniqueId + "): called");
-
- // Cast the test properties into a typed interface for convenience.
- MessagingTestConfigProperties props = new MessagingTestConfigProperties(testProps);
-
- // Check that the test properties do not contain AMQP/Qpid specific settings, and fail if they do.
- if (props.getImmediate() || props.getMandatory())
- {
- throw new RuntimeException(
- "Cannot create a pure JMS circuit as the test properties require AMQP specific options.");
- }
-
- Session session = connection.createSession(props.getPublisherTransacted(), props.getAckMode());
-
- Destination destination =
- props.getPubsub() ? session.createTopic(props.getSendDestinationNameRoot() + "_" + uniqueId)
- : session.createQueue(props.getSendDestinationNameRoot() + "_" + uniqueId);
-
- MessageProducer producer = props.getPublisherProducerBind() ? session.createProducer(destination) : null;
-
- MessageConsumer consumer =
- props.getPublisherConsumerBind()
- ? session.createConsumer(session.createQueue(props.getReceiveDestinationNameRoot() + "_" + uniqueId)) : null;
-
- MessageMonitor messageMonitor = new MessageMonitor();
-
- if (consumer != null)
- {
- consumer.setMessageListener(messageMonitor);
- }
-
- ExceptionMonitor exceptionMonitor = new ExceptionMonitor();
- connection.setExceptionListener(exceptionMonitor);
-
- if (!props.getPublisherConsumerActive() && (consumer != null))
- {
- consumer.close();
- }
-
- return new CircuitEndBase(producer, consumer, session, messageMonitor, exceptionMonitor);
- }
-
- /// <summary>
- /// Builds a circuit end suitable for the receiving side of a test circuit, from standard test parameters.
- /// </summary>
- /// <param name="connection"> The connection to build the circuit end on. </param>
- /// <param name="testProps"> The test parameters to configure the circuit end construction. </param>
- /// <param name="uniqueId"> A unique number to being numbering destinations from, to make this circuit unique. </param>
- ///
- /// <return> A circuit end suitable for the receiving side of a test circuit. </return>
- ///
- /// <exception cref="JMSException"> Any underlying JMSExceptions are allowed to fall through and fail the creation. </exception>
- public CircuitEndBase createReceiverCircuitEnd(Connection connection, ParsedProperties testProps, long uniqueId)
- throws JMSException
- {
- log.debug(
- "public CircuitEndBase createReceiverCircuitEnd(Connection connection, ParsedProperties testProps, long uniqueId = "
- + uniqueId + "): called");
-
- // Cast the test properties into a typed interface for convenience.
- MessagingTestConfigProperties props = new MessagingTestConfigProperties(testProps);
-
- // Check that the test properties do not contain AMQP/Qpid specific settings, and fail if they do.
- if (props.getImmediate() || props.getMandatory())
- {
- throw new RuntimeException(
- "Cannot create a pure JMS circuit as the test properties require AMQP specific options.");
- }
-
- Session session = connection.createSession(props.getPublisherTransacted(), props.getAckMode());
-
- MessageProducer producer =
- props.getReceiverProducerBind()
- ? session.createProducer(session.createQueue(props.getReceiveDestinationNameRoot() + "_" + uniqueId)) : null;
-
- Destination destination =
- props.getPubsub() ? session.createTopic(props.getSendDestinationNameRoot() + "_" + uniqueId)
- : session.createQueue(props.getSendDestinationNameRoot() + "_" + uniqueId);
-
- MessageConsumer consumer =
- props.getReceiverConsumerBind()
- ? ((props.getDurableSubscription() && props.getPubsub())
- ? session.createDurableSubscriber((Topic) destination, "testsub") : session.createConsumer(destination))
- : null;
-
- MessageMonitor messageMonitor = new MessageMonitor();
-
- if (consumer != null)
- {
- consumer.setMessageListener(messageMonitor);
- }
-
- if (!props.getReceiverConsumerActive() && (consumer != null))
- {
- consumer.close();
- }
-
- return new CircuitEndBase(producer, consumer, session, messageMonitor, null);
- }
-
- /// <summary>
- /// Sets the sender test client to coordinate the test with.
- /// </summary>
- /// <param name="sender"> The contact details of the sending client in the test. </param>
- public void setSender(TestClientDetails sender)
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Sets the receiving test client to coordinate the test with.
- /// </summary>
- /// <param name="receiver"> The contact details of the sending client in the test. </param>
- public void setReceiver(TestClientDetails receiver)
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Supplies the sending test client.
- /// </summary>
- /// <return> The sending test client. </return>
- public TestClientDetails getSender()
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Supplies the receiving test client.
- /// </summary>
- /// <return> The receiving test client. </return>
- public IList<TestClientDetails> getReceivers()
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Accepts the conversation factory over which to hold the test coordinating conversation.
- /// </summary>
- /// <param name="conversationFactory"> The conversation factory to coordinate the test over. </param>
- public void setConversationFactory(ConversationFactory conversationFactory)
- {
- throw new RuntimeException("Not implemented.");
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// MessageIdentityVector provides a message identification scheme, that matches individual messages with test cases.
- /// Test messages are being sent by a number of test clients, sending messages over a set of routes, and being received
- /// by another set of test clients. Each test is itself, being run within a test cycle, of which there could be many. It
- /// is the job of the test coordinator to request and receive reports from the available test clients, on what has been
- /// sent, what has been received, and what errors may have occurred, and to reconcile this information against the
- /// assertions being applied by the test case. In order to be able to figure out which messages belong to which test,
- /// there needs to be an identification scheme, that the coordinator can use to correlate messages in senders and
- /// receiver reports. Every message sent in a test can be associated with this information.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Identify a test case, a handling client id, a circuit end within the client, and a test cycle number.
- /// </table>
- /// </summary>
- public class MessageIdentityVector
- {
- /// <summary> Holds the test case vector component of the message identity vector. </summary>
- private TestCaseVector testCaseVector;
-
- /// <summary> The unique client id. </summary>
- private string clientId;
-
- /// <summary> The unique circuit end number within the client id. </summary>
- private int circuitEndId;
-
- /// <summary>
- /// Creates a new identity vector for test messages.
- /// </summary>
- /// <param name="testCase"> The name of the test case generating the messages. </param>
- /// <param name="clientId"> The unique id of the client implementing a circuit end that is handling the messages. </param>
- /// <param name="circuitEndId"> The unique id number of the circuit end within the client. </param>
- /// <param name="testCycleNumber"> The cycle iteration number of the test case. </param>
- public MessageIdentityVector(string testCase, string clientId, int circuitEndId, int testCycleNumber)
- {
- this.testCaseVector = new TestCaseVector(testCase, testCycleNumber);
- this.clientId = clientId;
- this.circuitEndId = circuitEndId;
- }
-
- /// <summary>
- /// Reports the test case vector component of the message identity vector.
- /// </summary>
- /// <return> The test case vector component of the message identity vector. </return>
- public TestCaseVector getTestCaseVector()
- {
- return testCaseVector;
- }
-
- /// <summary>
- /// Reports the name of the test case.
- /// </summary>
- /// <return> The name of the test case. </return>
- public string getTestCase()
- {
- return testCaseVector.getTestCase();
- }
-
- /// <summary>
- /// Reports the test iteration cycle number within the test case.
- /// </summary>
- /// <return> The test iteration cycle number within the test case. </return>
- public int getTestCycleNumber()
- {
- return testCaseVector.getTestCycleNumber();
- }
-
- /// <summary>
- /// Resports the client id.
- /// </summary>
- /// <return> The client id. </return>
- public string getClientId()
- {
- return clientId;
- }
-
- /// <summary>
- /// Reports the circuit end number within the test client.
- /// </summary>
- /// <return> The circuit end number within the test client. </return>
- public int getCircuitEndId()
- {
- return circuitEndId;
- }
-
- /// <summary>
- /// Compares this identity vector with another for equality. All fields must match.
- /// </summary>
- /// <param name="o"> The identity vector to compare with. </param>
- ///
- /// <return> <tt>true</tt> if the identity vector is identical to this one by all fields, <tt>false</tt> otherwise. </return>
- public bool equals(Object o)
- {
- if (this == o)
- {
- return true;
- }
-
- if ((o == null) || (getClass() != o.getClass()))
- {
- return false;
- }
-
- MessageIdentityVector that = (MessageIdentityVector) o;
-
- if (circuitEndId != that.circuitEndId)
- {
- return false;
- }
-
- if ((clientId != null) ? (!clientId.equals(that.clientId)) : (that.clientId != null))
- {
- return false;
- }
-
- if ((testCaseVector != null) ? (!testCaseVector.equals(that.testCaseVector)) : (that.testCaseVector != null))
- {
- return false;
- }
-
- return true;
- }
-
- /// <summary>
- /// Computes a hash code for this identity vector based on all fields.
- /// </summary>
- /// <return> A hash code for this identity vector based on all fields. </return>
- public int hashCode()
- {
- int result;
- result = ((testCaseVector != null) ? testCaseVector.hashCode() : 0);
- result = (31 * result) + ((clientId != null) ? clientId.hashCode() : 0);
- result = (31 * result) + circuitEndId;
-
- return result;
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using javax.jms.Message;
-using javax.jms.MessageListener;
-
-using java.util.concurrent.atomic.AtomicInteger;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// MessageMonitor is used to record information about messages received. This will provide methods to check various
- /// properties, such as the type, number and content of messages received in order to verify the correct behaviour of
- /// tests.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Count incoming messages.
- /// <tr><td> Record time ellapsed since the arrival of the first message.
- /// <tr><td> Reset all counts and timings.
- /// </table>
- /// </summary>
- public class MessageMonitor : MessageListener
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(MessageMonitor));
-
- /// <summary> Holds the count of messages received since the last query. </summary>
- protected AtomicInteger numMessages = new AtomicInteger();
-
- /// <summary> Holds the time of arrival of the first message. </summary>
- protected Long firstMessageTime = null;
-
- /// <summary>
- /// Handles received messages. Does Nothing.
- /// </summary>
- /// <param name="message"> The message. Ignored. </param>
- public void onMessage(Message message)
- {
- // log.debug("public void onMessage(Message message): called");
-
- numMessages.getAndIncrement();
- }
-
- /// <summary>
- /// Gets the count of messages.
- /// </summary>
- /// <return> The count of messages. </return>
- public int getNumMessage()
- {
- if (firstMessageTime == null)
- {
- firstMessageTime = System.nanoTime();
- }
-
- return numMessages.get();
- }
-
- /// <summary>
- /// Gets the time elapsed since the first message arrived, in nanos, or zero if no messages have arrived yet.
- /// </summary>
- /// <return> The time elapsed since the first message arrived, in nanos, or zero if no messages have arrived yet. </return>
- public long getTime()
- {
- if (firstMessageTime != null)
- {
- return System.nanoTime() - firstMessageTime;
- }
- else
- {
- return 0L;
- }
- }
-
- /// <summary> Resets the message count and timer to zero. </summary>
- public void reset()
- {
- numMessages.set(0);
- firstMessageTime = null;
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.Session;
-
-using java.util.Properties;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// MessagingTestConfigProperties defines a set of property names and default values for specifying a messaging topology,
- /// and test parameters for running a messaging test over that topology. A Properties object holding some of these
- /// properties, superimposed onto the defaults, is used to establish test topologies and control test behaviour.
- ///
- /// <p/>A complete list of the parameters, default values and comments on their usage is provided here:
- ///
- /// <p/><table><caption>Parameters</caption>
- /// <tr><th> Parameter <th> Default <th> Comments
- /// <tr><td> messageSize <td> 0 <td> Message size in bytes. Not including any headers.
- /// <tr><td> destinationName <td> ping <td> The root name to use to generate destination names to ping.
- /// <tr><td> persistent <td> false <td> Determines whether peristent delivery is used.
- /// <tr><td> transacted <td> false <td> Determines whether messages are sent/received in transactions.
- /// <tr><td> broker <td> tcp://localhost:5672 <td> Determines the broker to connect to.
- /// <tr><td> virtualHost <td> test <td> Determines the virtual host to send all ping over.
- /// <tr><td> rate <td> 0 <td> The maximum rate (in hertz) to send messages at. 0 means no limit.
- /// <tr><td> verbose <td> false <td> The verbose flag for debugging. Prints to console on every message.
- /// <tr><td> pubsub <td> false <td> Whether to ping topics or queues. Uses p2p by default.
- /// <tr><td> username <td> guest <td> The username to access the broker with.
- /// <tr><td> password <td> guest <td> The password to access the broker with.
- /// <tr><td> selector <td> null <td> Not used. Defines a message selector to filter pings with.
- /// <tr><td> destinationCount <td> 1 <td> The number of receivers listening to the pings.
- /// <tr><td> timeout <td> 30000 <td> In milliseconds. The timeout to stop waiting for replies.
- /// <tr><td> commitBatchSize <td> 1 <td> The number of messages per transaction in transactional mode.
- /// <tr><td> uniqueDests <td> true <td> Whether each receivers only listens to one ping destination or all.
- /// <tr><td> durableDests <td> false <td> Whether or not durable destinations are used.
- /// <tr><td> ackMode <td> AUTO_ACK <td> The message acknowledgement mode. Possible values are:
- /// 0 - SESSION_TRANSACTED
- /// 1 - AUTO_ACKNOWLEDGE
- /// 2 - CLIENT_ACKNOWLEDGE
- /// 3 - DUPS_OK_ACKNOWLEDGE
- /// 257 - NO_ACKNOWLEDGE
- /// 258 - PRE_ACKNOWLEDGE
- /// <tr><td> maxPending <td> 0 <td> The maximum size in bytes, of messages sent but not yet received.
- /// Limits the volume of messages currently buffered on the client
- /// or broker. Can help scale test clients by limiting amount of buffered
- /// data to avoid out of memory errors.
- /// </table>
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide the names and defaults of all test parameters.
- /// </table>
- /// </summary>
- ///
- /// <remarks> Put a type-safe wrapper around these properties, but continue to store the parameters as properties. This is
- /// simply to ensure that it is a simple matter to serialize/deserialize string/string pairs onto messages.</remarks>
- public class MessagingTestConfigProperties extends ParsedProperties
- {
- // ====================== Connection Properties ==================================
-
- /// <summary> Holds the name of the default connection configuration. </summary>
- public static final string CONNECTION_NAME = "broker";
-
- /// <summary> Holds the name of the property to get the initial context factory name from. </summary>
- public static final string INITIAL_CONTEXT_FACTORY_PROPNAME = "java.naming.factory.initial";
-
- /// <summary> Defines the class to use as the initial context factory by default. </summary>
- public static final string INITIAL_CONTEXT_FACTORY_DEFAULT = "org.apache.qpid.jndi.PropertiesFileInitialContextFactory";
-
- /// <summary> Holds the name of the property to get the test broker url from. </summary>
- public static final string BROKER_PROPNAME = "qpid.test.broker";
-
- /// <summary> Holds the default broker url for the test. </summary>
- public static final string BROKER_DEFAULT = "vm://:1";
-
- /// <summary> Holds the name of the property to get the test broker virtual path. </summary>
- public static final string VIRTUAL_HOST_PROPNAME = "virtualHost";
-
- /// <summary> Holds the default virtual path for the test. </summary>
- public static final string VIRTUAL_HOST_DEFAULT = "";
-
- /// <summary> Holds the name of the property to get the broker access username from. </summary>
- public static final string USERNAME_PROPNAME = "username";
-
- /// <summary> Holds the default broker log on username. </summary>
- public static final string USERNAME_DEFAULT = "guest";
-
- /// <summary> Holds the name of the property to get the broker access password from. </summary>
- public static final string PASSWORD_PROPNAME = "password";
-
- /// <summary> Holds the default broker log on password. </summary>
- public static final string PASSWORD_DEFAULT = "guest";
-
- // ====================== Messaging Topology Properties ==========================
-
- /// <summary> Holds the name of the property to get the bind publisher procuder flag from. </summary>
- public static final string PUBLISHER_PRODUCER_BIND_PROPNAME = "publisherProducerBind";
-
- /// <summary> Holds the default value of the publisher producer flag. </summary>
- public static final bool PUBLISHER_PRODUCER_BIND_DEFAULT = true;
-
- /// <summary> Holds the name of the property to get the bind publisher procuder flag from. </summary>
- public static final string PUBLISHER_CONSUMER_BIND_PROPNAME = "publisherConsumerBind";
-
- /// <summary> Holds the default value of the publisher consumer flag. </summary>
- public static final bool PUBLISHER_CONSUMER_BIND_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the bind receivers procuder flag from. </summary>
- public static final string RECEIVER_PRODUCER_BIND_PROPNAME = "receiverProducerBind";
-
- /// <summary> Holds the default value of the receivers producer flag. </summary>
- public static final bool RECEIVER_PRODUCER_BIND_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the bind receivers procuder flag from. </summary>
- public static final string RECEIVER_CONSUMER_BIND_PROPNAME = "receiverConsumerBind";
-
- /// <summary> Holds the default value of the receivers consumer flag. </summary>
- public static final bool RECEIVER_CONSUMER_BIND_DEFAULT = true;
-
- /// <summary> Holds the name of the property to get the publishers consumer active flag from. </summary>
- public static final string PUBLISHER_CONSUMER_ACTIVE_PROPNAME = "publisherConsumerActive";
-
- /// <summary> Holds the default value of the publishers consumer active flag. </summary>
- public static final bool PUBLISHER_CONSUMER_ACTIVE_DEFAULT = true;
-
- /// <summary> Holds the name of the property to get the receivers consumer active flag from. </summary>
- public static final string RECEIVER_CONSUMER_ACTIVE_PROPNAME = "receiverConsumerActive";
-
- /// <summary> Holds the default value of the receivers consumer active flag. </summary>
- public static final bool RECEIVER_CONSUMER_ACTIVE_DEFAULT = true;
-
- /// <summary> Holds the name of the property to get the destination name root from. </summary>
- public static final string SEND_DESTINATION_NAME_ROOT_PROPNAME = "sendDestinationRoot";
-
- /// <summary> Holds the root of the name of the default destination to send to. </summary>
- public static final string SEND_DESTINATION_NAME_ROOT_DEFAULT = "sendTo";
-
- /// <summary> Holds the name of the property to get the destination name root from. </summary>
- public static final string RECEIVE_DESTINATION_NAME_ROOT_PROPNAME = "receiveDestinationRoot";
-
- /// <summary> Holds the root of the name of the default destination to send to. </summary>
- public static final string RECEIVE_DESTINATION_NAME_ROOT_DEFAULT = "receiveFrom";
-
- /// <summary> Holds the name of the proeprty to get the destination count from. </summary>
- public static final string DESTINATION_COUNT_PROPNAME = "destinationCount";
-
- /// <summary> Defines the default number of destinations to ping. </summary>
- public static final int DESTINATION_COUNT_DEFAULT = 1;
-
- /// <summary> Holds the name of the property to get the p2p or pub/sub messaging mode from. </summary>
- public static final string PUBSUB_PROPNAME = "pubsub";
-
- /// <summary> Holds the pub/sub mode default, true means ping a topic, false means ping a queue. </summary>
- public static final bool PUBSUB_DEFAULT = false;
-
- // ====================== JMS Options and Flags =================================
-
- /// <summary> Holds the name of the property to get the test delivery mode from. </summary>
- public static final string PERSISTENT_MODE_PROPNAME = "persistent";
-
- /// <summary> Holds the message delivery mode to use for the test. </summary>
- public static final bool PERSISTENT_MODE_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the test transactional mode from. </summary>
- public static final string TRANSACTED_PUBLISHER_PROPNAME = "transactedPublisher";
-
- /// <summary> Holds the transactional mode to use for the test. </summary>
- public static final bool TRANSACTED_PUBLISHER_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the test transactional mode from. </summary>
- public static final string TRANSACTED_RECEIVER_PROPNAME = "transactedReceiver";
-
- /// <summary> Holds the transactional mode to use for the test. </summary>
- public static final bool TRANSACTED_RECEIVER_DEFAULT = false;
-
- /// <summary> Holds the name of the property to set the no local flag from. </summary>
- public static final string NO_LOCAL_PROPNAME = "noLocal";
-
- /// <summary> Defines the default value of the no local flag to use when consuming messages. </summary>
- public static final bool NO_LOCAL_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the message acknowledgement mode from. </summary>
- public static final string ACK_MODE_PROPNAME = "ackMode";
-
- /// <summary> Defines the default message acknowledgement mode. </summary>
- public static final int ACK_MODE_DEFAULT = Session.AUTO_ACKNOWLEDGE;
-
- /// <summary> Holds the name of the property to get the durable subscriptions flag from, when doing pub/sub messaging. </summary>
- public static final string DURABLE_SUBSCRIPTION_PROPNAME = "durableSubscription";
-
- /// <summary> Defines the default value of the durable subscriptions flag. </summary>
- public static final bool DURABLE_SUBSCRIPTION_DEFAULT = false;
-
- // ====================== Qpid/AMQP Options and Flags ================================
-
- /// <summary> Holds the name of the property to set the exclusive flag from. </summary>
- public static final string EXCLUSIVE_PROPNAME = "exclusive";
-
- /// <summary> Defines the default value of the exclusive flag to use when consuming messages. </summary>
- public static final bool EXCLUSIVE_DEFAULT = false;
-
- /// <summary> Holds the name of the property to set the immediate flag from. </summary>
- public static final string IMMEDIATE_PROPNAME = "immediate";
-
- /// <summary> Defines the default value of the immediate flag to use when sending messages. </summary>
- public static final bool IMMEDIATE_DEFAULT = false;
-
- /// <summary> Holds the name of the property to set the mandatory flag from. </summary>
- public static final string MANDATORY_PROPNAME = "mandatory";
-
- /// <summary> Defines the default value of the mandatory flag to use when sending messages. </summary>
- public static final bool MANDATORY_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the durable destinations flag from. </summary>
- public static final string DURABLE_DESTS_PROPNAME = "durableDests";
-
- /// <summary> Default value for the durable destinations flag. </summary>
- public static final bool DURABLE_DESTS_DEFAULT = false;
-
- /// <summary> Holds the name of the property to set the prefetch size from. </summary>
- public static final string PREFETCH_PROPNAME = "prefetch";
-
- /// <summary> Defines the default prefetch size to use when consuming messages. </summary>
- public static final int PREFETCH_DEFAULT = 100;
-
- // ====================== Common Test Parameters ================================
-
- /// <summary> Holds the name of the property to get the test message size from. </summary>
- public static final string MESSAGE_SIZE_PROPNAME = "messageSize";
-
- /// <summary> Used to set up a default message size. </summary>
- public static final int MESSAGE_SIZE_DEAFULT = 0;
-
- /// <summary> Holds the name of the property to get the message rate from. </summary>
- public static final string RATE_PROPNAME = "rate";
-
- /// <summary> Defines the default rate (in pings per second) to send pings at. 0 means as fast as possible, no restriction. </summary>
- public static final int RATE_DEFAULT = 0;
-
- /// <summary> Holds the name of the proeprty to get the. </summary>
- public static final string SELECTOR_PROPNAME = "selector";
-
- /// <summary> Holds the default message selector. </summary>
- public static final string SELECTOR_DEFAULT = "";
-
- /// <summary> Holds the name of the property to get the waiting timeout for response messages. </summary>
- public static final string TIMEOUT_PROPNAME = "timeout";
-
- /// <summary> Default time to wait before assuming that a ping has timed out. </summary>
- public static final long TIMEOUT_DEFAULT = 30000;
-
- /// <summary> Holds the name of the property to get the commit batch size from. </summary>
- public static final string TX_BATCH_SIZE_PROPNAME = "commitBatchSize";
-
- /// <summary> Defines the default number of pings to send in each transaction when running transactionally. </summary>
- public static final int TX_BATCH_SIZE_DEFAULT = 1;
-
- /// <summary> Holds the name of the property to set the maximum amount of pending message data for a producer to hold. </summary>
- public static final string MAX_PENDING_PROPNAME = "maxPending";
-
- /// <summary> Defines the default maximum quantity of pending message data to allow producers to hold. </summary>
- public static final int MAX_PENDING_DEFAULT = 0;
-
- /// <summary> Holds the name of the property to get the publisher rollback flag from. </summary>
- public static final string ROLLBACK_PUBLISHER_PROPNAME = "rollbackPublisher";
-
- /// <summary> Holds the default publisher roll back setting. </summary>
- public static final bool ROLLBACK_PUBLISHER_DEFAULT = false;
-
- /// <summary> Holds the name of the property to get the publisher rollback flag from. </summary>
- public static final string ROLLBACK_RECEIVER_PROPNAME = "rollbackReceiver";
-
- /// <summary> Holds the default publisher roll back setting. </summary>
- public static final bool ROLLBACK_RECEIVER_DEFAULT = false;
-
- // ====================== Options that control the bahviour of the test framework. =========================
-
- /// <summary> Holds the name of the property to get the behavioural mode of not applicable assertions. </summary>
- public static final string NOT_APPLICABLE_ASSERTION_PROPNAME = "notApplicableAssertion";
-
- /// <summary> Holds the default behavioral mode of not applicable assertions, which is logging them as a warning. </summary>
- public static final string NOT_APPLICABLE_ASSERTION_DEFAULT = "warn";
-
- /// <summary> Holds the name of the property to get the verbose mode proeprty from. </summary>
- public static final string VERBOSE_PROPNAME = "verbose";
-
- /// <summary> Holds the default verbose mode. </summary>
- public static final bool VERBOSE_DEFAULT = false;
-
- /// <summary> Holds the default configuration properties. </summary>
- public static ParsedProperties defaults = new ParsedProperties();
-
- static
- {
- defaults.setPropertyIfNull(INITIAL_CONTEXT_FACTORY_PROPNAME, INITIAL_CONTEXT_FACTORY_DEFAULT);
- defaults.setPropertyIfNull(BROKER_PROPNAME, BROKER_DEFAULT);
- defaults.setPropertyIfNull(VIRTUAL_HOST_PROPNAME, VIRTUAL_HOST_DEFAULT);
- defaults.setPropertyIfNull(USERNAME_PROPNAME, USERNAME_DEFAULT);
- defaults.setPropertyIfNull(PASSWORD_PROPNAME, PASSWORD_DEFAULT);
-
- defaults.setPropertyIfNull(PUBLISHER_PRODUCER_BIND_PROPNAME, PUBLISHER_PRODUCER_BIND_DEFAULT);
- defaults.setPropertyIfNull(PUBLISHER_CONSUMER_BIND_PROPNAME, PUBLISHER_CONSUMER_BIND_DEFAULT);
- defaults.setPropertyIfNull(RECEIVER_PRODUCER_BIND_PROPNAME, RECEIVER_PRODUCER_BIND_DEFAULT);
- defaults.setPropertyIfNull(RECEIVER_CONSUMER_BIND_PROPNAME, RECEIVER_CONSUMER_BIND_DEFAULT);
- defaults.setPropertyIfNull(PUBLISHER_CONSUMER_ACTIVE_PROPNAME, PUBLISHER_CONSUMER_ACTIVE_DEFAULT);
- defaults.setPropertyIfNull(RECEIVER_CONSUMER_ACTIVE_PROPNAME, RECEIVER_CONSUMER_ACTIVE_DEFAULT);
- defaults.setPropertyIfNull(SEND_DESTINATION_NAME_ROOT_PROPNAME, SEND_DESTINATION_NAME_ROOT_DEFAULT);
- defaults.setPropertyIfNull(RECEIVE_DESTINATION_NAME_ROOT_PROPNAME, RECEIVE_DESTINATION_NAME_ROOT_DEFAULT);
- defaults.setPropertyIfNull(DESTINATION_COUNT_PROPNAME, DESTINATION_COUNT_DEFAULT);
- defaults.setPropertyIfNull(PUBSUB_PROPNAME, PUBSUB_DEFAULT);
-
- defaults.setPropertyIfNull(PERSISTENT_MODE_PROPNAME, PERSISTENT_MODE_DEFAULT);
- defaults.setPropertyIfNull(TRANSACTED_PUBLISHER_PROPNAME, TRANSACTED_PUBLISHER_DEFAULT);
- defaults.setPropertyIfNull(TRANSACTED_RECEIVER_PROPNAME, TRANSACTED_RECEIVER_DEFAULT);
- defaults.setPropertyIfNull(NO_LOCAL_PROPNAME, NO_LOCAL_DEFAULT);
- defaults.setPropertyIfNull(ACK_MODE_PROPNAME, ACK_MODE_DEFAULT);
- defaults.setPropertyIfNull(DURABLE_SUBSCRIPTION_PROPNAME, DURABLE_SUBSCRIPTION_DEFAULT);
-
- defaults.setPropertyIfNull(EXCLUSIVE_PROPNAME, EXCLUSIVE_DEFAULT);
- defaults.setPropertyIfNull(IMMEDIATE_PROPNAME, IMMEDIATE_DEFAULT);
- defaults.setPropertyIfNull(MANDATORY_PROPNAME, MANDATORY_DEFAULT);
- defaults.setPropertyIfNull(DURABLE_DESTS_PROPNAME, DURABLE_DESTS_DEFAULT);
- defaults.setPropertyIfNull(PREFETCH_PROPNAME, PREFETCH_DEFAULT);
-
- defaults.setPropertyIfNull(MESSAGE_SIZE_PROPNAME, MESSAGE_SIZE_DEAFULT);
- defaults.setPropertyIfNull(RATE_PROPNAME, RATE_DEFAULT);
- defaults.setPropertyIfNull(SELECTOR_PROPNAME, SELECTOR_DEFAULT);
- defaults.setPropertyIfNull(TIMEOUT_PROPNAME, TIMEOUT_DEFAULT);
- defaults.setPropertyIfNull(TX_BATCH_SIZE_PROPNAME, TX_BATCH_SIZE_DEFAULT);
- defaults.setPropertyIfNull(MAX_PENDING_PROPNAME, MAX_PENDING_DEFAULT);
- defaults.setPropertyIfNull(ROLLBACK_PUBLISHER_PROPNAME, ROLLBACK_PUBLISHER_DEFAULT);
- defaults.setPropertyIfNull(ROLLBACK_RECEIVER_PROPNAME, ROLLBACK_RECEIVER_DEFAULT);
-
- defaults.setPropertyIfNull(NOT_APPLICABLE_ASSERTION_PROPNAME, NOT_APPLICABLE_ASSERTION_DEFAULT);
- defaults.setPropertyIfNull(VERBOSE_PROPNAME, VERBOSE_DEFAULT);
- }
-
- /// <summary> Creates a test configuration based on the defaults. </summary>
- public MessagingTestConfigProperties()
- {
- super(defaults);
- }
-
- /// <summary>
- /// Creates a test configuration based on the supplied properties.
- /// </summary>
- /// <param name="properties"> The test configuration. </param>
- public MessagingTestConfigProperties(Properties properties)
- {
- super(properties);
- }
-
- /// <summary>
- /// The size of test messages to send.
- /// </summary>
- /// <return> The size of test messages to send. </return>
- public int getMessageSize()
- {
- return getPropertyAsInteger(MESSAGE_SIZE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the publishing producer should be set up to publish to a destination.
- /// </summary>
- /// <return> Flag to indicate that the publishing producer should be set up to publish to a destination. </return>
- public bool getPublisherProducerBind()
- {
- return getPropertyAsBoolean(PUBLISHER_PRODUCER_BIND_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the publishing consumer should be set up to receive from a destination.
- /// </summary>
- /// <return> Flag to indicate that the publishing consumer should be set up to receive from a destination. </return>
- public bool getPublisherConsumerBind()
- {
- return getPropertyAsBoolean(PUBLISHER_CONSUMER_BIND_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the receiving producer should be set up to publish to a destination.
- /// </summary>
- /// <return> Flag to indicate that the receiving producer should be set up to publish to a destination. </return>
- public bool getReceiverProducerBind()
- {
- return getPropertyAsBoolean(RECEIVER_PRODUCER_BIND_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the receiving consumer should be set up to receive from a destination.
- /// </summary>
- /// <return> Flag to indicate that the receiving consumer should be set up to receive from a destination. </return>
- public bool getReceiverConsumerBind()
- {
- return getPropertyAsBoolean(RECEIVER_CONSUMER_BIND_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the publishing consumer should be created and actively listening.
- /// </summary>
- /// <return> Flag to indicate that the publishing consumer should be created. </return>
- public bool getPublisherConsumerActive()
- {
- return getPropertyAsBoolean(PUBLISHER_CONSUMER_ACTIVE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that the receiving consumers should be created and actively listening.
- /// </summary>
- /// <return> Flag to indicate that the receiving consumers should be created and actively listening. </return>
- public bool getReceiverConsumerActive()
- {
- return getPropertyAsBoolean(RECEIVER_CONSUMER_ACTIVE_PROPNAME);
- }
-
- /// <summary>
- /// A root to create all test destination names from.
- /// </summary>
- /// <return> A root to create all test destination names from. </return>
- public string getSendDestinationNameRoot()
- {
- return getProperty(SEND_DESTINATION_NAME_ROOT_PROPNAME);
- }
-
- /// <summary>
- /// A root to create all receiving destination names from.
- /// </summary>
- /// <return> A root to create all receiving destination names from. </return>
- public string getReceiveDestinationNameRoot()
- {
- return getProperty(RECEIVE_DESTINATION_NAME_ROOT_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that persistent messages should be used.
- /// </summary>
- /// <return> Flag to indicate that persistent messages should be used. </return>
- public bool getPersistentMode()
- {
- return getPropertyAsBoolean(PERSISTENT_MODE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that transactional messages should be sent by the publisher.
- /// </summary>
- /// <return> Flag to indicate that transactional messages should be sent by the publisher. </return>
- public bool getPublisherTransacted()
- {
- return getPropertyAsBoolean(TRANSACTED_PUBLISHER_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that transactional receives should be used by the receiver.
- /// </summary>
- /// <return> Flag to indicate that transactional receives should be used by the receiver. </return>
- public bool getReceiverTransacted()
- {
- return getPropertyAsBoolean(TRANSACTED_PUBLISHER_PROPNAME);
- }
-
- /// <summary>
- /// The name of the virtual host to run all tests over.
- /// </summary>
- /// <return> The name of the virtual host to run all tests over. </return>
- public string getVirtualHost()
- {
- return getProperty(VIRTUAL_HOST_PROPNAME);
- }
-
- /// <summary>
- /// Limiting rate for each sender in messages per second, or zero for unlimited.
- /// </summary>
- /// <return> Limiting rate for each sender in messages per second, or zero for unlimited. </return>
- public string getRate()
- {
- return getProperty(RATE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that test messages should be received publish/subscribe style by all receivers.
- /// </summary>
- /// <return> Flag to indicate that test messages should be received publish/subscribe style by all receivers. </return>
- public bool getPubsub()
- {
- return getPropertyAsBoolean(PUBSUB_PROPNAME);
- }
-
- /// <summary>
- /// The username credentials to run tests with.
- /// </summary>
- /// <return> The username credentials to run tests with. </return>
- public string getUsername()
- {
- return getProperty(USERNAME_PROPNAME);
- }
-
- /// <summary>
- /// The password credentials to run tests with.
- /// </summary>
- /// <return> The password credentials to run tests with. </return>
- public string getPassword()
- {
- return getProperty(PASSWORD_PROPNAME);
- }
-
- /// <summary>
- /// The timeout duration to fail tests on, should they receive no messages within it.
- /// </summary>
- /// <return> The timeout duration to fail tests on, should they receive no messages within it. </return>
- public long getTimeout()
- {
- return getPropertyAsLong(TIMEOUT_PROPNAME);
- }
-
- /// <summary>
- /// The number of messages to batch into each transaction in transational tests.
- /// </summary>
- /// <return> The number of messages to batch into each transaction in transational tests. </return>
- public int getTxBatchSize()
- {
- return getPropertyAsInteger(TX_BATCH_SIZE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that tests should use durable destinations.
- /// </summary>
- /// <return> Flag to indicate that tests should use durable destinations. </return>
- public bool getDurableDests()
- {
- return getPropertyAsBoolean(DURABLE_DESTS_PROPNAME);
- }
-
- /// <summary>
- /// The ack mode for message receivers to use.
- /// </summary>
- /// <return> The ack mode for message receivers to use. </return>
- public int getAckMode()
- {
- return getPropertyAsInteger(ACK_MODE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that tests should use durable subscriptions.
- /// </summary>
- /// <return> Flag to indicate that tests should use durable subscriptions. </return>
- public bool getDurableSubscription()
- {
- return getPropertyAsBoolean(DURABLE_SUBSCRIPTION_PROPNAME);
- }
-
- /// <summary>
- /// The maximum amount of in-flight data, in bytes, that tests should send at any time.
- /// </summary>
- /// <return> The maximum amount of in-flight data, in bytes, that tests should send at any time. </return>
- public int getMaxPending()
- {
- return getPropertyAsInteger(MAX_PENDING_PROPNAME);
- }
-
- /// <summary>
- /// The size of the prefetch queue to use.
- /// </summary>
- /// <return> The size of the prefetch queue to use. </return>
- public int getPrefetch()
- {
- return getPropertyAsInteger(PREFETCH_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that subscriptions should be no-local.
- /// </summary>
- /// <return> Flag to indicate that subscriptions should be no-local. </return>
- public bool getNoLocal()
- {
- return getPropertyAsBoolean(NO_LOCAL_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that subscriptions should be exclusive.
- /// </summary>
- /// <return> Flag to indicate that subscriptions should be exclusive. </return>
- public bool getExclusive()
- {
- return getPropertyAsBoolean(EXCLUSIVE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that messages must be delivered immediately.
- /// </summary>
- /// <return> Flag to indicate that messages must be delivered immediately. </return>
- public bool getImmediate()
- {
- return getPropertyAsBoolean(IMMEDIATE_PROPNAME);
- }
-
- /// <summary>
- /// Flag to indicate that messages must be routable.
- /// </summary>
- /// <return> Flag to indicate that messages must be routable. </return>
- public bool getMandatory()
- {
- return getPropertyAsBoolean(MANDATORY_PROPNAME);
- }
-
- /// <summary>
- /// Gets the value of a flag to indicate that the publisher should rollback all messages sent.
- /// </summary>
- /// <return> A flag to indicate that the publisher should rollback all messages sent. </return>
- public bool getRollbackPublisher()
- {
- return getPropertyAsBoolean(ROLLBACK_PUBLISHER_PROPNAME);
- }
-
- /// <summary>
- /// Gets the value of a flag to indicate that the receiver should rollback all messages received, then receive them
- /// again.
- /// </summary>
- /// <return> A flag to indicate that the publisher should rollback all messages received. </return>
- public bool getRollbackReceiver()
- {
- return getPropertyAsBoolean(ROLLBACK_RECEIVER_PROPNAME);
- }
-
- /// <summary>
- /// Gets the behavioural mode of not applicable assertions. Should be one of 'quiet', 'warn' or 'fail'.
- /// </summary>
- /// <return> The behavioural mode of not applicable assertions. </return>
- public string getNotApplicableAssertionMode()
- {
- return getProperty(NOT_APPLICABLE_ASSERTION_PROPNAME);
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// NotApplicableAssertion is a messaging assertion that can be used when an assertion requested by a test-case is not
- /// applicable to the testing scenario. For example an assertion may relate to AMQP functionality, but a test case may be
- /// being run over a non-AMQP JMS implementation, in which case the request to create the assertion may return this
- /// instead of the proper assertion. The test framework is configurable to quietly drop these assertions, log them
- /// as warnings to the console, or raise them as test failures.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Quitely pass.
- /// <tr><td> Log a warning.
- /// <tr><td> Raise a test failure.
- /// </table>
- /// </summary>
- public class NotApplicableAssertion : Assertion
- {
- /// <summary> Used for logging to the console. </summary>
- private static ILog console = LogManager.GetLogger("CONSOLE." + NotApplicableAssertion.class.getName());
-
- /// <summary> The possible behavioural modes of this assertion. </summary>
- private enum Mode
- {
- /// <summary> Quietly ignore the assertion by passing. </summary>
- Quiet,
-
- /// <summary> Ignore the assertion by passing but log a warning about it. </summary>
- Warn,
-
- /// <summary> Fail the assertion. </summary>
- Fail;
- }
-
- /// <summary> The behavioural mode of the assertion. </summary>
- private Mode mode;
-
- /// <summary>
- /// Creates an assertion that is driven by the value of the 'notApplicableAssertion' property of the test
- /// configuration. Its value should match one of 'quiet', 'warn' or 'fail' and if it does not it is automatically
- /// read as 'fail'.
- /// </summary>
- /// <param name="testProperties"> The test configuration properties. </param>
- public NotApplicableAssertion(ParsedProperties testProperties)
- {
- // Cast the test properties into a typed interface for convenience.
- MessagingTestConfigProperties props = new MessagingTestConfigProperties(testProperties);
-
- string modeName = props.getNotApplicableAssertionMode();
-
- if ("quiet".equals(modeName))
- {
- mode = Mode.Quiet;
- }
- else if ("warn".equals(modeName))
- {
- mode = Mode.Warn;
- }
- else
- {
- mode = Mode.Fail;
- }
- }
-
- /// <summary>
- /// Applies the assertion.
- /// </summary>
- /// <return> <tt>true</tt> if the assertion passes, <tt>false</tt> if it fails. </return>
- public bool apply()
- {
- switch (mode)
- {
- case Quiet:
- return true;
-
- case Warn:
- console.warn("Warning: Not applicable assertion being ignored.");
-
- return true;
-
- case Fail:
- default:
- return false;
- }
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A Publisher represents the status of the publishing side of a test circuit. Its main purpose is to provide assertions
- /// that can be applied to test the behaviour of the publishers.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Provide assertion that the publishers received no exceptions.
- /// </table>
- /// </summary>
- ///
- /// <remarks> There are mixtures of AMQP and JMS assertions in this interface. Either keep them here, but quietly (or with a
- /// warning or error) drop them from test cases where they are not relevant, or push them down into sub-classes.
- /// I am tempted to go with the dropping/warning/error approach, that would imply that it makes sense to pull
- /// the assertions back from AMQPPublisher to here.</remarks>
- public interface Publisher
- {
- // Assertions that are meaningfull to AMQP and to JMS.
-
- /// <summary>
- /// Provides an assertion that the publisher encountered no exceptions.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the publisher encountered no exceptions. </return>
- public Assertion noExceptionsAssertion(ParsedProperties testProps);
-
- // Assertions that are meaningfull only to AMQP.
-
- /// <summary>
- /// Provides an assertion that the AMQP channel was forcibly closed by an error condition.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the AMQP channel was forcibly closed by an error condition. </return>
- public Assertion channelClosedAssertion(ParsedProperties testProps);
-
- // Assertions that are meaningfull only to Java/JMS.
-
- /// <summary>
- /// Provides an assertion that the publisher got a given exception during the test.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <param name="exceptionClass"> The exception class to check for. </param>
- ///
- /// <return> An assertion that the publisher got a given exception during the test. </return>
- public Assertion exceptionAssertion(ParsedProperties testProps, Class<? extends Exception> exceptionClass);
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// A Receiver is a <see cref="CircuitEnd"/> that represents the status of the receiving side of a test circuit. Its main
- /// purpose is to provide assertions that can be applied to check the behaviour of the receivers.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Provide assertion that the receivers received no exceptions.
- /// <tr><td> Provide assertion that the receivers received all test messages sent to it.
- /// </table>
- /// </summary>
- ///
- /// <remarks> There are mixtures of AMQP and JMS assertions in this interface. Either keep them here, but quietly (or with a
- /// warning or error) drop them from test cases where they are not relevant, or push them down into sub-classes.
- /// I am tempted to go with the dropping/warning/error approach.</remarks>
- public interface Receiver
- {
- // Assertions that are meaningfull to AMQP and to JMS.
-
- /// <summary>
- /// Provides an assertion that the receivers encountered no exceptions.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers encountered no exceptions. </return>
- public Assertion noExceptionsAssertion(ParsedProperties testProps);
-
- /// <summary>
- /// Provides an assertion that the receivers got all messages that were sent to it.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers got all messages that were sent to it. </return>
- public Assertion allMessagesReceivedAssertion(ParsedProperties testProps);
-
- /// <summary>
- /// Provides an assertion that the receivers got none of the messages that were sent to it.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers got none of the messages that were sent to it. </return>
- public Assertion noMessagesReceivedAssertion(ParsedProperties testProps);
-
- // Assertions that are meaningfull only to AMQP.
-
- /// <summary>
- /// Provides an assertion that the AMQP channel was forcibly closed by an error condition.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the AMQP channel was forcibly closed by an error condition. </return>
- public Assertion channelClosedAssertion(ParsedProperties testProps);
-
- // Assertions that are meaningfull only to Java/JMS.
-
- /// <summary>
- /// Provides an assertion that the receiver got a given exception during the test.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <param name="exceptionClass"> The exception class to check for. </param>
- ///
- /// <return> An assertion that the receiver got a given exception during the test. </return>
- public Assertion exceptionAssertion(ParsedProperties testProps, Class<? extends Exception> exceptionClass);
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.Circuit;
-using Apache.Qpid.Integration.Tests.framework.TestClientDetails;
-using org.apache.qpid.util.ConversationFactory;
-
-using System.Collections.Generic.LinkedList;
-using System.Collections.Generic.IList;
-using java.util.Properties;
-
-namespace Apache.Qpid.Integration.Tests.framework.sequencers
-{
- /// <summary>
- /// BaseCircuitFactory provides some functionality common to all <see cref="CircuitFactory"/>s, such as the details of
- /// all <see cref="Apache.Qpid.Integration.Tests.framework.distributedtesting.TestClient"/>s that make up the end-points of
- /// the circuits that the factory creates, and an active <see cref="ConversationFactory"/> that can be used to generate
- /// control conversations with those circuit end-points.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Hold the details of the sending and receiving end-points to create circuits from.
- /// <tr><td> Provide a conversation factory to create control conversations with the end-points.
- /// </table>
- /// </summary>
- public abstract class BaseCircuitFactory : CircuitFactory
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(BaseCircuitFactory));
-
- /// <summary> Holds the contact details for the sending test client. </summary>
- protected TestClientDetails sender;
-
- /// <summary> Holds the contact details for the receving test client. </summary>
- protected IList<TestClientDetails> receivers = new LinkedList<TestClientDetails>();
-
- /// <summary> Holds the conversation factory over which to coordinate the test. </summary>
- protected ConversationFactory conversationFactory;
-
- /// <summary>
- /// Creates a test circuit for the test, configered by the test parameters specified.
- /// </summary>
- /// <param name="testProperties"> The test parameters. </param>
- /// <return> A test circuit. </return>
- public Circuit createCircuit(Properties testProperties)
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Sets the sender test client to coordinate the test with.
- /// </summary>
- /// <param name="sender"> The contact details of the sending client in the test. </param>
- public void setSender(TestClientDetails sender)
- {
- log.debug("public void setSender(TestClientDetails sender = " + sender + "): called");
-
- this.sender = sender;
- }
-
- /// <summary>
- /// Sets the receiving test client to coordinate the test with.
- /// </summary>
- /// <param name="receiver"> The contact details of the sending client in the test. </param>
- public void setReceiver(TestClientDetails receiver)
- {
- log.debug("public void setReceiver(TestClientDetails receivers = " + receiver + "): called");
-
- this.receivers.add(receiver);
- }
-
- /// <summary>
- /// Supplies the sending test client.
- /// </summary>
- /// <return> The sending test client. </return>
- public TestClientDetails getSender()
- {
- return sender;
- }
-
- /// <summary>
- /// Supplies the receiving test client.
- /// </summary>
- /// <return> The receiving test client. </return>
- public IList<TestClientDetails> getReceivers()
- {
- return receivers;
- }
-
- /// <summary>
- /// Accepts the conversation factory over which to hold the test coordinating conversation.
- /// </summary>
- /// <param name="conversationFactory"> The conversation factory to coordinate the test over. </param>
- public void setConversationFactory(ConversationFactory conversationFactory)
- {
- this.conversationFactory = conversationFactory;
- }
-
- /// <summary>
- /// Provides the conversation factory for providing the distributed test sequencing conversations over the test
- /// connection.
- /// </summary>
- /// <return> The conversation factory to create test sequencing conversations with. </return>
- public ConversationFactory getConversationFactory()
- {
- return conversationFactory;
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Integration.Tests.framework.Assertion;
-using Apache.Qpid.Integration.Tests.framework.Circuit;
-using Apache.Qpid.Integration.Tests.framework.TestClientDetails;
-using org.apache.qpid.util.ConversationFactory;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.JMSException;
-using javax.jms.Message;
-
-using System.Collections.Generic.IList;
-using System.Collections.Generic.IDictionary;
-using java.util.Properties;
-
-namespace Apache.Qpid.Integration.Tests.framework.sequencers
-{
- /// <summary>
- /// A CircuitFactory is responsibile for creating test circuits appropriate to the context that a test case is
- /// running in, and providing an implementation of a standard test procedure over a test circuit.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Provide a standard test procedure over a test circuit.
- /// <tr><td> Construct test circuits appropriate to a tests context.
- /// </table>
- /// </summary>
- public interface CircuitFactory
- {
- /// <summary>
- /// Holds a test coordinating conversation with the test clients. This should consist of assigning the test roles,
- /// begining the test, gathering the test reports from the participants, and checking for assertion failures against
- /// the test reports.
- /// </summary>
- /// <param name="testCircuit"> The test circuit. </param>
- /// <param name="assertions"> The list of assertions to apply to the test circuit. </param>
- /// <param name="testProperties"> The test case definition. </param>
- ///
- /// @deprecated Use test circuits and Circuit.test instead.
- public void sequenceTest(Circuit testCircuit, IList<Assertion> assertions, Properties testProperties);
-
- /// <summary>
- /// Creates a test circuit for the test, configered by the test parameters specified.
- /// </summary>
- /// <param name="testProperties"> The test parameters. </param>
- ///
- /// <return> A test circuit. </return>
- public Circuit createCircuit(ParsedProperties testProperties);
-
- /// <summary>
- /// Sets the sender test client to coordinate the test with.
- /// </summary>
- /// <param name="sender"> The contact details of the sending client in the test. </param>
- public void setSender(TestClientDetails sender);
-
- /// <summary>
- /// Sets the receiving test client to coordinate the test with.
- /// </summary>
- /// <param name="receiver"> The contact details of the sending client in the test. </param>
- public void setReceiver(TestClientDetails receiver);
-
- /// <summary>
- /// Supplies the sending test client.
- /// </summary>
- /// <return> The sending test client. </return>
- public TestClientDetails getSender();
-
- /// <summary>
- /// Supplies the receiving test client.
- /// </summary>
- /// <return> The receiving test client. </return>
- public IList<TestClientDetails> getReceivers();
-
- /// <summary>
- /// Accepts the conversation factory over which to hold the test coordinating conversation.
- /// </summary>
- /// <param name="conversationFactory"> The conversation factory to coordinate the test over. </param>
- public void setConversationFactory(ConversationFactory conversationFactory);
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.Assertion;
-using Apache.Qpid.Integration.Tests.framework.Circuit;
-using Apache.Qpid.Integration.Tests.framework.TestClientDetails;
-using Apache.Qpid.Integration.Tests.framework.TestUtils;
-using Apache.Qpid.Integration.Tests.framework.distributedcircuit.DistributedCircuitImpl;
-using org.apache.qpid.util.ConversationFactory;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.Destination;
-using javax.jms.JMSException;
-using javax.jms.Message;
-using javax.jms.Session;
-
-using System.Collections.Generic.LinkedList;
-using System.Collections.Generic.IList;
-using java.util.Properties;
-
-namespace Apache.Qpid.Integration.Tests.framework.sequencers
-{
- /// <summary>
- /// FanOutCircuitFactory is a circuit factory that creates distributed test circuits. Given a set of participating
- /// test client nodes, it assigns one node to the SENDER role and the remainder to the RECEIVER role.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Create distributed circuits from one to many test nodes, for fanout style testing.
- /// </table>
- /// </summary>
- ///
- /// <remarks> Adapt this to be an n*m topology circuit factory. Need to add circuit topology definitions to the test
- /// parameters. Place n senders onto the available test clients, and m receivers. Where n or m is larger than
- /// the available nodes, start stacking multiple test clients on each node. There will also be an option that
- /// indicates whether nodes can play both roles, and how many nodes out of all available may be assigned to
- /// each role.</remarks>
- ///
- /// <remarks> The createCircuit methods on this and InteropCircuitFactory are going to be identical. This is because the
- /// partitioning into senders and receivers is already done by the test decorators. Either eliminate these factories
- /// as unnesesary, or move the partitioning functionality into the factories, in which case the test decorators
- /// can probably be merged or eliminated. There is confusion over the placement of responsibilities between the
- /// factories and the test decorators... although the test decorators may well do more than just circuit creation
- /// in the future. For example, there may have to be a special decorator for test repetition that does one circuit
- /// creation, but the runs many tests over it, in which case the handling of responsibilities becomes clearer.</remarks>
- public class FanOutCircuitFactory extends BaseCircuitFactory
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(FanOutCircuitFactory));
-
- /// <summary>
- /// Creates a test circuit for the test, configered by the test parameters specified.
- /// </summary>
- /// <param name="testProperties"> The test parameters. </param>
- /// <return> A test circuit. </return>
- public Circuit createCircuit(ParsedProperties testProperties)
- {
- log.debug("public Circuit createCircuit(ParsedProperties testProperties): called");
-
- IList<TestClientDetails> senders = new LinkedList<TestClientDetails>();
- senders.add(getSender());
- IList<TestClientDetails> receivers = getReceivers();
- ConversationFactory conversationFactory = getConversationFactory();
-
- return DistributedCircuitImpl.createCircuit(testProperties, senders, receivers, conversationFactory);
- }
-
- /// <summary>
- /// Holds a test coordinating conversation with the test clients. This should consist of assigning the test roles,
- /// begining the test, gathering the test reports from the participants, and checking for assertion failures against
- /// the test reports.
- /// </summary>
- /// <param name="testCircuit"> The test circuit. </param>
- /// <param name="assertions"> The list of assertions to apply to the test circuit. </param>
- /// <param name="testProperties"> The test case definition. </param>
- ///
- /// @deprecated Scheduled for removal once existing tests converted over to use test circuits.
- public void sequenceTest(Circuit testCircuit, IList<Assertion> assertions, Properties testProperties)
- {
- log.debug("protected Message[] sequenceTest(Object... testProperties = " + testProperties + "): called");
-
- TestClientDetails sender = getSender();
- IList<TestClientDetails> receivers = getReceivers();
- ConversationFactory conversationFactory = getConversationFactory();
-
- try
- {
- // Create a conversation on the sender clients private control route.
- Session session = conversationFactory.getSession();
- Destination senderControlTopic = session.createTopic(sender.privateControlKey);
- ConversationFactory.Conversation senderConversation = conversationFactory.startConversation();
-
- // Assign the sender role to the sending test client.
- Message assignSender = conversationFactory.getSession().createMessage();
- TestUtils.setPropertiesOnMessage(assignSender, testProperties);
- assignSender.setStringProperty("CONTROL_TYPE", "ASSIGN_ROLE");
- assignSender.setStringProperty("ROLE", "SENDER");
- assignSender.setStringProperty("CLIENT_NAME", "Sustained_SENDER");
-
- senderConversation.send(senderControlTopic, assignSender);
-
- // Wait for the sender to confirm its role.
- senderConversation.receive();
-
- // Assign the receivers roles.
- for (TestClientDetails receiver : receivers)
- {
- assignReceiverRole(receiver, testProperties, true);
- }
-
- // Start the test on the sender.
- Message start = session.createMessage();
- start.setStringProperty("CONTROL_TYPE", "START");
-
- senderConversation.send(senderControlTopic, start);
-
- // Wait for the test sender to return its report.
- Message senderReport = senderConversation.receive();
- TestUtils.pause(500);
-
- // Ask the receivers for their reports.
- Message statusRequest = session.createMessage();
- statusRequest.setStringProperty("CONTROL_TYPE", "STATUS_REQUEST");
-
- // Gather the reports from all of the receiving clients.
-
- // Return all of the test reports, the senders report first.
- // return new Message[] { senderReport };
- }
- catch (JMSException e)
- {
- throw new RuntimeException("Unhandled JMSException.");
- }
- }
-
- /// <summary>
- /// Assigns the receivers role to the specified test client that is to act as a receivers during the test. This method
- /// does not always wait for the receiving clients to confirm their role assignments. This is because this method
- /// may be called from an 'onMessage' method, when a client is joining the test at a later point in time, and it
- /// is not possible to do a synchronous receive during an 'onMessage' method. There is a flag to indicate whether
- /// or not to wait for role confirmations.
- /// </summary>
- /// <param name="receiver"> The test client to assign the receivers role to. </param>
- /// <param name="testProperties"> The test parameters. </param>
- /// <param name="confirm"> Indicates whether role confirmation should be waited for. </param>
- ///
- /// <exception cref="JMSException"> Any JMSExceptions occurring during the conversation are allowed to fall through. </exception>
- ///
- /// @deprecated Scheduled for removal once existing tests converted over to use test circuits.
- protected void assignReceiverRole(TestClientDetails receiver, Properties testProperties, bool confirm)
- throws JMSException
- {
- log.info("assignReceiverRole(TestClientDetails receivers = " + receiver + ", Map<String, Object> testProperties = "
- + testProperties + "): called");
-
- ConversationFactory conversationFactory = getConversationFactory();
-
- // Create a conversation with the receiving test client.
- Session session = conversationFactory.getSession();
- Destination receiverControlTopic = session.createTopic(receiver.privateControlKey);
- ConversationFactory.Conversation receiverConversation = conversationFactory.startConversation();
-
- // Assign the receivers role to the receiving client.
- Message assignReceiver = session.createMessage();
- TestUtils.setPropertiesOnMessage(assignReceiver, testProperties);
- assignReceiver.setStringProperty("CONTROL_TYPE", "ASSIGN_ROLE");
- assignReceiver.setStringProperty("ROLE", "RECEIVER");
- assignReceiver.setStringProperty("CLIENT_NAME", receiver.clientName);
-
- receiverConversation.send(receiverControlTopic, assignReceiver);
-
- // Wait for the role confirmation to come back.
- if (confirm)
- {
- receiverConversation.receive();
- }
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.Assertion;
-using Apache.Qpid.Integration.Tests.framework.Circuit;
-using Apache.Qpid.Integration.Tests.framework.TestClientDetails;
-using Apache.Qpid.Integration.Tests.framework.TestUtils;
-using Apache.Qpid.Integration.Tests.framework.distributedcircuit.DistributedCircuitImpl;
-using org.apache.qpid.util.ConversationFactory;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.Destination;
-using javax.jms.JMSException;
-using javax.jms.Message;
-using javax.jms.Session;
-
-using System.Collections.Generic.LinkedList;
-using System.Collections.Generic.IList;
-using java.util.Properties;
-
-namespace Apache.Qpid.Integration.Tests.framework.sequencers
-{
- /// <summary>
- /// InteropCircuitFactory is a circuit factory that creates distributed test circuits. Given a set of participating
- /// test client nodes, it assigns one node to the SENDER role and one the RECEIVER role.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Create distributed circuits from pairs of test nodes, for interop style testing.
- /// </table>
- /// </summary>
- ///
- /// <remarks> The partitioning of a set of nodes into sender and receiver roles is actually done by the interop test
- /// decorator. See the todo comment in FanOutCircuitFactory about merging the factories with the decorators, or
- /// more carefully dividing up responsibilities between them.</remarks>
- ///
- /// <remarks> The squenceTest code is deprecated, but currently still used by the interop tests. It will be removed once it
- /// have been fully replaced by the default test procedure.</remarks>
- public class InteropCircuitFactory extends BaseCircuitFactory
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(InteropCircuitFactory));
-
- /// <summary>
- /// Creates a test circuit for the test, configered by the test parameters specified.
- /// </summary>
- /// <param name="testProperties"> The test parameters. </param>
- /// <return> A test circuit. </return>
- public Circuit createCircuit(ParsedProperties testProperties)
- {
- log.debug("public Circuit createCircuit(ParsedProperties testProperties): called");
-
- IList<TestClientDetails> senders = new LinkedList<TestClientDetails>();
- senders.add(getSender());
- IList<TestClientDetails> receivers = getReceivers();
- ConversationFactory conversationFactory = getConversationFactory();
-
- return DistributedCircuitImpl.createCircuit(testProperties, senders, receivers, conversationFactory);
- }
-
- /// <summary>
- /// Holds a test coordinating conversation with the test clients. This should consist of assigning the test roles,
- /// begining the test, gathering the test reports from the participants, and checking for assertion failures against
- /// the test reports.
- /// </summary>
- /// <param name="testCircuit"> The test circuit. </param>
- /// <param name="assertions"> The list of assertions to apply to the test circuit. </param>
- /// <param name="testProperties"> The test case definition. </param>
- public void sequenceTest(Circuit testCircuit, IList<Assertion> assertions, Properties testProperties)
- {
- log.debug("protected Message[] sequenceTest(Object... testProperties = " + testProperties + "): called");
-
- TestClientDetails sender = getSender();
- IList<TestClientDetails> receivers = getReceivers();
- ConversationFactory conversationFactory = getConversationFactory();
-
- try
- {
- Session session = conversationFactory.getSession();
- Destination senderControlTopic = session.createTopic(sender.privateControlKey);
- Destination receiverControlTopic = session.createTopic(receivers.get(0).privateControlKey);
-
- ConversationFactory.Conversation senderConversation = conversationFactory.startConversation();
- ConversationFactory.Conversation receiverConversation = conversationFactory.startConversation();
-
- Message assignSender = conversationFactory.getSession().createMessage();
- TestUtils.setPropertiesOnMessage(assignSender, testProperties);
- assignSender.setStringProperty("CONTROL_TYPE", "ASSIGN_ROLE");
- assignSender.setStringProperty("ROLE", "SENDER");
-
- senderConversation.send(senderControlTopic, assignSender);
-
- // Assign the receivers role the receiving client.
- Message assignReceiver = session.createMessage();
- TestUtils.setPropertiesOnMessage(assignReceiver, testProperties);
- assignReceiver.setStringProperty("CONTROL_TYPE", "ASSIGN_ROLE");
- assignReceiver.setStringProperty("ROLE", "RECEIVER");
-
- receiverConversation.send(receiverControlTopic, assignReceiver);
-
- // Wait for the senders and receivers to confirm their roles.
- senderConversation.receive();
- receiverConversation.receive();
-
- // Start the test.
- Message start = session.createMessage();
- start.setStringProperty("CONTROL_TYPE", "START");
-
- senderConversation.send(senderControlTopic, start);
-
- // Wait for the test sender to return its report.
- Message senderReport = senderConversation.receive();
- TestUtils.pause(500);
-
- // Ask the receivers for its report.
- Message statusRequest = session.createMessage();
- statusRequest.setStringProperty("CONTROL_TYPE", "STATUS_REQUEST");
-
- receiverConversation.send(receiverControlTopic, statusRequest);
-
- // Wait for the receivers to send its report.
- Message receiverReport = receiverConversation.receive();
-
- // return new Message[] { senderReport, receiverReport };
-
- // Apply assertions.
- }
- catch (JMSException e)
- {
- throw new RuntimeException("JMSException not handled.");
- }
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td>
- /// </table>
- /// </summary>
- public class TestCaseVector
- {
- /// <summary> The test case name. </summary>
- private string testCase;
-
- /// <summary> The test cycle number within the test case. </summary>
- private int testCycleNumber;
-
- public TestCaseVector(string testCase, int testCycleNumber)
- {
- this.testCase = testCase;
- this.testCycleNumber = testCycleNumber;
- }
-
- public string getTestCase()
- {
- return testCase;
- }
-
- public int getTestCycleNumber()
- {
- return testCycleNumber;
- }
-
- public bool equals(Object o)
- {
- if (this == o)
- {
- return true;
- }
-
- if ((o == null) || (getClass() != o.getClass()))
- {
- return false;
- }
-
- TestCaseVector that = (TestCaseVector) o;
-
- if (testCycleNumber != that.testCycleNumber)
- {
- return false;
- }
-
- if ((testCase != null) ? (!testCase.equals(that.testCase)) : (that.testCase != null))
- {
- return false;
- }
-
- return true;
- }
-
- public int hashCode()
- {
- int result;
- result = ((testCase != null) ? testCase.hashCode() : 0);
- result = (31 * result) + testCycleNumber;
-
- return result;
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// TestClientDetails is used to encapsulate information about an interop test client. It pairs together the unique
- /// name of the client, and the route on which it listens to its control messages.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Record test clients control addresses together with their names.
- /// </table>
- /// </summary>
- public class TestClientDetails
- {
- /// <summary> The test clients name. </summary>
- public string clientName;
-
- /// <summary> The routing key of the test clients control topic. </summary>
- public string privateControlKey;
-
- /// <summary>
- /// Two TestClientDetails are considered to be equal, iff they have the same client name.
- /// </summary>
- /// <param name="o"> The object to compare to. </param>
- ///
- /// <return> <tt>If the object to compare to is a TestClientDetails equal to this one, <tt>false</tt> otherwise. </return>
- public bool equals(Object o)
- {
- if (this == o)
- {
- return true;
- }
-
- if (!(o instanceof TestClientDetails))
- {
- return false;
- }
-
- final TestClientDetails testClientDetails = (TestClientDetails) o;
-
- return !((clientName != null) ? (!clientName.equals(testClientDetails.clientName))
- : (testClientDetails.clientName != null));
- }
-
- /// <summary>
- /// Computes a hash code compatible with the equals method; based on the client name alone.
- /// </summary>
- /// <return> A hash code for this. </return>
- public int hashCode()
- {
- return ((clientName != null) ? clientName.hashCode() : 0);
- }
-
- /// <summary>
- /// Outputs the client name and address details. Mostly used for debugging purposes.
- /// </summary>
- /// <return> The client name and address. </return>
- public string ToString()
- {
- return "TestClientDetails: [ clientName = " + clientName + ", privateControlKey = " + privateControlKey + " ]";
- }
- }
-}
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using static Apache.Qpid.Integration.Tests.framework.MessagingTestConfigProperties.*;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.*;
-using javax.naming.Context;
-using javax.naming.InitialContext;
-using javax.naming.NamingException;
-
-using System.Collections.Generic.IDictionary;
-
-namespace Apache.Qpid.Integration.Tests.framework
-{
- /// <summary>
- /// TestUtils provides static helper methods that are usefull for writing tests against QPid.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Create connections from test properties. <td> <see cref="MessagingTestConfigProperties"/>
- /// <tr><td> Create test messages.
- /// <tr><td> Inject a short pause in a test.
- /// <tr><td> Serialize properties into a message.
- /// </table>
- /// </summary>
- public class TestUtils
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(TestUtils));
-
- /// <summary> Some dummy data to stuff all test messages with. </summary>
- private static final byte[] MESSAGE_DATA_BYTES =
- "Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- "
- .getBytes();
-
- /// <summary>
- /// Establishes a JMS connection using a set of properties and qpids built in JNDI implementation. This is a simple
- /// convenience method for code that does not anticipate handling connection failures. All exceptions that indicate
- /// that the connection has failed, are wrapped as rutime exceptions, presumably handled by a top level failure
- /// handler.
- ///
- /// <p/>This utility makes use of the following test parameters from <see cref="MessagingTestConfigProperties"/> to control
- /// the connection creation:
- ///
- /// <p/><table>
- /// <tr><td> <see cref="MessagingTestConfigProperties#USERNAME_PROPNAME"/> <td> The username.
- /// <tr><td> <see cref="MessagingTestConfigProperties#PASSWORD_PROPNAME"/> <td> The password.
- /// <tr><td> <see cref="MessagingTestConfigProperties#VIRTUAL_HOST_PROPNAME"/> <td> The virtual host name.
- /// <tr><td> <see cref="MessagingTestConfigProperties#BROKER_PROPNAME"/> <td> The broker URL.
- /// <tr><td> <see cref="MessagingTestConfigProperties#CONNECTION_NAME"/> <td> The broker name in the initial context.
- /// </summary>
- /// <param name="messagingProps"> Connection properties as defined in <see cref="MessagingTestConfigProperties"/>. </param>
- ///
- /// <return> A JMS conneciton. </return>
- public static Connection createConnection(ParsedProperties messagingProps)
- {
- log.debug("public static Connection createConnection(ParsedProperties messagingProps = " + messagingProps
- + "): called");
-
- try
- {
- // Extract the configured connection properties from the test configuration.
- string conUsername = messagingProps.getProperty(USERNAME_PROPNAME);
- string conPassword = messagingProps.getProperty(PASSWORD_PROPNAME);
- string virtualHost = messagingProps.getProperty(VIRTUAL_HOST_PROPNAME);
- string brokerUrl = messagingProps.getProperty(BROKER_PROPNAME);
-
- // Create the broker connection url.
- string connectionstring =
- "amqp://" + conUsername + ":" + conPassword + "@clientid/" + ((virtualHost != null) ? virtualHost : "")
- + "?brokerlist='" + brokerUrl + "'";
-
- // Create properties to create the initial context from, and inject the connection factory configuration
- // for the defined connection name into it.
- messagingProps.setProperty("connectionfactory." + CONNECTION_NAME, connectionString);
-
- Context ctx = new InitialContext(messagingProps);
-
- ConnectionFactory cf = (ConnectionFactory) ctx.lookup(CONNECTION_NAME);
-
- return cf.createConnection();
- }
- catch (NamingException e)
- {
- throw new RuntimeException("Got JNDI NamingException whilst looking up the connection factory.", e);
- }
- catch (JMSException e)
- {
- throw new RuntimeException("Could not establish connection due to JMSException.", e);
- }
- }
-
- /// <summary>
- /// Creates a test message of the specified size, on the given JMS session.
- /// </summary>
- /// <param name="session"> The JMS session. </param>
- /// <param name="size"> The size of the message in bytes. </param>
- ///
- /// <return> A bytes message, of the specified size, filled with dummy data. </return>
- ///
- /// <exception cref="JMSException"> Any underlying JMSExceptions are allowed to fall through. </exception>
- public static Message createTestMessageOfSize(Session session, int size) throws JMSException
- {
- BytesMessage message = session.createBytesMessage();
-
- if (size > 0)
- {
- int div = MESSAGE_DATA_BYTES.length / size;
- int mod = MESSAGE_DATA_BYTES.length % size;
-
- for (int i = 0; i < div; i++)
- {
- message.writeBytes(MESSAGE_DATA_BYTES);
- }
-
- if (mod != 0)
- {
- message.writeBytes(MESSAGE_DATA_BYTES, 0, mod);
- }
- }
-
- return message;
- }
-
- /// <summary>
- /// Pauses for the specified length of time. In the event of failing to pause for at least that length of time
- /// due to interuption of the thread, a RutimeException is raised to indicate the failure. The interupted status
- /// of the thread is restores in that case. This method should only be used when it is expected that the pause
- /// will be succesfull, for example in test code that relies on inejecting a pause.
- /// </summary>
- /// <param name="t"> The minimum time to pause for in milliseconds. </param>
- public static void pause(long t)
- {
- try
- {
- Thread.sleep(t);
- }
- catch (InterruptedException e)
- {
- // Restore the interrupted status
- Thread.currentThread().interrupt();
-
- throw new RuntimeException("Failed to generate the requested pause length.", e);
- }
- }
-
- /// <summary>
- /// Sets properties of different types on a JMS Message.
- /// </summary>
- /// <param name="message"> The message to set properties on. </param>
- /// <param name="properties"> The property name/value pairs to set. </param>
- ///
- /// <exception cref="javax.jms.JMSException"> All underlying JMSExceptions are allowed to fall through. </exception>
- ///
- /// <remarks> Move this helper method somewhere else. For example, TestUtils.</remarks>
- public static void setPropertiesOnMessage(Message message, Map<Object, Object> properties) throws JMSException
- {
- for (Map.Entry<Object, Object> entry : properties.entrySet())
- {
- string name = entry.getKey().ToString();
- Object value = entry.getValue();
-
- message.setObjectProperty(name, value);
- }
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/ClockSynchFailureException.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/ClockSynchFailureException.csx
deleted file mode 100644
index a2bcc49b97..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/ClockSynchFailureException.csx
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework.clocksynch
-{
- /// <summary>
- /// ClockSynchFailureException represents failure of a <see cref="ClockSynchronizer"/> to achieve synchronization. For example,
- /// this could be because a reference signal is not available, or because a desired accurracy cannot be attained.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Represent failure to achieve synchronization.
- /// </table>
- /// </summary>
- public class ClockSynchFailureException extends Exception
- {
- /// <summary>
- /// Creates a clock synch failure exception.
- /// </summary>
- /// <param name="message"> The detail message (which is saved for later retrieval by the <see cref="#getMessage()"/> method). </param>
- /// <param name="cause"> The cause (which is saved for later retrieval by the <see cref="#getCause()"/> method). (A <tt>null</tt>
- /// value is permitted, and indicates that the cause is nonexistent or unknown.)</param>
- public ClockSynchFailureException(string message, Throwable cause)
- {
- super(message, cause);
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/ClockSynchThread.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/ClockSynchThread.csx
deleted file mode 100644
index 7d2fcae058..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/ClockSynchThread.csx
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using uk.co.thebadgerset.junit.extensions.ShutdownHookable;
-using uk.co.thebadgerset.junit.extensions.Throttle;
-
-namespace Apache.Qpid.Integration.Tests.framework.clocksynch
-{
- /// <summary>
- /// ClockSynchThread is a convenient utility for running a thread that periodically synchronizes the clock against
- /// a reference. Supply it with a <see cref="ClockSynchronizer"/> and a <see cref="Throttle"/> and it will continually keep the
- /// clock up-to-date at a rate determined by the throttle.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Continually sychronize the clock at a throttled rate.
- /// </table>
- /// </summary>
- public class ClockSynchThread extends Thread : ShutdownHookable
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(ClockSynchThread));
-
- /// <summary> Holds the clock syncher for the synch thread. </summary>
- private ClockSynchronizer clockSyncher;
-
- /// <summary> Holds the throttle to limit the synch rate. </summary>
- private Throttle throttle;
-
- /// <summary> Flag to indicate that the periodic clock syncher should keep running. </summary>
- bool doSynch = true;
-
- /// <summary>
- /// Creates a clock synchronizer thread from a clock synchronizer and a throttle.
- /// </summary>
- /// <param name="syncher"> The clock synchronizer. </param>
- /// <param name="throttle"> The throttle. </param>
- public ClockSynchThread(ClockSynchronizer syncher, Throttle throttle)
- {
- this.clockSyncher = syncher;
- this.throttle = throttle;
- }
-
- /// <summary> Terminates the synchronization thread. </summary>
- public void terminate()
- {
- doSynch = false;
- }
-
- /// <summary> Continually updates the clock, until <see cref="#terminate()"/> is called. </summary>
- public void run()
- {
- while (doSynch)
- {
- // Perform a clock clockSynch.
- try
- {
- // Wait controlled by the throttle before doing the next synch.
- throttle.throttle();
-
- clockSyncher.synch();
- log.debug("Clock synched, delta = " + clockSyncher.getDelta() + ", epsilon = " + clockSyncher.getEpsilon()
- + ".");
- }
- // Terminate the synch thread if the synchronization cannot be achieved.
- catch (ClockSynchFailureException e)
- {
- log.debug("Cannot synchronize the clock (reference service may be down). Terminating the synch thread.");
- doSynch = false;
- }
- }
- }
-
- /// <summary>
- /// Gets the clock synchronizer that is kept continually up to date.
- /// </summary>
- /// <return> The clock synchronizer that is kept continually up to date. </return>
- public ClockSynchronizer getClockSyncher()
- {
- return clockSyncher;
- }
-
- /// <summary>
- /// Supplies a shutdown hook, that terminates the synching thread.
- /// </summary>
- /// <return> The shut down hook. </return>
- public Thread getShutdownHook()
- {
- return new Thread(new Runnable()
- {
- public void run()
- {
- doSynch = false;
- }
- });
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/ClockSynchronizer.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/ClockSynchronizer.csx
deleted file mode 100644
index 665b804b21..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/ClockSynchronizer.csx
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework.clocksynch
-{
- /// <summary>
- /// ClockSynchronizer provides an interface through which two nodes may synchronize their clocks. It is expected that one
- /// node will act as the reference clock, to which no delta need be applied, and the other node will act as the slave,
- /// and which must apply a delta to its local clock to get a clock synchronized with the reference.
- ///
- /// <p/>The slave side will initiate the computation of a clock delta by calling the <see cref="#synch"/> method. This method
- /// will not return until the delta has been computed, at which point there is a method to return its value, as well as
- /// an estimate of the likely error (usually one standard deviation), in the synchronization. For convenience there is a
- /// <see cref="#nanoTime"/> method to return the value of System.nanoTime() with the delta added in.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Trigger a clock synchronization.
- /// <tr><td> Compute a clock delta to apply to the local clock.
- /// <tr><td> Estimate the error in the synchronzation.
- /// </table>
- /// </summary>
- public interface ClockSynchronizer
- {
- /// <summary>
- /// The slave side should call this to copute a clock delta with the reference.
- /// </summary>
- /// <exception cref="ClockSynchFailureException"> If synchronization cannot be achieved. </exception>
- public void synch() throws ClockSynchFailureException;
-
- /// <summary>
- /// Gets the clock delta in nano seconds.
- /// </summary>
- /// <return> The clock delta in nano seconds. </return>
- public long getDelta();
-
- /// <summary>
- /// Gets an estimate of the clock error in nan seconds.
- /// </summary>
- /// <return> An estimate of the clock error in nan seconds. </return>
- public long getEpsilon();
-
- /// <summary>
- /// Gets the local clock time with any computed delta added in.
- /// </summary>
- /// <return> The local clock time with any computed delta added in. </return>
- public long nanoTime();
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/LocalClockSynchronizer.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/LocalClockSynchronizer.csx
deleted file mode 100644
index 1d19b92d90..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/LocalClockSynchronizer.csx
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Integration.Tests.framework.clocksynch
-{
-
- /// <summary>
- /// LocalClockSynchronizer is a fake <see cref="ClockSynchronizer"/> that simply calls System.nanoTime(). It exists so that
- /// the same tests can be run distributed or locally, taking timings against the ClockSynchronizer interface without
- /// being aware of how they are being run.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Supply the local clock with no delta.
- /// </table>
- /// </summary>
- public class LocalClockSynchronizer : ClockSynchronizer
- {
- /// <summary>
- /// The slave side should call this to copute a clock delta with the reference.
- /// </summary>
- /// <exception cref="Apache.Qpid.Integration.Tests.framework.clocksynch.ClockSynchFailureException"> If synchronization cannot be achieved. </exception>
- public void synch() throws ClockSynchFailureException
- { }
-
- /// <summary>
- /// Gets the clock delta in nano seconds.
- /// </summary>
- /// <return> The clock delta in nano seconds. </return>
- public long getDelta()
- {
- return 0L;
- }
-
- /// <summary>
- /// Gets an estimate of the clock error in nan seconds.
- /// </summary>
- /// <return> An estimate of the clock error in nan seconds. </return>
- public long getEpsilon()
- {
- return 0L;
- }
-
- /// <summary>
- /// Gets the local clock time with any computed delta added in.
- /// </summary>
- /// <return> The local clock time with any computed delta added in. </return>
- public long nanoTime()
- {
- return System.nanoTime();
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/UDPClockSynchronizer.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/UDPClockSynchronizer.csx
deleted file mode 100644
index 98b02a043b..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/clocksynch/UDPClockSynchronizer.csx
+++ /dev/null
@@ -1,453 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using uk.co.thebadgerset.junit.extensions.util.CommandLineParser;
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using java.io.IOException;
-using java.net.*;
-using java.nio.ByteBuffer;
-using java.util.Arrays;
-
-namespace Apache.Qpid.Integration.Tests.framework.clocksynch
-{
- /// <summary>
- /// UDPClockSynchronizer is a <see cref="ClockSynchronizer"/> that sends pings as UDP datagrams, and uses the following simple
- /// algorithm to perform clock synchronization:
- ///
- /// <ol>
- /// <li>Slave initiates synchronization with a Reference clock.</li>
- /// <li>Slave stamps current local time on a "time request" message and sends to the Reference.</li>
- /// <li>Upon receipt by Reference, Reference stamps Reference-time and returns.</li>
- /// <li>Upon receipt by Slave, Slave subtracts current time from sent time and divides by two to compute latency. It
- /// subtracts current time from Reference time to determine Slave-Reference time delta and adds in the
- /// half-latency to get the correct clock delta.</li>
- /// <li>The first result is immediately used to update the clock since it will get the local clock into at least
- /// the right ballpark.</li>
- /// <li>The Slave repeats steps 2 through 4, 15 more times.</li>
- /// <li>The results of the packet receipts are accumulated and sorted in lowest-latency to highest-latency order. The
- /// median latency is determined by picking the mid-point sample from this ordered list.</li>
- /// <li>All samples outside 1 standard-deviation from the median are discarded and the remaining samples
- /// are averaged using an arithmetic mean.</li>
- /// </ol>
- ///
- /// <p/>The use of UDP datagrams, instead of TCP based communication eliminates the hidden delays that TCP can introduce,
- /// as it can transparently re-order or re-send packets, or introduce delays as packets are naggled.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Trigger a clock synchronziation.
- /// <tr><td> Compute a clock delta to apply to the local clock.
- /// <tr><td> Estimate the error in the synchronzation.
- /// </table>
- /// </summary>
- public class UDPClockSynchronizer : ClockSynchronizer
- {
- /// <summary> Used for debugging. </summary>
- // private static ILog log = LogManager.GetLogger(typeof(UDPClockSynchronizer));
-
- /// <summary> Defines the timeout to use when waiting for responses to time requests. </summary>
- private static final int TIMEOUT = 50;
-
- /// <summary> The clock delta. </summary>
- private long delta = 0L;
-
- /// <summary> Holds an estimate of the clock error relative to the reference clock. </summary>
- private long epsilon = 0L;
-
- /// <summary> Holds the address of the reference clock. </summary>
- private InetAddress referenceAddress;
-
- /// <summary> Holds the socket to communicate with the reference service over. </summary>
- private DatagramSocket socket;
-
- /// <summary> Used to control the shutdown in the main test loop. </summary>
- private static bool doSynch = true;
-
- /// <summary>
- /// Creates a clock synchronizer against the specified address for the reference.
- /// </summary>
- /// <param name="address"> The address of the reference service. </param>
- public UDPClockSynchronizer(string address)
- {
- try
- {
- referenceAddress = InetAddress.getByName(address);
- }
- catch (UnknownHostException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- /// <summary>
- /// The slave side should call this to compute a clock delta with the reference.
- /// </summary>
- /// <exception cref="ClockSynchFailureException"> If synchronization cannot be achieved, due to unavailability of the reference
- /// time service. </exception>
- public void synch() throws ClockSynchFailureException
- {
- try
- {
- socket = new DatagramSocket();
- socket.setSoTimeout(TIMEOUT);
-
- // Synchronize on a single ping, to get the clock into the right ball-park.
- synch(1);
-
- // Synchronize on 15 pings.
- synch(15);
-
- // And again, for greater accuracy, on 31.
- synch(31);
-
- socket.close();
- }
- catch (SocketException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- /// <summary>
- /// Updates the synchronization delta by performing the specified number of reference clock requests.
- /// </summary>
- /// <param name="n"> The number of reference clock request cycles to perform. </param>
- ///
- /// <exception cref="ClockSynchFailureException"> If synchronization cannot be achieved, due to unavailability of the reference
- /// time service. </exception>
- protected void synch(int n) throws ClockSynchFailureException
- {
- // log.debug("protected void synch(int n = " + n + "): called");
-
- // Create an array of deltas by performing n reference pings.
- long[] delta = new long[n];
-
- for (int i = 0; i < n; i++)
- {
- delta[i] = ping();
- }
-
- // Reject any deltas that are larger than 1 s.d. above the median.
- long median = median(delta);
- long sd = standardDeviation(delta);
-
- // log.debug("median = " + median);
- // log.debug("sd = " + sd);
-
- long[] tempDeltas = new long[n];
- int count = 0;
-
- for (int i = 0; i < n; i++)
- {
- if ((delta[i] <= (median + sd)) && (delta[i] >= (median - sd)))
- {
- tempDeltas[count] = delta[i];
- count++;
- }
- else
- {
- // log.debug("Rejected: " + delta[i]);
- }
- }
-
- System.arraycopy(tempDeltas, 0, delta, 0, count);
-
- // Estimate the delta as the mean of the remaining deltas.
- this.delta += mean(delta);
-
- // Estimate the error as the standard deviation of the remaining deltas.
- this.epsilon = standardDeviation(delta);
-
- // log.debug("this.delta = " + this.delta);
- // log.debug("this.epsilon = " + this.epsilon);
- }
-
- /// <summary>
- /// Performs a single reference clock request cycle and returns the estimated delta relative to the local clock.
- /// This is computed as the half-latency of the requst cycle, plus the reference clock, minus the local clock.
- /// </summary>
- /// <return> The estimated clock delta. </return>
- ///
- /// <exception cref="ClockSynchFailureException"> If the reference service is not responding. </exception>
- protected long ping() throws ClockSynchFailureException
- {
- // log.debug("protected long ping(): called");
-
- try
- {
- byte[] buf = new byte[256];
-
- bool timedOut = false;
- long start = 0L;
- long refTime = 0L;
- long localTime = 0L;
- long latency = 0L;
- int failCount = 0;
-
- // Keep trying the ping until it gets a response, or 10 tries in a row all time out.
- do
- {
- // Start timing the request latency.
- start = nanoTime();
-
- // Get the reference time.
- DatagramPacket packet =
- new DatagramPacket(buf, buf.length, referenceAddress, UDPClockReference.REFERENCE_PORT);
- socket.send(packet);
- packet = new DatagramPacket(buf, buf.length);
-
- timedOut = false;
-
- try
- {
- socket.receive(packet);
- }
- catch (SocketTimeoutException e)
- {
- timedOut = true;
- failCount++;
-
- continue;
- }
-
- ByteBuffer bbuf = ByteBuffer.wrap(packet.getData());
- refTime = bbuf.getLong();
-
- // Stop timing the request latency.
- localTime = nanoTime();
- latency = localTime - start;
-
- // log.debug("refTime = " + refTime);
- // log.debug("localTime = " + localTime);
- // log.debug("start = " + start);
- // log.debug("latency = " + latency);
- // log.debug("delta = " + ((latency / 2) + (refTime - localTime)));
-
- }
- while (timedOut && (failCount < 10));
-
- // Fail completely if the fail count is too high.
- if (failCount >= 10)
- {
- throw new ClockSynchFailureException("Clock reference not responding.", null);
- }
-
- // Estimate delta as (ref clock + half-latency) - local clock.
- return (latency / 2) + (refTime - localTime);
- }
- catch (IOException e)
- {
- throw new RuntimeException(e);
- }
- }
-
- /// <summary>
- /// Gets the clock delta in nano seconds.
- /// </summary>
- /// <return> The clock delta in nano seconds. </return>
- public long getDelta()
- {
- return delta;
- }
-
- /// <summary>
- /// Gets an estimate of the clock error in nan seconds.
- /// </summary>
- /// <return> An estimate of the clock error in nan seconds. </return>
- public long getEpsilon()
- {
- return epsilon;
- }
-
- /// <summary>
- /// Gets the local clock time with any computed delta added in.
- /// </summary>
- /// <return> The local clock time with any computed delta added in. </return>
- public long nanoTime()
- {
- return System.nanoTime() + delta;
- }
-
- /// <summary>
- /// Computes the median of a series of values.
- /// </summary>
- /// <param name="values"> The values. </param>
- ///
- /// <return> The median. </return>
- public static long median(long[] values)
- {
- // log.debug("public static long median(long[] values = " + Arrays.ToString(values) + "): called");
-
- long median;
-
- // Order the list of values.
- long[] orderedValues = new long[values.length];
- System.arraycopy(values, 0, orderedValues, 0, values.length);
- Arrays.sort(orderedValues);
-
- // Check if the median is computed from a pair of middle value.
- if ((orderedValues.length % 2) == 0)
- {
- int middle = orderedValues.length / 2;
-
- median = (orderedValues[middle] + orderedValues[middle - 1]) / 2;
- }
- // The median is computed from a single middle value.
- else
- {
- median = orderedValues[orderedValues.length / 2];
- }
-
- // log.debug("median = " + median);
-
- return median;
- }
-
- /// <summary>
- /// Computes the mean of a series of values.
- /// </summary>
- /// <param name="values"> The values. </param>
- ///
- /// <return> The mean. </return>
- public static long mean(long[] values)
- {
- // log.debug("public static long mean(long[] values = " + Arrays.ToString(values) + "): called");
-
- long total = 0L;
-
- for (long value : values)
- {
- total += value;
- }
-
- long mean = total / values.length;
-
- // log.debug("mean = " + mean);
-
- return mean;
- }
-
- /// <summary>
- /// Computes the variance of series of values.
- /// </summary>
- /// <param name="values"> The values. </param>
- ///
- /// <return> The variance of the values. </return>
- public static long variance(long[] values)
- {
- // log.debug("public static long variance(long[] values = " + Arrays.ToString(values) + "): called");
-
- long mean = mean(values);
-
- long totalVariance = 0;
-
- for (long value : values)
- {
- long diff = (value - mean);
- totalVariance += diff/// diff;
- }
-
- long variance = totalVariance / values.length;
-
- // log.debug("variance = " + variance);
-
- return variance;
- }
-
- /// <summary>
- /// Computes the standard deviation of a series of values.
- /// </summary>
- /// <param name="values"> The values. </param>
- ///
- /// <return> The standard deviation. </return>
- public static long standardDeviation(long[] values)
- {
- // log.debug("public static long standardDeviation(long[] values = " + Arrays.ToString(values) + "): called");
-
- long sd = Double.valueOf(Math.sqrt(variance(values))).longValue();
-
- // log.debug("sd = " + sd);
-
- return sd;
- }
-
- /// <summary>
- /// For testing purposes. Supply address of reference clock as arg 1.
- /// </summary>
- /// <param name="args"> Address of reference clock as arg 1. </param>
- public static void main(String[] args)
- {
- ParsedProperties options =
- new ParsedProperties(CommandLineParser.processCommandLine(args,
- new CommandLineParser(
- new String[][]
- {
- { "1", "Address of clock reference service.", "address", "true" }
- }), System.getProperties()));
-
- string address = options.getProperty("1");
-
- // Create a clock synchronizer.
- UDPClockSynchronizer clockSyncher = new UDPClockSynchronizer(address);
-
- // Set up a shutdown hook for it.
- Runtime.getRuntime().addShutdownHook(new Thread(new Runnable()
- {
- public void run()
- {
- doSynch = false;
- }
- }));
-
- // Repeat the clock synching until the user kills the progam.
- while (doSynch)
- {
- // Perform a clock clockSynch.
- try
- {
- clockSyncher.synch();
-
- // Print out the clock delta and estimate of the error.
- System.out.println("Delta = " + clockSyncher.getDelta());
- System.out.println("Epsilon = " + clockSyncher.getEpsilon());
-
- try
- {
- Thread.sleep(250);
- }
- catch (InterruptedException e)
- {
- // Restore the interrupted status and terminate the loop.
- Thread.currentThread().interrupt();
- doSynch = false;
- }
- }
- // Terminate if the reference time service is unavailable.
- catch (ClockSynchFailureException e)
- {
- doSynch = false;
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/distributedcircuit/TestClient.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/distributedcircuit/TestClient.csx
deleted file mode 100644
index 1126fec520..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/distributedcircuit/TestClient.csx
+++ /dev/null
@@ -1,493 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-using org.apache.log4j.NDC;
-
-using Apache.Qpid.Integration.Tests.framework.MessagingTestConfigProperties;
-using Apache.Qpid.Integration.Tests.framework.TestUtils;
-using Apache.Qpid.Integration.Tests.framework.clocksynch.ClockSynchThread;
-using Apache.Qpid.Integration.Tests.framework.clocksynch.UDPClockSynchronizer;
-using org.apache.qpid.util.ReflectionUtils;
-using org.apache.qpid.util.ReflectionUtilsException;
-
-using uk.co.thebadgerset.junit.extensions.SleepThrottle;
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-using uk.co.thebadgerset.junit.extensions.util.TestContextProperties;
-
-using javax.jms.*;
-
-using java.util.*;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedtesting
-{
- /// <summary>
- /// Implements a test client as described in the interop testing spec
- /// (http://cwiki.apache.org/confluence/display/qpid/Interop+Testing+Specification). A test client is an agent that
- /// reacts to control message sequences send by the test <see cref="Coordinator"/>.
- ///
- /// <p/><table><caption>Messages Handled by TestClient</caption>
- /// <tr><th> Message <th> Action
- /// <tr><td> Invite(compulsory) <td> Reply with Enlist.
- /// <tr><td> Invite(test case) <td> Reply with Enlist if test case available.
- /// <tr><td> AssignRole(test case) <td> Reply with Accept Role if matches an enlisted test. Keep test parameters.
- /// <tr><td> Start <td> Send test messages defined by test parameters. Send report on messages sent.
- /// <tr><td> Status Request <td> Send report on messages received.
- /// <tr><td> Terminate <td> Terminate the test client.
- /// <tr><td> ClockSynch <td> Synch clock against the supplied UDP address.
- /// </table>
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Handle all incoming control messages. <td> <see cref="TestClientControlledTest"/>
- /// <tr><td> Configure and look up test cases by name. <td> <see cref="TestClientControlledTest"/>
- /// </table>
- /// </summary>
- public class TestClient : MessageListener
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(TestClient));
-
- /// <summary> Used for reporting to the console. </summary>
- private static ILog console = LogManager.GetLogger("CONSOLE");
-
- /// <summary> Holds the default identifying name of the test client. </summary>
- public static final string CLIENT_NAME = "java";
-
- /// <summary> Holds the URL of the broker to run the tests on. </summary>
- public static string brokerUrl;
-
- /// <summary> Holds the virtual host to run the tests on. If <tt>null</tt>, then the default virtual host is used. </summary>
- public static string virtualHost;
-
- /// <summary>
- /// Holds the test context properties that provides the default test parameters, plus command line overrides.
- /// This is initialized with the default test parameters, to which command line overrides may be applied.
- /// </summary>
- public static ParsedProperties testContextProperties =
- TestContextProperties.getInstance(MessagingTestConfigProperties.defaults);
-
- /// <summary> Holds all the test cases loaded from the classpath. </summary>
- Map<String, TestClientControlledTest> testCases = new HashMap<String, TestClientControlledTest>();
-
- /// <summary> Holds the test case currently being run by this client. </summary>
- protected TestClientControlledTest currentTestCase;
-
- /// <summary> Holds the connection to the broker that the test is being coordinated on. </summary>
- protected Connection connection;
-
- /// <summary> Holds the message producer to hold the test coordination over. </summary>
- protected MessageProducer producer;
-
- /// <summary> Holds the JMS controlSession for the test coordination. </summary>
- protected Session session;
-
- /// <summary> Holds the name of this client, with a default value. </summary>
- protected string clientName = CLIENT_NAME;
-
- /// <summary> This flag indicates that the test client should attempt to join the currently running test case on start up. </summary>
- protected bool join;
-
- /// <summary> Holds the clock synchronizer for the test node. </summary>
- ClockSynchThread clockSynchThread;
-
- /// <summary>
- /// Creates a new interop test client, listenting to the specified broker and virtual host, with the specified client
- /// identifying name.
- /// </summary>
- /// <param name="pBrokerUrl"> The url of the broker to connect to. </param>
- /// <param name="pVirtualHost"> The virtual host to conect to. </param>
- /// <param name="clientName"> The client name to use. </param>
- /// <param name="join"> Flag to indicate that this client should attempt to join running tests. </param>
- public TestClient(string pBrokerUrl, string pVirtualHost, string clientName, bool join)
- {
- log.debug("public TestClient(string pBrokerUrl = " + pBrokerUrl + ", string pVirtualHost = " + pVirtualHost
- + ", string clientName = " + clientName + ", bool join = " + join + "): called");
-
- // Retain the connection parameters.
- brokerUrl = pBrokerUrl;
- virtualHost = pVirtualHost;
- this.clientName = clientName;
- this.join = join;
- }
-
- /// <summary>
- /// The entry point for the interop test coordinator. This client accepts the following command line arguments:
- ///
- /// <p/><table>
- /// <tr><td> -b <td> The broker URL. <td> Optional.
- /// <tr><td> -h <td> The virtual host. <td> Optional.
- /// <tr><td> -n <td> The test client name. <td> Optional.
- /// <tr><td> name=value <td> Trailing argument define name/value pairs. Added to system properties. <td> Optional.
- /// </table>
- /// </summary>
- /// <param name="args"> The command line arguments. </param>
- public static void main(String[] args)
- {
- log.debug("public static void main(String[] args = " + Arrays.ToString(args) + "): called");
- console.info("Qpid Distributed Test Client.");
-
- // Override the default broker url to be localhost:5672.
- testContextProperties.setProperty(MessagingTestConfigProperties.BROKER_PROPNAME, "tcp://localhost:5672");
-
- // Use the command line parser to evaluate the command line with standard handling behaviour (print errors
- // and usage then exist if there are errors).
- // Any options and trailing name=value pairs are also injected into the test context properties object,
- // to override any defaults that may have been set up.
- ParsedProperties options =
- new ParsedProperties(uk.co.thebadgerset.junit.extensions.util.CommandLineParser.processCommandLine(args,
- new uk.co.thebadgerset.junit.extensions.util.CommandLineParser(
- new String[][]
- {
- { "b", "The broker URL.", "broker", "false" },
- { "h", "The virtual host to use.", "virtual host", "false" },
- { "o", "The name of the directory to output test timings to.", "dir", "false" },
- { "n", "The name of the test client.", "name", "false" },
- { "j", "Join this test client to running test.", "false" }
- }), testContextProperties));
-
- // Extract the command line options.
- string brokerUrl = options.getProperty("b");
- string virtualHost = options.getProperty("h");
- string clientName = options.getProperty("n");
- clientName = (clientName == null) ? CLIENT_NAME : clientName;
- bool join = options.getPropertyAsBoolean("j");
-
- // To distinguish logging output set up an NDC on the client name.
- NDC.push(clientName);
-
- // Create a test client and start it running.
- TestClient client = new TestClient(brokerUrl, virtualHost, clientName, join);
-
- // Use a class path scanner to find all the interop test case implementations.
- // Hard code the test classes till the classpath scanner is fixed.
- Collection<Class<? extends TestClientControlledTest>> testCaseClasses =
- new ArrayList<Class<? extends TestClientControlledTest>>();
- // ClasspathScanner.getMatches(TestClientControlledTest.class, "^TestCase.*", true);
- testCaseClasses.addAll(loadTestCases("org.apache.qpid.interop.clienttestcases.TestCase1DummyRun",
- "org.apache.qpid.interop.clienttestcases.TestCase2BasicP2P",
- "org.apache.qpid.interop.clienttestcases.TestCase3BasicPubSub",
- "org.apache.qpid.interop.clienttestcases.TestCase4P2PMessageSize",
- "org.apache.qpid.interop.clienttestcases.TestCase5PubSubMessageSize",
- "Apache.Qpid.Integration.Tests.framework.distributedcircuit.TestClientCircuitEnd"));
-
- try
- {
- client.start(testCaseClasses);
- }
- catch (Exception e)
- {
- log.error("The test client was unable to start.", e);
- console.info(e.getMessage());
- System.exit(1);
- }
- }
-
- /// <summary>
- /// Parses a list of class names, and loads them if they are available on the class path.
- /// </summary>
- /// <param name="classNames"> The names of the classes to load. </param>
- ///
- /// <return> A list of the loaded test case classes. </return>
- public static IList<Class<? extends TestClientControlledTest>> loadTestCases(String... classNames)
- {
- IList<Class<? extends TestClientControlledTest>> testCases =
- new LinkedList<Class<? extends TestClientControlledTest>>();
-
- for (string className : classNames)
- {
- try
- {
- Class<?> cls = ReflectionUtils.forName(className);
- testCases.add((Class<? extends TestClientControlledTest>) cls);
- }
- catch (ReflectionUtilsException e)
- {
- // Ignore, class could not be found, so test not available.
- console.warn("Requested class " + className + " cannot be found, ignoring it.");
- }
- catch (ClassCastException e)
- {
- // Ignore, class was not of correct type to be a test case.
- console.warn("Requested class " + className + " is not an instance of TestClientControlledTest.");
- }
- }
-
- return testCases;
- }
-
- /// <summary>
- /// Starts the interop test client running. This causes it to start listening for incoming test invites.
- /// </summary>
- /// <param name="testCaseClasses"> The classes of the available test cases. The test case names from these are used to </param>
- /// matchin incoming test invites against.
- ///
- /// <exception cref="JMSException"> Any underlying JMSExceptions are allowed to fall through. </exception>
- protected void start(Collection<Class<? extends TestClientControlledTest>> testCaseClasses) throws JMSException
- {
- log.debug("protected void start(Collection<Class<? extends TestClientControlledTest>> testCaseClasses = "
- + testCaseClasses + "): called");
-
- // Create all the test case implementations and index them by the test names.
- for (Class<? extends TestClientControlledTest> nextClass : testCaseClasses)
- {
- try
- {
- TestClientControlledTest testCase = nextClass.newInstance();
- testCases.put(testCase.getName(), testCase);
- }
- catch (InstantiationException e)
- {
- log.warn("Could not instantiate test case class: " + nextClass.getName(), e);
- // Ignored.
- }
- catch (IllegalAccessException e)
- {
- log.warn("Could not instantiate test case class due to illegal access: " + nextClass.getName(), e);
- // Ignored.
- }
- }
-
- // Open a connection to communicate with the coordinator on.
- connection = TestUtils.createConnection(testContextProperties);
- session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- // Set this up to listen for control messages.
- Topic privateControlTopic = session.createTopic("iop.control." + clientName);
- MessageConsumer consumer = session.createConsumer(privateControlTopic);
- consumer.setMessageListener(this);
-
- Topic controlTopic = session.createTopic("iop.control");
- MessageConsumer consumer2 = session.createConsumer(controlTopic);
- consumer2.setMessageListener(this);
-
- // Create a producer to send replies with.
- producer = session.createProducer(null);
-
- // If the join flag was set, then broadcast a join message to notify the coordinator that a new test client
- // is available to join the current test case, if it supports it. This message may be ignored, or it may result
- // in this test client receiving a test invite.
- if (join)
- {
- Message joinMessage = session.createMessage();
-
- joinMessage.setStringProperty("CONTROL_TYPE", "JOIN");
- joinMessage.setStringProperty("CLIENT_NAME", clientName);
- joinMessage.setStringProperty("CLIENT_PRIVATE_CONTROL_KEY", "iop.control." + clientName);
- producer.send(controlTopic, joinMessage);
- }
-
- // Start listening for incoming control messages.
- connection.start();
- }
-
- /// <summary>
- /// Handles all incoming control messages.
- /// </summary>
- /// <param name="message"> The incoming message. </param>
- public void onMessage(Message message)
- {
- NDC.push(clientName);
- log.debug("public void onMessage(Message message = " + message + "): called");
-
- try
- {
- string controlType = message.getStringProperty("CONTROL_TYPE");
- string testName = message.getStringProperty("TEST_NAME");
-
- log.debug("Received control of type '" + controlType + "' for the test '" + testName + "'");
-
- // Check if the message is a test invite.
- if ("INVITE".equals(controlType))
- {
- // Flag used to indicate that an enlist should be sent. Only enlist to compulsory invites or invites
- // for which test cases exist.
- bool enlist = false;
-
- if (testName != null)
- {
- log.debug("Got an invite to test: " + testName);
-
- // Check if the requested test case is available.
- TestClientControlledTest testCase = testCases.get(testName);
-
- if (testCase != null)
- {
- log.debug("Found implementing class for test '" + testName + "', enlisting for it.");
-
- // Check if the test case will accept the invitation.
- enlist = testCase.acceptInvite(message);
-
- log.debug("The test case "
- + (enlist ? " accepted the invite, enlisting for it."
- : " did not accept the invite, not enlisting."));
-
- // Make the requested test case the current test case.
- currentTestCase = testCase;
- }
- else
- {
- log.debug("Received an invite to the test '" + testName + "' but this test is not known.");
- }
- }
- else
- {
- log.debug("Got a compulsory invite, enlisting for it.");
-
- enlist = true;
- }
-
- if (enlist)
- {
- // Reply with the client name in an Enlist message.
- Message enlistMessage = session.createMessage();
- enlistMessage.setStringProperty("CONTROL_TYPE", "ENLIST");
- enlistMessage.setStringProperty("CLIENT_NAME", clientName);
- enlistMessage.setStringProperty("CLIENT_PRIVATE_CONTROL_KEY", "iop.control." + clientName);
- enlistMessage.setJMSCorrelationID(message.getJMSCorrelationID());
-
- log.debug("Sending enlist message '" + enlistMessage + "' to " + message.getJMSReplyTo());
-
- producer.send(message.getJMSReplyTo(), enlistMessage);
- }
- else
- {
- // Reply with the client name in an Decline message.
- Message enlistMessage = session.createMessage();
- enlistMessage.setStringProperty("CONTROL_TYPE", "DECLINE");
- enlistMessage.setStringProperty("CLIENT_NAME", clientName);
- enlistMessage.setStringProperty("CLIENT_PRIVATE_CONTROL_KEY", "iop.control." + clientName);
- enlistMessage.setJMSCorrelationID(message.getJMSCorrelationID());
-
- log.debug("Sending decline message '" + enlistMessage + "' to " + message.getJMSReplyTo());
-
- producer.send(message.getJMSReplyTo(), enlistMessage);
- }
- }
- else if ("ASSIGN_ROLE".equals(controlType))
- {
- // Assign the role to the current test case.
- string roleName = message.getStringProperty("ROLE");
-
- log.debug("Got a role assignment to role: " + roleName);
-
- TestClientControlledTest.Roles role = Enum.valueOf(TestClientControlledTest.Roles.class, roleName);
-
- currentTestCase.assignRole(role, message);
-
- // Reply by accepting the role in an Accept Role message.
- Message acceptRoleMessage = session.createMessage();
- acceptRoleMessage.setStringProperty("CLIENT_NAME", clientName);
- acceptRoleMessage.setStringProperty("CONTROL_TYPE", "ACCEPT_ROLE");
- acceptRoleMessage.setJMSCorrelationID(message.getJMSCorrelationID());
-
- log.debug("Sending accept role message '" + acceptRoleMessage + "' to " + message.getJMSReplyTo());
-
- producer.send(message.getJMSReplyTo(), acceptRoleMessage);
- }
- else if ("START".equals(controlType) || "STATUS_REQUEST".equals(controlType))
- {
- if ("START".equals(controlType))
- {
- log.debug("Got a start notification.");
-
- // Extract the number of test messages to send from the start notification.
- int numMessages;
-
- try
- {
- numMessages = message.getIntProperty("MESSAGE_COUNT");
- }
- catch (NumberFormatException e)
- {
- // If the number of messages is not specified, use the default of one.
- numMessages = 1;
- }
-
- // Start the current test case.
- currentTestCase.start(numMessages);
- }
- else
- {
- log.debug("Got a status request.");
- }
-
- // Generate the report from the test case and reply with it as a Report message.
- Message reportMessage = currentTestCase.getReport(session);
- reportMessage.setStringProperty("CLIENT_NAME", clientName);
- reportMessage.setStringProperty("CONTROL_TYPE", "REPORT");
- reportMessage.setJMSCorrelationID(message.getJMSCorrelationID());
-
- log.debug("Sending report message '" + reportMessage + "' to " + message.getJMSReplyTo());
-
- producer.send(message.getJMSReplyTo(), reportMessage);
- }
- else if ("TERMINATE".equals(controlType))
- {
- console.info("Received termination instruction from coordinator.");
-
- // Is a cleaner shutdown needed?
- connection.close();
- System.exit(0);
- }
- else if ("CLOCK_SYNCH".equals(controlType))
- {
- log.debug("Received clock synch command.");
- string address = message.getStringProperty("ADDRESS");
-
- log.debug("address = " + address);
-
- // Re-create (if necessary) and start the clock synch thread to synch the clock every ten seconds.
- if (clockSynchThread != null)
- {
- clockSynchThread.terminate();
- }
-
- SleepThrottle throttle = new SleepThrottle();
- throttle.setRate(0.1f);
-
- clockSynchThread = new ClockSynchThread(new UDPClockSynchronizer(address), throttle);
- clockSynchThread.start();
- }
- else
- {
- // Log a warning about this but otherwise ignore it.
- log.warn("Got an unknown control message, controlType = " + controlType + ", message = " + message);
- }
- }
- catch (JMSException e)
- {
- // Log a warning about this, but otherwise ignore it.
- log.warn("Got JMSException whilst handling message: " + message, e);
- }
- // Log any runtimes that fall through this message handler. These are fatal errors for the test client.
- catch (RuntimeException e)
- {
- log.error("The test client message handler got an unhandled exception: ", e);
- console.info("The message handler got an unhandled exception, terminating the test client.");
- System.exit(1);
- }
- finally
- {
- NDC.pop();
- }
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/distributedcircuit/TestClientCircuitEnd.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/distributedcircuit/TestClientCircuitEnd.csx
deleted file mode 100644
index 5ac2c4bf5b..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/distributedcircuit/TestClientCircuitEnd.csx
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.*;
-using Apache.Qpid.Integration.Tests.framework.distributedtesting.TestClientControlledTest;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-using uk.co.thebadgerset.junit.extensions.util.TestContextProperties;
-
-using javax.jms.*;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedcircuit
-{
- /// <summary>
- /// A TestClientCircuitEnd is a <see cref="CircuitEnd"/> that may be controlled from a
- /// <see cref="Apache.Qpid.Integration.Tests.framework.distributedtesting.TestClient"/>, and that forms a single publishing or
- /// receiving end point in a distributed test <see cref="Apache.Qpid.Integration.Tests.framework.Circuit"/>.
- ///
- /// <p/>When operating in the SENDER role, this circuit end is capable of acting as part of the default circuit test
- /// procedure (described in the class comment for <see cref="Apache.Qpid.Integration.Tests.framework.Circuit"/>). That is, it will
- /// send the number of test messages required, using the test configuration parameters given in the test invite, and
- /// return a report on its activities to the circuit controller.
- ///
- /// <p/>When operation in the RECEIVER role, this circuit end acts as part of the default circuit test procedure. It will
- /// receive test messages, on the setup specified in the test configuration parameters, and keep count of the messages
- /// received, and time taken to receive them. When requested by the circuit controller to provide a report, it will
- /// return this report of its activities.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide a message producer for sending messages.
- /// <td> <see cref="CircuitEnd"/>, <see cref="LocalCircuitFactory"/>, <see cref="TestUtils"/>
- /// <tr><td> Provide a message consumer for receiving messages.
- /// <td> <see cref="CircuitEnd"/>, <see cref="LocalCircuitFactory"/>, <see cref="TestUtils"/>
- /// <tr><td> Supply the name of the test case that this implements.
- /// <tr><td> Accept/Reject invites based on test parameters. <td> <see cref="MessagingTestConfigProperties"/>
- /// <tr><td> Adapt to assigned roles. <td> <see cref="TestClientControlledTest.Roles"/>
- /// <tr><td> Perform test case actions. <td> <see cref="MessageMonitor"/>
- /// <tr><td> Generate test reports. <td> <see cref="MessageMonitor"/>
- /// </table>
- /// </summary>
- public class TestClientCircuitEnd : CircuitEnd, TestClientControlledTest
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(TestClientCircuitEnd));
-
- /// <summary> Holds the test parameters. </summary>
- ParsedProperties testProps;
-
- /// <summary> The number of test messages to send. </summary>
- private int numMessages;
-
- /// <summary> The role to be played by the test. </summary>
- private Roles role;
-
- /// <summary> The connection to send the test messages on. </summary>
- private Connection connection;
-
- /// <summary> Holds the circuit end for this test. </summary>
- CircuitEnd circuitEnd;
-
- /// <summary>
- /// Holds a message monitor for this circuit end, either the monitor on the consumer when in RECEIVER more, or
- /// a monitor updated on every message sent, when acting as a SENDER.
- MessageMonitor messageMonitor;
-
- /// <summary>
- /// Should provide the name of the test case that this class implements. The exact names are defined in the
- /// interop testing spec.
- /// </summary>
- /// <return> The name of the test case that this implements. </return>
- public string getName()
- {
- return "DEFAULT_CIRCUIT_TEST";
- }
-
- /// <summary>
- /// Determines whether the test invite that matched this test case is acceptable.
- /// </summary>
- /// <param name="inviteMessage"> The invitation to accept or reject. </param>
- /// <return> <tt>true</tt> to accept the invitation, <tt>false</tt> to reject it. </return>
- /// </summary>
- /// <exception cref="JMSException"> Any JMSException resulting from reading the message are allowed to fall through. </exception>
- public bool acceptInvite(Message inviteMessage) throws JMSException
- {
- log.debug("public bool acceptInvite(Message inviteMessage): called");
-
- // Populate the test parameters from the invitation.
- testProps = TestContextProperties.getInstance(MessagingTestConfigProperties.defaults);
-
- for (Object key : testProps.keySet())
- {
- string propName = (String) key;
-
- // If the test parameters is overridden by the invitation, use it instead.
- string inviteValue = inviteMessage.getStringProperty(propName);
-
- if (inviteValue != null)
- {
- testProps.setProperty(propName, inviteValue);
- log.debug("Test invite supplied override to " + propName + " of " + inviteValue);
- }
-
- }
-
- // Accept the invitation.
- return true;
- }
-
- /// <summary>
- /// Assigns the role to be played by this test case. The test parameters are fully specified in the
- /// assignment message. When this method return the test case will be ready to execute.
- /// </summary>
- /// <param name="role"> The role to be played; sender or receivers. </param>
- /// <param name="assignRoleMessage"> The role assingment message, contains the full test parameters. </param>
- ///
- /// <exception cref="JMSException"> Any JMSException resulting from reading the message are allowed to fall through. </exception>
- public void assignRole(Roles role, Message assignRoleMessage) throws JMSException
- {
- log.debug("public void assignRole(Roles role, Message assignRoleMessage): called");
-
- // Take note of the role to be played.
- this.role = role;
-
- // Extract and retain the test parameters.
- numMessages = 1; // assignRoleMessage.getIntProperty("NUM_MESSAGES");
-
- // Connect using the test parameters.
- connection = TestUtils.createConnection(testProps);
-
- // Create a circuit end that matches the assigned role and test parameters.
- LocalCircuitFactory circuitFactory = new LocalCircuitFactory();
-
- switch (role)
- {
- // Check if the sender role is being assigned, and set up a message producer if so.
- case SENDER:
-
- // Set up the publisher.
- circuitEnd = circuitFactory.createPublisherCircuitEnd(connection, testProps, 0L);
-
- // Create a custom message monitor that will be updated on every message sent.
- messageMonitor = new MessageMonitor();
-
- break;
-
- // Otherwise the receivers role is being assigned, so set this up to listen for messages.
- case RECEIVER:
-
- // Set up the receiver.
- circuitEnd = circuitFactory.createReceiverCircuitEnd(connection, testProps, 0L);
-
- // Use the message monitor from the consumer for stats.
- messageMonitor = getMessageMonitor();
-
- break;
- }
-
- // Reset all messaging stats for the report.
- messageMonitor.reset();
-
- connection.start();
- }
-
- /// <summary>
- /// Performs the test case actions. Returning from here, indicates that the sending role has completed its test.
- /// </summary>
- /// <param name="numMessages"> The number of test messages to send. </param>
- ///
- /// <exception cref="JMSException"> Any JMSException resulting from reading the message are allowed to fall through. </exception>
- ///
- /// <remarks> Add round robin on destinations where multiple destinations being used.</remarks>
- ///
- /// <remarks> Add rate limiting when rate limit specified on publishers.</remarks>
- ///
- /// <remarks> Add Max pending message size protection. The receiver will have to send back some acks once in a while,
- /// to notify the publisher that its messages are being consumed. This makes the safety valve harder to
- /// implement than in the single VM case. For example, if the limit is 1000 messages, might want to get back
- /// an ack every 500, to notify the publisher that it can keep sending. What about pub/sub tests? Will it be
- /// necessary to wait for an ack from every receiver? This will have the effect of rate limiting to slow
- /// consumers too.</remarks>
- ///
- /// <remarks> Add commits on every commit batch size boundary.</remarks>
- public void start(int numMessages) throws JMSException
- {
- log.debug("public void start(): called");
-
- // If in the SENDER role, send the specified number of test messages to the circuit destinations.
- if (role.equals(Roles.SENDER))
- {
- Message testMessage = getSession().createMessage();
-
- for (int i = 0; i < numMessages; i++)
- {
- getProducer().send(testMessage);
-
- // Increment the message count and timings.
- messageMonitor.onMessage(testMessage);
- }
- }
- }
-
- /// <summary>
- /// Gets a report on the actions performed by the test case in its assigned role.
- /// </summary>
- /// <param name="session"> The controlSession to create the report message in. </param>
- /// <return> The report message. </return>
- ///
- /// <exception cref="JMSException"> Any JMSExceptions resulting from creating the report are allowed to fall through. </exception>
- public Message getReport(Session session) throws JMSException
- {
- Message report = session.createMessage();
- report.setStringProperty("CONTROL_TYPE", "REPORT");
-
- // Add the count of messages sent/received to the report.
- report.setIntProperty("MESSAGE_COUNT", messageMonitor.getNumMessage());
-
- // Add the time to send/receive messages to the report.
- report.setLongProperty("TEST_TIME", messageMonitor.getTime());
-
- // Add any exceptions detected to the report.
-
- return report;
- }
-
- /// <summary>
- /// Gets the message producer at this circuit end point.
- /// </summary>
- /// <return> The message producer at with this circuit end point. </return>
- public MessageProducer getProducer()
- {
- return circuitEnd.getProducer();
- }
-
- /// <summary>
- /// Gets the message consumer at this circuit end point.
- /// </summary>
- /// <return> The message consumer at this circuit end point. </return>
- public MessageConsumer getConsumer()
- {
- return circuitEnd.getConsumer();
- }
-
- /// <summary>
- /// Send the specified message over the producer at this end point.
- /// </summary>
- /// <param name="message"> The message to send. </param>
- ///
- /// <exception cref="JMSException"> Any JMS exception occuring during the send is allowed to fall through. </exception>
- public void send(Message message) throws JMSException
- {
- // Send the message on the circuit ends producer.
- circuitEnd.send(message);
- }
-
- /// <summary>
- /// Gets the JMS Session associated with this circuit end point.
- /// </summary>
- /// <return> The JMS Session associated with this circuit end point. </return>
- public Session getSession()
- {
- return circuitEnd.getSession();
- }
-
- /// <summary>
- /// Closes the message producers and consumers and the sessions, associated with this circuit end point.
- ///
- /// <exception cref="JMSException"> Any JMSExceptions occurring during the close are allowed to fall through. </exception>
- public void close() throws JMSException
- {
- // Close the producer and consumer.
- circuitEnd.close();
- }
-
- /// <summary>
- /// Returns the message monitor for reporting on received messages on this circuit end.
- /// </summary>
- /// <return> The message monitor for this circuit end. </return>
- public MessageMonitor getMessageMonitor()
- {
- return circuitEnd.getMessageMonitor();
- }
-
- /// <summary>
- /// Returns the exception monitor for reporting on exceptions received on this circuit end.
- /// </summary>
- /// <return> The exception monitor for this circuit end. </return>
- public ExceptionMonitor getExceptionMonitor()
- {
- return circuitEnd.getExceptionMonitor();
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/distributedcircuit/TestClientControlledTest.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/distributedcircuit/TestClientControlledTest.csx
deleted file mode 100644
index cfb06aa642..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/distributedcircuit/TestClientControlledTest.csx
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using javax.jms.JMSException;
-using javax.jms.Message;
-using javax.jms.MessageListener;
-using javax.jms.Session;
-
-namespace Apache.Qpid.Integration.Tests.framework.distributedtesting
-{
- /// <summary>
- /// TestClientControlledTest provides an interface that classes implementing test cases to run on a <see cref="TestClient"/>
- /// node can use. Implementations must be Java beans, that is, to provide a default constructor and to implement the
- /// <see cref="#getName"/> method.
- ///
- /// <p/>The methods specified in this interface are called when the <see cref="TestClient"/> receives control instructions to
- /// apply to the test. There are control instructions to present the test case with the test invite, so that it may
- /// choose whether or not to participate in the test, assign the test to play the sender or receiver role, start the
- /// test and obtain the test status report.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Supply the name of the test case that this implements.
- /// <tr><td> Accept/Reject invites based on test parameters.
- /// <tr><td> Adapt to assigned roles.
- /// <tr><td> Perform test case actions.
- /// <tr><td> Generate test reports.
- /// </table>
- /// </summary>
- public interface TestClientControlledTest
- {
- /// <summary> Defines the possible test case roles that an interop test case can take on. </summary>
- public enum Roles
- {
- /// <summary> Specifies the sender role. </summary>
- SENDER,
-
- /// <summary> Specifies the receivers role. </summary>
- RECEIVER
- }
-
- /// <summary>
- /// Should provide the name of the test case that this class implements. The exact names are defined in the
- /// interop testing spec.
- /// </summary>
- /// <return> The name of the test case that this implements. </return>
- public string getName();
-
- /// <summary>
- /// Determines whether the test invite that matched this test case is acceptable.
- /// </summary>
- /// <param name="inviteMessage"> The invitation to accept or reject. </param>
- ///
- /// <return> <tt>true</tt> to accept the invitation, <tt>false</tt> to reject it. </return>
- ///
- /// <exception cref="JMSException"> Any JMSException resulting from reading the message are allowed to fall through. </exception>
- public bool acceptInvite(Message inviteMessage) throws JMSException;
-
- /// <summary>
- /// Assigns the role to be played by this test case. The test parameters are fully specified in the
- /// assignment message. When this method return the test case will be ready to execute.
- /// </summary>
- /// <param name="role"> The role to be played; sender or receivers. </param>
- /// <param name="assignRoleMessage"> The role assingment message, contains the full test parameters. </param>
- ///
- /// <exception cref="JMSException"> Any JMSException resulting from reading the message are allowed to fall through. </exception>
- public void assignRole(Roles role, Message assignRoleMessage) throws JMSException;
-
- /// <summary>
- /// Performs the test case actions. Returning from here, indicates that the sending role has completed its test.
- /// </summary>
- /// <param name="numMessages"> The number of test messages to send. </param>
- ///
- /// <exception cref="JMSException"> Any JMSException resulting from reading the message are allowed to fall through. </exception>
- public void start(int numMessages) throws JMSException;
-
- /// <summary>
- /// Gets a report on the actions performed by the test case in its assigned role.
- /// </summary>
- /// <param name="session"> The controlSession to create the report message in. </param>
- ///
- /// <return> The report message. </return>
- ///
- /// <exception cref="JMSException"> Any JMSExceptions resulting from creating the report are allowed to fall through. </exception>
- public Message getReport(Session session) throws JMSException;
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/localcircuit/LocalCircuitImpl.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/localcircuit/LocalCircuitImpl.csx
deleted file mode 100644
index 0594e4d781..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/localcircuit/LocalCircuitImpl.csx
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.*;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.*;
-
-using System.Collections.Generic.LinkedList;
-using System.Collections.Generic.IList;
-
-namespace Apache.Qpid.Integration.Tests.framework.localcircuit
-{
- /// <summary>
- /// LocalCircuitImpl provides an implementation of the test circuit. This is a local only circuit implementation that
- /// supports a single producer/consumer on each end of the circuit, with both ends of the circuit on the same JVM.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Supply the publishing and receiving ends of a test messaging circuit.
- /// <td> <see cref="LocalPublisherImpl"/>, <see cref="LocalReceiverImpl"/>
- /// <tr><td> Start the circuit running.
- /// <tr><td> Close the circuit down.
- /// <tr><td> Take a reading of the circuits state.
- /// <tr><td> Apply assertions against the circuits state. <td> <see cref="Assertion"/>
- /// <tr><td> Send test messages over the circuit.
- /// <tr><td> Perform the default test procedure on the circuit.
- /// <tr><td> Provide access to connection and controlSession exception monitors. <td> <see cref="ExceptionMonitor"/>
- /// </table>
- /// </summary>
- public class LocalCircuitImpl : Circuit
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(LocalCircuitImpl));
-
- /// <summary> Holds the test configuration for the circuit. </summary>
- private ParsedProperties testProps;
-
- /// <summary> Holds the publishing end of the circuit. </summary>
- private LocalPublisherImpl publisher;
-
- /// <summary> Holds the receiving end of the circuit. </summary>
- private LocalReceiverImpl receiver;
-
- /// <summary> Holds the connection for the publishing end of the circuit. </summary>
- private Connection connection;
-
- /// <summary> Holds the exception listener for the connection on the publishing end of the circuit. </summary>
- private ExceptionMonitor connectionExceptionMonitor;
-
- /// <summary> Holds the exception listener for the controlSession on the publishing end of the circuit. </summary>
- private ExceptionMonitor exceptionMonitor;
-
- /// <summary>
- /// Creates a test circuit using the specified test parameters. The publisher, receivers, connection and
- /// connection monitor must already have been created, to assemble the circuit.
- /// </summary>
- /// <param name="testProps"> The test parameters. </param>
- /// <param name="publisher"> The test publisher. </param>
- /// <param name="receiver"> The test receivers. </param>
- /// <param name="connection"> The connection. </param>
- /// <param name="connectionExceptionMonitor"> The connection exception monitor. </param>
- public LocalCircuitImpl(ParsedProperties testProps, LocalPublisherImpl publisher, LocalReceiverImpl receiver,
- Connection connection, ExceptionMonitor connectionExceptionMonitor)
- {
- this.testProps = testProps;
- this.publisher = publisher;
- this.receiver = receiver;
- this.connection = connection;
- this.connectionExceptionMonitor = connectionExceptionMonitor;
- this.exceptionMonitor = new ExceptionMonitor();
-
- // Set this as the parent circuit on the publisher and receivers.
- publisher.setCircuit(this);
- receiver.setCircuit(this);
- }
-
- /// <summary>
- /// Gets the interface on the publishing end of the circuit.
- /// </summary>
- /// <return> The publishing end of the circuit. </return>
- public Publisher getPublisher()
- {
- return publisher;
- }
-
- /// <summary>
- /// Gets the local publishing circuit end, for direct manipulation.
- /// </summary>
- /// <return> The local publishing circuit end. </return>
- public CircuitEnd getLocalPublisherCircuitEnd()
- {
- return publisher;
- }
-
- /// <summary>
- /// Gets the interface on the receiving end of the circuit.
- /// </summary>
- /// <return> The receiving end of the circuit. </return>
- public Receiver getReceiver()
- {
- return receiver;
- }
-
- /// <summary>
- /// Gets the local receiving circuit end, for direct manipulation.
- /// </summary>
- /// <return> The local receiving circuit end. </return>
- public CircuitEnd getLocalReceiverCircuitEnd()
- {
- return receiver;
- }
-
- /// <summary>
- /// Checks the test circuit. The effect of this is to gather the circuits state, for both ends of the circuit,
- /// into a report, against which assertions may be checked.
- /// </summary>
- public void check()
- { }
-
- /// <summary>
- /// Applied a list of assertions against the test circuit. The <see cref="#check()"/> method should be called before doing
- /// this, to ensure that the circuit has gathered its state into a report to assert against.
- /// </summary>
- /// <param name="assertions"> The list of assertions to apply. </param>
- /// <return> Any assertions that failed. </return>
- public IList<Assertion> applyAssertions(List<Assertion> assertions)
- {
- IList<Assertion> failures = new LinkedList<Assertion>();
-
- for (Assertion assertion : assertions)
- {
- if (!assertion.apply())
- {
- failures.add(assertion);
- }
- }
-
- return failures;
- }
-
- /// <summary> Connects and starts the circuit. After this method is called the circuit is ready to send messages. </summary>
- public void start()
- { }
-
- /// <summary> Closes the circuit. All associated resources are closed. </summary>
- public void close()
- {
- try
- {
- publisher.close();
- receiver.close();
- connection.close();
- }
- catch (JMSException e)
- {
- throw new RuntimeException("Got JMSException during close:" + e.getMessage(), e);
- }
- }
-
- /// <summary> Sends a message on the test circuit. The exact nature of the message sent is controlled by the test parameters. </summary>
- protected void send()
- {
- // Cast the test properties into a typed interface for convenience.
- MessagingTestConfigProperties props = new MessagingTestConfigProperties(testProps);
-
- bool transactional = props.getPublisherTransacted();
- bool rollback = props.getRollbackPublisher();
-
- // Send a message through the publisher and log any exceptions raised.
- try
- {
- CircuitEnd end = getLocalPublisherCircuitEnd();
-
- end.send(createTestMessage(end));
-
- if (rollback)
- {
- end.getSession().rollback();
- }
- else if (transactional)
- {
- end.getSession().commit();
- }
- }
- catch (JMSException e)
- {
- exceptionMonitor.onException(e);
- }
- }
-
- /// <summary>
- /// Runs the default test procedure against the circuit, and checks that all of the specified assertions hold. The
- /// outline of the default test procedure is:
- ///
- /// <p/><pre>
- /// Start the circuit.
- /// Send test messages.
- /// Request a status report.
- /// Assert conditions on the publishing end of the circuit.
- /// Assert conditions on the receiving end of the circuit.
- /// Close the circuit.
- /// Pass with no failed assertions or fail with a list of failed assertions.
- /// </pre>
- /// </summary>
- /// <param name="numMessages"> The number of messages to send using the default test procedure. </param>
- /// <param name="assertions"> The list of assertions to apply. </param>
- /// <return> Any assertions that failed. </return>
- public IList<Assertion> test(int numMessages, List<Assertion> assertions)
- {
- // Start the test circuit.
- start();
-
- // Send the requested number of test messages.
- for (int i = 0; i < numMessages; i++)
- {
- send();
- }
-
- // Inject a short pause to allow time for exceptions to come back asynchronously.
- TestUtils.pause(500L);
-
- // Request a status report.
- check();
-
- // Clean up the publisher/receivers/controlSession/connections.
- close();
-
- // Apply all of the requested assertions, keeping record of any that fail.
- IList<Assertion> failures = applyAssertions(assertions);
-
- // Return any failed assertions to the caller.
- return failures;
- }
-
- /// <summary>
- /// Creates a message with the properties defined as per the test parameters.
- /// </summary>
- /// <param name="client"> The circuit end to create the message on. </param>
- ///
- /// <return> The test message. </return>
- ///
- /// <exception cref="JMSException"> Any JMSException occurring during creation of the message is allowed to fall through. </exception>
- private Message createTestMessage(CircuitEnd client) throws JMSException
- {
- // Cast the test properties into a typed interface for convenience.
- MessagingTestConfigProperties props = new MessagingTestConfigProperties(testProps);
-
- return TestUtils.createTestMessageOfSize(client.getSession(), props.getMessageSize());
- }
-
- /// <summary>
- /// Gets the exception monitor for the publishing ends connection.
- /// </summary>
- /// <return> The exception monitor for the publishing ends connection. </return>
- public ExceptionMonitor getConnectionExceptionMonitor()
- {
- return connectionExceptionMonitor;
- }
-
- /// <summary>
- /// Gets the exception monitor for the publishing ends controlSession.
- /// </summary>
- /// <return> The exception monitor for the publishing ends controlSession. </return>
- public ExceptionMonitor getExceptionMonitor()
- {
- return exceptionMonitor;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/localcircuit/LocalPublisherImpl.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/localcircuit/LocalPublisherImpl.csx
deleted file mode 100644
index ecc94067ae..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/localcircuit/LocalPublisherImpl.csx
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Integration.Tests.framework.*;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.MessageConsumer;
-using javax.jms.MessageProducer;
-using javax.jms.Session;
-
-namespace Apache.Qpid.Integration.Tests.framework.localcircuit
-{
- /// <summary>
- /// Provides an implementation of the <see cref="Publisher"/> interface and wraps a single message producer and consumer on
- /// a single controlSession, as a <see cref="CircuitEnd"/>. A local publisher also acts as a circuit end, because for a locally
- /// located circuit the assertions may be applied directly, there does not need to be any inter-process messaging
- /// between the publisher and its single circuit end, in order to ascertain its status.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide a message producer for sending messages.
- /// <tr><td> Provide a message consumer for receiving messages.
- /// <tr><td> Provide assertion that the publisher received no exceptions.
- /// <tr><td> Provide assertion that the publisher received a no consumers error code.
- /// <tr><td> Provide assertion that the publisher received a no route error code.
- /// </table>
- /// </summary>
- public class LocalPublisherImpl extends CircuitEndBase : Publisher
- {
- /// <summary> Holds a reference to the containing circuit. </summary>
- protected LocalCircuitImpl circuit;
-
- /// <summary>
- /// Creates a circuit end point on the specified producer, consumer and controlSession. Monitors are also configured
- /// for messages and exceptions received by the circuit end.
- /// </summary>
- /// <param name="producer"> The message producer for the circuit end point. </param>
- /// <param name="consumer"> The message consumer for the circuit end point. </param>
- /// <param name="session"> The controlSession for the circuit end point. </param>
- /// <param name="messageMonitor"> The monitor to notify of all messages received by the circuit end. </param>
- /// <param name="exceptionMonitor"> The monitor to notify of all exceptions received by the circuit end. </param>
- public LocalPublisherImpl(MessageProducer producer, MessageConsumer consumer, Session session,
- MessageMonitor messageMonitor, ExceptionMonitor exceptionMonitor)
- {
- super(producer, consumer, session, messageMonitor, exceptionMonitor);
- }
-
- /// <summary>
- /// Creates a circuit end point from the producer, consumer and controlSession in a circuit end base implementation.
- /// </summary>
- /// <param name="end"> The circuit end base implementation to take producers and consumers from. </param>
- public LocalPublisherImpl(CircuitEndBase end)
- {
- super(end.getProducer(), end.getConsumer(), end.getSession(), end.getMessageMonitor(), end.getExceptionMonitor());
- }
-
- /// <summary> Provides an assertion that the publisher encountered no exceptions. </summary>
- ///
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the publisher encountered no exceptions. </return>
- public Assertion noExceptionsAssertion(ParsedProperties testProps)
- {
- return new AssertionBase()
- {
- public bool apply()
- {
- bool passed = true;
- ExceptionMonitor sessionExceptionMonitor = circuit.getExceptionMonitor();
- ExceptionMonitor connectionExceptionMonitor = circuit.getConnectionExceptionMonitor();
-
- if (!connectionExceptionMonitor.assertNoExceptions())
- {
- passed = false;
-
- addError("Was expecting no exceptions.\n");
- addError("Got the following exceptions on the connection, "
- + circuit.getConnectionExceptionMonitor());
- }
-
- if (!sessionExceptionMonitor.assertNoExceptions())
- {
- passed = false;
-
- addError("Was expecting no exceptions.\n");
- addError("Got the following exceptions on the producer, " + circuit.getExceptionMonitor());
- }
-
- return passed;
- }
- };
- }
-
- /// <summary>
- /// Provides an assertion that the AMQP channel was forcibly closed by an error condition.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the AMQP channel was forcibly closed by an error condition. </return>
- public Assertion channelClosedAssertion(ParsedProperties testProps)
- {
- return new NotApplicableAssertion(testProps);
- }
-
- /// <summary>
- /// Provides an assertion that the publisher got a given exception during the test.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <param name="exceptionClass"> The exception class to check for. </param>
- ///
- /// <return> An assertion that the publisher got a given exception during the test. </return>
- public Assertion exceptionAssertion(ParsedProperties testProps, final Class<? extends Exception> exceptionClass)
- {
- return new AssertionBase()
- {
- public bool apply()
- {
- bool passed = true;
- ExceptionMonitor connectionExceptionMonitor = circuit.getConnectionExceptionMonitor();
-
- if (!connectionExceptionMonitor.assertExceptionOfType(exceptionClass))
- {
- passed = false;
-
- addError("Was expecting linked exception type " + exceptionClass.getName()
- + " on the connection.\n");
- addError((connectionExceptionMonitor.size() > 0)
- ? ("Actually got the following exceptions on the connection, " + connectionExceptionMonitor)
- : "Got no exceptions on the connection.");
- }
-
- return passed;
- }
- };
- }
-
- /// <summary>
- /// Sets the contianing circuit.
- /// </summary>
- /// <param name="circuit"> The containing circuit. </param>
- public void setCircuit(LocalCircuitImpl circuit)
- {
- this.circuit = circuit;
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/localcircuit/LocalReceiverImpl.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/localcircuit/LocalReceiverImpl.csx
deleted file mode 100644
index b174a4c912..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/localcircuit/LocalReceiverImpl.csx
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Integration.Tests.framework.*;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.MessageConsumer;
-using javax.jms.MessageProducer;
-using javax.jms.Session;
-
-namespace Apache.Qpid.Integration.Tests.framework.localcircuit
-{
- /// <summary>
- /// Provides an implementation of the <see cref="Receiver"/> interface that wraps a single message producer and consumer on
- /// a single controlSession, as a <see cref="CircuitEnd"/>. A local receiver also acts as a circuit end, because for a locally
- /// located circuit the assertions may be applied directly, there does not need to be any inter process messaging
- /// between the publisher and its single circuit end, in order to ascertain its status.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Provide a message producer for sending messages.
- /// <tr><td> Provide a message consumer for receiving messages.
- /// <tr><td> Provide assertion that the receivers received no exceptions.
- /// <tr><td> Provide assertion that the receivers received all test messages sent to it.
- /// </table>
- /// </summary>
- public class LocalReceiverImpl extends CircuitEndBase : Receiver
- {
- /// <summary> Holds a reference to the containing circuit. </summary>
- private LocalCircuitImpl circuit;
-
- /// <summary>
- /// Creates a circuit end point on the specified producer, consumer and controlSession. Monitors are also configured
- /// for messages and exceptions received by the circuit end.
- /// </summary>
- /// <param name="producer"> The message producer for the circuit end point. </param>
- /// <param name="consumer"> The message consumer for the circuit end point. </param>
- /// <param name="session"> The controlSession for the circuit end point. </param>
- /// <param name="messageMonitor"> The monitor to notify of all messages received by the circuit end. </param>
- /// <param name="exceptionMonitor"> The monitor to notify of all exceptions received by the circuit end. </param>
- public LocalReceiverImpl(MessageProducer producer, MessageConsumer consumer, Session session,
- MessageMonitor messageMonitor, ExceptionMonitor exceptionMonitor)
- {
- super(producer, consumer, session, messageMonitor, exceptionMonitor);
- }
-
- /// <summary>
- /// Creates a circuit end point from the producer, consumer and controlSession in a circuit end base implementation.
- /// </summary>
- /// <param name="end"> The circuit end base implementation to take producers and consumers from. </param>
- public LocalReceiverImpl(CircuitEndBase end)
- {
- super(end.getProducer(), end.getConsumer(), end.getSession(), end.getMessageMonitor(), end.getExceptionMonitor());
- }
-
- /// <summary>
- /// Provides an assertion that the receivers encountered no exceptions.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers encountered no exceptions. </return>
- public Assertion noExceptionsAssertion(ParsedProperties testProps)
- {
- return new NotApplicableAssertion(testProps);
- }
-
- /// <summary>
- /// Provides an assertion that the AMQP channel was forcibly closed by an error condition.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the AMQP channel was forcibly closed by an error condition. </return>
- public Assertion channelClosedAssertion(ParsedProperties testProps)
- {
- return new NotApplicableAssertion(testProps);
- }
-
- /// <summary>
- /// Provides an assertion that the receivers got all messages that were sent to it.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers got all messages that were sent to it. </return>
- public Assertion allMessagesReceivedAssertion(ParsedProperties testProps)
- {
- return new NotApplicableAssertion(testProps);
- }
-
- /// <summary>
- /// Provides an assertion that the receivers got none of the messages that were sent to it.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- ///
- /// <return> An assertion that the receivers got none of the messages that were sent to it. </return>
- public Assertion noMessagesReceivedAssertion(ParsedProperties testProps)
- {
- return new NotApplicableAssertion(testProps);
- }
-
- /// <summary>
- /// Provides an assertion that the receiver got a given exception during the test.
- /// </summary>
- /// <param name="testProps"> The test configuration properties. </param>
- /// <param name="exceptionClass"> The exception class to check for. <return> An assertion that the receiver got a given exception during the test. </return> </param>
- public Assertion exceptionAssertion(ParsedProperties testProps, Class<? extends Exception> exceptionClass)
- {
- return new NotApplicableAssertion(testProps);
- }
-
- /// <summary>
- /// Sets the contianing circuit.
- /// </summary>
- /// <param name="circuit"> The containing circuit. </param>
- public void setCircuit(LocalCircuitImpl circuit)
- {
- this.circuit = circuit;
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/sequencers/BaseCircuitFactory.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/sequencers/BaseCircuitFactory.csx
deleted file mode 100644
index 79ddfd878f..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/sequencers/BaseCircuitFactory.csx
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using log4net;
-
-using Apache.Qpid.Integration.Tests.framework.Circuit;
-using Apache.Qpid.Integration.Tests.framework.TestClientDetails;
-using org.apache.qpid.util.ConversationFactory;
-
-using System.Collections.Generic.LinkedList;
-using System.Collections.Generic.IList;
-using java.util.Properties;
-
-namespace Apache.Qpid.Integration.Tests.framework.sequencers
-{
- /// <summary>
- /// BaseCircuitFactory provides some functionality common to all <see cref="CircuitFactory"/>s, such as the details of
- /// all <see cref="Apache.Qpid.Integration.Tests.framework.distributedtesting.TestClient"/>s that make up the end-points of
- /// the circuits that the factory creates, and an active <see cref="ConversationFactory"/> that can be used to generate
- /// control conversations with those circuit end-points.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Hold the details of the sending and receiving end-points to create circuits from.
- /// <tr><td> Provide a conversation factory to create control conversations with the end-points.
- /// </table>
- /// </summary>
- public abstract class BaseCircuitFactory : CircuitFactory
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(BaseCircuitFactory));
-
- /// <summary> Holds the contact details for the sending test client. </summary>
- protected TestClientDetails sender;
-
- /// <summary> Holds the contact details for the receving test client. </summary>
- protected IList<TestClientDetails> receivers = new LinkedList<TestClientDetails>();
-
- /// <summary> Holds the conversation factory over which to coordinate the test. </summary>
- protected ConversationFactory conversationFactory;
-
- /// <summary>
- /// Creates a test circuit for the test, configered by the test parameters specified.
- /// </summary>
- /// <param name="testProperties"> The test parameters. </param>
- /// <return> A test circuit. </return>
- public Circuit createCircuit(Properties testProperties)
- {
- throw new RuntimeException("Not implemented.");
- }
-
- /// <summary>
- /// Sets the sender test client to coordinate the test with.
- /// </summary>
- /// <param name="sender"> The contact details of the sending client in the test. </param>
- public void setSender(TestClientDetails sender)
- {
- log.debug("public void setSender(TestClientDetails sender = " + sender + "): called");
-
- this.sender = sender;
- }
-
- /// <summary>
- /// Sets the receiving test client to coordinate the test with.
- /// </summary>
- /// <param name="receiver"> The contact details of the sending client in the test. </param>
- public void setReceiver(TestClientDetails receiver)
- {
- log.debug("public void setReceiver(TestClientDetails receivers = " + receiver + "): called");
-
- this.receivers.add(receiver);
- }
-
- /// <summary>
- /// Supplies the sending test client.
- /// </summary>
- /// <return> The sending test client. </return>
- public TestClientDetails getSender()
- {
- return sender;
- }
-
- /// <summary>
- /// Supplies the receiving test client.
- /// </summary>
- /// <return> The receiving test client. </return>
- public IList<TestClientDetails> getReceivers()
- {
- return receivers;
- }
-
- /// <summary>
- /// Accepts the conversation factory over which to hold the test coordinating conversation.
- /// </summary>
- /// <param name="conversationFactory"> The conversation factory to coordinate the test over. </param>
- public void setConversationFactory(ConversationFactory conversationFactory)
- {
- this.conversationFactory = conversationFactory;
- }
-
- /// <summary>
- /// Provides the conversation factory for providing the distributed test sequencing conversations over the test
- /// connection.
- /// </summary>
- /// <return> The conversation factory to create test sequencing conversations with. </return>
- public ConversationFactory getConversationFactory()
- {
- return conversationFactory;
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/sequencers/CircuitFactory.cs b/qpid/dotnet/Qpid.Integration.Tests/framework/sequencers/CircuitFactory.cs
deleted file mode 100644
index 4be08c3f38..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/sequencers/CircuitFactory.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Integration.Tests.framework;
-//using org.apache.qpid.util.ConversationFactory;
-
-//using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-//using javax.jms.JMSException;
-//using javax.jms.Message;
-
-using System.Collections.Generic;//.IList;
-//using System.Collections.Generic.IDictionary;
-//using java.util.Properties;
-
-namespace Apache.Qpid.Integration.Tests.framework.sequencers
-{
- /// <summary>
- /// A CircuitFactory is responsibile for creating test circuits appropriate to the context that a test case is
- /// running in, and providing an implementation of a standard test procedure over a test circuit.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Provide a standard test procedure over a test circuit.
- /// <tr><td> Construct test circuits appropriate to a tests context.
- /// </table>
- /// </summary>
- public interface CircuitFactory
- {
- /// <summary>
- /// Creates a test circuit for the test, configered by the test parameters specified.
- /// </summary>
- /// <param name="testProperties"> The test parameters. </param>
- ///
- /// <return> A test circuit. </return>
- Circuit CreateCircuit(TestModel testProperties);
-
- /// <summary>
- /// Sets the sender test client to coordinate the test with.
- /// </summary>
- /// <param name="sender"> The contact details of the sending client in the test. </param>
- void SetSender(TestClientDetails sender);
-
- /// <summary>
- /// Sets the receiving test client to coordinate the test with.
- /// </summary>
- /// <param name="receiver"> The contact details of the sending client in the test. </param>
- void SetReceiver(TestClientDetails receiver);
-
- /// <summary>
- /// Supplies the sending test client.
- /// </summary>
- /// <return> The sending test client. </return>
- TestClientDetails GetSender();
-
- /// <summary>
- /// Supplies the receiving test client.
- /// </summary>
- /// <return> The receiving test client. </return>
- IList<TestClientDetails> GetReceivers();
-
- /// <summary>
- /// Accepts the conversation factory over which to hold the test coordinating conversation.
- /// </summary>
- /// <param name="conversationFactory"> The conversation factory to coordinate the test over. </param>
- //void setConversationFactory(ConversationFactory conversationFactory);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/framework/sequencers/CircuitFactory.csx b/qpid/dotnet/Qpid.Integration.Tests/framework/sequencers/CircuitFactory.csx
deleted file mode 100644
index 26632266a4..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/framework/sequencers/CircuitFactory.csx
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using Apache.Qpid.Integration.Tests.framework.Assertion;
-using Apache.Qpid.Integration.Tests.framework.Circuit;
-using Apache.Qpid.Integration.Tests.framework.TestClientDetails;
-using org.apache.qpid.util.ConversationFactory;
-
-using uk.co.thebadgerset.junit.extensions.util.ParsedProperties;
-
-using javax.jms.JMSException;
-using javax.jms.Message;
-
-using System.Collections.Generic.IList;
-using System.Collections.Generic.IDictionary;
-using java.util.Properties;
-
-namespace Apache.Qpid.Integration.Tests.framework.sequencers
-{
- /// <summary>
- /// A CircuitFactory is responsibile for creating test circuits appropriate to the context that a test case is
- /// running in, and providing an implementation of a standard test procedure over a test circuit.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Provide a standard test procedure over a test circuit.
- /// <tr><td> Construct test circuits appropriate to a tests context.
- /// </table>
- /// </summary>
- public interface CircuitFactory
- {
- /// <summary>
- /// Holds a test coordinating conversation with the test clients. This should consist of assigning the test roles,
- /// begining the test, gathering the test reports from the participants, and checking for assertion failures against
- /// the test reports.
- /// </summary>
- /// <param name="testCircuit"> The test circuit. </param>
- /// <param name="assertions"> The list of assertions to apply to the test circuit. </param>
- /// <param name="testProperties"> The test case definition. </param>
- ///
- /// @deprecated Use test circuits and Circuit.test instead.
- public void sequenceTest(Circuit testCircuit, IList<Assertion> assertions, Properties testProperties);
-
- /// <summary>
- /// Creates a test circuit for the test, configered by the test parameters specified.
- /// </summary>
- /// <param name="testProperties"> The test parameters. </param>
- ///
- /// <return> A test circuit. </return>
- public Circuit createCircuit(ParsedProperties testProperties);
-
- /// <summary>
- /// Sets the sender test client to coordinate the test with.
- /// </summary>
- /// <param name="sender"> The contact details of the sending client in the test. </param>
- public void setSender(TestClientDetails sender);
-
- /// <summary>
- /// Sets the receiving test client to coordinate the test with.
- /// </summary>
- /// <param name="receiver"> The contact details of the sending client in the test. </param>
- public void setReceiver(TestClientDetails receiver);
-
- /// <summary>
- /// Supplies the sending test client.
- /// </summary>
- /// <return> The sending test client. </return>
- public TestClientDetails getSender();
-
- /// <summary>
- /// Supplies the receiving test client.
- /// </summary>
- /// <return> The receiving test client. </return>
- public IList<TestClientDetails> getReceivers();
-
- /// <summary>
- /// Accepts the conversation factory over which to hold the test coordinating conversation.
- /// </summary>
- /// <param name="conversationFactory"> The conversation factory to coordinate the test over. </param>
- public void setConversationFactory(ConversationFactory conversationFactory);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/interactive/FailoverTest.cs b/qpid/dotnet/Qpid.Integration.Tests/interactive/FailoverTest.cs
deleted file mode 100644
index 142ac40b27..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/interactive/FailoverTest.cs
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.InteropServices;
-using System.Threading;
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Integration.Tests.interactive
-{
- [TestFixture, Category("Interactive")]
- public class FailoverTest : IConnectionListener
- {
- private static readonly ILog _log = LogManager.GetLogger(typeof(FailoverTest));
-
- /// <summary>Specifies the number of times to run the test cycle.</summary>
- const int NUM_MESSAGES = 10;
-
- /// <summary>Determines how many messages to send within each commit.</summary>
- const int COMMIT_BATCH_SIZE = 1;
-
- /// <summary>Specifies the duration of the pause to place between each message sent in the test.</summary>
- //const int SLEEP_MILLIS = 1;
-
- /// <summary>Specified the maximum time in milliseconds to wait for the test to complete.</summary>
- const int TIMEOUT = 10000;
-
- /// <summary>Defines the number of test messages to send, before prompting the user to fail a broker.</summary>
- const int FAIL_POINT = 5;
-
- /// <summary>Specified the ack mode to use for the test.</summary>
- AcknowledgeMode _acknowledgeMode = AcknowledgeMode.AutoAcknowledge;
-
- /// <summary>Determines whether this test runs transactionally or not. </summary>
- bool transacted = false;
-
- /// <summary>Holds the connection to run the test over.</summary>
- AMQConnection _connection;
-
- /// <summary>Holds the channel for the test message publisher. </summary>
- IChannel publishingChannel;
-
- /// <summary>Holds the test message publisher. </summary>
- IMessagePublisher publisher;
-
- /// <summary>Used to keep count of the number of messages sent. </summary>
- int messagesSent;
-
- /// <summary>Used to keep count of the number of messages received. </summary>
- int messagesReceived;
-
- /// <summary>Used to wait for test completion on. </summary>
- private static object testComplete = new Object();
-
- /// <summary>Used to wait for failover completion on. </summary>
- private static object failoverComplete = new Object();
-
- bool failedOver=false;
-
- /// <summary>Used to record the extra message count (1) if the message sent right after failover actually made it to the new broker.</summary>
- int _extraMessage = 0;
-
- /// <summary>
- /// Creates the test connection with a fail-over set up, and a producer/consumer pair on that connection.
- /// </summary>
- /// [SetUp]
- public void Init(IConnectionInfo connectionInfo)
- {
- //log4net.Config.BasicConfigurator.Configure();
- // Reset all counts.
- messagesSent = 0;
- messagesReceived = 0;
- failedOver=false;
- _extraMessage = 0;
-
- PromptAndWait("Ensure both brokers are running, then press Enter");
-
- // Create a connection for the test.
- _connection = new AMQConnection(connectionInfo);
- _connection.ConnectionListener = this;
-
- // Create a consumer to receive the test messages.
- IChannel receivingChannel = _connection.CreateChannel(false, _acknowledgeMode);
-
- string queueName = receivingChannel.GenerateUniqueName();
- receivingChannel.DeclareQueue(queueName, false, true, true);
- receivingChannel.Bind(queueName, "amq.direct", queueName);
-
- IMessageConsumer consumer = receivingChannel.CreateConsumerBuilder(queueName)
- .WithPrefetchLow(30)
- .WithPrefetchHigh(60).Create();
-
- consumer.OnMessage = new MessageReceivedDelegate(OnMessage);
- _connection.Start();
-
- // Create a publisher to send the test messages.
- publishingChannel = _connection.CreateChannel(transacted, AcknowledgeMode.NoAcknowledge);
- publisher = publishingChannel.CreatePublisherBuilder()
- .WithRoutingKey(queueName)
- .Create();
-
- _log.Debug("connection = " + _connection);
- _log.Debug("connectionInfo = " + connectionInfo);
- _log.Debug("connection.AsUrl = " + _connection.toURL());
- _log.Debug("AcknowledgeMode is " + _acknowledgeMode);
- }
-
- /// <summary>
- /// Clean up the test connection.
- /// </summary>
- [TearDown]
- public virtual void Shutdown()
- {
- if (!failedOver)
- {
- Assert.Fail("The failover callback never occured.");
- }
-
- Console.WriteLine("Test done shutting down");
- Thread.Sleep(2000);
- _connection.Close();
- }
-
- /// <summary>
- /// Runs a failover test, building up the connection information from its component parts. In particular the brokers
- /// to fail between are seperately added into the connection info.
- /// </summary>
- /*[Test]
- public void TestWithBasicInfo()
- {
- _log.Debug("public void TestWithBasicInfo(): called");
-
- // Manually create the connection parameters.
- QpidConnectionInfo connectionInfo = new QpidConnectionInfo();
- connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5672, false));
- connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 5673, false));
-
- Init(connectionInfo);
- DoFailoverTest();
- }*/
-
- /// <summary>
- /// Runs a failover test, with the failover configuration specified in the Qpid connection URL format.
- /// </summary>
- [Test]
- public void TestWithUrl()
- {
- _log.Debug("public void runTestWithUrl(): called");
-
- // Parse the connection parameters from a URL.
- String clientId = "failover" + DateTime.Now.Ticks;
- string defaultUrl = "amqp://guest:guest@" + clientId + "/test" +
- "?brokerlist='tcp://localhost:9672;tcp://localhost:9673'&failover='roundrobin'";
- IConnectionInfo connectionInfo = QpidConnectionInfo.FromUrl(defaultUrl);
-
- Init(connectionInfo);
- DoFailoverTest(0);
- }
-
- /// <summary>
- /// Send the test messages, prompting at the fail point for the user to cause a broker failure. The test checks that all messages sent
- /// are received within the test time limit.
- /// </summary>
- ///
- /// <param name="connectionInfo">The connection parameters, specifying the brokers to fail between.</param>
- void DoFailoverTest(int delay)
- {
- _log.Debug("void DoFailoverTest(IConnectionInfo connectionInfo): called");
-
- // Wait for all of the test messages to be received, checking that this occurs within the test time limit.
- bool withinTimeout = false;
-
- for (int i = 1; i <= NUM_MESSAGES; ++i)
- {
- SendMessage();
-
- // Prompt the user to cause a failure if at the fail point.
- if (i == FAIL_POINT)
- {
- for( int min = delay ; min > 0 ; min--)
- {
- Console.WriteLine("Waiting for "+min+" minutes to test connection time bug.");
- Thread.Sleep(60*1000);
- }
-
- PromptAndWait("Cause a broker failure now, then press return.");
- Console.WriteLine("NOTE: ensure that the delay between killing the broker and continuing here is less than 20 second");
-
- Console.WriteLine("Sending a message to ensure send right after works");
-
- SendMessage();
-
- Console.WriteLine("Waiting for fail-over to complete before continuing...");
-
-
- lock(failoverComplete)
- {
- if (!failedOver)
- {
- withinTimeout = Monitor.Wait(failoverComplete, TIMEOUT);
- }
- else
- {
- withinTimeout=true;
- }
- }
-
- if (!withinTimeout)
- {
- PromptAndWait("Failover has not yet occured. Press enter to give up waiting.");
- }
- }
- }
-
- lock(testComplete)
- {
- withinTimeout = Monitor.Wait(testComplete, TIMEOUT);
- }
-
- if (!withinTimeout)
- {
- Assert.Fail("Test timed out, before all messages received.");
- }
-
- _log.Debug("void DoFailoverTest(IConnectionInfo connectionInfo): exiting");
- }
-
- [Test]
- public void Test5MinuteWait()
- {
- String clientId = "failover" + DateTime.Now.Ticks;
-
- QpidConnectionInfo connectionInfo = new QpidConnectionInfo();
- connectionInfo.Username = "guest";
- connectionInfo.Password = "guest";
- connectionInfo.ClientName = clientId;
- connectionInfo.VirtualHost = "/test";
- connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 9672, false));
- connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 9673, false));
-
- Init(connectionInfo);
- DoFailoverTest(5);
- }
-
- void SendMessage()
- {
- ITextMessage msg = publishingChannel.CreateTextMessage("message=" + messagesSent);
-
- publisher.Send(msg);
- messagesSent++;
-
- if (transacted)
- {
- publishingChannel.Commit();
- }
-
- Console.WriteLine("messagesSent = " + messagesSent);
- }
-
- /// <summary>
- /// Receives all of the test messages.
- /// </summary>
- ///
- /// <param name="message">The newly arrived test message.</param>
- public void OnMessage(IMessage message)
- {
- try
- {
- if (_acknowledgeMode == AcknowledgeMode.ClientAcknowledge)
- {
- message.Acknowledge();
- }
-
- messagesReceived++;
-
- _log.Debug("messagesReceived = " + messagesReceived);
-
- // Check if all of the messages in the test have been received, in which case notify the message producer that the test has
- // succesfully completed.
- if (messagesReceived == NUM_MESSAGES + _extraMessage)
- {
- lock (testComplete)
- {
- failedOver = true;
- Monitor.Pulse(testComplete);
- }
- }
- }
- catch (QpidException e)
- {
- _log.Fatal("Exception received. About to stop.", e);
- Stop();
- }
- }
-
- /// <summary>Prompts the user on stdout and waits for a reply on stdin, using the specified prompt message.</summary>
- ///
- /// <param name="message">The message to prompt the user with.</param>
- private void PromptAndWait(string message)
- {
- Console.WriteLine("\n" + message);
- Console.ReadLine();
- }
-
- // <summary>Closes the test connection.</summary>
- private void Stop()
- {
- _log.Debug("Stopping...");
- try
- {
- _connection.Close();
- }
- catch (QpidException e)
- {
- _log.Debug("Failed to shutdown: ", e);
- }
- }
-
- /// <summary>
- /// Called when bytes have been transmitted to the server
- /// </summary>
- ///
- /// <param>count the number of bytes sent in total since the connection was opened</param>
- public void BytesSent(long count) {}
-
- /// <summary>
- /// Called when some bytes have been received on a connection
- /// </summary>
- ///
- /// <param>count the number of bytes received in total since the connection was opened</param>
- public void BytesReceived(long count) {}
-
- /// <summary>
- /// Called after the infrastructure has detected that failover is required but before attempting failover.
- /// </summary>
- ///
- /// <param>redirect true if the broker requested redirect. false if failover is occurring due to a connection error.</param>
- ///
- /// <return>true to continue failing over, false to veto failover and raise a connection exception</return>
- public bool PreFailover(bool redirect)
- {
- _log.Debug("public bool PreFailover(bool redirect): called");
- return true;
- }
-
- /// <summary>
- /// Called after connection has been made to another broker after failover has been started but before
- /// any resubscription has been done.
- /// </summary>
- ///
- /// <return> true to continue with resubscription, false to prevent automatic resubscription. This is useful in
- /// cases where the application wants to handle resubscription. Note that in the latter case all sessions, producers
- /// and consumers are invalidated.
- /// </return>
- public bool PreResubscribe()
- {
- _log.Debug("public bool PreResubscribe(): called");
- return true;
- }
-
- /// <summary>
- /// Called once failover has completed successfully. This is called irrespective of whether the client has
- /// vetoed automatic resubscription.
- /// </summary>
- public void FailoverComplete()
- {
- failedOver = true;
- _log.Debug("public void FailoverComplete(): called");
- Console.WriteLine("public void FailoverComplete(): called");
- lock (failoverComplete)
- {
- Monitor.Pulse(failoverComplete);
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/interactive/SendReceiveTest.cs b/qpid/dotnet/Qpid.Integration.Tests/interactive/SendReceiveTest.cs
deleted file mode 100644
index 68d7a2ae68..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/interactive/SendReceiveTest.cs
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client;
-using Apache.Qpid.Integration.Tests.testcases;
-
-namespace Apache.Qpid.Integration.Tests.interactive
-{
- /// <summary>
- /// SendReceiveTest provides a quick interactive send-receive test, where the user is prompted to trigger each send or receive.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Run an interactive send-receive loop prompting user to trigger each event.
- /// </table>
- /// </summary>
- [TestFixture, Category("Interactive")]
- public class SendReceiveTest : BaseMessagingTestFixture
- {
- /// <summary>Used for debugging purposes.</summary>
- private static ILog log = LogManager.GetLogger(typeof(SendReceiveTest));
-
- /// <summary>Defines the name of the test topic to use with the tests.</summary>
- public const string TEST_ROUTING_KEY = "quicktestkey";
-
- /// <summary>The number of consumers to test.</summary>
- private const int CONSUMER_COUNT = 5;
-
- /// <summary>The number of test messages to send.</summary>
- private const int MESSAGE_COUNT = 10;
-
- /// <summary>Monitor used to signal succesfull receipt of all test messages.</summary>
- AutoResetEvent _finishedEvent;
-
- /// <summary>Used to count test messages received so far.</summary>
- private int _messageReceivedCount;
-
- /// <summary>Used to hold the expected number of messages to receive.</summary>
- private int expectedMessageCount;
-
- /// <summary>Flag used to indicate that all messages really were received, and that the test did not just time out. </summary>
- private bool allReceived;
-
- /// <summary> Creates one producing end-point and many consuming end-points connected on a topic. </summary>
- [SetUp]
- public override void Init()
- {
- base.Init();
-
- // Reset all test counts and flags.
- _messageReceivedCount = 0;
- allReceived = false;
- _finishedEvent = new AutoResetEvent(false);
- }
-
- /// <summary> Cleans up all test end-points. </summary>
- [TearDown]
- public override void Shutdown()
- {
- try
- {
- // Close all end points for producer and consumers.
- // Producer is on 0, and consumers on 1 .. n, so loop is from 0 to n inclusive.
- for (int i = 0; i <= CONSUMER_COUNT; i++)
- {
- CloseEndPoint(i);
- }
- }
- finally
- {
- base.Shutdown();
- }
- }
-
- /// <summary> Check that all consumers on a topic each receive all message on it. </summary>
- [Test]
- public void AllConsumerReceiveAllMessagesOnTopic()
- {
- // Create end-points for all the consumers in the test.
- for (int i = 1; i <= CONSUMER_COUNT; i++)
- {
- SetUpEndPoint(i, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, false, ExchangeNameDefaults.TOPIC,
- true, false, null);
- testConsumer[i].OnMessage += new MessageReceivedDelegate(OnMessage);
- }
-
- // Create an end-point to publish to the test topic.
- SetUpEndPoint(0, true, false, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, false, ExchangeNameDefaults.TOPIC,
- true, false, null);
-
- expectedMessageCount = (MESSAGE_COUNT * CONSUMER_COUNT);
-
- PromptAndWait("Press to send...");
-
- for (int i = 0; i < MESSAGE_COUNT; i++)
- {
- testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
- }
-
- _finishedEvent.WaitOne(new TimeSpan(0, 0, 0, 10), false);
-
- PromptAndWait("Press to complete test...");
-
- // Check that all messages really were received.
- Assert.IsTrue(allReceived, "All messages were not received, only got " + _messageReceivedCount + " but wanted " + expectedMessageCount);
- }
-
- /// <summary> Check that consumers on the same queue receive each message once accross all consumers. </summary>
- //[Test]
- public void AllConsumerReceiveAllMessagesOnDirect()
- {
- // Create end-points for all the consumers in the test.
- for (int i = 1; i <= CONSUMER_COUNT; i++)
- {
- SetUpEndPoint(i, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, false, ExchangeNameDefaults.DIRECT,
- true, false, null);
- testConsumer[i].OnMessage += new MessageReceivedDelegate(OnMessage);
- }
-
- // Create an end-point to publish to the test topic.
- SetUpEndPoint(0, true, false, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, false, ExchangeNameDefaults.DIRECT,
- true, false, null);
-
- expectedMessageCount = MESSAGE_COUNT;
-
- for (int i = 0; i < MESSAGE_COUNT; i++)
- {
- testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
- }
-
- _finishedEvent.WaitOne(new TimeSpan(0, 0, 0, 10), false);
-
- // Check that all messages really were received.
- Assert.IsTrue(allReceived, "All messages were not received, only got: " + _messageReceivedCount + " but wanted " + expectedMessageCount);
- }
-
- /// <summary> Atomically increments the message count on every message, and signals once all messages in the test are received. </summary>
- public void OnMessage(IMessage m)
- {
- int newCount = Interlocked.Increment(ref _messageReceivedCount);
-
- if (newCount >= expectedMessageCount)
- {
- allReceived = true;
- _finishedEvent.Set();
- }
- }
-
- /// <summary>Prompts the user on stdout and waits for a reply on stdin, using the specified prompt message.</summary>
- ///
- /// <param name="message">The message to prompt the user with.</param>
- private void PromptAndWait(string message)
- {
- Console.WriteLine("\n" + message);
- Console.ReadLine();
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/Qpid.Integration.Tests/interop/InteropClientTestCase.cs b/qpid/dotnet/Qpid.Integration.Tests/interop/InteropClientTestCase.cs
deleted file mode 100644
index 09361b33e8..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/interop/InteropClientTestCase.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Text;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Integration.Tests.interop
-{
- /// <summary> Defines the possible test case roles that an interop test case can take on. </summary>
- public enum Roles { SENDER, RECEIVER };
-
- /// <summary>
- /// InteropClientTestCase provides an interface that classes implementing test cases from the interop testing spec
- /// (http://cwiki.apache.org/confluence/display/qpid/Interop+Testing+Specification) should implement.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Supply the name of the test case that this implements.
- /// <tr><td> Accept/Reject invites based on test parameters.
- /// <tr><td> Adapt to assigned roles.
- /// <tr><td> Perform test case actions.
- /// <tr><td> Generate test reports.
- /// </table>
- /// </summary>
- interface InteropClientTestCase
- {
- /// <summary>
- /// Should provide the name of the test case that this class implements. The exact names are defined in the
- /// interop testing spec.
- /// </summary>
- ///
- /// <returns> The name of the test case that this implements. </returns>
- string GetName();
-
- /// <summary>
- /// Determines whether the test invite that matched this test case is acceptable.
- /// </summary>
- ///
- /// <param name="inviteMessage"> The invitation to accept or reject. </param>
- ///
- /// <returns> <tt>true</tt> to accept the invitation, <tt>false</tt> to reject it. </returns>
- ///
- /// @throws JMSException Any JMSException resulting from reading the message are allowed to fall through.
- bool AcceptInvite(IMessage inviteMessage);
-
- /// <summary>
- /// Assigns the role to be played by this test case. The test parameters are fully specified in the
- /// assignment message. When this method return the test case will be ready to execute.
- /// </summary>
- ///
- /// <param name="role"> The role to be played; sender or receiver. </param>
- /// <param name="assignRoleMessage"> The role assingment message, contains the full test parameters. </param>
- void AssignRole(Roles role, IMessage assignRoleMessage);
-
- /// <summary>
- /// Performs the test case actions.
- /// </summary>
- void Start();
-
- /// <summary>
- /// Gets a report on the actions performed by the test case in its assigned role.
- /// </summary>
- ///
- /// <param name="session"> The session to create the report message in. </param>
- ///
- /// <returns> The report message. </returns>
- IMessage GetReport(IChannel channel);
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase1DummyRun.cs b/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase1DummyRun.cs
deleted file mode 100644
index d908b7af0b..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase1DummyRun.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Text;
-using log4net;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Integration.Tests.interop.TestCases
-{
- /// <summary>
- /// Implements tet case 1, dummy run. This test case sends no test messages, it exists to confirm that the test harness
- /// is interacting with the coordinator correctly.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Supply the name of the test case that this implements.
- /// <tr><td> Accept/Reject invites based on test parameters.
- /// <tr><td> Adapt to assigned roles.
- /// <tr><td> Perform test case actions.
- /// <tr><td> Generate test reports.
- /// </table>
- /// </summary>
- public class TestCase1DummyRun : InteropClientTestCase
- {
- private static ILog log = LogManager.GetLogger(typeof(TestCase1DummyRun));
-
- public String GetName()
- {
- log.Debug("public String getName(): called");
-
- return "TC1_DummyRun";
- }
-
- public bool AcceptInvite(IMessage inviteMessage)
- {
- log.Debug("public boolean acceptInvite(Message inviteMessage): called");
-
- // Test parameters don't matter, accept all invites.
- return true;
- }
-
- public void AssignRole(Roles role, IMessage assignRoleMessage)
- {
- log.Debug("public void assignRole(Roles role, Message assignRoleMessage): called");
-
- // Do nothing, both roles are the same.
- }
-
- public void Start()
- {
- log.Debug("public void start(): called");
-
- // Do nothing.
- }
-
- public IMessage GetReport(IChannel channel)
- {
- log.Debug("public Message getReport(Session session): called");
-
- // Generate a dummy report, the coordinator expects a report but doesn't care what it is.
- return channel.CreateTextMessage("Dummy Run, Ok.");
- }
-
- public void OnMessage(IMessage message)
- {
- log.Debug("public void onMessage(Message message = " + message + "): called");
-
- // Ignore any messages.
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase2BasicP2P.cs b/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase2BasicP2P.cs
deleted file mode 100644
index 8993da832e..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase2BasicP2P.cs
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Text;
-using log4net;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Integration.Tests.interop.TestCases
-{
- /// <summary>
- /// Implements test case 2, basic P2P. Sends/receives a specified number of messages to a specified route on the
- /// default direct exchange. Produces reports on the actual number of messages sent/received.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Supply the name of the test case that this implements.
- /// <tr><td> Accept/Reject invites based on test parameters.
- /// <tr><td> Adapt to assigned roles.
- /// <tr><td> Send required number of test messages.
- /// <tr><td> Generate test reports.
- /// </table>
- /// </summary>
- public class TestCase2BasicP2P : InteropClientTestCase
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(TestCase2BasicP2P));
-
- /// <summary> Holds the count of test messages received. </summary>
- private int messageCount;
-
- /// <summary> The role to be played by the test. </summary>
- private Roles role;
-
- /// <summary> The number of test messages to send. </summary>
- private int numMessages;
-
- /// <summary> The routing key to send them to on the default direct exchange. </summary>
- private string sendDestination;
-
- /// <summary> The connection to send the test messages on. </summary>
- private IConnection connection;
-
- /// <summary> The session to send the test messages on. </summary>
- private IChannel channel;
-
- /// <summary> The producer to send the test messages with. </summary>
- private IMessagePublisher publisher;
-
- /// <summary>
- /// Should provide the name of the test case that this class implements. The exact names are defined in the
- /// interop testing spec.
- /// </summary>
- ///
- /// <returns> The name of the test case that this implements. </returns>
- public String GetName()
- {
- log.Debug("public String GetName(): called");
-
- return "TC2_BasicP2P";
- }
-
- /// <summary>
- /// Determines whether the test invite that matched this test case is acceptable.
- /// </summary>
- ///
- /// <param name="inviteMessage"> The invitation to accept or reject. </param>
- ///
- /// <returns> <tt>true</tt> to accept the invitation, <tt>false</tt> to reject it. </returns>
- public bool AcceptInvite(IMessage inviteMessage)
- {
- log.Debug("public boolean AcceptInvite(Message inviteMessage = " + inviteMessage + "): called");
-
- // All invites are acceptable.
- return true;
- }
-
- /// <summary>
- /// Assigns the role to be played by this test case. The test parameters are fully specified in the
- /// assignment message. When this method return the test case will be ready to execute.
- /// </summary>
- ///
- /// <param name="role"> The role to be played; sender or receiver. </param>
- /// <param name="assignRoleMessage"> The role assingment message, contains the full test parameters. </param>
- public void AssignRole(Roles role, IMessage assignRoleMessage)
- {
- log.Debug("public void AssignRole(Roles role = " + role + ", Message assignRoleMessage = " + assignRoleMessage
- + "): called");
-
- // Reset the message count for a new test.
- messageCount = 0;
-
- // Take note of the role to be played.
- this.role = role;
-
- // Create a new connection to pass the test messages on.
- connection =
- TestClient.CreateConnection(TestClient.brokerUrl, TestClient.virtualHost);
- channel = connection.CreateChannel(false, AcknowledgeMode.AutoAcknowledge);
-
- // Extract and retain the test parameters.
- numMessages = assignRoleMessage.Headers.GetInt("P2P_NUM_MESSAGES");
- string queueAndKeyName = assignRoleMessage.Headers.GetString("P2P_QUEUE_AND_KEY_NAME");
- channel.DeclareQueue(queueAndKeyName, false, true, true);
- channel.Bind(queueAndKeyName, ExchangeNameDefaults.DIRECT, queueAndKeyName);
- sendDestination = queueAndKeyName;
-
- log.Debug("numMessages = " + numMessages);
- log.Debug("sendDestination = " + sendDestination);
- log.Debug("role = " + role);
-
- switch (role)
- {
- // Check if the sender role is being assigned, and set up a message producer if so.
- case Roles.SENDER:
- publisher = channel.CreatePublisherBuilder()
- .WithExchangeName(ExchangeNameDefaults.DIRECT)
- .WithRoutingKey(sendDestination)
- .Create();
- break;
-
- // Otherwise the receiver role is being assigned, so set this up to listen for messages.
- case Roles.RECEIVER:
- IMessageConsumer consumer = channel.CreateConsumerBuilder(sendDestination).Create();
- consumer.OnMessage += new MessageReceivedDelegate(OnMessage);
-
- break;
- }
-
- connection.Start();
- }
-
- /// <summary> Performs the test case actions. </summary>
- public void Start()
- {
- log.Debug("public void start(): called");
-
- // Check that the sender role is being performed.
- if (role == Roles.SENDER)
- {
- IMessage testMessage = channel.CreateTextMessage("test");
-
- for (int i = 0; i < numMessages; i++)
- {
- publisher.Send(testMessage);
-
- // Increment the message count.
- messageCount++;
- }
- }
- }
-
- /// <summary>
- /// Gets a report on the actions performed by the test case in its assigned role.
- /// </summary>
- ///
- /// <param name="session"> The session to create the report message in. </param>
- ///
- /// <returns> The report message. </returns>
- public IMessage GetReport(IChannel channel)
- {
- log.Debug("public Message GetReport(IChannel channel): called");
-
- // Close the test connection.
- //connection.Stop();
-
- // Generate a report message containing the count of the number of messages passed.
- IMessage report = channel.CreateMessage();
- //report.Headers.SetString("CONTROL_TYPE", "REPORT");
- report.Headers.SetInt("MESSAGE_COUNT", messageCount);
-
- return report;
- }
-
- /// <summary>
- /// Counts incoming test messages.
- /// </summary>
- ///
- /// <param name="message"> The incoming test message. </param>
- public void OnMessage(IMessage message)
- {
- log.Debug("public void OnMessage(IMessage message = " + message + "): called");
-
- // Increment the message count.
- messageCount++;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase3BasicPubSub.cs b/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase3BasicPubSub.cs
deleted file mode 100644
index 79c0322bcd..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase3BasicPubSub.cs
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Text;
-using log4net;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Integration.Tests.interop.TestCases
-{
- /// <summary>
- /// Implements test case 3, basic pub/sub. Sends/received a specified number of messages to a specified route on the
- /// default topic exchange, using the specified number of receiver connections. Produces reports on the actual number of
- /// messages sent/received.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Supply the name of the test case that this implements.
- /// <tr><td> Accept/Reject invites based on test parameters.
- /// <tr><td> Adapt to assigned roles.
- /// <tr><td> Send required number of test messages using pub/sub.
- /// <tr><td> Generate test reports.
- /// </table>
- /// </summary>
- public class TestCase3BasicPubSub : InteropClientTestCase
- {
- /// <summary> Used for debugging. </summary>
- private static ILog log = LogManager.GetLogger(typeof(TestCase3BasicPubSub));
-
- /// <summary> Holds the count of test messages received. </summary>
- private int messageCount;
-
- /// <summary> The role to be played by the test. </summary>
- private Roles role;
-
- /// <summary> The number of test messages to send. </summary>
- private int numMessages;
-
- /// <summary> The number of receiver connection to use. </summary>
- private int numReceivers;
-
- /// <summary> The routing key to send them to on the default direct exchange. </summary>
- private string sendDestination;
-
- /// <summary> The connections to send/receive the test messages on. </summary>
- private IConnection[] connection;
-
- /// <summary> The sessions to send/receive the test messages on. </summary>
- private IChannel[] channel;
-
- /// <summary> The producer to send the test messages with. </summary>
- IMessagePublisher publisher;
-
- /// <summary>
- /// Should provide the name of the test case that this class implements. The exact names are defined in the
- /// interop testing spec.
- /// </summary>
- ///
- /// <returns> The name of the test case that this implements. </returns>
- public String GetName()
- {
- log.Debug("public String GetName(): called");
-
- return "TC3_BasicPubSub";
- }
-
- /// <summary>
- /// Determines whether the test invite that matched this test case is acceptable.
- /// </summary>
- ///
- /// <param name="inviteMessage"> The invitation to accept or reject. </param>
- ///
- /// <returns> <tt>true</tt> to accept the invitation, <tt>false</tt> to reject it. </returns>
- public bool AcceptInvite(IMessage inviteMessage)
- {
- log.Debug("public boolean AcceptInvite(IMessage inviteMessage = " + inviteMessage + "): called");
-
- // All invites are acceptable.
- return true;
- }
-
- /// <summary>
- /// Assigns the role to be played by this test case. The test parameters are fully specified in the
- /// assignment message. When this method return the test case will be ready to execute.
- /// </summary>
- ///
- /// <param name="role"> The role to be played; sender or receiver. </param>
- /// <param name="assignRoleMessage"> The role assingment message, contains the full test parameters. </param>
- public void AssignRole(Roles role, IMessage assignRoleMessage)
- {
- log.Debug("public void assignRole(Roles role = " + role + ", IMessage assignRoleMessage = " + assignRoleMessage
- + "): called");
-
- // Reset the message count for a new test.
- messageCount = 0;
-
- // Take note of the role to be played.
- this.role = role;
-
- // Extract and retain the test parameters.
- numMessages = assignRoleMessage.Headers.GetInt("PUBSUB_NUM_MESSAGES");
- numReceivers = assignRoleMessage.Headers.GetInt("PUBSUB_NUM_RECEIVERS");
- string sendKey = assignRoleMessage.Headers.GetString("PUBSUB_KEY");
- sendDestination = sendKey;
-
- log.Debug("numMessages = " + numMessages);
- log.Debug("numReceivers = " + numReceivers);
- log.Debug("sendKey = " + sendKey);
- log.Debug("role = " + role);
-
- switch (role)
- {
- // Check if the sender role is being assigned, and set up a single message producer if so.
- case Roles.SENDER:
- // Create a new connection to pass the test messages on.
- connection = new IConnection[1];
- channel = new IChannel[1];
-
- connection[0] =
- TestClient.CreateConnection(TestClient.brokerUrl, TestClient.virtualHost);
- channel[0] = connection[0].CreateChannel(false, AcknowledgeMode.AutoAcknowledge);
-
- // Extract and retain the test parameters.
- publisher = channel[0].CreatePublisherBuilder()
- .WithExchangeName(ExchangeNameDefaults.TOPIC)
- .WithRoutingKey(sendDestination)
- .WithMandatory(false)
- .WithImmediate(false)
- .Create();
- break;
-
- // Otherwise the receiver role is being assigned, so set this up to listen for messages on the required number
- // of receiver connections.
- case Roles.RECEIVER:
- // Create the required number of receiver connections.
- connection = new IConnection[numReceivers];
- channel = new IChannel[numReceivers];
-
- for (int i = 0; i < numReceivers; i++)
- {
- connection[i] =
- TestClient.CreateConnection(TestClient.brokerUrl, TestClient.virtualHost);
- channel[i] = connection[i].CreateChannel(false, AcknowledgeMode.AutoAcknowledge);
-
- IMessageConsumer consumer = channel[i].CreateConsumerBuilder(sendDestination).Create();
- consumer.OnMessage += new MessageReceivedDelegate(OnMessage);
- }
-
- break;
- }
-
- // Start all the connection dispatcher threads running.
- foreach (IConnection con in connection)
- {
- con.Start();
- }
- }
-
- /// <summary>
- /// Performs the test case actions.
- /// </summary>
- public void Start()
- {
- log.Debug("public void Start(): called");
-
- // Check that the sender role is being performed.
- if (role == Roles.SENDER)
- {
- IMessage testMessage = channel[0].CreateTextMessage("test");
-
- for (int i = 0; i < numMessages; i++)
- {
- publisher.Send(testMessage);
-
- // Increment the message count.
- messageCount++;
- }
- }
- }
-
- /// <summary>
- /// Gets a report on the actions performed by the test case in its assigned role.
- /// </summary>
- ///
- /// <param name="session"> The session to create the report message in. </param>
- ///
- /// <returns> The report message. </returns>
- public IMessage GetReport(IChannel channel)
- {
- log.Debug("public IMessage getReport(IChannel channel): called");
-
- // Close the test connections.
- /*foreach (IConnection con in connection)
- {
- try
- {
- con.Stop();
- }
- catch (AMQConnectionClosedException e)
- {
- // The connection has already died due to an error. Log this as a warning.
- log.Warn("Connection already closed.");
- }
- }*/
-
- // Generate a report message containing the count of the number of messages passed.
- IMessage report = channel.CreateMessage();
- //report.Headers.SetString("CONTROL_TYPE", "REPORT");
- report.Headers.SetInt("MESSAGE_COUNT", messageCount);
-
- return report;
- }
-
- /// <summary>
- /// Counts incoming test messages.
- /// </summary>
- ///
- /// <param name="message"> The incoming test message. </param>
- public void OnMessage(IMessage message)
- {
- log.Debug("public void onMessage(IMessage message = " + message + "): called");
-
- // Increment the message count.
- messageCount++;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase4P2PMessageSize.cs b/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase4P2PMessageSize.cs
deleted file mode 100644
index fd83825a61..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase4P2PMessageSize.cs
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Text;
-using log4net;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Integration.Tests.interop.TestCases
-{
- ///
- /// Implements test case 4, from the interop test specification. This test sets up the TC2_P2PMessageSize test for 50
- /// messages, and a variety of message sizes. It checks that the sender and receivers reports both indicate that all
- /// the test messages were transmitted successfully.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Setup p2p test parameters and compare with test output. <td> {@link FrameworkBaseCase}
- /// </table>
- ///
- public class TestCase4P2PMessageSize : InteropClientTestCase
- {
- /// Used for debugging.
- private static ILog log = LogManager.GetLogger(typeof(TestCase4P2PMessageSize));
-
- /// <summary> The role to be played by the test. </summary>
- private Roles role;
-
- /// <summary> Holds the count of test messages received. </summary>
- private int messageCount;
-
- ///<summary>The size of the message to be sent </summary>
- private int messageSize;
-
- /// <summary> The number of test messages to send. </summary>
- private int numMessages;
-
- /// <summary> The number of receiver connection to use. </summary>
- private int numReceivers;
-
- /// <summary> The routing key to send them to on the default direct exchange. </summary>
- private string sendDestination;
-
- /// <summary> The connections to send/receive the test messages on. </summary>
- private IConnection[] connection;
-
- /// <summary> The sessions to send/receive the test messages on. </summary>
- private IChannel[] channel;
-
- /// <summary> The producer to send the test messages with. </summary>
- IMessagePublisher publisher;
-
- /// <summary>
- /// Creates a new coordinating test case with the specified name.
- ///</summary>
- /// <returns>The test case name.</returns>
- ///
- public String GetName()
- {
- log.Info("public String GetName(): called");
- return "TC4_P2PMessageSize";
- }
-
- /// <summary>
- /// Determines whether the test invite that matched this test case is acceptable.
- /// </summary>
- ///
- /// <param name="inviteMessage"> The invitation to accept or reject. </param>
- ///
- /// <returns> <tt>true</tt> to accept the invitation, <tt>false</tt> to reject it. </returns>
- public bool AcceptInvite(IMessage inviteMessage)
- {
- log.Info("public boolean AcceptInvite(IMessage inviteMessage = " + inviteMessage + "): called");
- // All invites are acceptable.
- return true;
- }
-
- public void Start()
- {
- log.Info("public void start(): called");
- // Assuming numMessages = 1
- Start(1);
- }
-
- public void Start(int numMessages)
- {
- log.Info("public void start("+numMessages+"): called");
-
- // Check that the sender role is being performed.
- if (role == Roles.SENDER)
- {
- IMessage testMessage = createMessageOfSize(messageSize);
-
-
- for (int i = 0; i < numMessages; i++)
- {
- publisher.Send(testMessage);
-
- // Increment the message count.
- messageCount++;
- }
- }
-
- }
-
- private IMessage createMessageOfSize(int size)
- {
- IBytesMessage message = channel[0].CreateBytesMessage();
- string messageStr = "Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- ";
- System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
- byte[] messageBytes = encoding.GetBytes(messageStr);
-
- if (size > 0)
- {
- int div = size / messageBytes.Length;
- int mod = size % messageBytes.Length;
-
- for (int i = 0; i < div; i++)
- {
- message.WriteBytes(messageBytes);
- }
- if (mod != 0)
- {
- message.WriteBytes(messageBytes, 0, mod);
- }
- }
- return message;
- }
-
- public void AssignRole(Roles role, IMessage assignRoleMessage)
- {
- log.Info("public void assignRole(Roles role = " + role + ", IMessage assignRoleMessage = " + assignRoleMessage
- + "): called");
-
- // Reset the message count for a new test.
- messageCount = 0;
-
- // Take note of the role to be played.
- this.role = role;
-
- // Extract and retain the test parameters.
- numMessages = assignRoleMessage.Headers.GetInt("P2P_NUM_MESSAGES");
- messageSize = assignRoleMessage.Headers.GetInt("messageSize");
-
- string sendKey = assignRoleMessage.Headers.GetString("P2P_QUEUE_AND_KEY_NAME");
- sendDestination = sendKey;
-
- log.Info("numMessages = " + numMessages);
- log.Info("messageSize = " + messageSize);
- log.Info("sendKey = " + sendKey);
- log.Info("role = " + role);
-
- switch (role)
- {
- // Check if the sender role is being assigned, and set up a single message producer if so.
- case Roles.SENDER:
- // Create a new connection to pass the test messages on.
- connection = new IConnection[1];
- channel = new IChannel[1];
-
- connection[0] =
- TestClient.CreateConnection(TestClient.brokerUrl, TestClient.virtualHost);
- channel[0] = connection[0].CreateChannel(false, AcknowledgeMode.AutoAcknowledge);
-
- // Extract and retain the test parameters.
- publisher = channel[0].CreatePublisherBuilder()
- .WithExchangeName(ExchangeNameDefaults.TOPIC)
- .WithRoutingKey(sendDestination)
- .WithMandatory(false)
- .WithImmediate(false)
- .Create();
- break;
-
- // Otherwise the receiver role is being assigned, so set this up to listen for messages on the required number
- // of receiver connections.
- case Roles.RECEIVER:
- // Create the required number of receiver connections.
- connection = new IConnection[1];
- channel = new IChannel[1];
- connection[0] = TestClient.CreateConnection(TestClient.brokerUrl, TestClient.virtualHost);
- channel[0] = connection[0].CreateChannel(false, AcknowledgeMode.AutoAcknowledge);
- IMessageConsumer consumer = channel[0].CreateConsumerBuilder(sendDestination).Create();
- consumer.OnMessage += new MessageReceivedDelegate(OnMessage);
- break;
- }
-
- // Start all the connection dispatcher threads running.
- foreach (IConnection con in connection)
- {
- con.Start();
- }
-
- }
-
- public IMessage GetReport(IChannel channel)
- {
-
- log.Info("public Message GetReport(IChannel channel): called");
-
- // Close the test connection.
- //connection.Stop();
-
- // Generate a report message containing the count of the number of messages passed.
- IMessage report = channel.CreateMessage();
- //report.Headers.SetString("CONTROL_TYPE", "REPORT");
- report.Headers.SetInt("MESSAGE_COUNT", messageCount);
-
- return report;
- }
-
-
- /// <summary>
- /// Counts incoming test messages.
- /// </summary>
- ///
- /// <param name="message"> The incoming test message. </param>
- public void OnMessage(IMessage message)
- {
- log.Info("public void onMessage(IMessage message = " + message + "): called");
-
- // Increment the message count.
- messageCount++;
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase5PubSubMessageSize.cs b/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase5PubSubMessageSize.cs
deleted file mode 100644
index 8fddaeafa2..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/interop/TestCases/TestCase5PubSubMessageSize.cs
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Text;
-using log4net;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Integration.Tests.interop.TestCases
-{
- ///
- /// Implements test case 4, from the interop test specification. This test sets up the TC2_P2PMessageSize test for 50
- /// messages, and a variety of message sizes. It checks that the sender and receivers reports both indicate that all
- /// the test messages were transmitted successfully.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Setup p2p test parameters and compare with test output. <td> {@link FrameworkBaseCase}
- /// </table>
- ///
- public class TestCase5PubSubMessageSize : InteropClientTestCase
- {
- /// Used for debugging.
- private static ILog log = LogManager.GetLogger(typeof(TestCase5PubSubMessageSize));
-
- /// <summary> The role to be played by the test. </summary>
- private Roles role;
-
- /// <summary> Holds the count of test messages received. </summary>
- private int messageCount;
-
- ///<summary>The size of the message to be sent </summary>
- private int messageSize;
-
- /// <summary> The number of test messages to send. </summary>
- private int numMessages;
-
- /// <summary> The number of receiver connection to use. </summary>
- private int numReceivers;
-
- /// <summary> The routing key to send them to on the default direct exchange. </summary>
- private string sendDestination;
-
- /// <summary> The connections to send/receive the test messages on. </summary>
- private IConnection[] connection;
-
- /// <summary> The sessions to send/receive the test messages on. </summary>
- private IChannel[] channel;
-
- /// <summary> The producer to send the test messages with. </summary>
- IMessagePublisher publisher;
-
- /// <summary>
- /// Creates a new coordinating test case with the specified name.
- ///</summary>
- /// <returns>The test case name.</returns>
- ///
- public String GetName()
- {
- log.Info("public String GetName(): called");
- return "TC5_PubSubMessageSize";
- }
-
- /// <summary>
- /// Determines whether the test invite that matched this test case is acceptable.
- /// </summary>
- ///
- /// <param name="inviteMessage"> The invitation to accept or reject. </param>
- ///
- /// <returns> <tt>true</tt> to accept the invitation, <tt>false</tt> to reject it. </returns>
- public bool AcceptInvite(IMessage inviteMessage)
- {
- log.Info("public boolean AcceptInvite(IMessage inviteMessage = " + inviteMessage + "): called");
- // All invites are acceptable.
- return true;
- }
-
- public void Start()
- {
- log.Info("public void start(): called");
- // Assuming numMessages = 1
- Start(1);
- }
-
- public void Start(int numMessages)
- {
- log.Info("public void start("+numMessages+"): called");
-
- // Check that the sender role is being performed.
- if (role == Roles.SENDER)
- {
- IMessage testMessage = createMessageOfSize(messageSize);
-
-
- for (int i = 0; i < numMessages; i++)
- {
- publisher.Send(testMessage);
-
- // Increment the message count.
- messageCount++;
- }
- }
-
- }
-
- private IMessage createMessageOfSize(int size)
- {
- IBytesMessage message = channel[0].CreateBytesMessage();
- string messageStr = "Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- Test Message -- ";
- System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
- byte[] messageBytes = encoding.GetBytes(messageStr);
-
- if (size > 0)
- {
- int div = size / messageBytes.Length;
- int mod = size % messageBytes.Length;
-
- for (int i = 0; i < div; i++)
- {
- message.WriteBytes(messageBytes);
- }
- if (mod != 0)
- {
- message.WriteBytes(messageBytes, 0, mod);
- }
- }
- return message;
- }
-
- public void AssignRole(Roles role, IMessage assignRoleMessage)
- {
- log.Info("public void assignRole(Roles role = " + role + ", IMessage assignRoleMessage = " + assignRoleMessage
- + "): called");
-
- // Reset the message count for a new test.
- messageCount = 0;
-
- // Take note of the role to be played.
- this.role = role;
-
- // Extract and retain the test parameters.
- numMessages = assignRoleMessage.Headers.GetInt("PUBSUB_NUM_MESSAGES");
- messageSize = assignRoleMessage.Headers.GetInt("messageSize");
- numReceivers = assignRoleMessage.Headers.GetInt("PUBSUB_NUM_RECEIVERS");
-
- string sendKey = assignRoleMessage.Headers.GetString("PUBSUB_KEY");
- sendDestination = sendKey;
-
- log.Info("numMessages = " + numMessages);
- log.Info("messageSize = " + messageSize);
- log.Info("sendKey = " + sendKey);
- log.Info("role = " + role);
-
- switch (role)
- {
- // Check if the sender role is being assigned, and set up a single message producer if so.
- case Roles.SENDER:
- // Create a new connection to pass the test messages on.
- connection = new IConnection[1];
- channel = new IChannel[1];
-
- connection[0] =
- TestClient.CreateConnection(TestClient.brokerUrl, TestClient.virtualHost);
- channel[0] = connection[0].CreateChannel(false, AcknowledgeMode.AutoAcknowledge);
-
- // Extract and retain the test parameters.
- publisher = channel[0].CreatePublisherBuilder()
- .WithExchangeName(ExchangeNameDefaults.TOPIC)
- .WithRoutingKey(sendDestination)
- .WithMandatory(false)
- .WithImmediate(false)
- .Create();
- break;
-
- // Otherwise the receiver role is being assigned, so set this up to listen for messages on the required number
- // of receiver connections.
- case Roles.RECEIVER:
- // Create the required number of receiver connections.
- connection = new IConnection[numReceivers];
- channel = new IChannel[numReceivers];
-
- for (int i = 0; i < numReceivers; i++)
- {
- connection[i] =
- TestClient.CreateConnection(TestClient.brokerUrl, TestClient.virtualHost);
- channel[i] = connection[i].CreateChannel(false, AcknowledgeMode.AutoAcknowledge);
-
- IMessageConsumer consumer = channel[i].CreateConsumerBuilder(sendDestination).Create();
- consumer.OnMessage += new MessageReceivedDelegate(OnMessage);
- }
-
- break;
- }
-
- // Start all the connection dispatcher threads running.
- foreach (IConnection con in connection)
- {
- con.Start();
- }
-
- }
-
- public IMessage GetReport(IChannel channel)
- {
-
- log.Info("public Message GetReport(IChannel channel): called");
-
- // Close the test connection.
- //connection.Stop();
-
- // Generate a report message containing the count of the number of messages passed.
- IMessage report = channel.CreateMessage();
- //report.Headers.SetString("CONTROL_TYPE", "REPORT");
- report.Headers.SetInt("MESSAGE_COUNT", messageCount);
-
- return report;
- }
-
-
- /// <summary>
- /// Counts incoming test messages.
- /// </summary>
- ///
- /// <param name="message"> The incoming test message. </param>
- public void OnMessage(IMessage message)
- {
- log.Info("public void onMessage(IMessage message = " + message + "): called");
-
- // Increment the message count.
- messageCount++;
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/interop/TestClient.cs b/qpid/dotnet/Qpid.Integration.Tests/interop/TestClient.cs
deleted file mode 100644
index 0def89c6da..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/interop/TestClient.cs
+++ /dev/null
@@ -1,381 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Collections;
-using System.Text;
-using System.Threading;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client;
-using log4net;
-using Apache.Qpid.Integration.Tests.interop.TestCases;
-
-namespace Apache.Qpid.Integration.Tests.interop
-{
- /// <summary>
- /// Implements a test client as described in the interop testing spec
- /// (http://cwiki.apache.org/confluence/display/qpid/Interop+Testing+Specification). A test client is an agent that
- /// reacts to control message sequences send by the test coordinator.
- ///
- /// <p/><table><caption>Messages Handled by TestClient</caption>
- /// <tr><th> Message <th> Action
- /// <tr><td> Invite(compulsory) <td> Reply with Enlist.
- /// <tr><td> Invite(test case) <td> Reply with Enlist if test case available.
- /// <tr><td> AssignRole(test case) <td> Reply with Accept Role if matches an enlisted test. Keep test parameters.
- /// <tr><td> Start <td> Send test messages defined by test parameters. Send report on messages sent.
- /// <tr><td> Status Request <td> Send report on messages received.
- /// </table>
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Handle all incoming control messages. <td> {@link InteropClientTestCase}
- /// <tr><td> Configure and look up test cases by name. <td> {@link InteropClientTestCase}
- /// </table>
- /// </summary>
- public class TestClient
- {
- private static ILog log = LogManager.GetLogger(typeof(TestClient));
-
- /// <summary> Defines the default broker for the tests, localhost, default port. </summary>
- public static string DEFAULT_BROKER_URL = "amqp://guest:guest@clientid/?brokerlist='tcp://localhost:5672'";
-
- /// <summary> Defines the default virtual host to use for the tests, none. </summary>
- public static string DEFAULT_VIRTUAL_HOST = "";
-
- /// <summary> Defines the default identifying name of this test client. </summary>
- public static string DEFAULT_CLIENT_NAME = "dotnet";
-
- /// <summary> Holds the URL of the broker to run the tests on. </summary>
- public static string brokerUrl;
-
- /// <summary> Holds the virtual host to run the tests on. If <tt>null</tt>, then the default virtual host is used. </summary>
- public static string virtualHost;
-
- /// <summary> The clients identifying name to print in test results and to distinguish from other clients. </summary>
- private string clientName;
-
- /// <summary> Holds all the test cases. </summary>
- private IDictionary testCases = new Hashtable();
-
- InteropClientTestCase currentTestCase;
-
- private MessagePublisherBuilder publisherBuilder;
-
- private IChannel channel;
-
- /// <summary> Monitor to wait for termination events on. </summary>
- private static object terminationMonitor = new Object();
-
- /// <summary>
- /// Creates a new interop test client, listenting to the specified broker and virtual host, with the specified
- /// client identifying name.
- /// </summary>
- ///
- /// <param name="brokerUrl"> The url of the broker to connect to. </param>
- /// <param name="virtualHost"> The virtual host to conect to. </param>
- /// <param name="clientName"> The client name to use. </param>
- public TestClient(string brokerUrl, string virtualHost, string clientName)
- {
- log.Info("public TestClient(string brokerUrl = " + brokerUrl + ", string virtualHost = " + virtualHost
- + ", string clientName = " + clientName + "): called");
-
- // Retain the connection parameters.
- TestClient.brokerUrl = brokerUrl;
- TestClient.virtualHost = virtualHost;
- this.clientName = clientName;
- }
-
-
- /// <summary>
- /// The entry point for the interop test coordinator. This client accepts the following command line arguments:
- /// </summary>
- ///
- /// <p/><table>
- /// <tr><td> -b <td> The broker URL. <td> Optional.
- /// <tr><td> -h <td> The virtual host. <td> Optional.
- /// <tr><td> -n <td> The test client name. <td> Optional.
- /// <tr><td> name=value <td> Trailing argument define name/value pairs. Added to system properties. <td> Optional.
- /// </table>
- ///
- /// <param name="args"> The command line arguments. </param>
- public static void Main(string[] args)
- {
- // Extract the command line options (Not exactly Posix but it will do for now...).
- string brokerUrl = DEFAULT_BROKER_URL;
- string virtualHost = DEFAULT_VIRTUAL_HOST;
- string clientName = DEFAULT_CLIENT_NAME;
-
- foreach (string nextArg in args)
- {
- if (nextArg.StartsWith("-b"))
- {
- brokerUrl = nextArg.Substring(2);
- }
- else if (nextArg.StartsWith("-h"))
- {
- virtualHost = nextArg.Substring(2);
- }
- else if (nextArg.StartsWith("-n"))
- {
- clientName = nextArg.Substring(2);
- }
- }
-
- NDC.Push(clientName);
-
- // Create a test client and start it running.
- TestClient client = new TestClient(brokerUrl, virtualHost, clientName);
-
- try
- {
- client.Start();
- }
- catch (Exception e)
- {
- log.Error("The test client was unable to start.", e);
- System.Environment.Exit(1);
- }
-
- // Wait for a signal on the termination monitor before quitting.
- lock (terminationMonitor)
- {
- Monitor.Wait(terminationMonitor);
- }
-
- NDC.Pop();
- }
-
- /// <summary>
- /// Starts the interop test client running. This causes it to start listening for incoming test invites.
- /// </summary>
- private void Start()
- {
- log.Info("private void Start(): called");
-
- // Use a class path scanner to find all the interop test case implementations.
- ArrayList testCaseClasses = new ArrayList();
-
- // ClasspathScanner.getMatches(InteropClientTestCase.class, "^TestCase.*", true);
- // Hard code the test classes till the classpath scanner is fixed.
- testCaseClasses.Add(typeof(TestCase1DummyRun));
- testCaseClasses.Add(typeof(TestCase2BasicP2P));
- testCaseClasses.Add(typeof(TestCase3BasicPubSub));
- testCaseClasses.Add(typeof(TestCase4P2PMessageSize));
- testCaseClasses.Add(typeof(TestCase5PubSubMessageSize));
-
- // Create all the test case implementations and index them by the test names.
- foreach (Type testClass in testCaseClasses)
- {
- InteropClientTestCase testCase = (InteropClientTestCase)Activator.CreateInstance(testClass);
- testCases.Add(testCase.GetName(), testCase);
-
- log.Info("Found test case: " + testClass);
- }
-
- // Open a connection to communicate with the coordinator on.
- log.Info("brokerUrl = " + brokerUrl);
- IConnection connection = CreateConnection(brokerUrl, virtualHost);
-
- channel = connection.CreateChannel(false, AcknowledgeMode.AutoAcknowledge);
-
- // Set this up to listen for control messages.
- string responseQueueName = channel.GenerateUniqueName();
- channel.DeclareQueue(responseQueueName, false, true, true);
-
- channel.Bind(responseQueueName, ExchangeNameDefaults.TOPIC, "iop.control." + clientName);
- channel.Bind(responseQueueName, ExchangeNameDefaults.TOPIC, "iop.control");
-
- IMessageConsumer consumer = channel.CreateConsumerBuilder(responseQueueName)
- .Create();
- consumer.OnMessage += new MessageReceivedDelegate(OnMessage);
-
- // Create a publisher to send replies with.
- publisherBuilder = channel.CreatePublisherBuilder()
- .WithExchangeName(ExchangeNameDefaults.DIRECT);
-
-
- // Start listening for incoming control messages.
- connection.Start();
- Console.WriteLine("Test client " + clientName + " ready to receive test control messages...");
- }
-
- /// <summary>
- /// Establishes an AMQ connection. This is a simple convenience method for code that does not anticipate handling connection failures.
- /// All exceptions that indicate that the connection has failed, are allowed to fall through.
- /// </summary>
- ///
- /// <param name="brokerUrl"> The broker url to connect to, <tt>null</tt> to use the default from the properties. </param>
- /// <param name="virtualHost"> The virtual host to connectio to, <tt>null</tt> to use the default. </param>
- ///
- /// <returns> A JMS conneciton. </returns>
- public static IConnection CreateConnection(string brokerUrl, string virtualHost)
- {
- log.Info("public static Connection createConnection(string brokerUrl = " + brokerUrl + ", string virtualHost = "
- + virtualHost + "): called");
-
- // Create a connection to the broker.
- IConnectionInfo connectionInfo = QpidConnectionInfo.FromUrl(brokerUrl);
- connectionInfo.VirtualHost = virtualHost;
- IConnection connection = new AMQConnection(connectionInfo);
-
- return connection;
- }
-
- /// <summary>
- /// Handles all incoming control messages.
- /// </summary>
- ///
- /// <param name="message"> The incoming message. </param>
- public void OnMessage(IMessage message)
- {
- log.Info("public void OnMessage(IMessage message = " + message + "): called");
-
- try
- {
- string controlType = message.Headers.GetString("CONTROL_TYPE");
- string testName = message.Headers.GetString("TEST_NAME");
-
- // Check if the message is a test invite.
- if ("INVITE" == controlType)
- {
- string testCaseName = message.Headers.GetString("TEST_NAME");
-
- // Flag used to indicate that an enlist should be sent. Only enlist to compulsory invites or invites
- // for which test cases exist.
- bool enlist = false;
-
- if (testCaseName != null)
- {
- log.Info("Got an invite to test: " + testCaseName);
-
- // Check if the requested test case is available.
- InteropClientTestCase testCase = (InteropClientTestCase)testCases[testCaseName];
-
- if (testCase != null)
- {
- // Make the requested test case the current test case.
- currentTestCase = testCase;
- enlist = true;
- }
- }
- else
- {
- log.Info("Got a compulsory invite.");
-
- enlist = true;
- }
-
- log.Info("enlist = " + enlist);
-
- if (enlist)
- {
- // Reply with the client name in an Enlist message.
- IMessage enlistMessage = channel.CreateMessage();
- enlistMessage.Headers.SetString("CONTROL_TYPE", "ENLIST");
- enlistMessage.Headers.SetString("CLIENT_NAME", clientName);
- enlistMessage.Headers.SetString("CLIENT_PRIVATE_CONTROL_KEY", "iop.control." + clientName);
- enlistMessage.CorrelationId = message.CorrelationId;
-
- Send(enlistMessage, message.ReplyToRoutingKey);
- }
- }
- else if ("ASSIGN_ROLE" == controlType)
- {
- // Assign the role to the current test case.
- string roleName = message.Headers.GetString("ROLE");
-
- log.Info("Got a role assignment to role: " + roleName);
-
- Roles role;
-
- if (roleName == "SENDER")
- {
- role = Roles.SENDER;
- }
- else
- {
- role = Roles.RECEIVER;
- }
-
- currentTestCase.AssignRole(role, message);
-
- // Reply by accepting the role in an Accept Role message.
- IMessage acceptRoleMessage = channel.CreateMessage();
- acceptRoleMessage.Headers.SetString("CONTROL_TYPE", "ACCEPT_ROLE");
- acceptRoleMessage.CorrelationId = message.CorrelationId;
-
- Send(acceptRoleMessage, message.ReplyToRoutingKey);
- }
- else if ("START" == controlType || "STATUS_REQUEST" == controlType)
- {
- if ("START" == controlType)
- {
- log.Info("Got a start notification.");
-
- // Start the current test case.
- currentTestCase.Start();
- }
- else
- {
- log.Info("Got a status request.");
- }
-
- // Generate the report from the test case and reply with it as a Report message.
- IMessage reportMessage = currentTestCase.GetReport(channel);
- reportMessage.Headers.SetString("CONTROL_TYPE", "REPORT");
- reportMessage.CorrelationId = message.CorrelationId;
-
- Send(reportMessage, message.ReplyToRoutingKey);
- }
- else if ("TERMINATE" == controlType)
- {
- Console.WriteLine("Received termination instruction from coordinator.");
-
- // Is a cleaner shutdown needed?
- System.Environment.Exit(1);
- }
- else
- {
- // Log a warning about this but otherwise ignore it.
- log.Warn("Got an unknown control message, controlType = " + controlType + ", message = " + message);
- }
- }
- catch (QpidException e)
- {
- // Log a warning about this, but otherwise ignore it.
- log.Warn("A QpidException occurred whilst handling a message.");
- log.Info("Got QpidException whilst handling message: " + message, e);
- }
- }
-
- /// <summary>
- /// Send the specified message using the specified routing key on the direct exchange.
- /// </summary>
- ///
- /// <param name="message"> The message to send.</param>
- /// <param name="routingKey"> The routing key to send the message with.</param>
- public void Send(IMessage message, string routingKey)
- {
- IMessagePublisher publisher = publisherBuilder.WithRoutingKey(routingKey).Create();
- publisher.Send(message);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/log4net.config b/qpid/dotnet/Qpid.Integration.Tests/log4net.config
deleted file mode 100644
index 73bfc77a3e..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/log4net.config
+++ /dev/null
@@ -1,69 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<log4net>
-
- <!-- ============================== -->
- <!-- Append messages to the console -->
- <!-- ============================== -->
-
- <appender name="console" type="log4net.Appender.ConsoleAppender" >
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%m%n"/>
- </layout>
- <threshold value="info"/>
- </appender>
-
- <!-- ====================================== -->
- <!-- Append messages to the socket appender -->
- <!-- ====================================== -->
-
- <appender name="UdpAppender" type="log4net.Appender.UdpAppender">
- <remoteAddress value="127.0.0.1"/>
- <remotePort value="4445"/>
- <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
- <locationInfo value="true"/>
- </layout>
- <threshold value="debug"/>
- </appender>
-
- <!-- ================ -->
- <!-- Limit categories -->
- <!-- ================ -->
-
- <logger name="Qpid">
- <level value="debug"/>
- </logger>
-
- <logger name="CONSOLE">
- <level value="info"/>
- <appender-ref ref="console"/>
- </logger>
-
- <!-- ======================= -->
- <!-- Setup the Root category -->
- <!-- ======================= -->
-
- <root>
- <appender-ref ref="UdpAppender"/>
- </root>
-
-</log4net>
diff --git a/qpid/dotnet/Qpid.Integration.Tests/old/ServiceProvidingClient.tmp b/qpid/dotnet/Qpid.Integration.Tests/old/ServiceProvidingClient.tmp
deleted file mode 100644
index b1e7a50aaa..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/old/ServiceProvidingClient.tmp
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Integration.Tests.testcases
-{
- [TestFixture, Category("Integration")]
- public class ServiceProvidingClient : BaseMessagingTestFixture
- {
- private static ILog _logger = LogManager.GetLogger(typeof(ServiceProvidingClient));
-
- private int _messageCount;
-
- private string _replyToExchangeName;
- private string _replyToRoutingKey;
- const int PACK = 100;
-
- private IMessagePublisher _destinationPublisher;
- private IMessageConsumer _consumer;
-
- private string _serviceName = "ServiceQ1";
-
- private string _selector = null;
-
- [SetUp]
- public override void Init()
- {
- base.Init();
-
- _logger.Info("Starting...");
- _logger.Info("Service (queue) name is '" + _serviceName + "'...");
-
- _connection.ExceptionListener = new ExceptionListenerDelegate(OnConnectionException);
-
- _logger.Info("Message selector is <" + _selector + ">...");
-
- _channel.DeclareQueue(_serviceName, false, false, false);
-
- _consumer = _channel.CreateConsumerBuilder(_serviceName)
- .WithPrefetchLow(100)
- .WithPrefetchHigh(500)
- .WithNoLocal(true)
- .Create();
- _consumer.OnMessage = new MessageReceivedDelegate(OnMessage);
- }
-
- public override void Shutdown()
- {
- _consumer.Dispose();
- base.Shutdown();
- }
-
- private void OnConnectionException(Exception e)
- {
- _logger.Info("Connection exception occurred", e);
- // XXX: Test still doesn't shutdown when broker terminates. Is there no heartbeat?
- }
-
- [Test]
- public void Test()
- {
- _connection.Start();
- _logger.Info("Waiting...");
-
- ServiceRequestingClient client = new ServiceRequestingClient();
- client.Init();
- client.SendMessages();
- }
-
- private void OnMessage(IMessage message)
- {
-// _logger.Info("Got message '" + message + "'");
-
- ITextMessage tm = (ITextMessage)message;
-
- try
- {
- string replyToExchangeName = tm.ReplyToExchangeName;
- string replyToRoutingKey = tm.ReplyToRoutingKey;
-
- _replyToExchangeName = replyToExchangeName;
- _replyToRoutingKey = replyToRoutingKey;
- _logger.Debug("About to create a producer");
-
-// Console.WriteLine("ReplyTo.ExchangeName = " + _replyToExchangeName);
-// Console.WriteLine("ReplyTo.RoutingKey = " + _replyToRoutingKey);
-
- _destinationPublisher = _channel.CreatePublisherBuilder()
- .WithExchangeName(_replyToExchangeName)
- .WithRoutingKey(_replyToRoutingKey)
- .WithDeliveryMode(DeliveryMode.NonPersistent)
- .Create();
- _destinationPublisher.DisableMessageTimestamp = true;
- _logger.Debug("After create a producer");
- }
- catch (QpidException e)
- {
- _logger.Error("Error creating destination", e);
- throw e;
- }
- _messageCount++;
- if (_messageCount % PACK == 0)
- {
- _logger.Info("Received message total: " + _messageCount);
- _logger.Info(string.Format("Sending response to '{0}:{1}'",
- _replyToExchangeName, _replyToRoutingKey));
- }
-
- try
- {
- String payload = "This is a response: sing together: 'Mahnah mahnah...'" + tm.Text;
- ITextMessage msg = _channel.CreateTextMessage(payload);
- if ( tm.Headers.Contains("timeSent") )
- {
- msg.Headers["timeSent"] = tm.Headers["timeSent"];
- }
- _destinationPublisher.Send(msg);
- } catch ( QpidException e )
- {
- _logger.Error("Error sending message: " + e, e);
- throw e;
- } finally
- {
- _destinationPublisher.Dispose();
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/old/ServiceRequestingClient.tmp b/qpid/dotnet/Qpid.Integration.Tests/old/ServiceRequestingClient.tmp
deleted file mode 100644
index da0f764bcd..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/old/ServiceRequestingClient.tmp
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Integration.Tests.testcases
-{
- public class ServiceRequestingClient : BaseMessagingTestFixture
- {
- private const int MESSAGE_SIZE = 1024;
- private static string MESSAGE_DATA = new string('x', MESSAGE_SIZE);
-
- private const int PACK = 100;
- private const int NUM_MESSAGES = PACK*10; // increase when in standalone
-
- private static ILog _log = LogManager.GetLogger(typeof(ServiceRequestingClient));
-
- ManualResetEvent _finishedEvent = new ManualResetEvent(false);
-
- private int _expectedMessageCount = NUM_MESSAGES;
-
- private long _startTime = 0;
-
- private string _commandQueueName = "ServiceQ1";
-
- private IMessagePublisher _publisher;
-
- Avergager averager = new Avergager();
-
- private void InitialiseProducer()
- {
- try
- {
- _publisher = _channel.CreatePublisherBuilder()
- .WithRoutingKey(_commandQueueName)
- .WithDeliveryMode(DeliveryMode.NonPersistent)
- .Create();
- _publisher.DisableMessageTimestamp = true; // XXX: need a "with" for this in builder?
- }
- catch (QpidException e)
- {
- _log.Error("Error: " + e, e);
- }
- }
-
- [Test]
- public void SendMessages()
- {
- InitialiseProducer();
-
- string replyQueueName = _channel.GenerateUniqueName();
-
- _channel.DeclareQueue(replyQueueName, false, true, true);
-
- IMessageConsumer messageConsumer = _channel.CreateConsumerBuilder(replyQueueName)
- .WithPrefetchLow(100)
- .WithPrefetchHigh(200)
- .WithNoLocal(true)
- .WithExclusive(true).Create();
-
- _startTime = DateTime.Now.Ticks;
-
- messageConsumer.OnMessage = new MessageReceivedDelegate(OnMessage);
- _connection.Start();
- for (int i = 0; i < _expectedMessageCount; i++)
- {
- ITextMessage msg;
- try
- {
- msg = _channel.CreateTextMessage(MESSAGE_DATA + i);
- }
- catch (Exception e)
- {
- _log.Error("Error creating message: " + e, e);
- break;
- }
- msg.ReplyToRoutingKey = replyQueueName;
-
- // Added timestamp.
- long timeNow = DateTime.Now.Ticks;
- string timeSentString = String.Format("{0:G}", timeNow);
- msg.Headers.SetLong("timeSent", timeNow);
-
- _publisher.Send(msg);
- }
-
- // Assert that the test finishes within a reasonable amount of time.
- const int waitSeconds = 40;
- const int waitMilliseconds = waitSeconds * 1000;
- _log.Info("Finished sending " + _expectedMessageCount + " messages");
- _log.Info(String.Format("Waiting {0} seconds to receive last message...", waitSeconds));
- Assert.IsTrue(_finishedEvent.WaitOne(waitMilliseconds, false),
- String.Format("Expected to finish in {0} seconds", waitSeconds));
- }
-
- public void OnMessage(IMessage m)
- {
- if (_log.IsDebugEnabled)
- {
- _log.Debug("Message received: " + m);
- }
-
- if (!m.Headers.Contains("timeSent"))
- {
- throw new Exception("Set timeSent!");
- }
-
- long sentAt = m.Headers.GetLong("timeSent");
- long now = DateTime.Now.Ticks;
- long latencyTicks = now - sentAt;
- long latencyMilliseconds = latencyTicks / TimeSpan.TicksPerMillisecond;
-
- averager.Add(latencyMilliseconds);
-
- if (averager.Num % PACK == 0)
- {
- _log.Info("Ticks per millisecond = " + TimeSpan.TicksPerMillisecond);
- _log.Info(String.Format("Average latency (ms) = {0}", averager));
- _log.Info("Received message count: " + averager.Num);
- }
-
- if (averager.Num == _expectedMessageCount)
- {
- _log.Info(String.Format("Final average latency (ms) = {0}", averager));
-
- double timeTakenSeconds = (DateTime.Now.Ticks - _startTime) * 1.0 / (TimeSpan.TicksPerMillisecond * 1000);
- _log.Info("Total time taken to receive " + _expectedMessageCount + " messages was " +
- timeTakenSeconds + "s, equivalent to " +
- (_expectedMessageCount/timeTakenSeconds) + " messages per second");
-
- _finishedEvent.Set(); // Notify main thread to quit.
- }
- }
- }
-
- class Avergager
- {
- long num = 0;
- long sum = 0;
-
- long min = long.MaxValue;
- long max = long.MinValue;
-
- public void Add(long item)
- {
- ++num;
- sum += item;
- if (item < min) min = item;
- if (item > max) max = item;
- }
-
- public long Average { get { return sum/num; }}
-
- public long Num { get { return num; } }
-
- public override string ToString()
- {
- return String.Format("average={0} min={1} max={2}", Average, min, max);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs b/qpid/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs
deleted file mode 100644
index e67d96f188..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/testcases/BaseMessagingTestFixture.cs
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Text;
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client;
-
-namespace Apache.Qpid.Integration.Tests.testcases
-{
- /// <summary>
- /// Provides a basis for writing Unit tests that communicate with an AMQ protocol broker. By default it creates a connection
- /// to a message broker running on localhost on the standard AMQ port, 5672, using guest:guest login credentials. It also
- /// creates a standard auto-ack channel on this connection.
- /// </summary>
- public class BaseMessagingTestFixture
- {
- private static ILog log = LogManager.GetLogger(typeof(BaseMessagingTestFixture));
-
- /// <summary> Used to build dummy data to fill test messages with. </summary>
- private const string MESSAGE_DATA_BYTES = "-- Test Message -- Test Message -- Test Message -- Test Message -- Test Message ";
-
- /// <summary> The default timeout in milliseconds to use on receives. </summary>
- private const long RECEIVE_WAIT = 2000;
-
- /// <summary> The default AMQ connection URL to use for tests. </summary>
- public const string connectionUri = "amqp://guest:guest@test/test?brokerlist='tcp://localhost:5672'";
-
- /// <summary> The default AMQ connection URL parsed as a connection info. </summary>
- protected IConnectionInfo connectionInfo;
-
- /// <summary> Holds an array of connections for building mutiple test end-points. </summary>
- protected IConnection[] testConnection = new IConnection[10];
-
- /// <summary> Holds an array of channels for building mutiple test end-points. </summary>
- protected IChannel[] testChannel = new IChannel[10];
-
- /// <summary> Holds an array of queues for building mutiple test end-points. </summary>
- protected String[] testQueue = new String[10];
-
- /// <summary> Holds an array of producers for building mutiple test end-points. </summary>
- protected IMessagePublisher[] testProducer = new IMessagePublisher[10];
-
- /// <summary> Holds an array of consumers for building mutiple test end-points. </summary>
- protected IMessageConsumer[] testConsumer = new IMessageConsumer[10];
-
- /// <summary> A counter used to supply unique ids. </summary>
- private static int uniqueId = 0;
-
- /// <summary> Used to hold unique ids per test. </summary>
- protected Guid testId;
-
- /// <summary> Creates the test connection and channel. </summary>
- [SetUp]
- public virtual void Init()
- {
- log.Debug("public virtual void Init(): called");
-
- // Set up a unique id for this test.
- testId = System.Guid.NewGuid();
- }
-
- /// <summary>
- /// Disposes of the test connection. This is called manually because the connection is a field so dispose will not be automatically
- /// called on it.
- /// </summary>
- [TearDown]
- public virtual void Shutdown()
- {
- log.Debug("public virtual void Shutdown(): called");
- }
-
- /// <summary> Sets up the nth test end-point. </summary>
- ///
- /// <param name="n">The index of the test end-point to set up.</param>
- /// <param name="producer"><tt>true</tt> to set up a producer on the end-point.</param>
- /// <param name="consumer"><tt>true</tt> to set up a consumer on the end-point.</param>
- /// <param name="routingKey">The routing key for the producer to send on.</param>
- /// <param name="ackMode">The ack mode for the end-points channel.</param>
- /// <param name="transacted"><tt>true</tt> to use transactions on the end-points channel.</param>
- /// <param name="exchangeName">The exchange to produce or consume on.</param>
- /// <param name="declareBind"><tt>true</tt> if the consumers queue should be declared and bound, <tt>false</tt> if it has already been.</param>
- /// <param name="durable"><tt>true</tt> to declare the consumers queue as durable.</param>
- /// <param name="subscriptionName">If durable is true, the fixed unique queue name to use.</param>
- public void SetUpEndPoint(int n, bool producer, bool consumer, string routingKey, AcknowledgeMode ackMode, bool transacted,
- string exchangeName, bool declareBind, bool durable, string subscriptionName)
- {
- SetUpEndPoint(n, producer, consumer, routingKey, ackMode, transacted, exchangeName, declareBind, durable, subscriptionName, true, false);
- }
- /// <summary> Sets up the nth test end-point. </summary>
- ///
- /// <param name="n">The index of the test end-point to set up.</param>
- /// <param name="producer"><tt>true</tt> to set up a producer on the end-point.</param>
- /// <param name="consumer"><tt>true</tt> to set up a consumer on the end-point.</param>
- /// <param name="routingKey">The routing key for the producer to send on.</param>
- /// <param name="ackMode">The ack mode for the end-points channel.</param>
- /// <param name="transacted"><tt>true</tt> to use transactions on the end-points channel.</param>
- /// <param name="exchangeName">The exchange to produce or consume on.</param>
- /// <param name="declareBind"><tt>true</tt> if the consumers queue should be declared and bound, <tt>false</tt> if it has already been.</param>
- /// <param name="durable"><tt>true</tt> to declare the consumers queue as durable.</param>
- /// <param name="subscriptionName">If durable is true, the fixed unique queue name to use.</param>
- /// <param name="exclusive"><tt>true</tt> declare queue as exclusive.</param>
- /// <param name="browse"><tt>true</tt> only browse, don''t consume.</param>
- public void SetUpEndPoint(int n, bool producer, bool consumer, string routingKey, AcknowledgeMode ackMode, bool transacted,
- string exchangeName, bool declareBind, bool durable, string subscriptionName, bool exclusive, bool browse)
- {
- // Allow client id to be fixed, or undefined.
- {
- // Use unique id for end point.
- connectionInfo = QpidConnectionInfo.FromUrl(connectionUri);
-
- connectionInfo.ClientName = "test" + n;
- }
-
- testConnection[n] = new AMQConnection(connectionInfo);
- testConnection[n].Start();
- testChannel[n] = testConnection[n].CreateChannel(transacted, ackMode);
-
- if (producer)
- {
- testProducer[n] = testChannel[n].CreatePublisherBuilder()
- .WithExchangeName(exchangeName)
- .WithRoutingKey(routingKey)
- .Create();
- }
-
- if (consumer)
- {
- string queueName;
-
- // Use the subscription name as the queue name if the subscription is durable, otherwise use a generated name.
- if (durable)
- {
- // The durable queue is declared without auto-delete, and passively, in case it has already been declared.
- queueName = subscriptionName;
-
- if (declareBind)
- {
- testChannel[n].DeclareQueue(queueName, durable, exclusive, false);
- testChannel[n].Bind(queueName, exchangeName, routingKey);
- }
- }
- else
- {
- queueName = testChannel[n].GenerateUniqueName();
-
- if (declareBind)
- {
- if (durable)
- {
- testQueue[n] = queueName;
- }
- testChannel[n].DeclareQueue(queueName, durable, true, true);
- testChannel[n].Bind(queueName, exchangeName, routingKey);
- }
- }
-
- testConsumer[n] = testChannel[n].CreateConsumerBuilder(queueName).WithBrowse(browse).Create();
- }
- }
-
- /// <summary> Closes down the nth test end-point. </summary>
- public void CloseEndPoint(int n)
- {
- log.Debug("public void CloseEndPoint(int n): called");
-
- if (testProducer[n] != null)
- {
- testProducer[n].Close();
- testProducer[n].Dispose();
- testProducer[n] = null;
- }
-
- if (testConsumer[n] != null)
- {
- if (testQueue[n] != null)
- {
- testChannel[n].DeleteQueue(testQueue[n], false, false, true);
- }
- testConsumer[n].Close();
- testConsumer[n].Dispose();
- testConsumer[n] = null;
- }
-
- if (testConnection[n] != null)
- {
- testConnection[n].Stop();
- testConnection[n].Close();
- testConnection[n].Dispose();
- testConnection[n] = null;
- }
- }
-
- /// <summary>
- /// Consumes n messages, checking that the n+1th is not available within a timeout, and that the consumed messages
- /// are text messages with contents equal to the specified message body.
- /// </summary>
- ///
- /// <param name="n">The number of messages to consume.</param>
- /// <param name="body">The body text to match against all messages.</param>
- /// <param name="consumer">The message consumer to recieve the messages on.</param>
- public static void ConsumeNMessagesOnly(int n, string body, IMessageConsumer consumer)
- {
- ConsumeNMessages(n, body, consumer);
-
- // Check that one more than n cannot be received.
- IMessage msg = consumer.Receive(RECEIVE_WAIT);
- Assert.IsNull(msg, "Consumer got more messages than the number requested (" + n + ").");
- }
-
- /// <summary>
- /// Consumes n messages, checking that the n+1th is not available within a timeout, and that the consumed messages
- /// are text messages with contents equal to the specified message body.
- /// </summary>
- ///
- /// <param name="n">The number of messages to consume.</param>
- /// <param name="body">The body text to match against all messages.</param>
- /// <param name="consumer">The message consumer to recieve the messages on.</param>
- public static void ConsumeNMessages(int n, string body, IMessageConsumer consumer)
- {
- IMessage msg;
-
- // Try to receive n messages.
- for (int i = 0; i < n; i++)
- {
- msg = consumer.Receive(RECEIVE_WAIT);
- Assert.IsNotNull(msg, "Consumer did not receive message number: " + i);
- Assert.AreEqual(body, ((ITextMessage)msg).Text, "Incorrect Message recevied on consumer1.");
- }
- }
-
- /// <summary>Creates the requested number of bytes of dummy text. Usually used for filling test messages. </summary>
- ///
- /// <param name="size">The number of bytes of dummy text to generate.</param>
- ///
- /// <return>The requested number of bytes of dummy text.</return>
- public static String GetData(int size)
- {
- StringBuilder buf = new StringBuilder(size);
-
- if (size > 0)
- {
- int div = MESSAGE_DATA_BYTES.Length / size;
- int mod = MESSAGE_DATA_BYTES.Length % size;
-
- for (int i = 0; i < div; i++)
- {
- buf.Append(MESSAGE_DATA_BYTES);
- }
-
- if (mod != 0)
- {
- buf.Append(MESSAGE_DATA_BYTES, 0, mod);
- }
- }
-
- return buf.ToString();
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/testcases/ChannelQueueTest.cs b/qpid/dotnet/Qpid.Integration.Tests/testcases/ChannelQueueTest.cs
deleted file mode 100644
index 4692e7ecb1..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/testcases/ChannelQueueTest.cs
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Net;
-using System.Threading;
-using log4net;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client;
-using Apache.Qpid.Messaging;
-using NUnit.Framework;
-
-namespace Apache.Qpid.Integration.Tests.testcases
-{
- /// <summary>
- /// Test the queue methods
- /// </summary>
- [TestFixture, Category("Integration")]
- public class ChannelQueueTest
- {
- private static ILog _logger = LogManager.GetLogger(typeof(ChannelQueueTest));
-
- /// <summary> The default AMQ connection URL to use for tests. </summary>
- const string DEFAULT_URI = "amqp://guest:guest@default/test?brokerlist='tcp://localhost:5672'";
- const string _routingKey = "ServiceQ1";
-
- private ExceptionListenerDelegate _exceptionDelegate;
- private AutoResetEvent _evt = new AutoResetEvent(false);
- private Exception _lastException = null;
-
- private IMessageConsumer _consumer;
- private IMessagePublisher _publisher;
- private IChannel _channel;
- private IConnection _connection;
-
- private string _queueName;
-
- [SetUp]
- public virtual void Init()
- {
- _logger.Info("public virtual void Init(): called");
-
- // Create a connection to the broker.
- IConnectionInfo connectionInfo = QpidConnectionInfo.FromUrl(DEFAULT_URI);
- _connection = new AMQConnection(connectionInfo);
- _logger.Info("Starting...");
-
- // Register this to listen for exceptions on the test connection.
- _exceptionDelegate = new ExceptionListenerDelegate(OnException);
- _connection.ExceptionListener += _exceptionDelegate;
-
- // Establish a session on the broker.
- _channel = _connection.CreateChannel(false, AcknowledgeMode.AutoAcknowledge, 1);
-
- // Create a durable, non-temporary, non-exclusive queue.
- _queueName = _channel.GenerateUniqueName();
- _channel.DeclareQueue(_queueName, true, false, false);
-
- _channel.Bind(_queueName, ExchangeNameDefaults.TOPIC, _routingKey);
-
- // Clear the most recent message and exception.
- _lastException = null;
- }
-
- [TearDown]
- public virtual void ShutDown()
- {
- _logger.Info("public virtual void Shutdown(): called");
-
- if (_connection != null)
- {
- _logger.Info("Disposing connection.");
- _connection.Dispose();
- _logger.Info("Connection disposed.");
- }
- }
-
- [Test]
- public void DeleteUsedQueue()
- {
- // Create the consumer
- _consumer = _channel.CreateConsumerBuilder(_queueName)
- .WithPrefetchLow(100)
- .Create();
- _logger.Info("Consumer was created...");
-
- // delete the queue
- _channel.DeleteQueue(_queueName, false, true, true);
- _logger.InfoFormat("Queue {0} was delete", _queueName);
-
- Assert.IsNull(_lastException);
- }
-
- [Test]
- public void DeleteUnusedQueue()
- {
- // delete the queue
- _channel.DeleteQueue(_queueName, true, true, true);
- _logger.InfoFormat("Queue {0} was delete", _queueName);
-
- Assert.IsNull(_lastException);
- }
-
- [Test]
- public void DeleteNonEmptyQueue()
- {
- // Create the publisher
- _publisher = _channel.CreatePublisherBuilder()
- .WithExchangeName(ExchangeNameDefaults.TOPIC)
- .WithRoutingKey(_routingKey)
- .Create();
- _logger.Info("Publisher created...");
- SendTestMessage("DeleteNonEmptyQueue Message 1");
-
- try
- {
- _channel.DeleteQueue(_queueName, true, false, true);
- }
- catch (AMQException)
- {
- Assert.Fail("The test fails");
- }
- }
-
- [Test]
- public void DeleteEmptyQueue()
- {
- // Create the publisher
- _publisher = _channel.CreatePublisherBuilder()
- .WithExchangeName(ExchangeNameDefaults.TOPIC)
- .WithRoutingKey(_routingKey)
- .Create();
- _logger.Info("Publisher created...");
-
- // delete an empty queue with ifEmpty = true
- _channel.DeleteQueue(_queueName, false, true, true);
-
- Assert.IsNull(_lastException);
- }
-
- [Test]
- public void DeleteQueueWithResponse()
- {
- // Create the publisher
- _publisher = _channel.CreatePublisherBuilder()
- .WithExchangeName(ExchangeNameDefaults.TOPIC)
- .WithRoutingKey(_routingKey)
- .Create();
- _logger.Info("Publisher created...");
-
- SendTestMessage("DeleteQueueWithResponse Message 1");
- SendTestMessage("DeleteQueueWithResponse Message 2");
-
- // delete the queue, the server must respond
- _channel.DeleteQueue(_queueName, false, false, false);
- }
-
- [Test]
- public void PurgeQueueWithResponse()
- {
- _publisher = _channel.CreatePublisherBuilder()
- .WithExchangeName(ExchangeNameDefaults.TOPIC)
- .WithRoutingKey(_routingKey)
- .Create();
- _logger.Info("Pubisher created");
-
- SendTestMessage("Message 1");
- SendTestMessage("Message 2");
-
- _channel.PurgeQueue(_queueName, false);
- }
-
- [Test]
- public void PurgeQueueWithOutResponse()
- {
- _publisher = _channel.CreatePublisherBuilder()
- .WithExchangeName(ExchangeNameDefaults.TOPIC)
- .WithRoutingKey(_routingKey)
- .Create();
- _logger.Info("Pubisher created");
-
- SendTestMessage("Message 1");
- SendTestMessage("Message 2");
-
- _channel.PurgeQueue(_queueName, true);
- }
-
-
- /// <summary>
- /// Callback method to handle any exceptions raised by the test connection.</summary> ///
- /// <param name="e">The connection exception.</param>
- public void OnException(Exception e)
- {
- // Preserve the most recent exception in case test cases need to examine it.
- _lastException = e;
-
- // Notify any waiting threads that an exception event has occurred.
- _evt.Set();
- }
-
- /// <summary>
- /// Sends the specified message to the test publisher, and confirms that it was received by the test consumer or not
- /// depending on whether or not the message should be received by the consumer.
- ///
- /// Any exceptions raised by the connection will cause an Assert failure exception to be raised.
- /// </summary>
- ///
- /// <param name="msgSend">The message to send.</param>
- private void SendTestMessage(string msg)
- {
- // create the IMessage object
- IMessage msgSend = _channel.CreateTextMessage(msg);
-
- // send the message
- _publisher.Send(msgSend);
- _logger.InfoFormat("The messages \"{0}\" was sent", msg);
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs b/qpid/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs
deleted file mode 100644
index dbb3f70aec..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/testcases/CommitRollbackTest.cs
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client;
-
-namespace Apache.Qpid.Integration.Tests.testcases
-{
- /// <summary>
- /// CommitRollbackTest
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Check that an uncommitted send cannot be received.
- /// <tr><td> Check that a committed send can be received.
- /// <tr><td> Check that a rolled back send cannot be received.
- /// <tr><td> Check that an uncommitted receive can be re-received.
- /// <tr><td> Check that a committed receive cannot be re-received.
- /// <tr><td> Check that a rolled back receive can be re-received.
- /// </table>
- /// </summary>
- [TestFixture, Category("Integration")]
- public class CommitRollbackTest : BaseMessagingTestFixture
- {
- /// <summary>Used for debugging purposes.</summary>
- private static ILog log = LogManager.GetLogger(typeof(CommitRollbackTest));
-
- /// <summary>Defines the name of the test topic to use with the tests.</summary>
- public const string TEST_ROUTING_KEY = "commitrollbacktestkey";
-
- /// <summary>Used to count test messages received so far.</summary>
- private int messageReceivedCount;
-
- /// <summary>Used to hold the expected number of messages to receive.</summary>
- private int expectedMessageCount;
-
- /// <summary>Monitor used to signal succesfull receipt of all test messages.</summary>
- AutoResetEvent finishedEvent;
-
- /// <summary>Flag used to indicate that all messages really were received, and that the test did not just time out. </summary>
- private bool allReceived;
-
- [SetUp]
- public override void Init()
- {
- base.Init();
-
- // Create one producer and one consumer, p2p, tx, consumer with queue bound to producers routing key.
- SetUpEndPoint(0, true, false, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.DIRECT,
- true, false, null);
- SetUpEndPoint(1, true, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.DIRECT,
- true, false, null);
-
- // Clear counts
- messageReceivedCount = 0;
- expectedMessageCount = 0;
- finishedEvent = new AutoResetEvent(false);
- allReceived = false;
- }
-
- [TearDown]
- public override void Shutdown()
- {
- try
- {
- // Clean up after the test.
- CloseEndPoint(0);
- CloseEndPoint(1);
- }
- finally
- {
- base.Shutdown();
- }
- }
-
- /// <summary> Check that an uncommitted send cannot be received. </summary>
- [Test]
- public void TestUncommittedSendNotReceived()
- {
- // Send messages.
- testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
-
- // Try to receive messages.
- ConsumeNMessagesOnly(0, "A", testConsumer[1]);
- testChannel[1].Commit();
- }
-
- /// <summary> Check that a committed send can be received. </summary>
- [Test]
- public void TestCommittedSendReceived()
- {
- // Send messages.
- testProducer[0].Send(testChannel[0].CreateTextMessage("B"));
- testChannel[0].Commit();
-
- // Try to receive messages.
- ConsumeNMessagesOnly(1, "B", testConsumer[1]);
- testChannel[1].Commit();
- }
-
- /// <summary> Check that a rolled back send cannot be received. </summary>
- [Test]
- public void TestRolledBackSendNotReceived()
- {
- // Send messages.
- testProducer[0].Send(testChannel[0].CreateTextMessage("B"));
- testChannel[0].Rollback();
-
- // Try to receive messages.
- ConsumeNMessagesOnly(0, "B", testConsumer[1]);
- testChannel[1].Commit();
- }
-
- /// <summary> Check that an uncommitted receive can be re-received. </summary>
- [Test]
- public void TestUncommittedReceiveCanBeRereceived()
- {
- // Create a third end-point as an alternative delivery route for the message.
- SetUpEndPoint(2, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.DIRECT,
- true, false, null);
-
- // Send messages.
- testProducer[0].Send(testChannel[0].CreateTextMessage("C"));
- testChannel[0].Commit();
-
- // Try to receive messages.
- ConsumeNMessagesOnly(1, "C", testConsumer[1]);
-
- // Close end-point 1 without committing the message, then re-open to consume again.
- CloseEndPoint(1);
-
- // Check that the message was released from the rolled back end-point an can be received on the alternative one instead.
- ConsumeNMessagesOnly(1, "C", testConsumer[2]);
-
- CloseEndPoint(2);
- }
-
- /// <summary> Check that a committed receive cannot be re-received. </summary>
- [Test]
- public void TestCommittedReceiveNotRereceived()
- {
- // Send messages.
- testProducer[0].Send(testChannel[0].CreateTextMessage("D"));
- testChannel[0].Commit();
-
- // Try to receive messages.
- ConsumeNMessagesOnly(1, "D", testConsumer[1]);
- testChannel[1].Commit();
-
- // Try to receive messages.
- ConsumeNMessagesOnly(0, "D", testConsumer[1]);
- }
-
- /// <summary> Check that a rolled back receive can be re-received. </summary>
- [Test]
- public void TestRolledBackReceiveCanBeRereceived()
- {
- // Send messages.
- testProducer[0].Send(testChannel[0].CreateTextMessage("E"));
- testChannel[0].Commit();
-
- // Try to receive messages.
- ConsumeNMessagesOnly(1, "E", testConsumer[1]);
-
- testChannel[1].Rollback();
-
- // Try to receive messages.
- ConsumeNMessagesOnly(1, "E", testConsumer[1]);
-
- }
-
- [Test]
- public void TestReceiveAndSendRollback()
- {
- // Send messages
- testProducer[0].Send(testChannel[0].CreateTextMessage("F"));
- testChannel[0].Commit();
-
- // Try to receive messages.
- ConsumeNMessagesOnly(1, "F", testConsumer[1]);
- testProducer[1].Send(testChannel[1].CreateTextMessage("G"));
- testChannel[1].Rollback();
-
- // Try to receive messages.
- ConsumeNMessagesOnly(1, "F", testConsumer[1]);
-
- }
-
- [Test]
- public void TestReceivePrePublished()
- {
- // Send messages
- for (int i = 0; i < 10; ++i)
- {
- testProducer[0].Send(testChannel[0].CreateTextMessage("G"+i));
- testChannel[0].Commit();
- }
-
- for (int i = 0; i < 10; ++i)
- {
- ConsumeNMessages(1, "G"+i, testConsumer[1]);
- }
- testChannel[1].Commit();
- }
-
- [Test]
- public void TestReceivePrePublishedOnMessageHandler()
- {
- testConsumer[1].OnMessage += new MessageReceivedDelegate(OnMessage);
- // Send messages
- for (int i = 0; i < 10; ++i)
- {
- testProducer[0].Send(testChannel[0].CreateTextMessage("G"+i));
- testChannel[0].Commit();
- }
- expectedMessageCount = 10;
-
- finishedEvent.WaitOne(new TimeSpan(0, 0, 0, 30), false);
-
- // Check that all messages really were received.
- Assert.IsTrue(allReceived, "All messages were not received, only got: " + messageReceivedCount + " but wanted " + expectedMessageCount);
-
- testChannel[1].Commit();
- }
-
- /// <summary> Atomically increments the message count on every message, and signals once all messages in the test are received. </summary>
- public void OnMessage(IMessage m)
- {
- int newCount = Interlocked.Increment(ref messageReceivedCount);
-
- if (newCount >= expectedMessageCount)
- {
- allReceived = true;
- finishedEvent.Set();
- }
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/testcases/ConnectionTest.cs b/qpid/dotnet/Qpid.Integration.Tests/testcases/ConnectionTest.cs
deleted file mode 100644
index d7b4a4ddd2..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/testcases/ConnectionTest.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using NUnit.Framework;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Integration.Tests.testcases
-{
- [TestFixture, Category("Integration")]
- public class ConnectionTest
- {
- private AmqBrokerInfo _broker =
- new AmqBrokerInfo("amqp", "localhost", 5672, false);
-
- [Test]
- public void SimpleConnection()
- {
- IConnectionInfo connectionInfo = new QpidConnectionInfo();
- connectionInfo.VirtualHost = "test";
- connectionInfo.AddBrokerInfo(_broker);
- using (IConnection connection = new AMQConnection(connectionInfo))
- {
- Console.WriteLine("connection = " + connection);
- }
- }
-
- [Test]
- [ExpectedException(typeof(AMQAuthenticationException))]
- public void PasswordFailureConnection()
- {
- IConnectionInfo connectionInfo = new QpidConnectionInfo();
- connectionInfo.VirtualHost = "test";
- connectionInfo.Password = "rubbish";
- connectionInfo.AddBrokerInfo(_broker);
-
- using (IConnection connection = new AMQConnection(connectionInfo))
- {
- Console.WriteLine("connection = " + connection);
- // wrong
- Assert.Fail("Authentication succeeded but should've failed");
- }
- }
-
- [Test]
- [ExpectedException(typeof(AMQConnectionException))]
- public void ConnectionFailure()
- {
- string url = "amqp://guest:guest@clientid/testpath?brokerlist='tcp://localhost:5673?retries='0''";
- new AMQConnection(QpidConnectionInfo.FromUrl(url));
- Assert.Fail("Connection should not be established");
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs b/qpid/dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs
deleted file mode 100644
index b7973ae3f5..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/testcases/DurableSubscriptionTest.cs
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Client.Qms;
-
-namespace Apache.Qpid.Integration.Tests.testcases
-{
- /// <summary>
- /// DurableSubscriptionTest checks that durable subscriptions work, by sending messages that can be picked up by
- /// a subscription that is currently off-line, and checking that the subscriber gets all of its messages when it
- /// does come on-line.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td>
- /// </table>
- /// </summary>
- [TestFixture, Category("Integration")]
- public class DurableSubscriptionTest : BaseMessagingTestFixture
- {
- /// <summary>Used for debugging purposes.</summary>
- private static ILog log = LogManager.GetLogger(typeof(DurableSubscriptionTest));
-
- /// <summary>Defines the name of the test topic to use with the tests.</summary>
- public const string TEST_ROUTING_KEY = "durablesubtestkey";
-
- [SetUp]
- public override void Init()
- {
- base.Init();
- }
-
- [TearDown]
- public override void Shutdown()
- {
- base.Shutdown();
- }
-
- [Test]
- public void TestDurableSubscriptionNoAck()
- {
- TestDurableSubscription(AcknowledgeMode.NoAcknowledge);
- }
-
- [Test]
- public void TestDurableSubscriptionAutoAck()
- {
- TestDurableSubscription(AcknowledgeMode.AutoAcknowledge);
- }
-
- private void TestDurableSubscription(AcknowledgeMode ackMode)
- {
- // Create a topic with one producer and two consumers.
- SetUpEndPoint(0, true, false, TEST_ROUTING_KEY + testId, ackMode, false, ExchangeNameDefaults.TOPIC, true, false, null);
- SetUpEndPoint(1, false, true, TEST_ROUTING_KEY + testId, ackMode, false, ExchangeNameDefaults.TOPIC, true, false, null);
- SetUpEndPoint(2, false, true, TEST_ROUTING_KEY + testId, ackMode, false, ExchangeNameDefaults.TOPIC, true,
- true, "TestSubscription" + testId);
-
- Thread.Sleep(500);
-
- // Send messages and receive on both consumers.
- testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
-
- ConsumeNMessagesOnly(1, "A", testConsumer[1]);
- ConsumeNMessagesOnly(1, "A", testConsumer[2]);
-
- // Detach one consumer.
- CloseEndPoint(2);
-
- // Send message and receive on one consumer.
- testProducer[0].Send(testChannel[0].CreateTextMessage("B"));
-
- ConsumeNMessagesOnly(1, "B", testConsumer[1]);
-
- // Re-attach consumer, check that it gets the messages that it missed.
- SetUpEndPoint(2, false, true, TEST_ROUTING_KEY + testId, ackMode, false, ExchangeNameDefaults.TOPIC, true,
- true, "TestSubscription" + testId);
-
- ConsumeNMessagesOnly(1, "B", testConsumer[2]);
-
- // Clean up any open consumers at the end of the test.
- CloseEndPoint(2);
- CloseEndPoint(1);
- CloseEndPoint(0);
- }
-
- /// <summary> Check that an uncommitted receive can be re-received, on re-consume from the same durable subscription. </summary>
- [Test]
- public void TestUncommittedReceiveCanBeRereceivedNewConnection()
- {
- SetUpEndPoint(0, true, false, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.TOPIC,
- true, false, null);
- SetUpEndPoint(1, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.TOPIC,
- true, true, "foo"+testId);
-
- // Send messages.
- testProducer[0].Send(testChannel[0].CreateTextMessage("C"));
- testChannel[0].Commit();
-
- // Try to receive messages, but don't commit them.
- ConsumeNMessagesOnly(1, "C", testConsumer[1]);
-
- // Close end-point 1 without committing the message, then re-open the subscription to consume again.
- CloseEndPoint(1);
- SetUpEndPoint(1, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.TOPIC,
- true, true, "foo"+testId);
-
- // Check that the message was released from the rolled back end-point an can be received on the alternative one instead.
- ConsumeNMessagesOnly(1, "C", testConsumer[1]);
- testChannel[1].Commit();
- CloseEndPoint(1);
- CloseEndPoint(0);
- }
-
- /// <summary> Check that a rolled back receive can be re-received, on re-consume from the same durable subscription. </summary>
- [Test]
- public void TestRolledBackReceiveCanBeRereceivedNewConnection()
- {
- SetUpEndPoint(0, true, false, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.TOPIC,
- true, false, null);
- SetUpEndPoint(1, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.TOPIC,
- true, true, "foo"+testId);
-
- // Send messages.
- testProducer[0].Send(testChannel[0].CreateTextMessage("D"));
- testChannel[0].Commit();
-
- // Try to receive messages, but roll them back.
- ConsumeNMessagesOnly(1, "D", testConsumer[1]);
- testChannel[1].Rollback();
-
- // Close end-point 1 without committing the message, then re-open the subscription to consume again.
- CloseEndPoint(1);
- SetUpEndPoint(1, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, true, ExchangeNameDefaults.TOPIC,
- true, true, "foo"+testId);
-
- // Check that the message was released from the rolled back end-point an can be received on the alternative one instead.
- ConsumeNMessagesOnly(1, "D", testConsumer[1]);
- testChannel[1].Commit();
- CloseEndPoint(1);
- CloseEndPoint(0);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/testcases/HeadersExchangeTest.cs b/qpid/dotnet/Qpid.Integration.Tests/testcases/HeadersExchangeTest.cs
deleted file mode 100644
index 2094aa3b1b..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/testcases/HeadersExchangeTest.cs
+++ /dev/null
@@ -1,282 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Framing;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client;
-
-namespace Apache.Qpid.Integration.Tests.testcases
-{
- /// <summary>
- /// Sets up a producer/consumer pair to send test messages through a header exchange. The header exchange matching pattern is tested to
- /// verify that it correctly matches or filters out messages based on their headers.
- ///
- /// Check that a message matching all fields of a headers exchange is passed by the exchange.
- /// Check that a message containing values for empty fields of a headers exchange is passed by the exchange.
- /// Check that a message matching only some fields of a headers exhcnage is not passed by the exchange.
- /// Check that a message with additional fields to the correct matching fields of a headers exchange is passed by the exchange.
- /// </summary>
- ///
- /// <todo>Remove the HeadersMatchingProducer class and rename this to HeaderExchangeTest. The producer and consumer are implemented
- /// in a single test class to make running this as part of an automated test suite possible.</todo>
- ///
- /// <todo>Consider not using a delegate to callback the OnMessage method. Easier to just call receive on the consumer but using the
- /// callback does demonstrate how to do so.</todo>
- [TestFixture, Category("Integration")]
- public class HeadersExchangeTest : BaseMessagingTestFixture
- {
- private static ILog _logger = LogManager.GetLogger(typeof(HeadersExchangeTest));
-
- /// <summary> Holds the default test timeout for broker communications before tests give up. </summary>
- private static readonly int TIMEOUT = 2000;
-
- /// <summary> Holds the name of the headers exchange to create to send test messages on. </summary>
- private string _exchangeName = "ServiceQ1";
-
- /// <summary> Used to preserve the most recent exception in case test cases need to examine it. </summary>
- private Exception _lastException = null;
-
- /// <summary> Used to preserve the most recent message from the test consumer. </summary>
- private IMessage _lastMessage = null;
-
- /// <summary> The test consumer to get messages from the broker with. </summary>
- private IMessageConsumer _consumer;
-
- private IMessagePublisher _publisher;
-
- private AutoResetEvent _evt = new AutoResetEvent(false);
-
- private MessageReceivedDelegate _msgRecDelegate;
- private ExceptionListenerDelegate _exceptionDelegate;
-
- /// <summary> Holds the test connection. </summary>
- protected IConnection _connection;
-
- /// <summary> Holds the test channel. </summary>
- protected IChannel _channel;
-
- [SetUp]
- public override void Init()
- {
- // Ensure that the base init method is called. It establishes a connection with the broker.
- base.Init();
-
- connectionInfo = QpidConnectionInfo.FromUrl(connectionUri);
- _connection = new AMQConnection(connectionInfo);
- _channel = _connection.CreateChannel(false, AcknowledgeMode.AutoAcknowledge, 500, 300);
-
- _logger.Info("Starting...");
- _logger.Info("Exchange name is '" + _exchangeName + "'...");
-
- // Register this to listen for exceptions on the test connection.
- _exceptionDelegate = new ExceptionListenerDelegate(OnException);
- _connection.ExceptionListener += _exceptionDelegate;
-
- // Declare a new headers exchange with the name of the test service.
- _channel.DeclareExchange(_exchangeName, ExchangeClassConstants.HEADERS);
-
- // Create a non-durable, temporary (aka auto-delete), exclusive queue.
- string queueName = _channel.GenerateUniqueName();
- _channel.DeclareQueue(queueName, false, true, true);
-
- // Bind the queue to the new headers exchange, setting up some header patterns for the exchange to match.
- _channel.Bind(queueName, _exchangeName, null, CreatePatternAsFieldTable());
-
- // Create a test consumer to consume messages from the test exchange.
- _consumer = _channel.CreateConsumerBuilder(queueName)
- .WithPrefetchLow(100)
- .WithPrefetchHigh(500)
- .WithNoLocal(false) // make sure we get our own messages
- .Create();
-
- // Register this to listen for messages on the consumer.
- _msgRecDelegate = new MessageReceivedDelegate(OnMessage);
- _consumer.OnMessage += _msgRecDelegate;
-
- // Clear the most recent message and exception.
- _lastException = null;
- _lastMessage = null;
-
- _publisher = _channel.CreatePublisherBuilder()
- .WithExchangeName(_exchangeName)
- .WithMandatory(true)
- .Create();
-
- _publisher.DeliveryMode = DeliveryMode.NonPersistent;
-
- // Start all channel
- _connection.Start();
- }
-
- /// <summary>
- /// Deregisters the on message delegate before closing the connection.
- /// </summary>
- [TearDown]
- public override void Shutdown()
- {
- _logger.Info("public void Shutdown(): called");
-
- //_consumer.OnMessage -= _msgRecDelegate;
- //_connection.ExceptionListener -= _exceptionDelegate;
-
- _connection.Stop();
- _connection.Close();
- _connection.Dispose();
-
- base.Shutdown();
- }
-
- /// <summary>
- /// Callback method that is passed any messages received on the test channel.
- /// </summary>
- ///
- /// <param name="message">The received message.</param>
- public void OnMessage(IMessage message)
- {
- _logger.Debug(string.Format("message.Type = {0}", message.GetType()));
- _logger.Debug("Got message '" + message + "'");
-
- // Preserve the most recent exception so that test cases can examine it.
- _lastMessage = message;
-
- // Notify any waiting threads that a message has been received.
- _evt.Set();
- }
-
- /// <summary>Callback method to handle any exceptions raised by the test connection.</summary>
- ///
- /// <param name="e">The connection exception.</param>
- public void OnException(Exception e)
- {
- // Preserve the most recent exception in case test cases need to examine it.
- _lastException = e;
-
- // Notify any waiting threads that an exception event has occurred.
- _evt.Set();
- }
-
- /// <summary>Check that a message matching all fields of a headers exchange is passed by the exchange.</summary>
- [Test]
- public void TestMatchAll()
- {
- IMessage msg = _channel.CreateTextMessage("matches match2=''");
- msg.Headers["match1"] = "foo";
- msg.Headers["match2"] = "";
-
- // Use the SendTestMessage helper method to verify that the message was sent and received.
- SendTestMessage(msg, true);
- }
-
- /// <summary>Check that a message containing values for empty fields of a headers exchange is passed by the exchange.</summary>
- [Test]
- public void TestMatchEmptyMatchesAnything()
- {
- // Send a test message that matches the headers exchange.
- IMessage msg = _channel.CreateTextMessage("matches match1='foo' and match2='bar'");
- msg.Headers["match1"] = "foo";
- msg.Headers["match2"] = "bar";
-
- // Use the SendTestMessage helper method to verify that the message was sent and received.
- SendTestMessage(msg, true);
- }
-
- /// <summary>Check that a message matching only some fields of a headers exchange is not passed by the exchange.</summary>
- [Test]
- public void TestMatchOneFails()
- {
- IMessage msg = _channel.CreateTextMessage("not match - only match1");
- msg.Headers["match1"] = "foo";
-
- // Use the SendTestMessage helper method to verify that the message was sent and not received.
- SendTestMessage(msg, false);
- }
-
- /// <summary>
- /// Check that a message with additional fields to the correct matching fields of a headers exchange is passed by
- /// the exchange.
- /// </summary>
- [Test]
- public void TestMatchExtraFields()
- {
- IMessage msg = _channel.CreateTextMessage("matches - extra headers");
- msg.Headers["match1"] = "foo";
- msg.Headers["match2"] = "bar";
- msg.Headers["match3"] = "not required";
-
- // Use the SendTestMessage helper method to verify that the message was sent and received.
- SendTestMessage(msg, true);
- }
-
- /// <summary>
- /// Sends the specified message to the test publisher, and confirms that it was received by the test consumer or not
- /// depending on whether or not the message should be received by the consumer.
- ///
- /// Any exceptions raised by the connection will cause an Assert failure exception to be raised.
- /// </summary>
- ///
- /// <param name="msgSend">The message to send.</param>
- /// <param name="shouldPass">A flag to indicate whether or not the message should be received by the consumer.</param>
- private void SendTestMessage(IMessage msgSend, bool shouldPass)
- {
- _publisher.Send(msgSend);
- _evt.WaitOne(TIMEOUT, true);
-
- // Check that an exception other than not routable was raised in which case re-raise it as a test error.
- if (_lastException != null && !(_lastException.InnerException is AMQUndeliveredException))
- {
- Assert.Fail("Exception {0} was raised by the broker connection.", _lastException);
- }
- // Check that a message was returned if the test is expecting the message to pass.
- else if (shouldPass)
- {
- Assert.IsNotNull(_lastMessage, "Did not get a matching message from the headers exchange.");
- }
- // Check that a not routable exception was raised if the test is expecting the message to fail.
- else if (_lastException != null && _lastException.InnerException is AMQUndeliveredException)
- {
- Assert.IsNull(_lastMessage, "Message could not be routed so consumer should not have received it.");
- }
- // The broker did not respond within the test timeout so fail the test.
- else
- {
- Assert.Fail("The test timed out without a response from the broker.");
- }
- }
-
- /// <summary> Returns a field table containing patterns to match the test header exchange against. </summary>
- ///
- /// <returns> A field table containing test patterns. </returns>
- private FieldTable CreatePatternAsFieldTable()
- {
- FieldTable matchTable = new FieldTable();
-
- matchTable["match1"] = "foo";
- matchTable["match2"] = "";
- matchTable["x-match"] = "all";
-
- return matchTable;
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/testcases/MandatoryMessageTest.cs b/qpid/dotnet/Qpid.Integration.Tests/testcases/MandatoryMessageTest.cs
deleted file mode 100644
index 4abc56905f..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/testcases/MandatoryMessageTest.cs
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client;
-
-namespace Apache.Qpid.Integration.Tests.testcases
-{
- /// <summary>
- /// MandatoryMessageTest checks that messages sent with the 'mandatory' flag, must either be routed to a valid
- /// queue or returned to the sender when no route is available.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Check default exchange returns unroutable mandatory messages.
- /// <tr><td> Check direct exchange returns unroutable mandatory messages.
- /// <tr><td> Check headers exchange returns unroutable mandatory messages.
- /// <tr><td> Check topic exchange returns unroutable mandatory messages.
- /// </table>
- /// </summary>
- [TestFixture, Category("Integration")]
- public class MandatoryMessageTest : BaseMessagingTestFixture
- {
- /// <summary>Used for debugging purposes.</summary>
- private static ILog log = LogManager.GetLogger(typeof(MandatoryMessageTest));
-
- /// <summary>Defines the maximum time in milliseconds, to wait for redelivery to occurr.</summary>
- public const int TIMEOUT = 1000;
-
- /// <summary>Defines the name of the routing key to use with the tests.</summary>
- public const string TEST_ROUTING_KEY = "unboundkey";
-
- /// <summary>Condition used to coordinate receipt of redelivery exception to the sending thread.</summary>
- private ManualResetEvent errorEvent;
-
- /// <summary>Holds the last received error condition, for examination by the tests sending thread.</summary>
- private Exception lastErrorException;
-
- /// <summary> Holds the test connection. </summary>
- protected IConnection _connection;
-
- /// <summary> Holds the test channel. </summary>
- protected IChannel _channel;
-
- [SetUp]
- public override void Init()
- {
- base.Init();
-
- errorEvent = new ManualResetEvent(false);
- lastErrorException = null;
- }
-
- [TearDown]
- public override void Shutdown()
- {
- base.Shutdown();
- }
-
- /// <summary>
- /// Handles all exception conditions on the connection. The error event is notified and the exception recorded as the last seen.
- /// </summary>
- ///
- /// <param name="e">The asynchronous exception on the connection.</param>
- public void OnException(Exception e)
- {
- lastErrorException = e;
- errorEvent.Set();
- }
-
- [Test]
- public void SendUndeliverableMessageOnDirectExchange()
- {
- SendOne(ExchangeNameDefaults.DIRECT);
- }
-
- [Test]
- public void SendUndeliverableMessageOnTopicExchange()
- {
- SendOne(ExchangeNameDefaults.TOPIC);
- }
-
- [Test]
- public void SendUndeliverableMessageOnHeadersExchange()
- {
- SendOne(ExchangeNameDefaults.HEADERS);
- }
-
- /// <summary>
- /// Sends a single message to the specified exchange with the routing key 'unboundkey', marked as mandatory.
- /// A check is performed to assert that a redelivery error is returned from the broker for the message.
- /// </summary>
- ///
- /// <param name="exchangeName">The name of the exchange to send to.</param>
- private void SendOne(string exchangeName)
- {
- log.Debug("private void SendOne(string exchangeName = " + exchangeName + "): called");
-
- // Send a test message to a unbound key on the specified exchange.
- SetUpEndPoint(0, false, false, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, false, exchangeName,
- true, false, null);
- testProducer[0] = testChannel[0].CreatePublisherBuilder()
- .WithRoutingKey(TEST_ROUTING_KEY + testId)
- .WithMandatory(true)
- .WithExchangeName(exchangeName)
- .Create();
-
- // Set up the exception listener on the connection.
- testConnection[0].ExceptionListener = new ExceptionListenerDelegate(OnException);
-
- // Send message that should fail.
- testProducer[0].Send(testChannel[0].CreateTextMessage("Test Message"));
-
- // Wait for up to the timeout for a redelivery exception to be returned.
- errorEvent.WaitOne(TIMEOUT, true);
-
- // Asserts that a redelivery exception was returned, and is of the correct type.
- Type expectedException = typeof(AMQUndeliveredException);
- Exception ex = lastErrorException;
-
- Assert.IsNotNull(ex, "No exception was thrown by the test. Expected " + expectedException);
- Assert.IsInstanceOfType(expectedException, ex.InnerException);
-
- CloseEndPoint(0);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/testcases/ProducerMultiConsumerTest.cs b/qpid/dotnet/Qpid.Integration.Tests/testcases/ProducerMultiConsumerTest.cs
deleted file mode 100644
index bae6c76818..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/testcases/ProducerMultiConsumerTest.cs
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Text;
-using System.Threading;
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client;
-
-namespace Apache.Qpid.Integration.Tests.testcases
-{
- /// ProducerMultiConsumerTest provides some tests for one producer and multiple consumers.
- ///
- /// <p><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Check that all consumers on a topic each receive all message on it.
- /// <tr><td> Check that consumers on the same queue receive each message once accross all consumers.
- /// </table>
- /// </summary>
- [TestFixture, Category("Integration")]
- public class ProducerMultiConsumerTest : BaseMessagingTestFixture
- {
- private static readonly ILog _logger = LogManager.GetLogger(typeof(ProducerMultiConsumerTest));
-
- /// <summary>Base name for the routing key used for this test (made unique by adding in test id).</summary>
- private const string TEST_ROUTING_KEY = "ProducerMultiConsumerTest";
-
- /// <summary>The number of consumers to test.</summary>
- private const int CONSUMER_COUNT = 5;
-
- /// <summary>The number of test messages to send.</summary>
- private const int MESSAGE_COUNT = 10;
-
- /// <summary>Monitor used to signal succesfull receipt of all test messages.</summary>
- AutoResetEvent _finishedEvent;
-
- /// <summary>Used to count test messages received so far.</summary>
- private int _messageReceivedCount;
-
- /// <summary>Used to hold the expected number of messages to receive.</summary>
- private int expectedMessageCount;
-
- /// <summary>Flag used to indicate that all messages really were received, and that the test did not just time out. </summary>
- private bool allReceived;
-
- /// <summary> Creates one producing end-point and many consuming end-points connected on a topic. </summary>
- [SetUp]
- public override void Init()
- {
- base.Init();
-
- // Reset all test counts and flags.
- _messageReceivedCount = 0;
- allReceived = false;
- _finishedEvent = new AutoResetEvent(false);
- }
-
- /// <summary> Cleans up all test end-points. </summary>
- [TearDown]
- public override void Shutdown()
- {
- try
- {
- // Close all end points for producer and consumers.
- // Producer is on 0, and consumers on 1 .. n, so loop is from 0 to n inclusive.
- for (int i = 0; i <= CONSUMER_COUNT; i++)
- {
- CloseEndPoint(i);
- }
- }
- finally
- {
- base.Shutdown();
- }
- }
-
- /// <summary> Check that all consumers on a topic each receive all message on it. </summary>
- [Test]
- public void AllConsumerReceiveAllMessagesOnTopic()
- {
- // Create end-points for all the consumers in the test.
- for (int i = 1; i <= CONSUMER_COUNT; i++)
- {
- SetUpEndPoint(i, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, false, ExchangeNameDefaults.TOPIC,
- true, false, null);
- testConsumer[i].OnMessage += new MessageReceivedDelegate(OnMessage);
- }
-
- // Create an end-point to publish to the test topic.
- SetUpEndPoint(0, true, false, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, false, ExchangeNameDefaults.TOPIC,
- true, false, null);
-
- expectedMessageCount = (MESSAGE_COUNT * CONSUMER_COUNT);
-
- for (int i = 0; i < MESSAGE_COUNT; i++)
- {
- testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
- }
-
- _finishedEvent.WaitOne(new TimeSpan(0, 0, 0, 30), false);
-
- // Check that all messages really were received.
- Assert.IsTrue(allReceived, "All messages were not received, only got " + _messageReceivedCount + " but wanted " + expectedMessageCount);
- }
-
- /// <summary> Check that consumers on the same queue receive each message once accross all consumers. </summary>
- [Test]
- public void AllConsumerReceiveAllMessagesOnDirect()
- {
- // Create end-points for all the consumers in the test.
- for (int i = 1; i <= CONSUMER_COUNT; i++)
- {
- SetUpEndPoint(i, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, false, ExchangeNameDefaults.DIRECT,
- true, false, null);
- testConsumer[i].OnMessage += new MessageReceivedDelegate(OnMessage);
- }
-
- // Create an end-point to publish to the test topic.
- SetUpEndPoint(0, true, false, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, false, ExchangeNameDefaults.DIRECT,
- true, false, null);
-
- expectedMessageCount = (MESSAGE_COUNT * CONSUMER_COUNT);
-
- for (int i = 0; i < MESSAGE_COUNT; i++)
- {
- testProducer[0].Send(testChannel[0].CreateTextMessage("A"));
- }
-
- _finishedEvent.WaitOne(new TimeSpan(0, 0, 0, 30), false);
-
- // Check that all messages really were received.
- Assert.IsTrue(allReceived, "All messages were not received, only got: " + _messageReceivedCount + " but wanted " + expectedMessageCount);
- }
-
- /// <summary> Atomically increments the message count on every message, and signals once all messages in the test are received. </summary>
- public void OnMessage(IMessage m)
- {
- int newCount = Interlocked.Increment(ref _messageReceivedCount);
-
- if (newCount >= expectedMessageCount)
- {
- allReceived = true;
- _finishedEvent.Set();
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/testcases/Qpid.Integration.Tests.csproj b/qpid/dotnet/Qpid.Integration.Tests/testcases/Qpid.Integration.Tests.csproj
deleted file mode 100755
index 01ca2cc5bd..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/testcases/Qpid.Integration.Tests.csproj
+++ /dev/null
@@ -1,64 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectGuid>{EFEB9E41-B66E-4674-85F7-18FAD056AD67}</ProjectGuid>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <OutputType>Exe</OutputType>
- <RootNamespace>Qpid.Integration.Tests</RootNamespace>
- <AssemblyName>Qpid.Integration.Tests</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
- <OutputPath>bin\Debug\</OutputPath>
- <DebugSymbols>True</DebugSymbols>
- <DebugType>Full</DebugType>
- <Optimize>False</Optimize>
- <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
- <OutputPath>bin\Release\</OutputPath>
- <DebugSymbols>False</DebugSymbols>
- <DebugType>None</DebugType>
- <Optimize>True</Optimize>
- <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
- <DefineConstants>TRACE</DefineConstants>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="BaseMessagingTestFixture.cs" />
- <Compile Include="ChannelQueueTest.cs" />
- <Compile Include="CommitRollbackTest.cs" />
- <Compile Include="ConnectionTest.cs" />
- <Compile Include="DurableSubscriptionTest.cs" />
- <Compile Include="HeadersExchangeTest.cs" />
- <Compile Include="MandatoryMessageTest.cs" />
- <Compile Include="ProducerMultiConsumerTest.cs" />
- <Compile Include="SslConnectionTest.cs" />
- <Compile Include="QueueBrowsingTest.cs" />
- </ItemGroup>
-</Project>
diff --git a/qpid/dotnet/Qpid.Integration.Tests/testcases/QueueBrowsingTest.cs b/qpid/dotnet/Qpid.Integration.Tests/testcases/QueueBrowsingTest.cs
deleted file mode 100644
index 536439a44b..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/testcases/QueueBrowsingTest.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Threading;
-using log4net;
-using NUnit.Framework;
-using Apache.Qpid.Messaging;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Framing;
-
-namespace Apache.Qpid.Integration.Tests.testcases
-{
- [TestFixture, Category("Integration")]
- public class QueueBrowsingTest : BaseMessagingTestFixture
- {
- /// <summary>Used for debugging purposes.</summary>
- private static ILog log = LogManager.GetLogger(typeof(QueueBrowsingTest));
-
- public const string TEST_ROUTING_KEY = "queuebrowsingkey";
- public const string TEST_ROUTING_KEY2 = "lvqbrowsingkey";
-
-
- [SetUp]
- public override void Init()
- {
- base.Init();
- }
-
- [TearDown]
- public override void Shutdown()
- {
- base.Shutdown();
- }
-
- [Test]
- public void TestQueueBrowsing()
- {
- // Create a topic with one producer and two consumers.
- SetUpEndPoint(0, true, false, TEST_ROUTING_KEY + testId, AcknowledgeMode.AutoAcknowledge, false, ExchangeNameDefaults.DIRECT, true, true, null, false, false);
- SetUpEndPoint(1, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.NoAcknowledge, false, ExchangeNameDefaults.DIRECT, true, true, TEST_ROUTING_KEY + testId, false, true);
- SetUpEndPoint(2, false, true, TEST_ROUTING_KEY + testId, AcknowledgeMode.NoAcknowledge, false, ExchangeNameDefaults.DIRECT, true, true, TEST_ROUTING_KEY + testId, false, true);
-
- Thread.Sleep(500);
-
- // Send messages and receive on both consumers.
- testProducer[0].Send(testChannel[0].CreateTextMessage("msg"));
- testProducer[0].Send(testChannel[0].CreateTextMessage("msg"));
- testProducer[0].Send(testChannel[0].CreateTextMessage("msg"));
- testProducer[0].Send(testChannel[0].CreateTextMessage("msg"));
- testProducer[0].Send(testChannel[0].CreateTextMessage("msg"));
- testProducer[0].Send(testChannel[0].CreateTextMessage("msg"));
-
- Thread.Sleep(2000);
-
-
- ConsumeNMessagesOnly(6, "msg", testConsumer[1]);
- ConsumeNMessagesOnly(6, "msg", testConsumer[2]);
-
- // Clean up any open consumers at the end of the test.
- CloseEndPoint(2);
- CloseEndPoint(1);
- CloseEndPoint(0);
- }
-
- [Test]
- public void TestQueueBrowsingLVQ()
- {
- // Create a topic with one producer and two consumers.
- SetUpEndPoint(0, true, false, TEST_ROUTING_KEY2 + testId, AcknowledgeMode.AutoAcknowledge, false, ExchangeNameDefaults.DIRECT, true, true, TEST_ROUTING_KEY2 + testId, false, false);
- FieldTable args = new FieldTable();
- args.SetBoolean("qpid.last_value_queue", true);
- args.SetString("qpid.last_value_queue_key", "key");
- testChannel[0].DeclareQueue(TEST_ROUTING_KEY2 + testId, true, false, false, args);
- testChannel[0].Bind(TEST_ROUTING_KEY2 + testId, ExchangeNameDefaults.DIRECT, TEST_ROUTING_KEY2 + testId);
- Thread.Sleep(500);
-
-
- for (int i = 0; i < 12; i++)
- {
- ITextMessage msg = testChannel[0].CreateTextMessage("msg");
- msg.Headers.SetInt("key", i%6);
- testProducer[0].Send(msg);
- }
-
- Thread.Sleep(2000);
-
- SetUpEndPoint(1, false, true, TEST_ROUTING_KEY2 + testId, AcknowledgeMode.NoAcknowledge, false, ExchangeNameDefaults.DIRECT, true, true, TEST_ROUTING_KEY2 + testId, false, true);
- SetUpEndPoint(2, false, true, TEST_ROUTING_KEY2 + testId, AcknowledgeMode.NoAcknowledge, false, ExchangeNameDefaults.DIRECT, true, true, TEST_ROUTING_KEY2 + testId, false, true);
-
- Thread.Sleep(500);
-
-
- ConsumeNMessagesOnly(6, "msg", testConsumer[1]);
- ConsumeNMessagesOnly(6, "msg", testConsumer[2]);
-
- // Clean up any open consumers at the end of the test.
- CloseEndPoint(2);
- CloseEndPoint(1);
- CloseEndPoint(0);
- }
-
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/testcases/SslConnectionTest.cs b/qpid/dotnet/Qpid.Integration.Tests/testcases/SslConnectionTest.cs
deleted file mode 100644
index 5f953e1470..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/testcases/SslConnectionTest.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.IO;
-using System.Reflection;
-using System.Security.Cryptography.X509Certificates;
-using NUnit.Framework;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client;
-using Apache.Qpid.Messaging;
-
-namespace Apache.Qpid.Integration.Tests.testcases
-{
- /// <summary>
- /// Test SSL/TLS connections to the broker
- /// </summary>
- [TestFixture, Category("Integration")]
- public class SslConnectionTest
- {
- /// <summary>
- /// Make a test TLS connection to the broker
- /// without using client-certificates
- /// </summary>
- //[Test]
- public void DoSslConnection()
- {
- // because for tests we don't usually trust the server certificate
- // we need here to tell the client to ignore certificate validation errors
- SslOptions sslConfig = new SslOptions(null, true);
-
- MakeBrokerConnection(sslConfig);
- }
-
- private static void MakeBrokerConnection(SslOptions options)
- {
- IConnectionInfo connectionInfo = new QpidConnectionInfo();
- connectionInfo.VirtualHost = "test";
- connectionInfo.AddBrokerInfo(new AmqBrokerInfo("amqp", "localhost", 8672, options));
-
- using ( IConnection connection = new AMQConnection(connectionInfo) )
- {
- Console.WriteLine("connection = " + connection);
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Integration.Tests/testcases/SustainedTest.cs b/qpid/dotnet/Qpid.Integration.Tests/testcases/SustainedTest.cs
deleted file mode 100644
index 4074055eba..0000000000
--- a/qpid/dotnet/Qpid.Integration.Tests/testcases/SustainedTest.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.IO;
-using System.Reflection;
-using System.Threading;
-using NUnit.Framework;
-using Apache.Qpid.Client.Qms;
-using Apache.Qpid.Client;
-using Apache.Qpid.Messaging;
-using log4net;
-
-namespace Apache.Qpid.Integration.Tests.testcases
-{
- /// <summary>
- /// Runs through the range of ack modes for each test case, sending and recieving a large number of messages
- /// </summary>
- [TestFixture, Category("Integration")]
- public class SustainedTest : BaseMessagingTestFixture
- {
- /// <summary>The number of test messages to send.</summary>
- private const int MESSAGE_COUNT = 50;//00;
-
- /// <summary>Base name for the routing key used for this test (made unique by adding in test id).</summary>
- private const string TEST_ROUTING_KEY = "MessageOrderTest";
-
- /// <summary>
- /// The logger
- /// </summary>
- private static ILog _logger = LogManager.GetLogger(typeof(SustainedTest));
-
- [Test]
- public void MessageOrderTestAutoAck()
- {
- MessageOrderTest(AcknowledgeMode.AutoAcknowledge);
- }
-
- [Test]
- public void MessageOrderTestNoAck()
- {
- MessageOrderTest(AcknowledgeMode.NoAcknowledge);
- }
-
- public void MessageOrderTest(AcknowledgeMode consumerMode)
- {
-
- // Consumer
- SetUpEndPoint(1, false, true, TEST_ROUTING_KEY, consumerMode, false, ExchangeNameDefaults.DIRECT,
- true, false, null);
-
-
- Console.WriteLine("Starting producer thread");
- Thread prodThread = new Thread(new ThreadStart(SendMessages));
- prodThread.Start();
-
- Thread.Sleep(2000);
- Console.WriteLine("Starting consuming");
- for (int i = 0; i < MESSAGE_COUNT; i++)
- {
- if ((i % 10) == 0)
- {
- Console.WriteLine("Consuming message "+i);
- }
- ConsumeNMessages(1, "Msg"+i, testConsumer[1]);
- }
- prodThread.Join();
- CloseEndPoint(0);
- CloseEndPoint(1);
- }
-
- private static void SendMessages()
- {
- AMQConnection conn = new AMQConnection(QpidConnectionInfo.FromUrl(BaseMessagingTestFixture.connectionUri));
- conn.Start();
- IChannel channel = conn.CreateChannel(false, AcknowledgeMode.AutoAcknowledge);
- IMessagePublisher producer = channel.CreatePublisherBuilder().
- WithExchangeName(ExchangeNameDefaults.DIRECT).
- WithRoutingKey(TEST_ROUTING_KEY).
- Create();
-
- for (int i = 0; i < MESSAGE_COUNT ; i++)
- {
- if ((i % 10) == 0)
- {
- Console.WriteLine("Sending message "+i);
- }
- producer.Send(channel.CreateTextMessage("Msg" + i));
- }
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/AcknowledgeMode.cs b/qpid/dotnet/Qpid.Messaging/AcknowledgeMode.cs
deleted file mode 100644
index 4896b64f68..0000000000
--- a/qpid/dotnet/Qpid.Messaging/AcknowledgeMode.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Messaging
-{
- public enum AcknowledgeMode
- {
- AutoAcknowledge,
- ClientAcknowledge,
- DupsOkAcknowledge,
- SessionTransacted,
-
- /// <summary>
- /// Indicates that no client acknowledgements are required. Broker assumes that once it has
- /// delivered a message packet successfully it is acknowledged.
- /// </summary>
- NoAcknowledge,
-
- /// <summary>
- /// Pre acknowledge means that an ack is sent per message but sent before user code has processed
- /// the message (i.e. before the onMessage() call or the receive() method has returned).
- /// </summary>
- PreAcknowledge
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/ChannelLimitReachedException.cs b/qpid/dotnet/Qpid.Messaging/ChannelLimitReachedException.cs
deleted file mode 100644
index 8b43422f5c..0000000000
--- a/qpid/dotnet/Qpid.Messaging/ChannelLimitReachedException.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid.Messaging
-{
- [Serializable]
- public class ChannelLimitReachedException : ResourceAllocationException
- {
- private long _limit;
-
- public ChannelLimitReachedException(long limit)
- : base("Unable to create session since maximum number of sessions per connection is " +
- limit + ". Either close one or more sessions or increase the " +
- "maximum number of sessions per connection (or contact your OpenAMQ administrator.")
- {
- _limit = limit;
- }
-
- protected ChannelLimitReachedException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- _limit = info.GetInt64("Limit");
- }
-
- public long Limit
- {
- get
- {
- return _limit;
- }
- }
-
- public override void GetObjectData(SerializationInfo info, StreamingContext context)
- {
- base.GetObjectData(info, context);
- info.AddValue("Limit", _limit);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/DeliveryMode.cs b/qpid/dotnet/Qpid.Messaging/DeliveryMode.cs
deleted file mode 100644
index 3c4713ee2a..0000000000
--- a/qpid/dotnet/Qpid.Messaging/DeliveryMode.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Messaging
-{
- public enum DeliveryMode
- {
- NonPersistent,
- Persistent
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/ExchangeClassConstants.cs b/qpid/dotnet/Qpid.Messaging/ExchangeClassConstants.cs
deleted file mode 100644
index 984e8b0f17..0000000000
--- a/qpid/dotnet/Qpid.Messaging/ExchangeClassConstants.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Messaging
-{
- public class ExchangeClassConstants
- {
- public readonly static string TOPIC = "topic";
- public readonly static string DIRECT = "direct";
- public readonly static string HEADERS = "headers";
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/ExchangeNameDefaults.cs b/qpid/dotnet/Qpid.Messaging/ExchangeNameDefaults.cs
deleted file mode 100644
index 2689fb5e46..0000000000
--- a/qpid/dotnet/Qpid.Messaging/ExchangeNameDefaults.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Messaging
-{
- public class ExchangeNameDefaults
- {
- public readonly static string TOPIC = "amq.topic";
- public readonly static string DIRECT = "amq.direct";
- public readonly static string HEADERS = "amq.match";
- public readonly static string FANOUT = "amq.fanout";
-
- /// <summary> Defines the identifying type name of topic exchanges. </summary>
- public readonly static string TOPIC_EXCHANGE_CLASS = "topic";
-
- /// <summary> Defines the identifying type name of direct exchanges. </summary>
- public readonly static string DIRECT_EXCHANGE_CLASS = "direct";
-
- /// <summary> Defines the identifying type name of headers exchanges. </summary>
- public readonly static string HEADERS_EXCHANGE_CLASS = "headers";
-
- /// <summary> Defines the identifying type name of fanout exchanges. </summary>
- public readonly static string FANOUT_EXCHANGE_CLASS = "fanout";
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/IBytesMessage.cs b/qpid/dotnet/Qpid.Messaging/IBytesMessage.cs
deleted file mode 100644
index 5be942423d..0000000000
--- a/qpid/dotnet/Qpid.Messaging/IBytesMessage.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Messaging
-{
- public interface IBytesMessage : IMessage
- {
- long BodyLength { get; }
-
- bool ReadBoolean();
- void WriteBoolean(bool value);
-
- byte ReadByte();
- int ReadBytes(byte[] array);
- int ReadBytes(byte[] array, int length);
- void WriteByte(byte value);
- void WriteBytes(byte[] value);
- void WriteBytes(byte[] value, int offset, int length);
-
- char ReadChar();
- void WriteChar(char value);
-
- double ReadDouble();
- void WriteDouble(double value);
-
- float ReadFloat();
- void WriteFloat(float value);
-
- int ReadInt();
- void WriteInt(int value);
-
- long ReadLong();
- void WriteLong(long value);
-
- short ReadShort();
- void WriteShort(short value);
-
- short ReadSignedByte();
- void WriteSignedByte(short value);
-
- string ReadUTF();
- void WriteUTF(string value);
-
- void Reset();
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/IChannel.cs b/qpid/dotnet/Qpid.Messaging/IChannel.cs
deleted file mode 100644
index 1db8b5fbdb..0000000000
--- a/qpid/dotnet/Qpid.Messaging/IChannel.cs
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Messaging
-{
- public delegate void MessageReceivedDelegate(IMessage msg);
-
- /// <summary>
- /// IChannel provides methods to access the commands in AMQP that operate at the channel level. This can be summarized as
- /// the ability to declare queues and exchanges, bind queues to exchanges, create messages of various types, declare transaction
- /// boundaries (commit and rollback), and to set up producers and consumers on the channel.
- ///
- /// <p/>You can create a channel by using the CreateChannel() method
- /// of the connection object.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities
- /// <tr><td> Declare queues.
- /// <tr><td> Declare exchanges.
- /// <tr><td> Bind queues to exchanges.
- /// <tr><td> Create messages.
- /// <tr><td> Set up message consumers on the channel.
- /// <tr><td> Set up message producers on the channel.
- /// <tr><td> Commit the current transaction.
- /// <tr><td> Roll-back the current transaction.
- /// <tr><td> Close the channel.
- /// </table>
- /// </summary>
- public interface IChannel : IDisposable, ICloseable
- {
- /// <summary>
- /// Acknowledge mode for messages received.
- /// </summary>
- AcknowledgeMode AcknowledgeMode { get; }
-
- /// <summary>
- /// True if the channel should use transactions.
- /// </summary>
- bool Transacted { get; }
-
- /// <summary>
- /// Prefetch value to be used as the default for
- /// consumers created on this channel.
- /// </summary>
- int DefaultPrefetch { get; }
-
- /// <summary>
- /// Prefetch low value to be used as the default for
- /// consumers created on this channel.
- /// </summary>
- int DefaultPrefetchLow { get; }
-
- /// <summary>
- /// Prefetch high value to be used as the default for
- /// consumers created on this channel.
- /// </summary>
- int DefaultPrefetchHigh { get; }
-
- /// <summary>
- /// Declare a new exchange.
- /// </summary>
- /// <param name="exchangeName">Name of the exchange</param>
- /// <param name="exchangeClass">Class of the exchange, from <see cref="ExchangeClassConstants"/></param>
- void DeclareExchange(string exchangeName, string exchangeClass);
-
- /// <summary>
- /// Declare a new exchange using the default exchange class.
- /// </summary>
- /// <param name="exchangeName">Name of the exchange</param>
- void DeleteExchange(string exchangeName);
-
- /// <summary>
- /// Declare a new queue with the specified set of arguments.
- /// </summary>
- /// <param name="queueName">Name of the queue</param>
- /// <param name="isDurable">True if the queue should be durable</param>
- /// <param name="isExclusive">True if the queue should be exclusive to this channel</param>
- /// <param name="isAutoDelete">True if the queue should be deleted when the channel closes</param>
- void DeclareQueue(string queueName, bool isDurable, bool isExclusive, bool isAutoDelete);
-
-
- /// <summary>
- /// Declare a new queue with the specified set of arguments.
- /// </summary>
- /// <param name="queueName">Name of the queue</param>
- /// <param name="isDurable">True if the queue should be durable</param>
- /// <param name="isExclusive">True if the queue should be exclusive to this channel</param>
- /// <param name="isAutoDelete">True if the queue should be deleted when the channel closes</param>
- /// <param name="args">Optional arguments to Queue.Declare</param>
- void DeclareQueue(string queueName, bool isDurable, bool isExclusive, bool isAutoDelete, IFieldTable args);
-
- /// <summary>
- /// Delete a queue with the specifies arguments.
- /// </summary>
- /// <param name="queueName">Name of the queue to delete</param>
- /// <param name="ifUnused">If true, the queue will not deleted if it has no consumers</param>
- /// <param name="ifEmpty">If true, the queue will not deleted if it has no messages</param>
- /// <param name="noWait">If true, the server will not respond to the method</param>
- void DeleteQueue(string queueName, bool ifUnused, bool ifEmpty, bool noWait);
-
- /// <summary>
- /// Generate a new Unique name to use for a queue.
- /// </summary>
- /// <returns>A unique name to this channel</returns>
- string GenerateUniqueName();
-
- /// <summary>
- /// Removes all messages from a queue.
- /// </summary>
- /// <param name="queueName">Name of the queue to delete</param>
- /// <param name="noWait">If true, the server will not respond to the method</param>
- void PurgeQueue(string queueName, bool noWait);
-
- /// <summary>
- /// Bind a queue to the specified exchange.
- /// </summary>
- /// <param name="queueName">Name of queue to bind</param>
- /// <param name="exchangeName">Name of exchange to bind to</param>
- /// <param name="routingKey">Routing key</param>
- void Bind(string queueName, string exchangeName, string routingKey);
-
- /// <summary>
- /// Bind a queue to the specified exchange.
- /// </summary>
- /// <param name="queueName">Name of queue to bind</param>
- /// <param name="exchangeName">Name of exchange to bind to</param>
- /// <param name="routingKey">Routing key</param>
- /// <param name="args">Table of arguments for the binding. Used to bind with a Headers Exchange</param>
- void Bind(string queueName, string exchangeName, string routingKey, IFieldTable args);
-
- /// <summary>
- /// Create a new empty message with no body.
- /// </summary>
- /// <returns>The new message</returns>
- IMessage CreateMessage();
-
- /// <summary>
- /// Create a new message of the specified MIME type.
- /// </summary>
- /// <param name="mimeType">The mime type to create</param>
- /// <returns>The new message</returns>
- IMessage CreateMessage(string mimeType);
-
- /// <summary>
- /// Creates a new message for bytes (application/octet-stream).
- /// </summary>
- /// <returns>The new message</returns>
- IBytesMessage CreateBytesMessage();
-
- /// <summary>
- /// Creates a new text message (text/plain) with empty content.
- /// </summary>
- /// <returns>The new message</returns>
- ITextMessage CreateTextMessage();
-
- /// <summary>
- /// Creates a new text message (text/plain) with a body.
- /// </summary>
- /// <param name="initialValue">Initial body of the message</param>
- /// <returns>The new message</returns>
- ITextMessage CreateTextMessage(string initialValue);
-
- #region Consuming
-
- /// <summary>
- /// Creates a new Consumer using the builder pattern.
- /// </summary>
- /// <param name="queueName">Name of queue to receive messages from</param>
- /// <returns>The builder object</returns>
- MessageConsumerBuilder CreateConsumerBuilder(string queueName);
-
- /// <summary>
- /// Creates a new consumer.
- /// </summary>
- /// <param name="queueName">Name of queue to receive messages from</param>
- /// <param name="prefetchLow">Low prefetch value</param>
- /// <param name="prefetchHigh">High prefetch value</param>
- /// <param name="noLocal">If true, messages sent on this channel will not be received by this consumer</param>
- /// <param name="exclusive">If true, the consumer opens the queue in exclusive mode</param>
- /// <returns>The new consumer</returns>
- IMessageConsumer CreateConsumer(string queueName,
- int prefetchLow,
- int prefetchHigh,
- bool noLocal,
- bool exclusive);
-
- /// <summary>
- /// Creates a new consumer.
- /// </summary>
- /// <param name="queueName">Name of queue to receive messages from</param>
- /// <param name="prefetchLow">Low prefetch value</param>
- /// <param name="prefetchHigh">High prefetch value</param>
- /// <param name="noLocal">If true, messages sent on this channel will not be received by this consumer</param>
- /// <param name="exclusive">If true, the consumer opens the queue in exclusive mode</param>
- /// <param name="browse">If true, the consumer only browses and does not consume</param>
- /// <returns>The new consumer</returns>
- IMessageConsumer CreateConsumer(string queueName,
- int prefetchLow,
- int prefetchHigh,
- bool noLocal,
- bool exclusive,
- bool browse);
-
- /// <summary>
- /// Unsubscribe from a queue.
- /// </summary>
- /// <param name="subscriptionName">Subscription name</param>
- void Unsubscribe(string subscriptionName);
-
- #endregion
-
- #region Publishing
-
- /// <summary>
- /// Create a new message publisher using the builder pattern.
- /// </summary>
- /// <returns>The builder object</returns>
- MessagePublisherBuilder CreatePublisherBuilder();
-
- /// <summary>
- /// Create a new message publisher.
- /// </summary>
- /// <param name="exchangeName">Name of exchange to publish to</param>
- /// <param name="routingKey">Routing key</param>
- /// <param name="deliveryMode">Default delivery mode</param>
- /// <param name="timeToLive">Default TTL time of messages</param>
- /// <param name="immediate">If true, sent immediately</param>
- /// <param name="mandatory">If true, the broker will return an error
- /// (as a connection exception) if the message cannot be delivered</param>
- /// <param name="priority">Default message priority</param>
- /// <returns>The new message publisher</returns>
- IMessagePublisher CreatePublisher(string exchangeName,
- string routingKey,
- DeliveryMode deliveryMode,
- long timeToLive,
- bool immediate,
- bool mandatory,
- int priority);
-
- #endregion
-
- #region Transactions
-
- /// <summary>
- /// Recover after transaction failure.
- /// </summary>
- void Recover();
-
- /// <summary>
- /// Commit the transaction.
- /// </summary>
- void Commit();
-
- /// <summary>
- /// Rollback the transaction.
- /// </summary>
- void Rollback();
-
- #endregion
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/ICloseable.cs b/qpid/dotnet/Qpid.Messaging/ICloseable.cs
deleted file mode 100644
index 658a5ed5a4..0000000000
--- a/qpid/dotnet/Qpid.Messaging/ICloseable.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Messaging
-{
- /// <summary>An ICloseable is a resource that can be explicitly closed. Generally speaking a closed resource can no longer be used, and the
- /// act of closing a resource is usually interpreted as a signal that the closed item can have its resource cleaned up and de-allocated.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Close (and clean-up) a resource.
- /// </table>
- /// </summary>
- public interface ICloseable
- {
- /// <summary> Close the resource. </summary>
- void Close();
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/IConnection.cs b/qpid/dotnet/Qpid.Messaging/IConnection.cs
deleted file mode 100644
index f664137e02..0000000000
--- a/qpid/dotnet/Qpid.Messaging/IConnection.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Messaging
-{
- public delegate void ExceptionListenerDelegate(Exception ex);
-
- public interface IConnection : IDisposable, ICloseable
- {
- /// <summary>
- /// The connection listener that has been registered with this connection.
- /// </summary>
- IConnectionListener ConnectionListener
- {
- get;
- set;
- }
-
- ExceptionListenerDelegate ExceptionListener { get; set; }
-
- string ClientID { get; set; }
-
- /// <return>the maximum number of sessions supported by this Connection</return>
- int MaximumChannelCount
- {
- get;
- }
-
- IChannel CreateChannel(bool transacted, AcknowledgeMode acknowledgeMode);
- IChannel CreateChannel(bool transacted, AcknowledgeMode acknowledgeMode, int prefetch);
- IChannel CreateChannel(bool transacted, AcknowledgeMode acknowledgeMode, int prefetchHigh, int prefetchLow);
-
- void Start();
- void Stop();
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/IConnectionFactory.cs b/qpid/dotnet/Qpid.Messaging/IConnectionFactory.cs
deleted file mode 100644
index f141d509be..0000000000
--- a/qpid/dotnet/Qpid.Messaging/IConnectionFactory.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Messaging
-{
- public interface IConnectionFactory
- {
- IConnection CreateConnection();
- IConnection CreateConnection(string userId, string password);
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/IConnectionListener.cs b/qpid/dotnet/Qpid.Messaging/IConnectionListener.cs
deleted file mode 100644
index 02d9eb38da..0000000000
--- a/qpid/dotnet/Qpid.Messaging/IConnectionListener.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Messaging
-{
- public interface IConnectionListener
- {
- /// <summary>
- /// Called when bytes have been transmitted to the server
- /// </summary>
- /// <param>count the number of bytes sent in total since the connection was opened</param>
- void BytesSent(long count);
-
- /// <summary>
- /// Called when some bytes have been received on a connection
- /// </summary>
- /// <param>count the number of bytes received in total since the connection was opened</param>
- void BytesReceived(long count);
-
- /// <summary>
- /// Called after the infrastructure has detected that failover is required but before attempting failover.
- /// </summary>
- /// <param>redirect true if the broker requested redirect. false if failover is occurring due to a connection error.</param>
- /// <return>true to continue failing over, false to veto failover and raise a connection exception</return>
- bool PreFailover(bool redirect);
-
- /// <summary>
- /// Called after connection has been made to another broker after failover has been started but before
- /// any resubscription has been done.
- /// <return> true to continue with resubscription, false to prevent automatic resubscription. This is useful in
- /// cases where the application wants to handle resubscription. Note that in the latter case all sessions, producers
- /// and consumers are invalidated.
- /// </return
- bool PreResubscribe();
-
- /// <summary>
- /// Called once failover has completed successfully. This is called irrespective of whether the client has
- /// vetoed automatic resubscription.
- /// </summary>
- void FailoverComplete();
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/IFieldTable.cs b/qpid/dotnet/Qpid.Messaging/IFieldTable.cs
deleted file mode 100644
index 730ce399d4..0000000000
--- a/qpid/dotnet/Qpid.Messaging/IFieldTable.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Collections;
-
-namespace Apache.Qpid.Messaging
-{
- public interface IFieldTable : IEnumerable
- {
- int Count { get; }
-
- object this[string key] { get; set; }
-
- /// <summary>
- /// Adds all the items from another field table in this one.
- /// Will overwrite any items in the current table with the same key.
- /// </summary>
- /// <param name="source">the source field table</param>
- void AddAll(IFieldTable source);
-
- bool Contains(string s);
- void Clear();
- void Remove(string key);
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/IHeaders.cs b/qpid/dotnet/Qpid.Messaging/IHeaders.cs
deleted file mode 100644
index 7fdf26ebda..0000000000
--- a/qpid/dotnet/Qpid.Messaging/IHeaders.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Messaging
-{
- /// <summary>
- /// IHeaders represents the header fields of an AMQ message and provides methods to access those fields. There are accessor methods to
- /// get and set each header field for each supported header field data type.
- ///
- /// <para/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th>Responsibilities</th></tr>
- /// <tr><td>Provide accessors for all supported header field types.</td></tr>
- /// <tr><td>Check if a set of headers contains a named property.</td></tr>
- /// </table>
- ///
- /// </summary>
- public interface IHeaders
- {
- bool Contains(string name);
-
- object this[string name] { get; set; }
-
- bool GetBoolean(string name);
- void SetBoolean(string name, bool value);
-
- byte GetByte(string name);
- void SetByte(string name, byte value);
-
- //sbyte GetSByte(string name);
- //void SetSByte(string name, sbyte value);
-
- short GetShort(string name);
- void SetShort(string name, short value);
-
- int GetInt(string name);
- void SetInt(string name, int value);
-
- long GetLong(string name);
- void SetLong(string name, long value);
-
- float GetFloat(string name);
- void SetFloat(string name, float value);
-
- double GetDouble(string name);
- void SetDouble(string name, double value);
-
- string GetString(string name);
- void SetString(string name, string value);
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/IMessage.cs b/qpid/dotnet/Qpid.Messaging/IMessage.cs
deleted file mode 100644
index 20ae5ee130..0000000000
--- a/qpid/dotnet/Qpid.Messaging/IMessage.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Messaging
-{
- public interface IMessage
- {
- /// <summary>
- /// The MIME Content Type
- /// </summary>
- string ContentType { get; set;}
- /// <summary>
- /// The MIME Content Encoding
- /// </summary>
- string ContentEncoding { get; set; }
- /// <summary>
- /// The application correlation identifier
- /// </summary>
- string CorrelationId { get; set; }
- /// <summary>
- /// The application correlation identifier, as an array of bytes
- /// </summary>
- byte[] CorrelationIdAsBytes { get; set; }
- /// <summary>
- /// Non-persistent (1) or persistent (2)
- /// </summary>
- DeliveryMode DeliveryMode { get; set; }
- /// <summary>
- /// Message expiration specification
- /// </summary>
- long Expiration { get; set; }
- /// <summary>
- /// The application message identifier
- /// </summary>
- string MessageId { get; set; }
- /// <summary>
- /// The message priority, 0 to 9
- /// </summary>
- byte Priority { get; set; }
- /// <summary>
- /// True if the message has been redelivered
- /// </summary>
- bool Redelivered { get; set; }
- /// <summary>
- /// Exchange name of the reply-to address
- /// </summary>
- string ReplyToExchangeName { get; set; }
- /// <summary>
- /// Routing key of the reply-to address
- /// </summary>
- string ReplyToRoutingKey { get; set; }
- /// <summary>
- /// The message timestamp
- /// </summary>
- long Timestamp { get; set; }
- /// <summary>
- /// The message type name
- /// </summary>
- string Type { get; set; }
- /// <summary>
- /// Message headers
- /// </summary>
- IHeaders Headers { get; }
- /// <summary>
- /// The creating user id
- /// </summary>
- string UserId { get; set; }
- /// <summary>
- /// The creating application id
- /// </summary>
- string AppId { get; set; }
- /// <summary>
- /// Intra-cluster routing identifier
- /// </summary>
- string ClusterId { get; set; }
-
- void Acknowledge();
- void ClearBody();
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/IMessageConsumer.cs b/qpid/dotnet/Qpid.Messaging/IMessageConsumer.cs
deleted file mode 100644
index 86b5405707..0000000000
--- a/qpid/dotnet/Qpid.Messaging/IMessageConsumer.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Messaging
-{
- /// <summary>
- /// Describes an object that can be used to receive (consume)
- /// messages from an AMQP queue.
- /// </summary>
- /// <remarks>
- /// Consumers are created using either
- /// <see cref="IChannel.CreateConsumer"/> or using
- /// the builder pattern (preferred) with
- /// <see cref="IChannel.CreateConsumerBuilder"/>.
- ///
- /// <para>
- /// Consumers offer two different ways of receiving messages:
- /// You can attach a delegate to the <see cref="OnMessage"/>
- /// event and be notified when a message arrives, or you can
- /// use the <see cref="Receive"/> and <see cref="ReceiveNoWait"/>
- /// methods to control when you receive messages. Be aware that you can use
- /// one or the other, but not both at the same time.
- /// </para>
- /// <para>
- /// Regardless of which method you choose, the prefetch settings
- /// specified when creating the channel will still control when messages
- /// are actually received from the AMQP broker. Any messages that arrive
- /// between the prefetch window will be queued by the channel
- /// until they can be delivered to the consumer (either though the event
- /// or until the consumer actively calls <see cref="Receive"/>).
- /// </para>
- /// </remarks>
- public interface IMessageConsumer : IDisposable, ICloseable
- {
- /// <summary>
- /// Fired when a message is received from the broker by the consumer
- /// </summary>
- MessageReceivedDelegate OnMessage { get; set; }
-
- /// <summary>
- /// Wait infinitely for a message to be received from the broker
- /// </summary>
- /// <returns>The message received</returns>
- IMessage Receive();
-
- /// <summary>
- /// Wait the specified time until a message is receive from the broker
- /// </summary>
- /// <param name="delay">Maximum number of milliseconds to wait for a message</param>
- /// <returns>The message received, or null if the timeout expires</returns>
- IMessage Receive(long delay);
-
- /// <summary>
- /// Return a message if one is already available in the channel.
- /// Does not wait for one to be received from the broker.
- /// </summary>
- /// <returns>The message, if it was available, otherwise null</returns>
- IMessage ReceiveNoWait();
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/IMessagePublisher.cs b/qpid/dotnet/Qpid.Messaging/IMessagePublisher.cs
deleted file mode 100644
index d895a9749b..0000000000
--- a/qpid/dotnet/Qpid.Messaging/IMessagePublisher.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-
-namespace Apache.Qpid.Messaging
-{
- /// <summary>
- /// Defines an object capable of publishing messages
- /// to an AMQP broker.
- /// </summary>
- /// <remarks>
- /// A publisher can be created using either
- /// <see cref="IChannel.CreatePublisher"/> or
- /// using the builder pattern (preferred) with
- /// <see cref="IChannel.CreatePublisherBuilder"/>
- /// </remarks>
- public interface IMessagePublisher : IDisposable, ICloseable
- {
- /// <summary>
- /// Default delivery mode to use with this publisher
- /// </summary>
- DeliveryMode DeliveryMode { get; set; }
- /// <summary>
- /// Name of exchange messages are published to
- /// </summary>
- string ExchangeName { get; }
- /// <summary>
- /// Routing key used when publishing messages
- /// </summary>
- string RoutingKey { get; }
- /// <summary>
- /// If true, a message ID will not be generated by the publisher
- /// when sending the message
- /// </summary>
- bool DisableMessageID { get; set; }
- /// <summary>
- /// If true, no timestamp will be added to the message
- /// when publishing it
- /// </summary>
- bool DisableMessageTimestamp { get; set; }
- /// <summary>
- /// Default priority used when publishing messages
- /// </summary>
- int Priority { get; set; }
- /// <summary>
- /// Default time to live used when publishing messages
- /// </summary>
- long TimeToLive { get; set; }
- /// <summary>
- /// Set the default MIME type for messages produced by this producer.
- /// This reduces the overhead of each message.
- /// </summary>
- string MimeType { get; set; }
- /// <summary>
- /// Set the default encoding for messages produced by this producer.
- /// This reduces the overhead of each message.
- /// </summary>
- string Encoding { get; set; }
-
- /// <summary>
- /// Publish a message, using any default values configured
- /// </summary>
- /// <param name="msg">Message to publish</param>
- void Send(IMessage msg);
- /// <summary>
- /// Publish a message with the specified options
- /// </summary>
- /// <param name="msg">Message to publish</param>
- /// <param name="deliveryMode">Delivery mode to use</param>
- /// <param name="priority">Priority of the message</param>
- /// <param name="timeToLive">Time to live of the message</param>
- void Send(IMessage msg, DeliveryMode deliveryMode, int priority, long timeToLive);
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/ITextMessage.cs b/qpid/dotnet/Qpid.Messaging/ITextMessage.cs
deleted file mode 100644
index 902beb70f8..0000000000
--- a/qpid/dotnet/Qpid.Messaging/ITextMessage.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Messaging
-{
- public interface ITextMessage : IMessage
- {
- string Text { get; set; }
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/MessageConsumerBuilder.cs b/qpid/dotnet/Qpid.Messaging/MessageConsumerBuilder.cs
deleted file mode 100644
index 91a2371788..0000000000
--- a/qpid/dotnet/Qpid.Messaging/MessageConsumerBuilder.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Messaging
-{
- /// <summary>
- /// MessageConsumerBuilder provides a builder with a fluent interface to assist with creating message consumers on a channel.
- ///
- /// <p/><table id="crc"><caption>CRC Card</caption>
- /// <tr><th> Responsibilities <th> Collaborations
- /// <tr><td> Create message consumers from consume parameters. <td> <see cref="IChannel">
- /// </table>
- /// </summary>
- ///
- /// <remarks>It may be better to replace the Create method with a DeclareBindAndCreate method, that declares and binds the consumers queue,
- /// as well as creating the consumer. This is a common use case, so the method will generally be usefull. Need to consider situations where
- /// the declare and bind is not to be done, for example when resubscribing to a durable subscription. There may be others too.</remarks>
- public class MessageConsumerBuilder
- {
- private bool _noLocal = false;
-
- private bool _exclusive = false;
-
- private bool _browse = false;
-
- //private bool _durable = false;
- //private string _subscriptionName = null;
-
- private IChannel _channel;
-
- private readonly string _queueName;
-
- private int _prefetchLow;
-
- private int _prefetchHigh;
-
- public MessageConsumerBuilder(IChannel channel, string queueName)
- {
- _channel = channel;
- _queueName = queueName;
- _prefetchHigh = _channel.DefaultPrefetchHigh;
- _prefetchLow = _channel.DefaultPrefetchLow;
- }
-
- public MessageConsumerBuilder WithPrefetchLow(int prefetchLow)
- {
- _prefetchLow = prefetchLow;
- return this;
- }
-
- public MessageConsumerBuilder WithPrefetchHigh(int prefetchHigh)
- {
- _prefetchHigh = prefetchHigh;
- return this;
- }
-
- public MessageConsumerBuilder WithNoLocal(bool noLocal)
- {
- _noLocal = noLocal;
- return this;
- }
-
- public MessageConsumerBuilder WithExclusive(bool exclusive)
- {
- _exclusive = exclusive;
- return this;
- }
-
- public MessageConsumerBuilder WithBrowse(bool browse)
- {
- _browse = browse;
- return this;
- }
-
- /*
- public MessageConsumerBuilder WithDurable(bool durable)
- {
- _durable = durable;
- return this;
- }
- */
-
- /*
- public MessageConsumerBuilder WithSubscriptionName(string subscriptionName)
- {
- _subscriptionName = subscriptionName;
- return this;
- }
- */
-
- public IMessageConsumer Create()
- {
- return _channel.CreateConsumer(_queueName, _prefetchLow, _prefetchHigh, _noLocal, _exclusive, _browse);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/MessageNotReadableException.cs b/qpid/dotnet/Qpid.Messaging/MessageNotReadableException.cs
deleted file mode 100644
index 2afcffd531..0000000000
--- a/qpid/dotnet/Qpid.Messaging/MessageNotReadableException.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid.Messaging
-{
- [Serializable]
- public class MessageNotReadableException : QpidException
- {
- public MessageNotReadableException(string reason) : base(reason)
- {
- }
-
- protected MessageNotReadableException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/MessageNotWritableException.cs b/qpid/dotnet/Qpid.Messaging/MessageNotWritableException.cs
deleted file mode 100644
index 9b00f01948..0000000000
--- a/qpid/dotnet/Qpid.Messaging/MessageNotWritableException.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid.Messaging
-{
- [Serializable]
- public class MessageNotWriteableException : QpidException
- {
- public MessageNotWriteableException(string reason) : base(reason)
- {
- }
-
- protected MessageNotWriteableException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/MessagePublisherBuilder.cs b/qpid/dotnet/Qpid.Messaging/MessagePublisherBuilder.cs
deleted file mode 100644
index 79c7575d0a..0000000000
--- a/qpid/dotnet/Qpid.Messaging/MessagePublisherBuilder.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace Apache.Qpid.Messaging
-{
- public class MessagePublisherBuilder
- {
- /// <summary>
- /// Default value for immediate flag is false, i.e. a consumer does not need to be attached to a queue
- /// </summary>
- const bool DEFAULT_IMMEDIATE = false;
-
- /// <summary>
- /// Default value for mandatory flag is true, i.e. server will not silently drop messages where no queue is
- /// connected to the exchange for the message
- /// </summary>
- const bool DEFAULT_MANDATORY = true;
-
- IChannel _channel;
- string _exchangeName = null;
- string _routingKey = null;
- DeliveryMode _deliveryMode = DeliveryMode.Persistent;
- long _timeToLive;
- bool _immediate = DEFAULT_IMMEDIATE;
- bool _mandatory = DEFAULT_MANDATORY;
- int _priority = 0;
-
- public MessagePublisherBuilder(IChannel channel)
- {
- _channel = channel;
- }
-
- public MessagePublisherBuilder WithRoutingKey(string routingKey)
- {
- _routingKey = routingKey;
- return this;
- }
-
- public MessagePublisherBuilder WithExchangeName(string exchangeName)
- {
- _exchangeName = exchangeName;
- return this;
- }
-
- public MessagePublisherBuilder WithDeliveryMode(DeliveryMode deliveryMode)
- {
- _deliveryMode = deliveryMode;
- return this;
- }
-
- public MessagePublisherBuilder WithTimeToLive(long timeToLive)
- {
- _timeToLive = timeToLive;
- return this;
- }
-
- public MessagePublisherBuilder WithImmediate(bool immediate)
- {
- _immediate = immediate;
- return this;
- }
-
- public MessagePublisherBuilder WithMandatory(bool mandatory)
- {
- _mandatory = mandatory;
- return this;
- }
-
- public IMessagePublisher Create()
- {
- return _channel.CreatePublisher(_exchangeName, _routingKey, _deliveryMode, _timeToLive, _immediate, _mandatory, _priority);
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/Properties/AssemblyInfo.cs b/qpid/dotnet/Qpid.Messaging/Properties/AssemblyInfo.cs
deleted file mode 100644
index d9dff07f3f..0000000000
--- a/qpid/dotnet/Qpid.Messaging/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Reflection;
-using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Apache.Qpid.Messaging")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Apache.Qpid.Messaging")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("e74f1805-b355-42e0-ba70-afc7c8570f03")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-
-[assembly: CLSCompliant(true)]
diff --git a/qpid/dotnet/Qpid.Messaging/Qpid.Messaging.csproj b/qpid/dotnet/Qpid.Messaging/Qpid.Messaging.csproj
deleted file mode 100644
index 37b80d1515..0000000000
--- a/qpid/dotnet/Qpid.Messaging/Qpid.Messaging.csproj
+++ /dev/null
@@ -1,115 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Apache.Qpid.Messaging</RootNamespace>
- <AssemblyName>Apache.Qpid.Messaging</AssemblyName>
- <SignAssembly>true</SignAssembly>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <PublishUrl>http://localhost/Apache.Qpid.Messaging/</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Web</InstallFrom>
- <UpdateEnabled>true</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>true</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\net-2.0\debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\net-2.0\release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework Client Profile</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5 SP1</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/Qpid.Messaging/QpidException.cs b/qpid/dotnet/Qpid.Messaging/QpidException.cs
deleted file mode 100644
index 3e39f2293d..0000000000
--- a/qpid/dotnet/Qpid.Messaging/QpidException.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid.Messaging
-{
- [Serializable]
- public class QpidException : Exception
- {
- public QpidException(string reason) : base(reason)
- {
- }
-
- public QpidException(string reason, Exception e)
- : base(reason, e)
- {
- }
-
- protected QpidException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/ResourceAllocationException.cs b/qpid/dotnet/Qpid.Messaging/ResourceAllocationException.cs
deleted file mode 100644
index 954dcdd94c..0000000000
--- a/qpid/dotnet/Qpid.Messaging/ResourceAllocationException.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Runtime.Serialization;
-
-namespace Apache.Qpid.Messaging
-{
- [Serializable]
- public class ResourceAllocationException : QpidException
- {
- public ResourceAllocationException(string reason) : base(reason)
- {
- }
-
- protected ResourceAllocationException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
- }
-}
diff --git a/qpid/dotnet/Qpid.Messaging/default.build b/qpid/dotnet/Qpid.Messaging/default.build
deleted file mode 100644
index e351def886..0000000000
--- a/qpid/dotnet/Qpid.Messaging/default.build
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Apache.Qpid.Messaging" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="library"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.dll">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/Qpid.NET.FxCop b/qpid/dotnet/Qpid.NET.FxCop
deleted file mode 100644
index ba6b3e3ac5..0000000000
--- a/qpid/dotnet/Qpid.NET.FxCop
+++ /dev/null
@@ -1,16775 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<FxCopProject Version="1.35" Name="My FxCop Project">
- <ProjectOptions>
- <SharedProject>True</SharedProject>
- <Stylesheet Apply="False">http://www.gotdotnet.com/team/fxcop//xsl/1.35/FxCopReport.xsl</Stylesheet>
- <SaveMessages>
- <Project Status="Active, Excluded" NewOnly="False" />
- <Report Status="Active" NewOnly="False" />
- </SaveMessages>
- <ProjectFile Compress="True" DefaultTargetCheck="True" DefaultRuleCheck="True" SaveByRuleGroup="" Deterministic="True" />
- <EnableMultithreadedLoad>True</EnableMultithreadedLoad>
- <EnableMultithreadedAnalysis>True</EnableMultithreadedAnalysis>
- <SourceLookup>True</SourceLookup>
- <AnalysisExceptionsThreshold>10</AnalysisExceptionsThreshold>
- <RuleExceptionsThreshold>1</RuleExceptionsThreshold>
- <Spelling Locale="en-us" />
- <VersionAware>False</VersionAware>
- <OverrideRuleVisibilities>False</OverrideRuleVisibilities>
- <CustomDictionaries SearchFxCopDir="True" SearchUserProfile="True" SearchProjectDir="True" />
- <SearchGlobalAssemblyCache>False</SearchGlobalAssemblyCache>
- <DeadlockDetectionTimeout>120</DeadlockDetectionTimeout>
- </ProjectOptions>
- <Targets>
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Buffer.dll" Analyze="True" AnalyzeAllChildren="True" />
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Client.dll" Analyze="True" AnalyzeAllChildren="True" />
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Client.Tests.dll" Analyze="True" AnalyzeAllChildren="True" />
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Client.Transport.Socket.Blocking.dll" Analyze="True" AnalyzeAllChildren="True" />
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Codec.dll" Analyze="True" AnalyzeAllChildren="True" />
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Common.dll" Analyze="True" AnalyzeAllChildren="True" />
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Messaging.dll" Analyze="True" AnalyzeAllChildren="True" />
- </Targets>
- <Rules>
- <RuleFiles>
- <RuleFile Name="$(FxCopDir)\Rules\DesignRules.dll" Enabled="True" AllRulesEnabled="True" />
- <RuleFile Name="$(FxCopDir)\Rules\GlobalizationRules.dll" Enabled="True" AllRulesEnabled="True" />
- <RuleFile Name="$(FxCopDir)\Rules\InteroperabilityRules.dll" Enabled="True" AllRulesEnabled="True" />
- <RuleFile Name="$(FxCopDir)\Rules\MobilityRules.dll" Enabled="True" AllRulesEnabled="True" />
- <RuleFile Name="$(FxCopDir)\Rules\NamingRules.dll" Enabled="True" AllRulesEnabled="True" />
- <RuleFile Name="$(FxCopDir)\Rules\PerformanceRules.dll" Enabled="True" AllRulesEnabled="True" />
- <RuleFile Name="$(FxCopDir)\Rules\PortabilityRules.dll" Enabled="True" AllRulesEnabled="True" />
- <RuleFile Name="$(FxCopDir)\Rules\SecurityRules.dll" Enabled="True" AllRulesEnabled="True" />
- <RuleFile Name="$(FxCopDir)\Rules\UsageRules.dll" Enabled="True" AllRulesEnabled="True" />
- </RuleFiles>
- <Groups />
- <Settings />
- </Rules>
- <FxCopReport Version="1.35">
- <Namespaces>
- <Namespace Name="Qpid">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Buffer">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Buffer</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.Failover">
- <Messages>
- <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.Failover</Item>
- </Issue>
- </Message>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Failover</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.Handler">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Handler</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.Message">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Message</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.Protocol">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Protocol</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.Protocol.Listener">
- <Messages>
- <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.Protocol.Listener</Item>
- </Issue>
- </Message>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Protocol.Listener</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.qms">
- <Messages>
- <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid.Client.qms</Item>
- </Issue>
- </Message>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.qms</Item>
- </Issue>
- </Message>
- <Message Id="qms" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>qms</Item>
- <Item>Qpid.Client.qms</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.qms.failover">
- <Messages>
- <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.qms.failover</Item>
- </Issue>
- </Message>
- <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid.Client.qms.failover</Item>
- </Issue>
- <Issue Name="Namespace">
- <Item>Qpid.Client.qms.failover</Item>
- </Issue>
- </Message>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.qms.failover</Item>
- </Issue>
- </Message>
- <Message Id="qms" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>qms</Item>
- <Item>Qpid.Client.qms.failover</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.State">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.State</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.Tests">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Tests</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.Tests.connection">
- <Messages>
- <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.Tests.connection</Item>
- </Issue>
- </Message>
- <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid.Client.Tests.connection</Item>
- </Issue>
- </Message>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Tests.connection</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.Tests.failover">
- <Messages>
- <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.Tests.failover</Item>
- </Issue>
- </Message>
- <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid.Client.Tests.failover</Item>
- </Issue>
- </Message>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Tests.failover</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.Tests.url">
- <Messages>
- <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.Tests.url</Item>
- </Issue>
- </Message>
- <Message TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid.Client.Tests.url</Item>
- </Issue>
- </Message>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Tests.url</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.Transport">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Transport</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Client.Transport.Socket.Blocking">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Transport.Socket.Blocking</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Codec">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Codec</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Codec.Demux">
- <Messages>
- <Message Id="Demux" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Demux</Item>
- <Item>Qpid.Codec.Demux</Item>
- </Issue>
- </Message>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Codec.Demux</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Codec.Support">
- <Messages>
- <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Codec.Support</Item>
- </Issue>
- </Message>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Codec.Support</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Collections">
- <Messages>
- <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Collections</Item>
- </Issue>
- </Message>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Collections</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Common">
- <Messages>
- <Message TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Common</Item>
- </Issue>
- </Message>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Common</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Framing">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Framing</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- <Namespace Name="Qpid.Messaging">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Namespace">
- <Item>Qpid</Item>
- <Item>Qpid.Messaging</Item>
- </Issue>
- </Message>
- </Messages>
- </Namespace>
- </Namespaces>
- <Targets>
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Buffer.dll">
- <Modules>
- <Module Name="qpid.buffer.dll">
- <Messages>
- <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Buffer</Item>
- </Issue>
- </Message>
- <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2006-12-04 13:11:47Z">
- <Issue Name="NoStrongName">
- <Item>Qpid.Buffer</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2006-12-04 13:11:47Z">
- <Issue Name="NoAttr">
- <Item>Qpid.Buffer</Item>
- </Issue>
- </Message>
- </Messages>
- <Namespaces>
- <Namespace Name="Qpid.Buffer">
- <Types>
- <Type Name="BufferOverflowException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Buffer.BufferOverflowException</Item>
- <Item>protected BufferOverflowException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Buffer.BufferOverflowException</Item>
- <Item>public BufferOverflowException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Buffer.BufferOverflowException</Item>
- <Item>public BufferOverflowException(String, Exception)</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkISerializableTypesWithSerializable" Category="Microsoft.Usage" CheckId="CA2237" Created="2006-12-04 13:11:47Z">
- <Issue Level="Error">
- <Item>BufferOverflowException</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="BufferUnderflowException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Buffer.BufferUnderflowException</Item>
- <Item>protected BufferUnderflowException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Buffer.BufferUnderflowException</Item>
- <Item>public BufferUnderflowException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Buffer.BufferUnderflowException</Item>
- <Item>public BufferUnderflowException(String, Exception)</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkISerializableTypesWithSerializable" Category="Microsoft.Usage" CheckId="CA2237" Created="2006-12-04 13:11:47Z">
- <Issue Level="Error">
- <Item>BufferUnderflowException</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="ByteBuffer">
- <Members>
- <Member Name="_containerStack">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_containerStack</Item>
- </Issue>
- </Message>
- <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_containerStack</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_heapBufferStacks">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_heapBufferStacks</Item>
- </Issue>
- </Message>
- <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_heapBufferStacks</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Allocate0(System.Int32,System.Boolean):Qpid.Buffer.ByteBuffer">
- <Messages>
- <Message Id="System.NotSupportedException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ByteBuffer.Allocate0(Int32, Boolean):ByteBuffer</Item>
- <Item>1</Item>
- <Item>NotSupportedException.NotSupportedException(String)</Item>
- <Item>Direct buffers not currently implemented</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Equals(System.Object):System.Boolean">
- <Messages>
- <Message TypeName="DoNotCastUnnecessarily" Category="Microsoft.Performance" CheckId="CA1800" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>obj</Item>
- <Item>Qpid.Buffer.ByteBuffer</Item>
- <Item>ByteBuffer.Equals(Object):Boolean</Item>
- <Item>castclass</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetBufferStackIndex(System.Collections.Stack[],System.Int32):System.Int32">
- <Messages>
- <Message Id="System.ArgumentOutOfRangeException.#ctor(System.String,System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ByteBuffer.GetBufferStackIndex(Stack[], Int32):Int32</Item>
- <Item>2</Item>
- <Item>ArgumentOutOfRangeException.ArgumentOutOfRangeException(String, String)</Item>
- <Item>Buffer size is too big: __</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetUnsignedInt():System.UInt32">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetUnsignedInt</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetUnsignedLong():System.UInt64">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetUnsignedLong</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetUnsignedShort():System.UInt16">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetUnsignedShort</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MINIMUM_CAPACITY">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>MINIMUM_CAPACITY</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ByteBuffer.MINIMUM_CAPACITY</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Put(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message Id="0#buf" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ByteBuffer.Put(ByteBuffer):Void</Item>
- <Item>buf</Item>
- <Item>buf</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Release0(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message Id="0#buf" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ByteBuffer.Release0(ByteBuffer):Void</Item>
- <Item>buf</Item>
- <Item>buf</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buf'</Item>
- <Item>ByteBuffer.Release0(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ByteBufferHexDumper">
- <Messages>
- <Message TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ByteBufferHexDumper</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".cctor()">
- <Messages>
- <Message TypeName="InitializeReferenceTypeStaticFieldsInline" Category="Microsoft.Performance" CheckId="CA1810" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Buffer.ByteBufferHexDumper</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetHexDump(Qpid.Buffer.ByteBuffer):System.String">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'input'</Item>
- <Item>ByteBufferHexDumper.GetHexDump(ByteBuffer):String</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ByteBufferProxy">
- <Members>
- <Member Name=".ctor(Qpid.Buffer.ByteBuffer)">
- <Messages>
- <Message Id="0#buf" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ByteBufferProxy.ByteBufferProxy(ByteBuffer)</Item>
- <Item>buf</Item>
- <Item>buf</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_buf">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_buf</Item>
- </Issue>
- </Message>
- <Message Id="_buf" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_buf</Item>
- <Item>ByteBufferProxy._buf</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_buf</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="HeapByteBuffer">
- <Members>
- <Member Name="CheckSpace(System.Int32):System.Void">
- <Messages>
- <Message Id="Qpid.Buffer.BufferOverflowException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>HeapByteBuffer.CheckSpace(Int32):Void</Item>
- <Item>1</Item>
- <Item>BufferOverflowException.BufferOverflowException(String)</Item>
- <Item>Attempt to write ____ byte(s) to buffer where position is ____ and limit is __</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CheckSpaceForReading(System.Int32):System.Void">
- <Messages>
- <Message Id="Qpid.Buffer.BufferUnderflowException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>HeapByteBuffer.CheckSpaceForReading(Int32):Void</Item>
- <Item>1</Item>
- <Item>BufferUnderflowException.BufferUnderflowException(String)</Item>
- <Item>Attempt to read ____ byte(s) to buffer where position is ____ and limit is __</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetString(System.UInt32,System.Text.Encoding):System.String">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'encoder'</Item>
- <Item>HeapByteBuffer.GetString(UInt32, Encoding):String</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Limit">
- <Accessors>
- <Accessor Name="set_Limit(System.Int32):System.Void">
- <Messages>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>HeapByteBuffer.set_Limit(Int32):Void</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>Limit must not be greater than Capacity</Item>
- </Issue>
- <Issue>
- <Item>HeapByteBuffer.set_Limit(Int32):Void</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>Limit must not be negative</Item>
- </Issue>
- </Message>
- </Messages>
- </Accessor>
- </Accessors>
- </Member>
- <Member Name="Mark():System.Void">
- <Messages>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>HeapByteBuffer.Mark():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Put(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message TypeName="DoNotCastUnnecessarily" Category="Microsoft.Performance" CheckId="CA1800" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>src</Item>
- <Item>Qpid.Buffer.HeapByteBuffer</Item>
- <Item>HeapByteBuffer.Put(ByteBuffer):Void</Item>
- <Item>castclass</Item>
- </Issue>
- </Message>
- <Message Id="Qpid.Buffer.BufferOverflowException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>HeapByteBuffer.Put(ByteBuffer):Void</Item>
- <Item>1</Item>
- <Item>BufferOverflowException.BufferOverflowException(String)</Item>
- <Item>Not enought capacity in this buffer for ____ elements - only ____ remaining</Item>
- </Issue>
- </Message>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>HeapByteBuffer.Put(ByteBuffer):Void</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>Cannot copy self into self!</Item>
- </Issue>
- </Message>
- <Message Id="enought" TypeName="LiteralsShouldBeSpelledCorrectly" Category="Microsoft.Usage" CheckId="CA2204" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>enought</Item>
- <Item>Not enought capacity in this buffer for ____ elements - only ____ remaining</Item>
- </Issue>
- </Message>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>src</Item>
- <Item>HeapByteBuffer.Put(ByteBuffer):Void</Item>
- <Item>buf</Item>
- <Item>ByteBuffer.Put(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'src'</Item>
- <Item>HeapByteBuffer.Put(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Put(System.Byte[]):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'data'</Item>
- <Item>HeapByteBuffer.Put(Byte[]):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Reset():System.Void">
- <Messages>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>HeapByteBuffer.Reset():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="wrap(System.Byte[]):Qpid.Buffer.HeapByteBuffer">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>wrap</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'bytes'</Item>
- <Item>HeapByteBuffer.wrap(Byte[]):HeapByteBuffer</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="wrap(System.Byte[],System.Int32):Qpid.Buffer.HeapByteBuffer">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>wrap</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="RefCountingByteBuffer">
- <Members>
- <Member Name="Acquire():System.Void">
- <Messages>
- <Message Id="System.Exception.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>RefCountingByteBuffer.Acquire():Void</Item>
- <Item>1</Item>
- <Item>Exception.Exception(String)</Item>
- <Item>Already released buffer</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2006-12-04 13:11:47Z">
- <Issue Name="TooGeneric">
- <Item>RefCountingByteBuffer.Acquire():Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Buf">
- <Messages>
- <Message Id="Buf" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Buf</Item>
- <Item>RefCountingByteBuffer.Buf:ByteBuffer</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Init(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message Id="0#buf" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>RefCountingByteBuffer.Init(ByteBuffer):Void</Item>
- <Item>buf</Item>
- <Item>buf</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buf'</Item>
- <Item>RefCountingByteBuffer.Init(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Put(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buf'</Item>
- <Item>RefCountingByteBuffer.Put(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Put(System.Byte[]):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'data'</Item>
- <Item>RefCountingByteBuffer.Put(Byte[]):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Release():System.Void">
- <Messages>
- <Message Id="System.Exception.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>RefCountingByteBuffer.Release():Void</Item>
- <Item>1</Item>
- <Item>Exception.Exception(String)</Item>
- <Item>Already released buffer. Release called too many times</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2006-12-04 13:11:47Z">
- <Issue Name="TooGeneric">
- <Item>RefCountingByteBuffer.Release():Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- </Namespaces>
- </Module>
- </Modules>
- </Target>
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Client.dll">
- <Modules>
- <Module Name="qpid.client.dll">
- <Messages>
- <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client</Item>
- </Issue>
- </Message>
- <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2006-12-04 13:11:47Z">
- <Issue Name="NoStrongName">
- <Item>Qpid.Client</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2006-12-04 13:11:47Z">
- <Issue Name="NoAttr">
- <Item>Qpid.Client</Item>
- </Issue>
- </Message>
- </Messages>
- <Namespaces>
- <Namespace Name="Qpid.Client">
- <Types>
- <Type Name="AmqBrokerInfo">
- <Messages>
- <Message Id="Amq" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Amq</Item>
- <Item>Qpid.Client.AmqBrokerInfo</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(System.String)">
- <Messages>
- <Message Id="url" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>url</Item>
- <Item>AmqBrokerInfo.AmqBrokerInfo(String)</Item>
- </Issue>
- </Message>
- <Message Id="0#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>url</Item>
- <Item>AmqBrokerInfo.AmqBrokerInfo(String)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DEFAULT_CONNECT_TIMEOUT">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DEFAULT_CONNECT_TIMEOUT</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AmqBrokerInfo.DEFAULT_CONNECT_TIMEOUT</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Equals(System.Object):System.Boolean">
- <Messages>
- <Message TypeName="DoNotCastUnnecessarily" Category="Microsoft.Performance" CheckId="CA1800" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>obj</Item>
- <Item>Qpid.Client.qms.BrokerInfo</Item>
- <Item>AmqBrokerInfo.Equals(Object):Boolean</Item>
- <Item>castclass</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetHashCode():System.Int32">
- <Messages>
- <Message Id="System.String.ToLower" TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqBrokerInfo.GetHashCode():Int32</Item>
- <Item>System.String.ToLower</Item>
- <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="getTimeout():System.Int64">
- <Messages>
- <Message Id="System.Int64.Parse(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqBrokerInfo.getTimeout():Int64</Item>
- <Item>System.Int64.Parse(System.String)</Item>
- <Item>System.Int64.Parse(System.String,System.IFormatProvider)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setHost(System.String):System.Void">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_host</Item>
- <Item>AmqBrokerInfo.setHost(String):Void</Item>
- <Item>host</Item>
- <Item>BrokerInfo.setHost(String):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setPort(System.Int32):System.Void">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_port</Item>
- <Item>AmqBrokerInfo.setPort(Int32):Void</Item>
- <Item>port</Item>
- <Item>BrokerInfo.setPort(Int32):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setTimeout(System.Int64):System.Void">
- <Messages>
- <Message Id="System.Int64.ToString" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqBrokerInfo.setTimeout(Int64):Void</Item>
- <Item>System.Int64.ToString</Item>
- <Item>System.Int64.ToString(System.IFormatProvider)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setTransport(System.String):System.Void">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_transport</Item>
- <Item>AmqBrokerInfo.setTransport(String):Void</Item>
- <Item>transport</Item>
- <Item>BrokerInfo.setTransport(String):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="StringEqualsIgnoreCase(System.String,System.String):System.Boolean">
- <Messages>
- <Message Id="one" TypeName="AvoidUnnecessaryStringCreation" Category="Microsoft.Performance" CheckId="CA1807" Created="2006-12-04 13:11:47Z">
- <Issue Name="UseStringCompareParameter">
- <Item>AmqBrokerInfo.StringEqualsIgnoreCase(String, String):Boolean</Item>
- <Item>String.Equals(String):Boolean</Item>
- <Item>one</Item>
- </Issue>
- </Message>
- <Message Id="two" TypeName="AvoidUnnecessaryStringCreation" Category="Microsoft.Performance" CheckId="CA1807" Created="2006-12-04 13:11:47Z">
- <Issue Name="UseStringCompareParameter">
- <Item>AmqBrokerInfo.StringEqualsIgnoreCase(String, String):Boolean</Item>
- <Item>String.Equals(String):Boolean</Item>
- <Item>two</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="NonBreaking">
- <Issue>
- <Item>AmqBrokerInfo.StringEqualsIgnoreCase(String, String):Boolean</Item>
- </Issue>
- </Message>
- <Message Id="System.String.ToLower" TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqBrokerInfo.StringEqualsIgnoreCase(String, String):Boolean</Item>
- <Item>System.String.ToLower</Item>
- <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item>
- </Issue>
- <Issue>
- <Item>AmqBrokerInfo.StringEqualsIgnoreCase(String, String):Boolean</Item>
- <Item>System.String.ToLower</Item>
- <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ToString():System.String">
- <Messages>
- <Message Id="this._transport" TypeName="AvoidUnnecessaryStringCreation" Category="Microsoft.Performance" CheckId="CA1807" Created="2006-12-04 13:11:47Z">
- <Issue Name="UseStringCompareLocal">
- <Item>AmqBrokerInfo.ToString():String</Item>
- <Item>String.Equals(String):Boolean</Item>
- <Item>this._transport</Item>
- </Issue>
- </Message>
- <Message Id="System.String.ToLower" TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqBrokerInfo.ToString():String</Item>
- <Item>System.String.ToLower</Item>
- <Item>System.String.ToLower(System.Globalization.CultureInfo)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="URL_FORMAT_EXAMPLE">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>URL_FORMAT_EXAMPLE</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>URL_FORMAT_EXAMPLE</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AmqChannel">
- <Messages>
- <Message Id="Amq" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Amq</Item>
- <Item>Qpid.Client.AmqChannel</Item>
- </Issue>
- </Message>
- <Message TypeName="ImplementIDisposableCorrectly" Category="Microsoft.Design" CheckId="CA1063" Created="2006-12-04 13:11:47Z">
- <Issue Name="ProvideDisposeBool">
- <Item>Qpid.Client.AmqChannel</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".cctor()">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.AmqChannel()</Item>
- <Item>_nextSessionNumber</Item>
- <Item>System.Int32</Item>
- <Item>0</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name=".ctor(Qpid.Client.AMQConnection,System.UInt16,System.Boolean,Qpid.Messaging.AcknowledgeMode,Qpid.Client.Message.MessageFactoryRegistry,System.Int32)">
- <Messages>
- <Message Id="defaultPrefetch" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2006-12-04 13:11:47Z" FixCategory="NonBreaking">
- <Issue>
- <Item>defaultPrefetch</Item>
- <Item>AmqChannel.AmqChannel(AMQConnection, UInt16, Boolean, AcknowledgeMode, MessageFactoryRegistry, Int32)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CheckNotTransacted():System.Void">
- <Messages>
- <Message Id="System.InvalidOperationException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.CheckNotTransacted():Void</Item>
- <Item>1</Item>
- <Item>InvalidOperationException.InvalidOperationException(String)</Item>
- <Item>Channel is transacted</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CheckTransacted():System.Void">
- <Messages>
- <Message Id="System.InvalidOperationException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.CheckTransacted():Void</Item>
- <Item>1</Item>
- <Item>InvalidOperationException.InvalidOperationException(String)</Item>
- <Item>Channel is not transacted</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ClosedWithException(System.Exception):System.Void">
- <Messages>
- <Message TypeName="DoNotCastUnnecessarily" Category="Microsoft.Performance" CheckId="CA1800" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>e</Item>
- <Item>Qpid.AMQException</Item>
- <Item>AmqChannel.ClosedWithException(Exception):Void</Item>
- <Item>castclass</Item>
- </Issue>
- </Message>
- <Message Id="Qpid.AMQException.#ctor(System.String,System.Exception)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.ClosedWithException(Exception):Void</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String, Exception)</Item>
- <Item>Closing session forcibly</Item>
- </Issue>
- </Message>
- <Message Id="0#e" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>AmqChannel.ClosedWithException(Exception):Void</Item>
- <Item>e</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumeFromQueue(System.String,System.Boolean,System.Boolean,Qpid.Messaging.AcknowledgeMode):System.String">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.ConsumeFromQueue(String, Boolean, Boolean, AcknowledgeMode):String</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateConsumer(System.String,System.Int32,System.Int32,System.Boolean,System.Boolean,System.Boolean,System.String):Qpid.Messaging.IMessageConsumer">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object[])" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.CreateConsumer(String, Int32, Int32, Boolean, Boolean, Boolean, String):IMessageConsumer</Item>
- <Item>System.String.Format(System.String,System.Object[])</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreatePublisher(System.String,System.String,Qpid.Messaging.DeliveryMode,System.Int64,System.Boolean,System.Boolean,System.Int32):Qpid.Messaging.IMessagePublisher">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.CreatePublisher(String, String, DeliveryMode, Int64, Boolean, Boolean, Int32):IMessagePublisher</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateTextMessage(System.String):Qpid.Messaging.ITextMessage">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>text</Item>
- <Item>AmqChannel.CreateTextMessage(String):ITextMessage</Item>
- <Item>initialValue</Item>
- <Item>IChannel.CreateTextMessage(String):ITextMessage</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DeclareExchange(System.String,System.String):System.Void">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.DeclareExchange(String, String):Void</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DeclareExchange(System.UInt16,System.UInt16,System.String,System.String,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,Qpid.Framing.FieldTable):System.Void">
- <Messages>
- <Message Id="System.NotImplementedException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.DeclareExchange(UInt16, UInt16, String, String, Boolean, Boolean, Boolean, Boolean, Boolean, FieldTable):Void</Item>
- <Item>1</Item>
- <Item>NotImplementedException.NotImplementedException(String)</Item>
- <Item>Don't use nowait=false with DeclareExchange</Item>
- </Issue>
- </Message>
- <Message Id="nowait" TypeName="LiteralsShouldBeSpelledCorrectly" Category="Microsoft.Usage" CheckId="CA2204" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>nowait</Item>
- <Item>Don't use nowait=false with DeclareExchange</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.DeclareExchange(UInt16, UInt16, String, String, Boolean, Boolean, Boolean, Boolean, Boolean, FieldTable):Void</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Dispose():System.Void">
- <Messages>
- <Message TypeName="ImplementIDisposableCorrectly" Category="Microsoft.Design" CheckId="CA1063" Created="2006-12-04 13:11:47Z">
- <Issue Name="DisposeImplementation">
- <Item>AmqChannel.Dispose():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DoBasicPublish(System.String,System.String,System.Boolean,System.Boolean,Qpid.Client.Message.AbstractQmsMessage,Qpid.Messaging.DeliveryMode,System.UInt32,System.Int32,System.Boolean):System.Void">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.DoBasicPublish(String, String, Boolean, Boolean, AbstractQmsMessage, DeliveryMode, UInt32, Int32, Boolean):Void</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- <Issue>
- <Item>AmqChannel.DoBasicPublish(String, String, Boolean, Boolean, AbstractQmsMessage, DeliveryMode, UInt32, Int32, Boolean):Void</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DoBind(System.String,System.String,System.String,Qpid.Framing.FieldTable):System.Void">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object[])" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.DoBind(String, String, String, FieldTable):Void</Item>
- <Item>System.String.Format(System.String,System.Object[])</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DoQueueDeclare(System.String,System.Boolean,System.Boolean,System.Boolean):System.Void">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object[])" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.DoQueueDeclare(String, Boolean, Boolean, Boolean):Void</Item>
- <Item>System.String.Format(System.String,System.Object[])</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReplayOnFailOver():System.Void">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqChannel.ReplayOnFailOver():Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- <Issue>
- <Item>AmqChannel.ReplayOnFailOver():Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Run():System.Void">
- <Messages>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>AmqChannel.Run():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Unsubscribe(System.String):System.Void">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>name</Item>
- <Item>AmqChannel.Unsubscribe(String):Void</Item>
- <Item>subscriptionName</Item>
- <Item>IChannel.Unsubscribe(String):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AmqChannel+Dispatcher">
- <Members>
- <Member Name=".ctor(Qpid.Client.AmqChannel)">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Dispatcher.Dispatcher(AmqChannel)</Item>
- <Item>_stopped</Item>
- <Item>System.Int32</Item>
- <Item>0</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DispatchMessage(Qpid.Client.Message.UnprocessedMessage):System.Void">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Dispatcher.DispatchMessage(UnprocessedMessage):Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQConnection">
- <Messages>
- <Message TypeName="ImplementIDisposableCorrectly" Category="Microsoft.Design" CheckId="CA1063" Created="2006-12-04 13:11:47Z">
- <Issue Name="ProvideDisposeBool">
- <Item>Qpid.Client.AMQConnection</Item>
- </Issue>
- </Message>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQConnection</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(Qpid.Client.qms.ConnectionInfo)">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQConnection.AMQConnection(ConnectionInfo)</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQConnection.AMQConnection(ConnectionInfo)</Item>
- <Item>_connected</Item>
- <Item>System.Boolean</Item>
- <Item>false</Item>
- </Issue>
- <Issue>
- <Item>AMQConnection.AMQConnection(ConnectionInfo)</Item>
- <Item>_lastAMQException</Item>
- <Item>Qpid.AMQException</Item>
- <Item>null</Item>
- </Issue>
- <Issue>
- <Item>AMQConnection.AMQConnection(ConnectionInfo)</Item>
- <Item>_nextChannelId</Item>
- <Item>System.Int32</Item>
- <Item>0</Item>
- </Issue>
- </Message>
- <Message Id="Qpid.Client.AMQConnectionException.#ctor(System.String,System.Exception)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQConnection.AMQConnection(ConnectionInfo)</Item>
- <Item>1</Item>
- <Item>AMQConnectionException.AMQConnectionException(String, Exception)</Item>
- <Item>Unable to connect</Item>
- </Issue>
- </Message>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQConnection.AMQConnection(ConnectionInfo)</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>ConnectionInfo must be specified</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="AttemptReconnection():System.Boolean">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQConnection.AttemptReconnection():Boolean</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="AttemptReconnection(System.String,System.Int32,System.Boolean):System.Boolean">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQConnection.AttemptReconnection(String, Int32, Boolean):Boolean</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>useSSL</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CloseSession(Qpid.Client.AmqChannel):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'channel'</Item>
- <Item>AMQConnection.CloseSession(AmqChannel):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Dispose():System.Void">
- <Messages>
- <Message TypeName="ImplementIDisposableCorrectly" Category="Microsoft.Design" CheckId="CA1063" Created="2006-12-04 13:11:47Z">
- <Issue Name="DisposeImplementation">
- <Item>AMQConnection.Dispose():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ExceptionReceived(System.Exception):System.Void">
- <Messages>
- <Message TypeName="DoNotCastUnnecessarily" Category="Microsoft.Performance" CheckId="CA1800" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>cause</Item>
- <Item>Qpid.Messaging.QpidException</Item>
- <Item>AMQConnection.ExceptionReceived(Exception):Void</Item>
- <Item>castclass</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="FireFailoverComplete():System.Void">
- <Messages>
- <Message TypeName="UseEventsWhereAppropriate" Category="Microsoft.Design" CheckId="CA1030" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FireFailoverComplete</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="FirePreFailover(System.Boolean):System.Boolean">
- <Messages>
- <Message TypeName="UseEventsWhereAppropriate" Category="Microsoft.Design" CheckId="CA1030" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FirePreFailover</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="FirePreResubscribe():System.Boolean">
- <Messages>
- <Message Id="Resubscribe" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Resubscribe</Item>
- <Item>AMQConnection.FirePreResubscribe():Boolean</Item>
- </Issue>
- </Message>
- <Message TypeName="UseEventsWhereAppropriate" Category="Microsoft.Design" CheckId="CA1030" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FirePreResubscribe</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="LoadTransportFromAssembly(System.String,System.Int32,System.String,System.String):Qpid.Client.Transport.ITransport">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQConnection.LoadTransportFromAssembly(String, Int32, String, String):ITransport</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQConnection.LoadTransportFromAssembly(String, Int32, String, String):ITransport</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MakeBrokerConnection(Qpid.Client.qms.BrokerInfo):System.Void">
- <Messages>
- <Message TypeName="RethrowToPreserveStackDetails" Category="Microsoft.Usage" CheckId="CA2200" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQConnection.MakeBrokerConnection(BrokerInfo):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReopenChannel(System.UInt16,System.UInt16,System.Boolean):System.Void">
- <Messages>
- <Message Id="Qpid.AMQException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQConnection.ReopenChannel(UInt16, UInt16, Boolean):Void</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String)</Item>
- <Item>Error reopening channel ____ after failover: __</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQConnection.ReopenChannel(UInt16, UInt16, Boolean):Void</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ResubscribeChannels():System.Void">
- <Messages>
- <Message Id="Resubscribe" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Resubscribe</Item>
- <Item>AMQConnection.ResubscribeChannels():Void</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQConnection.ResubscribeChannels():Void</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="StartHeartBeatThread(System.Int32):System.Void">
- <Messages>
- <Message Id="HeartBeat" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2006-12-04 13:11:47Z">
- <Issue Name="ShouldBeDiscreteTerm">
- <Item>HeartBeat</Item>
- <Item>method</Item>
- <Item>StartHeartBeatThread</Item>
- <Item>Heartbeat</Item>
- </Issue>
- </Message>
- <Message Id="heartbeatSeconds*1000" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>heartbeatSeconds*1000</Item>
- <Item>AMQConnection.StartHeartBeatThread(Int32):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="StopHeartBeatThread():System.Void">
- <Messages>
- <Message Id="HeartBeat" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2006-12-04 13:11:47Z">
- <Issue Name="ShouldBeDiscreteTerm">
- <Item>HeartBeat</Item>
- <Item>method</Item>
- <Item>StopHeartBeatThread</Item>
- <Item>Heartbeat</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="toURL():System.String">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>toURL</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AMQConnection.toURL():String</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Username">
- <Messages>
- <Message Id="Username" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2006-12-04 13:11:47Z">
- <Issue Name="ShouldBeCompoundWord">
- <Item>Username</Item>
- <Item>property</Item>
- <Item>Username</Item>
- <Item>UserName</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQConnectionException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.AMQConnectionException</Item>
- <Item>protected AMQConnectionException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Client.AMQConnectionException</Item>
- <Item>public AMQConnectionException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Client.AMQConnectionException</Item>
- <Item>public AMQConnectionException(String)</Item>
- </Issue>
- </Message>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQConnectionException</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(System.String,System.Exception)">
- <Messages>
- <Message Id="1#e" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>AMQConnectionException.AMQConnectionException(String, Exception)</Item>
- <Item>e</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQDestination">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQDestination</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="_destinationName">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_destinationName</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_destinationName</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_exchangeClass">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_exchangeClass</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_exchangeClass</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_exchangeName">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_exchangeName</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_exchangeName</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_isAutoDelete">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_isAutoDelete</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_isAutoDelete</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_isDurable">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_isDurable</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_isDurable</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_isExclusive">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_isExclusive</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_isExclusive</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_queueName">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_queueName</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_queueName</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Equals(System.Object):System.Boolean">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>o</Item>
- <Item>AMQDestination.Equals(Object):Boolean</Item>
- <Item>obj</Item>
- <Item>Object.Equals(Object):Boolean</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="StringsNotEqualNullSafe(System.String,System.String):System.Boolean">
- <Messages>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="NonBreaking">
- <Issue>
- <Item>AMQDestination.StringsNotEqualNullSafe(String, String):Boolean</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicMessageConsumer">
- <Messages>
- <Message TypeName="ImplementIDisposableCorrectly" Category="Microsoft.Design" CheckId="CA1063" Created="2006-12-04 13:11:47Z">
- <Issue Name="ProvideDisposeBool">
- <Item>Qpid.Client.BasicMessageConsumer</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="Dispose():System.Void">
- <Messages>
- <Message TypeName="ImplementIDisposableCorrectly" Category="Microsoft.Design" CheckId="CA1063" Created="2006-12-04 13:11:47Z">
- <Issue Name="DisposeImplementation">
- <Item>BasicMessageConsumer.Dispose():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="NotifyMessage(Qpid.Client.Message.UnprocessedMessage,System.Int32):System.Void">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageConsumer.NotifyMessage(UnprocessedMessage, Int32):Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- <Message Id="channelId" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2006-12-04 13:11:47Z" FixCategory="NonBreaking">
- <Issue>
- <Item>channelId</Item>
- <Item>BasicMessageConsumer.NotifyMessage(UnprocessedMessage, Int32):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OnMessage">
- <Accessors>
- <Accessor Name="set_OnMessage(Qpid.Messaging.MessageReceivedDelegate):System.Void">
- <Messages>
- <Message Id="System.InvalidOperationException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageConsumer.set_OnMessage(MessageReceivedDelegate):Void</Item>
- <Item>1</Item>
- <Item>InvalidOperationException.InvalidOperationException(String)</Item>
- <Item>Another thread is already receiving...</Item>
- </Issue>
- </Message>
- </Messages>
- </Accessor>
- </Accessors>
- </Member>
- <Member Name="Receive(System.Int64):Qpid.Messaging.IMessage">
- <Messages>
- <Message Id="System.InvalidOperationException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageConsumer.Receive(Int64):IMessage</Item>
- <Item>1</Item>
- <Item>InvalidOperationException.InvalidOperationException(String)</Item>
- <Item>Another thread is already receiving (possibly asynchronously)...</Item>
- </Issue>
- </Message>
- <Message Id="System.NotImplementedException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageConsumer.Receive(Int64):IMessage</Item>
- <Item>1</Item>
- <Item>NotImplementedException.NotImplementedException(String)</Item>
- <Item>Need to implement synchronousQueue.Poll(timeout</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReceiveNoWait():Qpid.Messaging.IMessage">
- <Messages>
- <Message Id="System.InvalidOperationException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageConsumer.ReceiveNoWait():IMessage</Item>
- <Item>1</Item>
- <Item>InvalidOperationException.InvalidOperationException(String)</Item>
- <Item>Another thread is already receiving (possibly asynchronously)...</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReturnMessageOrThrow(System.Object):Qpid.Messaging.IMessage">
- <Messages>
- <Message TypeName="DoNotCastUnnecessarily" Category="Microsoft.Performance" CheckId="CA1800" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>o</Item>
- <Item>System.Exception</Item>
- <Item>BasicMessageConsumer.ReturnMessageOrThrow(Object):IMessage</Item>
- <Item>castclass</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="NonBreaking">
- <Issue>
- <Item>BasicMessageConsumer.ReturnMessageOrThrow(Object):IMessage</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicMessageProducer">
- <Messages>
- <Message TypeName="ImplementIDisposableCorrectly" Category="Microsoft.Design" CheckId="CA1063" Created="2006-12-04 13:11:47Z">
- <Issue Name="ProvideDisposeBool">
- <Item>Qpid.Client.BasicMessageProducer</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(System.String,System.String,System.Boolean,System.UInt16,Qpid.Client.AmqChannel,System.Int64,Qpid.Messaging.DeliveryMode,System.Int64,System.Boolean,System.Boolean,System.Int32)">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'channel'</Item>
- <Item>BasicMessageProducer.BasicMessageProducer(String, String, Boolean, UInt16, AmqChannel, Int64, DeliveryMode, Int64, Boolean, Boolean, Int32)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_channelId">
- <Messages>
- <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageProducer._channelId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_encoding">
- <Messages>
- <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageProducer._encoding</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_immediate">
- <Messages>
- <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageProducer._immediate</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_logger">
- <Messages>
- <Message TypeName="DoNotDeclareReadOnlyMutableReferenceTypes" Category="Microsoft.Security" CheckId="CA2104" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageProducer._logger</Item>
- <Item>log4net.ILog</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_logger</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_logger</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_mandatory">
- <Messages>
- <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageProducer._mandatory</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_mimeType">
- <Messages>
- <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageProducer._mimeType</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_transacted">
- <Messages>
- <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageProducer._transacted</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DEFAULT_IMMEDIATE">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DEFAULT_IMMEDIATE</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicMessageProducer.DEFAULT_IMMEDIATE</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DEFAULT_MANDATORY">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DEFAULT_MANDATORY</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicMessageProducer.DEFAULT_MANDATORY</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DisableMessageID">
- <Accessors>
- <Accessor Name="get_DisableMessageID():System.Boolean">
- <Messages>
- <Message Id="System.Exception.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageProducer.get_DisableMessageID():Boolean</Item>
- <Item>1</Item>
- <Item>Exception.Exception(String)</Item>
- <Item>The method or operation is not implemented.</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2006-12-04 13:11:47Z">
- <Issue Name="TooGeneric">
- <Item>BasicMessageProducer.get_DisableMessageID():Boolean</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Accessor>
- <Accessor Name="set_DisableMessageID(System.Boolean):System.Void">
- <Messages>
- <Message Id="System.Exception.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicMessageProducer.set_DisableMessageID(Boolean):Void</Item>
- <Item>1</Item>
- <Item>Exception.Exception(String)</Item>
- <Item>The method or operation is not implemented.</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2006-12-04 13:11:47Z">
- <Issue Name="TooGeneric">
- <Item>BasicMessageProducer.set_DisableMessageID(Boolean):Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Accessor>
- </Accessors>
- </Member>
- <Member Name="Dispose():System.Void">
- <Messages>
- <Message TypeName="ImplementIDisposableCorrectly" Category="Microsoft.Design" CheckId="CA1063" Created="2006-12-04 13:11:47Z">
- <Issue Name="DisposeImplementation">
- <Item>BasicMessageProducer.Dispose():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Encoding">
- <Messages>
- <Message TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Encoding</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MimeType">
- <Messages>
- <Message TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MimeType</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Priority">
- <Accessors>
- <Accessor Name="set_Priority(System.Int32):System.Void">
- <Messages>
- <Message TypeName="InstantiateArgumentExceptionsCorrectly" Category="Microsoft.Usage" CheckId="CA2208" Created="2006-12-04 13:11:47Z">
- <Issue Name="OneArgumentShouldBeParameterName">
- <Item>System.ArgumentOutOfRangeException</Item>
- <Item>ArgumentOutOfRangeException.ArgumentOutOfRangeException(String)</Item>
- <Item>Priority of ____ is illegal. Value must be in range 0 to 9</Item>
- </Issue>
- </Message>
- </Messages>
- </Accessor>
- </Accessors>
- </Member>
- <Member Name="TimeToLive">
- <Accessors>
- <Accessor Name="set_TimeToLive(System.Int64):System.Void">
- <Messages>
- <Message TypeName="InstantiateArgumentExceptionsCorrectly" Category="Microsoft.Usage" CheckId="CA2208" Created="2006-12-04 13:11:47Z">
- <Issue Name="OneArgumentShouldBeParameterName">
- <Item>System.ArgumentOutOfRangeException</Item>
- <Item>ArgumentOutOfRangeException.ArgumentOutOfRangeException(String)</Item>
- <Item>Time to live must be non-negative - supplied value was __</Item>
- </Issue>
- </Message>
- </Messages>
- </Accessor>
- </Accessors>
- </Member>
- </Members>
- </Type>
- <Type Name="Closeable">
- <Messages>
- <Message TypeName="IdentifiersShouldDifferByMoreThanCase" Category="Microsoft.Naming" CheckId="CA1708" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>'CLOSED'</Item>
- <Item>Closed</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="_closed">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_closed</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_closed</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_closingLock">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_closingLock</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_closingLock</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CheckNotClosed():System.Void">
- <Messages>
- <Message Id="System.InvalidOperationException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Closeable.CheckNotClosed():Void</Item>
- <Item>1</Item>
- <Item>InvalidOperationException.InvalidOperationException(String)</Item>
- <Item>Object ____ has been closed</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CLOSED">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Closeable.CLOSED</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="NOT_CLOSED">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>NOT_CLOSED</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Closeable.NOT_CLOSED</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionTuneParameters">
- <Members>
- <Member Name="TxnLimit">
- <Messages>
- <Message Id="Txn" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Txn</Item>
- <Item>ConnectionTuneParameters.TxnLimit:UInt32</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QpidConnectionInfo">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qpid</Item>
- <Item>Qpid.Client.QpidConnectionInfo</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor()">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>QpidConnectionInfo.QpidConnectionInfo()</Item>
- <Item>_failoverMethod</Item>
- <Item>System.String</Item>
- <Item>null</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>QpidConnectionInfo.QpidConnectionInfo()</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_logger">
- <Messages>
- <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>QpidConnectionInfo._logger</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="AddBrokerInfo(Qpid.Client.qms.BrokerInfo):System.Void">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>brokerInfo</Item>
- <Item>QpidConnectionInfo.AddBrokerInfo(BrokerInfo):Void</Item>
- <Item>broker</Item>
- <Item>ConnectionInfo.AddBrokerInfo(BrokerInfo):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="AsUrl():System.String">
- <Messages>
- <Message TypeName="DoNotConcatenateStringsInsideLoops" Category="Microsoft.Performance" CheckId="CA1818" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>QpidConnectionInfo.AsUrl():String</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="FromUrl(System.String):Qpid.Client.qms.ConnectionInfo">
- <Messages>
- <Message Id="0#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>url</Item>
- <Item>QpidConnectionInfo.FromUrl(String):ConnectionInfo</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QpidConnectionUrl">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qpid</Item>
- <Item>Qpid.Client.QpidConnectionUrl</Item>
- </Issue>
- </Message>
- <Message TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>QpidConnectionUrl</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="FromUri(System.Uri):Qpid.Client.qms.ConnectionInfo">
- <Messages>
- <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>QpidConnectionUrl.FromUri(Uri):ConnectionInfo</Item>
- </Issue>
- </Message>
- <Message Id="uri" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2006-12-04 13:11:47Z" FixCategory="NonBreaking">
- <Issue>
- <Item>uri</Item>
- <Item>QpidConnectionUrl.FromUri(Uri):ConnectionInfo</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="FromUrl(System.String):Qpid.Client.qms.ConnectionInfo">
- <Messages>
- <Message Id="url" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2006-12-04 13:11:47Z" FixCategory="NonBreaking">
- <Issue>
- <Item>url</Item>
- <Item>QpidConnectionUrl.FromUrl(String):ConnectionInfo</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Client.Failover">
- <Types>
- <Type Name="FailoverException">
- <Messages>
- <Message TypeName="ExceptionsShouldBePublic" Category="Microsoft.Design" CheckId="CA1064" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.Failover.FailoverException</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="FailoverHandler">
- <Messages>
- <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>Qpid.Client.Failover.FailoverHandler</Item>
- <Item>System.Threading.ManualResetEvent</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="getHost():System.String">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>getHost</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="getPort():System.Int32">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>getPort</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Run():System.Void">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverHandler.Run():Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- <Issue>
- <Item>FailoverHandler.Run():Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- <Message Id="Qpid.AMQDisconnectedException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverHandler.Run():Void</Item>
- <Item>1</Item>
- <Item>AMQDisconnectedException.AMQDisconnectedException(String)</Item>
- <Item>Redirect was vetoed by client</Item>
- </Issue>
- <Issue>
- <Item>FailoverHandler.Run():Void</Item>
- <Item>1</Item>
- <Item>AMQDisconnectedException.AMQDisconnectedException(String)</Item>
- <Item>Server closed connection and no failover was successful</Item>
- </Issue>
- </Message>
- <Message Id="Qpid.Client.Failover.FailoverException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverHandler.Run():Void</Item>
- <Item>1</Item>
- <Item>FailoverException.FailoverException(String)</Item>
- <Item>Failing over about to start</Item>
- </Issue>
- </Message>
- <Message Id="System.InvalidOperationException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverHandler.Run():Void</Item>
- <Item>1</Item>
- <Item>InvalidOperationException.InvalidOperationException(String)</Item>
- <Item>FailoverHandler must Run on a non-background thread.</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setHost(System.String):System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>setHost</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setPort(System.Int32):System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>setPort</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FailoverSupport">
- <Members>
- <Member Name="execute(Qpid.Client.AMQConnection):System.Object">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>execute</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'con'</Item>
- <Item>FailoverSupport.execute(AMQConnection):Object</Item>
- </Issue>
- <Issue>
- <Item>'con'</Item>
- <Item>FailoverSupport.execute(AMQConnection):Object</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="operation():System.Object">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>operation</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Client.Handler">
- <Types>
- <Type Name="BasicDeliverMethodHandler">
- <Members>
- <Member Name="MethodReceived(Qpid.Client.State.AMQStateManager,Qpid.Client.Protocol.AMQMethodEvent):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'evt'</Item>
- <Item>BasicDeliverMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicReturnMethodHandler">
- <Members>
- <Member Name="MethodReceived(Qpid.Client.State.AMQStateManager,Qpid.Client.Protocol.AMQMethodEvent):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'evt'</Item>
- <Item>BasicReturnMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ChannelCloseMethodHandler">
- <Members>
- <Member Name="MethodReceived(Qpid.Client.State.AMQStateManager,Qpid.Client.Protocol.AMQMethodEvent):System.Void">
- <Messages>
- <Message Id="Qpid.AMQChannelClosedException.#ctor(System.Int32,System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ChannelCloseMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- <Item>2</Item>
- <Item>AMQChannelClosedException.AMQChannelClosedException(Int32, String)</Item>
- <Item>Error: __</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'evt'</Item>
- <Item>ChannelCloseMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionCloseMethodHandler">
- <Members>
- <Member Name="MethodReceived(Qpid.Client.State.AMQStateManager,Qpid.Client.Protocol.AMQMethodEvent):System.Void">
- <Messages>
- <Message Id="Qpid.AMQConnectionClosedException.#ctor(System.Int32,System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConnectionCloseMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- <Item>2</Item>
- <Item>AMQConnectionClosedException.AMQConnectionClosedException(Int32, String)</Item>
- <Item>Error: __</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'evt'</Item>
- <Item>ConnectionCloseMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- </Issue>
- <Issue>
- <Item>'stateManager'</Item>
- <Item>ConnectionCloseMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionCloseOkHandler">
- <Members>
- <Member Name="MethodReceived(Qpid.Client.State.AMQStateManager,Qpid.Client.Protocol.AMQMethodEvent):System.Void">
- <Messages>
- <Message Id="method" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConnectionCloseOkHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- <Item>method</Item>
- <Item>Qpid.Framing.ConnectionCloseOkBody</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'evt'</Item>
- <Item>ConnectionCloseOkHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- </Issue>
- <Issue>
- <Item>'stateManager'</Item>
- <Item>ConnectionCloseOkHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionOpenOkMethodHandler">
- <Members>
- <Member Name="MethodReceived(Qpid.Client.State.AMQStateManager,Qpid.Client.Protocol.AMQMethodEvent):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'stateManager'</Item>
- <Item>ConnectionOpenOkMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionRedirectMethodHandler">
- <Members>
- <Member Name="_logger">
- <Messages>
- <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConnectionRedirectMethodHandler._logger</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetInstance():Qpid.Client.Handler.ConnectionRedirectMethodHandler">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetInstance</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionSecureMethodHandler">
- <Members>
- <Member Name="MethodReceived(Qpid.Client.State.AMQStateManager,Qpid.Client.Protocol.AMQMethodEvent):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'evt'</Item>
- <Item>ConnectionSecureMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionStartMethodHandler">
- <Members>
- <Member Name="GetFullSystemInfo():System.String">
- <Messages>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="NonBreaking">
- <Issue>
- <Item>ConnectionStartMethodHandler.GetFullSystemInfo():String</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MethodReceived(Qpid.Client.State.AMQStateManager,Qpid.Client.Protocol.AMQMethodEvent):System.Void">
- <Messages>
- <Message Id="Qpid.AMQException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConnectionStartMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String)</Item>
- <Item>No locales sent from server, passed: __</Item>
- </Issue>
- <Issue>
- <Item>ConnectionStartMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String)</Item>
- <Item>No supported security mechanism found, passed: __</Item>
- </Issue>
- </Message>
- <Message Id="Qpid.AMQException.#ctor(log4net.ILog,System.String,System.Exception)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConnectionStartMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- <Item>2</Item>
- <Item>AMQException.AMQException(ILog, String, Exception)</Item>
- <Item>Unable to decode data: __</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'evt'</Item>
- <Item>ConnectionStartMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- </Issue>
- <Issue>
- <Item>'stateManager'</Item>
- <Item>ConnectionStartMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionTuneMethodHandler">
- <Members>
- <Member Name="MethodReceived(Qpid.Client.State.AMQStateManager,Qpid.Client.Protocol.AMQMethodEvent):System.Void">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConnectionTuneMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'evt'</Item>
- <Item>ConnectionTuneMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- </Issue>
- <Issue>
- <Item>'stateManager'</Item>
- <Item>ConnectionTuneMethodHandler.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Client.Message">
- <Types>
- <Type Name="AbstractQmsMessage">
- <Messages>
- <Message Id="Qms" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qms</Item>
- <Item>Qpid.Client.Message.AbstractQmsMessage</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="_data">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_data</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_data</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_redelivered">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_redelivered</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_redelivered</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetExchangeName(System.String,System.String&amp;):System.String">
- <Messages>
- <Message TypeName="ProvideCorrectArgumentsToFormattingMethods" Category="Microsoft.Usage" CheckId="CA2241" Created="2006-12-04 13:11:47Z">
- <Issue Name="MissingSpecifier">
- <Item>String.Format(String, Object[]):String</Item>
- <Item>AbstractQmsMessage.GetExchangeName(String, String&amp;):String</Item>
- <Item>'stack2'</Item>
- <Item>split = {0}</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AbstractQmsMessage.GetExchangeName(String, String&amp;):String</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- <Issue>
- <Item>AbstractQmsMessage.GetExchangeName(String, String&amp;):String</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- <Issue>
- <Item>AbstractQmsMessage.GetExchangeName(String, String&amp;):String</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object[])" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AbstractQmsMessage.GetExchangeName(String, String&amp;):String</Item>
- <Item>System.String.Format(System.String,System.Object[])</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- <Issue>
- <Item>AbstractQmsMessage.GetExchangeName(String, String&amp;):String</Item>
- <Item>System.String.Format(System.String,System.Object[])</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ToString():System.String">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AbstractQmsMessage.ToString():String</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteReplyToHeader(Qpid.Client.Message.AbstractQmsMessage+Dest):System.Void">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AbstractQmsMessage.WriteReplyToHeader(Dest):Void</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AbstractQmsMessageFactory">
- <Messages>
- <Message Id="Qms" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qms</Item>
- <Item>Qpid.Client.Message.AbstractQmsMessageFactory</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CreateMessage(System.Int64,Qpid.Buffer.ByteBuffer,Qpid.Framing.ContentHeaderBody):Qpid.Client.Message.AbstractQmsMessage">
- <Messages>
- <Message Id="0#Nbr" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>AbstractQmsMessageFactory.CreateMessage(Int64, ByteBuffer, ContentHeaderBody):AbstractQmsMessage</Item>
- <Item>Nbr</Item>
- <Item>messageNbr</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateMessage(System.Int64,System.Boolean,Qpid.Framing.ContentHeaderBody,System.Collections.IList):Qpid.Client.Message.AbstractQmsMessage">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>messageNbr</Item>
- <Item>AbstractQmsMessageFactory.CreateMessage(Int64, Boolean, ContentHeaderBody, IList):AbstractQmsMessage</Item>
- <Item>deliverTag</Item>
- <Item>IMessageFactory.CreateMessage(Int64, Boolean, ContentHeaderBody, IList):AbstractQmsMessage</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateMessageWithBody(System.Int64,Qpid.Framing.ContentHeaderBody,System.Collections.IList):Qpid.Client.Message.AbstractQmsMessage">
- <Messages>
- <Message Id="0#Nbr" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>AbstractQmsMessageFactory.CreateMessageWithBody(Int64, ContentHeaderBody, IList):AbstractQmsMessage</Item>
- <Item>Nbr</Item>
- <Item>messageNbr</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'bodies'</Item>
- <Item>AbstractQmsMessageFactory.CreateMessageWithBody(Int64, ContentHeaderBody, IList):AbstractQmsMessage</Item>
- </Issue>
- <Issue>
- <Item>'bodies'</Item>
- <Item>AbstractQmsMessageFactory.CreateMessageWithBody(Int64, ContentHeaderBody, IList):AbstractQmsMessage</Item>
- </Issue>
- <Issue>
- <Item>'contentHeader'</Item>
- <Item>AbstractQmsMessageFactory.CreateMessageWithBody(Int64, ContentHeaderBody, IList):AbstractQmsMessage</Item>
- </Issue>
- <Issue>
- <Item>'contentHeader'</Item>
- <Item>AbstractQmsMessageFactory.CreateMessageWithBody(Int64, ContentHeaderBody, IList):AbstractQmsMessage</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQMessage">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQMessage</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="_channel">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_channel</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_channel</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_contentHeaderProperties">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_contentHeaderProperties</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_contentHeaderProperties</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="MessageFactoryRegistry">
- <Members>
- <Member Name="CreateMessage(System.Int64,System.Boolean,Qpid.Framing.ContentHeaderBody,System.Collections.IList):Qpid.Client.Message.AbstractQmsMessage">
- <Messages>
- <Message Id="Qpid.AMQException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MessageFactoryRegistry.CreateMessage(Int64, Boolean, ContentHeaderBody, IList):AbstractQmsMessage</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String)</Item>
- <Item>Unsupport MIME type of __</Item>
- </Issue>
- </Message>
- <Message Id="0#Nbr" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>MessageFactoryRegistry.CreateMessage(Int64, Boolean, ContentHeaderBody, IList):AbstractQmsMessage</Item>
- <Item>Nbr</Item>
- <Item>messageNbr</Item>
- </Issue>
- </Message>
- <Message Id="Unsupport" TypeName="LiteralsShouldBeSpelledCorrectly" Category="Microsoft.Usage" CheckId="CA2204" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Unsupport</Item>
- <Item>Unsupport MIME type of __</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'contentHeader'</Item>
- <Item>MessageFactoryRegistry.CreateMessage(Int64, Boolean, ContentHeaderBody, IList):AbstractQmsMessage</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateMessage(System.String):Qpid.Client.Message.AbstractQmsMessage">
- <Messages>
- <Message Id="Qpid.AMQException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MessageFactoryRegistry.CreateMessage(String):AbstractQmsMessage</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String)</Item>
- <Item>Unsupport MIME type of __</Item>
- </Issue>
- </Message>
- <Message TypeName="InstantiateArgumentExceptionsCorrectly" Category="Microsoft.Usage" CheckId="CA2208" Created="2006-12-04 13:11:47Z">
- <Issue Name="OneArgumentShouldBeParameterName">
- <Item>System.ArgumentNullException</Item>
- <Item>ArgumentNullException.ArgumentNullException(String)</Item>
- <Item>Mime type must not be null</Item>
- </Issue>
- </Message>
- <Message Id="Unsupport" TypeName="LiteralsShouldBeSpelledCorrectly" Category="Microsoft.Usage" CheckId="CA2204" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Unsupport</Item>
- <Item>Unsupport MIME type of __</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="RegisterFactory(System.String,Qpid.Client.Message.IMessageFactory):System.Void">
- <Messages>
- <Message TypeName="InstantiateArgumentExceptionsCorrectly" Category="Microsoft.Usage" CheckId="CA2208" Created="2006-12-04 13:11:47Z">
- <Issue Name="OneArgumentShouldBeParameterName">
- <Item>System.ArgumentNullException</Item>
- <Item>ArgumentNullException.ArgumentNullException(String)</Item>
- <Item>Message factory</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QpidBytesMessage">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Message.QpidBytesMessage</Item>
- </Issue>
- </Message>
- <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>Qpid.Client.Message.QpidBytesMessage</Item>
- <Item>System.IO.MemoryStream, System.IO.BinaryWriter, System.IO.BinaryReader</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="ReadBytes(System.Byte[]):System.Int32">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>bytes</Item>
- <Item>QpidBytesMessage.ReadBytes(Byte[]):Int32</Item>
- <Item>array</Item>
- <Item>IBytesMessage.ReadBytes(Byte[]):Int32</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReadBytes(System.Byte[],System.Int32):System.Int32">
- <Messages>
- <Message TypeName="InstantiateArgumentExceptionsCorrectly" Category="Microsoft.Usage" CheckId="CA2208" Created="2006-12-04 13:11:47Z">
- <Issue Name="OneArgumentShouldBeParameterName">
- <Item>System.ArgumentOutOfRangeException</Item>
- <Item>ArgumentOutOfRangeException.ArgumentOutOfRangeException(String)</Item>
- <Item>count must be &gt;= 0</Item>
- </Issue>
- </Message>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>bytes</Item>
- <Item>QpidBytesMessage.ReadBytes(Byte[], Int32):Int32</Item>
- <Item>array</Item>
- <Item>IBytesMessage.ReadBytes(Byte[], Int32):Int32</Item>
- </Issue>
- </Message>
- <Message Id="1#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>count</Item>
- <Item>QpidBytesMessage.ReadBytes(Byte[], Int32):Int32</Item>
- <Item>length</Item>
- <Item>IBytesMessage.ReadBytes(Byte[], Int32):Int32</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Write(System.Double):System.Void">
- <Messages>
- <Message Id="0#v" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>QpidBytesMessage.Write(Double):Void</Item>
- <Item>v</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Write(System.Int32):System.Void">
- <Messages>
- <Message Id="0#i" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>QpidBytesMessage.Write(Int32):Void</Item>
- <Item>i</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Write(System.Int64):System.Void">
- <Messages>
- <Message Id="0#l" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>QpidBytesMessage.Write(Int64):Void</Item>
- <Item>l</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Write(System.Single):System.Void">
- <Messages>
- <Message Id="0#v" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>QpidBytesMessage.Write(Single):Void</Item>
- <Item>v</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteBoolean(System.Boolean):System.Void">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>b</Item>
- <Item>QpidBytesMessage.WriteBoolean(Boolean):Void</Item>
- <Item>value</Item>
- <Item>IBytesMessage.WriteBoolean(Boolean):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteByte(System.Byte):System.Void">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>b</Item>
- <Item>QpidBytesMessage.WriteByte(Byte):Void</Item>
- <Item>value</Item>
- <Item>IBytesMessage.WriteByte(Byte):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteBytes(System.Byte[]):System.Void">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>bytes</Item>
- <Item>QpidBytesMessage.WriteBytes(Byte[]):Void</Item>
- <Item>value</Item>
- <Item>IBytesMessage.WriteBytes(Byte[]):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteBytes(System.Byte[],System.Int32,System.Int32):System.Void">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>bytes</Item>
- <Item>QpidBytesMessage.WriteBytes(Byte[], Int32, Int32):Void</Item>
- <Item>value</Item>
- <Item>IBytesMessage.WriteBytes(Byte[], Int32, Int32):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteChar(System.Char):System.Void">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>c</Item>
- <Item>QpidBytesMessage.WriteChar(Char):Void</Item>
- <Item>value</Item>
- <Item>IBytesMessage.WriteChar(Char):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteShort(System.Int16):System.Void">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>i</Item>
- <Item>QpidBytesMessage.WriteShort(Int16):Void</Item>
- <Item>value</Item>
- <Item>IBytesMessage.WriteShort(Int16):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QpidBytesMessageFactory">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Message.QpidBytesMessageFactory</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CreateMessage(System.Int64,Qpid.Buffer.ByteBuffer,Qpid.Framing.ContentHeaderBody):Qpid.Client.Message.AbstractQmsMessage">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>deliveryTag</Item>
- <Item>QpidBytesMessageFactory.CreateMessage(Int64, ByteBuffer, ContentHeaderBody):AbstractQmsMessage</Item>
- <Item>messageNbr</Item>
- <Item>AbstractQmsMessageFactory.CreateMessage(Int64, ByteBuffer, ContentHeaderBody):AbstractQmsMessage</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QpidHeaders">
- <Members>
- <Member Name="CheckPropertyName(System.String):System.Void">
- <Messages>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>QpidHeaders.CheckPropertyName(String):Void</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>Property name must not be the empty string</Item>
- </Issue>
- </Message>
- <Message TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820" Created="2006-12-04 13:11:47Z">
- <Issue Name="IsNullOrEmpty">
- <Item>Equals</Item>
- <Item>""</Item>
- <Item>QpidHeaders.CheckPropertyName(String):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Clear():System.Void">
- <Messages>
- <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>QpidHeaders.Clear():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QpidTextMessage">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Message.QpidTextMessage</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(Qpid.Buffer.ByteBuffer)">
- <Messages>
- <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>QpidTextMessage.QpidTextMessage(ByteBuffer)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name=".ctor(System.String)">
- <Messages>
- <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>QpidTextMessage.QpidTextMessage(String)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QpidTextMessageFactory">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qpid</Item>
- <Item>Qpid.Client.Message.QpidTextMessageFactory</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CreateMessage(System.Int64,Qpid.Buffer.ByteBuffer,Qpid.Framing.ContentHeaderBody):Qpid.Client.Message.AbstractQmsMessage">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>deliveryTag</Item>
- <Item>QpidTextMessageFactory.CreateMessage(Int64, ByteBuffer, ContentHeaderBody):AbstractQmsMessage</Item>
- <Item>messageNbr</Item>
- <Item>AbstractQmsMessageFactory.CreateMessage(Int64, ByteBuffer, ContentHeaderBody):AbstractQmsMessage</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="UnexpectedBodyReceivedException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.Message.UnexpectedBodyReceivedException</Item>
- <Item>protected UnexpectedBodyReceivedException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Client.Message.UnexpectedBodyReceivedException</Item>
- <Item>public UnexpectedBodyReceivedException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Client.Message.UnexpectedBodyReceivedException</Item>
- <Item>public UnexpectedBodyReceivedException(String)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Client.Message.UnexpectedBodyReceivedException</Item>
- <Item>public UnexpectedBodyReceivedException(String, Exception)</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(log4net.ILog,System.String,System.Exception)">
- <Messages>
- <Message Id="2#t" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>UnexpectedBodyReceivedException.UnexpectedBodyReceivedException(ILog, String, Exception)</Item>
- <Item>t</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="UnprocessedMessage">
- <Members>
- <Member Name=".ctor()">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>UnprocessedMessage.UnprocessedMessage()</Item>
- <Item>_bytesReceived</Item>
- <Item>System.UInt64</Item>
- <Item>0</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Bodies">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Bodies</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="BounceBody">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BounceBody</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ChannelId">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ChannelId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ContentHeader">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ContentHeader</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DeliverBody">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DeliverBody</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReceiveBody(Qpid.Framing.ContentBody):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'body'</Item>
- <Item>UnprocessedMessage.ReceiveBody(ContentBody):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Client.Protocol">
- <Types>
- <Type Name="AMQMethodEvent">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQMethodEvent</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="AMQProtocolListener">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQProtocolListener</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(Qpid.Client.AMQConnection,Qpid.Client.State.AMQStateManager)">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQProtocolListener.AMQProtocolListener(AMQConnection, AMQStateManager)</Item>
- <Item>_protocolSession</Item>
- <Item>Qpid.Client.Protocol.AMQProtocolSession</Item>
- <Item>null</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OnException(System.Exception):System.Void">
- <Messages>
- <Message Id="Qpid.AMQException.#ctor(System.String,System.Exception)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQProtocolListener.OnException(Exception):Void</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String, Exception)</Item>
- <Item>Protocol handler error: __</Item>
- </Issue>
- </Message>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>cause</Item>
- <Item>AMQProtocolListener.OnException(Exception):Void</Item>
- <Item>e</Item>
- <Item>IProtocolListener.OnException(Exception):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OnMessage(Qpid.Framing.IDataBlock):System.Void">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQProtocolListener.OnMessage(IDataBlock):Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- <Message Id="Qpid.AMQException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQProtocolListener.OnMessage(IDataBlock):Void</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String)</Item>
- <Item>AMQMethodEvent ____ was not processed by any listener.</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQProtocolListener.OnMessage(IDataBlock):Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'message'</Item>
- <Item>AMQProtocolListener.OnMessage(IDataBlock):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="PropagateExceptionToWaiters(System.Exception):System.Void">
- <Messages>
- <Message Id="0#e" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>AMQProtocolListener.PropagateExceptionToWaiters(Exception):Void</Item>
- <Item>e</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ProtocolSession">
- <Messages>
- <Message TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ProtocolSession</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="RemoveFrameListener(Qpid.Client.Protocol.Listener.IAMQMethodListener):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'listener'</Item>
- <Item>AMQProtocolListener.RemoveFrameListener(IAMQMethodListener):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WhenClosed():System.Void">
- <Messages>
- <Message Id="Qpid.AMQDisconnectedException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQProtocolListener.WhenClosed():Void</Item>
- <Item>1</Item>
- <Item>AMQDisconnectedException.AMQDisconnectedException(String)</Item>
- <Item>Server closed connection and reconnection not permitted.</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQProtocolSession">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQProtocolSession</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="AddSessionByChannel(System.UInt16,Qpid.Client.AmqChannel):System.Void">
- <Messages>
- <Message TypeName="InstantiateArgumentExceptionsCorrectly" Category="Microsoft.Usage" CheckId="CA2208" Created="2006-12-04 13:11:47Z">
- <Issue Name="OneArgumentShouldBeParameterName">
- <Item>System.ArgumentNullException</Item>
- <Item>ArgumentNullException.ArgumentNullException(String)</Item>
- <Item>Attempt to register a null channel</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="AMQConnection">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AMQProtocolSession.AMQConnection:AMQConnection</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CloseSession(Qpid.Client.AmqChannel):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'channel'</Item>
- <Item>AMQProtocolSession.CloseSession(AmqChannel):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConnectionTuneParameters">
- <Accessors>
- <Accessor Name="set_ConnectionTuneParameters(Qpid.Client.ConnectionTuneParameters):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'value'</Item>
- <Item>AMQProtocolSession.set_ConnectionTuneParameters(ConnectionTuneParameters):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Accessor>
- </Accessors>
- </Member>
- <Member Name="MessageContentBodyReceived(System.UInt16,Qpid.Framing.ContentBody):System.Void">
- <Messages>
- <Message Id="Qpid.AMQException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQProtocolSession.MessageContentBodyReceived(UInt16, ContentBody):Void</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String)</Item>
- <Item>Error: received content body without having received a BasicDeliver frame first</Item>
- </Issue>
- </Message>
- <Message TypeName="RethrowToPreserveStackDetails" Category="Microsoft.Usage" CheckId="CA2200" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQProtocolSession.MessageContentBodyReceived(UInt16, ContentBody):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MessageContentHeaderReceived(System.UInt16,Qpid.Framing.ContentHeaderBody):System.Void">
- <Messages>
- <Message Id="Qpid.AMQException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQProtocolSession.MessageContentHeaderReceived(UInt16, ContentHeaderBody):Void</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String)</Item>
- <Item>Error: received content header without having received a JMSDeliver frame first</Item>
- </Issue>
- <Issue>
- <Item>AMQProtocolSession.MessageContentHeaderReceived(UInt16, ContentHeaderBody):Void</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String)</Item>
- <Item>Error: received duplicate content header or did not receive correct number of content body frames</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="UnprocessedMessageReceived(Qpid.Client.Message.UnprocessedMessage):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'message'</Item>
- <Item>AMQProtocolSession.UnprocessedMessageReceived(UnprocessedMessage):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Username">
- <Messages>
- <Message Id="Username" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2006-12-04 13:11:47Z">
- <Issue Name="ShouldBeCompoundWord">
- <Item>Username</Item>
- <Item>property</Item>
- <Item>Username</Item>
- <Item>UserName</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IProtocolListener">
- <Members>
- <Member Name="OnException(System.Exception):System.Void">
- <Messages>
- <Message Id="0#e" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>IProtocolListener.OnException(Exception):Void</Item>
- <Item>e</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ProtocolWriter">
- <Members>
- <Member Name="SyncWrite(Qpid.Framing.AMQFrame,System.Type):Qpid.Client.Protocol.AMQMethodEvent">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'frame'</Item>
- <Item>ProtocolWriter.SyncWrite(AMQFrame, Type):AMQMethodEvent</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Client.Protocol.Listener">
- <Types>
- <Type Name="BlockingMethodFrameListener">
- <Messages>
- <Message TypeName="AbstractTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1012" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BlockingMethodFrameListener</Item>
- </Issue>
- </Message>
- <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>Qpid.Client.Protocol.Listener.BlockingMethodFrameListener</Item>
- <Item>System.Threading.ManualResetEvent</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(System.UInt16)">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BlockingMethodFrameListener.BlockingMethodFrameListener(UInt16)</Item>
- <Item>_doneEvt</Item>
- <Item>Qpid.Client.Protocol.AMQMethodEvent</Item>
- <Item>null</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_channelId">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_channelId</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_channelId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_doneEvt">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_doneEvt</Item>
- </Issue>
- </Message>
- <Message Id="Evt" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Evt</Item>
- <Item>BlockingMethodFrameListener._doneEvt</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_doneEvt</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MethodReceived(Qpid.Client.Protocol.AMQMethodEvent):System.Boolean">
- <Messages>
- <Message TypeName="RethrowToPreserveStackDetails" Category="Microsoft.Usage" CheckId="CA2200" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BlockingMethodFrameListener.MethodReceived(AMQMethodEvent):Boolean</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'evt'</Item>
- <Item>BlockingMethodFrameListener.MethodReceived(AMQMethodEvent):Boolean</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IAMQMethodListener">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>IAMQMethodListener</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="Error(System.Exception):System.Void">
- <Messages>
- <Message Id="0#e" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>IAMQMethodListener.Error(Exception):Void</Item>
- <Item>e</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MethodReceived(Qpid.Client.Protocol.AMQMethodEvent):System.Boolean">
- <Messages>
- <Message Id="0#evt" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>IAMQMethodListener.MethodReceived(AMQMethodEvent):Boolean</Item>
- <Item>evt</Item>
- <Item>evt</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Client.qms">
- <Types>
- <Type Name="BrokerInfo">
- <Messages>
- <Message TypeName="IdentifiersShouldHaveCorrectPrefix" Category="Microsoft.Naming" CheckId="CA1715" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BrokerInfo</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="getHost():System.String">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>getHost</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="getOption(System.String):System.String">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>getOption</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="getPort():System.Int32">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>getPort</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="getTimeout():System.Int64">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>getTimeout</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="getTransport():System.String">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>getTransport</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setHost(System.String):System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>setHost</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setOption(System.String,System.String):System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>setOption</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setPort(System.Int32):System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>setPort</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setTimeout(System.Int64):System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>setTimeout</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setTransport(System.String):System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>setTransport</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="useSSL():System.Boolean">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>useSSL</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BrokerInfo.useSSL():Boolean</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="useSSL(System.Boolean):System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>useSSL</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BrokerInfo.useSSL(Boolean):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BrokerInfoConstants">
- <Members>
- <Member Name="DEFAULT_CONNECT_TIMEOUT">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DEFAULT_CONNECT_TIMEOUT</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BrokerInfoConstants.DEFAULT_CONNECT_TIMEOUT</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DEFAULT_PORT">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DEFAULT_PORT</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BrokerInfoConstants.DEFAULT_PORT</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DEFAULT_TRANSPORT">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DEFAULT_TRANSPORT</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BrokerInfoConstants.DEFAULT_TRANSPORT</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OPTIONS_CONNECT_TIMEOUT">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>OPTIONS_CONNECT_TIMEOUT</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BrokerInfoConstants.OPTIONS_CONNECT_TIMEOUT</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OPTIONS_RETRY">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>OPTIONS_RETRY</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BrokerInfoConstants.OPTIONS_RETRY</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OPTIONS_SSL">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>OPTIONS_SSL</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BrokerInfoConstants.OPTIONS_SSL</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="URL_FORMAT_EXAMPLE">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>URL_FORMAT_EXAMPLE</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>URL_FORMAT_EXAMPLE</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionInfo">
- <Messages>
- <Message TypeName="IdentifiersShouldHaveCorrectPrefix" Category="Microsoft.Naming" CheckId="CA1715" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConnectionInfo</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="AsUrl():System.String">
- <Messages>
- <Message TypeName="UriReturnValuesShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1055" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConnectionInfo.AsUrl():String</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetAllBrokerInfos():System.Collections.IList">
- <Messages>
- <Message Id="Infos" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Infos</Item>
- <Item>ConnectionInfo.GetAllBrokerInfos():IList</Item>
- </Issue>
- </Message>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetAllBrokerInfos</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetBrokerCount():System.Int32">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetBrokerCount</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetClientName():System.String">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetClientName</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetFailoverMethod():System.String">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetFailoverMethod</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetPassword():System.String">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetPassword</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetUsername():System.String">
- <Messages>
- <Message Id="Username" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2006-12-04 13:11:47Z">
- <Issue Name="ShouldBeCompoundWord">
- <Item>Username</Item>
- <Item>method</Item>
- <Item>GetUsername</Item>
- <Item>UserName</Item>
- </Issue>
- </Message>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetUsername</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetVirtualHost():System.String">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetVirtualHost</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setUsername(System.String):System.Void">
- <Messages>
- <Message Id="Username" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2006-12-04 13:11:47Z">
- <Issue Name="ShouldBeCompoundWord">
- <Item>Username</Item>
- <Item>method</Item>
- <Item>setUsername</Item>
- <Item>UserName</Item>
- </Issue>
- </Message>
- <Message Id="username" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2006-12-04 13:11:47Z">
- <Issue Name="ShouldBeCompoundWord">
- <Item>username</Item>
- <Item>parameter</Item>
- <Item>username</Item>
- <Item>userName</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>setUsername</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionUrlConstants">
- <Messages>
- <Message TypeName="AvoidUninstantiatedInternalClasses" Category="Microsoft.Performance" CheckId="CA1812" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.qms.ConnectionUrlConstants</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="FailoverPolicy">
- <Members>
- <Member Name=".ctor(Qpid.Client.qms.ConnectionInfo)">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverPolicy.FailoverPolicy(ConnectionInfo)</Item>
- <Item>_methodsRetries</Item>
- <Item>System.Int32</Item>
- <Item>0</Item>
- </Issue>
- </Message>
- <Message Id="System.NotImplementedException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverPolicy.FailoverPolicy(ConnectionInfo)</Item>
- <Item>1</Item>
- <Item>NotImplementedException.NotImplementedException(String)</Item>
- <Item>Dynamic loading of FailoverMethods not yet implemented.</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'connectionInfo'</Item>
- <Item>FailoverPolicy.FailoverPolicy(ConnectionInfo)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="addMethod(Qpid.Client.qms.failover.FailoverMethod):System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>addMethod</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="attainedConnection():System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>attainedConnection</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetCurrentBrokerInfo():Qpid.Client.qms.BrokerInfo">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetCurrentBrokerInfo</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="getCurrentMethod():Qpid.Client.qms.failover.FailoverMethod">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>getCurrentMethod</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetNextBrokerInfo():Qpid.Client.qms.BrokerInfo">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetNextBrokerInfo</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setBroker(Qpid.Client.qms.BrokerInfo):System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>setBroker</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setMethodRetries(System.Int32):System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>setMethodRetries</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="toString():System.String">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>toString</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="UrlSyntaxException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.qms.UrlSyntaxException</Item>
- <Item>protected UrlSyntaxException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Client.qms.UrlSyntaxException</Item>
- <Item>public UrlSyntaxException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Client.qms.UrlSyntaxException</Item>
- <Item>public UrlSyntaxException(String)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Client.qms.UrlSyntaxException</Item>
- <Item>public UrlSyntaxException(String, Exception)</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkISerializableTypesWithSerializable" Category="Microsoft.Usage" CheckId="CA2237" Created="2006-12-04 13:11:47Z">
- <Issue Level="Error">
- <Item>UrlSyntaxException</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(System.String,System.String,System.Int32,System.Int32)">
- <Messages>
- <Message Id="0#" TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>url</Item>
- <Item>UrlSyntaxException.UrlSyntaxException(String, String, Int32, Int32)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetIndex():System.Int32">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>GetIndex</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetReason():System.String">
- <Messages>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>UrlSyntaxException.GetReason():String</Item>
- </Issue>
- </Message>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetReason</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="toString():System.String">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>toString</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Client.qms.failover">
- <Types>
- <Type Name="FailoverMethod">
- <Messages>
- <Message TypeName="IdentifiersShouldHaveCorrectPrefix" Category="Microsoft.Naming" CheckId="CA1715" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverMethod</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="attainedConnection():System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>attainedConnection</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="failoverAllowed():System.Boolean">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>failoverAllowed</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetCurrentBrokerInfo():Qpid.Client.qms.BrokerInfo">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetCurrentBrokerInfo</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="getNextBrokerDetails():Qpid.Client.qms.BrokerInfo">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>getNextBrokerDetails</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="methodName():System.String">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>methodName</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="reset():System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>reset</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setBroker(Qpid.Client.qms.BrokerInfo):System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>setBroker</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setRetries(System.Int32):System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>setRetries</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FailoverMethodConstants">
- <Members>
- <Member Name="RANDOM">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FailoverMethodConstants.RANDOM</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ROUND_ROBIN">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ROUND_ROBIN</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FailoverMethodConstants.ROUND_ROBIN</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FailoverRoundRobin">
- <Members>
- <Member Name=".ctor(Qpid.Client.qms.ConnectionInfo)">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverRoundRobin.FailoverRoundRobin(ConnectionInfo)</Item>
- <Item>_currentCycleRetries</Item>
- <Item>System.Int32</Item>
- <Item>0</Item>
- </Issue>
- <Issue>
- <Item>FailoverRoundRobin.FailoverRoundRobin(ConnectionInfo)</Item>
- <Item>_cycleRetries</Item>
- <Item>System.Int32</Item>
- <Item>0</Item>
- </Issue>
- <Issue>
- <Item>FailoverRoundRobin.FailoverRoundRobin(ConnectionInfo)</Item>
- <Item>_serverRetries</Item>
- <Item>System.Int32</Item>
- <Item>0</Item>
- </Issue>
- </Message>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverRoundRobin.FailoverRoundRobin(ConnectionInfo)</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>At least one broker details must be specified.</Item>
- </Issue>
- </Message>
- <Message Id="System.Int32.Parse(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverRoundRobin.FailoverRoundRobin(ConnectionInfo)</Item>
- <Item>System.Int32.Parse(System.String)</Item>
- <Item>System.Int32.Parse(System.String,System.IFormatProvider)</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'connectionDetails'</Item>
- <Item>FailoverRoundRobin.FailoverRoundRobin(ConnectionInfo)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DEFAULT_CYCLE_RETRIES">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DEFAULT_CYCLE_RETRIES</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FailoverRoundRobin.DEFAULT_CYCLE_RETRIES</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DEFAULT_SERVER_RETRIES">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DEFAULT_SERVER_RETRIES</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FailoverRoundRobin.DEFAULT_SERVER_RETRIES</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setBroker(Qpid.Client.qms.BrokerInfo):System.Void">
- <Messages>
- <Message Id="System.Int32.Parse(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverRoundRobin.setBroker(BrokerInfo):Void</Item>
- <Item>System.Int32.Parse(System.String)</Item>
- <Item>System.Int32.Parse(System.String,System.IFormatProvider)</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'broker'</Item>
- <Item>FailoverRoundRobin.setBroker(BrokerInfo):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FailoverSingleServer">
- <Members>
- <Member Name=".ctor(Qpid.Client.qms.ConnectionInfo)">
- <Messages>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverSingleServer.FailoverSingleServer(ConnectionInfo)</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>BrokerInfo details required for connection.</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'connectionDetails'</Item>
- <Item>FailoverSingleServer.FailoverSingleServer(ConnectionInfo)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DEFAULT_SERVER_RETRIES">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DEFAULT_SERVER_RETRIES</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FailoverSingleServer.DEFAULT_SERVER_RETRIES</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setBroker(Qpid.Client.qms.BrokerInfo):System.Void">
- <Messages>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverSingleServer.setBroker(BrokerInfo):Void</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>BrokerInfo details cannot be null</Item>
- </Issue>
- </Message>
- <Message Id="System.Int32.Parse(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverSingleServer.setBroker(BrokerInfo):Void</Item>
- <Item>System.Int32.Parse(System.String)</Item>
- <Item>System.Int32.Parse(System.String,System.IFormatProvider)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="setRetries(System.Int32):System.Void">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>retries</Item>
- <Item>FailoverSingleServer.setRetries(Int32):Void</Item>
- <Item>maxRetries</Item>
- <Item>FailoverMethod.setRetries(Int32):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="toString():System.String">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>toString</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Client.State">
- <Types>
- <Type Name="AMQState">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQState</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="ALL">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AMQState.ALL</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CONNECTION_CLOSED">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CONNECTION_CLOSED</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AMQState.CONNECTION_CLOSED</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CONNECTION_CLOSING">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CONNECTION_CLOSING</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AMQState.CONNECTION_CLOSING</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CONNECTION_NOT_OPENED">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CONNECTION_NOT_OPENED</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AMQState.CONNECTION_NOT_OPENED</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CONNECTION_NOT_STARTED">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CONNECTION_NOT_STARTED</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AMQState.CONNECTION_NOT_STARTED</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CONNECTION_NOT_TUNED">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CONNECTION_NOT_TUNED</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AMQState.CONNECTION_NOT_TUNED</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CONNECTION_OPEN">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CONNECTION_OPEN</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AMQState.CONNECTION_OPEN</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQStateChangedEvent">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQStateChangedEvent</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="AMQStateManager">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQStateManager</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="AttainState(Qpid.Client.State.AMQState):System.Void">
- <Messages>
- <Message Id="0#s" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>AMQStateManager.AttainState(AMQState):Void</Item>
- <Item>s</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MethodReceived(Qpid.Client.Protocol.AMQMethodEvent):System.Boolean">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQStateManager.MethodReceived(AMQMethodEvent):Boolean</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'evt'</Item>
- <Item>AMQStateManager.MethodReceived(AMQMethodEvent):Boolean</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IAMQStateListener">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>IAMQStateListener</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="StateChanged(Qpid.Client.State.AMQStateChangedEvent):System.Void">
- <Messages>
- <Message Id="0#evt" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>IAMQStateListener.StateChanged(AMQStateChangedEvent):Void</Item>
- <Item>evt</Item>
- <Item>evt</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IllegalStateTransitionException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.State.IllegalStateTransitionException</Item>
- <Item>protected IllegalStateTransitionException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Client.State.IllegalStateTransitionException</Item>
- <Item>public IllegalStateTransitionException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Client.State.IllegalStateTransitionException</Item>
- <Item>public IllegalStateTransitionException(String)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Client.State.IllegalStateTransitionException</Item>
- <Item>public IllegalStateTransitionException(String, Exception)</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(Qpid.Client.State.AMQState,System.Type)">
- <Messages>
- <Message Id="Qpid.AMQException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>IllegalStateTransitionException.IllegalStateTransitionException(AMQState, Type)</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String)</Item>
- <Item>No valid state transition defined for receiving frame ____ from state __</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IStateAwareMethodListener">
- <Members>
- <Member Name="MethodReceived(Qpid.Client.State.AMQStateManager,Qpid.Client.Protocol.AMQMethodEvent):System.Void">
- <Messages>
- <Message Id="1#evt" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>IStateAwareMethodListener.MethodReceived(AMQStateManager, AMQMethodEvent):Void</Item>
- <Item>evt</Item>
- <Item>evt</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IStateListener">
- <Members>
- <Member Name="Error(System.Exception):System.Void">
- <Messages>
- <Message Id="0#e" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>IStateListener.Error(Exception):Void</Item>
- <Item>e</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="StateWaiter">
- <Messages>
- <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>Qpid.Client.State.StateWaiter</Item>
- <Item>System.Threading.ManualResetEvent</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="WaituntilStateHasChanged():System.Void">
- <Messages>
- <Message Id="Qpid.AMQException.#ctor(System.String,System.Exception)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>StateWaiter.WaituntilStateHasChanged():Void</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String, Exception)</Item>
- <Item>Error: __</Item>
- </Issue>
- </Message>
- <Message Id="Waituntil" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Waituntil</Item>
- <Item>StateWaiter.WaituntilStateHasChanged():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Client.Transport">
- <Types>
- <Type Name="AmqpChannel">
- <Messages>
- <Message Id="Amqp" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Amqp</Item>
- <Item>Qpid.Client.Transport.AmqpChannel</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(Qpid.Client.Transport.IByteChannel)">
- <Messages>
- <Message Id="0#" TypeName="AvoidTypeNamesInParameters" Category="Microsoft.Naming" CheckId="CA1720" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>byteChannel</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Read():System.Collections.Queue">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqpChannel.Read():Queue</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Write(Qpid.Framing.IDataBlock):System.Void">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AmqpChannel.Write(IDataBlock):Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQProtocolProvider">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQProtocolProvider</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="IProtocolWriter">
- <Members>
- <Member Name="Write(Qpid.Framing.IDataBlock):System.Void">
- <Messages>
- <Message Id="0#o" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>IProtocolWriter.Write(IDataBlock):Void</Item>
- <Item>o</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ITransport">
- <Members>
- <Member Name="getLocalEndPoint():System.String">
- <Messages>
- <Message Id="EndPoint" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2006-12-04 13:11:47Z">
- <Issue Name="ShouldBeDiscreteTerm">
- <Item>EndPoint</Item>
- <Item>method</Item>
- <Item>getLocalEndPoint</Item>
- <Item>Endpoint</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>getLocalEndPoint</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="SingleProtocolEncoderOutput">
- <Members>
- <Member Name="buffer">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>buffer</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Write(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message Id="System.InvalidOperationException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>SingleProtocolEncoderOutput.Write(ByteBuffer):Void</Item>
- <Item>1</Item>
- <Item>InvalidOperationException.InvalidOperationException(String)</Item>
- <Item>{0} does not allow the writing of more than one buffer</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- </Namespaces>
- </Module>
- </Modules>
- </Target>
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Client.Tests.dll">
- <Modules>
- <Module Name="qpid.client.tests.dll">
- <Messages>
- <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.Tests</Item>
- </Issue>
- </Message>
- <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2006-12-04 13:11:47Z">
- <Issue Name="NoStrongName">
- <Item>Qpid.Client.Tests</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2006-12-04 13:11:47Z">
- <Issue Name="NoAttr">
- <Item>Qpid.Client.Tests</Item>
- </Issue>
- </Message>
- </Messages>
- <Namespaces>
- <Namespace Name="Qpid.Client.Tests">
- <Types>
- <Type Name="Avergager">
- <Members>
- <Member Name=".ctor()">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Avergager.Avergager()</Item>
- <Item>num</Item>
- <Item>System.Int64</Item>
- <Item>0</Item>
- </Issue>
- <Issue>
- <Item>Avergager.Avergager()</Item>
- <Item>sum</Item>
- <Item>System.Int64</Item>
- <Item>0</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ToString():System.String">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Avergager.ToString():String</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BaseMessagingTestFixture">
- <Messages>
- <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>Qpid.Client.Tests.BaseMessagingTestFixture</Item>
- <Item>Qpid.Client.AMQConnection</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="_channel">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_channel</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_channel</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_connection">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>_connection</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>_connection</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Init():System.Void">
- <Messages>
- <Message TypeName="RethrowToPreserveStackDetails" Category="Microsoft.Usage" CheckId="CA2200" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BaseMessagingTestFixture.Init():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="HeadersMatchingConsumer">
- <Messages>
- <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>Qpid.Client.Tests.HeadersMatchingConsumer</Item>
- <Item>System.Threading.AutoResetEvent</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CreatePatternAsFieldTable():Qpid.Framing.FieldTable">
- <Messages>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="NonBreaking">
- <Issue>
- <Item>HeadersMatchingConsumer.CreatePatternAsFieldTable():FieldTable</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OnException(System.Exception):System.Void">
- <Messages>
- <Message Id="0#e" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>HeadersMatchingConsumer.OnException(Exception):Void</Item>
- <Item>e</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'e'</Item>
- <Item>HeadersMatchingConsumer.OnException(Exception):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OnMessage(Qpid.Messaging.IMessage):System.Void">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>HeadersMatchingConsumer.OnMessage(IMessage):Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'message'</Item>
- <Item>HeadersMatchingConsumer.OnMessage(IMessage):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ProducerMultiConsumer">
- <Messages>
- <Message Id="Multi" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Multi</Item>
- <Item>Qpid.Client.Tests.ProducerMultiConsumer</Item>
- </Issue>
- </Message>
- <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>Qpid.Client.Tests.ProducerMultiConsumer</Item>
- <Item>System.Threading.AutoResetEvent</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor()">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ProducerMultiConsumer.ProducerMultiConsumer()</Item>
- <Item>_messageReceivedCount</Item>
- <Item>System.Int32</Item>
- <Item>0</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OnMessage(Qpid.Messaging.IMessage):System.Void">
- <Messages>
- <Message Id="0#m" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>ProducerMultiConsumer.OnMessage(IMessage):Void</Item>
- <Item>m</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="RunTest():System.Void">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ProducerMultiConsumer.RunTest():Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ServiceProvidingClient">
- <Messages>
- <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>Qpid.Client.Tests.ServiceProvidingClient</Item>
- <Item>System.Threading.AutoResetEvent</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor()">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ServiceProvidingClient.ServiceProvidingClient()</Item>
- <Item>_selector</Item>
- <Item>System.String</Item>
- <Item>null</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OnMessage(Qpid.Messaging.IMessage):System.Void">
- <Messages>
- <Message TypeName="RethrowToPreserveStackDetails" Category="Microsoft.Usage" CheckId="CA2200" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ServiceProvidingClient.OnMessage(IMessage):Void</Item>
- </Issue>
- <Issue>
- <Item>ServiceProvidingClient.OnMessage(IMessage):Void</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ServiceProvidingClient.OnMessage(IMessage):Void</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- <Issue>
- <Item>ServiceProvidingClient.OnMessage(IMessage):Void</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ServiceRequestingClient">
- <Messages>
- <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>Qpid.Client.Tests.ServiceRequestingClient</Item>
- <Item>System.Threading.AutoResetEvent</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="Main(System.String[]):System.Void">
- <Messages>
- <Message Id="args" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>args</Item>
- <Item>ServiceRequestingClient.Main(String[]):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OnMessage(Qpid.Messaging.IMessage):System.Void">
- <Messages>
- <Message Id="System.Exception.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ServiceRequestingClient.OnMessage(IMessage):Void</Item>
- <Item>1</Item>
- <Item>Exception.Exception(String)</Item>
- <Item>Set timeSent!</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2006-12-04 13:11:47Z">
- <Issue Name="TooGeneric">
- <Item>ServiceRequestingClient.OnMessage(IMessage):Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- <Message Id="0#m" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>ServiceRequestingClient.OnMessage(IMessage):Void</Item>
- <Item>m</Item>
- </Issue>
- </Message>
- <Message Id="System.Int64.Parse(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ServiceRequestingClient.OnMessage(IMessage):Void</Item>
- <Item>System.Int64.Parse(System.String)</Item>
- <Item>System.Int64.Parse(System.String,System.IFormatProvider)</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ServiceRequestingClient.OnMessage(IMessage):Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- <Issue>
- <Item>ServiceRequestingClient.OnMessage(IMessage):Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'m'</Item>
- <Item>ServiceRequestingClient.OnMessage(IMessage):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="SendMessages():System.Void">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ServiceRequestingClient.SendMessages():Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- <Issue>
- <Item>ServiceRequestingClient.SendMessages():Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- <Issue>
- <Item>ServiceRequestingClient.SendMessages():Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ServiceRequestingClient.SendMessages():Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- <Issue>
- <Item>ServiceRequestingClient.SendMessages():Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- <Issue>
- <Item>ServiceRequestingClient.SendMessages():Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="UndeliverableTest">
- <Members>
- <Member Name="OnException(System.Exception):System.Void">
- <Messages>
- <Message TypeName="DoNotCastUnnecessarily" Category="Microsoft.Performance" CheckId="CA1800" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>e</Item>
- <Item>Qpid.Messaging.QpidException</Item>
- <Item>UndeliverableTest.OnException(Exception):Void</Item>
- <Item>castclass</Item>
- </Issue>
- </Message>
- <Message Id="0#e" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>UndeliverableTest.OnException(Exception):Void</Item>
- <Item>e</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>UndeliverableTest.OnException(Exception):Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Client.Tests.connection">
- <Types>
- <Type Name="ConnectionTest">
- <Members>
- <Member Name="passwordFailureConnection():System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>passwordFailureConnection</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>ConnectionTest.passwordFailureConnection():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="simpleConnection():System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>simpleConnection</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>ConnectionTest.simpleConnection():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Client.Tests.failover">
- <Types>
- <Type Name="FailoverTest">
- <Members>
- <Member Name="DoFailoverTest(Qpid.Messaging.IConnection):System.Void">
- <Messages>
- <Message Id="Qpid.Client.Tests.failover.FailoverTest+MsgListener" TypeName="DoNotIgnoreMethodResults" Category="Microsoft.Usage" CheckId="CA1806" Created="2006-12-04 13:11:47Z">
- <Issue Name="ObjectCreation">
- <Item>FailoverTest.DoFailoverTest(IConnection):Void</Item>
- <Item>Qpid.Client.Tests.failover.FailoverTest+MsgListener</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverTest.DoFailoverTest(IConnection):Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OnMessage(Qpid.Messaging.IMessage):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'message'</Item>
- <Item>FailoverTest.OnMessage(IMessage):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="TestWithBasicInfo():System.Void">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverTest.TestWithBasicInfo():Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FailoverTest+MsgListener">
- <Members>
- <Member Name="init(Qpid.Messaging.IMessage):Qpid.Messaging.IMessagePublisher">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MsgListener.init(IMessage):IMessagePublisher</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FailoverTxTest">
- <Messages>
- <Message TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Tx</Item>
- <Item>Qpid.Client.Tests.failover.FailoverTxTest</Item>
- </Issue>
- </Message>
- <Message TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>Qpid.Client.Tests.failover.FailoverTxTest</Item>
- <Item>Qpid.Client.AMQConnection</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="OnMessage(Qpid.Messaging.IMessage):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'message'</Item>
- <Item>FailoverTxTest.OnMessage(IMessage):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="TestWithBasicInfo():System.Void">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FailoverTxTest.TestWithBasicInfo():Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Client.Transport">
- <Types>
- <Type Name="BlockingIo">
- <Messages>
- <Message TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Io</Item>
- <Item>Qpid.Client.Transport.BlockingIo</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="connectFromOutside():System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>connectFromOutside</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>BlockingIo.connectFromOutside():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="connectionAndSleepForHeartbeats():System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>connectionAndSleepForHeartbeats</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>BlockingIo.connectionAndSleepForHeartbeats():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="regularConnection():System.Void">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>regularConnection</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>BlockingIo.regularConnection():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- </Namespaces>
- </Module>
- </Modules>
- </Target>
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Client.Transport.Socket.Blocking.dll">
- <Modules>
- <Module Name="qpid.client.transport.socket.blocking.dll">
- <Messages>
- <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Client.Transport.Socket.Blocking</Item>
- </Issue>
- </Message>
- <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2006-12-04 13:11:47Z">
- <Issue Name="NoStrongName">
- <Item>Qpid.Client.Transport.Socket.Blocking</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2006-12-04 13:11:47Z">
- <Issue Name="NoAttr">
- <Item>Qpid.Client.Transport.Socket.Blocking</Item>
- </Issue>
- </Message>
- </Messages>
- <Namespaces>
- <Namespace Name="Qpid.Client.Transport.Socket.Blocking">
- <Types>
- <Type Name="BlockingSocketProcessor">
- <Members>
- <Member Name="Write(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BlockingSocketProcessor.Write(ByteBuffer):Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BlockingSocketTransport">
- <Members>
- <Member Name=".ctor(System.String,System.Int32,Qpid.Client.AMQConnection)">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'connection'</Item>
- <Item>BlockingSocketTransport.BlockingSocketTransport(String, Int32, AMQConnection)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_log">
- <Messages>
- <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BlockingSocketTransport._log</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BlockingSocketTransport+ReaderRunner">
- <Members>
- <Member Name="Run():System.Void">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReaderRunner.Run():Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ByteChannel">
- <Members>
- <Member Name="Read():Qpid.Buffer.ByteBuffer">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ByteChannel.Read():ByteBuffer</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Write(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ByteChannel.Write(ByteBuffer):Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- </Namespaces>
- </Module>
- </Modules>
- </Target>
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Codec.dll">
- <Modules>
- <Module Name="qpid.codec.dll">
- <Messages>
- <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Codec</Item>
- </Issue>
- </Message>
- <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2006-12-04 13:11:47Z">
- <Issue Name="NoStrongName">
- <Item>Qpid.Codec</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2006-12-04 13:11:47Z">
- <Issue Name="NoAttr">
- <Item>Qpid.Codec</Item>
- </Issue>
- </Message>
- </Messages>
- <Namespaces>
- <Namespace Name="Qpid.Codec">
- <Types>
- <Type Name="CumulativeProtocolDecoder">
- <Members>
- <Member Name="DecodeAll(Qpid.Buffer.ByteBuffer,Qpid.Codec.IProtocolDecoderOutput):System.Void">
- <Messages>
- <Message Id="System.Exception.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>CumulativeProtocolDecoder.DecodeAll(ByteBuffer, IProtocolDecoderOutput):Void</Item>
- <Item>1</Item>
- <Item>Exception.Exception(String)</Item>
- <Item>doDecode() can't return true when buffer is not consumed.</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2006-12-04 13:11:47Z">
- <Issue Name="TooGeneric">
- <Item>CumulativeProtocolDecoder.DecodeAll(ByteBuffer, IProtocolDecoderOutput):Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Dispose():System.Void">
- <Messages>
- <Message TypeName="ImplementIDisposableCorrectly" Category="Microsoft.Design" CheckId="CA1063" Created="2006-12-04 13:11:47Z">
- <Issue Name="DisposeImplementation">
- <Item>CumulativeProtocolDecoder.Dispose():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IProtocolEncoderOutput">
- <Members>
- <Member Name="Write(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message Id="0#buf" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>IProtocolEncoderOutput.Write(ByteBuffer):Void</Item>
- <Item>buf</Item>
- <Item>buf</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ProtocolCodecException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Codec.ProtocolCodecException</Item>
- <Item>protected ProtocolCodecException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Codec.ProtocolCodecException</Item>
- <Item>public ProtocolCodecException(String, Exception)</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkISerializableTypesWithSerializable" Category="Microsoft.Usage" CheckId="CA2237" Created="2006-12-04 13:11:47Z">
- <Issue Level="Error">
- <Item>ProtocolCodecException</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(System.Exception)">
- <Messages>
- <Message Id="System.Exception.#ctor(System.String,System.Exception)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ProtocolCodecException.ProtocolCodecException(Exception)</Item>
- <Item>1</Item>
- <Item>Exception.Exception(String, Exception)</Item>
- <Item>Codec Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ProtocolDecoderException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Codec.ProtocolDecoderException</Item>
- <Item>protected ProtocolDecoderException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Codec.ProtocolDecoderException</Item>
- <Item>public ProtocolDecoderException(String, Exception)</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="ProtocolEncoderException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Codec.ProtocolEncoderException</Item>
- <Item>protected ProtocolEncoderException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Codec.ProtocolEncoderException</Item>
- <Item>public ProtocolEncoderException(String, Exception)</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Codec.Demux">
- <Types>
- <Type Name="DemuxingProtocolCodecFactory">
- <Messages>
- <Message Id="Demuxing" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Demuxing</Item>
- <Item>Qpid.Codec.Demux.DemuxingProtocolCodecFactory</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="DisposeCodecResources():System.Void">
- <Messages>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>DemuxingProtocolCodecFactory.DisposeCodecResources():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Register(System.Type):System.Void">
- <Messages>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DemuxingProtocolCodecFactory.Register(Type):Void</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>Unregisterable type: __</Item>
- </Issue>
- </Message>
- <Message Id="Unregisterable" TypeName="LiteralsShouldBeSpelledCorrectly" Category="Microsoft.Usage" CheckId="CA2204" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Unregisterable</Item>
- <Item>Unregisterable type: __</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="DemuxingProtocolCodecFactory+DefaultConstructorMessageDecoderFactory">
- <Members>
- <Member Name=".ctor(System.Type)">
- <Messages>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DefaultConstructorMessageDecoderFactory.DefaultConstructorMessageDecoderFactory(Type)</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>decoderClass is not assignable to MessageDecoder</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="NewDecoder():Qpid.Codec.Demux.IMessageDecoder">
- <Messages>
- <Message Id="System.Exception.#ctor(System.String,System.Exception)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DefaultConstructorMessageDecoderFactory.NewDecoder():IMessageDecoder</Item>
- <Item>1</Item>
- <Item>Exception.Exception(String, Exception)</Item>
- <Item>Failed to create a new instance of __</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2006-12-04 13:11:47Z">
- <Issue Name="TooGeneric">
- <Item>DefaultConstructorMessageDecoderFactory.NewDecoder():IMessageDecoder</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="DemuxingProtocolCodecFactory+DefaultConstructorMessageEncoderFactory">
- <Members>
- <Member Name=".ctor(System.Type)">
- <Messages>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DefaultConstructorMessageEncoderFactory.DefaultConstructorMessageEncoderFactory(Type)</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>encoderClass is not assignable to MessageEncoder</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="NewEncoder():Qpid.Codec.Demux.IMessageEncoder">
- <Messages>
- <Message Id="System.Exception.#ctor(System.String,System.Exception)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DefaultConstructorMessageEncoderFactory.NewEncoder():IMessageEncoder</Item>
- <Item>1</Item>
- <Item>Exception.Exception(String, Exception)</Item>
- <Item>Failed to create a new instance of __</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2006-12-04 13:11:47Z">
- <Issue Name="TooGeneric">
- <Item>DefaultConstructorMessageEncoderFactory.NewEncoder():IMessageEncoder</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="DemuxingProtocolCodecFactory+ProtocolDecoderImpl">
- <Members>
- <Member Name="DoDecode(Qpid.Buffer.ByteBuffer,Qpid.Codec.IProtocolDecoderOutput):System.Boolean">
- <Messages>
- <Message Id="Qpid.Codec.ProtocolDecoderException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ProtocolDecoderImpl.DoDecode(ByteBuffer, IProtocolDecoderOutput):Boolean</Item>
- <Item>1</Item>
- <Item>ProtocolDecoderException.ProtocolDecoderException(String)</Item>
- <Item>Message decoder returned NOT_OK.</Item>
- </Issue>
- </Message>
- <Message Id="System.Exception.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ProtocolDecoderImpl.DoDecode(ByteBuffer, IProtocolDecoderOutput):Boolean</Item>
- <Item>1</Item>
- <Item>Exception.Exception(String)</Item>
- <Item>Unexpected decode result (see your decode()): __</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2006-12-04 13:11:47Z">
- <Issue Name="TooGeneric">
- <Item>ProtocolDecoderImpl.DoDecode(ByteBuffer, IProtocolDecoderOutput):Boolean</Item>
- <Item>System.Exception</Item>
- </Issue>
- <Issue Name="TooGeneric">
- <Item>ProtocolDecoderImpl.DoDecode(ByteBuffer, IProtocolDecoderOutput):Boolean</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="MessageDecoderResult">
- <Members>
- <Member Name="NEED_DATA">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>NEED_DATA</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>MessageDecoderResult.NEED_DATA</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="NOT_OK">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>NOT_OK</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberOk">
- <Item>MessageDecoderResult.NOT_OK</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OK">
- <Messages>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberOk">
- <Item>MessageDecoderResult.OK</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- </Namespaces>
- </Module>
- </Modules>
- </Target>
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Common.dll">
- <Modules>
- <Module Name="qpid.common.dll">
- <Messages>
- <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Common</Item>
- </Issue>
- </Message>
- <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2006-12-04 13:11:47Z">
- <Issue Name="NoStrongName">
- <Item>Qpid.Common</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014" Created="2006-12-04 13:11:47Z">
- <Issue Name="NoAttr">
- <Item>Qpid.Common</Item>
- </Issue>
- </Message>
- </Messages>
- <Namespaces>
- <Namespace Name="Qpid">
- <Types>
- <Type Name="AMQChannelClosedException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.AMQChannelClosedException</Item>
- <Item>protected AMQChannelClosedException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.AMQChannelClosedException</Item>
- <Item>public AMQChannelClosedException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.AMQChannelClosedException</Item>
- <Item>public AMQChannelClosedException(String)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.AMQChannelClosedException</Item>
- <Item>public AMQChannelClosedException(String, Exception)</Item>
- </Issue>
- </Message>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQChannelClosedException</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="AMQConnectionClosedException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.AMQConnectionClosedException</Item>
- <Item>protected AMQConnectionClosedException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.AMQConnectionClosedException</Item>
- <Item>public AMQConnectionClosedException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.AMQConnectionClosedException</Item>
- <Item>public AMQConnectionClosedException(String)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.AMQConnectionClosedException</Item>
- <Item>public AMQConnectionClosedException(String, Exception)</Item>
- </Issue>
- </Message>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQConnectionClosedException</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="AMQDisconnectedException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.AMQDisconnectedException</Item>
- <Item>protected AMQDisconnectedException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.AMQDisconnectedException</Item>
- <Item>public AMQDisconnectedException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.AMQDisconnectedException</Item>
- <Item>public AMQDisconnectedException(String, Exception)</Item>
- </Issue>
- </Message>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQDisconnectedException</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="AMQException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.AMQException</Item>
- <Item>protected AMQException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.AMQException</Item>
- <Item>public AMQException()</Item>
- </Issue>
- </Message>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQException</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkISerializableTypesWithSerializable" Category="Microsoft.Usage" CheckId="CA2237" Created="2006-12-04 13:11:47Z">
- <Issue Level="Error">
- <Item>AMQException</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(log4net.ILog,System.Int32,System.String)">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'logger'</Item>
- <Item>AMQException.AMQException(ILog, Int32, String)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name=".ctor(log4net.ILog,System.Int32,System.String,System.Exception)">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'logger'</Item>
- <Item>AMQException.AMQException(ILog, Int32, String, Exception)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name=".ctor(log4net.ILog,System.String)">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'logger'</Item>
- <Item>AMQException.AMQException(ILog, String)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name=".ctor(log4net.ILog,System.String,System.Exception)">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'logger'</Item>
- <Item>AMQException.AMQException(ILog, String, Exception)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQUndeliveredException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.AMQUndeliveredException</Item>
- <Item>protected AMQUndeliveredException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.AMQUndeliveredException</Item>
- <Item>public AMQUndeliveredException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.AMQUndeliveredException</Item>
- <Item>public AMQUndeliveredException(String)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.AMQUndeliveredException</Item>
- <Item>public AMQUndeliveredException(String, Exception)</Item>
- </Issue>
- </Message>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQUndeliveredException</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="GetUndeliveredMessage():System.Object">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="50">
- <Item>GetUndeliveredMessage</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Collections">
- <Types>
- <Type Name="BlockingQueue">
- <Members>
- <Member Name="EnqueueBlocking(System.Object):System.Void">
- <Messages>
- <Message Id="0#e" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>BlockingQueue.EnqueueBlocking(Object):Void</Item>
- <Item>e</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="EnqueueNoThrow(System.Object):System.Boolean">
- <Messages>
- <Message Id="0#e" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>BlockingQueue.EnqueueNoThrow(Object):Boolean</Item>
- <Item>e</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="LinkedBlockingQueue">
- <Messages>
- <Message TypeName="ICollectionImplementationsHaveStronglyTypedMembers" Category="Microsoft.Design" CheckId="CA1035" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>LinkedBlockingQueue</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(System.Int32)">
- <Messages>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>LinkedBlockingQueue.LinkedBlockingQueue(Int32)</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>Capacity must be positive, was passed __</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="EnqueueBlocking(System.Object):System.Void">
- <Messages>
- <Message TypeName="InstantiateArgumentExceptionsCorrectly" Category="Microsoft.Usage" CheckId="CA2208" Created="2006-12-04 13:11:47Z">
- <Issue Name="OneArgumentShouldBeParameterName">
- <Item>System.ArgumentNullException</Item>
- <Item>ArgumentNullException.ArgumentNullException(String)</Item>
- <Item>Object must not be null</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="EnqueueNoThrow(System.Object):System.Boolean">
- <Messages>
- <Message TypeName="InstantiateArgumentExceptionsCorrectly" Category="Microsoft.Usage" CheckId="CA2208" Created="2006-12-04 13:11:47Z">
- <Issue Name="OneArgumentShouldBeParameterName">
- <Item>System.ArgumentNullException</Item>
- <Item>ArgumentNullException.ArgumentNullException(String)</Item>
- <Item>e must not be null</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="LinkedHashtable">
- <Messages>
- <Message TypeName="ICollectionImplementationsHaveStronglyTypedMembers" Category="Microsoft.Design" CheckId="CA1035" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>LinkedHashtable</Item>
- </Issue>
- </Message>
- <Message TypeName="IdentifiersShouldHaveCorrectSuffix" Category="Microsoft.Naming" CheckId="CA1710" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Collections.LinkedHashtable</Item>
- <Item>Dictionary</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="Add(System.Object,System.Object):System.Void">
- <Messages>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>LinkedHashtable.Add(Object, Object):Void</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>LinkedHashtable already contains key. key=__</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MoveToHead(System.Object):System.Void">
- <Messages>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>LinkedHashtable.MoveToHead(Object):Void</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>Key ____ not found</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Tail">
- <Accessors>
- <Accessor Name="get_Tail():Qpid.Collections.LinkedHashtable+LinkedDictionaryEntry">
- <Messages>
- <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>LinkedHashtable.get_Tail():LinkedDictionaryEntry</Item>
- </Issue>
- </Message>
- </Messages>
- </Accessor>
- </Accessors>
- </Member>
- </Members>
- </Type>
- <Type Name="LinkedHashtable+LHTEnumerator">
- <Members>
- <Member Name=".ctor(Qpid.Collections.LinkedHashtable)">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>LHTEnumerator.LHTEnumerator(LinkedHashtable)</Item>
- <Item>_needsReset</Item>
- <Item>System.Boolean</Item>
- <Item>false</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Current">
- <Accessors>
- <Accessor Name="get_Current():System.Object">
- <Messages>
- <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2006-12-04 13:11:47Z">
- <Issue Name="TooGeneric">
- <Item>LHTEnumerator.get_Current():Object</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Accessor>
- </Accessors>
- </Member>
- </Members>
- </Type>
- <Type Name="SynchronousQueue">
- <Messages>
- <Message TypeName="ICollectionImplementationsHaveStronglyTypedMembers" Category="Microsoft.Design" CheckId="CA1035" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>SynchronousQueue</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(System.Boolean)">
- <Messages>
- <Message Id="strict" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>strict</Item>
- <Item>SynchronousQueue.SynchronousQueue(Boolean)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_qlock">
- <Messages>
- <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>SynchronousQueue._qlock</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_waitingConsumers">
- <Messages>
- <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>SynchronousQueue._waitingConsumers</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="_waitingProducers">
- <Messages>
- <Message TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>SynchronousQueue._waitingProducers</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="SynchronousQueue+FifoWaitQueue">
- <Messages>
- <Message TypeName="AvoidUninstantiatedInternalClasses" Category="Microsoft.Performance" CheckId="CA1812" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Collections.SynchronousQueue+FifoWaitQueue</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="SynchronousQueue+LifoWaitQueue">
- <Messages>
- <Message TypeName="AvoidUninstantiatedInternalClasses" Category="Microsoft.Performance" CheckId="CA1812" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Collections.SynchronousQueue+LifoWaitQueue</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="SynchronousQueue+Node">
- <Members>
- <Member Name=".ctor(System.Object)">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Node.Node(Object)</Item>
- <Item>state</Item>
- <Item>System.Int32</Item>
- <Item>0</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name=".ctor(System.Object,Qpid.Collections.SynchronousQueue+Node)">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Node.Node(Object, Node)</Item>
- <Item>state</Item>
- <Item>System.Int32</Item>
- <Item>0</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Attempt(System.Int64):System.Boolean">
- <Messages>
- <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Node.Attempt(Int64):Boolean</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Extract():System.Object">
- <Messages>
- <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Node.Extract():Object</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetItem():System.Object">
- <Messages>
- <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Node.GetItem():Object</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="SetItem(System.Object):System.Boolean">
- <Messages>
- <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Node.SetItem(Object):Boolean</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WaitForPut():System.Object">
- <Messages>
- <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Node.WaitForPut():Object</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WaitForPut(System.Int64):System.Object">
- <Messages>
- <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Node.WaitForPut(Int64):Object</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WaitForTake():System.Void">
- <Messages>
- <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Node.WaitForTake():Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WaitForTake(System.Int64):System.Boolean">
- <Messages>
- <Message TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Node.WaitForTake(Int64):Boolean</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Common">
- <Types>
- <Type Name="AssemblySettings">
- <Members>
- <Member Name="GetConfig(System.Reflection.Assembly):System.Collections.IDictionary">
- <Messages>
- <Message TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AssemblySettings.GetConfig(Assembly):IDictionary</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'asm'</Item>
- <Item>AssemblySettings.GetConfig(Assembly):IDictionary</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- <Namespace Name="Qpid.Framing">
- <Types>
- <Type Name="AccessRequestBody">
- <Members>
- <Member Name="Active">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Active</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AccessRequestBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>AccessRequestBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Realm</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exclusive</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Passive</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Active</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Write</Item>
- </Issue>
- </Message>
- <Message Id="6#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Read</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AccessRequestBody.CreateAMQFrame(UInt16, String, Boolean, Boolean, Boolean, Boolean, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exclusive">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exclusive</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AccessRequestBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>AccessRequestBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Passive">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Passive</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Read">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Read</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Realm">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Realm</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Write">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Write</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AccessRequestOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AccessRequestOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>AccessRequestOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AccessRequestOkBody.CreateAMQFrame(UInt16, UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AccessRequestOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>AccessRequestOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQDataBlockDecoder">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQDataBlockDecoder</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor()">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQDataBlockDecoder.AMQDataBlockDecoder()</Item>
- <Item>_disabled</Item>
- <Item>System.Boolean</Item>
- <Item>false</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAndPopulateFrame(Qpid.Buffer.ByteBuffer):System.Object">
- <Messages>
- <Message Id="Qpid.Framing.AMQFrameDecodingException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQDataBlockDecoder.CreateAndPopulateFrame(ByteBuffer):Object</Item>
- <Item>1</Item>
- <Item>AMQFrameDecodingException.AMQFrameDecodingException(String)</Item>
- <Item>Unsupported body type: __</Item>
- </Issue>
- </Message>
- <Message Id="marker" TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQDataBlockDecoder.CreateAndPopulateFrame(ByteBuffer):Object</Item>
- <Item>marker</Item>
- <Item>System.Byte</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'input'</Item>
- <Item>AMQDataBlockDecoder.CreateAndPopulateFrame(ByteBuffer):Object</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Decodable(Qpid.Buffer.ByteBuffer):Qpid.Codec.Demux.MessageDecoderResult">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>input</Item>
- <Item>AMQDataBlockDecoder.Decodable(ByteBuffer):MessageDecoderResult</Item>
- <Item>buffer</Item>
- <Item>IMessageDecoder.Decodable(ByteBuffer):MessageDecoderResult</Item>
- </Issue>
- </Message>
- <Message Id="System.String.Format(System.String,System.Object,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQDataBlockDecoder.Decodable(ByteBuffer):MessageDecoderResult</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'input'</Item>
- <Item>AMQDataBlockDecoder.Decodable(ByteBuffer):MessageDecoderResult</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Decode(Qpid.Buffer.ByteBuffer,Qpid.Codec.IProtocolDecoderOutput):Qpid.Codec.Demux.MessageDecoderResult">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>input</Item>
- <Item>AMQDataBlockDecoder.Decode(ByteBuffer, IProtocolDecoderOutput):MessageDecoderResult</Item>
- <Item>buffer</Item>
- <Item>IMessageDecoder.Decode(ByteBuffer, IProtocolDecoderOutput):MessageDecoderResult</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'output'</Item>
- <Item>AMQDataBlockDecoder.Decode(ByteBuffer, IProtocolDecoderOutput):MessageDecoderResult</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Disabled">
- <Messages>
- <Message TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Disabled</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQDataBlockEncoder">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQDataBlockEncoder</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="Encode(System.Object,Qpid.Codec.IProtocolEncoderOutput):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'output'</Item>
- <Item>AMQDataBlockEncoder.Encode(Object, IProtocolEncoderOutput):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQFrame">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="PopulateFromBuffer(Qpid.Buffer.ByteBuffer,System.UInt16,System.UInt32,Qpid.Framing.IBodyFactory):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'bodyFactory'</Item>
- <Item>AMQFrame.PopulateFromBuffer(ByteBuffer, UInt16, UInt32, IBodyFactory):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WritePayload(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>AMQFrame.WritePayload(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQFrameDecodingException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Framing.AMQFrameDecodingException</Item>
- <Item>protected AMQFrameDecodingException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Framing.AMQFrameDecodingException</Item>
- <Item>public AMQFrameDecodingException()</Item>
- </Issue>
- </Message>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQFrameDecodingException</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="AMQMethodBody">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQMethodBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="Clazz">
- <Messages>
- <Message Id="Clazz" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Clazz</Item>
- <Item>AMQMethodBody.Clazz:UInt16</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ToString():System.String">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object,System.Object,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AMQMethodBody.ToString():String</Item>
- <Item>System.String.Format(System.String,System.Object,System.Object,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="TYPE">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>AMQMethodBody.TYPE</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WritePayload(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>AMQMethodBody.WritePayload(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQMethodBodyFactory">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQMethodBodyFactory</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CreateBody(Qpid.Buffer.ByteBuffer):Qpid.Framing.IBody">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'inbuf'</Item>
- <Item>AMQMethodBodyFactory.CreateBody(ByteBuffer):IBody</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetInstance():Qpid.Framing.AMQMethodBodyFactory">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>GetInstance</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="AMQProtocolHeaderException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Framing.AMQProtocolHeaderException</Item>
- <Item>protected AMQProtocolHeaderException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Framing.AMQProtocolHeaderException</Item>
- <Item>public AMQProtocolHeaderException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Framing.AMQProtocolHeaderException</Item>
- <Item>public AMQProtocolHeaderException(String, Exception)</Item>
- </Issue>
- </Message>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>AMQProtocolHeaderException</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="BasicAckBody">
- <Messages>
- <Message Id="Ack" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Ack</Item>
- <Item>Qpid.Framing.BasicAckBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicAckBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicAckBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt64,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Multiple</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicAckBody.CreateAMQFrame(UInt16, UInt64, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DeliveryTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicAckBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicAckBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Multiple">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Multiple</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicCancelBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicCancelBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicCancelBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="2#Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>BasicCancelBody.CreateAMQFrame(UInt16, String, Boolean):AMQFrame</Item>
- <Item>Nowait</Item>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicCancelBody.CreateAMQFrame(UInt16, String, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicCancelBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicCancelBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Nowait">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Nowait</Item>
- <Item>BasicCancelBody.Nowait</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicCancelOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicCancelOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicCancelOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicCancelOkBody.CreateAMQFrame(UInt16, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicCancelOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicCancelOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicConsumeBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicConsumeBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicConsumeBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.String,System.Boolean,System.Boolean,System.Boolean,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Queue</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>NoLocal</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>NoAck</Item>
- </Issue>
- </Message>
- <Message Id="6#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exclusive</Item>
- </Issue>
- </Message>
- <Message Id="7#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="5#Ack" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>BasicConsumeBody.CreateAMQFrame(UInt16, UInt16, String, String, Boolean, Boolean, Boolean, Boolean):AMQFrame</Item>
- <Item>Ack</Item>
- <Item>NoAck</Item>
- </Issue>
- </Message>
- <Message Id="7#Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>BasicConsumeBody.CreateAMQFrame(UInt16, UInt16, String, String, Boolean, Boolean, Boolean, Boolean):AMQFrame</Item>
- <Item>Nowait</Item>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicConsumeBody.CreateAMQFrame(UInt16, UInt16, String, String, Boolean, Boolean, Boolean, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exclusive">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exclusive</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicConsumeBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicConsumeBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="NoAck">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>NoAck</Item>
- </Issue>
- </Message>
- <Message Id="Ack" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Ack</Item>
- <Item>BasicConsumeBody.NoAck</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="NoLocal">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>NoLocal</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Nowait">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Nowait</Item>
- <Item>BasicConsumeBody.Nowait</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Queue">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Queue</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicConsumeOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicConsumeOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicConsumeOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicConsumeOkBody.CreateAMQFrame(UInt16, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicConsumeOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicConsumeOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicContentHeaderProperties">
- <Members>
- <Member Name="AppId">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AppId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ClusterId">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ClusterId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ContentType">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ContentType</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CorrelationId">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>CorrelationId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DeliveryMode">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DeliveryMode</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Encoding">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Encoding</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Expiration">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Expiration</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Headers">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Headers</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MessageId">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MessageId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="PopulatePropertiesFromBuffer(Qpid.Buffer.ByteBuffer,System.UInt16):System.Void">
- <Messages>
- <Message Id="System.UInt32.Parse(System.String)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicContentHeaderProperties.PopulatePropertiesFromBuffer(ByteBuffer, UInt16):Void</Item>
- <Item>System.UInt32.Parse(System.String)</Item>
- <Item>System.UInt32.Parse(System.String,System.IFormatProvider)</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>BasicContentHeaderProperties.PopulatePropertiesFromBuffer(ByteBuffer, UInt16):Void</Item>
- </Issue>
- <Issue>
- <Item>'buffer'</Item>
- <Item>BasicContentHeaderProperties.PopulatePropertiesFromBuffer(ByteBuffer, UInt16):Void</Item>
- </Issue>
- <Issue>
- <Item>'buffer'</Item>
- <Item>BasicContentHeaderProperties.PopulatePropertiesFromBuffer(ByteBuffer, UInt16):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Priority">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Priority</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="PropertyListSize">
- <Accessors>
- <Accessor Name="get_PropertyListSize():System.UInt32">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicContentHeaderProperties.get_PropertyListSize():UInt32</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Accessor>
- </Accessors>
- </Member>
- <Member Name="ReplyTo">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReplyTo</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Timestamp">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Timestamp</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Type">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Type</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="UserId">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>UserId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WritePropertyListPayload(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object)" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BasicContentHeaderProperties.WritePropertyListPayload(ByteBuffer):Void</Item>
- <Item>System.String.Format(System.String,System.Object)</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>BasicContentHeaderProperties.WritePropertyListPayload(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicDeliverBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicDeliverBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicDeliverBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String,System.UInt64,System.Boolean,System.String,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Redelivered</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exchange</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicDeliverBody.CreateAMQFrame(UInt16, String, UInt64, Boolean, String, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DeliveryTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exchange">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exchange</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicDeliverBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicDeliverBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Redelivered">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Redelivered</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="RoutingKey">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicGetBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicGetBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicGetBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Queue</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>NoAck</Item>
- </Issue>
- </Message>
- <Message Id="3#Ack" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>BasicGetBody.CreateAMQFrame(UInt16, UInt16, String, Boolean):AMQFrame</Item>
- <Item>Ack</Item>
- <Item>NoAck</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicGetBody.CreateAMQFrame(UInt16, UInt16, String, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicGetBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicGetBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="NoAck">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>NoAck</Item>
- </Issue>
- </Message>
- <Message Id="Ack" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Ack</Item>
- <Item>BasicGetBody.NoAck</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Queue">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Queue</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicGetEmptyBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicGetEmptyBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicGetEmptyBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ClusterId">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ClusterId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ClusterId</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicGetEmptyBody.CreateAMQFrame(UInt16, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicGetEmptyBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicGetEmptyBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicGetOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicGetOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicGetOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt64,System.Boolean,System.String,System.String,System.UInt32):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Redelivered</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exchange</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>MessageCount</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicGetOkBody.CreateAMQFrame(UInt16, UInt64, Boolean, String, String, UInt32):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DeliveryTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exchange">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exchange</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MessageCount">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MessageCount</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicGetOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicGetOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Redelivered">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Redelivered</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="RoutingKey">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicPublishBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicPublishBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicPublishBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.String,System.Boolean,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exchange</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Mandatory</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Immediate</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicPublishBody.CreateAMQFrame(UInt16, UInt16, String, String, Boolean, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exchange">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exchange</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Immediate">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Immediate</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Mandatory">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Mandatory</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicPublishBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicPublishBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="RoutingKey">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicQosBody">
- <Messages>
- <Message Id="Qos" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qos</Item>
- <Item>Qpid.Framing.BasicQosBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicQosBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicQosBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt32,System.UInt16,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>PrefetchSize</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>PrefetchCount</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Global</Item>
- </Issue>
- </Message>
- <Message Id="1#Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>BasicQosBody.CreateAMQFrame(UInt16, UInt32, UInt16, Boolean):AMQFrame</Item>
- <Item>Prefetch</Item>
- <Item>PrefetchSize</Item>
- </Issue>
- </Message>
- <Message Id="2#Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>BasicQosBody.CreateAMQFrame(UInt16, UInt32, UInt16, Boolean):AMQFrame</Item>
- <Item>Prefetch</Item>
- <Item>PrefetchCount</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicQosBody.CreateAMQFrame(UInt16, UInt32, UInt16, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Global">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Global</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicQosBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicQosBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="PrefetchCount">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>PrefetchCount</Item>
- </Issue>
- </Message>
- <Message Id="Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Prefetch</Item>
- <Item>BasicQosBody.PrefetchCount</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="PrefetchSize">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>PrefetchSize</Item>
- </Issue>
- </Message>
- <Message Id="Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Prefetch</Item>
- <Item>BasicQosBody.PrefetchSize</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicQosOkBody">
- <Messages>
- <Message Id="Qos" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qos</Item>
- <Item>Qpid.Framing.BasicQosOkBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicQosOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicQosOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicQosOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicQosOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicQosOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicRecoverBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicRecoverBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicRecoverBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Requeue</Item>
- </Issue>
- </Message>
- <Message Id="1#Requeue" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>BasicRecoverBody.CreateAMQFrame(UInt16, Boolean):AMQFrame</Item>
- <Item>Requeue</Item>
- <Item>Requeue</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicRecoverBody.CreateAMQFrame(UInt16, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicRecoverBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicRecoverBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Requeue">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Requeue</Item>
- </Issue>
- </Message>
- <Message Id="Requeue" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Requeue</Item>
- <Item>BasicRecoverBody.Requeue</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicRejectBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicRejectBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicRejectBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt64,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Requeue</Item>
- </Issue>
- </Message>
- <Message Id="2#Requeue" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>BasicRejectBody.CreateAMQFrame(UInt16, UInt64, Boolean):AMQFrame</Item>
- <Item>Requeue</Item>
- <Item>Requeue</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicRejectBody.CreateAMQFrame(UInt16, UInt64, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DeliveryTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicRejectBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicRejectBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Requeue">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Requeue</Item>
- </Issue>
- </Message>
- <Message Id="Requeue" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Requeue</Item>
- <Item>BasicRejectBody.Requeue</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="BasicReturnBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicReturnBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicReturnBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.String,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ReplyCode</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ReplyText</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exchange</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicReturnBody.CreateAMQFrame(UInt16, UInt16, String, String, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exchange">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exchange</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>BasicReturnBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>BasicReturnBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReplyCode">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReplyCode</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReplyText">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReplyText</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="RoutingKey">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ChannelAlertBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelAlertBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelAlertBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,Qpid.Framing.FieldTable):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ReplyCode</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ReplyText</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Details</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelAlertBody.CreateAMQFrame(UInt16, UInt16, String, FieldTable):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Details">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Details</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelAlertBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelAlertBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReplyCode">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReplyCode</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReplyText">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReplyText</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ChannelCloseBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelCloseBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelCloseBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ClassId">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ClassId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.UInt16,System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ReplyCode</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ReplyText</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ClassId</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>MethodId</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelCloseBody.CreateAMQFrame(UInt16, UInt16, String, UInt16, UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelCloseBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelCloseBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MethodId">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MethodId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReplyCode">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReplyCode</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReplyText">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReplyText</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ChannelCloseOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelCloseOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelCloseOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelCloseOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelCloseOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelCloseOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ChannelFlowBody">
- <Members>
- <Member Name="Active">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Active</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelFlowBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelFlowBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Active</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelFlowBody.CreateAMQFrame(UInt16, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelFlowBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelFlowBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ChannelFlowOkBody">
- <Members>
- <Member Name="Active">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Active</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelFlowOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelFlowOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Active</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelFlowOkBody.CreateAMQFrame(UInt16, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelFlowOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelFlowOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ChannelOpenBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelOpenBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelOpenBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>OutOfBand</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelOpenBody.CreateAMQFrame(UInt16, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelOpenBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelOpenBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="OutOfBand">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>OutOfBand</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ChannelOpenOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelOpenOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelOpenOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelOpenOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ChannelOpenOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ChannelOpenOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="CompositeAMQDataBlock">
- <Messages>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>CompositeAMQDataBlock</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="Blocks">
- <Messages>
- <Message TypeName="PropertiesShouldNotReturnArrays" Category="Microsoft.Performance" CheckId="CA1819" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>CompositeAMQDataBlock.Blocks:IDataBlock[]</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionCloseBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionCloseBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionCloseBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ClassId">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ClassId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.UInt16,System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ReplyCode</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ReplyText</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ClassId</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>MethodId</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionCloseBody.CreateAMQFrame(UInt16, UInt16, String, UInt16, UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionCloseBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionCloseBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MethodId">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MethodId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReplyCode">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReplyCode</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReplyText">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReplyText</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionCloseOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionCloseOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionCloseOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionCloseOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionCloseOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionCloseOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionOpenBody">
- <Members>
- <Member Name="Capabilities">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Capabilities</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionOpenBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionOpenBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String,System.String,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>VirtualHost</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Capabilities</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Insist</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionOpenBody.CreateAMQFrame(UInt16, String, String, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Insist">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Insist</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionOpenBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionOpenBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="VirtualHost">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>VirtualHost</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionOpenOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionOpenOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionOpenOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>KnownHosts</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionOpenOkBody.CreateAMQFrame(UInt16, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="KnownHosts">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>KnownHosts</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionOpenOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionOpenOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionRedirectBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionRedirectBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionRedirectBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Host</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>KnownHosts</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionRedirectBody.CreateAMQFrame(UInt16, String, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Host">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Host</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="KnownHosts">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>KnownHosts</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionRedirectBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionRedirectBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionSecureBody">
- <Members>
- <Member Name="Challenge">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Challenge</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionSecureBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionSecureBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.Byte[]):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Challenge</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionSecureBody.CreateAMQFrame(UInt16, Byte[]):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionSecureBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionSecureBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionSecureOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionSecureOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionSecureOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.Byte[]):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Response</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionSecureOkBody.CreateAMQFrame(UInt16, Byte[]):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionSecureOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionSecureOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Response">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Response</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionStartBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionStartBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionStartBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.Byte,System.Byte,Qpid.Framing.FieldTable,System.Byte[],System.Byte[]):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>VersionMajor</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>VersionMinor</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ServerProperties</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Mechanisms</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Locales</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionStartBody.CreateAMQFrame(UInt16, Byte, Byte, FieldTable, Byte[], Byte[]):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Locales">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Locales</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Mechanisms">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Mechanisms</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionStartBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionStartBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ServerProperties">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ServerProperties</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="VersionMajor">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>VersionMajor</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="VersionMinor">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>VersionMinor</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionStartOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionStartOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionStartOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ClientProperties">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ClientProperties</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,Qpid.Framing.FieldTable,System.String,System.Byte[],System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ClientProperties</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Mechanism</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Response</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Locale</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionStartOkBody.CreateAMQFrame(UInt16, FieldTable, String, Byte[], String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Locale">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Locale</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Mechanism">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Mechanism</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionStartOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionStartOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Response">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Response</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionTuneBody">
- <Members>
- <Member Name="ChannelMax">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ChannelMax</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionTuneBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionTuneBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.UInt32,System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ChannelMax</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>FrameMax</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Heartbeat</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionTuneBody.CreateAMQFrame(UInt16, UInt16, UInt32, UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="FrameMax">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FrameMax</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Heartbeat">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Heartbeat</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionTuneBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionTuneBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ConnectionTuneOkBody">
- <Members>
- <Member Name="ChannelMax">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ChannelMax</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionTuneOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionTuneOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.UInt32,System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ChannelMax</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>FrameMax</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Heartbeat</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionTuneOkBody.CreateAMQFrame(UInt16, UInt16, UInt32, UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="FrameMax">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FrameMax</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Heartbeat">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Heartbeat</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ConnectionTuneOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ConnectionTuneOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ContentBody">
- <Members>
- <Member Name="CreateAMQFrame(System.UInt16,Qpid.Framing.ContentBody):Qpid.Framing.AMQFrame">
- <Messages>
- <Message TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>body</Item>
- <Item>ContentBody.CreateAMQFrame(UInt16, ContentBody):AMQFrame</Item>
- <Item>Qpid.Framing.ContentBody</Item>
- <Item>Qpid.Framing.IBody</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ContentBody.CreateAMQFrame(UInt16, ContentBody):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Payload">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Payload</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="PopulateFromBuffer(Qpid.Buffer.ByteBuffer,System.UInt32):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>ContentBody.PopulateFromBuffer(ByteBuffer, UInt32):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="TYPE">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ContentBody.TYPE</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WritePayload(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>ContentBody.WritePayload(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ContentBodyFactory">
- <Members>
- <Member Name="GetInstance():Qpid.Framing.ContentBodyFactory">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>GetInstance</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ContentHeaderBody">
- <Members>
- <Member Name="BodySize">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>BodySize</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ClassId">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ClassId</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,Qpid.Framing.ContentHeaderBody):Qpid.Framing.AMQFrame">
- <Messages>
- <Message TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>body</Item>
- <Item>ContentHeaderBody.CreateAMQFrame(UInt16, ContentHeaderBody):AMQFrame</Item>
- <Item>Qpid.Framing.ContentHeaderBody</Item>
- <Item>Qpid.Framing.IBody</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ContentHeaderBody.CreateAMQFrame(UInt16, ContentHeaderBody):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.UInt16,Qpid.Framing.BasicContentHeaderProperties,System.UInt32):Qpid.Framing.AMQFrame">
- <Messages>
- <Message TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>properties</Item>
- <Item>ContentHeaderBody.CreateAMQFrame(UInt16, UInt16, UInt16, BasicContentHeaderProperties, UInt32):AMQFrame</Item>
- <Item>Qpid.Framing.BasicContentHeaderProperties</Item>
- <Item>Qpid.Framing.IContentHeaderProperties</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ContentHeaderBody.CreateAMQFrame(UInt16, UInt16, UInt16, BasicContentHeaderProperties, UInt32):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="PopulateFromBuffer(Qpid.Buffer.ByteBuffer,System.UInt32):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>ContentHeaderBody.PopulateFromBuffer(ByteBuffer, UInt32):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Properties">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Properties</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ToString():System.String">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object[])" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ContentHeaderBody.ToString():String</Item>
- <Item>System.String.Format(System.String,System.Object[])</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="TYPE">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ContentHeaderBody.TYPE</Item>
- </Issue>
- </Message>
- <Message TypeName="UseLiteralsWhereAppropriate" Category="Microsoft.Performance" CheckId="CA1802" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>TYPE</Item>
- <Item>2</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Weight">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Weight</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WritePayload(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>ContentHeaderBody.WritePayload(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ContentHeaderBodyFactory">
- <Members>
- <Member Name="GetInstance():Qpid.Framing.ContentHeaderBodyFactory">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>GetInstance</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ContentHeaderPropertiesFactory">
- <Members>
- <Member Name="CreateContentHeaderProperties(System.UInt16,System.UInt16,Qpid.Buffer.ByteBuffer):Qpid.Framing.IContentHeaderProperties">
- <Messages>
- <Message Id="Qpid.Framing.AMQFrameDecodingException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ContentHeaderPropertiesFactory.CreateContentHeaderProperties(UInt16, UInt16, ByteBuffer):IContentHeaderProperties</Item>
- <Item>1</Item>
- <Item>AMQFrameDecodingException.AMQFrameDecodingException(String)</Item>
- <Item>Unsupport content header class id: __</Item>
- </Issue>
- </Message>
- <Message Id="Unsupport" TypeName="LiteralsShouldBeSpelledCorrectly" Category="Microsoft.Usage" CheckId="CA2204" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Unsupport</Item>
- <Item>Unsupport content header class id: __</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>ContentHeaderPropertiesFactory.CreateContentHeaderProperties(UInt16, UInt16, ByteBuffer):IContentHeaderProperties</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="GetInstance():Qpid.Framing.ContentHeaderPropertiesFactory">
- <Messages>
- <Message TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>GetInstance</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="DtxSelectBody">
- <Messages>
- <Message Id="Dtx" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Dtx</Item>
- <Item>Qpid.Framing.DtxSelectBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DtxSelectBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>DtxSelectBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DtxSelectBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DtxSelectBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>DtxSelectBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="DtxSelectOkBody">
- <Messages>
- <Message Id="Dtx" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Dtx</Item>
- <Item>Qpid.Framing.DtxSelectOkBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DtxSelectOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>DtxSelectOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DtxSelectOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DtxSelectOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>DtxSelectOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="DtxStartBody">
- <Messages>
- <Message Id="Dtx" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Dtx</Item>
- <Item>Qpid.Framing.DtxStartBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DtxStartBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>DtxStartBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>DtxIdentifier</Item>
- </Issue>
- </Message>
- <Message Id="1#Dtx" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>DtxStartBody.CreateAMQFrame(UInt16, String):AMQFrame</Item>
- <Item>Dtx</Item>
- <Item>DtxIdentifier</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DtxStartBody.CreateAMQFrame(UInt16, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DtxIdentifier">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DtxIdentifier</Item>
- </Issue>
- </Message>
- <Message Id="Dtx" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Dtx</Item>
- <Item>DtxStartBody.DtxIdentifier</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DtxStartBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>DtxStartBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="DtxStartOkBody">
- <Messages>
- <Message Id="Dtx" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Dtx</Item>
- <Item>Qpid.Framing.DtxStartOkBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DtxStartOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>DtxStartOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DtxStartOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DtxStartOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>DtxStartOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="EncodingUtils">
- <Messages>
- <Message Id="Utils" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Utils</Item>
- <Item>Qpid.Framing.EncodingUtils</Item>
- </Issue>
- </Message>
- <Message TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>EncodingUtils</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="EncodedLongStringLength(System.String):System.UInt32">
- <Messages>
- <Message Id="0#s" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>EncodingUtils.EncodedLongStringLength(String):UInt32</Item>
- <Item>s</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="EncodedLongstrLength(System.Byte[]):System.Int32">
- <Messages>
- <Message Id="Longstr" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Longstr</Item>
- <Item>EncodingUtils.EncodedLongstrLength(Byte[]):Int32</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="EncodedShortStringLength(System.String):System.UInt16">
- <Messages>
- <Message Id="0#s" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>EncodingUtils.EncodedShortStringLength(String):UInt16</Item>
- <Item>s</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReadBooleans(Qpid.Buffer.ByteBuffer):System.Boolean[]">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>EncodingUtils.ReadBooleans(ByteBuffer):Boolean[]</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReadFieldTable(Qpid.Buffer.ByteBuffer):Qpid.Framing.FieldTable">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>EncodingUtils.ReadFieldTable(ByteBuffer):FieldTable</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReadLongstr(Qpid.Buffer.ByteBuffer):System.Byte[]">
- <Messages>
- <Message Id="Longstr" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Longstr</Item>
- <Item>EncodingUtils.ReadLongstr(ByteBuffer):Byte[]</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>EncodingUtils.ReadLongstr(ByteBuffer):Byte[]</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReadLongString(Qpid.Buffer.ByteBuffer):System.String">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>EncodingUtils.ReadLongString(ByteBuffer):String</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReadShortString(Qpid.Buffer.ByteBuffer):System.String">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>EncodingUtils.ReadShortString(ByteBuffer):String</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteBooleans(Qpid.Buffer.ByteBuffer,System.Boolean[]):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>EncodingUtils.WriteBooleans(ByteBuffer, Boolean[]):Void</Item>
- </Issue>
- <Issue>
- <Item>'values'</Item>
- <Item>EncodingUtils.WriteBooleans(ByteBuffer, Boolean[]):Void</Item>
- </Issue>
- <Issue>
- <Item>'values'</Item>
- <Item>EncodingUtils.WriteBooleans(ByteBuffer, Boolean[]):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteFieldTableBytes(Qpid.Buffer.ByteBuffer,Qpid.Framing.FieldTable):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>EncodingUtils.WriteFieldTableBytes(ByteBuffer, FieldTable):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteLongstr(Qpid.Buffer.ByteBuffer,System.Byte[]):System.Void">
- <Messages>
- <Message Id="Longstr" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Longstr</Item>
- <Item>EncodingUtils.WriteLongstr(ByteBuffer, Byte[]):Void</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>EncodingUtils.WriteLongstr(ByteBuffer, Byte[]):Void</Item>
- </Issue>
- <Issue>
- <Item>'buffer'</Item>
- <Item>EncodingUtils.WriteLongstr(ByteBuffer, Byte[]):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteLongStringBytes(Qpid.Buffer.ByteBuffer,System.String):System.Void">
- <Messages>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>EncodingUtils.WriteLongStringBytes(ByteBuffer, String):Void</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>String too long</Item>
- </Issue>
- </Message>
- <Message Id="1#s" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>EncodingUtils.WriteLongStringBytes(ByteBuffer, String):Void</Item>
- <Item>s</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>EncodingUtils.WriteLongStringBytes(ByteBuffer, String):Void</Item>
- </Issue>
- <Issue>
- <Item>'buffer'</Item>
- <Item>EncodingUtils.WriteLongStringBytes(ByteBuffer, String):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteShortStringBytes(Qpid.Buffer.ByteBuffer,System.String):System.Void">
- <Messages>
- <Message Id="1#s" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>EncodingUtils.WriteShortStringBytes(ByteBuffer, String):Void</Item>
- <Item>s</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>EncodingUtils.WriteShortStringBytes(ByteBuffer, String):Void</Item>
- </Issue>
- <Issue>
- <Item>'buffer'</Item>
- <Item>EncodingUtils.WriteShortStringBytes(ByteBuffer, String):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ExchangeDeclareBody">
- <Members>
- <Member Name="Arguments">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Arguments</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="AutoDelete">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AutoDelete</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeDeclareBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ExchangeDeclareBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.String,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,Qpid.Framing.FieldTable):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exchange</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Type</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Passive</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Durable</Item>
- </Issue>
- </Message>
- <Message Id="6#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>AutoDelete</Item>
- </Issue>
- </Message>
- <Message Id="7#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Internal</Item>
- </Issue>
- </Message>
- <Message Id="8#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="9#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Arguments</Item>
- </Issue>
- </Message>
- <Message Id="8#Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ExchangeDeclareBody.CreateAMQFrame(UInt16, UInt16, String, String, Boolean, Boolean, Boolean, Boolean, Boolean, FieldTable):AMQFrame</Item>
- <Item>Nowait</Item>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeDeclareBody.CreateAMQFrame(UInt16, UInt16, String, String, Boolean, Boolean, Boolean, Boolean, Boolean, FieldTable):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Durable">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Durable</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exchange">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exchange</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Internal">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Internal</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeDeclareBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ExchangeDeclareBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Nowait">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Nowait</Item>
- <Item>ExchangeDeclareBody.Nowait</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Passive">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Passive</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Type">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Type</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ExchangeDeclareOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeDeclareOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ExchangeDeclareOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeDeclareOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeDeclareOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ExchangeDeclareOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ExchangeDeleteBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeDeleteBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ExchangeDeleteBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.Boolean,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exchange</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>IfUnused</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="4#Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ExchangeDeleteBody.CreateAMQFrame(UInt16, UInt16, String, Boolean, Boolean):AMQFrame</Item>
- <Item>Nowait</Item>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeDeleteBody.CreateAMQFrame(UInt16, UInt16, String, Boolean, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exchange">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exchange</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="IfUnused">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>IfUnused</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeDeleteBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ExchangeDeleteBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Nowait">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Nowait</Item>
- <Item>ExchangeDeleteBody.Nowait</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ExchangeDeleteOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeDeleteOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ExchangeDeleteOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeDeleteOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeDeleteOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>ExchangeDeleteOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FieldTable">
- <Messages>
- <Message TypeName="CollectionsShouldImplementGenericInterface" Category="Microsoft.Design" CheckId="CA1010" Created="2006-12-04 13:11:47Z">
- <Issue Certainty="60">
- <Item>FieldTable</Item>
- <Item>IEnumerable</Item>
- </Issue>
- </Message>
- <Message TypeName="IdentifiersShouldHaveCorrectSuffix" Category="Microsoft.Naming" CheckId="CA1710" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Framing.FieldTable</Item>
- <Item>Collection</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor()">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FieldTable.FieldTable()</Item>
- <Item>_encodedSize</Item>
- <Item>System.UInt32</Item>
- <Item>0</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name=".ctor(Qpid.Buffer.ByteBuffer,System.UInt32)">
- <Messages>
- <Message Id="Qpid.Framing.AMQFrameDecodingException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FieldTable.FieldTable(ByteBuffer, UInt32)</Item>
- <Item>1</Item>
- <Item>AMQFrameDecodingException.AMQFrameDecodingException(String)</Item>
- <Item>Unsupported field table type: __</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>FieldTable.FieldTable(ByteBuffer, UInt32)</Item>
- </Issue>
- <Issue>
- <Item>'buffer'</Item>
- <Item>FieldTable.FieldTable(ByteBuffer, UInt32)</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="AddAll(Qpid.Messaging.IFieldTable):System.Void">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ft</Item>
- <Item>FieldTable.AddAll(IFieldTable):Void</Item>
- <Item>source</Item>
- <Item>IFieldTable.AddAll(IFieldTable):Void</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'ft'</Item>
- <Item>FieldTable.AddAll(IFieldTable):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="AdjustEncodingSizeWhenAdding(System.Object,System.Object):System.Void">
- <Messages>
- <Message TypeName="DoNotCastUnnecessarily" Category="Microsoft.Performance" CheckId="CA1800" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>value</Item>
- <Item>System.String</Item>
- <Item>FieldTable.AdjustEncodingSizeWhenAdding(Object, Object):Void</Item>
- <Item>castclass</Item>
- </Issue>
- </Message>
- <Message Id="System.Exception.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FieldTable.AdjustEncodingSizeWhenAdding(Object, Object):Void</Item>
- <Item>1</Item>
- <Item>Exception.Exception(String)</Item>
- <Item>Unsupported value type: __</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2006-12-04 13:11:47Z">
- <Issue Name="TooGeneric">
- <Item>FieldTable.AdjustEncodingSizeWhenAdding(Object, Object):Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="AdjustEncodingSizeWhenRemoving(System.Object,System.Object):System.Void">
- <Messages>
- <Message TypeName="DoNotCastUnnecessarily" Category="Microsoft.Performance" CheckId="CA1800" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>value</Item>
- <Item>System.String</Item>
- <Item>FieldTable.AdjustEncodingSizeWhenRemoving(Object, Object):Void</Item>
- <Item>castclass</Item>
- </Issue>
- </Message>
- <Message Id="System.Exception.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FieldTable.AdjustEncodingSizeWhenRemoving(Object, Object):Void</Item>
- <Item>1</Item>
- <Item>Exception.Exception(String)</Item>
- <Item>Illegal value type: __</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201" Created="2006-12-04 13:11:47Z">
- <Issue Name="TooGeneric">
- <Item>FieldTable.AdjustEncodingSizeWhenRemoving(Object, Object):Void</Item>
- <Item>System.Exception</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CheckKey(System.Object):System.Void">
- <Messages>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FieldTable.CheckKey(Object):Void</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>All keys must be Strings - was passed: __</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="NonBreaking">
- <Issue>
- <Item>FieldTable.CheckKey(Object):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CheckValue(System.Object):System.Void">
- <Messages>
- <Message Id="System.ArgumentException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FieldTable.CheckValue(Object):Void</Item>
- <Item>1</Item>
- <Item>ArgumentException.ArgumentException(String)</Item>
- <Item>All values must be type string or int or long or uint, was passed: __</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="NonBreaking">
- <Issue>
- <Item>FieldTable.CheckValue(Object):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WritePayload(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message TypeName="DoNotCastUnnecessarily" Category="Microsoft.Performance" CheckId="CA1800" Created="2006-12-04 13:11:47Z">
- <Issue Name="Local">
- <Item>value</Item>
- <Item>System.Byte[]</Item>
- <Item>FieldTable.WritePayload(ByteBuffer):Void</Item>
- <Item>castclass</Item>
- </Issue>
- <Issue Name="Local">
- <Item>value</Item>
- <Item>System.String</Item>
- <Item>FieldTable.WritePayload(ByteBuffer):Void</Item>
- <Item>castclass</Item>
- </Issue>
- </Message>
- <Message Id="System.InvalidOperationException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FieldTable.WritePayload(ByteBuffer):Void</Item>
- <Item>1</Item>
- <Item>InvalidOperationException.InvalidOperationException(String)</Item>
- <Item>Unsupported type in FieldTable: __</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteToBuffer(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>FieldTable.WriteToBuffer(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FileAckBody">
- <Messages>
- <Message Id="Ack" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Ack</Item>
- <Item>Qpid.Framing.FileAckBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileAckBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileAckBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt64,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Multiple</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileAckBody.CreateAMQFrame(UInt16, UInt64, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DeliveryTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileAckBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileAckBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Multiple">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Multiple</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FileCancelBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileCancelBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileCancelBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="2#Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>FileCancelBody.CreateAMQFrame(UInt16, String, Boolean):AMQFrame</Item>
- <Item>Nowait</Item>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileCancelBody.CreateAMQFrame(UInt16, String, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileCancelBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileCancelBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Nowait">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Nowait</Item>
- <Item>FileCancelBody.Nowait</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FileCancelOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileCancelOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileCancelOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileCancelOkBody.CreateAMQFrame(UInt16, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileCancelOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileCancelOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FileConsumeBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileConsumeBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileConsumeBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.String,System.Boolean,System.Boolean,System.Boolean,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Queue</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>NoLocal</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>NoAck</Item>
- </Issue>
- </Message>
- <Message Id="6#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exclusive</Item>
- </Issue>
- </Message>
- <Message Id="7#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="5#Ack" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>FileConsumeBody.CreateAMQFrame(UInt16, UInt16, String, String, Boolean, Boolean, Boolean, Boolean):AMQFrame</Item>
- <Item>Ack</Item>
- <Item>NoAck</Item>
- </Issue>
- </Message>
- <Message Id="7#Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>FileConsumeBody.CreateAMQFrame(UInt16, UInt16, String, String, Boolean, Boolean, Boolean, Boolean):AMQFrame</Item>
- <Item>Nowait</Item>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileConsumeBody.CreateAMQFrame(UInt16, UInt16, String, String, Boolean, Boolean, Boolean, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exclusive">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exclusive</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileConsumeBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileConsumeBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="NoAck">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>NoAck</Item>
- </Issue>
- </Message>
- <Message Id="Ack" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Ack</Item>
- <Item>FileConsumeBody.NoAck</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="NoLocal">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>NoLocal</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Nowait">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Nowait</Item>
- <Item>FileConsumeBody.Nowait</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Queue">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Queue</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FileConsumeOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileConsumeOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileConsumeOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileConsumeOkBody.CreateAMQFrame(UInt16, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileConsumeOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileConsumeOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FileDeliverBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileDeliverBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileDeliverBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String,System.UInt64,System.Boolean,System.String,System.String,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Redelivered</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exchange</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- <Message Id="6#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Identifier</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileDeliverBody.CreateAMQFrame(UInt16, String, UInt64, Boolean, String, String, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DeliveryTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exchange">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exchange</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Identifier">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Identifier</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileDeliverBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileDeliverBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Redelivered">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Redelivered</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="RoutingKey">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FileOpenBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileOpenBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileOpenBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ContentSize">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ContentSize</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String,System.UInt64):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Identifier</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ContentSize</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileOpenBody.CreateAMQFrame(UInt16, String, UInt64):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Identifier">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Identifier</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileOpenBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileOpenBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FileOpenOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileOpenOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileOpenOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt64):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>StagedSize</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileOpenOkBody.CreateAMQFrame(UInt16, UInt64):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileOpenOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileOpenOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="StagedSize">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>StagedSize</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FilePublishBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FilePublishBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FilePublishBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.String,System.Boolean,System.Boolean,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exchange</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Mandatory</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Immediate</Item>
- </Issue>
- </Message>
- <Message Id="6#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Identifier</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FilePublishBody.CreateAMQFrame(UInt16, UInt16, String, String, Boolean, Boolean, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exchange">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exchange</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Identifier">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Identifier</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Immediate">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Immediate</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Mandatory">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Mandatory</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FilePublishBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FilePublishBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="RoutingKey">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FileQosBody">
- <Messages>
- <Message Id="Qos" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qos</Item>
- <Item>Qpid.Framing.FileQosBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileQosBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileQosBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt32,System.UInt16,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>PrefetchSize</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>PrefetchCount</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Global</Item>
- </Issue>
- </Message>
- <Message Id="1#Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>FileQosBody.CreateAMQFrame(UInt16, UInt32, UInt16, Boolean):AMQFrame</Item>
- <Item>Prefetch</Item>
- <Item>PrefetchSize</Item>
- </Issue>
- </Message>
- <Message Id="2#Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>FileQosBody.CreateAMQFrame(UInt16, UInt32, UInt16, Boolean):AMQFrame</Item>
- <Item>Prefetch</Item>
- <Item>PrefetchCount</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileQosBody.CreateAMQFrame(UInt16, UInt32, UInt16, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Global">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Global</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileQosBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileQosBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="PrefetchCount">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>PrefetchCount</Item>
- </Issue>
- </Message>
- <Message Id="Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Prefetch</Item>
- <Item>FileQosBody.PrefetchCount</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="PrefetchSize">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>PrefetchSize</Item>
- </Issue>
- </Message>
- <Message Id="Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Prefetch</Item>
- <Item>FileQosBody.PrefetchSize</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FileQosOkBody">
- <Messages>
- <Message Id="Qos" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qos</Item>
- <Item>Qpid.Framing.FileQosOkBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileQosOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileQosOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileQosOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileQosOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileQosOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FileRejectBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileRejectBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileRejectBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt64,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Requeue</Item>
- </Issue>
- </Message>
- <Message Id="2#Requeue" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>FileRejectBody.CreateAMQFrame(UInt16, UInt64, Boolean):AMQFrame</Item>
- <Item>Requeue</Item>
- <Item>Requeue</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileRejectBody.CreateAMQFrame(UInt16, UInt64, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DeliveryTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileRejectBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileRejectBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Requeue">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Requeue</Item>
- </Issue>
- </Message>
- <Message Id="Requeue" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Requeue</Item>
- <Item>FileRejectBody.Requeue</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FileReturnBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileReturnBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileReturnBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.String,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ReplyCode</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ReplyText</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exchange</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileReturnBody.CreateAMQFrame(UInt16, UInt16, String, String, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exchange">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exchange</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileReturnBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileReturnBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReplyCode">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReplyCode</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReplyText">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReplyText</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="RoutingKey">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="FileStageBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileStageBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileStageBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileStageBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>FileStageBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>FileStageBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="HeartbeatBody">
- <Members>
- <Member Name="FRAME">
- <Messages>
- <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>FRAME</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="PopulateFromBuffer(Qpid.Buffer.ByteBuffer,System.UInt32):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>HeartbeatBody.PopulateFromBuffer(ByteBuffer, UInt32):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="TYPE">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>HeartbeatBody.TYPE</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="HeartbeatBodyFactory">
- <Members>
- <Member Name="CreateBody(Qpid.Buffer.ByteBuffer):Qpid.Framing.IBody">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>input</Item>
- <Item>HeartbeatBodyFactory.CreateBody(ByteBuffer):IBody</Item>
- <Item>inbuf</Item>
- <Item>IBodyFactory.CreateBody(ByteBuffer):IBody</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IBodyFactory">
- <Members>
- <Member Name="CreateBody(Qpid.Buffer.ByteBuffer):Qpid.Framing.IBody">
- <Messages>
- <Message Id="0#inbuf" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>IBodyFactory.CreateBody(ByteBuffer):IBody</Item>
- <Item>inbuf</Item>
- <Item>inbuf</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IEncodableAMQDataBlock">
- <Messages>
- <Message TypeName="AvoidEmptyInterfaces" Category="Microsoft.Design" CheckId="CA1040" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>IEncodableAMQDataBlock</Item>
- </Issue>
- </Message>
- <Message TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>IEncodableAMQDataBlock</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="MainRegistry">
- <Messages>
- <Message TypeName="AvoidUninstantiatedInternalClasses" Category="Microsoft.Performance" CheckId="CA1812" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Framing.MainRegistry</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="MethodBodyDecoderRegistry">
- <Messages>
- <Message TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MethodBodyDecoderRegistry</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".cctor()">
- <Messages>
- <Message TypeName="InitializeReferenceTypeStaticFieldsInline" Category="Microsoft.Performance" CheckId="CA1810" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Framing.MethodBodyDecoderRegistry</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Get(System.Int32,System.Int32):Qpid.Framing.AMQMethodBody">
- <Messages>
- <Message Id="Qpid.Framing.AMQFrameDecodingException.#ctor(log4net.ILog,System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MethodBodyDecoderRegistry.Get(Int32, Int32):AMQMethodBody</Item>
- <Item>2</Item>
- <Item>AMQFrameDecodingException.AMQFrameDecodingException(ILog, String)</Item>
- <Item>Unable to find a suitable decoder for class ____ and method __</Item>
- </Issue>
- </Message>
- <Message Id="Qpid.Framing.AMQFrameDecodingException.#ctor(log4net.ILog,System.String,System.Exception)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MethodBodyDecoderRegistry.Get(Int32, Int32):AMQMethodBody</Item>
- <Item>2</Item>
- <Item>AMQFrameDecodingException.AMQFrameDecodingException(ILog, String, Exception)</Item>
- <Item>Unable to instantiate body class for class ____ and method ____: __</Item>
- </Issue>
- </Message>
- <Message Id="0#clazz" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>MethodBodyDecoderRegistry.Get(Int32, Int32):AMQMethodBody</Item>
- <Item>clazz</Item>
- <Item>clazz</Item>
- </Issue>
- </Message>
- <Message Id="clazz*1000" TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>clazz*1000</Item>
- <Item>MethodBodyDecoderRegistry.Get(Int32, Int32):AMQMethodBody</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ProtocolInitiation">
- <Members>
- <Member Name=".cctor()">
- <Messages>
- <Message TypeName="InitializeReferenceTypeStaticFieldsInline" Category="Microsoft.Performance" CheckId="CA1810" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Framing.ProtocolInitiation</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name=".ctor()">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ProtocolInitiation.ProtocolInitiation()</Item>
- <Item>ProtocolMinor</Item>
- <Item>System.Byte</Item>
- <Item>0</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CURRENT_PROTOCOL_VERSION_MAJOR">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CURRENT_PROTOCOL_VERSION_MAJOR</Item>
- </Issue>
- </Message>
- <Message TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>CURRENT_PROTOCOL_VERSION_MAJOR</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Header">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Header</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="PopulateFromBuffer(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message Id="Qpid.AMQException.#ctor(System.String)" TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ProtocolInitiation.PopulateFromBuffer(ByteBuffer):Void</Item>
- <Item>1</Item>
- <Item>AMQException.AMQException(String)</Item>
- <Item>Method not implemented</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>ProtocolInitiation.PopulateFromBuffer(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- <Message Id="buffer" TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801" Created="2006-12-04 13:11:47Z" FixCategory="Breaking">
- <Issue>
- <Item>buffer</Item>
- <Item>ProtocolInitiation.PopulateFromBuffer(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ProtocolClass">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ProtocolClass</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ProtocolInstance">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ProtocolInstance</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ProtocolMajor">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ProtocolMajor</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ProtocolMinor">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ProtocolMinor</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ToString():System.String">
- <Messages>
- <Message Id="System.String.Format(System.String,System.Object[])" TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ProtocolInitiation.ToString():String</Item>
- <Item>System.String.Format(System.String,System.Object[])</Item>
- <Item>System.String.Format(System.IFormatProvider,System.String,System.Object[])</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WritePayload(Qpid.Buffer.ByteBuffer):System.Void">
- <Messages>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'buffer'</Item>
- <Item>ProtocolInitiation.WritePayload(ByteBuffer):Void</Item>
- </Issue>
- <Issue>
- <Item>'buffer'</Item>
- <Item>ProtocolInitiation.WritePayload(ByteBuffer):Void</Item>
- </Issue>
- <Issue>
- <Item>'buffer'</Item>
- <Item>ProtocolInitiation.WritePayload(ByteBuffer):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ProtocolInitiation+Decoder">
- <Messages>
- <Message TypeName="NestedTypesShouldNotBeVisible" Category="Microsoft.Design" CheckId="CA1034" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Framing.ProtocolInitiation+Decoder</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor()">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Decoder.Decoder()</Item>
- <Item>_disabled</Item>
- <Item>System.Boolean</Item>
- <Item>false</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Decodable(Qpid.Buffer.ByteBuffer):Qpid.Codec.Demux.MessageDecoderResult">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>inbuf</Item>
- <Item>Decoder.Decodable(ByteBuffer):MessageDecoderResult</Item>
- <Item>buffer</Item>
- <Item>IMessageDecoder.Decodable(ByteBuffer):MessageDecoderResult</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'inbuf'</Item>
- <Item>Decoder.Decodable(ByteBuffer):MessageDecoderResult</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Decode(Qpid.Buffer.ByteBuffer,Qpid.Codec.IProtocolDecoderOutput):Qpid.Codec.Demux.MessageDecoderResult">
- <Messages>
- <Message Id="0#" TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>inbuf</Item>
- <Item>Decoder.Decode(ByteBuffer, IProtocolDecoderOutput):MessageDecoderResult</Item>
- <Item>buffer</Item>
- <Item>IMessageDecoder.Decode(ByteBuffer, IProtocolDecoderOutput):MessageDecoderResult</Item>
- </Issue>
- </Message>
- <Message TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>'inbuf'</Item>
- <Item>Decoder.Decode(ByteBuffer, IProtocolDecoderOutput):MessageDecoderResult</Item>
- </Issue>
- <Issue>
- <Item>'output'</Item>
- <Item>Decoder.Decode(ByteBuffer, IProtocolDecoderOutput):MessageDecoderResult</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Disabled">
- <Messages>
- <Message TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Disabled</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QueueBindBody">
- <Members>
- <Member Name="Arguments">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Arguments</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueBindBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueueBindBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.String,System.String,System.Boolean,Qpid.Framing.FieldTable):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Queue</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exchange</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="6#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Arguments</Item>
- </Issue>
- </Message>
- <Message Id="5#Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>QueueBindBody.CreateAMQFrame(UInt16, UInt16, String, String, String, Boolean, FieldTable):AMQFrame</Item>
- <Item>Nowait</Item>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueBindBody.CreateAMQFrame(UInt16, UInt16, String, String, String, Boolean, FieldTable):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exchange">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exchange</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueBindBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueueBindBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Nowait">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Nowait</Item>
- <Item>QueueBindBody.Nowait</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Queue">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Queue</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="RoutingKey">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QueueBindOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueBindOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueueBindOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueBindOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueBindOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueueBindOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QueueDeclareBody">
- <Members>
- <Member Name="Arguments">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Arguments</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="AutoDelete">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>AutoDelete</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueDeclareBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueueDeclareBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,Qpid.Framing.FieldTable):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Queue</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Passive</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Durable</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exclusive</Item>
- </Issue>
- </Message>
- <Message Id="6#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>AutoDelete</Item>
- </Issue>
- </Message>
- <Message Id="7#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="8#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Arguments</Item>
- </Issue>
- </Message>
- <Message Id="7#Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>QueueDeclareBody.CreateAMQFrame(UInt16, UInt16, String, Boolean, Boolean, Boolean, Boolean, Boolean, FieldTable):AMQFrame</Item>
- <Item>Nowait</Item>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueDeclareBody.CreateAMQFrame(UInt16, UInt16, String, Boolean, Boolean, Boolean, Boolean, Boolean, FieldTable):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Durable">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Durable</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exclusive">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exclusive</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueDeclareBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueueDeclareBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Nowait">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Nowait</Item>
- <Item>QueueDeclareBody.Nowait</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Passive">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Passive</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Queue">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Queue</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QueueDeclareOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueDeclareOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueueDeclareOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerCount">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerCount</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String,System.UInt32,System.UInt32):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Queue</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>MessageCount</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerCount</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueDeclareOkBody.CreateAMQFrame(UInt16, String, UInt32, UInt32):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MessageCount">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MessageCount</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueDeclareOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueueDeclareOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Queue">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Queue</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QueueDeleteBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueDeleteBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueueDeleteBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.Boolean,System.Boolean,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Queue</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>IfUnused</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>IfEmpty</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="5#Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>QueueDeleteBody.CreateAMQFrame(UInt16, UInt16, String, Boolean, Boolean, Boolean):AMQFrame</Item>
- <Item>Nowait</Item>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueDeleteBody.CreateAMQFrame(UInt16, UInt16, String, Boolean, Boolean, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="IfEmpty">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>IfEmpty</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="IfUnused">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>IfUnused</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueDeleteBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueueDeleteBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Nowait">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Nowait</Item>
- <Item>QueueDeleteBody.Nowait</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Queue">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Queue</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QueueDeleteOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueDeleteOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueueDeleteOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt32):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>MessageCount</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueDeleteOkBody.CreateAMQFrame(UInt16, UInt32):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MessageCount">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MessageCount</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueueDeleteOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueueDeleteOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QueuePurgeBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueuePurgeBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueuePurgeBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Queue</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="3#Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>QueuePurgeBody.CreateAMQFrame(UInt16, UInt16, String, Boolean):AMQFrame</Item>
- <Item>Nowait</Item>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueuePurgeBody.CreateAMQFrame(UInt16, UInt16, String, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueuePurgeBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueuePurgeBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Nowait">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Nowait</Item>
- <Item>QueuePurgeBody.Nowait</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Queue">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Queue</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="QueuePurgeOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueuePurgeOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueuePurgeOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt32):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>MessageCount</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueuePurgeOkBody.CreateAMQFrame(UInt16, UInt32):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MessageCount">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MessageCount</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>QueuePurgeOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>QueuePurgeOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="StreamCancelBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamCancelBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamCancelBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="2#Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>StreamCancelBody.CreateAMQFrame(UInt16, String, Boolean):AMQFrame</Item>
- <Item>Nowait</Item>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamCancelBody.CreateAMQFrame(UInt16, String, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamCancelBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamCancelBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Nowait">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Nowait</Item>
- <Item>StreamCancelBody.Nowait</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="StreamCancelOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamCancelOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamCancelOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamCancelOkBody.CreateAMQFrame(UInt16, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamCancelOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamCancelOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="StreamConsumeBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamConsumeBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamConsumeBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.String,System.Boolean,System.Boolean,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Queue</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>NoLocal</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exclusive</Item>
- </Issue>
- </Message>
- <Message Id="6#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="6#Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>StreamConsumeBody.CreateAMQFrame(UInt16, UInt16, String, String, Boolean, Boolean, Boolean):AMQFrame</Item>
- <Item>Nowait</Item>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamConsumeBody.CreateAMQFrame(UInt16, UInt16, String, String, Boolean, Boolean, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exclusive">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exclusive</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamConsumeBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamConsumeBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="NoLocal">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>NoLocal</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Nowait">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Nowait</Item>
- </Issue>
- </Message>
- <Message Id="Nowait" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Nowait</Item>
- <Item>StreamConsumeBody.Nowait</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Queue">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Queue</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="StreamConsumeOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamConsumeOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamConsumeOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamConsumeOkBody.CreateAMQFrame(UInt16, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamConsumeOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamConsumeOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="StreamDeliverBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamDeliverBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamDeliverBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumerTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String,System.UInt64,System.String,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumerTag</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exchange</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Queue</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamDeliverBody.CreateAMQFrame(UInt16, String, UInt64, String, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DeliveryTag">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DeliveryTag</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exchange">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exchange</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamDeliverBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamDeliverBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Queue">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Queue</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="StreamPublishBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamPublishBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamPublishBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.String,System.Boolean,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Ticket</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exchange</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Mandatory</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Immediate</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamPublishBody.CreateAMQFrame(UInt16, UInt16, String, String, Boolean, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exchange">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exchange</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Immediate">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Immediate</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Mandatory">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Mandatory</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamPublishBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamPublishBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="RoutingKey">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Ticket">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Ticket</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="StreamQosBody">
- <Messages>
- <Message Id="Qos" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qos</Item>
- <Item>Qpid.Framing.StreamQosBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamQosBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamQosBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ConsumeRate">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ConsumeRate</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt32,System.UInt16,System.UInt32,System.Boolean):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>PrefetchSize</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>PrefetchCount</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ConsumeRate</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Global</Item>
- </Issue>
- </Message>
- <Message Id="1#Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>StreamQosBody.CreateAMQFrame(UInt16, UInt32, UInt16, UInt32, Boolean):AMQFrame</Item>
- <Item>Prefetch</Item>
- <Item>PrefetchSize</Item>
- </Issue>
- </Message>
- <Message Id="2#Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>StreamQosBody.CreateAMQFrame(UInt16, UInt32, UInt16, UInt32, Boolean):AMQFrame</Item>
- <Item>Prefetch</Item>
- <Item>PrefetchCount</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamQosBody.CreateAMQFrame(UInt16, UInt32, UInt16, UInt32, Boolean):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Global">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Global</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamQosBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamQosBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="PrefetchCount">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>PrefetchCount</Item>
- </Issue>
- </Message>
- <Message Id="Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Prefetch</Item>
- <Item>StreamQosBody.PrefetchCount</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="PrefetchSize">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>PrefetchSize</Item>
- </Issue>
- </Message>
- <Message Id="Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Prefetch</Item>
- <Item>StreamQosBody.PrefetchSize</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="StreamQosOkBody">
- <Messages>
- <Message Id="Qos" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qos</Item>
- <Item>Qpid.Framing.StreamQosOkBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamQosOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamQosOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamQosOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamQosOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamQosOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="StreamReturnBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamReturnBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamReturnBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt16,System.String,System.String,System.String):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ReplyCode</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ReplyText</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Exchange</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamReturnBody.CreateAMQFrame(UInt16, UInt16, String, String, String):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Exchange">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Exchange</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>StreamReturnBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>StreamReturnBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReplyCode">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReplyCode</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ReplyText">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ReplyText</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="RoutingKey">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>RoutingKey</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TestContentBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestContentBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestContentBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestContentBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestContentBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestContentBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TestContentOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestContentOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestContentOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="ContentChecksum">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>ContentChecksum</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt32):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>ContentChecksum</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestContentOkBody.CreateAMQFrame(UInt16, UInt32):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestContentOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestContentOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TestIntegerBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestIntegerBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestIntegerBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.Byte,System.UInt16,System.UInt32,System.UInt64,System.Byte):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Integer1</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Integer2</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Integer3</Item>
- </Issue>
- </Message>
- <Message Id="4#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Integer4</Item>
- </Issue>
- </Message>
- <Message Id="5#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Operation</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestIntegerBody.CreateAMQFrame(UInt16, Byte, UInt16, UInt32, UInt64, Byte):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Integer1">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Integer1</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Integer2">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Integer2</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Integer3">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Integer3</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Integer4">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Integer4</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestIntegerBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestIntegerBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Operation">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Operation</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TestIntegerOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestIntegerOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestIntegerOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt64):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Result</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestIntegerOkBody.CreateAMQFrame(UInt16, UInt64):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestIntegerOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestIntegerOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Result">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Result</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TestStringBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestStringBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestStringBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.String,System.Byte[],System.Byte):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>String1</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>String2</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Operation</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestStringBody.CreateAMQFrame(UInt16, String, Byte[], Byte):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestStringBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestStringBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Operation">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Operation</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="String1">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>String1</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="String2">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>String2</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TestStringOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestStringOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestStringOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.Byte[]):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Result</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestStringOkBody.CreateAMQFrame(UInt16, Byte[]):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestStringOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestStringOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Result">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Result</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TestTableBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestTableBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestTableBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,Qpid.Framing.FieldTable,System.Byte,System.Byte):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="2#" TypeName="AvoidLanguageSpecificTypeNamesInParameters" Category="Microsoft.Naming" CheckId="CA1718" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>IntegerOp</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="AvoidTypeNamesInParameters" Category="Microsoft.Naming" CheckId="CA1720" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>IntegerOp</Item>
- </Issue>
- </Message>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Table</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>IntegerOp</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>StringOp</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestTableBody.CreateAMQFrame(UInt16, FieldTable, Byte, Byte):AMQFrame</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Op</Item>
- <Item>IntegerOp</Item>
- </Issue>
- </Message>
- <Message Id="3#" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>Op</Item>
- <Item>StringOp</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="IntegerOp">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>IntegerOp</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestTableBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestTableBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="StringOp">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>StringOp</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Table">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Table</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TestTableOkBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestTableOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestTableOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,System.UInt64,System.Byte[]):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="1#" TypeName="AvoidLanguageSpecificTypeNamesInParameters" Category="Microsoft.Naming" CheckId="CA1718" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>IntegerResult</Item>
- </Issue>
- </Message>
- <Message Id="1#" TypeName="AvoidTypeNamesInParameters" Category="Microsoft.Naming" CheckId="CA1720" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>IntegerResult</Item>
- </Issue>
- </Message>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>IntegerResult</Item>
- </Issue>
- </Message>
- <Message Id="2#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>StringResult</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestTableOkBody.CreateAMQFrame(UInt16, UInt64, Byte[]):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="IntegerResult">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>IntegerResult</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TestTableOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TestTableOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="StringResult">
- <Messages>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>StringResult</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TunnelRequestBody">
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TunnelRequestBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TunnelRequestBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16,Qpid.Framing.FieldTable):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="MetaData" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2006-12-04 13:11:47Z">
- <Issue Name="ShouldBeDiscreteTerm">
- <Item>MetaData</Item>
- <Item>parameter</Item>
- <Item>MetaData</Item>
- <Item>Metadata</Item>
- </Issue>
- </Message>
- <Message Id="1#" TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>MetaData</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TunnelRequestBody.CreateAMQFrame(UInt16, FieldTable):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MetaData">
- <Messages>
- <Message Id="MetaData" TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702" Created="2006-12-04 13:11:47Z">
- <Issue Name="ShouldBeDiscreteTerm">
- <Item>MetaData</Item>
- <Item>field</Item>
- <Item>MetaData</Item>
- <Item>Metadata</Item>
- </Issue>
- </Message>
- <Message TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MetaData</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TunnelRequestBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TunnelRequestBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TxCommitBody">
- <Messages>
- <Message TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Tx</Item>
- <Item>Qpid.Framing.TxCommitBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxCommitBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TxCommitBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxCommitBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxCommitBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TxCommitBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TxCommitOkBody">
- <Messages>
- <Message TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Tx</Item>
- <Item>Qpid.Framing.TxCommitOkBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxCommitOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TxCommitOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxCommitOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxCommitOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TxCommitOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TxRollbackBody">
- <Messages>
- <Message TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Tx</Item>
- <Item>Qpid.Framing.TxRollbackBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxRollbackBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TxRollbackBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxRollbackBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxRollbackBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TxRollbackBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TxRollbackOkBody">
- <Messages>
- <Message TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Tx</Item>
- <Item>Qpid.Framing.TxRollbackOkBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxRollbackOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TxRollbackOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxRollbackOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxRollbackOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TxRollbackOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TxSelectBody">
- <Messages>
- <Message TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Tx</Item>
- <Item>Qpid.Framing.TxSelectBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxSelectBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TxSelectBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxSelectBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxSelectBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TxSelectBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="TxSelectOkBody">
- <Messages>
- <Message TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Tx</Item>
- <Item>Qpid.Framing.TxSelectOkBody</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="CLASS_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxSelectOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TxSelectOkBody.CLASS_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateAMQFrame(System.UInt16):Qpid.Framing.AMQFrame">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxSelectOkBody.CreateAMQFrame(UInt16):AMQFrame</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="METHOD_ID">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>TxSelectOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>TxSelectOkBody.METHOD_ID</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- </Types>
- </Namespace>
- </Namespaces>
- </Module>
- </Modules>
- </Target>
- <Target Name="$(ProjectDir)/Qpid.Client.Tests/bin/Debug/Qpid.Messaging.dll">
- <Modules>
- <Module Name="qpid.messaging.dll">
- <Messages>
- <Message TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Messaging</Item>
- </Issue>
- </Message>
- <Message TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210" Created="2006-12-04 13:11:47Z">
- <Issue Name="NoStrongName">
- <Item>Qpid.Messaging</Item>
- </Issue>
- </Message>
- </Messages>
- <Namespaces>
- <Namespace Name="Qpid.Messaging">
- <Types>
- <Type Name="AcknowledgeMode">
- <Members>
- <Member Name="DupsOkAcknowledge">
- <Messages>
- <Message Id="Dups" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Dups</Item>
- <Item>AcknowledgeMode.DupsOkAcknowledge</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ChannelLimitReachedException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Messaging.ChannelLimitReachedException</Item>
- <Item>protected ChannelLimitReachedException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Messaging.ChannelLimitReachedException</Item>
- <Item>public ChannelLimitReachedException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Messaging.ChannelLimitReachedException</Item>
- <Item>public ChannelLimitReachedException(String)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Messaging.ChannelLimitReachedException</Item>
- <Item>public ChannelLimitReachedException(String, Exception)</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="ExceptionListenerDelegate">
- <Messages>
- <Message TypeName="IdentifiersShouldNotHaveIncorrectSuffix" Category="Microsoft.Naming" CheckId="CA1711" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Messaging.ExceptionListenerDelegate</Item>
- <Item>Delegate</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="ExchangeClassConstants">
- <Members>
- <Member Name="DIRECT">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeClassConstants.DIRECT</Item>
- </Issue>
- </Message>
- <Message TypeName="UseLiteralsWhereAppropriate" Category="Microsoft.Performance" CheckId="CA1802" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DIRECT</Item>
- <Item>direct</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="HEADERS">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeClassConstants.HEADERS</Item>
- </Issue>
- </Message>
- <Message TypeName="UseLiteralsWhereAppropriate" Category="Microsoft.Performance" CheckId="CA1802" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>HEADERS</Item>
- <Item>headers</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="TOPIC">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeClassConstants.TOPIC</Item>
- </Issue>
- </Message>
- <Message TypeName="UseLiteralsWhereAppropriate" Category="Microsoft.Performance" CheckId="CA1802" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>TOPIC</Item>
- <Item>topic</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ExchangeNameDefaults">
- <Members>
- <Member Name="DIRECT">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeNameDefaults.DIRECT</Item>
- </Issue>
- </Message>
- <Message TypeName="UseLiteralsWhereAppropriate" Category="Microsoft.Performance" CheckId="CA1802" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>DIRECT</Item>
- <Item>amq.direct</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="HEADERS">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeNameDefaults.HEADERS</Item>
- </Issue>
- </Message>
- <Message TypeName="UseLiteralsWhereAppropriate" Category="Microsoft.Performance" CheckId="CA1802" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>HEADERS</Item>
- <Item>amq.match</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="TOPIC">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>ExchangeNameDefaults.TOPIC</Item>
- </Issue>
- </Message>
- <Message TypeName="UseLiteralsWhereAppropriate" Category="Microsoft.Performance" CheckId="CA1802" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>TOPIC</Item>
- <Item>amq.topic</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IBytesMessage">
- <Members>
- <Member Name="ReadUTF():System.String">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>IBytesMessage.ReadUTF():String</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WriteUTF(System.String):System.Void">
- <Messages>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>IBytesMessage.WriteUTF(String):Void</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IChannel">
- <Members>
- <Member Name="CreateConsumer(System.String,System.Int32,System.Int32,System.Boolean,System.Boolean,System.Boolean,System.String):Qpid.Messaging.IMessageConsumer">
- <Messages>
- <Message Id="1#prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>IChannel.CreateConsumer(String, Int32, Int32, Boolean, Boolean, Boolean, String):IMessageConsumer</Item>
- <Item>prefetch</Item>
- <Item>prefetchLow</Item>
- </Issue>
- </Message>
- <Message Id="2#prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>IChannel.CreateConsumer(String, Int32, Int32, Boolean, Boolean, Boolean, String):IMessageConsumer</Item>
- <Item>prefetch</Item>
- <Item>prefetchHigh</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DefaultPrefetch">
- <Messages>
- <Message Id="Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Prefetch</Item>
- <Item>IChannel.DefaultPrefetch:Int32</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IConnection">
- <Members>
- <Member Name="ClientID">
- <Messages>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>IConnection.ClientID:String</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="CreateChannel(System.Boolean,Qpid.Messaging.AcknowledgeMode,System.Int32):Qpid.Messaging.IChannel">
- <Messages>
- <Message Id="2#prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>IConnection.CreateChannel(Boolean, AcknowledgeMode, Int32):IChannel</Item>
- <Item>prefetch</Item>
- <Item>prefetch</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IConnectionListener">
- <Members>
- <Member Name="PreResubscribe():System.Boolean">
- <Messages>
- <Message Id="Resubscribe" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Resubscribe</Item>
- <Item>IConnectionListener.PreResubscribe():Boolean</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IFieldTable">
- <Messages>
- <Message TypeName="IdentifiersShouldHaveCorrectSuffix" Category="Microsoft.Naming" CheckId="CA1710" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Messaging.IFieldTable</Item>
- <Item>Collection</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name="Contains(System.String):System.Boolean">
- <Messages>
- <Message Id="0#s" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>IFieldTable.Contains(String):Boolean</Item>
- <Item>s</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IMessage">
- <Members>
- <Member Name="CorrelationIdAsBytes">
- <Messages>
- <Message TypeName="PropertiesShouldNotReturnArrays" Category="Microsoft.Performance" CheckId="CA1819" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>IMessage.CorrelationIdAsBytes:Byte[]</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="IMessagePublisher">
- <Members>
- <Member Name="DisableMessageID">
- <Messages>
- <Message Id="Member" TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706" Created="2006-12-04 13:11:47Z">
- <Issue Name="MemberId">
- <Item>IMessagePublisher.DisableMessageID:Boolean</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="Encoding">
- <Messages>
- <Message TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Encoding</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="MimeType">
- <Messages>
- <Message TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MimeType</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="MessageConsumerBuilder">
- <Members>
- <Member Name=".ctor(Qpid.Messaging.IChannel,System.String)">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MessageConsumerBuilder.MessageConsumerBuilder(IChannel, String)</Item>
- <Item>_durable</Item>
- <Item>System.Boolean</Item>
- <Item>false</Item>
- </Issue>
- <Issue>
- <Item>MessageConsumerBuilder.MessageConsumerBuilder(IChannel, String)</Item>
- <Item>_exclusive</Item>
- <Item>System.Boolean</Item>
- <Item>false</Item>
- </Issue>
- <Issue>
- <Item>MessageConsumerBuilder.MessageConsumerBuilder(IChannel, String)</Item>
- <Item>_noLocal</Item>
- <Item>System.Boolean</Item>
- <Item>false</Item>
- </Issue>
- <Issue>
- <Item>MessageConsumerBuilder.MessageConsumerBuilder(IChannel, String)</Item>
- <Item>_subscriptionName</Item>
- <Item>System.String</Item>
- <Item>null</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="DEFAULT_PREFETCH_HIGH">
- <Messages>
- <Message Id="Member" TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>DEFAULT_PREFETCH_HIGH</Item>
- </Issue>
- </Message>
- <Message Id="Member" TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>MessageConsumerBuilder.DEFAULT_PREFETCH_HIGH</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WithPrefetchHigh(System.Int32):Qpid.Messaging.MessageConsumerBuilder">
- <Messages>
- <Message Id="0#prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>MessageConsumerBuilder.WithPrefetchHigh(Int32):MessageConsumerBuilder</Item>
- <Item>prefetch</Item>
- <Item>prefetchHigh</Item>
- </Issue>
- </Message>
- <Message Id="Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Prefetch</Item>
- <Item>MessageConsumerBuilder.WithPrefetchHigh(Int32):MessageConsumerBuilder</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- <Member Name="WithPrefetchLow(System.Int32):Qpid.Messaging.MessageConsumerBuilder">
- <Messages>
- <Message Id="0#prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Parameter">
- <Item>MessageConsumerBuilder.WithPrefetchLow(Int32):MessageConsumerBuilder</Item>
- <Item>prefetch</Item>
- <Item>prefetchLow</Item>
- </Issue>
- </Message>
- <Message Id="Prefetch" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Member">
- <Item>Prefetch</Item>
- <Item>MessageConsumerBuilder.WithPrefetchLow(Int32):MessageConsumerBuilder</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="MessageNotReadableException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Messaging.MessageNotReadableException</Item>
- <Item>protected MessageNotReadableException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Messaging.MessageNotReadableException</Item>
- <Item>public MessageNotReadableException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Messaging.MessageNotReadableException</Item>
- <Item>public MessageNotReadableException(String, Exception)</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="MessageNotWriteableException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Messaging.MessageNotWriteableException</Item>
- <Item>protected MessageNotWriteableException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Messaging.MessageNotWriteableException</Item>
- <Item>public MessageNotWriteableException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Messaging.MessageNotWriteableException</Item>
- <Item>public MessageNotWriteableException(String, Exception)</Item>
- </Issue>
- </Message>
- <Message Id="Writeable" TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Writeable</Item>
- <Item>MessageNotWriteableException</Item>
- <Item>Writable</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="MessagePublisherBuilder">
- <Members>
- <Member Name=".ctor(Qpid.Messaging.IChannel)">
- <Messages>
- <Message TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>MessagePublisherBuilder.MessagePublisherBuilder(IChannel)</Item>
- <Item>_exchangeName</Item>
- <Item>System.String</Item>
- <Item>null</Item>
- </Issue>
- <Issue>
- <Item>MessagePublisherBuilder.MessagePublisherBuilder(IChannel)</Item>
- <Item>_immediate</Item>
- <Item>System.Boolean</Item>
- <Item>false</Item>
- </Issue>
- <Issue>
- <Item>MessagePublisherBuilder.MessagePublisherBuilder(IChannel)</Item>
- <Item>_priority</Item>
- <Item>System.Int32</Item>
- <Item>0</Item>
- </Issue>
- <Issue>
- <Item>MessagePublisherBuilder.MessagePublisherBuilder(IChannel)</Item>
- <Item>_routingKey</Item>
- <Item>System.String</Item>
- <Item>null</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="MessageReceivedDelegate">
- <Messages>
- <Message TypeName="IdentifiersShouldNotHaveIncorrectSuffix" Category="Microsoft.Naming" CheckId="CA1711" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Messaging.MessageReceivedDelegate</Item>
- <Item>Delegate</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- <Type Name="QpidException">
- <Messages>
- <Message Id="Qpid" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="Type">
- <Item>Qpid</Item>
- <Item>Qpid.Messaging.QpidException</Item>
- </Issue>
- </Message>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Messaging.QpidException</Item>
- <Item>protected QpidException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Messaging.QpidException</Item>
- <Item>public QpidException()</Item>
- </Issue>
- </Message>
- <Message TypeName="MarkISerializableTypesWithSerializable" Category="Microsoft.Usage" CheckId="CA2237" Created="2006-12-04 13:11:47Z">
- <Issue Level="Error">
- <Item>QpidException</Item>
- </Issue>
- </Message>
- </Messages>
- <Members>
- <Member Name=".ctor(System.String,System.Exception)">
- <Messages>
- <Message Id="1#e" TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704" Created="2006-12-04 13:11:47Z">
- <Issue Name="ParameterOneLetter">
- <Item>QpidException.QpidException(String, Exception)</Item>
- <Item>e</Item>
- </Issue>
- </Message>
- </Messages>
- </Member>
- </Members>
- </Type>
- <Type Name="ResourceAllocationException">
- <Messages>
- <Message TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032" Created="2006-12-04 13:11:47Z">
- <Issue>
- <Item>Qpid.Messaging.ResourceAllocationException</Item>
- <Item>protected ResourceAllocationException(SerializationInfo, StreamingContext)</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Messaging.ResourceAllocationException</Item>
- <Item>public ResourceAllocationException()</Item>
- </Issue>
- <Issue>
- <Item>Qpid.Messaging.ResourceAllocationException</Item>
- <Item>public ResourceAllocationException(String, Exception)</Item>
- </Issue>
- </Message>
- </Messages>
- </Type>
- </Types>
- </Namespace>
- </Namespaces>
- </Module>
- </Modules>
- </Target>
- </Targets>
- <Rules>
- <Rule TypeName="AbstractTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1012">
- <Resolution Name="Default">Change the accessibility of all public constructors in '{0}' to protected.</Resolution>
- </Rule>
- <Rule TypeName="AssembliesShouldDeclareMinimumSecurity" Category="Microsoft.Usage" CheckId="CA2209">
- <Resolution Name="Default">No valid permission requests were found for assembly '{0}'. You should always specify the minimum security permissions using SecurityAction.RequestMinimum.</Resolution>
- </Rule>
- <Rule TypeName="AssembliesShouldHaveValidStrongNames" Category="Microsoft.Design" CheckId="CA2210">
- <Resolution Name="NoStrongName">Sign '{0}' with a strong name key.</Resolution>
- </Rule>
- <Rule TypeName="AvoidEmptyInterfaces" Category="Microsoft.Design" CheckId="CA1040">
- <Resolution Name="Default">Define a custom attribute to replace '{0}'.</Resolution>
- </Rule>
- <Rule TypeName="AvoidLanguageSpecificTypeNamesInParameters" Category="Microsoft.Naming" CheckId="CA1718">
- <Resolution Name="Default">Use a generic name for parameter '{0}'. If this is not possible, replace the type identifier with a universal type name.</Resolution>
- </Rule>
- <Rule TypeName="AvoidNamespacesWithFewTypes" Category="Microsoft.Design" CheckId="CA1020">
- <Resolution Name="Default">Consider merging the types defined in '{0}' with another namespace.</Resolution>
- </Rule>
- <Rule TypeName="AvoidTypeNamesInParameters" Category="Microsoft.Naming" CheckId="CA1720">
- <Resolution Name="Default">Remove the type identifier from parameter name '{0}'.</Resolution>
- </Rule>
- <Rule TypeName="AvoidUncalledPrivateCode" Category="Microsoft.Performance" CheckId="CA1811">
- <Resolution Name="Default">'{0}' appears to have no upstream public or protected callers.</Resolution>
- </Rule>
- <Rule TypeName="AvoidUninstantiatedInternalClasses" Category="Microsoft.Performance" CheckId="CA1812">
- <Resolution Name="Default">'{0}' is an internal class that is apparently never instantiated. If so, remove the code from the assembly. If this class is intended to contain only static methods, consider adding a private constructor to prevent the compiler from generating a default constructor.</Resolution>
- </Rule>
- <Rule TypeName="AvoidUnnecessaryStringCreation" Category="Microsoft.Performance" CheckId="CA1807">
- <Resolution Name="UseStringCompareLocal">{0} calls {1} after converting '{2}', a local, to upper or lowercase. If possible, eliminate the string creation and call the overload of String.Compare that performs a case-insensitive comparison.</Resolution>
- <Resolution Name="UseStringCompareParameter">{0} calls {1} after converting '{2}', a parameter, to upper or lowercase. If possible, eliminate the string creation and call the overload of String.Compare that performs a case-insensitive comparison.</Resolution>
- </Rule>
- <Rule TypeName="AvoidUnusedPrivateFields" Category="Microsoft.Performance" CheckId="CA1823">
- <Resolution Name="Default">It appears that field '{0}' is never used or is only ever assigned to. Use this field or remove it.</Resolution>
- </Rule>
- <Rule TypeName="CollectionsShouldImplementGenericInterface" Category="Microsoft.Design" CheckId="CA1010">
- <Resolution Name="Default">'{0}' appears to be a non-generic, strongly typed collection. Add an implementation to the instance of {1}&lt;T&gt; where T is {0}'s underlying element type.</Resolution>
- </Rule>
- <Rule TypeName="CompoundWordsShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1702">
- <Resolution Name="ShouldBeCompoundWord">The discrete term '{0}' in {1} '{2}' should be expressed as a compound term, '{3}'.</Resolution>
- <Resolution Name="ShouldBeDiscreteTerm">The compound word '{0}' in {1} '{2}' exists as a discrete term. If your usage is intended to be single word, case it as '{3}'.</Resolution>
- </Rule>
- <Rule TypeName="ConsiderPassingBaseTypesAsParameters" Category="Microsoft.Design" CheckId="CA1011">
- <Resolution Name="Default">Consider changing the type of parameter '{0}' in {1} from {2} to its base type {3}. This method appears to only require base class members in its implementation. Suppress this violation if there is a compelling reason to require the more derived type in the method signature.</Resolution>
- </Rule>
- <Rule TypeName="DoNotCastUnnecessarily" Category="Microsoft.Performance" CheckId="CA1800">
- <Resolution Name="Local">'{0}', a local, is cast to type '{1}' multiple times in method {2}. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant {3} instruction.</Resolution>
- <Resolution Name="Parameter">'{0}', a parameter, is cast to type '{1}' multiple times in method {2}. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant {3} instruction.</Resolution>
- </Rule>
- <Rule TypeName="DoNotCatchGeneralExceptionTypes" Category="Microsoft.Design" CheckId="CA1031">
- <Resolution Name="Default">Modify '{0}' to catch a more specific exception than '{1}' or rethrow the exception.</Resolution>
- </Rule>
- <Rule TypeName="DoNotConcatenateStringsInsideLoops" Category="Microsoft.Performance" CheckId="CA1818">
- <Resolution Name="Default">Change {0} to use StringBuilder instead of String.Concat or +=</Resolution>
- </Rule>
- <Rule TypeName="DoNotDeclareReadOnlyMutableReferenceTypes" Category="Microsoft.Security" CheckId="CA2104">
- <Resolution Name="Default">Remove the readonly declaration from '{0}' or change the field to one that is an immutable reference type. If the reference type '{1}' is, in fact, immutable, exclude this message.</Resolution>
- </Rule>
- <Rule TypeName="DoNotDeclareVisibleInstanceFields" Category="Microsoft.Design" CheckId="CA1051">
- <Resolution Name="Default">Make '{0}' private or internal (Friend in VB, public private in C++) and provide a public or protected property to access it.</Resolution>
- </Rule>
- <Rule TypeName="DoNotIgnoreMethodResults" Category="Microsoft.Usage" CheckId="CA1806">
- <Resolution Name="ObjectCreation">{0} creates an instance of {1} which is either not assigned to a variable or is never used. Remove the object creation if it is unnecessary or use it within the method.</Resolution>
- </Rule>
- <Rule TypeName="DoNotInitializeUnnecessarily" Category="Microsoft.Performance" CheckId="CA1805">
- <Resolution Name="Default">{0} initializes field {1} of type {2} to {3}. Remove this initialization as it will be done automatically by the runtime.</Resolution>
- </Rule>
- <Rule TypeName="DoNotPassLiteralsAsLocalizedParameters" Category="Microsoft.Globalization" CheckId="CA1303">
- <Resolution Name="Default">{0} passes a literal as parameter {1} of a call to {2}. Retrieve the following string argument from a resource table instead: '{3}'</Resolution>
- </Rule>
- <Rule TypeName="DoNotRaiseReservedExceptionTypes" Category="Microsoft.Usage" CheckId="CA2201">
- <Resolution Name="TooGeneric">{0} creates an exception of type '{1}', an exception type that is not sufficiently specific and should never be raised by user code. If this exception instance might be thrown, use a different exception type.</Resolution>
- </Rule>
- <Rule TypeName="ExceptionsShouldBePublic" Category="Microsoft.Design" CheckId="CA1064">
- <Resolution Name="Default">Make exception class {0} public.</Resolution>
- </Rule>
- <Rule TypeName="ICollectionImplementationsHaveStronglyTypedMembers" Category="Microsoft.Design" CheckId="CA1035">
- <Resolution Name="Default">'{0}' should provide a strongly typed implementation of ICollection.CopyTo.</Resolution>
- </Rule>
- <Rule TypeName="IdentifiersShouldBeCasedCorrectly" Category="Microsoft.Naming" CheckId="CA1709">
- <Resolution Name="Member">Correct the casing of member name '{0}'.</Resolution>
- <Resolution Name="Namespace">Correct the casing of namespace name '{0}'.</Resolution>
- <Resolution Name="Parameter">Correct the casing of parameter name '{0}'.</Resolution>
- </Rule>
- <Rule TypeName="IdentifiersShouldBeSpelledCorrectly" Category="Microsoft.Naming" CheckId="CA1704">
- <Resolution Name="Member">Correct the spelling of the unrecognized token '{0}' in member name '{1}'.</Resolution>
- <Resolution Name="Namespace">Correct the spelling of the unrecognized token '{0}' in namespace '{1}'.</Resolution>
- <Resolution Name="Parameter">In method {0}, correct the spelling of the unrecognized token '{1}' in parameter name '{2}' or strip it entirely if it represents any sort of hungarian notation.</Resolution>
- <Resolution Name="ParameterOneLetter">In method {0}, consider providing a more meaningful name than the one-letter parameter name '{1}'.</Resolution>
- <Resolution Name="Type">Correct the spelling of the unrecognized token '{0}' in type name '{1}'.</Resolution>
- </Rule>
- <Rule TypeName="IdentifiersShouldDifferByMoreThanCase" Category="Microsoft.Naming" CheckId="CA1708">
- <Resolution Name="Member">Change member names {0} and '{1}' so that they differ by more than case.</Resolution>
- </Rule>
- <Rule TypeName="IdentifiersShouldHaveCorrectPrefix" Category="Microsoft.Naming" CheckId="CA1715">
- <Resolution Name="Default">Prefix interface name '{0}' with 'I'.</Resolution>
- </Rule>
- <Rule TypeName="IdentifiersShouldHaveCorrectSuffix" Category="Microsoft.Naming" CheckId="CA1710">
- <Resolution Name="Default">Rename '{0}' to end in '{1}'.</Resolution>
- </Rule>
- <Rule TypeName="IdentifiersShouldNotContainUnderscores" Category="Microsoft.Naming" CheckId="CA1707">
- <Resolution Name="Member">Remove all underscores from member '{0}'.</Resolution>
- </Rule>
- <Rule TypeName="IdentifiersShouldNotHaveIncorrectSuffix" Category="Microsoft.Naming" CheckId="CA1711">
- <Resolution Name="Default">Rename '{0}' so that it does not end in '{1}'.</Resolution>
- </Rule>
- <Rule TypeName="ImplementIDisposableCorrectly" Category="Microsoft.Design" CheckId="CA1063">
- <Resolution Name="DisposeImplementation">Modify {0} so that it calls Dispose(true), then calls GC.SuppressFinalize on the current object instance ('this' or 'Me' in VB), and then returns.</Resolution>
- <Resolution Name="ProvideDisposeBool">Provide an overridable implementation of Dispose(bool) on {0} or mark the type as sealed. A call to Dispose(false) should only clean up native resources. A call to Dispose(true) should clean up both managed and native resources.</Resolution>
- </Rule>
- <Rule TypeName="ImplementStandardExceptionConstructors" Category="Microsoft.Design" CheckId="CA1032">
- <Resolution Name="Default">Add the following constructor to {0}: {1}.</Resolution>
- </Rule>
- <Rule TypeName="InitializeReferenceTypeStaticFieldsInline" Category="Microsoft.Performance" CheckId="CA1810">
- <Resolution Name="Default">Initialize all static fields in {0} when those fields are declared and remove the explicit static constructor.</Resolution>
- </Rule>
- <Rule TypeName="InstantiateArgumentExceptionsCorrectly" Category="Microsoft.Usage" CheckId="CA2208">
- <Resolution Name="OneArgumentShouldBeParameterName">Calls to {0}'s constructor '{1}' should contain one of the method's parameter names instead of '{2}'. Note that the provided parameter name should have the exact casing as declared on the method.</Resolution>
- </Rule>
- <Rule TypeName="LiteralsShouldBeSpelledCorrectly" Category="Microsoft.Usage" CheckId="CA2204">
- <Resolution Name="Default">Correct the spelling of the unrecognized token '{0}' in the literal '{1}'.</Resolution>
- </Rule>
- <Rule TypeName="LongAcronymsShouldBePascalCased" Category="Microsoft.Naming" CheckId="CA1705">
- <Resolution Name="Member">Correct the capitalization of member name '{0}'.</Resolution>
- <Resolution Name="Parameter">Correct the capitalization of parameter name '{0}'.</Resolution>
- <Resolution Name="Type">Correct the capitalization of type name '{0}'.</Resolution>
- </Rule>
- <Rule TypeName="MarkAssembliesWithClsCompliant" Category="Microsoft.Design" CheckId="CA1014">
- <Resolution Name="NoAttr">'{0}' should be marked with CLSCompliantAttribute and its value should be true.</Resolution>
- </Rule>
- <Rule TypeName="MarkISerializableTypesWithSerializable" Category="Microsoft.Usage" CheckId="CA2237">
- <Resolution Name="Default">Add [Serializable] to '{0}' as this type implements ISerializable.</Resolution>
- </Rule>
- <Rule TypeName="MarkMembersAsStatic" Category="Microsoft.Performance" CheckId="CA1822">
- <Resolution Name="Default">The 'this' parameter (or 'Me' in VB) of {0} is never used. Mark the member as static (or Shared in VB) or use 'this'/'Me' in the method body or at least one property accessor, if appropriate.</Resolution>
- </Rule>
- <Rule TypeName="NestedTypesShouldNotBeVisible" Category="Microsoft.Design" CheckId="CA1034">
- <Resolution Name="Default">Do not nest type '{0}'. Alternatively, change its accessibility so that it is not externally visible.</Resolution>
- </Rule>
- <Rule TypeName="NonConstantFieldsShouldNotBeVisible" Category="Microsoft.Usage" CheckId="CA2211">
- <Resolution Name="Default">Consider making '{0}' non-public or a constant.</Resolution>
- </Rule>
- <Rule TypeName="OperationsShouldNotOverflow" Category="Microsoft.Usage" CheckId="CA2233">
- <Resolution Name="Default">Correct the potential overflow in the operation '{0}' in '{1}'.</Resolution>
- </Rule>
- <Rule TypeName="ParameterNamesShouldMatchBaseDeclaration" Category="Microsoft.Naming" CheckId="CA1725">
- <Resolution Name="Default">Change parameter name '{0}' of method {1} to '{2}' in order to match the identifier as it has been declared in {3}.</Resolution>
- </Rule>
- <Rule TypeName="PropertiesShouldNotBeWriteOnly" Category="Microsoft.Design" CheckId="CA1044">
- <Resolution Name="Default">Add a property getter to '{0}'.</Resolution>
- </Rule>
- <Rule TypeName="PropertiesShouldNotReturnArrays" Category="Microsoft.Performance" CheckId="CA1819">
- <Resolution Name="Default">Change {0} to return a collection or make it a method.</Resolution>
- </Rule>
- <Rule TypeName="ProvideCorrectArgumentsToFormattingMethods" Category="Microsoft.Usage" CheckId="CA2241">
- <Resolution Name="MissingSpecifier">A call to {0} in {1} does not appear to provide a format specifier for argument {2}. The complete format string provided is '{3}'.</Resolution>
- </Rule>
- <Rule TypeName="RemoveUnusedLocals" Category="Microsoft.Performance" CheckId="CA1804">
- <Resolution Name="Default">{0} declares a local, '{1}', of type {2}, which is never used or is only assigned to. Use this local or remove it.</Resolution>
- </Rule>
- <Rule TypeName="RethrowToPreserveStackDetails" Category="Microsoft.Usage" CheckId="CA2200">
- <Resolution Name="Default">{0} rethrows a caught exception and specifies it explicitly as an argument. Use 'throw' without an argument instead, in order to preserve the stack location where the exception was initially raised.</Resolution>
- </Rule>
- <Rule TypeName="ReviewUnusedParameters" Category="Microsoft.Usage" CheckId="CA1801">
- <Resolution Name="Default">Parameter '{0}' of {1} is never used. Remove the parameter or use it in the method body.</Resolution>
- </Rule>
- <Rule TypeName="ShortAcronymsShouldBeUppercase" Category="Microsoft.Naming" CheckId="CA1706">
- <Resolution Name="MemberId">'Id' is an abbreviation and therefore is not subject to acronym casing guidelines. Correct the capitalization of 'ID' in member name '{0}' by changing it to 'Id'.</Resolution>
- <Resolution Name="MemberOk">To insure consistency with legacy api, 'OK' is not subject to acronym casing guidelines. Correct the capitalization of 'OK' in member name '{0}' by changing it to 'Ok'.</Resolution>
- <Resolution Name="Parameter">Correct the capitalization of '{0}' in parameter name '{1}'.</Resolution>
- <Resolution Name="Type">Correct the capitalization of '{0}' in type name '{1}'.</Resolution>
- </Rule>
- <Rule TypeName="SpecifyCultureInfo" Category="Microsoft.Globalization" CheckId="CA1304">
- <Resolution Name="Default">{0} makes a call to {1} that does not explicitly provide a CultureInfo. This should be replaced with a call to {2}.</Resolution>
- </Rule>
- <Rule TypeName="SpecifyIFormatProvider" Category="Microsoft.Globalization" CheckId="CA1305">
- <Resolution Name="Default">{0} makes a call to {1} that does not explicitly provide an IFormatProvider. This should be replaced with a call to {2}.</Resolution>
- </Rule>
- <Rule TypeName="StaticHolderTypesShouldNotHaveConstructors" Category="Microsoft.Design" CheckId="CA1053">
- <Resolution Name="Default">Remove the public constructors from '{0}'.</Resolution>
- </Rule>
- <Rule TypeName="TestForEmptyStringsUsingStringLength" Category="Microsoft.Performance" CheckId="CA1820">
- <Resolution Name="IsNullOrEmpty">Replace the call to String.{0}({1}) in '{2}' with a call to String.IsNullOrEmpty.</Resolution>
- </Rule>
- <Rule TypeName="TypesThatOwnDisposableFieldsShouldBeDisposable" Category="Microsoft.Design" CheckId="CA1001">
- <Resolution Name="Default">Implement IDisposable on '{0}' as it instantiates members of the following IDisposable types: {1}</Resolution>
- </Rule>
- <Rule TypeName="UriParametersShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1054">
- <Resolution Name="Default">Change the type of parameter '{0}' of method {1} from string to System.Uri, or provide an overload of {1}, that allows '{0}' to be passed as a System.Uri object.</Resolution>
- </Rule>
- <Rule TypeName="UriReturnValuesShouldNotBeStrings" Category="Microsoft.Design" CheckId="CA1055">
- <Resolution Name="Default">Change the return type of {0} from string to System.Uri.</Resolution>
- </Rule>
- <Rule TypeName="UseEventsWhereAppropriate" Category="Microsoft.Design" CheckId="CA1030">
- <Resolution Name="Default">Consider making '{0}' an event.</Resolution>
- </Rule>
- <Rule TypeName="UseLiteralsWhereAppropriate" Category="Microsoft.Performance" CheckId="CA1802">
- <Resolution Name="Default">Field '{0}' is declared as 'static readonly' but is initialized with a constant value '{1}'. Mark this field as 'const' instead.</Resolution>
- </Rule>
- <Rule TypeName="UsePreferredTerms" Category="Microsoft.Naming" CheckId="CA1726">
- <Resolution Name="Type">Replace the term '{0}' in type name '{1}' with the preferred alternate '{2}'.</Resolution>
- </Rule>
- <Rule TypeName="UsePropertiesWhereAppropriate" Category="Microsoft.Design" CheckId="CA1024">
- <Resolution Name="Default">Change '{0}' to a property if appropriate.</Resolution>
- </Rule>
- <Rule TypeName="ValidateArgumentsOfPublicMethods" Category="Microsoft.Design" CheckId="CA1062">
- <Resolution Name="Default">Validate parameter {0} passed to externally visible method {1}.</Resolution>
- </Rule>
- </Rules>
- </FxCopReport>
-</FxCopProject>
diff --git a/qpid/dotnet/Qpid.NET.sln b/qpid/dotnet/Qpid.NET.sln
deleted file mode 100644
index a6417aaad1..0000000000
--- a/qpid/dotnet/Qpid.NET.sln
+++ /dev/null
@@ -1,116 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qpid.Messaging", "Qpid.Messaging\Qpid.Messaging.csproj", "{6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qpid.Common.Tests", "Qpid.Common.Tests\Qpid.Common.Tests.csproj", "{F83624B0-762B-4D82-900D-FF4C1B36E36E}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qpid.Buffer", "Qpid.Buffer\Qpid.Buffer.csproj", "{44384DF2-B0A4-4580-BDBC-EE4BAA87D995}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qpid.Codec", "Qpid.Codec\Qpid.Codec.csproj", "{22D0D0C2-77AF-4DE3-B456-7FF3893F9F88}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qpid.Client", "Qpid.Client\Qpid.Client.csproj", "{68987C05-3768-452C-A6FC-6BA1D372852F}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qpid.Common", "Qpid.Common\Qpid.Common.csproj", "{77064C42-24D2-4CEB-9EA2-0EF481A43205}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qpid.Client.Tests", "Qpid.Client.Tests\Qpid.Client.Tests.csproj", "{BA1B0032-4CE6-40DD-A2DC-119F0FFA0A1D}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qpid.Sasl", "Qpid.Sasl\Qpid.Sasl.csproj", "{1465B0EE-6452-42A6-AB73-B2F9EABEEE75}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qpid.Sasl.Tests", "Qpid.Sasl.Tests\Qpid.Sasl.Tests.csproj", "{587B3520-EBB9-41ED-B019-E96116B651CE}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qpid.Buffer.Tests", "Qpid.Buffer.Tests\Qpid.Buffer.Tests.csproj", "{74640962-99D0-4D06-B57A-9CD66517CF52}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TopicPublisher", "TopicPublisher\TopicPublisher.csproj", "{A06C9FFD-22FF-4654-856D-897C230978AF}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TopicListener", "TopicListener\TopicListener.csproj", "{9A112DF2-146F-4CF4-919B-9D3BE7D088E9}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestClient", "TestClient\TestClient.csproj", "{6E0374D9-99BE-4D4F-B41D-B227E37E04C6}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Qpid.Integration.Tests", "Qpid.Integration.Tests\Qpid.Integration.Tests.csproj", "{DE21CEBC-F38C-43EA-B576-38CA9738A00A}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}.Release|Any CPU.Build.0 = Release|Any CPU
- {F83624B0-762B-4D82-900D-FF4C1B36E36E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F83624B0-762B-4D82-900D-FF4C1B36E36E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F83624B0-762B-4D82-900D-FF4C1B36E36E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F83624B0-762B-4D82-900D-FF4C1B36E36E}.Release|Any CPU.Build.0 = Release|Any CPU
- {44384DF2-B0A4-4580-BDBC-EE4BAA87D995}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {44384DF2-B0A4-4580-BDBC-EE4BAA87D995}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {44384DF2-B0A4-4580-BDBC-EE4BAA87D995}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {44384DF2-B0A4-4580-BDBC-EE4BAA87D995}.Release|Any CPU.Build.0 = Release|Any CPU
- {22D0D0C2-77AF-4DE3-B456-7FF3893F9F88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {22D0D0C2-77AF-4DE3-B456-7FF3893F9F88}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {22D0D0C2-77AF-4DE3-B456-7FF3893F9F88}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {22D0D0C2-77AF-4DE3-B456-7FF3893F9F88}.Release|Any CPU.Build.0 = Release|Any CPU
- {68987C05-3768-452C-A6FC-6BA1D372852F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {68987C05-3768-452C-A6FC-6BA1D372852F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {68987C05-3768-452C-A6FC-6BA1D372852F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {68987C05-3768-452C-A6FC-6BA1D372852F}.Release|Any CPU.Build.0 = Release|Any CPU
- {77064C42-24D2-4CEB-9EA2-0EF481A43205}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {77064C42-24D2-4CEB-9EA2-0EF481A43205}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {77064C42-24D2-4CEB-9EA2-0EF481A43205}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {77064C42-24D2-4CEB-9EA2-0EF481A43205}.Release|Any CPU.Build.0 = Release|Any CPU
- {BA1B0032-4CE6-40DD-A2DC-119F0FFA0A1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {BA1B0032-4CE6-40DD-A2DC-119F0FFA0A1D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {BA1B0032-4CE6-40DD-A2DC-119F0FFA0A1D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {BA1B0032-4CE6-40DD-A2DC-119F0FFA0A1D}.Release|Any CPU.Build.0 = Release|Any CPU
- {1465B0EE-6452-42A6-AB73-B2F9EABEEE75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1465B0EE-6452-42A6-AB73-B2F9EABEEE75}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1465B0EE-6452-42A6-AB73-B2F9EABEEE75}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1465B0EE-6452-42A6-AB73-B2F9EABEEE75}.Release|Any CPU.Build.0 = Release|Any CPU
- {587B3520-EBB9-41ED-B019-E96116B651CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {587B3520-EBB9-41ED-B019-E96116B651CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {587B3520-EBB9-41ED-B019-E96116B651CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {587B3520-EBB9-41ED-B019-E96116B651CE}.Release|Any CPU.Build.0 = Release|Any CPU
- {74640962-99D0-4D06-B57A-9CD66517CF52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {74640962-99D0-4D06-B57A-9CD66517CF52}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {74640962-99D0-4D06-B57A-9CD66517CF52}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {74640962-99D0-4D06-B57A-9CD66517CF52}.Release|Any CPU.Build.0 = Release|Any CPU
- {A06C9FFD-22FF-4654-856D-897C230978AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A06C9FFD-22FF-4654-856D-897C230978AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A06C9FFD-22FF-4654-856D-897C230978AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A06C9FFD-22FF-4654-856D-897C230978AF}.Release|Any CPU.Build.0 = Release|Any CPU
- {9A112DF2-146F-4CF4-919B-9D3BE7D088E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9A112DF2-146F-4CF4-919B-9D3BE7D088E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9A112DF2-146F-4CF4-919B-9D3BE7D088E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9A112DF2-146F-4CF4-919B-9D3BE7D088E9}.Release|Any CPU.Build.0 = Release|Any CPU
- {6E0374D9-99BE-4D4F-B41D-B227E37E04C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6E0374D9-99BE-4D4F-B41D-B227E37E04C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DE21CEBC-F38C-43EA-B576-38CA9738A00A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DE21CEBC-F38C-43EA-B576-38CA9738A00A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DE21CEBC-F38C-43EA-B576-38CA9738A00A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DE21CEBC-F38C-43EA-B576-38CA9738A00A}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/qpid/dotnet/Qpid.Sasl.Tests/App.config b/qpid/dotnet/Qpid.Sasl.Tests/App.config
deleted file mode 100644
index 021399939e..0000000000
--- a/qpid/dotnet/Qpid.Sasl.Tests/App.config
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<configuration>
- <configSections>
- <section name="qpid.sasl" type="Apache.Qpid.Sasl.Configuration.SaslConfigurationSectionHandler, Apache.Qpid.Sasl"/>
- </configSections>
-
- <qpid.sasl>
- <clientFactories>
- <add type="Apache.Qpid.Sasl.Tests.TestClientFactory, Apache.Qpid.Sasl.Tests"/>
- </clientFactories>
- </qpid.sasl>
-</configuration>
diff --git a/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/AnonymousSaslClientTests.cs b/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/AnonymousSaslClientTests.cs
deleted file mode 100644
index 5839f310e1..0000000000
--- a/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/AnonymousSaslClientTests.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Text;
-
-using NUnit.Framework;
-using Apache.Qpid.Sasl;
-using Apache.Qpid.Sasl.Mechanisms;
-
-namespace Apache.Qpid.Sasl.Tests.Mechanisms
-{
- [TestFixture]
- public class AnonymousSaslClientTests : ISaslCallbackHandler
- {
- private const string AUTHID = "nobody@nowhere.com";
-
- [Test]
- public void ReturnsRightMechanismName()
- {
- ISaslClient client = new AnonymousSaslClient(AUTHID, new Hashtable(), this);
-
- Assert.AreEqual("ANONYMOUS", client.MechanismName);
- }
-
- [Test]
- public void HasInitialResponseReturnsTrue()
- {
- ISaslClient client = new AnonymousSaslClient(AUTHID, new Hashtable(), this);
-
- Assert.IsTrue(client.HasInitialResponse);
- }
-
- [Test]
- public void CanEvaluateChallenge()
- {
- Hashtable props = new Hashtable();
- ISaslClient client = new AnonymousSaslClient(AUTHID, props, this);
-
- Assert.IsFalse(client.IsComplete);
- byte[] response = client.EvaluateChallenge(new byte[0]);
- Assert.AreEqual(AUTHID, Encoding.UTF8.GetString(response));
-
- Assert.IsTrue(client.IsComplete);
- }
-
- void ISaslCallbackHandler.Handle(ISaslCallback[] callbacks)
- {
- }
-
- } // class AnonymousSaslClientTests
-
-} // namespace Apache.Qpid.Sasl.Tests.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/CramMD5SaslClientTests.cs b/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/CramMD5SaslClientTests.cs
deleted file mode 100644
index baeeafb2d2..0000000000
--- a/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/CramMD5SaslClientTests.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Text;
-
-using NUnit.Framework;
-using Apache.Qpid.Sasl;
-using Apache.Qpid.Sasl.Mechanisms;
-
-namespace Apache.Qpid.Sasl.Tests.Mechanisms
-{
- [TestFixture]
- public class CramMD5SaslClientTests : ISaslCallbackHandler
- {
- private const string USERNAME = "testuser";
- private const string PASSWORD = "tanstaaftanstaaf";
- private const string AUTHID = "test";
-
- [Test]
- public void ReturnsRightMechanismName()
- {
- ISaslClient client = new CramMD5SaslClient(AUTHID, new Hashtable(), this);
-
- Assert.AreEqual("CRAM-MD5", client.MechanismName);
- }
-
- [Test]
- public void HasInitialResponseReturnsFalse()
- {
- ISaslClient client = new CramMD5SaslClient(AUTHID, new Hashtable(), this);
-
- Assert.IsFalse(client.HasInitialResponse);
- }
-
- [Test]
- public void CanEvaluateChallenge()
- {
- Hashtable props = new Hashtable();
-
- ISaslClient client = new CramMD5SaslClient(AUTHID, props, this);
-
- Assert.IsFalse(client.IsComplete);
-
- byte[] challenge =
- Encoding.UTF8.GetBytes("<1896.697170952@postoffice.reston.mci.net>");
- byte[] response = client.EvaluateChallenge(challenge);
- string[] parts = Encoding.UTF8.GetString(response).Split(' ');
-
- Assert.AreEqual(2, parts.Length);
- Assert.AreEqual(USERNAME, parts[0]);
- Assert.AreEqual("b913a602c7eda7a495b4e6e7334d3890", parts[1]);
- Assert.IsTrue(client.IsComplete);
- }
-
- void ISaslCallbackHandler.Handle(ISaslCallback[] callbacks)
- {
- foreach ( ISaslCallback cb in callbacks )
- {
- if ( cb is NameCallback )
- {
- ((NameCallback)cb).Text = USERNAME;
- } else if ( cb is PasswordCallback )
- {
- ((PasswordCallback)cb).Text = PASSWORD;
- }
- }
- }
- } // class CramMD5SaslClientTests
-
-} // namespace Apache.Qpid.Sasl.Tests.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/DigestSaslClientTests.cs b/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/DigestSaslClientTests.cs
deleted file mode 100644
index 5a18ebaefd..0000000000
--- a/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/DigestSaslClientTests.cs
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Text;
-
-using NUnit.Framework;
-using Apache.Qpid.Sasl;
-using Apache.Qpid.Sasl.Mechanisms;
-
-namespace Apache.Qpid.Sasl.Tests.Mechanisms
-{
- [TestFixture]
- public class DigestSaslClientTests : ISaslCallbackHandler
- {
- private const string USERNAME = "chris";
- private const string PASSWORD = "secret";
- private const string AUTHID = null;
- private const string PROTOCOL = "IMAP";
- private const string SERVERNAME = "elwood.innosoft.com";
-
- #region Digest Challenge Parsing Tests
- //
- // Digest Challenge Parsing Tests
- //
-
- [Test]
- public void CanParseSimpleString()
- {
- string challenge = "realm=\"elwood.innosoft.com\", algorithm=md5-sess";
- StringDictionary values = DigestChallenge.ParseParameters(challenge);
- Assert.AreEqual(2, values.Count);
- Assert.AreEqual("elwood.innosoft.com", values["realm"]);
- Assert.AreEqual("md5-sess", values["algorithm"]);
- }
-
- [Test]
- public void CanParseEscapedQuotes()
- {
- string challenge = "realm=\"elwood\\\".innosoft.com\", algorithm=md5-sess";
- StringDictionary values = DigestChallenge.ParseParameters(challenge);
- Assert.AreEqual(2, values.Count);
- Assert.AreEqual("elwood\\\".innosoft.com", values["realm"]);
- Assert.AreEqual("md5-sess", values["algorithm"]);
- }
-
- [Test]
- public void CanParseEmbeddedDelimiter()
- {
- string challenge = "realm=\"elwood,innosoft.com\", algorithm=md5-sess";
- StringDictionary values = DigestChallenge.ParseParameters(challenge);
- Assert.AreEqual(2, values.Count);
- Assert.AreEqual("elwood,innosoft.com", values["realm"]);
- Assert.AreEqual("md5-sess", values["algorithm"]);
- }
-
- [Test]
- public void CanParse1()
- {
- string challenge = "realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",qop=\"auth\",algorithm=md5-sess,charset=utf-8";
- DigestChallenge parsed = DigestChallenge.Parse(challenge);
-
- Assert.AreEqual("elwood.innosoft.com", parsed.Realm);
- Assert.AreEqual("OA6MG9tEQGm2hh", parsed.Nonce);
- Assert.Contains("auth", parsed.QopOptions);
- Assert.AreEqual("md5-sess", parsed.Algorithm);
- Assert.AreEqual("utf-8", parsed.Charset);
- }
-
- #endregion // Digest Challenge Parsing Tests
-
-
- #region Digest Response Tests
- //
- // Digest Response Tests
- //
-
- [Test]
- public void CanWriteResponse()
- {
- DigestResponse resp = new DigestResponse();
- resp.Username = "user";
- resp.Realm = "nowhere.com";
- resp.Nonce = "OA9BSXrbuRhWay";
- resp.Cnonce = "OA9BSuZWMSpW8m";
- resp.NonceCount = 16;
- resp.DigestUri = "acap/elwood.innosoft.com";
- resp.Response = "6084c6db3fede7352c551284490fd0fc";
- resp.Qop = "auth";
- resp.MaxBuffer = 65536;
- resp.Cipher = "3des";
- resp.Authzid = "user2";
- resp.AuthParam = "ap";
- resp.Charset = "utf-8";
-
- string expected = "username=\"user\",realm=\"nowhere.com\",nonce=\"OA9BSXrbuRhWay\",cnonce=\"OA9BSuZWMSpW8m\",nc=00000010,qop=auth,digest-uri=\"acap/elwood.innosoft.com\",response=\"6084c6db3fede7352c551284490fd0fc\",maxbuf=65536,charset=utf-8,cipher=3des,authzid=\"user2\",auth-param=\"ap\"";
- Assert.AreEqual(expected, resp.ToString());
- }
-
- [Test]
- public void CanWriteEscapedSecuence()
- {
- DigestResponse resp = new DigestResponse();
- resp.Username = "us\"er";
-
- string expected = "username=\"us\\\"er\",nc=00000000,maxbuf=0";
- Assert.AreEqual(expected, resp.ToString());
- }
-
- #endregion // Digest Response Tests
-
-
- #region Authentication Tests
- //
- // Authentication Tests
- //
-
- [Test]
- public void ReturnsRightMechanismName()
- {
- ISaslClient client = CreateClient();
-
- Assert.AreEqual("DIGEST-MD5", client.MechanismName);
- }
-
- [Test]
- public void HasInitialResponseReturnsFalse()
- {
- ISaslClient client = CreateClient();
-
- Assert.IsFalse(client.HasInitialResponse);
- }
-
- [Test]
- public void CanAuthenticate()
- {
- string challenge = "realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",qop=\"auth\",algorithm=md5-sess,charset=utf-8";
- DigestSaslClient client = CreateClient();
- client.Cnonce = "OA6MHXh6VqTrRk";
-
- byte[] bresp = client.EvaluateChallenge(Encoding.UTF8.GetBytes(challenge));
- string response = Encoding.UTF8.GetString(bresp);
- string expectedResp = "username=\"chris\",realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",cnonce=\"" +
- client.Cnonce + "\",nc=00000001,qop=auth,digest-uri=\"imap/elwood.innosoft.com\",response=\"d388dad90d4bbd760a152321f2143af7\",maxbuf=65536,charset=utf-8";
-
- Assert.AreEqual(expectedResp, response);
- Assert.IsFalse(client.IsComplete);
-
- string challenge2 = "rspauth=ea40f60335c427b5527b84dbabcdfffd";
- bresp = client.EvaluateChallenge(Encoding.UTF8.GetBytes(challenge2));
- // client responds with zero-length array
- Assert.AreEqual(0, bresp.Length);
- Assert.IsTrue(client.IsComplete);
- }
-
- [Test]
- [ExpectedException(typeof(ArgumentNullException))]
- public void ThrowsExceptionWhenChallengeIsMissing()
- {
- DigestSaslClient client = CreateClient();
- client.EvaluateChallenge(null);
- }
-
-
- [Test]
- [ExpectedException(typeof(SaslException))]
- public void ThrowsExceptionWhenNonceMissing()
- {
- string challenge = "realm=\"elwood.innosoft.com\"";
- DigestSaslClient client = CreateClient();
-
- client.EvaluateChallenge(Encoding.UTF8.GetBytes(challenge));
- }
-
- [Test]
- [ExpectedException(typeof(SaslException))]
- public void ThrowsExceptionWhenAlgorithmMissing()
- {
- string challenge = "realm=\"elwood.innosoft.com\",nonce=\"asdasadsad\"";
- DigestSaslClient client = CreateClient();
-
- client.EvaluateChallenge(Encoding.UTF8.GetBytes(challenge));
- }
-
- [Test]
- [ExpectedException(typeof(SaslException))]
- public void ThrowsExceptionWhenSecondChallengeInvalid()
- {
- string challenge = "realm=\"elwood.innosoft.com\",nonce=\"OA6MG9tEQGm2hh\",qop=\"auth\",algorithm=md5-sess,charset=utf-8";
- DigestSaslClient client = CreateClient();
-
- byte[] bresp = client.EvaluateChallenge(Encoding.UTF8.GetBytes(challenge));
- Encoding.UTF8.GetString(bresp);
-
- // repeat challenge 1, which is incorrect
- client.EvaluateChallenge(Encoding.UTF8.GetBytes(challenge));
- }
-
- private DigestSaslClient CreateClient()
- {
- return new DigestSaslClient(
- AUTHID, SERVERNAME, PROTOCOL,
- new Hashtable(), this
- );
- }
-
- void ISaslCallbackHandler.Handle(ISaslCallback[] callbacks)
- {
- foreach ( ISaslCallback cb in callbacks )
- {
- if ( cb is NameCallback )
- {
- ((NameCallback)cb).Text = USERNAME;
- } else if ( cb is PasswordCallback )
- {
- ((PasswordCallback)cb).Text = PASSWORD;
- } else if ( cb is RealmCallback )
- {
- ((RealmCallback)cb).Text = SERVERNAME;
- }
- }
- }
-
- #endregion // Authentication Tests
-
-
- } // class DigestSaslClientTests
-
-} // namespace Apache.Qpid.Sasl.Tests.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/ExternalSaslClientTests.cs b/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/ExternalSaslClientTests.cs
deleted file mode 100644
index 57efcf7614..0000000000
--- a/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/ExternalSaslClientTests.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Text;
-
-using NUnit.Framework;
-using Apache.Qpid.Sasl;
-using Apache.Qpid.Sasl.Mechanisms;
-
-namespace Apache.Qpid.Sasl.Tests.Mechanisms
-{
- [TestFixture]
- public class ExternalSaslClientTests : ISaslCallbackHandler
- {
- private const string AUTHID = "nobody@nowhere.com";
-
- [Test]
- public void ReturnsRightMechanismName()
- {
- ISaslClient client = new ExternalSaslClient(AUTHID, new Hashtable(), this);
-
- Assert.AreEqual("EXTERNAL", client.MechanismName);
- }
-
- [Test]
- public void HasInitialResponseReturnsTrue()
- {
- ISaslClient client = new ExternalSaslClient(AUTHID, new Hashtable(), this);
-
- Assert.IsTrue(client.HasInitialResponse);
- }
-
- [Test]
- public void CanEvaluateChallenge()
- {
- ISaslClient client = new ExternalSaslClient(AUTHID, new Hashtable(), this);
-
- Assert.IsFalse(client.IsComplete);
- byte[] response = client.EvaluateChallenge(new byte[0]);
- Assert.AreEqual(AUTHID, Encoding.UTF8.GetString(response));
-
- Assert.IsTrue(client.IsComplete);
- }
-
- void ISaslCallbackHandler.Handle(ISaslCallback[] callbacks)
- {
- }
-
- } // class AnonymousSaslClientTests
-
-} // namespace Apache.Qpid.Sasl.Tests.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/PlainSaslClientTests.cs b/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/PlainSaslClientTests.cs
deleted file mode 100644
index f4fc00e038..0000000000
--- a/qpid/dotnet/Qpid.Sasl.Tests/Mechanisms/PlainSaslClientTests.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Text;
-
-using NUnit.Framework;
-using Apache.Qpid.Sasl;
-using Apache.Qpid.Sasl.Mechanisms;
-
-namespace Apache.Qpid.Sasl.Tests.Mechanisms
-{
- [TestFixture]
- public class PlainSaslClientTests : ISaslCallbackHandler
- {
- private const string USERNAME = "testuser";
- private const string PASSWORD = "thepasswd";
- private const string AUTHID = "theauth";
-
- [Test]
- public void ReturnsRightMechanismName()
- {
- ISaslClient client = new PlainSaslClient(AUTHID, new Hashtable(), this);
-
- Assert.AreEqual("PLAIN", client.MechanismName);
- }
-
- [Test]
- public void HasInitialResponseReturnsTrue()
- {
- ISaslClient client = new PlainSaslClient(AUTHID, new Hashtable(), this);
-
- Assert.IsTrue(client.HasInitialResponse);
- }
-
- [Test]
- public void CanEvaluateChallenge()
- {
- Hashtable props = new Hashtable();
- ISaslClient client = new PlainSaslClient(AUTHID, props, this);
-
- Assert.IsFalse(client.IsComplete);
- byte[] response = client.EvaluateChallenge(new byte[0]);
- string[] parts = Encoding.UTF8.GetString(response).Split('\0');
-
- Assert.AreEqual(3, parts.Length);
- Assert.AreEqual(AUTHID, parts[0]);
- Assert.AreEqual(USERNAME, parts[1]);
- Assert.AreEqual(PASSWORD, parts[2]);
- Assert.IsTrue(client.IsComplete);
- }
-
- void ISaslCallbackHandler.Handle(ISaslCallback[] callbacks)
- {
- foreach ( ISaslCallback cb in callbacks )
- {
- if ( cb is NameCallback )
- {
- ((NameCallback)cb).Text = USERNAME;
- } else if ( cb is PasswordCallback )
- {
- ((PasswordCallback)cb).Text = PASSWORD;
- }
- }
- }
-
- } // class PlainSaslClientTests
-
-} // namespace Apache.Qpid.Sasl.Tests.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl.Tests/Properties/AssemblyInfo.cs b/qpid/dotnet/Qpid.Sasl.Tests/Properties/AssemblyInfo.cs
deleted file mode 100644
index e795c267a7..0000000000
--- a/qpid/dotnet/Qpid.Sasl.Tests/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Apache.Qpid.Sasl.Tests")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Apache.Qpid.Sasl.Tests")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("84cc3267-8019-4fad-a426-0a40155b3352")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/Qpid.Sasl.Tests/Qpid.Sasl.Tests.csproj b/qpid/dotnet/Qpid.Sasl.Tests/Qpid.Sasl.Tests.csproj
deleted file mode 100644
index f1a7b07e5a..0000000000
--- a/qpid/dotnet/Qpid.Sasl.Tests/Qpid.Sasl.Tests.csproj
+++ /dev/null
@@ -1,86 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{587B3520-EBB9-41ED-B019-E96116B651CE}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Apache.Qpid.Sasl.Tests</RootNamespace>
- <AssemblyName>Apache.Qpid.Sasl.Tests</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\net-2.0\debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <UseVSHostingProcess>true</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\net-2.0\release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\Qpid.Client.Tests\lib\nunit\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Qpid.Sasl\Qpid.Sasl.csproj">
- <Project>{1465B0EE-6452-42A6-AB73-B2F9EABEEE75}</Project>
- <Name>Qpid.Sasl</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/Qpid.Sasl.Tests/SaslTests.cs b/qpid/dotnet/Qpid.Sasl.Tests/SaslTests.cs
deleted file mode 100644
index e7ae91d6b6..0000000000
--- a/qpid/dotnet/Qpid.Sasl.Tests/SaslTests.cs
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Text;
-
-using NUnit.Framework;
-using Apache.Qpid.Sasl;
-using Apache.Qpid.Sasl.Mechanisms;
-
-namespace Apache.Qpid.Sasl.Tests
-{
- [TestFixture]
- public class SaslTests : ISaslCallbackHandler
- {
-
- [Test]
- public void CanCreatePlain()
- {
- Hashtable props = new Hashtable();
- string[] mechanisms = new string[] { "PLAIN", "OTHER" };
- ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this);
-
- Assert.IsNotNull(client);
- Assert.IsInstanceOfType(typeof(PlainSaslClient), client);
- }
-
- [Test]
- public void CanCreateCramMD5()
- {
- Hashtable props = new Hashtable();
- string[] mechanisms = new string[] { "CRAM-MD5", "OTHER" };
- ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this);
-
- Assert.IsNotNull(client);
- Assert.IsInstanceOfType(typeof(CramMD5SaslClient), client);
- }
-
- [Test]
- public void CanCreateAnonymous()
- {
- Hashtable props = new Hashtable();
- string[] mechanisms = new string[] { "ANONYMOUS", "OTHER" };
- ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this);
-
- Assert.IsNotNull(client);
- Assert.IsInstanceOfType(typeof(AnonymousSaslClient), client);
- }
-
- [Test]
- public void CanCreateDigest()
- {
- Hashtable props = new Hashtable();
- string[] mechanisms = new string[] { "DIGEST-MD5", "OTHER" };
- ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this);
-
- Assert.IsNotNull(client);
- Assert.IsInstanceOfType(typeof(DigestSaslClient), client);
- }
-
- [Test]
- public void CanCreateExternal()
- {
- Hashtable props = new Hashtable();
- string[] mechanisms = new string[] { "EXTERNAL", "OTHER" };
- ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this);
-
- Assert.IsNotNull(client);
- Assert.IsInstanceOfType(typeof(ExternalSaslClient), client);
- }
-
- [Test]
- public void ReturnsNullIfNoFactoryFound()
- {
- Hashtable props = new Hashtable();
- props.Add(SaslProperties.PolicyNoPlainText, true);
- string[] mechanisms = new string[] { "PLAIN", "OTHER" };
- ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this);
-
- Assert.IsNull(client);
- }
-
- [Test]
- public void ParsesConfigurationSection()
- {
- // if the TEST mechanism is available, then we know
- // the configuration section worked!
- Hashtable props = new Hashtable();
- string[] mechanisms = new string[] { "TEST" };
- ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this);
-
- Assert.IsNotNull(client);
- Assert.IsInstanceOfType(typeof(TestSaslClient), client);
- }
-
- [Test]
- public void ChoosesStrongerMechanism()
- {
- Hashtable props = new Hashtable();
- string[] mechanisms = new string[] { "PLAIN", "OTHER", "CRAM-MD5" };
- ISaslClient client = Sasl.CreateClient(mechanisms, "", "", "", props, this);
-
- Assert.IsNotNull(client);
- Assert.IsInstanceOfType(typeof(CramMD5SaslClient), client);
- }
-
-
- void ISaslCallbackHandler.Handle(ISaslCallback[] callbacks)
- {
- }
-
- } // class SaslTests
-
-} // namespace Apache.Qpid.Sasl.Tests
diff --git a/qpid/dotnet/Qpid.Sasl.Tests/TestClientFactory.cs b/qpid/dotnet/Qpid.Sasl.Tests/TestClientFactory.cs
deleted file mode 100644
index 62099237e9..0000000000
--- a/qpid/dotnet/Qpid.Sasl.Tests/TestClientFactory.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Text;
-
-using NUnit.Framework;
-using Apache.Qpid.Sasl;
-using Apache.Qpid.Sasl.Mechanisms;
-
-namespace Apache.Qpid.Sasl.Tests
-{
- public class TestClientFactory : ISaslClientFactory
- {
- public string[] GetSupportedMechanisms(IDictionary props)
- {
- return new string[] { TestSaslClient.Mechanism };
- }
-
- public ISaslClient CreateClient(string[] mechanisms, string authorizationId, string protocol, string serverName, IDictionary props, ISaslCallbackHandler handler)
- {
- foreach ( string mech in mechanisms )
- {
- if ( mech == TestSaslClient.Mechanism )
- return new TestSaslClient(props, handler);
- }
- return null;
- }
-
- } // class TestClientFactory
-
- internal class TestSaslClient : SaslClient
- {
- public const string Mechanism = "TEST";
-
- public override string MechanismName
- {
- get { return Mechanism; }
- }
- public override bool HasInitialResponse
- {
- get { return false; }
- }
-
- public TestSaslClient(IDictionary props, ISaslCallbackHandler handler)
- : base("", "", "", props, handler)
- {
- }
-
- public override byte[] EvaluateChallenge(byte[] challenge)
- {
- throw new NotImplementedException();
- }
- } // class TestSaslClient
-
-} // namespace Apache.Qpid.Sasl.Tests
diff --git a/qpid/dotnet/Qpid.Sasl.Tests/default.build b/qpid/dotnet/Qpid.Sasl.Tests/default.build
deleted file mode 100644
index 5b51c0a6fa..0000000000
--- a/qpid/dotnet/Qpid.Sasl.Tests/default.build
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Apache.Qpid.Sasl" default="test">
-
- <target name="build">
- <csc target="library"
- define="${build.defines}"
- warnaserror="true" debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.Tests.dll">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/nunit.framework.dll" />
- <include name="${build.dir}/${project::get-name()}.dll" />
- </references>
-
- </csc>
- <copy
- tofile="${build.dir}/${project::get-name()}.Tests.dll.config"
- file="App.config"
- />
- </target>
- <target name="test" depends="build">
- <nunit2>
- <formatter type="${nant.formatter}" usefile="false" />
- <test assemblyname="${build.dir}/${project::get-name()}.Tests.dll" />
- </nunit2>
- </target>
-</project>
-
diff --git a/qpid/dotnet/Qpid.Sasl/Callbacks.cs b/qpid/dotnet/Qpid.Sasl/Callbacks.cs
deleted file mode 100644
index f4fcc1c54b..0000000000
--- a/qpid/dotnet/Qpid.Sasl/Callbacks.cs
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Text;
-using System.Globalization;
-using System.Security.Cryptography;
-
-namespace Apache.Qpid.Sasl
-{
- /// <summary>
- /// Marker interface for Sasl Callbacks
- /// </summary>
- public interface ISaslCallback
- {
- } // interface ISaslCallback
-
- public abstract class TextSaslCallback : ISaslCallback
- {
- private string _prompt;
- private string _text;
- private string _defaultText;
-
- public string Prompt
- {
- get { return _prompt; }
- set { _prompt = value; }
- }
-
- public string Text
- {
- get {
- if ( _text == null || _text.Length == 0 )
- return DefaultText;
- else
- return _text;
- }
- set { _text = value; }
- }
-
- public string DefaultText
- {
- get { return _defaultText; }
- set { _defaultText = value; }
- }
-
- protected TextSaslCallback(string prompt, string text, string defaultText)
- {
- _prompt = prompt;
- _text = text;
- _defaultText = defaultText;
- }
-
- } // class TextSaslCallback
-
- public class NameCallback : TextSaslCallback
- {
- public NameCallback()
- : this(Environment.UserName)
- {
- }
- public NameCallback(string defaultText)
- : base("username:", "", defaultText)
- {
- }
- } // class NameCallback
-
- public class PasswordCallback : TextSaslCallback
- {
- public PasswordCallback()
- : base("password:", "", "")
- {
- }
-
- public byte[] HashedText
- {
- get
- {
- string _text = this.Text;
- System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
- byte[] bs = x.ComputeHash(Encoding.UTF8.GetBytes(_text));
- return bs;
- }
-
- }
- } // class PasswordCallback
-
- public class HashedPasswordCallback : TextSaslCallback
- {
- public HashedPasswordCallback()
- : base("password:", "", "")
- {
- }
-
- public byte[] HashedText
- {
- get {
- string _text = this.Text;
- System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
- _text = _text.PadRight(16, '\0');
- byte[] bs = x.ComputeHash(Encoding.UTF8.GetBytes(_text));
- return bs;
- }
- }
- } // class PasswordCallback
-
- public class RealmCallback : TextSaslCallback
- {
- public RealmCallback()
- : this("localhost")
- {
- }
- public RealmCallback(string defaultText)
- : base("realm:", "", defaultText)
- {
- }
- } // class RealmCallback
-
-} // namespace Apache.Qpid.Sasl
-
-
diff --git a/qpid/dotnet/Qpid.Sasl/Configuration/SaslConfiguration.cs b/qpid/dotnet/Qpid.Sasl/Configuration/SaslConfiguration.cs
deleted file mode 100644
index 7a71ec28da..0000000000
--- a/qpid/dotnet/Qpid.Sasl/Configuration/SaslConfiguration.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Configuration;
-using System.Text;
-using System.Xml;
-
-namespace Apache.Qpid.Sasl.Configuration
-{
- /// <summary>
- /// Represents an Sasl configuration section
- /// in the config file
- /// </summary>
- internal class SaslConfiguration
- {
- private IList _clientFactories;
-
- /// <summary>
- /// Set of configured client factores
- /// </summary>
- public IList ClientFactories
- {
- get { return _clientFactories; }
- }
-
- internal SaslConfiguration(IList clientFactoryTypes)
- {
- _clientFactories = new ArrayList();
- foreach ( Type type in clientFactoryTypes )
- {
- _clientFactories.Add(Activator.CreateInstance(type));
- }
- }
-
- /// <summary>
- /// Get the configuration for the library
- /// </summary>
- /// <returns>The configuration from app.config or a default configuration</returns>
- internal static SaslConfiguration GetConfiguration()
- {
- // 'obsolete' warning, but needed for .NET 1.1 compatibility
- SaslConfiguration config = (SaslConfiguration)
- ConfigurationSettings.GetConfig("qpid.sasl");
- if ( config == null )
- {
- // create default configuration
- IList clientFactories = GetDefaultClientFactories();
- config = new SaslConfiguration(clientFactories);
- }
- return config;
- }
-
- /// <summary>
- /// Create a list filled with the default client
- /// factories supported by the library
- /// </summary>
- /// <returns>The list of client factory types</returns>
- internal static IList GetDefaultClientFactories()
- {
- IList clientFactories = new ArrayList();
- clientFactories.Add(typeof(DefaultClientFactory));
- return clientFactories;
- }
-
-
- } // class SaslConfiguration
-
-} // namespace Apache.Qpid.Sasl.Configuration
-
-
diff --git a/qpid/dotnet/Qpid.Sasl/Configuration/SaslConfigurationSectionHandler.cs b/qpid/dotnet/Qpid.Sasl/Configuration/SaslConfigurationSectionHandler.cs
deleted file mode 100644
index ea8669f8c4..0000000000
--- a/qpid/dotnet/Qpid.Sasl/Configuration/SaslConfigurationSectionHandler.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Configuration;
-using System.Text;
-using System.Xml;
-
-namespace Apache.Qpid.Sasl.Configuration
-{
- /// <summary>
- /// Defines the configuration section to configure extra
- /// Sasl client factories
- /// </summary>
- public class SaslConfigurationSectionHandler
- : IConfigurationSectionHandler
- {
- public object Create(object parent, object configContext, XmlNode section)
- {
- IList clientFactories = SaslConfiguration.GetDefaultClientFactories();
-
- foreach ( XmlNode node in section.ChildNodes )
- {
- if ( node.LocalName == "clientFactories" )
- {
- ProcessFactories(node, clientFactories);
- }
- }
-
- SaslConfiguration config = new SaslConfiguration(clientFactories);
- return config;
- }
-
-
- private void ProcessFactories(XmlNode node, IList factories)
- {
- foreach ( XmlNode child in node.ChildNodes )
- {
- Type type;
- switch ( child.LocalName )
- {
- case "add":
- type = Type.GetType(child.Attributes["type"].Value);
- if ( !factories.Contains(type) )
- factories.Add(type);
- break;
- case "remove":
- type = Type.GetType(child.Attributes["type"].Value);
- if ( factories.Contains(type) )
- factories.Remove(type);
- break;
- case "clear":
- factories.Clear();
- break;
- default:
- // gives obsolete warning but needed for .NET 1.1 support
- throw new ConfigurationException(string.Format("Unknown element '{0}' in section '{0}'", child.LocalName, node.LocalName));
- }
- }
- }
- } // class SaslConfigurationSectionHandler
-
-} // namespace Apache.Qpid.Sasl.Configuration
-
-
diff --git a/qpid/dotnet/Qpid.Sasl/DefaultClientFactory.cs b/qpid/dotnet/Qpid.Sasl/DefaultClientFactory.cs
deleted file mode 100644
index 744d7cae40..0000000000
--- a/qpid/dotnet/Qpid.Sasl/DefaultClientFactory.cs
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-
-using Apache.Qpid.Sasl.Mechanisms;
-
-namespace Apache.Qpid.Sasl
-{
- public class DefaultClientFactory : ISaslClientFactory
- {
- private static readonly string[] SUPPORTED = new string[] {
- DigestSaslClient.Mechanism,
- CramMD5SaslClient.Mechanism,
- CramMD5HexSaslClient.Mechanism,
- PlainSaslClient.Mechanism,
- AnonymousSaslClient.Mechanism,
- ExternalSaslClient.Mechanism,
- };
-
- public string[] GetSupportedMechanisms(IDictionary props)
- {
- if ( props == null )
- throw new ArgumentNullException("props");
-
- ArrayList vetoed = new ArrayList();
-
- if ( props.Contains(SaslProperties.PolicyNoPlainText) ||
- props.Contains(SaslProperties.PolicyNoDictionary) ||
- props.Contains(SaslProperties.PolicyNoActive) ||
- props.Contains(SaslProperties.PolicyForwardSecrecy) ||
- props.Contains(SaslProperties.PolicyPassCredentials) )
- {
- vetoed.Add(CramMD5SaslClient.Mechanism);
- vetoed.Add(CramMD5HexSaslClient.Mechanism);
- vetoed.Add(PlainSaslClient.Mechanism);
- vetoed.Add(AnonymousSaslClient.Mechanism);
- vetoed.Add(ExternalSaslClient.Mechanism);
- }
- if ( props.Contains(SaslProperties.PolicyNoAnonymous) )
- {
- vetoed.Add(AnonymousSaslClient.Mechanism);
- }
-
- ArrayList available = new ArrayList();
- foreach ( string mech in SUPPORTED )
- {
- if ( !vetoed.Contains(mech) )
- available.Add(mech);
- }
- return (string[])available.ToArray(typeof(string));
- }
-
- public ISaslClient CreateClient(
- string[] mechanisms, string authorizationId,
- string protocol, string serverName,
- IDictionary props, ISaslCallbackHandler handler
- )
- {
- IList mechs = mechanisms;
- if ( mechs.Contains(ExternalSaslClient.Mechanism) )
- return new ExternalSaslClient(authorizationId, props, handler);
- if ( mechs.Contains(DigestSaslClient.Mechanism) )
- return new DigestSaslClient(authorizationId, serverName, protocol, props, handler);
- if ( mechs.Contains(CramMD5SaslClient.Mechanism) )
- return new CramMD5SaslClient(authorizationId, props, handler);
- if ( mechs.Contains(CramMD5HexSaslClient.Mechanism) )
- return new CramMD5HexSaslClient(authorizationId, props, handler);
- if ( mechs.Contains(PlainSaslClient.Mechanism) )
- return new PlainSaslClient(authorizationId, props, handler);
- if ( mechs.Contains(AnonymousSaslClient.Mechanism) )
- return new AnonymousSaslClient(authorizationId, props, handler);
- // unknown mechanism
- return null;
- }
- } // class DefaultClientFactory
-
-} // namespace Apache.Qpid.Sasl
-
-
diff --git a/qpid/dotnet/Qpid.Sasl/ISaslCallbackHandler.cs b/qpid/dotnet/Qpid.Sasl/ISaslCallbackHandler.cs
deleted file mode 100644
index c2638f245e..0000000000
--- a/qpid/dotnet/Qpid.Sasl/ISaslCallbackHandler.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Text;
-
-namespace Apache.Qpid.Sasl
-{
- public interface ISaslCallbackHandler
- {
- void Handle(ISaslCallback[] callbacks);
-
- } // interface ISaslCallbackHandler
-
-} // namespace Apache.Qpid.Sasl
-
-
diff --git a/qpid/dotnet/Qpid.Sasl/ISaslClient.cs b/qpid/dotnet/Qpid.Sasl/ISaslClient.cs
deleted file mode 100644
index 668ca05d26..0000000000
--- a/qpid/dotnet/Qpid.Sasl/ISaslClient.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Text;
-
-namespace Apache.Qpid.Sasl
-{
- public interface ISaslClient
- {
- string MechanismName { get; }
- bool HasInitialResponse { get; }
- bool IsComplete { get; }
-
- byte[] EvaluateChallenge(byte[] challenge);
- object GetNegotiatedProperty(string propName);
- byte[] Unwrap(byte[] buffer, int offset, int length);
- byte[] Wrap(byte[] buffer, int offset, int lenght);
-
- } // interface ISaslClient
-
-} // namespace Apache.Qpid.Sasl
-
-
diff --git a/qpid/dotnet/Qpid.Sasl/ISaslClientFactory.cs b/qpid/dotnet/Qpid.Sasl/ISaslClientFactory.cs
deleted file mode 100644
index f052e07ad9..0000000000
--- a/qpid/dotnet/Qpid.Sasl/ISaslClientFactory.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Text;
-
-namespace Apache.Qpid.Sasl
-{
- public interface ISaslClientFactory
- {
- string[] GetSupportedMechanisms(IDictionary props);
- ISaslClient CreateClient(
- string[] mechanisms, string authorizationId,
- string protocol, string serverName,
- IDictionary props, ISaslCallbackHandler handler
- );
- } // interface ISaslClientFactory
-
-} // namespace Apache.Qpid.Sasl
-
-
diff --git a/qpid/dotnet/Qpid.Sasl/MD5HMAC.cs b/qpid/dotnet/Qpid.Sasl/MD5HMAC.cs
deleted file mode 100644
index 7e310c5364..0000000000
--- a/qpid/dotnet/Qpid.Sasl/MD5HMAC.cs
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Security.Cryptography;
-
-namespace Apache.Qpid.Sasl
-{
- /// <summary>
- /// Rough HMAC MD5 implementation as presented in
- /// RFC 2104. Used because the HMACMD5 class in the
- /// .NET framework is not available in v1.1.
- /// </summary>
- public sealed class MD5HMAC : IDisposable
- {
- private const int BLOCK_LEN = 64;
- private MD5 _hash;
- private byte[] _key;
- private byte[] _ipad;
- private byte[] _opad;
-
- public MD5HMAC(byte[] key)
- {
- if ( key == null || key.Length == 0 )
- throw new ArgumentNullException("key");
-
- _hash = new MD5CryptoServiceProvider();
-
- byte[] theKey = key;
- if ( theKey.Length > BLOCK_LEN )
- {
- theKey = _hash.ComputeHash(theKey);
- }
- // pad key with 0's up to BLOCK_LEN
- _key = new byte[BLOCK_LEN];
- Array.Copy(theKey, _key, theKey.Length);
-
- CreatePads();
- }
-
- public byte[] ComputeHash(byte[] input)
- {
- // H(K XOR opad, H(K XOR ipad, text))
- return H(_opad, H(_ipad, input));
- }
-
- public void Dispose()
- {
- if ( _hash != null )
- {
- ((IDisposable)_hash).Dispose();
- _hash = null;
- }
- }
-
- #region Private Methods
- //
- // Private Methods
- //
-
- private void CreatePads()
- {
- _ipad = new byte[BLOCK_LEN];
- _opad = new byte[BLOCK_LEN];
- for ( int i = 0; i < BLOCK_LEN; i++ )
- {
- _ipad[i] = 0x36;
- _opad[i] = 0x5c;
- }
-
- XOR(_ipad, _key);
- XOR(_opad, _key);
- }
-
- private static void XOR(byte[] dest, byte[] other)
- {
- // assume both are same size
- for ( int i = 0; i < dest.Length; i++ )
- {
- dest[i] ^= other[i];
- }
- }
-
- private byte[] H(byte[] v1, byte[] v2)
- {
- byte[] total = new byte[v1.Length + v2.Length];
- Array.Copy(v1, total, v1.Length);
- Array.Copy(v2, 0, total, v1.Length, v2.Length);
-
- return _hash.ComputeHash(total);
- }
-
- #endregion // Private Methods
-
- } // class MD5HMAC
-
-} // namespace Apache.Qpid.Sasl
diff --git a/qpid/dotnet/Qpid.Sasl/Mechanisms/AnonymousSaslClient.cs b/qpid/dotnet/Qpid.Sasl/Mechanisms/AnonymousSaslClient.cs
deleted file mode 100644
index e550d10d97..0000000000
--- a/qpid/dotnet/Qpid.Sasl/Mechanisms/AnonymousSaslClient.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Text;
-
-namespace Apache.Qpid.Sasl.Mechanisms
-{
- /// <summary>
- /// Implements the ANONYMOUS authentication mechanism
- /// as outlined in RFC 2245
- /// </summary>
- public class AnonymousSaslClient : SaslClient
- {
- public const string Mechanism = "ANONYMOUS";
-
- public AnonymousSaslClient(
- string authid, IDictionary properties,
- ISaslCallbackHandler handler)
- : base(authid, null, null, properties, handler)
- {
- }
-
- #region ISaslClient Implementation
- //
- // ISaslClient Implementation
- //
-
- public override string MechanismName
- {
- get { return Mechanism; }
- }
-
- public override bool HasInitialResponse
- {
- get { return true; }
- }
-
- public override byte[] EvaluateChallenge(byte[] challenge)
- {
- // ignore challenge
- SetComplete();
- return Encoding.UTF8.GetBytes(AuthorizationId);
- }
-
- #endregion // ISaslClient Implementation
-
- } // class AnonymousSaslClient
-
-} // namespace Apache.Qpid.Sasl.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl/Mechanisms/CramMD5HexSaslClient.cs b/qpid/dotnet/Qpid.Sasl/Mechanisms/CramMD5HexSaslClient.cs
deleted file mode 100644
index 3cce0e3a2d..0000000000
--- a/qpid/dotnet/Qpid.Sasl/Mechanisms/CramMD5HexSaslClient.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Security.Cryptography;
-using System.Text;
-
-namespace Apache.Qpid.Sasl.Mechanisms
-{
- /// <summary>
- /// Implements the CRAM-MD5 authentication mechanism as outlined
- /// in RFC 2195
- /// </summary>
- public class CramMD5HexSaslClient : SaslClient
- {
- public const string Mechanism = "CRAM-MD5-HEX";
- private const int MinPwdLen = 16;
-
- public CramMD5HexSaslClient(
- string authorizationId,
- IDictionary properties,
- ISaslCallbackHandler handler)
- : base(authorizationId, null, null, properties, handler)
- {
- }
-
- #region ISaslClient Implementation
- //
- // ISaslClient Implementation
- //
-
- public override string MechanismName
- {
- get { return Mechanism; }
- }
-
- public override bool HasInitialResponse
- {
- get { return false; }
- }
-
-
- public override byte[] EvaluateChallenge(byte[] challenge)
- {
- if ( challenge == null || challenge.Length == 0 )
- throw new ArgumentNullException("challenge");
-
-
- NameCallback nameCB = new NameCallback(AuthorizationId);
- PasswordCallback pwdCB = new PasswordCallback();
- ISaslCallback[] callbacks = { nameCB, pwdCB };
- Handler.Handle(callbacks);
-
- string username = nameCB.Text;
-
- //Encode the Hashed Password as Hex
- byte[] passwd = Encoding.UTF8.GetBytes(ToHex(pwdCB.HashedText));
-
- string s = System.Text.UTF8Encoding.UTF8.GetString(challenge);
-
- using ( HMAC hmac = new HMACMD5(passwd) )
- {
- byte[] value = hmac.ComputeHash(challenge);
- string encoded = ToHex(value);
- SetComplete();
- return Encoding.UTF8.GetBytes(username + " " + encoded);
- }
- }
-
- #endregion // ISaslClient Implementation
-
- } // class CramMD5HashedSaslClient
-
-} // namespace Apache.Qpid.Sasl.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl/Mechanisms/CramMD5SaslClient.cs b/qpid/dotnet/Qpid.Sasl/Mechanisms/CramMD5SaslClient.cs
deleted file mode 100644
index 56b0f6ecd4..0000000000
--- a/qpid/dotnet/Qpid.Sasl/Mechanisms/CramMD5SaslClient.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Security.Cryptography;
-using System.Text;
-
-namespace Apache.Qpid.Sasl.Mechanisms
-{
- /// <summary>
- /// Implements the CRAM-MD5 authentication mechanism as outlined
- /// in RFC 2195
- /// </summary>
- public class CramMD5SaslClient : SaslClient
- {
- public const string Mechanism = "CRAM-MD5";
- private const int MinPwdLen = 16;
-
- public CramMD5SaslClient(
- string authorizationId,
- IDictionary properties,
- ISaslCallbackHandler handler)
- : base(authorizationId, null, null, properties, handler)
- {
- }
-
- #region ISaslClient Implementation
- //
- // ISaslClient Implementation
- //
-
- public override string MechanismName
- {
- get { return Mechanism; }
- }
-
- public override bool HasInitialResponse
- {
- get { return false; }
- }
-
- public override byte[] EvaluateChallenge(byte[] challenge)
- {
- if ( challenge == null || challenge.Length == 0 )
- throw new ArgumentNullException("challenge");
-
- NameCallback nameCB = new NameCallback(AuthorizationId);
- PasswordCallback pwdCB = new PasswordCallback();
- ISaslCallback[] callbacks = { nameCB, pwdCB };
- Handler.Handle(callbacks);
-
- string username = nameCB.Text;
- string passwd = pwdCB.Text.PadRight(MinPwdLen, '\0');
-
- byte[] secret = Encoding.UTF8.GetBytes(passwd);
-
- //using ( HMAC hmac = new HMACMD5(secret) )
- using ( MD5HMAC hmac = new MD5HMAC(secret) )
- {
- byte[] value = hmac.ComputeHash(challenge);
- string encoded = ToHex(value);
- SetComplete();
- return Encoding.UTF8.GetBytes(username + " " + encoded);
- }
-
- }
-
- #endregion // ISaslClient Implementation
-
- } // class CramMD5SaslClient
-
-} // namespace Apache.Qpid.Sasl.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl/Mechanisms/DigestSaslClient.cs b/qpid/dotnet/Qpid.Sasl/Mechanisms/DigestSaslClient.cs
deleted file mode 100644
index 79843587c7..0000000000
--- a/qpid/dotnet/Qpid.Sasl/Mechanisms/DigestSaslClient.cs
+++ /dev/null
@@ -1,576 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Globalization;
-using System.Security.Cryptography;
-using System.Text;
-
-namespace Apache.Qpid.Sasl.Mechanisms
-{
-
- /// <summary>
- /// Implements the DIGEST MD5 authentication mechanism
- /// as outlined in RFC 2831
- /// </summary>
- public class DigestSaslClient : SaslClient
- {
- public const string Mechanism = "DIGEST-MD5";
- private static readonly MD5 _md5 = new MD5CryptoServiceProvider();
- private int _state;
- private string _cnonce;
- private Encoding _encoding = Encoding.UTF8;
-
- public string Cnonce
- {
- get { return _cnonce; }
- set { _cnonce = value; }
- }
-
- public DigestSaslClient(
- string authid, string serverName, string protocol,
- IDictionary properties, ISaslCallbackHandler handler)
- : base(authid, serverName, protocol, properties, handler)
- {
- _cnonce = Guid.NewGuid().ToString("N");
- }
-
- #region ISaslClient Implementation
- //
- // ISaslClient Implementation
- //
-
- public override string MechanismName
- {
- get { return Mechanism; }
- }
-
- public override bool HasInitialResponse
- {
- get { return false; }
- }
-
- public override byte[] EvaluateChallenge(byte[] challenge)
- {
- if ( challenge == null || challenge.Length <= 0 )
- throw new ArgumentNullException("challenge");
-
- switch ( _state++ )
- {
- case 0: return OnInitialChallenge(challenge);
- case 1: return OnFinalResponse(challenge);
- }
- throw new SaslException("Invalid State for authentication");
- }
-
- #endregion // ISaslClient Implementation
-
-
- #region Private Methods
- //
- // Private Methods
- //
-
- /// <summary>
- /// Process the first challenge from the server
- /// and calculate a response
- /// </summary>
- /// <param name="challenge">The server issued challenge</param>
- /// <returns>Client response</returns>
- private byte[] OnInitialChallenge(byte[] challenge)
- {
- DigestChallenge dch =
- DigestChallenge.Parse(_encoding.GetString(challenge));
- // validate input challenge
- if ( dch.Nonce == null || dch.Nonce.Length == 0 )
- throw new SaslException("Nonce value missing in server challenge");
- if ( dch.Algorithm != "md5-sess" )
- throw new SaslException("Invalid or missing algorithm value in server challenge");
-
-
- NameCallback nameCB = new NameCallback(AuthorizationId);
- PasswordCallback pwdCB = new PasswordCallback();
- RealmCallback realmCB = new RealmCallback(dch.Realm);
- ISaslCallback[] callbacks = { nameCB, pwdCB, realmCB };
- Handler.Handle(callbacks);
-
- DigestResponse response = new DigestResponse();
- response.Username = nameCB.Text;
- response.Realm = realmCB.Text;
- response.Nonce = dch.Nonce;
- response.Cnonce = Cnonce;
- response.NonceCount = 1;
- response.Qop = DigestQop.Auth; // only auth supported for now
- response.DigestUri = Protocol.ToLower() + "/" + ServerName;
- response.MaxBuffer = dch.MaxBuffer;
- response.Charset = dch.Charset;
- response.Cipher = null; // not supported for now
- response.Authzid = AuthorizationId;
- response.AuthParam = dch.AuthParam;
-
- response.Response = CalculateResponse(
- nameCB.Text, realmCB.Text, pwdCB.Text,
- dch.Nonce, response.NonceCount, response.Qop, response.DigestUri
- );
-
- return _encoding.GetBytes(response.ToString());
- }
-
- /// <summary>
- /// Process the second server challenge
- /// </summary>
- /// <param name="challenge">Server issued challenge</param>
- /// <returns>The client response</returns>
- private byte[] OnFinalResponse(byte[] challenge)
- {
- DigestChallenge dch =
- DigestChallenge.Parse(_encoding.GetString(challenge));
-
- if ( dch.Rspauth == null || dch.Rspauth.Length == 0 )
- throw new SaslException("Expected 'rspauth' in server challenge not found");
-
- SetComplete();
- return new byte[0];
- }
-
-
-
- /// <summary>
- /// Calculate the response field of the client response
- /// </summary>
- /// <param name="username">The user name</param>
- /// <param name="realm">The realm</param>
- /// <param name="passwd">The user's password</param>
- /// <param name="nonce">Server nonce value</param>
- /// <param name="nc">Client nonce count (always 1)</param>
- /// <param name="qop">Quality of Protection</param>
- /// <param name="digestUri">Digest-URI</param>
- /// <returns>The value for the response field</returns>
- private string CalculateResponse(
- string username, string realm, string passwd,
- string nonce, int nc, string qop, string digestUri
- )
- {
- string a1 = CalcHexA1(username, realm, passwd, nonce);
- string a2 = CalcHexA2(digestUri, qop);
-
- string ncs = nc.ToString("x8", CultureInfo.InvariantCulture);
- StringBuilder prekd = new StringBuilder();
- prekd.Append(a1).Append(':').Append(nonce).Append(':')
- .Append(ncs).Append(':').Append(Cnonce)
- .Append(':').Append(qop).Append(':').Append(a2);
-
- return ToHex(CalcH(_encoding.GetBytes(prekd.ToString())));
- }
-
- private string CalcHexA1(
- string username, string realm,
- string passwd, string nonce
- )
- {
- bool hasAuthId = AuthorizationId != null && AuthorizationId.Length > 0;
-
- string premd = username + ":" + realm + ":" + passwd;
- byte[] temp1 = CalcH(_encoding.GetBytes(premd));
-
-
- int a1len = 16 + 1 + nonce.Length + 1 + Cnonce.Length;
- if ( hasAuthId )
- a1len += 1 + AuthorizationId.Length;
-
- byte[] buffer = new byte[a1len];
- Array.Copy(temp1, buffer, temp1.Length);
-
- string p2 = ":" + nonce + ":" + Cnonce;
- if ( hasAuthId )
- p2 += ":" + AuthorizationId;
-
- byte[] temp2 = _encoding.GetBytes(p2);
- Array.Copy(temp2, 0, buffer, 16, temp2.Length);
-
- return ToHex(CalcH(buffer));
- }
-
- private string CalcHexA2(string digestUri, string qop)
- {
- string a2 = "AUTHENTICATE:" + digestUri;
- if ( qop != DigestQop.Auth )
- a2 += ":00000000000000000000000000000000";
- return ToHex(CalcH(_encoding.GetBytes(a2)));
- }
-
- private static byte[] CalcH(byte[] value)
- {
- return _md5.ComputeHash(value);
- }
-
- #endregion // Private Methods
-
-
- } // class DigestSaslClient
-
-
- /// <summary>
- /// Available QOP options in the DIGEST scheme
- /// </summary>
- public sealed class DigestQop
- {
- public const string Auth = "auth";
- public const string AuthInt = "auth-int";
- public const string AuthConf = "auth-conf";
- } // class DigestQop
-
-
- /// <summary>
- /// Represents and parses a digest server challenge
- /// </summary>
- public class DigestChallenge
- {
- private string _realm = "localhost";
- private string _nonce;
- private string[] _qopOptions = { DigestQop.Auth };
- private bool _stale;
- private int _maxBuffer = 65536;
- private string _charset = "ISO 8859-1";
- private string _algorithm;
- private string[] _cipherOptions;
- private string _authParam;
- private string _rspauth;
-
- #region Properties
- //
- // Properties
- //
-
- public string Realm
- {
- get { return _realm; }
- }
-
- public string Nonce
- {
- get { return _nonce; }
- }
-
- public string[] QopOptions
- {
- get { return _qopOptions; }
- }
-
- public bool Stale
- {
- get { return _stale; }
- }
-
- public int MaxBuffer
- {
- get { return _maxBuffer; }
- set { _maxBuffer = value; }
- }
-
- public string Charset
- {
- get { return _charset; }
- }
-
- public string Algorithm
- {
- get { return _algorithm; }
- }
-
- public string[] CipherOptions
- {
- get { return _cipherOptions; }
- }
-
- public string AuthParam
- {
- get { return _authParam; }
- }
-
- public string Rspauth
- {
- get { return _rspauth; }
- }
-
- #endregion // Properties
-
- public static DigestChallenge Parse(string challenge)
- {
- DigestChallenge parsed = new DigestChallenge();
- StringDictionary parts = ParseParameters(challenge);
- foreach ( string optname in parts.Keys )
- {
- switch ( optname )
- {
- case "realm":
- parsed._realm = parts[optname];
- break;
- case "nonce":
- parsed._nonce = parts[optname];
- break;
- case "qop-options":
- parsed._qopOptions = GetOptions(parts[optname]);
- break;
- case "cipher-opts":
- parsed._cipherOptions = GetOptions(parts[optname]);
- break;
- case "stale":
- parsed._stale = Convert.ToBoolean(parts[optname], CultureInfo.InvariantCulture);
- break;
- case "maxbuf":
- parsed._maxBuffer = Convert.ToInt32(parts[optname], CultureInfo.InvariantCulture);
- break;
- case "charset":
- parsed._charset = parts[optname];
- break;
- case "algorithm":
- parsed._algorithm = parts[optname];
- break;
- case "auth-param":
- parsed._authParam = parts[optname];
- break;
- case "rspauth":
- parsed._rspauth = parts[optname];
- break;
- }
- }
-
- return parsed;
- }
-
-
- public static StringDictionary ParseParameters(string source)
- {
- if ( source == null )
- throw new ArgumentNullException("source");
-
- StringDictionary ret = new StringDictionary();
-
- string remaining = source.Trim();
- while ( remaining.Length > 0 )
- {
- int equals = remaining.IndexOf('=');
- if ( equals < 0 )
- break;
-
- string optname = remaining.Substring(0, equals).Trim();
- remaining = remaining.Substring(equals + 1);
-
- string value = ParseQuoted(ref remaining);
- ret[optname] = value.Trim();
- }
- return ret;
- }
-
- private static string ParseQuoted(ref string str)
- {
- string ns = str.TrimStart();
-
- int start = 0;
- bool quoted = ns[0] == '\"';
- if ( quoted ) start++;
- bool inquotes = quoted;
- bool escaped = false;
-
- int pos = start;
- for ( ; pos < ns.Length; pos++ )
- {
- if ( !inquotes && ns[pos] == ',' )
- break;
-
- // at end of quotes?
- if ( quoted && !escaped && ns[pos] == '\"' )
- inquotes = false;
- // is this char an escape for the next one?
- escaped = inquotes && ns[pos] == '\\';
- }
- // pos has end of string
- string value = ns.Substring(start, pos-start).Trim();
- if ( quoted )
- {
- // remove trailing quote
- value = value.Substring(0, value.Length - 1);
- }
- str = ns.Substring(pos < ns.Length-1 ? pos+1 : pos);
- return value;
- }
-
- private static string[] GetOptions(string value)
- {
- return value.Split(' ');
- }
-
- } // class DigestChallenge
-
-
- /// <summary>
- /// Represents and knows how to write a
- /// digest client response
- /// </summary>
- public class DigestResponse
- {
- private string _username;
- private string _realm;
- private string _nonce;
- private string _cnonce;
- private int _nonceCount;
- private string _qop;
- private string _digestUri;
- private string _response;
- private int _maxBuffer;
- private string _charset;
- private string _cipher;
- private string _authzid;
- private string _authParam;
-
- #region Properties
- //
- // Properties
- //
-
- public string Username
- {
- get { return _username; }
- set { _username = value; }
- }
-
- public string Realm
- {
- get { return _realm; }
- set { _realm = value; }
- }
-
- public string Nonce
- {
- get { return _nonce; }
- set { _nonce = value; }
- }
-
- public string Cnonce
- {
- get { return _cnonce; }
- set { _cnonce = value; }
- }
-
- public int NonceCount
- {
- get { return _nonceCount; }
- set { _nonceCount = value; }
- }
-
- public string Qop
- {
- get { return _qop; }
- set { _qop = value; }
- }
-
- public string DigestUri
- {
- get { return _digestUri; }
- set { _digestUri = value; }
- }
-
- public string Response
- {
- get { return _response; }
- set { _response = value; }
- }
-
- public int MaxBuffer
- {
- get { return _maxBuffer; }
- set { _maxBuffer = value; }
- }
-
- public string Charset
- {
- get { return _charset; }
- set { _charset = value; }
- }
-
- public string Cipher
- {
- get { return _cipher; }
- set { _cipher = value; }
- }
-
- public string Authzid
- {
- get { return _authzid; }
- set { _authzid = value; }
- }
-
- public string AuthParam
- {
- get { return _authParam; }
- set { _authParam = value; }
- }
-
- #endregion // Properties
-
-
- public override string ToString()
- {
- StringBuilder buffer = new StringBuilder();
- Pair(buffer, "username", Username, true);
- Pair(buffer, "realm", Realm, true);
- Pair(buffer, "nonce", Nonce, true);
- Pair(buffer, "cnonce", Cnonce, true);
- string nc = NonceCount.ToString("x8", CultureInfo.InvariantCulture);
- Pair(buffer, "nc", nc, false);
- Pair(buffer, "qop", Qop, false);
- Pair(buffer, "digest-uri", DigestUri, true);
- Pair(buffer, "response", Response, true);
- string maxBuffer = MaxBuffer.ToString(CultureInfo.InvariantCulture);
- Pair(buffer, "maxbuf", maxBuffer, false);
- Pair(buffer, "charset", Charset, false);
- Pair(buffer, "cipher", Cipher, false);
- Pair(buffer, "authzid", Authzid, true);
- Pair(buffer, "auth-param", AuthParam, true);
-
- return buffer.ToString().TrimEnd(',');
- }
-
- private static void Pair(StringBuilder buffer, string name, string value, bool quoted)
- {
- if ( value != null && value.Length > 0 )
- {
- buffer.Append(name);
- buffer.Append('=');
- if ( quoted )
- {
- buffer.Append('\"');
- buffer.Append(value.Replace("\"", "\\\""));
- buffer.Append('\"');
- } else
- {
- buffer.Append(value);
- }
- buffer.Append(',');
- }
- }
-
- } // class DigestResponse
-
-} // namespace Apache.Qpid.Sasl.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl/Mechanisms/ExternalSaslClient.cs b/qpid/dotnet/Qpid.Sasl/Mechanisms/ExternalSaslClient.cs
deleted file mode 100644
index fec0d2d3c2..0000000000
--- a/qpid/dotnet/Qpid.Sasl/Mechanisms/ExternalSaslClient.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Text;
-
-namespace Apache.Qpid.Sasl.Mechanisms
-{
- /// <summary>
- /// Implements the EXTERNAL authentication mechanism
- /// as outlined in RFC 2222
- /// </summary>
- public class ExternalSaslClient : SaslClient
- {
- public const string Mechanism = "EXTERNAL";
-
- public ExternalSaslClient(
- string authid, IDictionary properties,
- ISaslCallbackHandler handler)
- : base(authid, null, null, properties, handler)
- {
- }
-
- #region ISaslClient Implementation
- //
- // ISaslClient Implementation
- //
-
- public override string MechanismName
- {
- get { return Mechanism; }
- }
-
- public override bool HasInitialResponse
- {
- get { return true; }
- }
-
- public override byte[] EvaluateChallenge(byte[] challenge)
- {
- // ignore challenge
- SetComplete();
- return Encoding.UTF8.GetBytes(AuthorizationId);
- }
-
- #endregion // ISaslClient Implementation
-
- } // class ExternalSaslClient
-
-} // namespace Apache.Qpid.Sasl.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl/Mechanisms/PlainSaslClient.cs b/qpid/dotnet/Qpid.Sasl/Mechanisms/PlainSaslClient.cs
deleted file mode 100644
index 534be171b7..0000000000
--- a/qpid/dotnet/Qpid.Sasl/Mechanisms/PlainSaslClient.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Text;
-
-namespace Apache.Qpid.Sasl.Mechanisms
-{
-
- /// <summary>
- /// Implements the PLAIN authentication mechanism
- /// as outlined in RFC 4616
- /// </summary>
- public class PlainSaslClient : SaslClient
- {
- public const string Mechanism = "PLAIN";
-
- public PlainSaslClient(
- string authid, IDictionary properties,
- ISaslCallbackHandler handler)
- : base(authid, null, null, properties, handler)
- {
- }
-
- #region ISaslClient Implementation
- //
- // ISaslClient Implementation
- //
-
- public override string MechanismName
- {
- get { return Mechanism; }
- }
-
- public override bool HasInitialResponse
- {
- get { return true; }
- }
-
- public override byte[] EvaluateChallenge(byte[] challenge)
- {
- // ignore challenge
-
- NameCallback nameCB = new NameCallback();
- PasswordCallback pwdCB = new PasswordCallback();
- ISaslCallback[] callbacks = { nameCB, pwdCB };
- Handler.Handle(callbacks);
-
- string username = nameCB.Text;
- string authid = AuthorizationId;
- string passwd = pwdCB.Text;
-
- string response =
- string.Format("{0}\0{1}\0{2}", authid, username, passwd);
- SetComplete();
- return Encoding.UTF8.GetBytes(response);
- }
-
- #endregion // ISaslClient Implementation
-
- } // class PlainSaslClient
-} // namespace Apache.Qpid.Sasl.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl/Properties/AssemblyInfo.cs b/qpid/dotnet/Qpid.Sasl/Properties/AssemblyInfo.cs
deleted file mode 100644
index 5245b97d1f..0000000000
--- a/qpid/dotnet/Qpid.Sasl/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Apache.Qpid.Sasl")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Apache.Qpid.Sasl")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("27ea23e4-6f84-4a54-8f1f-5725e6d767cc")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
-[assembly: CLSCompliant(true)]
diff --git a/qpid/dotnet/Qpid.Sasl/Qpid.Sasl.csproj b/qpid/dotnet/Qpid.Sasl/Qpid.Sasl.csproj
deleted file mode 100644
index 8c1d568aa3..0000000000
--- a/qpid/dotnet/Qpid.Sasl/Qpid.Sasl.csproj
+++ /dev/null
@@ -1,73 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{1465B0EE-6452-42A6-AB73-B2F9EABEEE75}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Apache.Qpid.Sasl</RootNamespace>
- <AssemblyName>Apache.Qpid.Sasl</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\net-2.0\debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <UseVSHostingProcess>true</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/Qpid.Sasl/Sasl.cs b/qpid/dotnet/Qpid.Sasl/Sasl.cs
deleted file mode 100644
index 2f7bacb939..0000000000
--- a/qpid/dotnet/Qpid.Sasl/Sasl.cs
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Configuration;
-using System.Text;
-
-using Apache.Qpid.Sasl.Configuration;
-
-namespace Apache.Qpid.Sasl
-{
- /// <summary>
- /// Static class used to access the SASL functionality.
- /// The core SASL mechanism is described in RFC 2222.
- /// </summary>
- /// <remarks>
- /// Only client side mechanisms are implemented.
- /// <para>
- /// New client side factories can be added programatically using the
- /// RegisterClientFactory method, or through the application
- /// configuration file, like this:
- /// </para>
- /// <example><![CDATA[
- /// <configuration>
- /// <configSections>
- /// <section name="qpid.sasl" type="Apache.Qpid.Sasl.Configuration.SaslConfigurationSectionHandler, Apache.Qpid.Sasl"/>
- /// </configSections>
- ///
- /// <qpid.sasl>
- /// <clientFactories>
- /// <add type="Apache.Qpid.Sasl.Tests.TestClientFactory, Apache.Qpid.Sasl.Tests"/>
- /// </clientFactories>
- /// </qpid.sasl>
- /// </configuration>
- /// ]]></example>
- /// </remarks>
- public sealed class Sasl
- {
- private static IList _clientFactories;
-
-
- static Sasl()
- {
- SaslConfiguration config = SaslConfiguration.GetConfiguration();
- _clientFactories = config.ClientFactories;
- }
- private Sasl()
- {
- }
-
- public static ISaslClient CreateClient(
- string[] mechanisms, string authorizationId,
- string protocol, string serverName,
- IDictionary props, ISaslCallbackHandler handler
- )
- {
- ISaslClientFactory factory = FindFactory(mechanisms, props);
- if ( factory == null )
- return null;
-
- return factory.CreateClient (
- mechanisms, authorizationId,
- protocol, serverName, props, handler
- );
- }
-
- public static void RegisterClientFactory(ISaslClientFactory factory)
- {
- lock ( _clientFactories )
- {
- _clientFactories.Add(factory);
- }
- }
-
- private static ISaslClientFactory FindFactory(string[] mechanisms, IDictionary props)
- {
- lock ( _clientFactories )
- {
- foreach ( ISaslClientFactory factory in _clientFactories )
- {
- string[] mechs = factory.GetSupportedMechanisms(props);
- foreach ( string m1 in mechs )
- {
- foreach (string m2 in mechanisms )
- {
- if ( m1 == m2 )
- return factory;
- }
- }
- }
- return null;
- }
- }
- } // class Sasl
-
-} // namespace Apache.Qpid.Sasl.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl/SaslClient.cs b/qpid/dotnet/Qpid.Sasl/SaslClient.cs
deleted file mode 100644
index a22013181b..0000000000
--- a/qpid/dotnet/Qpid.Sasl/SaslClient.cs
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Globalization;
-using System.Text;
-
-namespace Apache.Qpid.Sasl
-{
- public abstract class SaslClient : ISaslClient
- {
- private bool _isComplete;
- private IDictionary _properties;
- private string _authorizationId;
- private string _serverName;
- private string _protocol;
- private ISaslCallbackHandler _handler;
-
- protected string AuthorizationId
- {
- get { return _authorizationId; }
- }
- protected string ServerName
- {
- get { return _serverName; }
- }
-
- protected string Protocol
- {
- get { return _protocol; }
- }
-
- protected ISaslCallbackHandler Handler
- {
- get { return _handler; }
- }
-
- protected IDictionary Properties
- {
- get { return _properties; }
- }
-
- protected SaslClient(
- string authid, string serverName,
- string protocol, IDictionary properties,
- ISaslCallbackHandler handler)
- {
- if ( properties == null )
- throw new ArgumentNullException("properties");
- if ( handler == null )
- throw new ArgumentNullException("handler");
-
- _authorizationId = authid==null ? "" : authid;
- _serverName = serverName;
- _protocol = protocol;
- _properties = properties;
- _handler = handler;
-
- if ( _serverName == null || _serverName.Length == 0 )
- {
- _serverName = System.Net.Dns.GetHostName();
- }
- }
-
-
-
-
- #region ISaslClient Implementation
- //
- // ISaslClient Implementation
- //
-
- public abstract string MechanismName { get; }
-
- public abstract bool HasInitialResponse { get; }
-
- public bool IsComplete
- {
- get { return _isComplete; }
- }
-
- public abstract byte[] EvaluateChallenge(byte[] challenge);
-
- public virtual object GetNegotiatedProperty(string propName)
- {
- return null;
- }
-
- public virtual byte[] Unwrap(byte[] buffer, int offset, int length)
- {
- throw new NotImplementedException();
- }
-
- public virtual byte[] Wrap(byte[] buffer, int offset, int lenght)
- {
- throw new NotImplementedException();
- }
-
- #endregion // ISaslClient Implementation
-
-
- #region Helper Methods
- //
- // Helper Methods
- //
-
- protected void SetComplete()
- {
- _isComplete = true;
- }
-
- protected static string ToHex(byte[] buffer)
- {
- StringBuilder builder = new StringBuilder();
- foreach ( byte b in buffer )
- {
- builder.Append(b.ToString("x2", CultureInfo.InvariantCulture));
- }
- return builder.ToString();
- }
-
- #endregion // Helper Methods
-
- } // class SaslClient
-
-} // namespace Apache.Qpid.Sasl.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl/SaslException.cs b/qpid/dotnet/Qpid.Sasl/SaslException.cs
deleted file mode 100644
index d770ee63fd..0000000000
--- a/qpid/dotnet/Qpid.Sasl/SaslException.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Runtime.Serialization;
-using System.Text;
-
-namespace Apache.Qpid.Sasl
-{
- /// <summary>
- /// Reports an exception during the processing of an SASL
- /// Operation. Only used for authentication-relared errors
- /// </summary>
- [Serializable]
- public class SaslException : Exception
- {
- public SaslException()
- {
- }
-
- public SaslException(string message)
- : base(message)
- {
- }
- public SaslException(string message, Exception innerException)
- : base(message, innerException)
- {
- }
-
- protected SaslException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
-
- } // class SaslException
-
-} // namespace Apache.Qpid.Sasl.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl/SaslProperties.cs b/qpid/dotnet/Qpid.Sasl/SaslProperties.cs
deleted file mode 100644
index f9ad1c68cd..0000000000
--- a/qpid/dotnet/Qpid.Sasl/SaslProperties.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections;
-using System.Text;
-
-namespace Apache.Qpid.Sasl
-{
- public sealed class SaslProperties
- {
- public const string PolicyNoPlainText = "NOPLAINTEXT";
- public const string PolicyNoActive = "NOACTIVE";
- public const string PolicyNoDictionary = "NODICTIONARY";
- public const string PolicyNoAnonymous = "NOANONYMOUS";
- public const string PolicyForwardSecrecy = "FORWARD_SECRECY";
- public const string PolicyPassCredentials = "PASS_CREDENTIALS";
-
- public const string Qop = "QOP";
- public const string Strength = "STRENGTH";
-
- } // class SaslProperties
-
-} // namespace Apache.Qpid.Sasl.Mechanisms
diff --git a/qpid/dotnet/Qpid.Sasl/default.build b/qpid/dotnet/Qpid.Sasl/default.build
deleted file mode 100644
index 57049ee2ee..0000000000
--- a/qpid/dotnet/Qpid.Sasl/default.build
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Apache.Qpid.Sasl" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="library"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.dll">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/README.txt b/qpid/dotnet/README.txt
deleted file mode 100644
index 70830a625c..0000000000
--- a/qpid/dotnet/README.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-Info
-====
-
-There are two separate .NET clients: one that implements AMQP 0-8 (and
-can communicate with the Java broker) and another that implements
-0-10 (and can communicate with the C++ broker).
-
-This README contains instructions for building the 0-8 client.
-
-Instructions for building and installing the 0-10 client are located in client-010/README.txt.
-
-Setup
-=====
-
-Essential:
-
- .NET 2.0 or later
- Ant 1.6.5 (Java build tool, http://ant.apache.org)
-
-Either:
- NAnt 0.85 - only required for builds outside Visual Studio
-OR
- Microsoft Visual Studio 2008 (VS2008)
-
-Ensure that your PATH includes ant, e.g.:
-
- $ PATH=c:\java\ant\bin:%PATH%
-
-If using nant, set up PATH to include Nant.exe, e.g.:
-
- $ set PATH=C:\dotnet\nant\bin;%PATH%
-
-If using msbuild, it is recommended to use a "Visual Studio Command Prompt"
-
-
-Building
-========
-
-Generate framing from /Qpid.Common/amqp.xml specification file by running this script:
-
- $ build-framing.bat
-
-Alternatively, just switch to /Qpid.Common and run "ant" there.
-
-You can build from Visual Studio 2008 or from the command-line by running msbuild.
-
-The script build-msbuild.bat provides some standard options to do a full build.
-
-If you are using nant, the script build-nant.bat contains standard arguments that do a full build.
-
-To build for Mono on Linux (to bin/mono-2.0) the build-mono shell script is provided.
-
-Running the Examples
-====================
-
-The tree contains two paired examples that demonstrate some of the features of the library:
-Producer/Consumer and TopicPublisher/TopicListener.
-
-To run on Mono on Linux (cd to bin/mono-2.0) and execute
-
-mono Consumer.exe (in one window , and
-mono Producer.exe in another window)
-
-or:
-
-mono TopicListener.exe (in one window , and
-mono TopicPublisher.exe in another window)
-
-Both examples assume you have a broker running on localhost:5672. You must run Consumer/TopicListener
-before Producer/TopicPublisher in order that queue is created before the first message is sent.
-
-The source code for the examples is in directory Qpid.Client.Tests/interop.
-
-Releasing
-=========
-
-nant can be used to create a release zip archive. A script is provided:
-
-For .NET 2.0
-
- $ release net-2.0
-
-Generates ./bin/net-2.0/release/Qpid.NET-net-2.0-yyyyMMdd.zip
-
-For Mono
-
- $ release mono-2.0
-
-Generates ./bin/mono-2.0/release/Qpid.NET-mono-2.0-yyyyMMdd.zip
-
diff --git a/qpid/dotnet/RELEASE_NOTES.txt b/qpid/dotnet/RELEASE_NOTES.txt
deleted file mode 100644
index e824757b42..0000000000
--- a/qpid/dotnet/RELEASE_NOTES.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-Apache Qpid .NET 0.8 Release Notes
--------------------------------------------
-
-The Qpid 0.8 release contains seperate clients that support the AMQP
-0-10 and AMQP 0-8 protocols.
-
-Known Issues/Outstanding Work
------------------------------
-
-You can view the outstanding task list for Qpid by visiting our JIRA:
-http://issues.apache.org/jira/browse/QPID
diff --git a/qpid/dotnet/TestClient/Program.cs b/qpid/dotnet/TestClient/Program.cs
deleted file mode 100644
index f4b2db568e..0000000000
--- a/qpid/dotnet/TestClient/Program.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace TopicListener
-{
- class Program
- {
- static void Main(string[] args)
- {
- Apache.Qpid.Integration.Tests.interop.TestClient.Main(args);
- }
- }
-}
diff --git a/qpid/dotnet/TestClient/Properties/AssemblyInfo.cs b/qpid/dotnet/TestClient/Properties/AssemblyInfo.cs
deleted file mode 100644
index e8ffbc5aba..0000000000
--- a/qpid/dotnet/TestClient/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("TestClient")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("TestClient")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("1c2db1cd-239f-495a-b6b4-c815ea534489")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/TestClient/TestClient.csproj b/qpid/dotnet/TestClient/TestClient.csproj
deleted file mode 100644
index cc7ab37657..0000000000
--- a/qpid/dotnet/TestClient/TestClient.csproj
+++ /dev/null
@@ -1,115 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{6E0374D9-99BE-4D4F-B41D-B227E37E04C6}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>TestClient</RootNamespace>
- <AssemblyName>TestClient</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\net-2.0\debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\net-2.0\release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Qpid.Buffer.Tests\Qpid.Buffer.Tests.csproj">
- <Project>{74640962-99D0-4D06-B57A-9CD66517CF52}</Project>
- <Name>Qpid.Buffer.Tests</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Buffer\Qpid.Buffer.csproj">
- <Project>{44384DF2-B0A4-4580-BDBC-EE4BAA87D995}</Project>
- <Name>Qpid.Buffer</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Client.Tests\Qpid.Client.Tests.csproj">
- <Project>{BA1B0032-4CE6-40DD-A2DC-119F0FFA0A1D}</Project>
- <Name>Qpid.Client.Tests</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Client\Qpid.Client.csproj">
- <Project>{68987C05-3768-452C-A6FC-6BA1D372852F}</Project>
- <Name>Qpid.Client</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Codec\Qpid.Codec.csproj">
- <Project>{22D0D0C2-77AF-4DE3-B456-7FF3893F9F88}</Project>
- <Name>Qpid.Codec</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Common.Tests\Qpid.Common.Tests.csproj">
- <Project>{F83624B0-762B-4D82-900D-FF4C1B36E36E}</Project>
- <Name>Qpid.Common.Tests</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Common\Qpid.Common.csproj">
- <Project>{77064C42-24D2-4CEB-9EA2-0EF481A43205}</Project>
- <Name>Qpid.Common</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Messaging\Qpid.Messaging.csproj">
- <Project>{6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}</Project>
- <Name>Qpid.Messaging</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Sasl.Tests\Qpid.Sasl.Tests.csproj">
- <Project>{587B3520-EBB9-41ED-B019-E96116B651CE}</Project>
- <Name>Qpid.Sasl.Tests</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Sasl\Qpid.Sasl.csproj">
- <Project>{1465B0EE-6452-42A6-AB73-B2F9EABEEE75}</Project>
- <Name>Qpid.Sasl</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/TestClient/default.build b/qpid/dotnet/TestClient/default.build
deleted file mode 100644
index ce1114425e..0000000000
--- a/qpid/dotnet/TestClient/default.build
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="TestClient" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- unsafe="true"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}\Apache.Qpid.Integration.Tests.dll"/>
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/TopicListener/Program.cs b/qpid/dotnet/TopicListener/Program.cs
deleted file mode 100644
index 14626d6134..0000000000
--- a/qpid/dotnet/TopicListener/Program.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace TopicListener
-{
- class Program
- {
- static void Main(string[] args)
- {
- Apache.Qpid.Client.Tests.interop.TopicListener.Main(args);
- }
- }
-}
diff --git a/qpid/dotnet/TopicListener/Properties/AssemblyInfo.cs b/qpid/dotnet/TopicListener/Properties/AssemblyInfo.cs
deleted file mode 100644
index 1fe9bb8249..0000000000
--- a/qpid/dotnet/TopicListener/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("TopicListener")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("TopicListener")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("1c2db1cd-239f-495a-b6b4-c815ea534489")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/TopicListener/TopicListener.csproj b/qpid/dotnet/TopicListener/TopicListener.csproj
deleted file mode 100644
index 46da42ea61..0000000000
--- a/qpid/dotnet/TopicListener/TopicListener.csproj
+++ /dev/null
@@ -1,115 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{9A112DF2-146F-4CF4-919B-9D3BE7D088E9}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>TopicListener</RootNamespace>
- <AssemblyName>TopicListener</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\net-2.0\debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\net-2.0\release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Qpid.Buffer.Tests\Qpid.Buffer.Tests.csproj">
- <Project>{74640962-99D0-4D06-B57A-9CD66517CF52}</Project>
- <Name>Qpid.Buffer.Tests</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Buffer\Qpid.Buffer.csproj">
- <Project>{44384DF2-B0A4-4580-BDBC-EE4BAA87D995}</Project>
- <Name>Qpid.Buffer</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Client.Tests\Qpid.Client.Tests.csproj">
- <Project>{BA1B0032-4CE6-40DD-A2DC-119F0FFA0A1D}</Project>
- <Name>Qpid.Client.Tests</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Client\Qpid.Client.csproj">
- <Project>{68987C05-3768-452C-A6FC-6BA1D372852F}</Project>
- <Name>Qpid.Client</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Codec\Qpid.Codec.csproj">
- <Project>{22D0D0C2-77AF-4DE3-B456-7FF3893F9F88}</Project>
- <Name>Qpid.Codec</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Common.Tests\Qpid.Common.Tests.csproj">
- <Project>{F83624B0-762B-4D82-900D-FF4C1B36E36E}</Project>
- <Name>Qpid.Common.Tests</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Common\Qpid.Common.csproj">
- <Project>{77064C42-24D2-4CEB-9EA2-0EF481A43205}</Project>
- <Name>Qpid.Common</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Messaging\Qpid.Messaging.csproj">
- <Project>{6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}</Project>
- <Name>Qpid.Messaging</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Sasl.Tests\Qpid.Sasl.Tests.csproj">
- <Project>{587B3520-EBB9-41ED-B019-E96116B651CE}</Project>
- <Name>Qpid.Sasl.Tests</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Sasl\Qpid.Sasl.csproj">
- <Project>{1465B0EE-6452-42A6-AB73-B2F9EABEEE75}</Project>
- <Name>Qpid.Sasl</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/TopicListener/default.build b/qpid/dotnet/TopicListener/default.build
deleted file mode 100644
index f9b0f97094..0000000000
--- a/qpid/dotnet/TopicListener/default.build
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="TopicListener" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- unsafe="true"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}\Apache.Qpid.Client.Tests.dll"/>
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/TopicPublisher/Program.cs b/qpid/dotnet/TopicPublisher/Program.cs
deleted file mode 100644
index b5209b9317..0000000000
--- a/qpid/dotnet/TopicPublisher/Program.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-namespace TopicPublisher
-{
- class Program
- {
- static void Main(string[] args)
- {
- Apache.Qpid.Client.Tests.interop.TopicPublisher.Main(args);
- }
- }
-}
diff --git a/qpid/dotnet/TopicPublisher/Properties/AssemblyInfo.cs b/qpid/dotnet/TopicPublisher/Properties/AssemblyInfo.cs
deleted file mode 100644
index 051b34ee37..0000000000
--- a/qpid/dotnet/TopicPublisher/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("TopicPublisher")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("TopicPublisher")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("93fa1c32-c0f8-47e5-b167-dc581e33eb9b")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/TopicPublisher/TopicPublisher.csproj b/qpid/dotnet/TopicPublisher/TopicPublisher.csproj
deleted file mode 100644
index fbbf77fb8e..0000000000
--- a/qpid/dotnet/TopicPublisher/TopicPublisher.csproj
+++ /dev/null
@@ -1,111 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{A06C9FFD-22FF-4654-856D-897C230978AF}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>TopicPublisher</RootNamespace>
- <AssemblyName>TopicPublisher</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\bin\net-2.0\debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\bin\net-2.0\release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Qpid.Buffer\Qpid.Buffer.csproj">
- <Project>{44384DF2-B0A4-4580-BDBC-EE4BAA87D995}</Project>
- <Name>Qpid.Buffer</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Client.Tests\Qpid.Client.Tests.csproj">
- <Project>{BA1B0032-4CE6-40DD-A2DC-119F0FFA0A1D}</Project>
- <Name>Qpid.Client.Tests</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Client\Qpid.Client.csproj">
- <Project>{68987C05-3768-452C-A6FC-6BA1D372852F}</Project>
- <Name>Qpid.Client</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Codec\Qpid.Codec.csproj">
- <Project>{22D0D0C2-77AF-4DE3-B456-7FF3893F9F88}</Project>
- <Name>Qpid.Codec</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Common.Tests\Qpid.Common.Tests.csproj">
- <Project>{F83624B0-762B-4D82-900D-FF4C1B36E36E}</Project>
- <Name>Qpid.Common.Tests</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Common\Qpid.Common.csproj">
- <Project>{77064C42-24D2-4CEB-9EA2-0EF481A43205}</Project>
- <Name>Qpid.Common</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Messaging\Qpid.Messaging.csproj">
- <Project>{6688F826-C58E-4C1B-AA1F-22AFAB4B7D07}</Project>
- <Name>Qpid.Messaging</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Sasl.Tests\Qpid.Sasl.Tests.csproj">
- <Project>{587B3520-EBB9-41ED-B019-E96116B651CE}</Project>
- <Name>Qpid.Sasl.Tests</Name>
- </ProjectReference>
- <ProjectReference Include="..\Qpid.Sasl\Qpid.Sasl.csproj">
- <Project>{1465B0EE-6452-42A6-AB73-B2F9EABEEE75}</Project>
- <Name>Qpid.Sasl</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/TopicPublisher/default.build b/qpid/dotnet/TopicPublisher/default.build
deleted file mode 100644
index 9b01c2a1bc..0000000000
--- a/qpid/dotnet/TopicPublisher/default.build
+++ /dev/null
@@ -1,47 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="TopicPublisher" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- unsafe="true"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}\Apache.Qpid.Client.Tests.dll"/>
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/build-framing.bat b/qpid/dotnet/build-framing.bat
deleted file mode 100644
index ae9bc749a9..0000000000
--- a/qpid/dotnet/build-framing.bat
+++ /dev/null
@@ -1,23 +0,0 @@
-@REM
-@REM
-@REM Licensed to the Apache Software Foundation (ASF) under one
-@REM or more contributor license agreements. See the NOTICE file
-@REM distributed with this work for additional information
-@REM regarding copyright ownership. The ASF licenses this file
-@REM to you under the Apache License, Version 2.0 (the
-@REM "License"); you may not use this file except in compliance
-@REM with the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing,
-@REM software distributed under the License is distributed on an
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@REM KIND, either express or implied. See the License for the
-@REM specific language governing permissions and limitations
-@REM under the License.
-@REM
-@REM
-
-cd Qpid.Common
-ant
diff --git a/qpid/dotnet/build-msbuild.bat b/qpid/dotnet/build-msbuild.bat
deleted file mode 100644
index 1fe4b5d64c..0000000000
--- a/qpid/dotnet/build-msbuild.bat
+++ /dev/null
@@ -1,22 +0,0 @@
-@REM
-@REM
-@REM Licensed to the Apache Software Foundation (ASF) under one
-@REM or more contributor license agreements. See the NOTICE file
-@REM distributed with this work for additional information
-@REM regarding copyright ownership. The ASF licenses this file
-@REM to you under the Apache License, Version 2.0 (the
-@REM "License"); you may not use this file except in compliance
-@REM with the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing,
-@REM software distributed under the License is distributed on an
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@REM KIND, either express or implied. See the License for the
-@REM specific language governing permissions and limitations
-@REM under the License.
-@REM
-@REM
-
-MSBuild.exe Qpid.NET.sln /p:Configuration=Release /t:rebuild
diff --git a/qpid/dotnet/build-nant.bat b/qpid/dotnet/build-nant.bat
deleted file mode 100644
index 785450a9f7..0000000000
--- a/qpid/dotnet/build-nant.bat
+++ /dev/null
@@ -1,22 +0,0 @@
-@REM
-@REM
-@REM Licensed to the Apache Software Foundation (ASF) under one
-@REM or more contributor license agreements. See the NOTICE file
-@REM distributed with this work for additional information
-@REM regarding copyright ownership. The ASF licenses this file
-@REM to you under the Apache License, Version 2.0 (the
-@REM "License"); you may not use this file except in compliance
-@REM with the License. You may obtain a copy of the License at
-@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM Unless required by applicable law or agreed to in writing,
-@REM software distributed under the License is distributed on an
-@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-@REM KIND, either express or implied. See the License for the
-@REM specific language governing permissions and limitations
-@REM under the License.
-@REM
-@REM
-
-nant -t:net-2.0
diff --git a/qpid/dotnet/client-010/App.config b/qpid/dotnet/client-010/App.config
deleted file mode 100644
index 36b4ffab3e..0000000000
--- a/qpid/dotnet/client-010/App.config
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<configuration>
- <appSettings>
- <add key="Username" value="guest"/>
- <add key="Password" value="guest123"/>
- <add key="Host" value="localhost"/>
- <add key="Port" value="5672"/>
- <add key="VirtualHost" value="test"/>
-
- <!-- <add key="ProcessorAssembly" value="C:\Project\qpid\dotnet\client-010\addins\ExcelAddInMessageProcessor\bin\Debug\ExcelAddInMessageProcessor.dll"/>
- <add key="ProcessorClass" value="ExcelAddInMessageProcessor.Processor"/> -->
- </appSettings>
-</configuration>
diff --git a/qpid/dotnet/client-010/LICENSE.txt b/qpid/dotnet/client-010/LICENSE.txt
deleted file mode 100644
index 981d2f83c3..0000000000
--- a/qpid/dotnet/client-010/LICENSE.txt
+++ /dev/null
@@ -1,757 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-
-=========================================================================
-== Saxon XSLT License ==
-=========================================================================
-
-Mozilla Public License Version 1.0
-
-1. Definitions.
-
- 1.1. "Contributor" means each entity that creates or contributes
- to the creation of Modifications.
-
- 1.2. "Contributor Version" means the combination of the
- Original Code, prior Modifications used by a Contributor, and the
- Modifications made by that particular Contributor.
-
- 1.3. "Covered Code" means the Original Code or Modifications
- or the combination of the Original Code and Modifications, in each case
- including portions thereof.
-
- 1.4. "Electronic Distribution Mechanism" means a mechanism
- generally accepted in the software development community for the
- electronic transfer of data.
-
- 1.5. "Executable" means Covered Code in any form other than
- Source Code.
-
- 1.6. "Initial Developer" means the individual or entity
- identified as the Initial Developer in the Source Code notice required by
- Exhibit A.
-
- 1.7. "Larger Work" means a work which combines Covered Code
- or portions thereof with code not governed by the terms of this License.
-
- 1.8. "License" means this document.
-
- 1.9. "Modifications" means any addition to or deletion from
- the substance or structure of either the Original Code or any previous
- Modifications. When Covered Code is released as a series of files, a
- Modification is:
-
- A. Any addition to or deletion from the contents of a file
- containing Original Code or previous Modifications.
-
- B. Any new file that contains any part of the Original
- Code or previous Modifications.
-
- 1.10. "Original Code" means Source Code of computer software
- code which is described in the Source Code notice required by Exhibit
- A as Original Code, and which, at the time of its release under this
- License is not already Covered Code governed by this License.
-
- 1.11. "Source Code" means the preferred form of the Covered
- Code for making modifications to it, including all modules it contains,
- plus any associated interface definition files, scripts used to control
- compilation and installation of an Executable, or a list of source code
- differential comparisons against either the Original Code or another well
- known, available Covered Code of the Contributor's choice. The Source
- Code can be in a compressed or archival form, provided the appropriate
- decompression or de-archiving software is widely available for no charge.
-
- 1.12. "You" means an individual or a legal entity exercising
- rights under, and complying with all of the terms of, this License or a
- future version of this License issued under Section 6.1. For legal
- entities, "You" includes any entity which controls, is controlled by,
- or is under common control with You. For purposes of this definition,
- "control" means (a) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or otherwise,
- or (b) ownership of fifty percent (50%) or more of the outstanding shares
- or beneficial ownership of such entity.
-
-2. Source Code License.
-
- 2.1. The Initial Developer Grant.
-
-
- The Initial Developer hereby grants You a world-wide, royalty-free,
- non-exclusive license, subject to third party intellectual property
- claims:
-
- (a) to use, reproduce, modify, display, perform, sublicense
- and distribute the Original Code (or portions thereof) with or
- without Modifications, or as part of a Larger Work; and
-
- (b) under patents now or hereafter owned or controlled by
- Initial Developer, to make, have made, use and sell ("Utilize") the
- Original Code (or portions thereof), but solely to the extent that
- any such patent is reasonably necessary to enable You to Utilize the
- Original Code (or portions thereof) and not to any greater extent
- that may be necessary to Utilize further Modifications or
- combinations.
-
- 2.2. Contributor Grant.
-
-
- Each Contributor hereby grants You a world-wide, royalty-free,
- non-exclusive license, subject to third party intellectual property
- claims:
-
- (a) to use, reproduce, modify, display, perform, sublicense and
- distribute the Modifications created by such Contributor (or portions
- thereof) either on an unmodified basis, with other Modifications, as
- Covered Code or as part of a Larger Work; and
-
- (b) under patents now or hereafter owned or controlled by
- Contributor, to Utilize the Contributor Version (or portions thereof),
- but solely to the extent that any such patent is reasonably necessary to
- enable You to Utilize the Contributor Version (or portions thereof), and
- not to any greater extent that may be necessary to Utilize further
- Modifications or combinations.
-
-3. Distribution Obligations.
-
- 3.1. Application of License.
-
-
- The Modifications which You create or to which You contribute are
- governed by the terms of this License, including without limitation
- Section 2.2. The Source Code version of Covered Code may be
- distributed only under the terms of this License or a future version of
- this License released under Section 6.1, and You must include a
- copy of this License with every copy of the Source Code You
- distribute. You may not offer or impose any terms on any Source Code
- version that alters or restricts the applicable version of this License
- or the recipients' rights hereunder. However, You may include an
- additional document offering the additional rights described in Section
- 3.5.
-
- 3.2. Availability of Source Code.
-
-
- Any Modification which You create or to which You contribute must be
- made available in Source Code form under the terms of this License either
- on the same media as an Executable version or via an accepted Electronic
- Distribution Mechanism to anyone to whom you made an Executable version
- available; and if made available via Electronic Distribution Mechanism,
- must remain available for at least twelve (12) months after the date it
- initially became available, or at least six (6) months after a subsequent
- version of that particular Modification has been made available to such
- recipients. You are responsible for ensuring that the Source Code version
- remains available even if the Electronic Distribution Mechanism is
- maintained by a third party.
-
- 3.3. Description of Modifications.
-
-
- You must cause all Covered Code to which you contribute to contain a
- file documenting the changes You made to create that Covered Code and the
- date of any change. You must include a prominent statement that the
- Modification is derived, directly or indirectly, from Original Code
- provided by the Initial Developer and including the name of the Initial
- Developer in (a) the Source Code, and (b) in any notice in an Executable
- version or related documentation in which You describe the origin or
- ownership of the Covered Code.
-
- 3.4. Intellectual Property Matters
-
- (a) Third Party Claims.
-
-
- If You have knowledge that a party claims an intellectual
- property right in particular functionality or code (or its
- utilization under this License), you must include a text file with
- the source code distribution titled "LEGAL" which describes the
- claim and the party making the claim in sufficient detail that a
- recipient will know whom to contact. If you obtain such knowledge
- after You make Your Modification available as described in Section
- 3.2, You shall promptly modify the LEGAL file in all copies
- You make available thereafter and shall take other steps (such as
- notifying appropriate mailing lists or newsgroups) reasonably
- calculated to inform those who received the Covered Code that new
- knowledge has been obtained.
-
- (b) Contributor APIs.
-
-
- If Your Modification is an application programming interface and
- You own or control patents which are reasonably necessary to
- implement that API, you must also include this information in the
- LEGAL file.
-
- 3.5. Required Notices.
-
-
- You must duplicate the notice in Exhibit A in each file of the
- Source Code, and this License in any documentation for the Source Code,
- where You describe recipients' rights relating to Covered Code. If You
- created one or more Modification(s), You may add your name as a
- Contributor to the notice described in Exhibit A. If it is not
- possible to put such notice in a particular Source Code file due to its
- structure, then you must include such notice in a location (such as a
- relevant directory file) where a user would be likely to look for such a
- notice. You may choose to offer, and to charge a fee for, warranty,
- support, indemnity or liability obligations to one or more recipients of
- Covered Code. However, You may do so only on Your own behalf, and not on
- behalf of the Initial Developer or any Contributor. You must make it
- absolutely clear than any such warranty, support, indemnity or liability
- obligation is offered by You alone, and You hereby agree to indemnify the
- Initial Developer and every Contributor for any liability incurred by the
- Initial Developer or such Contributor as a result of warranty, support,
- indemnity or liability terms You offer.
-
- 3.6. Distribution of Executable Versions.
-
-
- You may distribute Covered Code in Executable form only if the
- requirements of Section 3.1-3.5 have been met for that Covered
- Code, and if You include a notice stating that the Source Code version of
- the Covered Code is available under the terms of this License, including
- a description of how and where You have fulfilled the obligations of
- Section 3.2. The notice must be conspicuously included in any
- notice in an Executable version, related documentation or collateral in
- which You describe recipients' rights relating to the Covered Code. You
- may distribute the Executable version of Covered Code under a license of
- Your choice, which may contain terms different from this License,
- provided that You are in compliance with the terms of this License and
- that the license for the Executable version does not attempt to limit or
- alter the recipient's rights in the Source Code version from the rights
- set forth in this License. If You distribute the Executable version under
- a different license You must make it absolutely clear that any terms
- which differ from this License are offered by You alone, not by the
- Initial Developer or any Contributor. You hereby agree to indemnify the
- Initial Developer and every Contributor for any liability incurred by the
- Initial Developer or such Contributor as a result of any such terms You
- offer.
-
- 3.7. Larger Works.
-
-
- You may create a Larger Work by combining Covered Code with other
- code not governed by the terms of this License and distribute the Larger
- Work as a single product. In such a case, You must make sure the
- requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
- If it is impossible for You to comply with any of the terms of this
- License with respect to some or all of the Covered Code due to statute or
- regulation then You must: (a) comply with the terms of this License to
- the maximum extent possible; and (b) describe the limitations and the
- code they affect. Such description must be included in the LEGAL file
- described in Section 3.4 and must be included with all
- distributions of the Source Code. Except to the extent prohibited by
- statute or regulation, such description must be sufficiently detailed for
- a recipient of ordinary skill
- to be able to understand it.
-
-5. Application of this License.
-
- This License applies to code to which the Initial Developer has attached
- the notice in Exhibit A, and to related Covered Code.
-
-6. Versions of the License.
-
- 6.1. New Versions.
-
-
- Netscape Communications Corporation ("Netscape") may publish
- revised and/or new versions of the License from time to time. Each
- version will be given a distinguishing version number.
-
- 6.2. Effect of New Versions.
-
-
- Once Covered Code has been published under a particular version of
- the License, You may always continue to use it under the terms of that
- version. You may also choose to use such Covered Code under the terms of
- any subsequent version of the License published by Netscape. No one other
- than Netscape has the right to modify the terms applicable to Covered
- Code created under this License.
-
- 6.3. Derivative Works.
-
-
- If you create or use a modified version of this License (which you
- may only do in order to apply it to code which is not already Covered
- Code governed by this License), you must (a) rename Your license so that
- the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "NPL"
- or any confusingly similar phrase do not appear anywhere in your license
- and (b) otherwise make it clear that your version of the license contains
- terms which differ from the Mozilla Public License and Netscape Public
- License. (Filling in the name of the Initial Developer, Original Code or
- Contributor in the notice described in Exhibit A shall not of
- themselves be deemed to be modifications of this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
- COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS,
- MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE
- RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH
- YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE
- INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY
- NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY
- CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE
- IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
- This License and the rights granted hereunder will terminate
- automatically if You fail to comply with terms herein and fail to cure
- such breach within 30 days of becoming aware of the breach. All
- sublicenses to the Covered Code which are properly granted shall survive
- any termination of this License. Provisions which, by their nature, must
- remain in effect beyond the termination of this License shall survive.
-
-9. LIMITATION OF LIABILITY.
-
- UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING
- NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY
- OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF
- ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY
- INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER
- INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK
- STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
- COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED
- OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL
- NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH
- PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH
- LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION
- OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION
- MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
- The Covered Code is a "commercial item," as that term is defined in 48
- C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software"
- and "commercial computer software documentation," as such terms are
- used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212
- and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all
- U.S. Government End Users acquire Covered Code with only those rights set
- forth herein.
-
-11. MISCELLANEOUS.
-
- This License represents the complete agreement concerning subject matter
- hereof. If any provision of this License is held to be unenforceable,
- such provision shall be reformed only to the extent necessary to make it
- enforceable. This License shall be governed by California law provisions
- (except to the extent applicable law, if any, provides otherwise),
- excluding its conflict-of-law provisions. With respect to disputes in
- which at least one party is a citizen of, or an entity chartered or
- registered to do business in, the United States of America: (a) unless
- otherwise agreed in writing, all disputes relating to this License
- (excepting any dispute relating to intellectual property rights) shall be
- subject to final and binding arbitration, with the losing party paying
- all costs of arbitration; (b) any arbitration relating to this Agreement
- shall be held in Santa Clara County, California, under the auspices of
- JAMS/EndDispute; and (c) any litigation relating to this Agreement shall
- be subject to the jurisdiction of the Federal Courts of the Northern
- District of California, with venue lying in Santa Clara County,
- California, with the losing party responsible for costs, including
- without limitation, court costs and reasonable attorneys fees and
- expenses. The application of the United Nations Convention on Contracts
- for the International Sale of Goods is expressly excluded. Any law or
- regulation which provides that the language of a contract shall be
- construed against the drafter shall not apply to this License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
- Except in cases where another Contributor has failed to comply with
- Section 3.4, You are responsible for damages arising, directly or
- indirectly, out of Your utilization of rights under this License, based
- on the number of copies of Covered Code you made available, the revenues
- you received from utilizing such rights, and other relevant factors. You
- agree to work with affected parties to distribute responsibility on an
- equitable basis.
-
-EXHIBIT A.
-
- "The contents of this file are subject to the Mozilla Public License
- Version 1.0 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- License for the specific language governing rights and limitations under
- the License.
-
- The Original Code is ______________________________________.
-
- The Initial Developer of the Original Code is
- ________________________. Portions created by ______________________ are
- Copyright (C) ______ _______________________. All Rights Reserved.
-
- Contributor(s): ______________________________________."
-
-
-=========================================================================
-== Nunit License ==
-=========================================================================
-Copyright (c) 2002 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov
-Copyright (c) 2000-2002 Philip A. Craig
-
-This software is provided 'as-is', without any express or implied
-warranty. In no event will the authors be held liable for any damages
-arising from the use of this software.
-
-Permission is granted to anyone to use this software for any purpose,
-including commercial applications, and to alter it and redistribute it
-freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
-
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
- 3. This notice may not be removed or altered from any source
- distribution.
-
-=========================================================================
-== Mentalis Security LibraryLicense ==
-=========================================================================
-
-Source Code License
-
-Copyright © 2002-2007, The Mentalis.org Team
-All rights reserved.
-http://www.mentalis.org/
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
-- Neither the name of the Mentalis.org Team, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-=========================================================================
-== AMQP License ==
-=========================================================================
-
- Copyright Notice
- ================
- (c) Copyright JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc.,
- iMatix Corporation, IONA\ufffd Technologies, Red Hat, Inc.,
- TWIST Process Innovations, and 29West Inc. 2006. All rights reserved.
-
- License
- =======
- JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc., iMatix
- Corporation, IONA\ufffd Technologies, Red Hat, Inc., TWIST Process Innovations, and
- 29West Inc. (collectively, the "Authors") each hereby grants to you a worldwide,
- perpetual, royalty-free, nontransferable, nonexclusive license to
- (i) copy, display, and implement the Advanced Messaging Queue Protocol
- ("AMQP") Specification and (ii) the Licensed Claims that are held by
- the Authors, all for the purpose of implementing the Advanced Messaging
- Queue Protocol Specification. Your license and any rights under this
- Agreement will terminate immediately without notice from
- any Author if you bring any claim, suit, demand, or action related to
- the Advanced Messaging Queue Protocol Specification against any Author.
- Upon termination, you shall destroy all copies of the Advanced Messaging
- Queue Protocol Specification in your possession or control.
-
- As used hereunder, "Licensed Claims" means those claims of a patent or
- patent application, throughout the world, excluding design patents and
- design registrations, owned or controlled, or that can be sublicensed
- without fee and in compliance with the requirements of this
- Agreement, by an Author or its affiliates now or at any
- future time and which would necessarily be infringed by implementation
- of the Advanced Messaging Queue Protocol Specification. A claim is
- necessarily infringed hereunder only when it is not possible to avoid
- infringing it because there is no plausible non-infringing alternative
- for implementing the required portions of the Advanced Messaging Queue
- Protocol Specification. Notwithstanding the foregoing, Licensed Claims
- shall not include any claims other than as set forth above even if
- contained in the same patent as Licensed Claims; or that read solely
- on any implementations of any portion of the Advanced Messaging Queue
- Protocol Specification that are not required by the Advanced Messaging
- Queue Protocol Specification, or that, if licensed, would require a
- payment of royalties by the licensor to unaffiliated third parties.
- Moreover, Licensed Claims shall not include (i) any enabling technologies
- that may be necessary to make or use any Licensed Product but are not
- themselves expressly set forth in the Advanced Messaging Queue Protocol
- Specification (e.g., semiconductor manufacturing technology, compiler
- technology, object oriented technology, networking technology, operating
- system technology, and the like); or (ii) the implementation of other
- published standards developed elsewhere and merely referred to in the
- body of the Advanced Messaging Queue Protocol Specification, or
- (iii) any Licensed Product and any combinations thereof the purpose or
- function of which is not required for compliance with the Advanced
- Messaging Queue Protocol Specification. For purposes of this definition,
- the Advanced Messaging Queue Protocol Specification shall be deemed to
- include both architectural and interconnection requirements essential
- for interoperability and may also include supporting source code artifacts
- where such architectural, interconnection requirements and source code
- artifacts are expressly identified as being required or documentation to
- achieve compliance with the Advanced Messaging Queue Protocol Specification.
-
- As used hereunder, "Licensed Products" means only those specific portions
- of products (hardware, software or combinations thereof) that implement
- and are compliant with all relevant portions of the Advanced Messaging
- Queue Protocol Specification.
-
- The following disclaimers, which you hereby also acknowledge as to any
- use you may make of the Advanced Messaging Queue Protocol Specification:
-
- THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION IS PROVIDED "AS IS,"
- AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
- IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE
- CONTENTS OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION ARE
- SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF THE ADVANCED
- MESSAGING QUEUE PROTOCOL SPECIFICATION WILL NOT INFRINGE ANY THIRD PARTY
- PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
- THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL,
- INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY
- USE, IMPLEMENTATION OR DISTRIBUTION OF THE ADVANCED MESSAGING QUEUE
- PROTOCOL SPECIFICATION.
-
- The name and trademarks of the Authors may NOT be used in any manner,
- including advertising or publicity pertaining to the Advanced Messaging
- Queue Protocol Specification or its contents without specific, written
- prior permission. Title to copyright in the Advanced Messaging Queue
- Protocol Specification will at all times remain with the Authors.
-
- No other rights are granted by implication, estoppel or otherwise.
-
- Upon termination of your license or rights under this Agreement, you
- shall destroy all copies of the Advanced Messaging Queue Protocol
- Specification in your possession or control.
-
- Trademarks
- ==========
- "JPMorgan", "JPMorgan Chase", "Chase", the JPMorgan Chase logo and the
- Octagon Symbol are trademarks of JPMorgan Chase & Co.
-
- IMATIX and the iMatix logo are trademarks of iMatix Corporation sprl.
-
- IONA, IONA Technologies, and the IONA logos are trademarks of IONA
- Technologies PLC and/or its subsidiaries.
-
- LINUX is a trademark of Linus Torvalds. RED HAT and JBOSS are registered
- trademarks of Red Hat, Inc. in the US and other countries.
-
- Java, all Java-based trademarks and OpenOffice.org are trademarks of
- Sun Microsystems, Inc. in the United States, other countries, or both.
-
- Other company, product, or service names may be trademarks or service
- marks of others.
-
- Links to full AMQP specification:
- =================================
- http://www.envoytech.org/spec/amq/
- http://www.iona.com/opensource/amqp/
- http://www.redhat.com/solutions/specifications/amqp/
- http://www.twiststandards.org/tiki-index.php?page=AMQ
- http://www.imatix.com/amqp
diff --git a/qpid/dotnet/client-010/NOTICE.txt b/qpid/dotnet/client-010/NOTICE.txt
deleted file mode 100644
index 0b22ed3ab2..0000000000
--- a/qpid/dotnet/client-010/NOTICE.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-=========================================================================
-== NOTICE file corresponding to the section 4 d of ==
-== the Apache License, Version 2.0, ==
-== in this case for the Apache Ant distribution. ==
-=========================================================================
-
-Apache Qpid.NET
-Copyright 2006 The Apache Software Foundation
-
-This product includes software developed by
-The Apache Software Foundation (http://www.apache.org/).
-
-This product also includes software developed by:
-
- - The SAXON XSLT Processor from Michael Kay distributed under the Mozilla
- Public License v1.0, which is available for download at
- http://saxon.sourceforge.net/
-
- - The nunit library, Copyright © 2002 James W. Newkirk, Michael C. Two,
- Alexei A. Vorontsov or Copyright © 2000-2002 Philip A. Craig. Available
- under terms based on the zlib/libpng licence. Available from
- http://www.nunit.org/
-
- - The Mentalis Security Library, Copyright © 2002-2006, , The Mentalis.org Team
- under tterms based on the BSD license (http://www.mentalis.org/site/license.qpx).
- Available from http://www.mentalis.org/soft/projects/seclib/
-
-This product includes software, Apache Log4Net
-(http://logging.apache.org/log4net)
-License: Apache 2.0 License (http://www.apache.org/licenses/LICENSE-2.0)
-
-
diff --git a/qpid/dotnet/client-010/README.txt b/qpid/dotnet/client-010/README.txt
deleted file mode 100644
index 74d54a9786..0000000000
--- a/qpid/dotnet/client-010/README.txt
+++ /dev/null
@@ -1,69 +0,0 @@
-Info
-====
-
-AMQP 0.10 Native .NET client supporting WCF and xcel
-
-In order to build this client from the sources you'll need the following folders :
-- <project home>/java/lib
-- <project home>/python
-- <project home>/specs
-
-
-Setup
-=====
-
-Install:
- Microsoft Visual Studio 2008 (VS2008). It's also possible to build with vs2005 by creating a new solution and adding Client.csproj
- NAnt 0.85 - only required for builds outside VS2008 (.net 1.1, .net 2.0, mono 2.0)
- Ant 1.6.5 (requires Java)
- Cygwin (or alternatively build via cmd but alter instructions below accordingly)
-
-Set up PATH to include Nant.exe:
-
- $ PATH=/cygdrive/c/WINDOWS/Microsoft.NET/Framework/v2.0.50727:$PATH
-
-Set up PATH to include ant:
-
- $ PATH=$ANT_HOME/bin:$PATH
-
-
-Building
-========
-
-Generate code from <project home>/dotnet/client-010/gentool:
-
- $ cd <project home>/dotnet/client-010/gentool
- $ ant
-
-You can build from Visual Studio 2008 normally. Alternatively, you
-can build debug releases for any supported framework from the
-command line using Nant:
-
-To build .NET 2.0 executables (to bin/net-2.0):
-
- $ cd <project home>/dotnet/client-010/
- $ nant
-
-
-To build for Mono on Linux (to bin/mono-2.0):
-
- $ cd <project home>/dotnet/client-010/
- $ nant -t:mono-2.0
-
-Releasing
-=========
-
-For .NET 2.0
-
- $ cd <project home>/dotnet/client-010/
- $ nant release-pkg
-
-Generates ./bin/net-2.0/release/Qpid.NET-net-2.0-yyyyMMdd.zip
-
-For Mono
-
- $ cd <project home>/dotnet/client-010/
- $ nant -t:mono-2.0 release-pkg
-
-Generates ./bin/mono-2.0/release/Qpid.NET-mono-2.0-yyyyMMdd.zip
-
diff --git a/qpid/dotnet/client-010/addins/ExcelAddIn/Excel.exe.config b/qpid/dotnet/client-010/addins/ExcelAddIn/Excel.exe.config
deleted file mode 100644
index 66bf63532e..0000000000
--- a/qpid/dotnet/client-010/addins/ExcelAddIn/Excel.exe.config
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<configuration>
- <appSettings>
- <add key="Host" value="localhost" />
- <add key="Port" value="5672" />
- <add key="VirtualHost" value="test" />
- <add key="UserName" value="guest" />
- <add key="Password" value="guest" />
- <!-- <add key="ProcessorAssembly" value="C:\Project\qpid\dotnet\client-010\addins\ExcelAddInMessageProcessor\bin\Debug\ExcelAddInMessageProcessor.dll"/>
- <add key="ProcessorClass" value="ExcelAddInMessageProcessor.Processor"/> -->
- </appSettings>
-</configuration> \ No newline at end of file
diff --git a/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.cs b/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.cs
deleted file mode 100644
index 66c9b7a8f9..0000000000
--- a/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.cs
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.IO;
-using System.Reflection;
-using System.Runtime.InteropServices;
-using System.Text;
-using Microsoft.Office.Interop.Excel;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-
-namespace ExcelAddIn
-{
- public delegate string ProcessMessage(IMessage m);
-
- /// <summary>
- /// This interface must be implemented so to use a user defined message processor
- /// </summary>
- public interface MessageProcessor
- {
- string ProcessMessage(IMessage m);
- }
-
- [ComVisible(true), ProgId("Qpid")]
- public class ExcelAddIn : IRtdServer
- {
- private IRTDUpdateEvent _onMessage;
- private readonly Dictionary<int, IMessage> _topicMessages = new Dictionary<int, IMessage>();
- private readonly Dictionary<string, QpidListener> _queueListener = new Dictionary<string, QpidListener>();
- private readonly Dictionary<int, string> _topicQueueName = new Dictionary<int, string>();
- private IClient _client;
- private IClientSession _session;
- private ProcessMessage _messageProcessor;
-
- #region properties
-
- public IRTDUpdateEvent OnMessage
- {
- get { return _onMessage; }
- }
-
- public Dictionary<int, IMessage> TopicMessages
- {
- get { return _topicMessages; }
- }
-
- public IClientSession Session
- {
- get { return _session; }
- }
-
- #endregion
-
-
- #region IRtdServer Members
-
- /// <summary>
- /// Called when Excel requests the first RTD topic for the server.
- /// Connect to the broker, returns a on success and 0 otherwise
- /// </summary>
- /// <param name="CallbackObject"></param>
- /// <returns></returns>
- public int ServerStart(IRTDUpdateEvent CallbackObject)
- {
- _onMessage = CallbackObject;
- string host = "localhost";
- string port = "5673";
- string virtualhost = "test";
- string username = "guest";
- string password = "guest";
- _messageProcessor = getMessage;
-
- if( ConfigurationManager.AppSettings["Host"] != null )
- {
- host = ConfigurationManager.AppSettings["Host"];
- }
- if (ConfigurationManager.AppSettings["Port"] != null)
- {
- port = ConfigurationManager.AppSettings["Port"];
- }
- if (ConfigurationManager.AppSettings["VirtualHost"] != null)
- {
- virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
- }
- if (ConfigurationManager.AppSettings["Username"] != null)
- {
- username = ConfigurationManager.AppSettings["UserName"];
- }
- if (ConfigurationManager.AppSettings["Password"] != null)
- {
- password = ConfigurationManager.AppSettings["Password"];
- }
- if (ConfigurationManager.AppSettings["ProcessorAssembly"] != null)
- {
- try
- {
- Assembly a = Assembly.LoadFrom(ConfigurationManager.AppSettings["ProcessorAssembly"]);
- Object o = a.CreateInstance(ConfigurationManager.AppSettings["ProcessorClass"]);
- MessageProcessor p = (MessageProcessor) o;
- _messageProcessor = p.ProcessMessage;
- }
- catch (Exception e)
- {
- System.Windows.Forms.MessageBox.Show("Error: \n" + e.StackTrace);
- return 0;
- }
- }
-
- System.Windows.Forms.MessageBox.Show("Connection parameters: \n host: " + host + "\n port: "
- + port + "\n user: " + username);
- try
- {
- _client = new Client();
- _client.Connect(host, Convert.ToInt16(port), virtualhost, username, password);
- // create a session
- _session = _client.CreateSession(0);
- }
- catch (Exception e)
- {
- System.Windows.Forms.MessageBox.Show("Error: \n" + e.StackTrace);
- return 0;
- }
-
- // always successful
- return 1;
- }
-
- /// <summary>
- /// Called whenever Excel requests a new RTD topic from the RealTimeData server.
- /// </summary>
- /// <param name="TopicID"></param>
- /// <param name="Strings"></param>
- /// <param name="GetNewValues"></param>
- /// <returns></returns>
- public object ConnectData(int TopicID, ref Array Strings, ref bool GetNewValues)
- {
- try
- {
- string queuename = "defaultExcelAddInQueue";
- string destinationName = "ExcelAddIn-" + queuename;
- if( Strings.Length > 0 )
- {
- queuename = (string) Strings.GetValue(0);
- }
- // Error message if the queue does not exist
- QueueQueryResult result = (QueueQueryResult)_session.QueueQuery(queuename).Result;
- if( result.GetQueue() == null )
- {
- System.Windows.Forms.MessageBox.Show("Error: \n queue " + queuename + " does not exist");
- return "error";
- }
-
- QpidListener listener;
- _topicMessages.Add(TopicID, null);
- _topicQueueName.Add(TopicID, queuename);
- if (_queueListener.ContainsKey(queuename))
- {
- listener = _queueListener[queuename];
- listener.addTopic(TopicID);
- }
- else
- {
- listener = new QpidListener(this);
- listener.addTopic(TopicID);
- _queueListener.Add(queuename, listener);
- _session.AttachMessageListener(listener, destinationName);
- _session.MessageSubscribe(queuename, destinationName, MessageAcceptMode.EXPLICIT,
- MessageAcquireMode.PRE_ACQUIRED, null, 0, null);
- // issue credits
- _session.MessageSetFlowMode(destinationName, MessageFlowMode.WINDOW);
- _session.MessageFlow(destinationName, MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
- _session.MessageFlow(destinationName, MessageCreditUnit.MESSAGE, 1000);
- _session.Sync();
- }
- }
- catch (Exception e)
- {
- System.Windows.Forms.MessageBox.Show("Error: \n" + e.StackTrace);
- return "error";
- }
- return "waiting";
- }
-
- /// <summary>
- /// Called whenever Excel no longer requires a specific topic.
- /// </summary>
- /// <param name="TopicID"></param>
- public void DisconnectData(int TopicID)
- {
- _topicMessages.Remove(TopicID);
- string queueName = _topicQueueName[TopicID];
- if (_topicQueueName.Remove(TopicID) && !_topicQueueName.ContainsValue(queueName))
- {
- _session.MessageStop("ExcelAddIn-" + queueName);
- _session.MessageListeners.Remove("ExcelAddIn-" + queueName);
- }
- }
-
- public int Heartbeat()
- {
- return 1;
- }
-
- public Array RefreshData(ref int TopicCount)
- {
- Array result = new object[2, _topicMessages.Count];
- foreach (KeyValuePair<int, IMessage> pair in _topicMessages)
- {
- result.SetValue(pair.Key, 0, pair.Key);
- string value = _messageProcessor(pair.Value);
- result.SetValue(value, 1, pair.Key);
- }
- TopicCount = _topicMessages.Count;
- return result;
- }
-
- public void ServerTerminate()
- {
-
- }
-
- #endregion
- //END IRTDServer METHODS
-
- private string getMessage(IMessage m)
- {
- string res;
- BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
- byte[] body = new byte[m.Body.Length - m.Body.Position];
- reader.Read(body, 0, body.Length);
- ASCIIEncoding enc = new ASCIIEncoding();
- res = enc.GetString(body);
- return res;
- }
-
- }
-
- class QpidListener : IMessageListener
- {
- private readonly ExcelAddIn _excel;
- private readonly List<int> _topics = new List<int>();
-
- public QpidListener(ExcelAddIn excel)
- {
- _excel = excel;
- }
-
- public void addTopic(int topic)
- {
- _topics.Add(topic);
- }
-
- public void MessageTransfer(IMessage m)
- {
- foreach (int i in _topics)
- {
- if (_excel.TopicMessages.ContainsKey(i))
- {
- _excel.TopicMessages[i] = m;
- }
- }
- // ack this message
- RangeSet rs = new RangeSet();
- rs.Add(m.Id);
- _excel.Session.MessageAccept(rs);
- _excel.OnMessage.UpdateNotify();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.csproj b/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.csproj
deleted file mode 100644
index b44bf9cc69..0000000000
--- a/qpid/dotnet/client-010/addins/ExcelAddIn/ExcelAddIn.csproj
+++ /dev/null
@@ -1,89 +0,0 @@
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{85EFD719-39F6-4471-90FF-9E621430344B}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>ExcelAddIn</RootNamespace>
- <AssemblyName>Qpid Excel AddIn</AssemblyName>
- <StartupObject>
- </StartupObject>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <OldToolsVersion>2.0</OldToolsVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <RegisterForComInterop>true</RegisterForComInterop>
- <DocumentationFile>bin\Debug\Qpid Excel AddIn.XML</DocumentationFile>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Microsoft.Office.Interop.Excel, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\App.config">
- <Link>App.config</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/addins/ExcelAddIn/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/addins/ExcelAddIn/Properties/AssemblyInfo.cs
deleted file mode 100644
index 67e95f69a3..0000000000
--- a/qpid/dotnet/client-010/addins/ExcelAddIn/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Qpid Excel AddIn")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Qpid Excel AddIn")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("3bbd4414-60df-407f-9c64-c14b221167af")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/ExcelAddInMessageProcessor.csproj b/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/ExcelAddInMessageProcessor.csproj
deleted file mode 100644
index 447ded4b55..0000000000
--- a/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/ExcelAddInMessageProcessor.csproj
+++ /dev/null
@@ -1,86 +0,0 @@
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{C2AE83A3-D5D1-469D-8611-A4738B9997CF}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>ExcelAddInMessageProcessor</RootNamespace>
- <AssemblyName>ExcelAddInMessageProcessor</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- <ProjectReference Include="..\ExcelAddIn\ExcelAddIn.csproj">
- <Project>{85EFD719-39F6-4471-90FF-9E621430344B}</Project>
- <Name>ExcelAddIn</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\App.config">
- <Link>App.config</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/Processor.cs b/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/Processor.cs
deleted file mode 100644
index e414da131f..0000000000
--- a/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/Processor.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System.IO;
-using System.Text;
-using org.apache.qpid.client;
-
-namespace ExcelAddInMessageProcessor
-{
- class Processor : ExcelAddIn.MessageProcessor
- {
- public string ProcessMessage(IMessage m)
- {
- BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
- byte[] body = new byte[m.Body.Length - m.Body.Position];
- reader.Read(body, 0, body.Length);
- ASCIIEncoding enc = new ASCIIEncoding();
- string res = enc.GetString(body);
- if (m.ApplicationHeaders.ContainsKey("price"))
- {
- res = res + ": price: " + m.ApplicationHeaders["price"];
- }
- return res;
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/Properties/AssemblyInfo.cs
deleted file mode 100644
index 302007674f..0000000000
--- a/qpid/dotnet/client-010/addins/ExcelAddInMessageProcessor/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("ExcelAddInMessageProcessor")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("ExcelAddInMessageProcessor")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("d20b2d75-7b8b-4f7d-8a81-40a4cce94195")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/addins/ExcelAddInProducer/ExcelAddInProducer.csproj b/qpid/dotnet/client-010/addins/ExcelAddInProducer/ExcelAddInProducer.csproj
deleted file mode 100644
index d9b1b63737..0000000000
--- a/qpid/dotnet/client-010/addins/ExcelAddInProducer/ExcelAddInProducer.csproj
+++ /dev/null
@@ -1,83 +0,0 @@
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{80F00C3B-EB38-4B3B-9F77-68977A30B155}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>ExcelAddInProducer</RootNamespace>
- <AssemblyName>Qpid Excel AddIn Producer</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="**\*.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\App.config">
- <Link>App.config</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/addins/ExcelAddInProducer/Program.cs b/qpid/dotnet/client-010/addins/ExcelAddInProducer/Program.cs
deleted file mode 100644
index a8bbdf2fbd..0000000000
--- a/qpid/dotnet/client-010/addins/ExcelAddInProducer/Program.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.Configuration;
-using System.Text;
-using System.Threading;
-using org.apache.qpid.client;
-
-namespace ExcelAddInProducer
-{
- class Program
- {
- static void Main(string[] args)
- {
- string host = ConfigurationManager.AppSettings["Host"];
- int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
- string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
- string username = ConfigurationManager.AppSettings["Username"];
- string password = ConfigurationManager.AppSettings["Password"];
-
- Client client = new Client();
- Console.WriteLine("Client created");
- client.Connect(host, port, virtualhost, username, password);
- Console.WriteLine("Connection established");
-
- IClientSession ssn = client.CreateSession(50000);
- Console.WriteLine("Session created");
- ssn.QueueDeclare("queue1", null, null);
- ssn.ExchangeBind("queue1", "amq.direct", "queue1", null);
- IMessage message = new Message();
- message.ApplicationHeaders.Add("price", 0);
- for (int i = 0; i < 100; i++)
- {
- message.ClearData();
- message.AppendData( Encoding.UTF8.GetBytes("test: " + i));
- message.ApplicationHeaders["price"] = i;
- ssn.MessageTransfer("amq.direct", "queue1", message);
- Thread.Sleep(1000);
- }
-
- client.Close();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/addins/ExcelAddInProducer/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/addins/ExcelAddInProducer/Properties/AssemblyInfo.cs
deleted file mode 100644
index 28fe3427cb..0000000000
--- a/qpid/dotnet/client-010/addins/ExcelAddInProducer/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Qpid Excel AddIn Producer")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Qpid Excel AddIn Producer")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("3416a5c2-eb70-4d77-b401-dfa659bd419e")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/addins/README.txt b/qpid/dotnet/client-010/addins/README.txt
deleted file mode 100644
index 5f8df77189..0000000000
--- a/qpid/dotnet/client-010/addins/README.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-This project contains three sub-projects:
-- The RTD excell Addin
-- A sample client sending messages to queue1
-- A ample message processor
-
-RDT AddIn
-Excel provides a function called RTD (real-time data) that lets you specify a COM server via its ProgId here "Qpid" so that you can push qpid messages into Excel.
-For using the Qpid RTD follows those steps:
-
-1) Copy the configuration Excel.exe.config into C:\Program Files\Microsoft Office\Office12
-2) Edit Excel.exe.xml and set the targeted Qpid broker host, port number
-3) Select the cell or cell range to contain the information
-4) enter the following formula =rtd("Qpid",,"myQueue") Where MyQueue is the queue from which you wish to receive messages from
-
-Note: The Qpid RTD is a COM-AddIn that must be registered with Excel. This is done automatically when compiling the Addin with visual studio.
-
-The default behavior of the RDT AddIn is to display the message payload. This could be altered by specifying your own message processor.
-A Message processor is a class that implements the API ExcelAddIn.MessageProcessor. For example, the provided processor in client-010\addins\ExcelAddInMessageProcessor displays the message body and the the header price when specified.
-
-To use you own message processor follows those steps:
-1) Write your own message processor that extends ExcelAddIn.MessageProcessor
-2) Edit Excel.exe.config and uncomment the entries:
- <add key="ProcessorAssembly" value="<path>\qpid\dotnet\client-010\addins\ExcelAddInMessageProcessor\bin\Debug\ExcelAddInMessageProcessor.dll"/>
- <add key="ProcessorClass" value="ExcelAddInMessageProcessor.Processor"/>
-- ProcessorAssembly is the path on the Assembly that contains your processor class
-- ProcessorClass is your processor class name
-3) run excel and define a rtd function
-
-Note: the provided ExcelAddInProducer can be used for testing the provided message processor. As messages are sent to queue1 the following rtd fucntion should be used =rtd("Qpiud",,"queue1") \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/Client.csproj b/qpid/dotnet/client-010/client/Client.csproj
deleted file mode 100644
index 000407da59..0000000000
--- a/qpid/dotnet/client-010/client/Client.csproj
+++ /dev/null
@@ -1,242 +0,0 @@
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{B911FFD7-754F-4735-A188-218D5065BE79}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>client</RootNamespace>
- <AssemblyName>Qpid Client</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\lib\log4net\log4net.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="client\Client.cs" />
- <Compile Include="client\ClientConnectionDelegate.cs" />
- <Compile Include="client\ClientSession.cs" />
- <Compile Include="client\ClientSessionDelegate.cs" />
- <Compile Include="client\ErrorCode.cs" />
- <Compile Include="client\IClient.cs" />
- <Compile Include="client\IClientSession.cs" />
- <Compile Include="client\IClosedListener.cs" />
- <Compile Include="client\IMessage.cs" />
- <Compile Include="client\Message.cs" />
- <Compile Include="client\IMessageListener.cs" />
- <Compile Include="generated\Acquired.cs" />
- <Compile Include="generated\ConnectionClose.cs" />
- <Compile Include="generated\ConnectionCloseCode.cs" />
- <Compile Include="generated\ConnectionCloseOk.cs" />
- <Compile Include="generated\ConnectionHeartbeat.cs" />
- <Compile Include="generated\ConnectionOpen.cs" />
- <Compile Include="generated\ConnectionOpenOk.cs" />
- <Compile Include="generated\ConnectionRedirect.cs" />
- <Compile Include="generated\ConnectionSecure.cs" />
- <Compile Include="generated\ConnectionSecureOk.cs" />
- <Compile Include="generated\ConnectionStart.cs" />
- <Compile Include="generated\ConnectionStartOk.cs" />
- <Compile Include="generated\ConnectionTune.cs" />
- <Compile Include="generated\ConnectionTuneOk.cs" />
- <Compile Include="generated\Constant.cs" />
- <Compile Include="generated\DeliveryProperties.cs" />
- <Compile Include="generated\DtxCommit.cs" />
- <Compile Include="generated\DtxEnd.cs" />
- <Compile Include="generated\DtxForget.cs" />
- <Compile Include="generated\DtxGetTimeout.cs" />
- <Compile Include="generated\DtxPrepare.cs" />
- <Compile Include="generated\DtxRecover.cs" />
- <Compile Include="generated\DtxRollback.cs" />
- <Compile Include="generated\DtxSelect.cs" />
- <Compile Include="generated\DtxSetTimeout.cs" />
- <Compile Include="generated\DtxStart.cs" />
- <Compile Include="generated\DtxXaStatus.cs" />
- <Compile Include="generated\ExchangeBind.cs" />
- <Compile Include="generated\ExchangeBound.cs" />
- <Compile Include="generated\ExchangeBoundResult.cs" />
- <Compile Include="generated\ExchangeDeclare.cs" />
- <Compile Include="generated\ExchangeDelete.cs" />
- <Compile Include="generated\ExchangeQuery.cs" />
- <Compile Include="generated\ExchangeQueryResult.cs" />
- <Compile Include="generated\ExchangeUnbind.cs" />
- <Compile Include="generated\ExecutionErrorCode.cs" />
- <Compile Include="generated\ExecutionException.cs" />
- <Compile Include="generated\ExecutionResult.cs" />
- <Compile Include="generated\ExecutionSync.cs" />
- <Compile Include="generated\FileReturnCode.cs" />
- <Compile Include="generated\FragmentProperties.cs" />
- <Compile Include="generated\GetTimeoutResult.cs" />
- <Compile Include="generated\IInvoker.cs" />
- <Compile Include="generated\Invoker.cs" />
- <Compile Include="generated\MessageAccept.cs" />
- <Compile Include="generated\MessageAcceptMode.cs" />
- <Compile Include="generated\MessageAcquire.cs" />
- <Compile Include="generated\MessageAcquireMode.cs" />
- <Compile Include="generated\MessageCancel.cs" />
- <Compile Include="generated\MessageCreditUnit.cs" />
- <Compile Include="generated\MessageDeliveryMode.cs" />
- <Compile Include="generated\MessageDeliveryPriority.cs" />
- <Compile Include="generated\MessageFlow.cs" />
- <Compile Include="generated\MessageFlowMode.cs" />
- <Compile Include="generated\MessageFlush.cs" />
- <Compile Include="generated\MessageProperties.cs" />
- <Compile Include="generated\MessageReject.cs" />
- <Compile Include="generated\MessageRejectCode.cs" />
- <Compile Include="generated\MessageRelease.cs" />
- <Compile Include="generated\MessageResume.cs" />
- <Compile Include="generated\MessageResumeResult.cs" />
- <Compile Include="generated\MessageSetFlowMode.cs" />
- <Compile Include="generated\MessageStop.cs" />
- <Compile Include="generated\MessageSubscribe.cs" />
- <Compile Include="generated\MessageTransfer.cs" />
- <Compile Include="generated\MethodDelegate.cs" />
- <Compile Include="generated\Option.cs" />
- <Compile Include="generated\QueueDeclare.cs" />
- <Compile Include="generated\QueueDelete.cs" />
- <Compile Include="generated\QueuePurge.cs" />
- <Compile Include="generated\QueueQuery.cs" />
- <Compile Include="generated\QueueQueryResult.cs" />
- <Compile Include="generated\RecoverResult.cs" />
- <Compile Include="generated\ReplyTo.cs" />
- <Compile Include="generated\SegmentType.cs" />
- <Compile Include="generated\SessionAttach.cs" />
- <Compile Include="generated\SessionAttached.cs" />
- <Compile Include="generated\SessionCommandFragment.cs" />
- <Compile Include="generated\SessionCommandPoint.cs" />
- <Compile Include="generated\SessionCompleted.cs" />
- <Compile Include="generated\SessionConfirmed.cs" />
- <Compile Include="generated\SessionDetach.cs" />
- <Compile Include="generated\SessionDetachCode.cs" />
- <Compile Include="generated\SessionDetached.cs" />
- <Compile Include="generated\SessionExpected.cs" />
- <Compile Include="generated\SessionFlush.cs" />
- <Compile Include="generated\SessionGap.cs" />
- <Compile Include="generated\SessionHeader.cs" />
- <Compile Include="generated\SessionKnownCompleted.cs" />
- <Compile Include="generated\SessionRequestTimeout.cs" />
- <Compile Include="generated\SessionTimeout.cs" />
- <Compile Include="generated\StreamReturnCode.cs" />
- <Compile Include="generated\StructFactory.cs" />
- <Compile Include="generated\Track.cs" />
- <Compile Include="generated\TxCommit.cs" />
- <Compile Include="generated\TxRollback.cs" />
- <Compile Include="generated\TxSelect.cs" />
- <Compile Include="generated\Type.cs" />
- <Compile Include="generated\XaResult.cs" />
- <Compile Include="generated\Xid.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="transport\Binary.cs" />
- <Compile Include="transport\IBinding.cs" />
- <Compile Include="transport\Channel.cs" />
- <Compile Include="transport\ChannelDelegate.cs" />
- <Compile Include="transport\ClientDelegate.cs" />
- <Compile Include="transport\codec\AbstractDecoder.cs" />
- <Compile Include="transport\codec\AbstractEncoder.cs" />
- <Compile Include="transport\codec\IDecoder.cs" />
- <Compile Include="transport\codec\IEncodable.cs" />
- <Compile Include="transport\codec\IEncoder.cs" />
- <Compile Include="transport\codec\MSDecoder.cs" />
- <Compile Include="transport\codec\MSEncoder.cs" />
- <Compile Include="transport\Connection.cs" />
- <Compile Include="transport\ConnectionDelegate.cs" />
- <Compile Include="transport\exception\ConnectionException.cs" />
- <Compile Include="transport\exception\ExceptionArgs.cs" />
- <Compile Include="transport\exception\ProtocolVersionException.cs" />
- <Compile Include="transport\exception\SessionClosedException.cs" />
- <Compile Include="transport\exception\SessionException.cs" />
- <Compile Include="transport\exception\TransportException.cs" />
- <Compile Include="transport\Field.cs" />
- <Compile Include="transport\IFuture.cs" />
- <Compile Include="transport\Header.cs" />
- <Compile Include="transport\ISession.cs" />
- <Compile Include="transport\Method.cs" />
- <Compile Include="transport\network\Assembler.cs" />
- <Compile Include="transport\network\Disassembler.cs" />
- <Compile Include="transport\network\Frame.cs" />
- <Compile Include="transport\network\io\IIoSender.cs" />
- <Compile Include="transport\network\InputHandler.cs" />
- <Compile Include="transport\network\io\IIoTransport.cs" />
- <Compile Include="transport\network\io\IoReceiver.cs" />
- <Compile Include="transport\network\io\IoSender.cs" />
- <Compile Include="transport\network\io\IoSSLTransport.cs" />
- <Compile Include="transport\network\io\IoTransport.cs" />
- <Compile Include="transport\network\INetworkDelegate.cs" />
- <Compile Include="transport\network\INetworkEvent.cs" />
- <Compile Include="transport\IProtocolDelegate.cs" />
- <Compile Include="transport\ProtocolError.cs" />
- <Compile Include="transport\IProtocolEvent.cs" />
- <Compile Include="transport\ProtocolHeader.cs" />
- <Compile Include="transport\Range.cs" />
- <Compile Include="transport\RangeSet.cs" />
- <Compile Include="transport\ReceivedPayload.cs" />
- <Compile Include="transport\IReceiver.cs" />
- <Compile Include="transport\ISender.cs" />
- <Compile Include="transport\Session.cs" />
- <Compile Include="transport\SessionDelegate.cs" />
- <Compile Include="transport\Struct.cs" />
- <Compile Include="transport\util\ByteEncoder.cs" />
- <Compile Include="transport\util\CircularBuffer.cs" />
- <Compile Include="transport\util\Functions.cs" />
- <Compile Include="transport\util\Logger.cs" />
- <Compile Include="transport\util\ResultFuture.cs" />
- <Compile Include="transport\util\Serial.cs" />
- <Compile Include="transport\util\UUID.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/client/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/client/Properties/AssemblyInfo.cs
deleted file mode 100644
index 2b6c525b86..0000000000
--- a/qpid/dotnet/client-010/client/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Qpid Client")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Qpid Client")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("dac7ef42-e9c8-45a5-8050-1301b6f8160e")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/client/client.sln b/qpid/dotnet/client-010/client/client.sln
deleted file mode 100644
index 37455fd177..0000000000
--- a/qpid/dotnet/client-010/client/client.sln
+++ /dev/null
@@ -1,129 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License
-#
-
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "Client.csproj", "{B911FFD7-754F-4735-A188-218D5065BE79}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Demo", "..\demo\Demo.csproj", "{E4C46FBC-7560-406D-BFEF-CA010E584DF4}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExcelAddIn", "..\addins\ExcelAddIn\ExcelAddIn.csproj", "{85EFD719-39F6-4471-90FF-9E621430344B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExcelAddInProducer", "..\addins\ExcelAddInProducer\ExcelAddInProducer.csproj", "{80F00C3B-EB38-4B3B-9F77-68977A30B155}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-direct-producer", "..\examples\direct\example-direct-producer\example-direct-producer.csproj", "{96FCB250-8142-40EE-9BDD-CA839EE21021}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-direct-Listener", "..\examples\direct\example-direct-Listener\example-direct-Listener.csproj", "{AE65B1B9-8779-4CB1-91AF-E7F6C7A736D7}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-pub-sub-Listener", "..\examples\pub-sub\example-pub-sub-Listener\example-pub-sub-Listener.csproj", "{2BCDC2CC-5BDA-4CC7-944D-2899AD8A53C7}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-pub-sub-Publisher", "..\examples\pub-sub\example-pub-sub-Publisher\example-pub-sub-Publisher.csproj", "{F8857634-A134-44E7-A953-F2B22688C599}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "..\test\Test.csproj", "{95CB4C90-7C53-44A9-B11C-96235F158ACA}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-request-response-Client", "..\examples\request-response\example-request-response-Client\example-request-response-Client.csproj", "{1BC63815-4029-4039-9207-35E7E06ECC99}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-request-response-Server", "..\examples\request-response\example-request-response-Server\example-request-response-Server.csproj", "{922FBA9C-E483-4AEF-ABE8-AC87421E829B}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-fanout-Producer", "..\examples\fanout\example-fanout-Producer\example-fanout-Producer.csproj", "{4513BF94-D54A-42FE-8506-FE2CD57B2C51}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "example-fanout-Listener", "..\examples\fanout\example-fanout-Listener\example-fanout-Listener.csproj", "{18A0792B-DC3A-4EC5-93D6-DB8A111D8F15}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "perftest", "..\perftest\perftest.csproj", "{7F7E8DE7-FDF2-4A52-A4CE-D3756B05273C}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExcelAddInMessageProcessor", "..\addins\ExcelAddInMessageProcessor\ExcelAddInMessageProcessor.csproj", "{C2AE83A3-D5D1-469D-8611-A4738B9997CF}"
-EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3CE4FA2A-393F-4DED-ABDF-1BC2F253ACA8}"
- ProjectSection(SolutionItems) = preProject
- ..\App.config = ..\App.config
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {B911FFD7-754F-4735-A188-218D5065BE79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B911FFD7-754F-4735-A188-218D5065BE79}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B911FFD7-754F-4735-A188-218D5065BE79}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B911FFD7-754F-4735-A188-218D5065BE79}.Release|Any CPU.Build.0 = Release|Any CPU
- {E4C46FBC-7560-406D-BFEF-CA010E584DF4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E4C46FBC-7560-406D-BFEF-CA010E584DF4}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E4C46FBC-7560-406D-BFEF-CA010E584DF4}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E4C46FBC-7560-406D-BFEF-CA010E584DF4}.Release|Any CPU.Build.0 = Release|Any CPU
- {85EFD719-39F6-4471-90FF-9E621430344B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {85EFD719-39F6-4471-90FF-9E621430344B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {85EFD719-39F6-4471-90FF-9E621430344B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {85EFD719-39F6-4471-90FF-9E621430344B}.Release|Any CPU.Build.0 = Release|Any CPU
- {80F00C3B-EB38-4B3B-9F77-68977A30B155}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {80F00C3B-EB38-4B3B-9F77-68977A30B155}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {80F00C3B-EB38-4B3B-9F77-68977A30B155}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {80F00C3B-EB38-4B3B-9F77-68977A30B155}.Release|Any CPU.Build.0 = Release|Any CPU
- {96FCB250-8142-40EE-9BDD-CA839EE21021}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {96FCB250-8142-40EE-9BDD-CA839EE21021}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {96FCB250-8142-40EE-9BDD-CA839EE21021}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {96FCB250-8142-40EE-9BDD-CA839EE21021}.Release|Any CPU.Build.0 = Release|Any CPU
- {AE65B1B9-8779-4CB1-91AF-E7F6C7A736D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {AE65B1B9-8779-4CB1-91AF-E7F6C7A736D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {AE65B1B9-8779-4CB1-91AF-E7F6C7A736D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {AE65B1B9-8779-4CB1-91AF-E7F6C7A736D7}.Release|Any CPU.Build.0 = Release|Any CPU
- {2BCDC2CC-5BDA-4CC7-944D-2899AD8A53C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2BCDC2CC-5BDA-4CC7-944D-2899AD8A53C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2BCDC2CC-5BDA-4CC7-944D-2899AD8A53C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2BCDC2CC-5BDA-4CC7-944D-2899AD8A53C7}.Release|Any CPU.Build.0 = Release|Any CPU
- {F8857634-A134-44E7-A953-F2B22688C599}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F8857634-A134-44E7-A953-F2B22688C599}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F8857634-A134-44E7-A953-F2B22688C599}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F8857634-A134-44E7-A953-F2B22688C599}.Release|Any CPU.Build.0 = Release|Any CPU
- {95CB4C90-7C53-44A9-B11C-96235F158ACA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {95CB4C90-7C53-44A9-B11C-96235F158ACA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {95CB4C90-7C53-44A9-B11C-96235F158ACA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {95CB4C90-7C53-44A9-B11C-96235F158ACA}.Release|Any CPU.Build.0 = Release|Any CPU
- {1BC63815-4029-4039-9207-35E7E06ECC99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1BC63815-4029-4039-9207-35E7E06ECC99}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1BC63815-4029-4039-9207-35E7E06ECC99}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1BC63815-4029-4039-9207-35E7E06ECC99}.Release|Any CPU.Build.0 = Release|Any CPU
- {922FBA9C-E483-4AEF-ABE8-AC87421E829B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {922FBA9C-E483-4AEF-ABE8-AC87421E829B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {922FBA9C-E483-4AEF-ABE8-AC87421E829B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {922FBA9C-E483-4AEF-ABE8-AC87421E829B}.Release|Any CPU.Build.0 = Release|Any CPU
- {4513BF94-D54A-42FE-8506-FE2CD57B2C51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4513BF94-D54A-42FE-8506-FE2CD57B2C51}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4513BF94-D54A-42FE-8506-FE2CD57B2C51}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4513BF94-D54A-42FE-8506-FE2CD57B2C51}.Release|Any CPU.Build.0 = Release|Any CPU
- {18A0792B-DC3A-4EC5-93D6-DB8A111D8F15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {18A0792B-DC3A-4EC5-93D6-DB8A111D8F15}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {18A0792B-DC3A-4EC5-93D6-DB8A111D8F15}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {18A0792B-DC3A-4EC5-93D6-DB8A111D8F15}.Release|Any CPU.Build.0 = Release|Any CPU
- {7F7E8DE7-FDF2-4A52-A4CE-D3756B05273C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7F7E8DE7-FDF2-4A52-A4CE-D3756B05273C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7F7E8DE7-FDF2-4A52-A4CE-D3756B05273C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7F7E8DE7-FDF2-4A52-A4CE-D3756B05273C}.Release|Any CPU.Build.0 = Release|Any CPU
- {C2AE83A3-D5D1-469D-8611-A4738B9997CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C2AE83A3-D5D1-469D-8611-A4738B9997CF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C2AE83A3-D5D1-469D-8611-A4738B9997CF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C2AE83A3-D5D1-469D-8611-A4738B9997CF}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/qpid/dotnet/client-010/client/client.suo b/qpid/dotnet/client-010/client/client.suo
deleted file mode 100644
index 0640275f99..0000000000
--- a/qpid/dotnet/client-010/client/client.suo
+++ /dev/null
Binary files differ
diff --git a/qpid/dotnet/client-010/client/client/Client.cs b/qpid/dotnet/client-010/client/client/Client.cs
deleted file mode 100644
index fc9ff22191..0000000000
--- a/qpid/dotnet/client-010/client/client/Client.cs
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-using System;
-using System.Text;
-using System.Threading;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.network.io;
-using org.apache.qpid.transport.util;
-using System.Security.Cryptography.X509Certificates;
-
-namespace org.apache.qpid.client
-{
- public class Client : IClient
- {
- private Connection _conn;
- private static readonly Logger _log = Logger.Get(typeof (Client));
- private const long timeout = 60000;
- private bool _isClosed;
- private readonly Object _closeOK;
- private IClosedListener _closedListner;
-
- public event EventHandler<ExceptionArgs> ExceptionRaised;
- public event EventHandler ConnectionOpenOK;
- public event EventHandler ConnectionLost;
-
- public bool IsClosed
- {
- get { return _isClosed; }
- set
- {
- _isClosed = value;
- if(_isClosed && ConnectionLost != null)
- ConnectionLost(this, EventArgs.Empty);
- }
- }
-
- public Object CloseOk
- {
- get { return _closeOK; }
- }
-
- public Client()
- {
- _isClosed = false;
- _closeOK = new object();
- }
-
- #region Interface IClient
-
- public void Connect(String host, int port, String virtualHost, String username, String password)
- {
- Connect(host, port, virtualHost, username, password, "PLAIN");
- }
-
- /// <summary>
- /// Establishes a connection with a broker using the provided user auths
- ///
- /// </summary>
- /// <param name="host">Host name on which a broker is deployed</param>
- /// <param name="port">Broker port </param>
- /// <param name="virtualHost">virtual host name</param>
- /// <param name="username">User Name</param>
- /// <param name="password">Password</param>
- /// <param name="mechanism">SASL authentication mechanism, possible values: PLAIN, EXTERNAL, DIGEST-MD5, ANONYMOUS</param>
- public void Connect(String host, int port, String virtualHost, String username, String password, String mechanism)
- {
- _log.Debug(String.Format("Client Connecting to host {0}; port {1}; virtualHost {2}; username {3}; mechanism {4}",
- host, port, virtualHost, username, mechanism));
- ClientConnectionDelegate connectionDelegate = new ClientConnectionDelegate(this, username, password, mechanism);
- ManualResetEvent negotiationComplete = new ManualResetEvent(false);
- connectionDelegate.SetCondition(negotiationComplete);
- connectionDelegate.VirtualHost = virtualHost;
- _conn = IoTransport.Connect(host, port, connectionDelegate);
-
- _conn.Send(new ProtocolHeader(1, 0, 10));
- negotiationComplete.WaitOne();
-
- if (connectionDelegate.Exception != null)
- throw connectionDelegate.Exception;
-
- connectionDelegate.SetCondition(null);
-
- }
-
- /// <summary>
- /// Establishes a connection with a broker using SSL
- ///
- /// </summary>
- /// <param name="host">Host name on which a broker is deployed</param>
- /// <param name="port">Broker port </param>
- /// <param name="virtualHost">virtual host name</param>
- /// <param name="username">User Name</param>
- /// <param name="password">Password</param>
- /// <param name="mechanism">SASL authentication mechanism, possible values: PLAIN, EXTERNAL, DIGEST-MD5, ANONYMOUS</param>
- /// <param name="serverName">Name of the SSL server</param>
- /// <param name="certPath">Path to the X509 certificate to be used for client authentication</param>
- /// <param name="certPass">Password to certificate file, pass null if no password is required</param>
- /// <param name="rejectUntrusted">If true connection will not be established if the broker is not trusted</param>
- public void ConnectSSL(String host, int port, String virtualHost, String username, String password, String mechanism, string serverName, string certPath, String certPass, bool rejectUntrusted)
- {
- _log.Debug(String.Format("Client Connecting to host {0}; port {1}; virtualHost {2}; username {3}; mechanism {4}",
- host, port, virtualHost, username, mechanism));
- _log.Debug(String.Format("SSL parameters: serverName: {0}; certPath: {1}; rejectUntrusted: {2}", serverName, certPath, rejectUntrusted));
- _conn = IoSSLTransport.Connect(host, port, virtualHost, mechanism, serverName, certPath, certPass, rejectUntrusted, this);
- }
-
- /// <summary>
- /// Establishes a connection with a broker using SSL
- ///
- /// </summary>
- /// <param name="host">Host name on which a broker is deployed</param>
- /// <param name="port">Broker port </param>
- /// <param name="mechanism">SASL authentication mechanism, possible values: PLAIN, EXTERNAL, DIGEST-MD5, ANONYMOUS</param>
- /// <param name="certificate">X509 certificate to be used for client authentication</param>
- /// <param name="rejectUntrusted">If true connection will not be established if the broker is not trusted</param>
- public void ConnectSSL(String host, int port, String mechanism, X509Certificate certificate, bool rejectUntrusted)
- {
- _log.Debug(String.Format("Client Connecting to host {0}; port {1}; mechanism {2}",
- host, port, mechanism));
- _log.Debug(String.Format("SSL parameters: certSubject: {0}; rejectUntrusted: {1}",
- certificate.Subject, rejectUntrusted));
-
- _conn = IoSSLTransport.Connect(host, port, mechanism, certificate, rejectUntrusted, this);
- }
-
- public void Close()
- {
- Channel ch = _conn.GetChannel(0);
- ch.ConnectionClose(ConnectionCloseCode.NORMAL, "client is closing");
- lock (CloseOk)
- {
- DateTime start = DateTime.Now;
- long elapsed = 0;
- while (!IsClosed && elapsed < timeout)
- {
- Monitor.Wait(CloseOk, (int) (timeout - elapsed));
- elapsed = DateTime.Now.Subtract(start).Milliseconds;
- }
- if (!IsClosed)
- {
- throw new Exception("Timed out when closing connection");
- }
- _conn.Close();
- }
- }
-
- public IClientSession CreateSession(long expiryInSeconds)
- {
- Channel ch = _conn.GetChannel();
- ClientSession ssn = new ClientSession(Encoding.UTF8.GetBytes(UUID.RandomUuid().ToString()));
- ssn.Attach(ch);
- ssn.SessionAttach(ssn.GetName());
- ssn.SessionRequestTimeout(expiryInSeconds);
- return ssn;
- }
-
- public IClosedListener ClosedListener
- {
- set { _closedListner = value; }
- get { return _closedListner; }
- }
-
- #endregion
-
- public void RaiseException(Exception exception)
- {
- if (ExceptionRaised != null)
- ExceptionRaised(this, new ExceptionArgs(exception));
- }
-
- internal void ConnectionOpenOk(Channel context, ConnectionOpenOk mstruct)
- {
- if (ConnectionOpenOK != null)
- {
- ConnectionOpenOK(this, new EventArgs());
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs b/qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs
deleted file mode 100644
index 83aac80e83..0000000000
--- a/qpid/dotnet/client-010/client/client/ClientConnectionDelegate.cs
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-using System.Threading;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.client
-{
- internal class ClientConnectionDelegate : ClientDelegate
- {
- private static readonly Logger log = Logger.Get(typeof (ClientConnectionDelegate));
- private readonly Client _client;
- private string _username;
- private string _password;
-
- // PLAIN SASL mechanism by default
- private string _mechanism = "PLAIN";
- private Exception _exception;
-
- public ClientConnectionDelegate(Client client, string username, string pasword)
- {
- _client = client;
- _username = username;
- _password = pasword;
- }
-
- public ClientConnectionDelegate(Client client, string username, string pasword, string mechanism)
- : this(client, username, pasword)
- {
- _mechanism = mechanism;
- }
-
- public Exception Exception
- {
- get { return _exception; }
- }
-
- public override SessionDelegate GetSessionDelegate()
- {
- return new ClientSessionDelegate();
- }
-
- public override void RaiseException(Exception exception)
- {
- _exception = exception;
-
- if (_negotiationComplete != null)
- _negotiationComplete.Set();
- else
- _client.RaiseException(exception);
- }
-
- public override void ConnectionStart(Channel context, ConnectionStart mystruct)
- {
- MemoryStream stResponse = new MemoryStream();
-
- // do not send username and password for EXTERNAL mechanism,
- // because they are inside a certificate file
- if (_mechanism != "EXTERNAL")
- {
- byte[] part = Encoding.UTF8.GetBytes(_username);
- stResponse.WriteByte(0);
- stResponse.Write(part, 0, part.Length);
- stResponse.WriteByte(0);
- part = Encoding.UTF8.GetBytes(_password);
- stResponse.Write(part, 0, part.Length);
- }
- Dictionary<String, Object> props = new Dictionary<String, Object>();
- context.ConnectionStartOk(props, _mechanism, stResponse.ToArray(), "utf8");
- }
-
- public override void ConnectionOpenOk(Channel context, ConnectionOpenOk mstruct)
- {
- base.ConnectionOpenOk(context, mstruct);
- _client.ConnectionOpenOk(context, mstruct);
- }
-
- public override void Closed()
- {
- log.Debug("Delegate Closed");
- lock (_client.CloseOk)
- {
- try
- {
- _client.IsClosed = true;
- Monitor.PulseAll(_client.CloseOk);
- }
- catch (Exception e)
- {
- throw new SystemException("Error when closing client", e);
- }
- }
- }
-
- public override void ConnectionClose(Channel context, ConnectionClose connectionClose)
- {
- base.ConnectionClose(context, connectionClose);
- ErrorCode errorCode = ErrorCode.GetErrorCode((int) connectionClose.GetReplyCode());
-
- if(_client.ClosedListener != null)
- _client.ClosedListener.OnClosed(errorCode, connectionClose.GetReplyText(), null);
-
- if (errorCode.Code != (int)QpidErrorCode.NO_ERROR)
- throw new Exception ("Server Closed the connection: Reason " + connectionClose.GetReplyText());
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/client/ClientInterface.cs b/qpid/dotnet/client-010/client/client/ClientInterface.cs
deleted file mode 100644
index fcf7ae9f31..0000000000
--- a/qpid/dotnet/client-010/client/client/ClientInterface.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-
-namespace org.apache.qpid.client
-{
- public interface ClientInterface
- {
- /// <summary>
- /// Establish a connection with the broker using the given parameters
- ///
- /// </summary>
- /// <param name="host">host name</param>
- /// <param name="port">port number</param>
- /// <param name="virtualHost">virtualHost the virtual host name</param>
- /// <param name="username"> username user name</param>
- /// <param name="passwor">password password</param>
- void connect(String host, int port, String virtualHost, String username, String passwor);
-
- /// <summary>
- /// Close this client
- /// </summary>
- void close();
-
- /// <summary>
- /// Create a session for this connection.
- /// The returned session is suspended
- /// (i.e. this session is not attached to an underlying channel)
- /// </summary>
- /// <param name="expiryInSeconds">Expiry time expressed in seconds, if the value is less than
- /// or equal to 0 then the session does not expire.</param>
- /// <returns>A newly created (suspended) session.</returns>
- ClientSession createSession(long expiryInSeconds);
-
- /// <summary>
- /// If the communication layer detects a serious problem with a connection, it
- // informs the client's ClosedListener
- /// </summary>
- ///
- ClosedListener ClosedListener { set; }
- }
-}
diff --git a/qpid/dotnet/client-010/client/client/ClientSession.cs b/qpid/dotnet/client-010/client/client/ClientSession.cs
deleted file mode 100644
index 190fd7c940..0000000000
--- a/qpid/dotnet/client-010/client/client/ClientSession.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.client
-{
- /// <summary> Implements a Qpid Sesion.</summary>
- public class ClientSession : Session, IClientSession
- {
- public static short TRANSFER_ACQUIRE_MODE_NO_ACQUIRE = 1;
- public static short TRANSFER_ACQUIRE_MODE_PRE_ACQUIRE = 0;
- public static short TRANSFER_CONFIRM_MODE_REQUIRED = 0;
- public static short TRANSFER_CONFIRM_MODE_NOT_REQUIRED = 1;
- public static short MESSAGE_FLOW_MODE_CREDIT = 0;
- public static short MESSAGE_FLOW_MODE_WINDOW = 1;
- public static short MESSAGE_FLOW_UNIT_MESSAGE = 0;
- public static short MESSAGE_FLOW_UNIT_BYTE = 1;
- public static long MESSAGE_FLOW_MAX_BYTES = 0xFFFFFFFF;
- public static short MESSAGE_REJECT_CODE_GENERIC = 0;
- public static short MESSAGE_REJECT_CODE_IMMEDIATE_DELIVERY_FAILED = 1;
- public static short MESSAGE_ACQUIRE_ANY_AVAILABLE_MESSAGE = 0;
- public static short MESSAGE_ACQUIRE_MESSAGES_IF_ALL_ARE_AVAILABLE = 1;
-
- private readonly Dictionary<String, IMessageListener> _listeners = new Dictionary<String, IMessageListener>();
-
- public ClientSession(byte[] name) : base(name)
- {
- }
-
- public void AttachMessageListener(IMessageListener listener, string Destination)
- {
- _listeners.Add(Destination, listener);
- }
-
- public Dictionary<String, IMessageListener> MessageListeners
- {
- get { return _listeners; }
- }
-
- public void MessageTransfer(String destination, string routingkey, IMessage message)
- {
- message.DeliveryProperties.SetRoutingKey(routingkey);
- MessageTransfer(destination, message);
- }
-
- public void MessageTransfer(String destination, IMessage message)
- {
- byte[] body = new byte[message.Body.Position];
- message.Body.Seek(0, SeekOrigin.Begin);
- message.Body.Read(body, 0, body.Length);
- message.MessageProperties.SetMessageId(UUID.RandomUuid());
- MessageTransfer(destination,
- MessageAcceptMode.NONE,
- MessageAcquireMode.PRE_ACQUIRED,
- message.Header,
- body);
- }
-
- public void QueueDeclare(String queue)
- {
- QueueDeclare(queue, null, null);
- }
-
- public void QueueDeclare(String queue, params Option[] options)
- {
- QueueDeclare(queue, null, null, options);
- }
-
- public void ExchangeBind(String queue, String exchange, String bindingKey)
- {
- ExchangeBind(queue, exchange, bindingKey, null);
- }
-
- public void MessageSubscribe(String queue)
- {
- MessageSubscribe(queue, queue, MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED, null, 0, null);
- // issue credits
- MessageSetFlowMode(queue, MessageFlowMode.WINDOW);
- MessageFlow(queue, MessageCreditUnit.BYTE, MESSAGE_FLOW_MAX_BYTES);
- MessageFlow(queue, MessageCreditUnit.MESSAGE, 10000);
- }
-
- }
-}
diff --git a/qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs b/qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs
deleted file mode 100644
index 7cc4042557..0000000000
--- a/qpid/dotnet/client-010/client/client/ClientSessionDelegate.cs
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.client
-{
- public class ClientSessionDelegate : SessionDelegate
- {
- private static readonly Logger _log = Logger.Get(typeof (ClientSessionDelegate));
-
- // --------------------------------------------
- // Message methods
- // --------------------------------------------
- public override void MessageTransfer(Session session, MessageTransfer xfr)
- {
- if (((ClientSession) session).MessageListeners.ContainsKey(xfr.GetDestination()))
- {
- IMessageListener listener = ((ClientSession)session).MessageListeners[xfr.GetDestination()];
- listener.MessageTransfer( new Message(xfr));
- }
- else
- {
- _log.Warn("No listener set for: {0}", xfr);
- }
- }
-
- public override void MessageReject(Session session, MessageReject mstruct)
- {
- foreach (Range range in mstruct.GetTransfers())
- {
- for (long l = range.Lower; l <= range.Upper; l++)
- {
- _log.Warn("message rejected: " + session.GetCommand((int) l));
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/client/ClosedListenerInterface.cs b/qpid/dotnet/client-010/client/client/ClosedListenerInterface.cs
deleted file mode 100644
index 133b00abdd..0000000000
--- a/qpid/dotnet/client-010/client/client/ClosedListenerInterface.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-
-namespace org.apache.qpid.client
-{
- public interface ClosedListener
- {
-
- void onClosed(ErrorCode errorCode, String reason, Exception t);
- }
-}
diff --git a/qpid/dotnet/client-010/client/client/ErrorCode.cs b/qpid/dotnet/client-010/client/client/ErrorCode.cs
deleted file mode 100644
index 74c3daba4b..0000000000
--- a/qpid/dotnet/client-010/client/client/ErrorCode.cs
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-
-namespace org.apache.qpid.client
-{
- public enum QpidErrorCode
- {
- NO_ERROR = 200,
- CONTENT_TOO_LARGE = 311,
- NO_ROUTE = 312,
- NO_CONSUMERS = 313,
- CONNECTION_FORCED = 320,
- INVALID_PATH = 402,
- ACCESS_REFUSED = 403,
- NOT_FOUND = 404,
- RESOURCE_LOCKED = 405,
- PRE_CONDITION_FAILED = 406,
- FRAME_ERROR = 501,
- SYNTAX_ERROR = 502,
- COMMAND_INVALID = 503,
- SESSION_ERROR = 504,
- NOT_ALLOWED = 530,
- NOT_IMPLEMENTED = 540,
- INTERNAL_ERROR = 541,
- INVALID_ARGUMENT = 542,
- UNDEFINED = 1
- }
-
- public struct ErrorCode
- {
- private int _code;
- private String _desc;
- private readonly bool _hardError;
-
- public ErrorCode(int code, String desc, bool hardError)
- {
- _code = code;
- _desc = desc;
- _hardError = hardError;
- }
-
- public int Code
- {
- get { return _code; }
- set { _code = value; }
- }
-
- public String Description
- {
- get { return _desc; }
- set { _desc = value; }
- }
-
- public bool ISHardError
- {
- get { return _hardError; }
- }
-
- public static ErrorCode GetErrorCode(int code)
- {
- switch (code)
- {
- case 200:
- return
- new ErrorCode(200, "reply-success", true);
- case 311:
- return
- new ErrorCode(311, "content-too-large", false);
- case 312:
- return
- new ErrorCode(312, "no-route", false);
- case 313:
- return
- new ErrorCode(313, "content-consumers", false);
- case 320:
- return
- new ErrorCode(320, "connection-forced", true);
- case 402:
- return
- new ErrorCode(402, "invalid-path", true);
- case 403:
- return
- new ErrorCode(403, "access-refused", false);
- case 404:
- return
- new ErrorCode(404, "not-found", false);
- case 405:
- return
- new ErrorCode(405, "resource-locked", false);
- case 406:
- return
- new ErrorCode(406, "precondition-failed", false);
- case 501:
- return
- new ErrorCode(501, "frame_error", true);
- case 502:
- return
- new ErrorCode(502, "syntax_error", true);
- case 503:
- return
- new ErrorCode(503, "command_invalid", true);
- case 504:
- return
- new ErrorCode(504, "sesion_error", true);
- case 530:
- return
- new ErrorCode(530, "not_allowed", true);
- case 540:
- return
- new ErrorCode(540, "not_implemented", true);
- case 541:
- return
- new ErrorCode(541, "internal_error", true);
- case 542:
- return
- new ErrorCode(542, "invalid_argument", true);
- default:
- return new ErrorCode(1, "undefined", true);
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/client/IClient.cs b/qpid/dotnet/client-010/client/client/IClient.cs
deleted file mode 100644
index b7b6c26957..0000000000
--- a/qpid/dotnet/client-010/client/client/IClient.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-using org.apache.qpid.transport;
-
-namespace org.apache.qpid.client
-{
- public interface IClient
- {
- /// <summary>
- /// Establish a connection with the broker using the given parameters
- ///
- /// </summary>
- /// <param name="host">host name</param>
- /// <param name="port">port number</param>
- /// <param name="virtualHost">virtualHost the virtual host name</param>
- /// <param name="username"> username user name</param>
- /// <param name="passwor">password password</param>
- void Connect(String host, int port, String virtualHost, String username, String password, String mechanism);
- void Connect(String host, int port, String virtualHost, String username, String password);
-
- /// <summary>
- /// Close this client
- /// </summary>
- void Close();
-
- /// <summary>
- /// Create a session for this connection.
- /// The returned session is suspended
- /// (i.e. this session is not attached to an underlying channel)
- /// </summary>
- /// <param name="expiryInSeconds">Expiry time expressed in seconds, if the value is less than
- /// or equal to 0 then the session does not expire.</param>
- /// <returns>A newly created (suspended) session.</returns>
- IClientSession CreateSession(long expiryInSeconds);
-
-
- event EventHandler<ExceptionArgs> ExceptionRaised;
- event EventHandler ConnectionLost;
-
- /// <summary>
- /// If the broker sends a disconnect message, it will notify the ClosedListener
- /// </summary>
- ///
- IClosedListener ClosedListener { set; }
-
-
-
- bool IsClosed { get; set; }
-
- /// <summary>
- /// Establishes a connection with a broker using SSL
- ///
- /// </summary>
- /// <param name="host">Host name on which a broker is deployed</param>
- /// <param name="port">Broker port </param>
- /// <param name="virtualHost">virtual host name</param>
- /// <param name="username">User Name</param>
- /// <param name="password">Password</param>
- /// <param name="serverName">Name of the SSL server</param>
- /// <param name="certPath">Path to the X509 certificate to be used for client authentication</param>
- /// <param name="rejectUntrusted">If true connection will not be established if the broker is not trusted</param>
- void ConnectSSL(String host, int port, String virtualHost, String username, String password, String mechanism, string serverName, string certPath, String certPass, bool rejectUntrusted);
- }
-}
diff --git a/qpid/dotnet/client-010/client/client/IClientSession.cs b/qpid/dotnet/client-010/client/client/IClientSession.cs
deleted file mode 100644
index 8667db1fb4..0000000000
--- a/qpid/dotnet/client-010/client/client/IClientSession.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic;
-using org.apache.qpid.transport;
-
-namespace org.apache.qpid.client
-{
- public interface IClientSession : ISession
- {
- void AttachMessageListener(IMessageListener listener, string Destination);
- Dictionary<String, IMessageListener> MessageListeners { get; }
- void MessageTransfer(String destination, string routingkey, IMessage message);
- void MessageTransfer(String destination, IMessage message);
- void QueueDeclare(String queue);
- void QueueDeclare(String queue, params Option[] options);
- void ExchangeBind(String queue, String exchange, String bindingKey);
- void MessageSubscribe(String queue);
- }
-}
diff --git a/qpid/dotnet/client-010/client/client/IClosedListener.cs b/qpid/dotnet/client-010/client/client/IClosedListener.cs
deleted file mode 100644
index 0e2472bba6..0000000000
--- a/qpid/dotnet/client-010/client/client/IClosedListener.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-
-namespace org.apache.qpid.client
-{
- public interface IClosedListener
- {
-
- void OnClosed(ErrorCode errorCode, String reason, Exception t);
- }
-}
diff --git a/qpid/dotnet/client-010/client/client/IMessage.cs b/qpid/dotnet/client-010/client/client/IMessage.cs
deleted file mode 100644
index 6eae826a4c..0000000000
--- a/qpid/dotnet/client-010/client/client/IMessage.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.IO;
-using org.apache.qpid.transport;
-
-namespace org.apache.qpid.client
-{
- public interface IMessage
- {
- int Id { get; }
-
- Header Header { get; set; }
-
- MessageProperties MessageProperties { get; set; }
-
- DeliveryProperties DeliveryProperties { get; set; }
-
- Dictionary<String, Object> ApplicationHeaders { get; set; }
-
- void AppendData(byte[] bytes);
-
- MemoryStream Body { get; }
-
- string Destination { get; }
-
- void ClearData();
- }
-}
diff --git a/qpid/dotnet/client-010/client/client/IMessageListener.cs b/qpid/dotnet/client-010/client/client/IMessageListener.cs
deleted file mode 100644
index 44ceb3721e..0000000000
--- a/qpid/dotnet/client-010/client/client/IMessageListener.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-
-namespace org.apache.qpid.client
-{
- public interface IMessageListener
- {
- /// <summary>
- /// Inform the listener of the message transfer
- /// </summary>
- /// <param name="xfr">The message transfer object</param>
- void MessageTransfer(IMessage xfr);
- }
-}
diff --git a/qpid/dotnet/client-010/client/client/Message.cs b/qpid/dotnet/client-010/client/client/Message.cs
deleted file mode 100644
index 6ab62070d2..0000000000
--- a/qpid/dotnet/client-010/client/client/Message.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System.Collections.Generic;
-using System.IO;
-using org.apache.qpid.transport;
-
-namespace org.apache.qpid.client
-{
- public class Message : IMessage
- {
- private readonly MessageTransfer _message;
-
- public Message(MessageTransfer m)
- {
- _message = m;
- }
-
- public Message()
- {
- _message = new MessageTransfer();
- _message.Header = new Header( new MessageProperties(), new DeliveryProperties());
- ((MessageProperties) _message.Header.Structs[0]).SetApplicationHeaders(new Dictionary<string, object>());
- }
-
- public MessageProperties MessageProperties
- {
- get
- {
- if (_message.Header != null && Header.Structs.Length > 1)
- return (MessageProperties) Header.Structs[0];
- return null;
- }
- set
- {
- if (_message.Header != null)
- {
- Header.Structs[0] = value;
- }
- }
- }
-
- public DeliveryProperties DeliveryProperties
- {
- get
- {
- if (Header != null)
- {
- if( Header.Structs.Length > 1 )
- return (DeliveryProperties)Header.Structs[1];
- return (DeliveryProperties)Header.Structs[0];
- }
-
- return null;
- }
- set
- {
- if (Header != null)
- {
- Header.Structs[1] = value;
- }
- }
- }
-
- public Dictionary<string, object> ApplicationHeaders
- {
- get
- {
- if (Header != null)
- return ((MessageProperties) Header.Structs[0]).GetApplicationHeaders();
- return null;
- }
- set
- {
- if (Header != null)
- {
- ((MessageProperties) Header.Structs[0]).SetApplicationHeaders(value);
- }
- }
- }
-
- public void AppendData(byte[] bytes)
- {
- Body.Write(bytes, 0, bytes.Length);
- }
-
- public void ClearData()
- {
- Body.Seek(0, SeekOrigin.Begin);
- }
-
- public Header Header
- {
- get{ return _message.Header;}
- set{ _message.Header = value;}
- }
-
- public MemoryStream Body
- {
- get { return _message.Body; }
- set { _message.Body = value; }
- }
-
- public int Id
- {
- get { return _message.Id; }
- }
-
- public string Destination
- {
- get{ return _message.GetDestination();}
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/default.build b/qpid/dotnet/client-010/client/default.build
deleted file mode 100644
index 139796a58d..0000000000
--- a/qpid/dotnet/client-010/client/default.build
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="qpid.client" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="library"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.dll">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/client-010/client/transport/Binary.cs b/qpid/dotnet/client-010/client/transport/Binary.cs
deleted file mode 100644
index f9bd3612dc..0000000000
--- a/qpid/dotnet/client-010/client/transport/Binary.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-namespace org.apache.qpid.transport
-{
-
-
- /// <summary>
- /// Binary
- /// </summary>
-
- public sealed class Binary
- {
-
- private readonly byte[] bytes;
- private readonly int offset_Renamed_Field;
- private readonly int size_Renamed_Field;
- private int hash = 0;
-
- public Binary(byte[] bytes, int offset, int size)
- {
- if (offset + size > bytes.Length)
- {
- throw new System.IndexOutOfRangeException();
- }
-
- this.bytes = bytes;
- offset_Renamed_Field = offset;
- size_Renamed_Field = size;
- }
-
- public Binary(byte[] bytes):this(bytes, 0, bytes.Length)
- {
- }
-
- public byte[] Array()
- {
- return bytes;
- }
-
- public int Offset()
- {
- return offset_Renamed_Field;
- }
-
- public int Size()
- {
- return size_Renamed_Field;
- }
-
- public Binary Slice(int low, int high)
- {
- int sz;
-
- if (high < 0)
- {
- sz = size_Renamed_Field + high;
- }
- else
- {
- sz = high - low;
- }
-
- if (sz < 0)
- {
- sz = 0;
- }
-
- return new Binary(bytes, offset_Renamed_Field + low, sz);
- }
-
- public override int GetHashCode()
- {
- if (hash == 0)
- {
- int hc = 0;
- for (int i = 0; i < size_Renamed_Field; i++)
- {
- hc = 31 * hc + (0xFF & bytes[offset_Renamed_Field + i]);
- }
- hash = hc;
- }
-
- return hash;
- }
-
- public override bool Equals(System.Object o)
- {
- if (!(o is Binary))
- {
- return false;
- }
-
- Binary buf = (Binary) o;
- if (size_Renamed_Field != buf.size_Renamed_Field)
- {
- return false;
- }
-
- for (int i = 0; i < size_Renamed_Field; i++)
- {
- if (bytes[offset_Renamed_Field + i] != buf.bytes[buf.offset_Renamed_Field + i])
- {
- return false;
- }
- }
-
- return true;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/Binding.cs b/qpid/dotnet/client-010/client/transport/Binding.cs
deleted file mode 100644
index a0899c1066..0000000000
--- a/qpid/dotnet/client-010/client/transport/Binding.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// Binding
- /// </summary>
- internal interface Binding<E, T>
- {
- E endpoint(Sender<T> sender);
-
- Receiver<R> receiver<R>(E endpoint) where R : EventArgs;
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/Channel.cs b/qpid/dotnet/client-010/client/transport/Channel.cs
deleted file mode 100644
index 48ba707182..0000000000
--- a/qpid/dotnet/client-010/client/transport/Channel.cs
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using org.apache.qpid.transport.network;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// Channel
- /// </summary>
- public class Channel : Invoker, IProtocolDelegate<Object>
- {
- private static readonly Logger log = Logger.Get(typeof (Channel));
-
- private readonly Connection _connection;
- private readonly int _channel;
- private readonly MethodDelegate<Channel> _methoddelegate;
- private readonly SessionDelegate _sessionDelegate;
- // session may be null
- private Session _session;
-
- public Channel(Connection connection, int channel, SessionDelegate sessionDelegate)
- {
- _connection = connection;
- _channel = channel;
- _methoddelegate = new ChannelDelegate();
- _sessionDelegate = sessionDelegate;
- }
-
- public Connection Connection
- {
- get { return _connection; }
- }
-
- // Invoked when a network event is received
- public void On_ReceivedEvent(object sender, ReceivedPayload<IProtocolEvent> payload)
- {
- if (payload.Payload.Channel == _channel)
- {
- payload.Payload.ProcessProtocolEvent(null, this);
- }
- }
-
- #region ProtocolDelegate<T>
-
- public void Init(Object v, ProtocolHeader hdr)
- {
- _connection.ConnectionDelegate.Init(this, hdr);
- }
-
- public void Control(Object v, Method method)
- {
- switch (method.EncodedTrack)
- {
- case Frame.L1:
- method.Dispatch(this, _connection.ConnectionDelegate);
- break;
- case Frame.L2:
- method.Dispatch(this, _methoddelegate);
- break;
- case Frame.L3:
- method.ProcessProtocolEvent(_session, _sessionDelegate);
- break;
- default:
- throw new Exception("unknown track: " + method.EncodedTrack);
- }
- }
-
- public void Command(Object v, Method method)
- {
- method.ProcessProtocolEvent(_session, _sessionDelegate);
- }
-
- public void Error(Object v, ProtocolError error)
- {
- throw new Exception(error.Message);
- }
-
- #endregion
-
- public void Exception(Exception t)
- {
- _session.Exception(t);
- }
-
- public void ClosedFromConnection()
- {
- log.Debug("channel Closed: ", this);
- if (_session != null)
- {
- _session.Closed();
- }
- }
-
- public void Closed()
- {
- log.Debug("channel Closed: ", this);
- if (_session != null)
- {
- _session.Closed();
- }
- _connection.RemoveChannel(_channel);
- }
-
- public int EncodedChannel
- {
- get { return _channel; }
- }
-
- public Session Session
- {
- get { return _session; }
- set { _session = value; }
- }
-
- public void CloseCode(ConnectionClose close)
- {
- if (_session != null)
- {
- _session.CloseCode(close);
- }
- }
-
- private void Emit(IProtocolEvent pevent)
- {
- pevent.Channel = _channel;
- _connection.Send(pevent);
- }
-
- public void Method(Method m)
- {
- Emit(m);
-
- if (!m.Batch)
- {
- _connection.Flush();
- }
- }
-
- protected override void Invoke(Method m)
- {
- Method(m);
- }
-
- public override IFuture Invoke(Method m, IFuture future)
- {
- throw new Exception("UnsupportedOperation");
- }
-
- public override String ToString()
- {
- return String.Format("{0}:{1}", _connection, _channel);
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/ChannelDelegate.cs b/qpid/dotnet/client-010/client/transport/ChannelDelegate.cs
deleted file mode 100644
index 3a43d6d231..0000000000
--- a/qpid/dotnet/client-010/client/transport/ChannelDelegate.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// ChannelDelegate
- ///
- /// </summary>
- internal class ChannelDelegate : MethodDelegate<Channel>
- {
- public override void SessionDetached(Channel channel, SessionDetached closed)
- {
- channel.Closed();
- }
-
- public override void SessionDetach(Channel channel, SessionDetach dtc)
- {
- channel.Session.Closed();
- channel.SessionDetached(dtc.GetName(), SessionDetachCode.NORMAL);
- channel.Closed();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/ClientDelegate.cs b/qpid/dotnet/client-010/client/transport/ClientDelegate.cs
deleted file mode 100644
index 957324ad41..0000000000
--- a/qpid/dotnet/client-010/client/transport/ClientDelegate.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using org.apache.qpid.transport;
-
-namespace org.apache.qpid.transport
-{
- abstract class ClientDelegate : ConnectionDelegate
- {
- public override void Init(Channel ch, ProtocolHeader hdr)
- {
- if (hdr.Major != 0 && hdr.Minor != 10)
- {
- throw new ProtocolVersionException((sbyte) hdr.Major, (sbyte) hdr.Minor);
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/Connection.cs b/qpid/dotnet/client-010/client/transport/Connection.cs
deleted file mode 100644
index b97357a96b..0000000000
--- a/qpid/dotnet/client-010/client/transport/Connection.cs
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.Collections.Generic;
-using Logger = org.apache.qpid.transport.util.Logger;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// Connection
- /// </summary>
- public class Connection
- {
- private static readonly Logger log = Logger.Get(typeof (Connection));
-
- private readonly ISender<IProtocolEvent> _sender;
- private readonly ConnectionDelegate _connDdelegate;
- private int _channelMax = 1;
- private int _connectionId;
- private readonly IReceiver<ReceivedPayload<IProtocolEvent>> _receiver;
-
- private readonly Dictionary<int, Channel> _channels = new Dictionary<int, Channel>();
-
- public Connection(IReceiver<ReceivedPayload<IProtocolEvent>> receiver, ISender<IProtocolEvent> sender, ConnectionDelegate connDdelegate)
- {
- _receiver = receiver;
- _sender = sender;
- _connDdelegate = connDdelegate;
- }
-
- public int ConnectionId
- {
- get { return _connectionId; }
- set { _connectionId = value; }
- }
-
- public ConnectionDelegate ConnectionDelegate
- {
- get { return _connDdelegate; }
- }
-
- public int ChannelMax
- {
- get { return _channelMax; }
- set { _channelMax = value; }
- }
-
- public void Send(IProtocolEvent pevent)
- {
- log.Debug("SEND: [{0}] {1}", this, pevent);
- _sender.Send(pevent);
- }
-
- public void Flush()
- {
- log.Debug("FLUSH: [{0}]", this);
- _sender.Flush();
- }
-
-
- public Channel GetChannel()
- {
- lock (_channels)
- {
- for (int i = 0; i < ChannelMax; i++)
- {
- if (!_channels.ContainsKey(i))
- {
- return GetChannel(i);
- }
- }
- throw new Exception("no more _channels available");
- }
- }
-
- public Channel GetChannel(int number)
- {
- lock (_channels)
- {
- Channel channel = null;
- if (_channels.Count > 0)
- {
- if( _channels.ContainsKey(number))
- channel = _channels[number];
- }
- if (channel == null)
- {
- channel = new Channel(this, number, _connDdelegate.GetSessionDelegate());
- _receiver.Received += channel.On_ReceivedEvent;
- _channels.Add(number, channel);
- }
- return channel;
- }
- }
-
- public void RemoveChannel(int number)
- {
- lock (_channels)
- {
- _receiver.Received -= _channels[number].On_ReceivedEvent;
- _channels.Remove(number);
- }
- }
-
- public void On_ReceivedEvent(object sender, ReceivedPayload<IProtocolEvent> payload)
- {
- log.Debug("RECV: [{0}] {1}", this, payload.Payload);
- if (_channels.ContainsKey(payload.Payload.Channel)) return;
- Channel channel = GetChannel(payload.Payload.Channel);
- channel.On_ReceivedEvent(sender, payload);
- }
-
- public void On_ReceivedException(Object sender, ExceptionArgs arg)
- {
- _connDdelegate.RaiseException(arg.Exception);
- }
-
- public void On_ReceivedClosed(Object sender, EventArgs arg)
- {
- log.Debug("Connection Closed: {0}", this);
- lock (_channels)
- {
- foreach (Channel ch in _channels.Values)
- {
- ch.ClosedFromConnection();
- }
- }
- _channels.Clear();
- _connDdelegate.Closed();
- }
-
-
- public void CloseCode(ConnectionClose close)
- {
- lock (_channels)
- {
- foreach (Channel ch in _channels.Values)
- {
- ch.CloseCode(close);
- }
- }
- }
-
- public void Close()
- {
- _sender.Close();
- }
- }
-
-}
diff --git a/qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs b/qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs
deleted file mode 100644
index 5d491bc06f..0000000000
--- a/qpid/dotnet/client-010/client/transport/ConnectionDelegate.cs
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Logger = org.apache.qpid.transport.util.Logger;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// ConnectionDelegate
- ///
- /// Currently only implemented client specific methods
- /// </summary>
- public abstract class ConnectionDelegate : MethodDelegate<Channel>
- {
- private static readonly Logger log = Logger.Get(typeof(ConnectionDelegate));
- private String _virtualHost;
-
- protected ManualResetEvent _negotiationComplete;
-
- public abstract SessionDelegate GetSessionDelegate();
-
- public abstract void RaiseException(Exception t);
-
- public abstract void Closed();
-
- public void SetCondition(ManualResetEvent negotiationComplete)
- {
- _negotiationComplete = negotiationComplete;
- }
-
- public virtual void Init(Channel ch, ProtocolHeader hdr)
- {
- ch.Connection.Send(new ProtocolHeader((byte)1, hdr.Major, hdr.Minor));
- List<Object> plain = new List<Object>();
- plain.Add("PLAIN");
- List<Object> utf8 = new List<Object>();
- utf8.Add("utf8");
- ch.ConnectionStart(null, plain, utf8);
- }
-
- public String VirtualHost
- {
- get { return _virtualHost; }
- set { _virtualHost = value; }
- }
-
- // ----------------------------------------------
- // Client side
- //-----------------------------------------------
- public override void ConnectionStart(Channel context, ConnectionStart mstruct)
- {
- Dictionary<String, Object> props = new Dictionary<String, Object>();
- context.ConnectionStartOk(props, null, null, "utf8");
- }
-
- public override void ConnectionSecure(Channel context, ConnectionSecure mstruct)
- { // todo SASL
- context.ConnectionSecureOk(new byte[0]);
- }
-
- public override void ConnectionTune(Channel context, ConnectionTune mstruct)
- {
- context.Connection.ChannelMax = mstruct.GetChannelMax();
- context.ConnectionTuneOk(mstruct.GetChannelMax(), mstruct.GetMaxFrameSize(), mstruct.GetHeartbeatMax());
- context.ConnectionOpen(_virtualHost, null, Option.INSIST);
- }
-
- public override void ConnectionOpenOk(Channel context, ConnectionOpenOk mstruct)
- {
- List<Object> knownHosts = mstruct.GetKnownHosts();
- if (_negotiationComplete != null)
- {
- _negotiationComplete.Set();
- }
- }
-
- public override void ConnectionRedirect(Channel context, ConnectionRedirect mstruct)
- {
- // not going to bother at the moment
- }
-
- public override void ConnectionClose(Channel ch, ConnectionClose close)
- {
- ch.Connection.CloseCode(close);
- ch.ConnectionCloseOk();
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/Field.cs b/qpid/dotnet/client-010/client/transport/Field.cs
deleted file mode 100644
index 9af8c4a476..0000000000
--- a/qpid/dotnet/client-010/client/transport/Field.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using org.apache.qpid.transport.codec;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// Field
- /// </summary>
- public abstract class Field<C, T>
- {
- private C container;
- private T type;
- private String name;
- private int index;
-
- protected Field(C container, T type, String name, int index)
- {
- this.container = container;
- this.type = type;
- this.name = name;
- this.index = index;
- }
-
- public C Container
- {
- get { return container; }
- }
-
- public T Type
- {
- get { return type; }
- }
-
- public String Name
- {
- get { return name; }
- }
-
- public int Index
- {
- get { return index; }
- }
-
- public abstract bool Has(Object mystruct);
-
- public abstract void Has(Object mystruct, bool value);
-
- public abstract T Get(Object mystruct);
-
- public abstract void Read(IDecoder dec, Object mystruct);
-
- public abstract void Write(IEncoder enc, Object mystruct);
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/Future.cs b/qpid/dotnet/client-010/client/transport/Future.cs
deleted file mode 100644
index c0eadfb7ae..0000000000
--- a/qpid/dotnet/client-010/client/transport/Future.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// Future
- /// </summary>
- public interface Future
- {
- Struct Result
- {
- get; set;
- }
-
- Session Session
- { set;
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/Header.cs b/qpid/dotnet/client-010/client/transport/Header.cs
deleted file mode 100644
index 742531cfd8..0000000000
--- a/qpid/dotnet/client-010/client/transport/Header.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// Header
- /// </summary>
- public class Header
- {
- private readonly Struct[] _mystructs;
-
- public Header(List<Struct> structs)
- : this(structs.ToArray())
- {
- }
-
- public Header(params Struct[] structs)
- {
- _mystructs = structs;
- }
-
- public Struct[] Structs
- {
- get { return _mystructs; }
- }
-
-
- public Struct Get(Struct klass)
- {
- foreach (Struct st in _mystructs)
- {
- if (Equals(st.GetType(), klass.GetType()))
- {
- return st;
- }
- }
- return null;
- }
-
- public override String ToString()
- {
- StringBuilder str = new StringBuilder();
- str.Append(" Header(");
- bool first = true;
- foreach (Struct s in _mystructs)
- {
- if (first)
- {
- first = false;
- }
- else
- {
- str.Append(", ");
- }
- str.Append(s);
- }
- str.Append(")");
- return str.ToString();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/IBinding.cs b/qpid/dotnet/client-010/client/transport/IBinding.cs
deleted file mode 100644
index 607212f1fe..0000000000
--- a/qpid/dotnet/client-010/client/transport/IBinding.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// Binding
- /// </summary>
- internal interface IBinding<E, T>
- {
- E Endpoint(ISender<T> sender);
-
- IReceiver<R> Receiver<R>(E endpoint) where R : EventArgs;
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/IFuture.cs b/qpid/dotnet/client-010/client/transport/IFuture.cs
deleted file mode 100644
index 054b828d13..0000000000
--- a/qpid/dotnet/client-010/client/transport/IFuture.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// Future
- /// </summary>
- public interface IFuture
- {
- Struct Result
- {
- get; set;
- }
-
- Session Session
- { set;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/IProtocolDelegate.cs b/qpid/dotnet/client-010/client/transport/IProtocolDelegate.cs
deleted file mode 100644
index a9875fd290..0000000000
--- a/qpid/dotnet/client-010/client/transport/IProtocolDelegate.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// ProtocolDelegate
- /// </summary>
- public interface IProtocolDelegate<T>
- {
- void Init(T context, ProtocolHeader header);
-
- void Control(T context, Method control);
-
- void Command(T context, Method command);
-
- void Error(T context, ProtocolError error);
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/IProtocolEvent.cs b/qpid/dotnet/client-010/client/transport/IProtocolEvent.cs
deleted file mode 100644
index 8f915b204a..0000000000
--- a/qpid/dotnet/client-010/client/transport/IProtocolEvent.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// IProtocolEvent
- /// </summary>
- public interface IProtocolEvent
- {
- int Channel
- {
- get;
- set;
- }
-
- byte EncodedTrack
- {
- set;
- get;
- }
-
- void ProcessProtocolEvent<C>(C context, IProtocolDelegate<C> protocoldelegate);
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/IReceiver.cs b/qpid/dotnet/client-010/client/transport/IReceiver.cs
deleted file mode 100644
index 4c4c9572b9..0000000000
--- a/qpid/dotnet/client-010/client/transport/IReceiver.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// a receiver will raise an event when:
- /// - data is received
- /// - an exception is thrown
- /// - it is Closed
- /// </summary>
- public interface IReceiver <T> where T : EventArgs
- {
- event EventHandler<T> Received;
- event EventHandler<ExceptionArgs> Exception;
- event EventHandler Closed;
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/ISender.cs b/qpid/dotnet/client-010/client/transport/ISender.cs
deleted file mode 100644
index d7d1781aec..0000000000
--- a/qpid/dotnet/client-010/client/transport/ISender.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// Sender
- /// </summary>
- public interface ISender<T>
- {
- void Send(T msg);
- void Flush();
- void Close();
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/ISession.cs b/qpid/dotnet/client-010/client/transport/ISession.cs
deleted file mode 100644
index e843095df6..0000000000
--- a/qpid/dotnet/client-010/client/transport/ISession.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic;
-
-namespace org.apache.qpid.transport
-{
- public interface ISession : IInvoker
- {
- bool IsClosed { get; set; }
- string Name { get; }
- int CommandsIn { get; set; }
- byte[] GetName();
- void SetAutoSync(bool value);
- Dictionary<int, Method> GetOutstandingCommands();
- int GetCommandsOut();
- int NextCommandId();
- void Identify(Method cmd);
- void Processed(Method command);
- void Processed(int command);
- void Processed(int lower, int upper);
- void Processed(Range range);
- void FlushProcessed(params Option[] options);
- void KnownComplete(RangeSet kc);
- void SyncPoint();
- void Attach(Channel channel);
- Method GetCommand(int id);
- bool Complete(int lower, int upper);
- void Sync();
- void Sync(long timeout);
- void Result(int command, Struct result);
- void AddException(ExecutionException exc);
- void CloseCode(ConnectionClose close);
- List<ExecutionException> GetExceptions();
-
- void MessageTransfer(String destination,
- MessageAcceptMode acceptMode,
- MessageAcquireMode acquireMode,
- Header header,
- byte[] body,
- params Option[] options);
-
- void MessageTransfer(String destination,
- MessageAcceptMode acceptMode,
- MessageAcquireMode acquireMode,
- Header header,
- String body,
- params Option[] options);
-
- void Close();
- void Exception(Exception t);
- void Closed();
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/Method.cs b/qpid/dotnet/client-010/client/transport/Method.cs
deleted file mode 100644
index 8540698822..0000000000
--- a/qpid/dotnet/client-010/client/transport/Method.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.IO;
-using System.Text;
-using Frame = org.apache.qpid.transport.network.Frame;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// Method
- /// </summary>
- public abstract class Method : Struct, IProtocolEvent
- {
- public new static Method Create(int type)
- {
- return (Method) StructFactory.createInstruction(type);
- }
-
- // XXX: command subclass?
- private int id;
- private int channel;
- private bool idSet;
- private bool sync;
- private bool batch;
-
- public int Id
- {
- get { return id; }
- set
- {
- id = value;
- idSet = true;
- }
- }
-
-
- public bool Sync
- {
- get { return sync; }
- set { sync = value; }
- }
-
- public bool Batch
- {
- get { return batch; }
- set { batch = value; }
- }
-
- public abstract bool HasPayload();
-
- public virtual Header Header
- {
- get { return null; }
- set { throw new Exception(); }
- }
-
- public virtual MemoryStream Body
- {
- get { return null; }
- set { throw new Exception(); }
- }
-
-
- public abstract void Dispatch<C>(C context, MethodDelegate<C> mdelegate );
-
- #region IProtocolEvent
-
- public int Channel
- {
- get { return channel; }
- set { channel = value; }
- }
-
- public abstract byte EncodedTrack { get; set; }
-
- public void ProcessProtocolEvent<C>(C context, IProtocolDelegate<C> protocoldelegate)
- {
- if (EncodedTrack == Frame.L4)
- {
- protocoldelegate.Command(context, this);
- }
- else
- {
- protocoldelegate.Control(context, this);
- }
- }
-
- #endregion
-
- public override String ToString()
- {
- StringBuilder str = new StringBuilder();
-
- str.Append("ch=");
- str.Append(channel);
-
- if (EncodedTrack == Frame.L4 && idSet)
- {
- str.Append(" id=");
- str.Append(id);
- }
-
- if (sync || batch)
- {
- str.Append(" ");
- str.Append("[");
- if (Sync)
- {
- str.Append("S");
- }
- if (Batch)
- {
- str.Append("B");
- }
- str.Append("]");
- }
- str.Append(" ");
- str.Append(base.ToString());
- if (Header != null)
- {
- str.Append(Header.ToString());
- }
- if (Body != null)
- {
- str.Append("\n body=");
- str.Append(Body.ToString());
- }
- return str.ToString();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/ProtocolDelegate.cs b/qpid/dotnet/client-010/client/transport/ProtocolDelegate.cs
deleted file mode 100644
index 32dbd116ff..0000000000
--- a/qpid/dotnet/client-010/client/transport/ProtocolDelegate.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// ProtocolDelegate
- /// </summary>
- public interface ProtocolDelegate<T>
- {
- void Init(T context, ProtocolHeader header);
-
- void Control(T context, Method control);
-
- void Command(T context, Method command);
-
- void Error(T context, ProtocolError error);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/ProtocolError.cs b/qpid/dotnet/client-010/client/transport/ProtocolError.cs
deleted file mode 100644
index 2a5bf39565..0000000000
--- a/qpid/dotnet/client-010/client/transport/ProtocolError.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using org.apache.qpid.transport.network;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// ProtocolError
- /// </summary>
- public sealed class ProtocolError : INetworkEvent, IProtocolEvent
- {
- private int channel;
- private byte track;
- private String format;
- private Object[] args;
-
- public ProtocolError(byte track, String format, params Object[] args)
- {
- this.track = track;
- this.format = format;
- this.args = args;
- }
-
- #region INetworkEvent Methods
-
- public void ProcessNetworkEvent(INetworkDelegate ndelegate)
- {
- ndelegate.Error(this);
- }
-
- #endregion
-
- #region IProtocolEvent Methods
-
- public int Channel
- {
- get { return channel; }
- set { channel = value; }
- }
-
- public byte EncodedTrack
- {
- get { return track; }
- set { throw new NotImplementedException(); }
- }
-
- public void ProcessProtocolEvent<C>(C context, IProtocolDelegate<C> protocoldelegate)
- {
- protocoldelegate.Error(context, this);
- }
-
- #endregion
-
- public String Message
- {
- get { return String.Format(format, args); }
- }
-
-
- public override String ToString()
- {
- return String.Format("protocol error: {0}", Message);
- }
-
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/ProtocolEvent.cs b/qpid/dotnet/client-010/client/transport/ProtocolEvent.cs
deleted file mode 100644
index 990d5ecc3a..0000000000
--- a/qpid/dotnet/client-010/client/transport/ProtocolEvent.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// ProtocolEvent
- /// </summary>
- public interface ProtocolEvent
- {
- int Channel
- {
- get;
- set;
- }
-
- byte EncodedTrack
- {
- set;
- get;
- }
-
- void ProcessProtocolEvent<C>(C context, ProtocolDelegate<C> protocoldelegate);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/ProtocolHeader.cs b/qpid/dotnet/client-010/client/transport/ProtocolHeader.cs
deleted file mode 100644
index 4adfee25df..0000000000
--- a/qpid/dotnet/client-010/client/transport/ProtocolHeader.cs
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.IO;
-using System.Text;
-using org.apache.qpid.transport.network;
-using Frame = org.apache.qpid.transport.network.Frame;
-
-namespace org.apache.qpid.transport
-{
- /// <summary> ProtocolHeader
- ///
- /// </summary>
- public sealed class ProtocolHeader : INetworkEvent, IProtocolEvent
- {
- private readonly char[] AMQP = new char[] {'A', 'M', 'Q', 'P'};
- private const byte CLASS = 1;
-
- private readonly byte instance;
- private readonly byte major;
- private readonly byte minor;
- private int channel;
-
- public ProtocolHeader(byte instance, byte major, byte minor)
- {
- this.instance = instance;
- this.major = major;
- this.minor = minor;
- }
-
- public ProtocolHeader(int instance, int major, int minor) : this((byte)instance, (byte)major, (byte)minor)
- {
- }
-
- #region INetworkEvent Methods
-
- public void ProcessNetworkEvent(INetworkDelegate ndelegate)
- {
- ndelegate.Init(this);
- }
-
- #endregion
-
- #region IProtocolEvent Methods
-
- public int Channel
- {
- get
- {
- return channel;
- }
- set
- {
- channel = value;
- }
- }
-
- public byte EncodedTrack
- {
- get
- {
- return Frame.L1;
- }
- set { throw new NotImplementedException(); }
- }
-
- public void ProcessProtocolEvent<C>(C context, IProtocolDelegate<C> protocoldelegate)
- {
- protocoldelegate.Init(context, this);
- }
-
- #endregion
-
- public byte Instance
- {
- get { return instance; }
- }
-
- public byte Major
- {
- get { return major; }
- }
-
- public byte Minor
- {
- get { return minor; }
- }
-
- public MemoryStream ToMemoryStream()
- {
- MemoryStream buf = new MemoryStream(8);
- BinaryWriter writer = new BinaryWriter(buf);
- writer.Write(AMQP);
- writer.Write(CLASS);
- writer.Write(instance);
- writer.Write((sbyte) major);
- writer.Write((sbyte) minor);
- return buf;
- }
-
- public override String ToString()
- {
- return String.Format("AMQP.{0:d} {1:d}-{2:d}", instance, major, minor);
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/Range.cs b/qpid/dotnet/client-010/client/transport/Range.cs
deleted file mode 100644
index 904b1c1229..0000000000
--- a/qpid/dotnet/client-010/client/transport/Range.cs
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.Collections.Generic;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport
-{
-
- /// <summary>
- /// Range
- /// </summary>
-
-
- public sealed class Range
- {
- private int _lower;
- private int _upper;
-
- public Range(int lower, int upper)
- {
- _lower = lower;
- _upper = upper;
- }
-
- public int Lower
- {
- get { return _lower; }
- set { _lower = value; }
- }
- public int Upper
- {
- get { return _upper; }
- set { _upper = value; }
- }
-
- public bool Includes(int value)
- {
- return Serial.Le(_lower, value) && Serial.Le(value, _upper);
- }
-
- public bool Includes(Range range)
- {
- return Includes(range._lower) && Includes(range._upper);
- }
-
- public bool Intersects(Range range)
- {
- return (Includes(range._lower) || Includes(range._upper) ||
- range.Includes(_lower) || range.Includes(_upper));
- }
-
- public bool Touches(Range range)
- {
- return (Intersects(range) ||
- Includes(range._upper + 1) || Includes(range._lower - 1) ||
- range.Includes(_upper + 1) || range.Includes(_lower - 1));
- }
-
- public Range Span(Range range)
- {
- return new Range(Serial.Min(_lower, range._lower), Serial.Max(_upper, range._upper));
- }
-
- public List<Range> Subtract(Range range)
- {
- List<Range> result = new List<Range>();
-
- if (Includes(range._lower) && Serial.Le(_lower, range._lower - 1))
- {
- result.Add(new Range(_lower, range._lower - 1));
- }
-
- if (Includes(range._upper) && Serial.Le(range._upper + 1, _upper))
- {
- result.Add(new Range(range._upper + 1, _upper));
- }
-
- if (result.Count == 0 && !range.Includes(this))
- {
- result.Add(this);
- }
-
- return result;
- }
-
- public Range Intersect(Range range)
- {
- int l = Serial.Max(_lower, range._lower);
- int r = Serial.Min(_upper, range._upper);
- return Serial.Gt(l, r) ? null : new Range(l, r);
- }
-
- public override String ToString()
- {
- return "[" + _lower + ", " + _upper + "]";
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/RangeSet.cs b/qpid/dotnet/client-010/client/transport/RangeSet.cs
deleted file mode 100644
index 0a856ee979..0000000000
--- a/qpid/dotnet/client-010/client/transport/RangeSet.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// RangeSet
- /// </summary>
- public sealed class RangeSet : IEnumerable<Range>
- {
- private readonly List<Range> _ranges = new List<Range>();
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return GetEnumerator();
- }
-
- public IEnumerator<Range> GetEnumerator()
- {
- return _ranges.GetEnumerator();
- }
-
-
- public int Size()
- {
- return _ranges.Count;
- }
-
-
- public Range GetFirst()
- {
- return _ranges[0];
- }
-
- public bool Includes(Range range)
- {
- foreach (Range r in this)
- {
- if (r.Includes(range))
- {
- return true;
- }
- }
-
- return false;
- }
-
- public bool Includes(int n)
- {
- foreach (Range r in this)
- {
- if (r.Includes(n))
- {
- return true;
- }
- }
-
- return false;
- }
-
- public void Add(Range range)
- {
- for (int i = 0; i < _ranges.Count; i++)
- {
- Range r = _ranges[i];
- if (range.Touches(r))
- {
- _ranges.Remove(r);
- range = range.Span(r);
- }
- else if (Serial.Lt(range.Upper, r.Lower))
- {
- _ranges.Insert(i - 1 , range);
- return;
- }
- }
- _ranges.Add(range);
- }
-
- public void Add(int lower, int upper)
- {
- Add(new Range(lower, upper));
- }
-
- public void Add(int value)
- {
- Add(value, value);
- }
-
- public void Clear()
- {
- _ranges.Clear();
- }
-
- public RangeSet Copy()
- {
- RangeSet copy = new RangeSet();
- foreach (Range r in _ranges)
- {
- copy._ranges.Add(r);
- }
- return copy;
- }
-
- public override String ToString()
- {
- StringBuilder str = new StringBuilder();
- str.Append("{");
- bool first = true;
- foreach (Range range in _ranges)
- {
- if (first)
- {
- first = false;
- }
- else
- {
- str.Append(", ");
- }
- str.Append(range);
- }
- str.Append("}");
- return str.ToString();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/ReceivedPayload.cs b/qpid/dotnet/client-010/client/transport/ReceivedPayload.cs
deleted file mode 100644
index e072ba7493..0000000000
--- a/qpid/dotnet/client-010/client/transport/ReceivedPayload.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-
-namespace org.apache.qpid.transport
-{
- public class ReceivedPayload<T> : EventArgs
- {
- public ReceivedPayload()
- {
- }
-
- public ReceivedPayload(T payload)
- {
- m_payload = payload;
- }
- private T m_payload;
-
- public T Payload
- {
- get { return m_payload; }
- set { m_payload = value; }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/Receiver.cs b/qpid/dotnet/client-010/client/transport/Receiver.cs
deleted file mode 100644
index f8d91c3f10..0000000000
--- a/qpid/dotnet/client-010/client/transport/Receiver.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// a receiver will raise an event when:
- /// - data is received
- /// - an exception is thrown
- /// - it is closed
- /// </summary>
- public interface Receiver <T> where T : EventArgs
- {
- event EventHandler<T> Received;
- event EventHandler<ExceptionArgs> Exception;
- event EventHandler Closed;
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/Sender.cs b/qpid/dotnet/client-010/client/transport/Sender.cs
deleted file mode 100644
index f8b5bdef06..0000000000
--- a/qpid/dotnet/client-010/client/transport/Sender.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// Sender
- /// </summary>
- public interface Sender<T>
- {
- void send(T msg);
- void flush();
- void close();
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/Session.cs b/qpid/dotnet/client-010/client/transport/Session.cs
deleted file mode 100644
index 7b4aff9811..0000000000
--- a/qpid/dotnet/client-010/client/transport/Session.cs
+++ /dev/null
@@ -1,522 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-using System.Threading;
-using org.apache.qpid.transport.util;
-using Frame = org.apache.qpid.transport.network.Frame;
-using Logger = org.apache.qpid.transport.util.Logger;
-
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// Session
- ///
- /// </summary>
- public class Session : Invoker, ISession
- {
- private static readonly Logger log = Logger.Get(typeof (Session));
- private static readonly bool ENABLE_REPLAY;
-
- static Session()
- {
- const string enableReplay = "enable_command_replay";
- try
- {
- String var = Environment.GetEnvironmentVariable(enableReplay);
- if (var != null)
- {
- ENABLE_REPLAY = bool.Parse(var);
- }
- }
- catch (Exception)
- {
- ENABLE_REPLAY = false;
- }
- }
-
- private readonly byte[] _name;
- private const long _timeout = 600000;
- private bool _autoSync = false;
-
- // channel may be null
- private Channel _channel;
-
- // incoming command count
- private int _commandsIn = 0;
- // completed incoming commands
- private readonly Object _processedLock = new Object();
- private RangeSet _processed = new RangeSet();
- private int _maxProcessed = - 1;
- private int _syncPoint = -1;
-
- // outgoing command count
- private int _commandsOut = 0;
- private readonly Dictionary<int, Method> _commands = new Dictionary<int, Method>();
- private int _maxComplete = - 1;
- private bool _needSync = false;
- private bool _closed;
- private readonly Dictionary<int, IFuture> _results = new Dictionary<int, IFuture>();
- private readonly List<ExecutionException> _exceptions = new List<ExecutionException>();
-
-
- public bool IsClosed
- {
- get
- {
- lock (this)
- {
- return _closed;
- }
- }
- set
- {
- lock (this)
- {
- _closed = value;
- }
- }
- }
-
- public string Name
- {
- get
- {
- ASCIIEncoding enc = new ASCIIEncoding();
- return enc.GetString(_name);
- }
- }
-
- public Session(byte[] name)
- {
- _name = name;
- }
-
- public byte[] GetName()
- {
- return _name;
- }
-
- public void SetAutoSync(bool value)
- {
- lock (_commands)
- {
- _autoSync = value;
- }
- }
-
- public Dictionary<int, Method> GetOutstandingCommands()
- {
- return _commands;
- }
-
- public int GetCommandsOut()
- {
- return _commandsOut;
- }
-
- public int CommandsIn
- {
- get { return _commandsIn; }
- set { _commandsIn = value; }
- }
-
- public int NextCommandId()
- {
- return _commandsIn++;
- }
-
- public void Identify(Method cmd)
- {
- int id = NextCommandId();
- cmd.Id = id;
-
- if (log.IsDebugEnabled())
- {
- log.Debug("ID: [{0}] %{1}", _channel, id);
- }
-
- //if ((id % 65536) == 0)
- if ((id & 0xff) == 0)
- {
- FlushProcessed(Option.TIMELY_REPLY);
- }
- }
-
- public void Processed(Method command)
- {
- Processed(command.Id);
- }
-
- public void Processed(int command)
- {
- Processed(new Range(command, command));
- }
-
- public void Processed(int lower, int upper)
- {
- Processed(new Range(lower, upper));
- }
-
- public void Processed(Range range)
- {
- log.Debug("{0} processed({1})", this, range);
-
- bool flush;
- lock (_processedLock)
- {
- _processed.Add(range);
- Range first = _processed.GetFirst();
- int lower = first.Lower;
- int upper = first.Upper;
- int old = _maxProcessed;
- if (Serial.Le(lower, _maxProcessed + 1))
- {
- _maxProcessed = Serial.Max(_maxProcessed, upper);
- }
- flush = Serial.Lt(old, _syncPoint) && Serial.Ge(_maxProcessed, _syncPoint);
- _syncPoint = _maxProcessed;
- }
- if (flush)
- {
- FlushProcessed();
- }
- }
-
- public void FlushProcessed(params Option[] options)
- {
- RangeSet copy;
- lock (_processedLock)
- {
- copy = _processed.Copy();
- }
- SessionCompleted(copy, options);
- }
-
- public void KnownComplete(RangeSet kc)
- {
- lock (_processedLock)
- {
- RangeSet newProcessed = new RangeSet();
- foreach (Range pr in _processed)
- {
- foreach (Range kr in kc)
- {
- foreach (Range r in pr.Subtract(kr))
- {
- newProcessed.Add(r);
- }
- }
- }
- _processed = newProcessed;
- }
- }
-
- public void SyncPoint()
- {
- int id = CommandsIn - 1;
- log.Debug("{0} synced to {1}", this, id);
- bool flush;
- lock (_processedLock)
- {
- _syncPoint = id;
- flush = Serial.Ge(_maxProcessed, _syncPoint);
- }
- if (flush)
- {
- FlushProcessed();
- }
- }
-
- public void Attach(Channel channel)
- {
- _channel = channel;
- _channel.Session = this;
- }
-
- public Method GetCommand(int id)
- {
- lock (_commands)
- {
- return _commands[id];
- }
- }
-
- public bool Complete(int lower, int upper)
- {
- //avoid autoboxing
- if (log.IsDebugEnabled())
- {
- log.Debug("{0} complete({1}, {2})", this, lower, upper);
- }
- lock (_commands)
- {
- int old = _maxComplete;
- for (int id = Serial.Max(_maxComplete, lower); Serial.Le(id, upper); id++)
- {
- _commands.Remove(id);
- }
- if (Serial.Le(lower, _maxComplete + 1))
- {
- _maxComplete = Serial.Max(_maxComplete, upper);
- }
- log.Debug("{0} commands remaining: {1}", this, _commands);
- Monitor.PulseAll(_commands);
- return Serial.Gt(_maxComplete, old);
- }
- }
-
- protected override void Invoke(Method m)
- {
- if (IsClosed)
- {
- List<ExecutionException> exc = GetExceptions();
- if (exc.Count > 0)
- {
- throw new SessionException(exc);
- }
- else if (_close != null)
- {
- throw new ConnectionException(_close);
- }
- else
- {
- throw new SessionClosedException();
- }
- }
-
- if (m.EncodedTrack == Frame.L4)
- {
- lock (_commands)
- {
- int next = _commandsOut++;
- m.Id = next;
- if (next == 0)
- {
- SessionCommandPoint(0, 0);
- }
- if (ENABLE_REPLAY)
- {
- _commands.Add(next, m);
- }
- if (_autoSync)
- {
- m.Sync = true;
- }
- _needSync = ! m.Sync;
- _channel.Method(m);
- if (_autoSync)
- {
- Sync();
- }
-
- // flush every 64K commands to avoid ambiguity on
- // wraparound
- if ((next%65536) == 0)
- {
- SessionFlush(Option.COMPLETED);
- }
- }
- }
- else
- {
- _channel.Method(m);
- }
- }
-
- public void Sync()
- {
- Sync(_timeout);
- }
-
- public void Sync(long timeout)
- {
- log.Debug("{0} sync()", this);
- lock (_commands)
- {
- int point = _commandsOut - 1;
-
- if (_needSync && Serial.Lt(_maxComplete, point))
- {
- ExecutionSync(Option.SYNC);
- }
-
- DateTime start = DateTime.Now;
- long elapsed = 0;
-
- while (!IsClosed && elapsed < timeout && Serial.Lt(_maxComplete, point))
- {
- log.Debug("{0} waiting for[{1}]: {2}, {3}", this, point,
- _maxComplete, _commands);
- Monitor.Wait(_commands, (int) (timeout - elapsed));
- elapsed = DateTime.Now.Subtract(start).Milliseconds;
- }
-
- if (Serial.Lt(_maxComplete, point))
- {
- if (IsClosed)
- {
- throw new SessionException(GetExceptions());
- }
- else
- {
- throw new Exception
- (String.Format
- ("timed out waiting for sync: complete = {0}, point = {1}", _maxComplete, point));
- }
- }
- }
- }
-
-
- public void Result(int command, Struct result)
- {
- IFuture future;
- lock (_results)
- {
- if (_results.ContainsKey(command))
- {
- future = _results[command];
- _results.Remove(command);
- }
- else
- {
- throw new Exception(String.Format("Cannot ger result {0} for {1}", command, result));
- }
- }
- future.Result = result;
- }
-
- public void AddException(ExecutionException exc)
- {
- lock (_exceptions)
- {
- _exceptions.Add(exc);
- }
- }
-
- private ConnectionClose _close = null;
-
- public void CloseCode(ConnectionClose close)
- {
- _close = close;
- }
-
- public List<ExecutionException> GetExceptions()
- {
- lock (_exceptions)
- {
- return new List<ExecutionException>(_exceptions);
- }
- }
-
- public override IFuture Invoke(Method m, IFuture future)
- {
- lock (_commands)
- {
- future.Session = this;
- int command = _commandsOut;
- lock (_results)
- {
- _results.Add(command, future);
- }
- Invoke(m);
- }
- return future;
- }
-
-
- public void MessageTransfer(String destination,
- MessageAcceptMode acceptMode,
- MessageAcquireMode acquireMode,
- Header header,
- byte[] body,
- params Option[] options)
- {
- MemoryStream mbody = new MemoryStream();
- mbody.Write(body,0, body.Length);
- MessageTransfer(destination, acceptMode, acquireMode, header,
- mbody, options);
- }
-
- public void MessageTransfer(String destination,
- MessageAcceptMode acceptMode,
- MessageAcquireMode acquireMode,
- Header header,
- String body,
- params Option[] options)
- {
- MessageTransfer(destination, acceptMode, acquireMode, header,
- new MemoryStream(Convert.ToByte(body)), options);
- }
-
- public void Close()
- {
- SessionRequestTimeout(0);
- SessionDetach(_name);
- lock (_commands)
- {
- DateTime start = DateTime.Now;
- long elapsed = 0;
-
- while (!IsClosed && elapsed < _timeout)
- {
- Monitor.Wait(_commands, (int) (_timeout - elapsed));
- elapsed = DateTime.Now.Subtract(start).Milliseconds;
- }
- }
- }
-
- public void Exception(Exception t)
- {
- log.Error(t, "Caught exception");
- }
-
- public void Closed()
- {
- IsClosed = true;
- lock (_commands)
- {
- Monitor.PulseAll(_commands);
- }
- lock (_results)
- {
- foreach (IFuture result in _results.Values)
- {
- lock (result)
- {
- Monitor.PulseAll(result);
- }
- }
- }
- _channel.Session = null;
- _channel = null;
- }
-
- public override String ToString()
- {
- return String.Format("session:{0}", _name);
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/SessionDelegate.cs b/qpid/dotnet/client-010/client/transport/SessionDelegate.cs
deleted file mode 100644
index 973e22df16..0000000000
--- a/qpid/dotnet/client-010/client/transport/SessionDelegate.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// SessionDelegate
- ///
- /// </summary>
- public abstract class SessionDelegate : MethodDelegate<Session>, IProtocolDelegate<Session>
- {
- public void Init(Session ssn, ProtocolHeader hdr)
- {
- }
-
- public void Control(Session ssn, Method method)
- {
- method.Dispatch(ssn, this);
- }
-
- public void Command(Session ssn, Method method)
- {
- ssn.Identify(method);
- method.Dispatch(ssn, this);
- if (!method.HasPayload())
- {
- ssn.Processed(method);
- }
- }
-
- public void Error(Session ssn, ProtocolError error)
- {
- }
-
- public override void ExecutionResult(Session ssn, ExecutionResult result)
- {
- ssn.Result(result.GetCommandId(), result.GetValue());
- }
-
- public override void ExecutionException(Session ssn, ExecutionException exc)
- {
- ssn.AddException(exc);
- }
-
- public override void SessionCompleted(Session ssn, SessionCompleted cmp)
- {
- RangeSet ranges = cmp.GetCommands();
- RangeSet known = null;
- if (cmp.GetTimelyReply())
- {
- known = new RangeSet();
- }
-
- if (ranges != null)
- {
- foreach (Range range in ranges)
- {
- bool advanced = ssn.Complete(range.Lower, range.Upper);
- if (advanced && known != null)
- {
- known.Add(range);
- }
- }
- }
-
- if (known != null)
- {
- ssn.SessionKnownCompleted(known);
- }
- }
-
- public override void SessionKnownCompleted(Session ssn, SessionKnownCompleted kcmp)
- {
- RangeSet kc = kcmp.GetCommands();
- if (kc != null)
- {
- ssn.KnownComplete(kc);
- }
- }
-
- public override void SessionFlush(Session ssn, SessionFlush flush)
- {
- if (flush.GetCompleted())
- {
- ssn.FlushProcessed();
- }
- if (flush.GetConfirmed())
- {
- ssn.FlushProcessed();
- }
- if (flush.GetExpected())
- {
- // to be done
- //throw new Exception("not implemented");
- }
- }
-
- public override void SessionCommandPoint(Session ssn, SessionCommandPoint scp)
- {
- ssn.CommandsIn = scp.GetCommandId();
- }
-
- public override void ExecutionSync(Session ssn, ExecutionSync sync)
- {
- ssn.SyncPoint();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/Struct.cs b/qpid/dotnet/client-010/client/transport/Struct.cs
deleted file mode 100644
index ff8d80fcb1..0000000000
--- a/qpid/dotnet/client-010/client/transport/Struct.cs
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Text;
-using org.apache.qpid.transport.codec;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// Struct
- /// </summary>
-
- public abstract class Struct : IEncodable
- {
- public static Struct Create(int type)
- {
- return StructFactory.create(type);
- }
-
- bool dirty = true;
-
- public bool Dirty
- {
- get { return dirty; }
- set { dirty = value; }
- }
-
- public abstract int GetStructType();
-
- public abstract int GetSizeWidth();
-
- public abstract int GetPackWidth();
-
- public int GetEncodedType()
- {
- int type = GetStructType();
- if (type < 0)
- {
- throw new Exception();
- }
- return type;
- }
-
- private bool IsBit<C, T>(Field<C, T> f)
- {
- return Equals(f.Type, typeof(Boolean));
- }
-
- private bool Packed()
- {
- return GetPackWidth() > 0;
- }
-
- private bool Encoded<C, T>(Field<C, T> f)
- {
- return !Packed() || !IsBit(f) && f.Has(this);
- }
-
- private int GetFlagWidth()
- {
- return (Fields.Count + 7) / 8;
- }
-
- private int GetFlagCount()
- {
- return 8 * GetPackWidth();
- }
-
- public abstract void Read(IDecoder dec);
-
- public abstract void Write(IEncoder enc);
-
- public abstract Dictionary<String, Object> Fields
- {
- get;
- }
-
- public override String ToString()
- {
- StringBuilder str = new StringBuilder();
- str.Append(GetType());
- str.Append("(");
- bool first = true;
- foreach (KeyValuePair<String, Object> me in Fields)
- {
- if (first)
- {
- first = false;
- }
- else
- {
- str.Append(", ");
- }
- str.Append(me.Key);
- str.Append("=");
- str.Append(me.Value);
- }
- str.Append(")");
- return str.ToString();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/codec/AbstractDecoder.cs b/qpid/dotnet/client-010/client/transport/codec/AbstractDecoder.cs
deleted file mode 100644
index 2e9e587407..0000000000
--- a/qpid/dotnet/client-010/client/transport/codec/AbstractDecoder.cs
+++ /dev/null
@@ -1,399 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Text;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport.codec
-{
- /// <summary>
- /// AbstractDecoder
- /// </summary>
- public abstract class AbstractDecoder : IDecoder
- {
- private readonly Dictionary<Binary, String> str8cache = new Dictionary<Binary, String>();
-
- protected abstract byte DoGet();
-
- protected abstract void DoGet(byte[] bytes);
- public abstract bool HasRemaining();
-
- protected byte Get()
- {
- return DoGet();
- }
-
- protected void Get(byte[] bytes)
- {
- DoGet(bytes);
- }
-
- protected Binary Get(int size)
- {
- byte[] bytes = new byte[size];
- Get(bytes);
- return new Binary(bytes);
- }
-
- protected short Uget()
- {
- return (short) (0xFF & Get());
- }
-
- public virtual short ReadUint8()
- {
- return Uget();
- }
-
- public abstract int ReadUint16();
-
-
- public abstract long ReadUint32();
-
-
- public int ReadSequenceNo()
- {
- return (int) ReadUint32();
- }
-
- public virtual long ReadUint64()
- {
- long l = 0;
- for (int i = 0; i < 8; i++)
- {
- l |= ((long) (0xFF & Get())) << (56 - i*8);
- }
- return l;
- }
-
- public abstract short ReadInt8();
- public abstract int ReadInt16();
- public abstract long ReadInt32() ;
- public abstract long ReadInt64();
- public abstract float ReadFloat() ;
- public abstract double ReadDouble() ;
-
- public long ReadDatetime()
- {
- return ReadUint64();
- }
-
- private static String Decode(byte[] bytes, int offset, int length, Encoding encoding)
- {
- return encoding.GetString(bytes, offset, length);
- }
-
- private static String Decode(byte[] bytes, Encoding encoding)
- {
- return Decode(bytes, 0, bytes.Length, encoding);
- }
-
- public String ReadStr8()
- {
- short size = ReadUint8();
- Binary bin = Get(size);
- String str;
- if (! str8cache.TryGetValue(bin, out str))
- {
- str = Decode(bin.Array(), bin.Offset(), bin.Size(), Encoding.UTF8);
- str8cache.Add(bin, str);
- }
- return str;
- }
-
- public String ReadStr16()
- {
- int size = ReadUint16();
- byte[] bytes = new byte[size];
- Get(bytes);
- return Decode(bytes, Encoding.UTF8);
- }
-
- public byte[] ReadVbin8()
- {
- int size = ReadUint8();
- byte[] bytes = new byte[size];
- Get(bytes);
- return bytes;
- }
-
- public byte[] ReadVbin16()
- {
- int size = ReadUint16();
- byte[] bytes = new byte[size];
- Get(bytes);
- return bytes;
- }
-
- public byte[] ReadVbin32()
- {
- int size = (int) ReadUint32();
- byte[] bytes = new byte[size];
- Get(bytes);
- return bytes;
- }
-
- public RangeSet ReadSequenceSet()
- {
- int count = ReadUint16()/8;
- if (count == 0)
- {
- return null;
- }
- RangeSet ranges = new RangeSet();
- for (int i = 0; i < count; i++)
- {
- ranges.Add(ReadSequenceNo(), ReadSequenceNo());
- }
- return ranges;
- }
-
- public RangeSet ReadByteRanges()
- {
- throw new Exception("not implemented");
- }
-
- public UUID ReadUuid()
- {
- long msb = ReadUint64();
- long lsb = ReadUint64();
- return new UUID(msb, lsb);
- }
-
- public String ReadContent()
- {
- throw new Exception("Deprecated");
- }
-
- public Struct ReadStruct(int type)
- {
- Struct st = Struct.Create(type);
- int width = st.GetSizeWidth();
- if (width > 0)
- {
- long size = ReadSize(width);
- if (size == 0)
- {
- return null;
- }
- }
- if (type > 0)
- {
- int code = ReadUint16();
- Debug.Assert(code == type);
- }
- st.Read(this);
- return st;
- }
-
- public Struct ReadStruct32()
- {
- long size = ReadUint32();
- if (size == 0)
- {
- return null;
- }
- int type = ReadUint16();
- Struct result = Struct.Create(type);
- result.Read(this);
- return result;
- }
-
- public Dictionary<String, Object> ReadMap()
- {
- long size = ReadUint32();
-
- if (size == 0)
- {
- return null;
- }
-
- long count = ReadUint32();
-
- Dictionary<String, Object> result = new Dictionary<String, Object>();
- for (int i = 0; i < count; i++)
- {
- String key = ReadStr8();
- byte code = Get();
- QpidType t = GetType(code);
- Object value = Read(t);
- result.Add(key, value);
- }
-
- return result;
- }
-
- public List<Object> ReadList()
- {
- long size = ReadUint32();
-
- if (size == 0)
- {
- return null;
- }
-
- long count = ReadUint32();
-
- List<Object> result = new List<Object>();
- for (int i = 0; i < count; i++)
- {
- byte code = Get();
- QpidType t = GetType(code);
- Object value = Read(t);
- result.Add(value);
- }
- return result;
- }
-
- public List<Object> ReadArray()
- {
- long size = ReadUint32();
-
- if (size == 0)
- {
- return null;
- }
-
- byte code = Get();
- QpidType t = GetType(code);
- long count = ReadUint32();
-
- List<Object> result = new List<Object>();
- for (int i = 0; i < count; i++)
- {
- Object value = Read(t);
- result.Add(value);
- }
- return result;
- }
-
- private QpidType GetType(byte code)
- {
- return QpidType.get(code);
- }
-
- private long ReadSize(QpidType t)
- {
- return t.Fixed ? t.Width : ReadSize(t.Width);
- }
-
- private long ReadSize(int width)
- {
- switch (width)
- {
- case 1:
- return ReadUint8();
- case 2:
- return ReadUint16();
- case 4:
- return ReadUint32();
- default:
- throw new Exception("illegal width: " + width);
- }
- }
-
- private byte[] ReadBytes(QpidType t)
- {
- long size = ReadSize(t);
- byte[] result = new byte[(int) size];
- Get(result);
- return result;
- }
-
- private Object Read(QpidType t)
- {
- switch (t.Code)
- {
- case Code.BIN8:
- case Code.UINT8:
- return ReadUint8();
- case Code.INT8:
- return Get();
- case Code.CHAR:
- return (char) Get();
- case Code.BOOLEAN:
- return Get() > 0;
-
- case Code.BIN16:
- case Code.UINT16:
- return ReadUint16();
- case Code.INT16:
- return (short) ReadUint16();
-
- case Code.BIN32:
- case Code.UINT32:
- return ReadUint32();
-
- case Code.CHAR_UTF32:
- case Code.INT32:
- return (int) ReadUint32();
-
- case Code.FLOAT:
- return (float)BitConverter.Int64BitsToDouble(ReadUint32() << 32);
-
- case Code.BIN64:
- case Code.UINT64:
- case Code.INT64:
- case Code.DATETIME:
- return ReadUint64();
-
- case Code.DOUBLE:
- return BitConverter.Int64BitsToDouble(ReadUint64());
- case Code.UUID:
- return ReadUuid();
- case Code.STR8:
- return ReadStr8();
- case Code.STR16:
- return ReadStr16();
- case Code.STR8_LATIN:
- case Code.STR8_UTF16:
- case Code.STR16_LATIN:
- case Code.STR16_UTF16:
- // XXX: need to do character conversion
- return Encoding.UTF8.GetString(ReadBytes(t));
-
- case Code.MAP:
- return ReadMap();
- case Code.LIST:
- return ReadList();
- case Code.ARRAY:
- return ReadArray();
- case Code.STRUCT32:
- return ReadStruct32();
-
- case Code.BIN40:
- case Code.DEC32:
- case Code.BIN72:
- case Code.DEC64:
- // XXX: what types are we supposed to use here?
- return ReadBytes(t);
-
- case Code.VOID:
- return null;
-
- default:
- return ReadBytes(t);
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs b/qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs
deleted file mode 100644
index eb8bdae80a..0000000000
--- a/qpid/dotnet/client-010/client/transport/codec/AbstractEncoder.cs
+++ /dev/null
@@ -1,590 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Text;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport.codec
-{
- /// <summary>
- /// AbstractEncoder
- /// </summary>
- public abstract class AbstractEncoder : IEncoder
- {
- private static readonly Dictionary<Type, Code> ENCODINGS = new Dictionary<Type, Code>();
- private readonly Dictionary<String, byte[]> str8cache = new Dictionary<String, byte[]>();
-
- static AbstractEncoder()
- {
- ENCODINGS.Add(typeof (Boolean), Code.BOOLEAN);
- ENCODINGS.Add(typeof (String), Code.STR16);
- ENCODINGS.Add(typeof (long), Code.INT64);
- ENCODINGS.Add(typeof (int), Code.INT32);
- ENCODINGS.Add(typeof (short), Code.INT16);
- ENCODINGS.Add(typeof (Byte), Code.INT8);
- ENCODINGS.Add(typeof (Dictionary<String, Object>), Code.MAP);
- ENCODINGS.Add(typeof (List<Object>), Code.LIST);
- ENCODINGS.Add(typeof (float), Code.FLOAT);
- ENCODINGS.Add(typeof (Double), Code.DOUBLE);
- ENCODINGS.Add(typeof (char), Code.CHAR);
- ENCODINGS.Add(typeof (byte[]), Code.VBIN32);
- ENCODINGS.Add(typeof (UUID), Code.UUID);
- }
-
- protected abstract void DoPut(byte b);
-
- protected abstract void DoPut(MemoryStream src);
-
-
- protected void Put(byte b)
- {
- DoPut(b);
- }
-
- protected void Put(MemoryStream src)
- {
- DoPut(src);
- }
-
- protected virtual void Put(byte[] bytes)
- {
- Put(new MemoryStream(bytes));
- }
-
- protected abstract int BeginSize8();
- protected abstract void EndSize8(int pos);
-
- protected abstract int BeginSize16();
- protected abstract void EndSize16(int pos);
-
- protected abstract int BeginSize32();
- protected abstract void EndSize32(int pos);
-
- public virtual void WriteUint8(short b)
- {
- Debug.Assert(b < 0x100);
- Put((byte) b);
- }
-
- public virtual void WriteUint16(int s)
- {
- Debug.Assert(s < 0x10000);
- Put((byte) Functions.Lsb(s >> 8));
- Put((byte) Functions.Lsb(s));
- }
-
- public virtual void WriteUint32(long i)
- {
- Debug.Assert(i < 0x100000000L);
- Put((byte) Functions.Lsb(i >> 24));
- Put((byte) Functions.Lsb(i >> 16));
- Put((byte) Functions.Lsb(i >> 8));
- Put((byte) Functions.Lsb(i));
- }
-
- public void WriteSequenceNo(int i)
- {
- WriteUint32(i);
- }
-
- public virtual void WriteUint64(long l)
- {
- for (int i = 0; i < 8; i++)
- {
- Put((byte) Functions.Lsb(l >> (56 - i*8)));
- }
- }
-
- public abstract void WriteInt8(short b) ;
- public abstract void WriteInt16(int s) ;
- public abstract void WriteInt32(long i) ;
- public abstract void WriteInt64(long l) ;
- public abstract void WriteFloat(float f) ;
- public abstract void WriteDouble(double d) ;
-
- public void WriteDatetime(long l)
- {
- WriteUint64(l);
- }
-
- private static byte[] Encode(String s, Encoding encoding)
- {
- return encoding.GetBytes(s);
- }
-
- public void WriteStr8(String s)
- {
- if (s == null)
- {
- s = "";
- }
-
- byte[] bytes;
- if (! str8cache.ContainsKey(s))
- {
- bytes = Encode(s, System.Text.Encoding.UTF8);
- str8cache.Add(s, bytes);
- }
- else
- {
- bytes = str8cache[s];
- }
- WriteUint8((short) bytes.Length);
- Put(bytes);
- }
-
- public void WriteStr16(String s)
- {
- if (s == null)
- {
- s = "";
- }
-
- byte[] bytes = Encode(s, System.Text.Encoding.UTF8);
- WriteUint16(bytes.Length);
- Put(bytes);
- }
-
- public void WriteVbin8(byte[] bytes)
- {
- if (bytes == null)
- {
- bytes = new byte[0];
- }
- if (bytes.Length > 255)
- {
- throw new Exception("array too long: " + bytes.Length);
- }
- WriteUint8((short) bytes.Length);
- Put(bytes);
- }
-
- public void WriteVbin16(byte[] bytes)
- {
- if (bytes == null)
- {
- bytes = new byte[0];
- }
- WriteUint16(bytes.Length);
- Put(bytes);
- }
-
- public void WriteVbin32(byte[] bytes)
- {
- if (bytes == null)
- {
- bytes = new byte[0];
- }
- WriteUint32(bytes.Length);
- Put(bytes);
- }
-
- public void WriteSequenceSet(RangeSet ranges)
- {
- if (ranges == null)
- {
- WriteUint16(0);
- }
- else
- {
- WriteUint16(ranges.Size()*8);
- foreach (Range range in ranges)
- {
- WriteSequenceNo(range.Lower);
- WriteSequenceNo(range.Upper);
- }
- }
- }
-
- public void WriteByteRanges(RangeSet ranges)
- {
- throw new Exception("not implemented");
- }
-
- public void WriteUuid(UUID uuid)
- {
- long msb = 0;
- long lsb = 0;
- if (uuid != null)
- {
- msb = uuid.MostSignificantBits;
- lsb = uuid.LeastSignificantBits;
- }
- WriteUint64(msb);
- WriteUint64(lsb);
- }
-
- public void WriteStruct(int type, Struct s)
- {
- if (s == null)
- {
- s = Struct.Create(type);
- }
-
- int width = s.GetSizeWidth();
- int pos = -1;
- if (width > 0)
- {
- pos = BeginSize(width);
- }
-
- if (type > 0)
- {
- WriteUint16(type);
- }
-
- s.Write(this);
-
- if (width > 0)
- {
- EndSize(width, pos);
- }
- }
-
- public void WriteStruct32(Struct s)
- {
- if (s == null)
- {
- WriteUint32(0);
- }
- else
- {
- int pos = BeginSize32();
- WriteUint16(s.GetEncodedType());
- s.Write(this);
- EndSize32(pos);
- }
- }
-
- private Code Encoding(Object value)
- {
- if (value == null)
- {
- return Code.VOID;
- }
-
- Type klass = value.GetType();
- Code type = Resolve(klass);
-
- if (type == Code.VOID)
- {
- throw new Exception
- ("unable to resolve type: " + klass + ", " + value);
- }
- else
- {
- return type;
- }
- }
-
- private static Code Resolve(Type klass)
- {
- Code type;
- if(ENCODINGS.ContainsKey(klass))
- {
- return ENCODINGS[klass];
- }
-
- Type sup = klass.BaseType;
- if (sup != null)
- {
- type = Resolve(sup);
-
- if (type != Code.VOID)
- {
- return type;
- }
- }
- foreach (Type iface in klass.GetInterfaces())
- {
- type = Resolve(iface);
- if (type != Code.VOID)
- {
- return type;
- }
- }
- return Code.VOID;
- }
-
- public void WriteMap(Dictionary<String, Object> map)
- {
- int pos = BeginSize32();
- if (map != null)
- {
- WriteUint32(map.Count);
- WriteMapEntries(map);
- }
- EndSize32(pos);
- }
-
- protected void WriteMapEntries(Dictionary<String, Object> map)
- {
- foreach (KeyValuePair<String, Object> entry in map)
- {
- String key = entry.Key;
- Object value = entry.Value;
- Code type = Encoding(value);
- WriteStr8(key);
- Put((byte) type);
- Write(type, value);
- }
- }
-
- public void WriteList(List<Object> list)
- {
- int pos = BeginSize32();
- if (list != null)
- {
- WriteUint32(list.Count);
- WriteListEntries(list);
- }
- EndSize32(pos);
- }
-
- protected void WriteListEntries(List<Object> list)
- {
- foreach (Object value in list)
- {
- Code type = Encoding(value);
- Put((byte) type);
- Write(type, value);
- }
- }
-
- public void WriteArray(List<Object> array)
- {
- int pos = BeginSize32();
- if (array != null)
- {
- WriteArrayEntries(array);
- }
- EndSize32(pos);
- }
-
- protected void WriteArrayEntries(List<Object> array)
- {
- Code type;
-
- if (array.Count == 0)
- {
- return;
- }
- else
- {
- type = Encoding(array[0]);
- }
- Put((byte) type);
- WriteUint32(array.Count);
-
- foreach (Object value in array)
- {
- Write(type, value);
- }
- }
-
- private void WriteSize(QpidType t, int size)
- {
- if (t.Fixed)
- {
- if (size != t.width)
- {
- throw new Exception("size does not match fixed width " + t.width + ": " + size);
- }
- }
- else
- {
- WriteSize(t.width, size);
- }
- }
-
- private void WriteSize(int width, int size)
- {
- // XXX: should check lengths
- switch (width)
- {
- case 1:
- WriteUint8((short) size);
- break;
- case 2:
- WriteUint16(size);
- break;
- case 4:
- WriteUint32(size);
- break;
- default:
- throw new Exception("illegal width: " + width);
- }
- }
-
- private int BeginSize(int width)
- {
- switch (width)
- {
- case 1:
- return BeginSize8();
- case 2:
- return BeginSize16();
- case 4:
- return BeginSize32();
- default:
- throw new Exception("illegal width: " + width);
- }
- }
-
- private void EndSize(int width, int pos)
- {
- switch (width)
- {
- case 1:
- EndSize8(pos);
- break;
- case 2:
- EndSize16(pos);
- break;
- case 4:
- EndSize32(pos);
- break;
- default:
- throw new Exception("illegal width: " + width);
- }
- }
-
- private void WriteBytes(QpidType t, byte[] bytes)
- {
- WriteSize(t, bytes.Length);
- Put(bytes);
- }
-
- private void Write(Code t, Object value)
- {
- switch (t)
- {
- case Code.BIN8:
- case Code.UINT8:
- WriteUint8((short) value);
- break;
- case Code.INT8:
- Put((Byte) value);
- break;
- case Code.CHAR:
- byte[] b = BitConverter.GetBytes((char) value);
- Put(b[0]);
- break;
- case Code.BOOLEAN:
- if ((bool) value)
- {
- Put(1);
- }
- else
- {
- Put(0);
- }
-
- break;
-
- case Code.BIN16:
- case Code.UINT16:
- WriteUint16((int) value);
- break;
-
- case Code.INT16:
- WriteUint16((short) value);
- break;
-
- case Code.BIN32:
- case Code.UINT32:
- WriteUint32((long) value);
- break;
-
- case Code.CHAR_UTF32:
- case Code.INT32:
- WriteUint32((int) value);
- break;
-
- case Code.FLOAT:
- WriteUint32(BitConverter.DoubleToInt64Bits((float) value) >> 32);
- break;
-
- case Code.BIN64:
- case Code.UINT64:
- case Code.INT64:
- case Code.DATETIME:
- WriteUint64((long) value);
- break;
-
- case Code.DOUBLE:
- WriteUint64( BitConverter.DoubleToInt64Bits((double) value));
- break;
-
- case Code.UUID:
- WriteUuid((UUID) value);
- break;
-
- case Code.STR8:
- WriteStr8((string) value);
- break;
-
- case Code.STR16:
- WriteStr16((string) value);
- break;
-
- case Code.STR8_LATIN:
- case Code.STR8_UTF16:
- case Code.STR16_LATIN:
- case Code.STR16_UTF16:
- // XXX: need to do character conversion
- WriteBytes(QpidType.get((byte) t), Encode((string) value, System.Text.Encoding.Unicode));
- break;
-
- case Code.MAP:
- WriteMap((Dictionary<String, Object>) value);
- break;
- case Code.LIST:
- WriteList((List<Object>) value);
- break;
- case Code.ARRAY:
- WriteList((List<Object>) value);
- break;
- case Code.STRUCT32:
- WriteStruct32((Struct) value);
- break;
-
- case Code.BIN40:
- case Code.DEC32:
- case Code.BIN72:
- case Code.DEC64:
- // XXX: what types are we supposed to use here?
- WriteBytes(QpidType.get((byte) t), (byte[]) value);
- break;
-
- case Code.VOID:
- break;
-
- default:
- WriteBytes(QpidType.get((byte) t), (byte[]) value);
- break;
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/codec/Decoder.cs b/qpid/dotnet/client-010/client/transport/codec/Decoder.cs
deleted file mode 100644
index 9afc23fd4e..0000000000
--- a/qpid/dotnet/client-010/client/transport/codec/Decoder.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Collections.Generic;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport.codec
-{
- /// <summary>
- /// Decoder
- /// </summary>
-
- public interface Decoder
- {
-
- bool hasRemaining();
-
- short readUint8();
- int readUint16();
- long readUint32();
- long readUint64();
-
- short readInt8();
- int readInt16();
- long readInt32();
- long readInt64();
-
- double readDouble() ;
- float readFloat() ;
- long readDatetime();
-
- UUID readUuid();
-
- int readSequenceNo();
- RangeSet readSequenceSet(); // XXX
- RangeSet readByteRanges(); // XXX
-
- String readStr8();
- String readStr16();
-
- byte[] readVbin8();
- byte[] readVbin16();
- byte[] readVbin32();
-
- Struct readStruct32();
- Dictionary<String, Object> readMap();
- List<Object> readList();
- List<Object> readArray();
-
- Struct readStruct(int type);
- }
-
-}
diff --git a/qpid/dotnet/client-010/client/transport/codec/Encodable.cs b/qpid/dotnet/client-010/client/transport/codec/Encodable.cs
deleted file mode 100644
index 71f4f62458..0000000000
--- a/qpid/dotnet/client-010/client/transport/codec/Encodable.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-namespace org.apache.qpid.transport.codec
-{
-
-
- /// <summary>
- /// Encodable
- /// </summary>
-
- public interface Encodable
- {
-
- void write(Encoder enc);
-
- void read(Decoder dec);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/codec/Encoder.cs b/qpid/dotnet/client-010/client/transport/codec/Encoder.cs
deleted file mode 100644
index 282e3ff5b5..0000000000
--- a/qpid/dotnet/client-010/client/transport/codec/Encoder.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Collections.Generic;
-using org.apache.qpid.transport.util;
-using RangeSet = org.apache.qpid.transport.RangeSet;
-using Struct = org.apache.qpid.transport.Struct;
-namespace org.apache.qpid.transport.codec
-{
- /// <summary>
- /// Encoder
- /// </summary>
-
- public interface Encoder
- {
-
- void writeUint8(short b);
- void writeUint16(int s);
- void writeUint32(long i);
- void writeUint64(long l);
-
- void writeInt8(short b);
- void writeInt16(int s);
- void writeInt32(long i);
- void writeInt64(long l);
-
- void writeFloat(float f) ;
- void writeDouble(double d) ;
-
- void writeDatetime(long l);
- void writeUuid(UUID uuid);
-
- void writeSequenceNo(int s);
- void writeSequenceSet(RangeSet ranges); // XXX
- void writeByteRanges(RangeSet ranges); // XXX
-
- void writeStr8(string s);
- void writeStr16(string s);
-
- void writeVbin8(byte[] bytes);
- void writeVbin16(byte[] bytes);
- void writeVbin32(byte[] bytes);
-
- void writeStruct32(Struct s);
- void writeMap(Dictionary<String, Object> map);
- void writeList(List<Object> list);
- void writeArray(List<Object> array);
-
- void writeStruct(int type, Struct s);
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/codec/IDecoder.cs b/qpid/dotnet/client-010/client/transport/codec/IDecoder.cs
deleted file mode 100644
index 7de2e93fe7..0000000000
--- a/qpid/dotnet/client-010/client/transport/codec/IDecoder.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Collections.Generic;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport.codec
-{
- /// <summary>
- /// Decoder
- /// </summary>
-
- public interface IDecoder
- {
-
- bool HasRemaining();
-
- short ReadUint8();
- int ReadUint16();
- long ReadUint32();
- long ReadUint64();
-
- short ReadInt8();
- int ReadInt16();
- long ReadInt32();
- long ReadInt64();
-
- double ReadDouble() ;
- float ReadFloat() ;
- long ReadDatetime();
-
- UUID ReadUuid();
-
- int ReadSequenceNo();
- RangeSet ReadSequenceSet(); // XXX
- RangeSet ReadByteRanges(); // XXX
-
- String ReadStr8();
- String ReadStr16();
-
- byte[] ReadVbin8();
- byte[] ReadVbin16();
- byte[] ReadVbin32();
-
- Struct ReadStruct32();
- Dictionary<String, Object> ReadMap();
- List<Object> ReadList();
- List<Object> ReadArray();
-
- Struct ReadStruct(int type);
- }
-
-}
diff --git a/qpid/dotnet/client-010/client/transport/codec/IEncodable.cs b/qpid/dotnet/client-010/client/transport/codec/IEncodable.cs
deleted file mode 100644
index 5c63e17fdd..0000000000
--- a/qpid/dotnet/client-010/client/transport/codec/IEncodable.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-namespace org.apache.qpid.transport.codec
-{
-
-
- /// <summary>
- /// Encodable
- /// </summary>
-
- public interface IEncodable
- {
-
- void Write(IEncoder enc);
-
- void Read(IDecoder dec);
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/codec/IEncoder.cs b/qpid/dotnet/client-010/client/transport/codec/IEncoder.cs
deleted file mode 100644
index 4ffc852052..0000000000
--- a/qpid/dotnet/client-010/client/transport/codec/IEncoder.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Collections.Generic;
-using org.apache.qpid.transport.util;
-using RangeSet = org.apache.qpid.transport.RangeSet;
-using Struct = org.apache.qpid.transport.Struct;
-namespace org.apache.qpid.transport.codec
-{
- /// <summary>
- /// Encoder
- /// </summary>
-
- public interface IEncoder
- {
-
- void WriteUint8(short b);
- void WriteUint16(int s);
- void WriteUint32(long i);
- void WriteUint64(long l);
-
- void WriteInt8(short b);
- void WriteInt16(int s);
- void WriteInt32(long i);
- void WriteInt64(long l);
-
- void WriteFloat(float f) ;
- void WriteDouble(double d) ;
-
- void WriteDatetime(long l);
- void WriteUuid(UUID uuid);
-
- void WriteSequenceNo(int s);
- void WriteSequenceSet(RangeSet ranges); // XXX
- void WriteByteRanges(RangeSet ranges); // XXX
-
- void WriteStr8(string s);
- void WriteStr16(string s);
-
- void WriteVbin8(byte[] bytes);
- void WriteVbin16(byte[] bytes);
- void WriteVbin32(byte[] bytes);
-
- void WriteStruct32(Struct s);
- void WriteMap(Dictionary<String, Object> map);
- void WriteList(List<Object> list);
- void WriteArray(List<Object> array);
-
- void WriteStruct(int type, Struct s);
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/codec/MSDecoder.cs b/qpid/dotnet/client-010/client/transport/codec/MSDecoder.cs
deleted file mode 100644
index 59731b739a..0000000000
--- a/qpid/dotnet/client-010/client/transport/codec/MSDecoder.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.IO;
-using System.Text;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport.codec
-{
-
-
- /// <summary>
- /// MSDecoder
- ///
- /// </summary>
-
-
- public sealed class MSDecoder : AbstractDecoder
- {
-
- private BinaryReader _reader;
-
- public void Init(MemoryStream st)
- {
- _reader = new BinaryReader(st, Encoding.BigEndianUnicode);
- }
-
- protected override byte DoGet()
- {
- return _reader.ReadByte();
- }
-
- protected override void DoGet(byte[] bytes)
- {
- _reader.Read(bytes, 0, bytes.Length);
- }
-
- public override bool HasRemaining()
- {
- return (_reader.BaseStream.Position < _reader.BaseStream.Length);
- }
-
- public override short ReadUint8()
- {
- return (short) (0xFF & _reader.ReadByte());
- }
-
- public override int ReadUint16()
- {
- return ByteEncoder.GetBigEndian((UInt16) _reader.ReadInt16());
- }
-
- public override long ReadUint32()
- {
- return ByteEncoder.GetBigEndian((UInt32) _reader.ReadInt32());
- }
-
- public override long ReadUint64()
- {
- return (long) ByteEncoder.GetBigEndian(_reader.ReadInt64());
- }
-
- public override short ReadInt8()
- {
- return (short) (0xFF & _reader.ReadByte());
- }
-
- public override int ReadInt16()
- {
- return ByteEncoder.GetBigEndian((Int16) _reader.ReadInt16());
- }
-
- public override long ReadInt32()
- {
- return ByteEncoder.GetBigEndian((Int32) _reader.ReadInt32());
- }
-
- public override long ReadInt64()
- {
- return (long) ByteEncoder.GetBigEndian(_reader.ReadInt64());
- }
-
- public override double ReadDouble() {
- return (double) ByteEncoder.GetBigEndian(_reader.ReadDouble()) ;
- }
-
- public override float ReadFloat() {
- return (float) _reader.ReadSingle() ;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/codec/MSEncoder.cs b/qpid/dotnet/client-010/client/transport/codec/MSEncoder.cs
deleted file mode 100644
index d863c57dee..0000000000
--- a/qpid/dotnet/client-010/client/transport/codec/MSEncoder.cs
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Diagnostics;
-using System.IO;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport.codec
-{
- /// <summary>
- /// MSEncoder
- /// </summary>
- public sealed class MSEncoder : AbstractEncoder
- {
- private readonly MemoryStream _out;
- private readonly BinaryWriter _writer;
-
- public MSEncoder(int capacity)
- {
- _out = new MemoryStream(capacity);
- _writer = new BinaryWriter(_out);
- }
-
- public void Init()
- {
- _out.Seek(0, SeekOrigin.Begin);
- }
-
- public MemoryStream Segment()
- {
- int length = (int) _out.Position;
- MemoryStream result = new MemoryStream(_out.ToArray(), 0, length);
- result.Seek(length, SeekOrigin.Begin);
- _out.Seek(0, SeekOrigin.Begin);
- return result;
- }
-
-
- protected override void DoPut(byte b)
- {
- _writer.Write(b);
- }
-
- protected override void DoPut(MemoryStream src)
- {
- _writer.Write(src.ToArray());
- }
-
- protected override void Put(byte[] bytes)
- {
- _writer.Write(bytes);
- }
-
- public override void WriteUint8(short b)
- {
- Debug.Assert(b < 0x100);
- _writer.Write((byte) b);
- }
-
- public override void WriteUint16(int s)
- {
- Debug.Assert(s < 0x10000);
- _writer.Write(ByteEncoder.GetBigEndian((UInt16) s));
- }
-
- public override void WriteUint32(long i)
- {
- Debug.Assert(i < 0x100000000L);
- _writer.Write(ByteEncoder.GetBigEndian((UInt32) i));
- }
-
- public override void WriteUint64(long l)
- {
- _writer.Write(ByteEncoder.GetBigEndian(l));
- }
-
- public override void WriteInt8(short b)
- {
- Debug.Assert(b < 0x100);
- _writer.Write((byte) b);
- }
-
- public override void WriteInt16(int s)
- {
- Debug.Assert(s < 0x10000);
- _writer.Write(ByteEncoder.GetBigEndian((Int16) s));
- }
-
- public override void WriteInt32(long i)
- {
- Debug.Assert(i < 0x100000000L);
- _writer.Write(ByteEncoder.GetBigEndian((Int32) i));
- }
-
- public override void WriteInt64(long l)
- {
- _writer.Write(ByteEncoder.GetBigEndian(l));
- }
-
- public override void WriteFloat(float f) {
- _writer.Write(f) ;
- }
-
- public override void WriteDouble(double d) {
- _writer.Write(ByteEncoder.GetBigEndian(d)) ;
- }
-
- protected override int BeginSize8()
- {
- int pos = (int) _out.Position;
- _writer.Write((byte) 0);
- return pos;
- }
-
- protected override void EndSize8(int pos)
- {
- int cur = (int) _out.Position;
- _out.Seek(pos, SeekOrigin.Begin);
- _writer.Write((byte) (cur - pos - 1));
- _out.Seek(cur, SeekOrigin.Begin);
- }
-
- protected override int BeginSize16()
- {
- int pos = (int) _out.Position;
- _writer.Write((short) 0);
- return pos;
- }
-
- protected override void EndSize16(int pos)
- {
- int cur = (int) _out.Position;
- _out.Seek(pos, SeekOrigin.Begin);
- _writer.Write((short) (cur - pos - 2));
- _out.Seek(cur, SeekOrigin.Begin);
- }
-
- protected override int BeginSize32()
- {
- int pos = (int) _out.Position;
- _writer.Write(0);
- return pos;
- }
-
- protected override void EndSize32(int pos)
- {
- int cur = (int) _out.Position;
- _out.Seek(pos, SeekOrigin.Begin);
- _writer.Write(ByteEncoder.GetBigEndian((Int32) cur - pos - 4));
- _out.Seek(cur, SeekOrigin.Begin);
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/exception/ConnectionException.cs b/qpid/dotnet/client-010/client/transport/exception/ConnectionException.cs
deleted file mode 100644
index cbf5e39e52..0000000000
--- a/qpid/dotnet/client-010/client/transport/exception/ConnectionException.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-namespace org.apache.qpid.transport
-{
-
-
- /// <summary>
- /// ConnectionException
- /// </summary>
-
- [Serializable]
- public class ConnectionException : Exception
- {
- virtual public ConnectionClose Close
- {
- get
- {
- return _close;
- }
-
- }
-
- private ConnectionClose _close;
-
- public ConnectionException(ConnectionClose close):base(close.GetReplyText())
- {
- _close = close;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs b/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs
deleted file mode 100644
index 01793a6ad0..0000000000
--- a/qpid/dotnet/client-010/client/transport/exception/ExceptionArgs.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-
-namespace org.apache.qpid.transport
-{
- public class ExceptionArgs : EventArgs
- {
- public ExceptionArgs(Exception e)
- {
- _exception = e;
- }
- private Exception _exception;
-
- public Exception Exception
- {
- get { return _exception; }
- set { _exception = value; }
- }
-
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/exception/ProtocolVersionException.cs b/qpid/dotnet/client-010/client/transport/exception/ProtocolVersionException.cs
deleted file mode 100644
index f18fc1173f..0000000000
--- a/qpid/dotnet/client-010/client/transport/exception/ProtocolVersionException.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-namespace org.apache.qpid.transport
-{
-
-
- /// <summary> ProtocolVersionException
- ///
- /// </summary>
-
- [Serializable]
- public sealed class ProtocolVersionException:TransportException
- {
- public sbyte Major
- {
- get
- {
- return _major;
- }
-
- }
- public sbyte Minor
- {
- get
- {
- return _minor;
- }
-
- }
-
- private sbyte _major;
- private sbyte _minor;
-
- public ProtocolVersionException(sbyte major, sbyte minor):base(String.Format("version missmatch: %{0}-{1}", major, minor))
- {
- this._major = major;
- this._minor = minor;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/exception/SessionClosedException.cs b/qpid/dotnet/client-010/client/transport/exception/SessionClosedException.cs
deleted file mode 100644
index 89453433ee..0000000000
--- a/qpid/dotnet/client-010/client/transport/exception/SessionClosedException.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System.Collections.Generic;
-
-namespace org.apache.qpid.transport
-{
-
-
- /// <summary>
- /// SessionClosedException
- /// </summary>
-
- public class SessionClosedException : SessionException
- {
-
- public SessionClosedException(): base(new List<ExecutionException>())
- {
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/exception/SessionException.cs b/qpid/dotnet/client-010/client/transport/exception/SessionException.cs
deleted file mode 100644
index f02ffa5c2f..0000000000
--- a/qpid/dotnet/client-010/client/transport/exception/SessionException.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.Collections.Generic;
-
-namespace org.apache.qpid.transport
-{
- /// <summary>
- /// SessionException
- /// </summary>
- public class SessionException : Exception
- {
- private readonly List<ExecutionException> _exceptions;
-
- public SessionException(List<ExecutionException> exceptions)
- : base(exceptions.Count == 0 ? "" : exceptions.ToString())
-
- {
- _exceptions = exceptions;
- }
-
- public List<ExecutionException> Exceptions
- {
- get { return _exceptions; }
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/exception/TransportException.cs b/qpid/dotnet/client-010/client/transport/exception/TransportException.cs
deleted file mode 100644
index d016f90a83..0000000000
--- a/qpid/dotnet/client-010/client/transport/exception/TransportException.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-namespace org.apache.qpid.transport
-{
-
-
- /// <summary>
- /// TransportException
- /// </summary>
-
-
- public class TransportException : Exception
- {
- public TransportException(String msg) : base(msg)
- {
- }
-
- public TransportException(String msg, Exception cause) : base(msg, cause)
- {
- }
-
- public TransportException(Exception cause): base("Transport Exception", cause)
- {
- }
-
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/network/Assembler.cs b/qpid/dotnet/client-010/client/transport/network/Assembler.cs
deleted file mode 100644
index ff85f11c2f..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/Assembler.cs
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using org.apache.qpid.transport.codec;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport.network
-{
- /// <summary>
- /// Assembler
- /// </summary>
- public delegate void Processor(INetworkDelegate ndelegate);
-
- public class Assembler : INetworkDelegate, IReceiver<ReceivedPayload<IProtocolEvent>>
- {
- private static readonly Logger log = Logger.Get(typeof (Assembler));
- private readonly Dictionary<int, List<byte[]>> segments;
- private readonly Method[] incomplete;
- [ThreadStatic] static MSDecoder _decoder;
- private readonly Object m_objectLock = new object();
-
- // the event raised when a buffer is read from the wire
- public event EventHandler<ReceivedPayload<IProtocolEvent>> ReceivedEvent;
- public event EventHandler Closed;
-
-
- // Not in use :
- public event EventHandler<ExceptionArgs> Exception;
-
- event EventHandler<ReceivedPayload<IProtocolEvent>> IReceiver<ReceivedPayload<IProtocolEvent>>.Received
- {
- add
- {
- lock (m_objectLock)
- {
- ReceivedEvent += value;
- }
- }
- remove
- {
- lock (m_objectLock)
- {
- ReceivedEvent -= value;
- }
- }
- }
-
- public Assembler()
- {
- segments = new Dictionary<int, List<byte[]>>();
- incomplete = new Method[64*1024];
- }
-
- // Invoked when a network event is received
- public void On_ReceivedEvent(object sender, ReceivedPayload<INetworkEvent> payload)
- {
- payload.Payload.ProcessNetworkEvent(this);
- }
-
- #region Interface INetworkDelegate
-
- public void Init(ProtocolHeader header)
- {
- Emit(0, header);
- }
-
- public void Error(ProtocolError error)
- {
- Emit(0, error);
- }
-
- public void Frame(Frame frame)
- {
- MemoryStream segment;
- if (frame.IsFirstFrame() && frame.IsLastFrame())
- {
- byte[] tmp = new byte[frame.BodySize];
- frame.Body.Read(tmp, 0, tmp.Length);
- segment = new MemoryStream();
- BinaryWriter w = new BinaryWriter(segment);
- w.Write(tmp);
- Assemble(frame, new MemoryStream(tmp));
- }
- else
- {
- List<byte[]> frames;
- if (frame.IsFirstFrame())
- {
- frames = new List<byte[]>();
- SetSegment(frame, frames);
- }
- else
- {
- frames = GetSegment(frame);
- }
- byte[] tmp = new byte[frame.BodySize];
- frame.Body.Read(tmp, 0, tmp.Length);
- frames.Add(tmp);
-
- if (frame.IsLastFrame())
- {
- ClearSegment(frame);
- segment = new MemoryStream();
- BinaryWriter w = new BinaryWriter(segment);
- foreach (byte[] f in frames)
- {
- w.Write(f);
- }
- Assemble(frame, segment);
- }
- }
- }
-
- #endregion
-
- #region Private Support Functions
-
-
- private MSDecoder GetDecoder()
- {
- if( _decoder == null )
- {
- _decoder = new MSDecoder();
- }
- return _decoder;
- }
-
- private void Assemble(Frame frame, MemoryStream segment)
- {
- MSDecoder decoder = GetDecoder();
- decoder.Init(segment);
- int channel = frame.Channel;
- Method command;
- switch (frame.Type)
- {
- case SegmentType.CONTROL:
- int controlType = decoder.ReadUint16();
- Method control = Method.Create(controlType);
- control.Read(decoder);
- Emit(channel, control);
- break;
- case SegmentType.COMMAND:
- int commandType = decoder.ReadUint16();
- // read in the session header, right now we don't use it
- decoder.ReadUint16();
- command = Method.Create(commandType);
- command.Read(decoder);
- if (command.HasPayload())
- {
- incomplete[channel] = command;
- }
- else
- {
- Emit(channel, command);
- }
- break;
- case SegmentType.HEADER:
- command = incomplete[channel];
- List<Struct> structs = new List<Struct>();
- while (decoder.HasRemaining())
- {
- structs.Add(decoder.ReadStruct32());
- }
- command.Header = new Header(structs);
- if (frame.IsLastSegment())
- {
- incomplete[channel] = null;
- Emit(channel, command);
- }
- break;
- case SegmentType.BODY:
- command = incomplete[channel];
- segment.Seek(0, SeekOrigin.Begin);
- command.Body = segment;
- incomplete[channel] = null;
- Emit(channel, command);
- break;
- default:
- throw new Exception("unknown frame type: " + frame.Type);
- }
- }
-
- private int SegmentKey(Frame frame)
- {
- return (frame.Track + 1)*frame.Channel;
- }
-
- private List<byte[]> GetSegment(Frame frame)
- {
- return segments[SegmentKey(frame)];
- }
-
- private void SetSegment(Frame frame, List<byte[]> segment)
- {
- int key = SegmentKey(frame);
- if (segments.ContainsKey(key))
- {
- Error(new ProtocolError(network.Frame.L2, "segment in progress: %s",
- frame));
- }
- segments.Add(SegmentKey(frame), segment);
- }
-
- private void ClearSegment(Frame frame)
- {
- segments.Remove(SegmentKey(frame));
- }
-
- // Emit a protocol event
- private void Emit(int channel, IProtocolEvent protevent)
- {
- protevent.Channel = channel;
- log.Debug("Assembler: protocol event:", protevent);
- ReceivedPayload<IProtocolEvent> payload = new ReceivedPayload<IProtocolEvent>();
- payload.Payload = protevent;
-
- if (protevent is ConnectionCloseOk)
- {
- if (Closed != null)
- Closed(this, EventArgs.Empty);
- }
- else
- {
- if (ReceivedEvent != null)
- ReceivedEvent(this, payload);
- else
- log.Debug("No listener for event: {0}", protevent);
- }
- }
-
- #endregion
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/network/Disassembler.cs b/qpid/dotnet/client-010/client/transport/network/Disassembler.cs
deleted file mode 100644
index 3f0a6a8974..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/Disassembler.cs
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.IO;
-using org.apache.qpid.transport.codec;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport.network
-{
- /// <summary>
- /// Disassembler
- /// </summary>
- public sealed class Disassembler : ISender<IProtocolEvent>, IProtocolDelegate<Object>
- {
- private readonly IIoSender<MemoryStream> _sender;
- private readonly int _maxPayload;
- private readonly MemoryStream _header;
- private readonly BinaryWriter _writer;
- private readonly Object _sendlock = new Object();
- [ThreadStatic] static MSEncoder _encoder;
-
-
- public Disassembler(IIoSender<MemoryStream> sender, int maxFrame)
- {
- if (maxFrame <= network.Frame.HEADER_SIZE || maxFrame >= 64*1024)
- {
- throw new Exception(String.Format("maxFrame must be > {0} and < 64K: ", network.Frame.HEADER_SIZE) + maxFrame);
- }
- _sender = sender;
- _maxPayload = maxFrame - network.Frame.HEADER_SIZE;
- _header = new MemoryStream(network.Frame.HEADER_SIZE);
- _writer = new BinaryWriter(_header);
- }
-
- #region Sender Interface
-
- public void Send(IProtocolEvent pevent)
- {
- pevent.ProcessProtocolEvent(null, this);
- }
-
- public void Flush()
- {
- lock (_sendlock)
- {
- _sender.Flush();
- }
- }
-
- public void Close()
- {
- lock (_sendlock)
- {
- _sender.Close();
- }
- }
-
- #endregion
-
- #region ProtocolDelegate<Object> Interface
-
- public void Init(Object v, ProtocolHeader header)
- {
- lock (_sendlock)
- {
- _sender.Send(header.ToMemoryStream());
- _sender.Flush();
- }
- }
-
- public void Control(Object v, Method method)
- {
- InvokeMethod(method, SegmentType.CONTROL);
- }
-
- public void Command(Object v, Method method)
- {
- InvokeMethod(method, SegmentType.COMMAND);
- }
-
- public void Error(Object v, ProtocolError error)
- {
- throw new Exception("Error: " + error);
- }
-
- #endregion
-
- #region private
-
- private void Frame(byte flags, byte type, byte track, int channel, int size, MemoryStream buf)
- {
- lock (_sendlock)
- {
- _writer.Write(flags);
- _writer.Write(type);
- _writer.Write(ByteEncoder.GetBigEndian((UInt16)(size + network.Frame.HEADER_SIZE)));
- _writer.Write((byte)0);
- _writer.Write(track);
- _writer.Write(ByteEncoder.GetBigEndian((UInt16)( channel)));
- _writer.Write((byte)0);
- _writer.Write((byte)0);
- _writer.Write((byte)0);
- _writer.Write((byte)0);
- _sender.Send(_header);
- _header.Seek(0, SeekOrigin.Begin);
- _sender.Send(buf, size);
- }
- }
-
- private void Fragment(byte flags, SegmentType type, IProtocolEvent mevent, MemoryStream buf)
- {
- byte typeb = (byte) type;
- byte track = mevent.EncodedTrack == network.Frame.L4 ? (byte) 1 : (byte) 0;
- int remaining = (int) buf.Length;
- buf.Seek(0, SeekOrigin.Begin);
- bool first = true;
- while (true)
- {
- int size = Math.Min(_maxPayload, remaining);
- remaining -= size;
-
- byte newflags = flags;
- if (first)
- {
- newflags |= network.Frame.FIRST_FRAME;
- first = false;
- }
- if (remaining == 0)
- {
- newflags |= network.Frame.LAST_FRAME;
- }
-
- Frame(newflags, typeb, track, mevent.Channel, size, buf);
-
- if (remaining == 0)
- {
- break;
- }
- }
- }
-
- private MSEncoder GetEncoder()
- {
- if( _encoder == null)
- {
- _encoder = new MSEncoder(4 * 1024);
- }
- return _encoder;
- }
-
- private void InvokeMethod(Method method, SegmentType type)
- {
- MSEncoder encoder = GetEncoder();
- encoder.Init();
- encoder.WriteUint16(method.GetEncodedType());
- if (type == SegmentType.COMMAND)
- {
- if (method.Sync)
- {
- encoder.WriteUint16(0x0101);
- }
- else
- {
- encoder.WriteUint16(0x0100);
- }
- }
- method.Write(_encoder);
- MemoryStream methodSeg = encoder.Segment();
-
- byte flags = network.Frame.FIRST_SEG;
-
- bool payload = method.HasPayload();
- if (!payload)
- {
- flags |= network.Frame.LAST_SEG;
- }
-
- MemoryStream headerSeg = null;
- if (payload)
- {
- Header hdr = method.Header;
- Struct[] structs = hdr.Structs;
-
- foreach (Struct st in structs)
- {
- encoder.WriteStruct32(st);
- }
- headerSeg = encoder.Segment();
- }
-
- lock (_sendlock)
- {
- Fragment(flags, type, method, methodSeg);
- if (payload)
- {
- Fragment( 0x0, SegmentType.HEADER, method, headerSeg);
- Fragment(network.Frame.LAST_SEG, SegmentType.BODY, method, method.Body);
- }
- }
- }
-
- #endregion
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/network/Frame.cs b/qpid/dotnet/client-010/client/transport/network/Frame.cs
deleted file mode 100644
index b8ec36d8b6..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/Frame.cs
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.IO;
-
-namespace org.apache.qpid.transport.network
-{
- public sealed class Frame : INetworkEvent
- {
- internal static int HEADER_SIZE = 12;
-
- // XXX: enums?
- public const byte L1 = 0;
- public const byte L2 = 1;
- public const byte L3 = 2;
- public const byte L4 = 3;
-
- public static byte RESERVED = 0x0;
-
- public static byte VERSION = 0x0;
-
- public static byte FIRST_SEG = 0x8;
- public static byte LAST_SEG = 0x4;
- public static byte FIRST_FRAME = 0x2;
- public static byte LAST_FRAME = 0x1;
-
- private readonly byte flags;
- private readonly SegmentType type;
- private readonly byte track;
- private readonly int channel;
- private readonly MemoryStream body;
- private int _bodySize;
-
-
- public Frame(byte flags, SegmentType type, byte track, int channel, int bodySize,
- MemoryStream body)
- {
- this.flags = flags;
- this.type = type;
- this.track = track;
- this.channel = channel;
- this.body = body;
- _bodySize = bodySize;
- }
-
- public int BodySize
- {
- get { return _bodySize; }
- }
-
- public MemoryStream Body
- {
- get { return body; }
- }
-
- public byte Flags
- {
- get { return flags; }
- }
-
- public int Channel
- {
- get { return channel; }
- }
-
- public int Size
- {
- get { return (int) body.Length;}
- }
-
- public SegmentType Type
- {
- get { return type; }
- }
-
- public byte Track
- {
- get { return track; }
- }
-
- private bool Flag(byte mask)
- {
- return (flags & mask) != 0;
- }
-
- public bool IsFirstSegment()
- {
- return Flag(FIRST_SEG);
- }
-
- public bool IsLastSegment()
- {
- return Flag(LAST_SEG);
- }
-
- public bool IsFirstFrame()
- {
- return Flag(FIRST_FRAME);
- }
-
- public bool IsLastFrame()
- {
- return Flag(LAST_FRAME);
- }
-
- #region INetworkEvent Methods
-
- public void ProcessNetworkEvent(INetworkDelegate ndelegate)
- {
- ndelegate.Frame(this);
- }
-
- #endregion
-
- public override String ToString()
- {
- return String.Format
- ("[{0:d} {1:d} {2:d} {3} {4}{5}{6}{7}] ", Channel, Size, Track, Type,
- IsFirstSegment() ? 1 : 0, IsLastSegment() ? 1 : 0,
- IsFirstFrame() ? 1 : 0, IsLastFrame() ? 1 : 0);
- }
-
-
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/network/IIoSender.cs b/qpid/dotnet/client-010/client/transport/network/IIoSender.cs
deleted file mode 100644
index 747b5b9f98..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/IIoSender.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-namespace org.apache.qpid.transport.network
-{
- public interface IIOSender<T>:Sender<T>
- {
- void send(T body, int siz);
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/network/INetworkDelegate.cs b/qpid/dotnet/client-010/client/transport/network/INetworkDelegate.cs
deleted file mode 100644
index 9226adc2b7..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/INetworkDelegate.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using ProtocolError = org.apache.qpid.transport.ProtocolError;
-using ProtocolHeader = org.apache.qpid.transport.ProtocolHeader;
-namespace org.apache.qpid.transport.network
-{
-
-
- /// <summary>
- /// NetworkDelegate
- /// </summary>
-
- public interface INetworkDelegate
- {
-
- void Init(ProtocolHeader header);
-
- void Frame(Frame frame);
-
- void Error(ProtocolError error);
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/network/INetworkEvent.cs b/qpid/dotnet/client-010/client/transport/network/INetworkEvent.cs
deleted file mode 100644
index e6f0d6fc8a..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/INetworkEvent.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-namespace org.apache.qpid.transport.network
-{
-
- /// <summary>
- /// INetworkEvent
- /// </summary>
-
- public interface INetworkEvent
- {
- void ProcessNetworkEvent(INetworkDelegate networkDelegate);
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/network/InputHandler.cs b/qpid/dotnet/client-010/client/transport/network/InputHandler.cs
deleted file mode 100644
index c5d5f13727..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/InputHandler.cs
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.IO;
-using System.Text;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport.network
-{
- /// <summary>
- /// InputHandler
- /// </summary>
- public sealed class InputHandler : IReceiver<ReceivedPayload<INetworkEvent>>
- {
- public enum State
- {
- PROTO_HDR,
- FRAME_HDR,
- FRAME_BODY,
- ERROR
- }
-
- private static readonly Logger log = Logger.Get(typeof(InputHandler));
- private readonly Object m_objectLock = new object();
-
- // the event raised when a buffer is read from the wire
- public event EventHandler<ReceivedPayload<INetworkEvent>> ReceivedEvent;
- public event EventHandler<ExceptionArgs> ExceptionProcessing;
-
- // Not in used... This even is never raised in the code => the application will block on Close() until the timeout is reached
- public event EventHandler Closed;
-
- event EventHandler<ReceivedPayload<INetworkEvent>> IReceiver<ReceivedPayload<INetworkEvent>>.Received
- {
- add
- {
- lock (m_objectLock)
- {
- ReceivedEvent += value;
- }
- }
- remove
- {
- lock (m_objectLock)
- {
- ReceivedEvent -= value;
- }
- }
- }
-
- event EventHandler<ExceptionArgs> IReceiver<ReceivedPayload<INetworkEvent>>.Exception
- {
- add
- {
- lock (m_objectLock)
- {
- ExceptionProcessing += value;
- }
- }
- remove
- {
- lock (m_objectLock)
- {
- ExceptionProcessing -= value;
- }
- }
- }
-
- private State state;
- private MemoryStream input;
- private int needed;
-
- private byte flags;
- private SegmentType type;
- private byte track;
- private int channel;
-
- public InputHandler(State state)
- {
- this.state = state;
- switch (state)
- {
- case State.PROTO_HDR:
- needed = 8;
- break;
- case State.FRAME_HDR:
- needed = Frame.HEADER_SIZE;
- break;
- }
- }
-
- // The command listening for a buffer read.
- public void On_ReceivedBuffer(object sender, ReceivedPayload<MemoryStream> payload)
- {
- MemoryStream buf = payload.Payload;
- int remaining = (int) buf.Length;
- if( input != null )
- {
- remaining += (int) input.Length;
- }
- try
- {
- while (remaining > 0)
- {
- if (remaining >= needed)
- {
- if (input != null)
- {
- byte[] tmp = new byte[buf.Length];
- buf.Read(tmp, 0, tmp.Length);
- input.Write(tmp, 0, tmp.Length);
- input.Seek(0, SeekOrigin.Begin);
- buf = input;
- }
- int startPos = (int)buf.Position;
- int consumed = needed;
- state = Next(buf);
- if ((buf.Position - startPos) < consumed)
- {
- buf.Seek(consumed - (buf.Position - startPos), SeekOrigin.Current);
- }
- remaining -= consumed;
- input = null;
- }
- else
- {
- byte[] tmp;
- if (input == null)
- {
- input = new MemoryStream();
- tmp = new byte[remaining];
- }
- else
- {
- // this is a full buffer
- tmp = new byte[buf.Length];
- }
- buf.Read(tmp, 0, tmp.Length);
- input.Write(tmp, 0, tmp.Length);
- remaining = 0;
- }
- }
- }
- catch (Exception t)
- {
- Console.Write(t);
- if (ExceptionProcessing != null)
- {
- ExceptionProcessing(this, new ExceptionArgs(t));
- }
- }
- }
-
- #region Private Support Functions
-
- private State Next(MemoryStream buf)
- {
- BinaryReader reader = new BinaryReader(buf);
-
- switch (state)
- {
- case State.PROTO_HDR:
- char a = reader.ReadChar();
- char m = reader.ReadChar();
- char q = reader.ReadChar();
- char p = reader.ReadChar();
- if (a != 'A' &&
- m != 'M' &&
- q != 'Q' &&
- p != 'P')
- {
- Error("bad protocol header: {0}", buf.ToString());
- return State.ERROR;
- }
- reader.ReadByte();
- byte instance = reader.ReadByte();
- byte major = reader.ReadByte();
- byte minor = reader.ReadByte();
- Fire_NetworkEvent(new ProtocolHeader(instance, major, minor));
- needed = Frame.HEADER_SIZE;
- return State.FRAME_HDR;
- case State.FRAME_HDR:
- reader = new BinaryReader(buf, Encoding.BigEndianUnicode);
- flags = reader.ReadByte();
- type = SegmentTypeGetter.Get(reader.ReadByte()); // generated code
- int size = reader.ReadUInt16();
- size = ByteEncoder.GetBigEndian((UInt16)size);
- size -= Frame.HEADER_SIZE;
- if (size < 0 || size > (64 * 1024 - 12))
- {
- Error("bad frame size: {0:d}", size);
- return State.ERROR;
- }
- reader.ReadByte();
- byte b = reader.ReadByte();
- if ((b & 0xF0) != 0)
- {
- Error("non-zero reserved bits in upper nibble of " +
- "frame header byte 5: {0}", b);
- return State.ERROR;
- }
- track = (byte)(b & 0xF);
- channel = reader.ReadUInt16();
- channel = ByteEncoder.GetBigEndian((UInt16)channel);
- if (size == 0)
- {
- Fire_NetworkEvent(new Frame(flags, type, track, channel, 0, new MemoryStream()));
- needed = Frame.HEADER_SIZE;
- return State.FRAME_HDR;
- }
- needed = size;
- return State.FRAME_BODY;
- case State.FRAME_BODY:
- Fire_NetworkEvent(new Frame(flags, type, track, channel, needed, buf));
- needed = Frame.HEADER_SIZE;
- return State.FRAME_HDR;
- default:
- if (ExceptionProcessing != null)
- {
- ExceptionProcessing(this, new ExceptionArgs(new Exception("Error creating frame")));
- }
- throw new Exception("Error creating frame");
- }
- }
-
- private void Error(String fmt, params Object[] args)
- {
- Fire_NetworkEvent(new ProtocolError(Frame.L1, fmt, args));
- }
-
- private void Fire_NetworkEvent(INetworkEvent netevent)
- {
- log.Debug("InputHandler: network event:", netevent);
- ReceivedPayload<INetworkEvent> payload = new ReceivedPayload<INetworkEvent>();
- payload.Payload = netevent;
- if (ReceivedEvent != null)
- {
- ReceivedEvent(this, payload);
- }
- else
- {
- log.Debug("Nobody listening for event: {0}");
- }
- }
-
- #endregion
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/network/NetworkDelegate.cs b/qpid/dotnet/client-010/client/transport/network/NetworkDelegate.cs
deleted file mode 100644
index 69598a43e8..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/NetworkDelegate.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using ProtocolError = org.apache.qpid.transport.ProtocolError;
-using ProtocolHeader = org.apache.qpid.transport.ProtocolHeader;
-namespace org.apache.qpid.transport.network
-{
-
-
- /// <summary>
- /// NetworkDelegate
- /// </summary>
-
- public interface NetworkDelegate
- {
-
- void Init(ProtocolHeader header);
-
- void Frame(Frame frame);
-
- void Error(ProtocolError error);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/network/NetworkEvent.cs b/qpid/dotnet/client-010/client/transport/network/NetworkEvent.cs
deleted file mode 100644
index e5ac6de93a..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/NetworkEvent.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-namespace org.apache.qpid.transport.network
-{
-
- /// <summary>
- /// NetworkEvent
- /// </summary>
-
- public interface NetworkEvent
- {
- void ProcessNetworkEvent(NetworkDelegate networkDelegate);
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/network/io/IIoSender.cs b/qpid/dotnet/client-010/client/transport/network/io/IIoSender.cs
deleted file mode 100644
index acc7724a06..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/io/IIoSender.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-namespace org.apache.qpid.transport.network
-{
- public interface IIoSender<T>:ISender<T>
- {
- void Send(T body, int siz);
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/network/io/IIoTransport.cs b/qpid/dotnet/client-010/client/transport/network/io/IIoTransport.cs
deleted file mode 100644
index 41a09e7079..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/io/IIoTransport.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-using System.IO;
-using System.Net.Sockets;
-
-namespace org.apache.qpid.transport.network.io
-{
- public interface IIoTransport
- {
- Connection Connection
- {
- get;
- set;
- }
-
- IReceiver<ReceivedPayload<MemoryStream>> Receiver
- {
- get;
- set;
- }
-
- IoSender Sender
- {
- get;
- set;
- }
-
-
- Stream Stream
- {
- get;
- set;
- }
-
- TcpClient Socket
- {
- get;
- set;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/network/io/IoReceiver.cs b/qpid/dotnet/client-010/client/transport/network/io/IoReceiver.cs
deleted file mode 100644
index b60444fa29..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/io/IoReceiver.cs
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.IO;
-using System.Threading;
-using Logger = org.apache.qpid.transport.util.Logger;
-
-
-namespace org.apache.qpid.transport.network.io
-{
- /// <summary>
- /// IoReceiver
- /// </summary>
- public sealed class IoReceiver : IReceiver<ReceivedPayload<MemoryStream>>
- {
- private static readonly Logger log = Logger.Get(typeof(IoReceiver));
- private readonly int m_bufferSize;
- private readonly Stream m_bufStream;
- private readonly int m_timeout;
- private readonly Thread m_thread;
- private bool m_closed;
- private readonly Object m_objectLock = new object();
-
- // the event raised when a buffer is read from the wire
- event EventHandler<ReceivedPayload<MemoryStream>> ReceivedBuffer;
- event EventHandler<ExceptionArgs> ExceptionReading;
- event EventHandler ReceiverClosed;
-
- event EventHandler<ReceivedPayload<MemoryStream>> IReceiver<ReceivedPayload<MemoryStream>>.Received
- {
- add
- {
- lock (m_objectLock)
- {
- ReceivedBuffer += value;
- }
- }
- remove
- {
- lock (m_objectLock)
- {
- ReceivedBuffer -= value;
- }
- }
- }
-
- event EventHandler<ExceptionArgs> IReceiver<ReceivedPayload<MemoryStream>>.Exception
- {
- add
- {
- lock (m_objectLock)
- {
- ExceptionReading += value;
- }
- }
- remove
- {
- lock (m_objectLock)
- {
- ExceptionReading -= value;
- }
- }
- }
-
- event EventHandler IReceiver<ReceivedPayload<MemoryStream>>.Closed
- {
- add
- {
- lock (m_objectLock)
- {
- ReceiverClosed += value;
- }
- }
- remove
- {
- lock (m_objectLock)
- {
- ReceiverClosed -= value;
- }
- }
- }
-
- public IoReceiver(Stream stream, int bufferSize, int timeout)
- {
- m_bufferSize = bufferSize;
- m_bufStream = stream;
- m_timeout = timeout;
- m_thread = new Thread(Go);
- m_thread.Name = String.Format("IoReceiver - {0}", stream);
- m_thread.IsBackground = true;
- m_thread.Start();
- }
-
- public void Close()
- {
- Mutex mut = new Mutex();
- mut.WaitOne();
- if (!m_closed)
- {
- m_closed = true;
- try
- {
- log.Debug("Receiver closing");
- m_bufStream.Close();
- m_thread.Join(m_timeout);
- if (m_thread.IsAlive)
- {
- throw new TransportException("join timed out");
- }
- }
- catch (ThreadInterruptedException e)
- {
- throw new TransportException(e);
- }
- catch (IOException e)
- {
- throw new TransportException(e);
- }
- }
- mut.ReleaseMutex();
- }
-
- void Go()
- {
- // create a BufferedStream on top of the NetworkStream.
- int threshold = m_bufferSize/2;
- byte[] buffer = new byte[m_bufferSize];
- try
- {
- int read;
- int offset = 0;
- ReceivedPayload<MemoryStream> payload = new ReceivedPayload<MemoryStream>();
- while ((read = m_bufStream.Read(buffer, offset, m_bufferSize - offset)) > 0)
- {
- MemoryStream memStream = new MemoryStream(buffer, offset, read);
- if (ReceivedBuffer != null)
- {
- // call the event
- payload.Payload = memStream;
- ReceivedBuffer(this, payload);
- }
- offset += read;
- if (offset > threshold)
- {
- offset = 0;
- buffer = new byte[m_bufferSize];
- }
- }
- log.Debug("Receiver thread terminating");
- }
- catch (Exception t)
- {
- if (ExceptionReading != null)
- {
- ExceptionReading(this, new ExceptionArgs(t));
- }
- }
- finally
- {
- if (ReceiverClosed != null)
- {
- ReceiverClosed(this, new EventArgs());
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/network/io/IoSSLTransport.cs b/qpid/dotnet/client-010/client/transport/network/io/IoSSLTransport.cs
deleted file mode 100644
index b6c7940a1d..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/io/IoSSLTransport.cs
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-using System;
-using System.IO;
-using System.Net.Security;
-using System.Net.Sockets;
-using System.Security.Authentication;
-using System.Security.Cryptography.X509Certificates;
-using System.Threading;
-
-using org.apache.qpid.transport.util;
-using org.apache.qpid.client;
-
-namespace org.apache.qpid.transport.network.io
-{
- public sealed class IoSSLTransport : IIoTransport
- {
- // constants
- private const int DEFAULT_READ_WRITE_BUFFER_SIZE = 64*1024;
- private const int TIMEOUT = 60000;
- private const int QUEUE_SIZE = 1000;
- // props
- private static readonly Logger log = Logger.Get(typeof (IoSSLTransport));
- private Stream m_stream;
- private IoSender m_sender;
- private IReceiver<ReceivedPayload<MemoryStream>> m_receiver;
- private TcpClient m_socket;
- private Connection m_con;
- private readonly bool _rejectUntrusted;
-
- public static Connection Connect(String host, int port, String mechanism, X509Certificate certificate, bool rejectUntrusted, Client client)
- {
- ClientConnectionDelegate connectionDelegate = new ClientConnectionDelegate(client, string.Empty, string.Empty, mechanism);
- ManualResetEvent negotiationComplete = new ManualResetEvent(true);
- connectionDelegate.SetCondition(negotiationComplete);
- connectionDelegate.VirtualHost = string.Empty;
-
- IIoTransport transport = new IoSSLTransport(host, port, certificate, rejectUntrusted, connectionDelegate);
-
- Connection _conn = transport.Connection;
- _conn.Send(new ProtocolHeader(1, 0, 10));
- negotiationComplete.WaitOne();
-
- if (connectionDelegate.Exception != null)
- throw connectionDelegate.Exception;
-
- connectionDelegate.SetCondition(null);
-
- return _conn;
- }
-
- public static Connection Connect(String host, int port, String virtualHost, String mechanism, string serverName, string certPath, String certPass, bool rejectUntrusted, Client client)
- {
- // create certificate object based on whether or not password is null
- X509Certificate cert;
- if (certPass != null)
- {
- cert = new X509Certificate2(certPath, certPass);
- }
- else
- {
- cert = X509Certificate.CreateFromCertFile(certPath);
- }
-
- return Connect(host, port, mechanism, cert, rejectUntrusted, client);
- }
-
- public IoSSLTransport(String host, int port, X509Certificate certificate, bool rejectUntrusted, ConnectionDelegate conndel)
- {
- _rejectUntrusted = rejectUntrusted;
- CreateSocket(host, port);
- CreateSSLStream(host, Socket, certificate);
- Sender = new IoSender(this, QUEUE_SIZE, TIMEOUT);
- Receiver = new IoReceiver(Stream, Socket.ReceiveBufferSize*2, TIMEOUT);
- Assembler assembler = new Assembler();
- InputHandler inputHandler = new InputHandler(InputHandler.State.PROTO_HDR);
- Connection = new Connection(assembler, new Disassembler(Sender, 64*1024 - 1), conndel);
- // Input handler listen to Receiver events
- Receiver.Received += inputHandler.On_ReceivedBuffer;
- // Assembler listen to inputhandler events
- inputHandler.ReceivedEvent += assembler.On_ReceivedEvent;
- // Connection listen to asembler protocol event
- Receiver.Closed += Connection.On_ReceivedClosed;
- assembler.Closed += Connection.On_ReceivedClosed;
- Receiver.Exception += Connection.On_ReceivedException;
- inputHandler.ExceptionProcessing += Connection.On_ReceivedException;
- assembler.ReceivedEvent += Connection.On_ReceivedEvent;
- }
-
- public Connection Connection
- {
- get { return m_con; }
- set { m_con = value; }
- }
-
- public IReceiver<ReceivedPayload<MemoryStream>> Receiver
- {
- get { return m_receiver; }
- set { m_receiver = value; }
- }
-
- public IoSender Sender
- {
- get { return m_sender; }
- set { m_sender = value; }
- }
-
-
- public Stream Stream
- {
- get { return m_stream; }
- set { m_stream = value; }
- }
-
- public TcpClient Socket
- {
- get { return m_socket; }
- set { m_socket = value; }
- }
-
- #region Private Support Functions
-
- private void CreateSocket(String host, int port)
- {
- TcpClient socket;
- try
- {
- socket = new TcpClient();
- String noDelay = Environment.GetEnvironmentVariable("qpid.tcpNoDelay");
- String writeBufferSize = Environment.GetEnvironmentVariable("qpid.writeBufferSize");
- String readBufferSize = Environment.GetEnvironmentVariable("qpid.readBufferSize");
- socket.NoDelay = noDelay != null && bool.Parse(noDelay);
- socket.ReceiveBufferSize = readBufferSize == null
- ? DEFAULT_READ_WRITE_BUFFER_SIZE
- : int.Parse(readBufferSize);
- socket.SendBufferSize = writeBufferSize == null
- ? DEFAULT_READ_WRITE_BUFFER_SIZE
- : int.Parse(writeBufferSize);
-
- log.Debug("NoDelay : {0}", socket.NoDelay);
- log.Debug("ReceiveBufferSize : {0}", socket.ReceiveBufferSize);
- log.Debug("SendBufferSize : {0}", socket.SendBufferSize);
- log.Debug("Openning connection with host : {0}; port: {1}", host, port);
-
- socket.Connect(host, port);
- Socket = socket;
- }
- catch (Exception e)
- {
- throw new TransportException(string.Format("Error connecting to broker: {0}", e.Message));
- }
- }
-
- private void CreateSSLStream(String host, TcpClient socket, X509Certificate certificate)
- {
- try
- {
- //Initializes a new instance of the SslStream class using the specified Stream, stream closure behavior, certificate validation delegate and certificate selection delegate
- SslStream sslStream = new SslStream(socket.GetStream(), false, ValidateServerCertificate, LocalCertificateSelection);
-
- X509CertificateCollection certCol = new X509CertificateCollection();
- certCol.Add(certificate);
-
- sslStream.AuthenticateAsClient(host, certCol, SslProtocols.Default, true);
- Stream = sslStream;
- }
- catch (AuthenticationException e)
- {
- log.Warn("Exception: {0}", e.Message);
- if (e.InnerException != null)
- {
- log.Warn("Inner exception: {0}", e.InnerException.Message);
- e = new AuthenticationException(e.InnerException.Message, e.InnerException);
- }
- socket.Close();
- throw new TransportException(string.Format("Authentication failed, closing connection to broker: {0}", e.Message));
- }
- }
-
- // The following method is invoked by the RemoteCertificateValidationDelegate.
- public bool ValidateServerCertificate(
- object sender,
- X509Certificate certificate,
- X509Chain chain,
- SslPolicyErrors sslPolicyErrors)
- {
- bool result = true;
- if (sslPolicyErrors != SslPolicyErrors.None && _rejectUntrusted )
- {
- log.Warn("Certificate error: {0}", sslPolicyErrors);
- // Do not allow this client to communicate with unauthenticated servers.
- result = false;
- }
- return result;
- }
-
- public X509Certificate LocalCertificateSelection(
- Object sender,
- string targetHost,
- X509CertificateCollection localCertificates,
- X509Certificate remoteCertificate,
- string[] acceptableIssuers
- )
- {
- // used to be return null; in the original version
- return localCertificates[0];
- }
-
- #endregion
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/network/io/IoSender.cs b/qpid/dotnet/client-010/client/transport/network/io/IoSender.cs
deleted file mode 100644
index 025b782a12..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/io/IoSender.cs
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-using System;
-using System.IO;
-using System.Threading;
-using common.org.apache.qpid.transport.util;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport.network.io
-{
- public sealed class IoSender : IIoSender<MemoryStream>
- {
- private static readonly Logger log = Logger.Get(typeof (IoReceiver));
- private readonly IIoTransport ioTransport;
- private readonly Stream bufStream;
- private bool closed;
- private readonly Mutex mutClosed = new Mutex();
- private readonly CircularBuffer<byte[]> queue;
- private readonly Thread thread;
- private readonly int timeout;
- private readonly MemoryStream _tobeSent = new MemoryStream();
- public IoSender(IIoTransport transport, int queueSize, int timeout)
- {
- this.timeout = timeout;
- ioTransport = transport;
- bufStream = transport.Stream;
- queue = new CircularBuffer<byte[]>(queueSize);
- thread = new Thread(Go);
- log.Debug("Creating IoSender thread");
- thread.Name = String.Format("IoSender - {0}", transport.Socket) ;
- thread.IsBackground = true;
- thread.Start();
- }
-
- public void Send(MemoryStream str)
- {
- int pos = (int) str.Position;
- str.Seek(0, SeekOrigin.Begin);
- Send(str, pos);
- }
-
- public void Send(MemoryStream str, int size)
- {
- mutClosed.WaitOne();
- if (closed)
- {
- throw new TransportException("sender is Closed");
- }
- mutClosed.ReleaseMutex();
- byte[] buf = new byte[size];
- str.Read(buf, 0, size);
- _tobeSent.Write(buf, 0, size);
- }
-
- public void Flush()
- {
- int length = (int)_tobeSent.Position;
- byte[] buf = new byte[length];
- _tobeSent.Seek(0, SeekOrigin.Begin);
- _tobeSent.Read(buf, 0, length);
- queue.Enqueue(buf);
- // bufStream.Write(buf, 0, length);
- // _tobeSent = new MemoryStream();
- // _writer.Write(buf, 0, length);
- // _writer.Flush();
- _tobeSent.Seek(0, SeekOrigin.Begin);
- }
-
- public void Close()
- {
- log.Debug("Closing Sender");
- mutClosed.WaitOne();
- if (!closed)
- {
- try
- {
- closed = true;
- queue.Close();
- thread.Join(timeout);
- if (thread.IsAlive)
- {
- throw new TransportException("join timed out");
- }
- }
- catch (ThreadInterruptedException e)
- {
- throw new TransportException(e);
- }
- catch (IOException e)
- {
- throw new TransportException(e);
- }
- }
- mutClosed.ReleaseMutex();
- }
-
- private void Go()
- {
- while (! closed)
- {
- //MemoryStream st = queue.Dequeue();
- byte[] st = queue.Dequeue();
- if (st != null)
- {
- try
- {
- // int length = (int) st.Length;
- // byte[] buf = new byte[length];
- // st.Read(buf, 0, length);
- bufStream.Write(st, 0, st.Length);
- }
- catch (Exception e)
- {
- closed = true;
- ioTransport.Connection.On_ReceivedException(this, new ExceptionArgs(e));
- }
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/network/io/IoTransport.cs b/qpid/dotnet/client-010/client/transport/network/io/IoTransport.cs
deleted file mode 100644
index 483e5428b8..0000000000
--- a/qpid/dotnet/client-010/client/transport/network/io/IoTransport.cs
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-using System;
-using System.IO;
-using System.Net.Sockets;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport.network.io
-{
- /// <summary>
- /// This class provides a socket based transport using sync io classes.
- ///
- /// The following params are configurable via JVM arguments
- /// TCP_NO_DELAY - qpid.tcpNoDelay
- /// SO_RCVBUF - qpid.readBufferSize
- /// SO_SNDBUF - qpid.writeBufferSize
- /// </summary>
- public sealed class IoTransport : IIoTransport
- {
- // constants
- private const int DEFAULT_READ_WRITE_BUFFER_SIZE = 64*1024;
- private const int TIMEOUT = 60000;
- private const int QUEUE_SIZE = 1000;
- // props
- private static readonly Logger log = Logger.Get(typeof (IoTransport));
- private Stream m_stream;
- private IoSender m_sender;
- private IReceiver<ReceivedPayload<MemoryStream>> m_receiver;
- private TcpClient m_socket;
- private Connection m_con;
-
- public static Connection Connect(String host, int port, ConnectionDelegate conndel)
- {
- IoTransport transport = new IoTransport(host, port, conndel);
- return transport.Connection;
- }
-
- public IoTransport(String host, int port, ConnectionDelegate conndel)
- {
- CreateSocket(host, port);
- Sender = new IoSender(this, QUEUE_SIZE, TIMEOUT);
- Receiver = new IoReceiver(Stream, Socket.ReceiveBufferSize * 2, TIMEOUT);
- Assembler assembler = new Assembler();
- InputHandler inputHandler = new InputHandler(InputHandler.State.PROTO_HDR);
- Connection = new Connection(assembler, new Disassembler(Sender, 64 * 1024 - 1), conndel);
- // Input handler listen to Receiver events
- Receiver.Received += inputHandler.On_ReceivedBuffer;
- // Assembler listen to inputhandler events
- inputHandler.ReceivedEvent += assembler.On_ReceivedEvent;
- // Connection listen to asembler protocol event
- Receiver.Closed += Connection.On_ReceivedClosed;
- assembler.Closed += Connection.On_ReceivedClosed;
- Receiver.Exception += Connection.On_ReceivedException;
- inputHandler.ExceptionProcessing += Connection.On_ReceivedException;
- assembler.ReceivedEvent += Connection.On_ReceivedEvent;
- }
-
- public Connection Connection
- {
- get { return m_con; }
- set { m_con = value; }
- }
-
- public IReceiver<ReceivedPayload<MemoryStream>> Receiver
- {
- get { return m_receiver; }
- set { m_receiver = value; }
- }
-
- public IoSender Sender
- {
- get { return m_sender; }
- set { m_sender = value; }
- }
-
-
- public Stream Stream
- {
- get { return m_stream; }
- set { m_stream = value; }
- }
-
- public TcpClient Socket
- {
- get { return m_socket; }
- set { m_socket = value; }
- }
-
- #region Private Support Functions
-
- private void CreateSocket(String host, int port)
- {
- try
- {
- TcpClient socket = new TcpClient();
- String noDelay = Environment.GetEnvironmentVariable("qpid.tcpNoDelay");
- String writeBufferSize = Environment.GetEnvironmentVariable("qpid.writeBufferSize");
- String readBufferSize = Environment.GetEnvironmentVariable("qpid.readBufferSize");
- socket.NoDelay = noDelay != null && bool.Parse(noDelay);
- socket.ReceiveBufferSize = readBufferSize == null ? DEFAULT_READ_WRITE_BUFFER_SIZE : int.Parse(readBufferSize);
- socket.SendBufferSize = writeBufferSize == null ? DEFAULT_READ_WRITE_BUFFER_SIZE : int.Parse(writeBufferSize);
-
- log.Debug("NoDelay : {0}", socket.NoDelay);
- log.Debug("ReceiveBufferSize : {0}", socket.ReceiveBufferSize);
- log.Debug("SendBufferSize : {0}", socket.SendBufferSize);
- log.Debug("Openning connection with host : {0}; port: {1}", host, port);
-
- socket.Connect(host, port);
- Socket = socket;
- Stream = socket.GetStream();
- }
- catch (SocketException e)
- {
- Console.WriteLine(e.StackTrace);
- throw new TransportException("Error connecting to broker", e);
- }
- catch (IOException e)
- {
- throw new TransportException("Error connecting to broker", e);
- }
- }
-
- #endregion
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/client/transport/util/ByteEncoder.cs b/qpid/dotnet/client-010/client/transport/util/ByteEncoder.cs
deleted file mode 100644
index 873ca75688..0000000000
--- a/qpid/dotnet/client-010/client/transport/util/ByteEncoder.cs
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-
-namespace org.apache.qpid.transport.util
-{
- public static class ByteEncoder
- {
- #region Endian conversion helper routines
- /// <summary>
- /// Returns the value encoded in Big Endian (PPC, XDR) format.
- /// </summary>
- /// <param name="value">Value to encode.</param>
- /// <returns>Big-endian encoded value.</returns>
- public static Int32 GetBigEndian(Int32 value)
- {
- if (BitConverter.IsLittleEndian)
- {
- return SwapByteOrder(value);
- }
- return value;
- }
-
- /// <summary>
- /// Returns the value encoded in Big Endian (PPC, XDR) format.
- /// </summary>
- /// <param name="value">Value to encode.</param>
- /// <returns>Big-endian encoded value.</returns>
- public static UInt16 GetBigEndian(UInt16 value)
- {
- if (BitConverter.IsLittleEndian)
- {
- return SwapByteOrder(value);
- }
- return value;
- }
-
- /// <summary>
- /// Returns the value encoded in Big Endian (PPC, XDR) format.
- /// </summary>
- /// <param name="value">Value to encode.</param>
- /// <returns>Big-endian encoded value.</returns>
- public static UInt32 GetBigEndian(UInt32 value)
- {
- if (BitConverter.IsLittleEndian)
- {
- return SwapByteOrder(value);
- }
- return value;
- }
-
- /// <summary>
- /// Returns the value encoded in Big Endian (PPC, XDR) format.
- /// </summary>
- /// <param name="value">Value to encode.</param>
- /// <returns>Big-endian encoded value.</returns>
- public static long GetBigEndian(long value)
- {
- if (BitConverter.IsLittleEndian)
- {
- return SwapByteOrder(value);
- }
- return value;
- }
-
- public static double GetBigEndian(double value)
- {
- if (BitConverter.IsLittleEndian)
- {
- return SwapByteOrder(value);
- }
- return value;
- }
-
- /// <summary>
- /// Returns the value encoded in Little Endian (x86, NDR) format.
- /// </summary>
- /// <param name="value">Value to encode.</param>
- /// <returns>Little-endian encoded value.</returns>
- public static Int32 GetLittleEndian(Int32 value)
- {
- if (BitConverter.IsLittleEndian)
- {
- return value;
- }
- return SwapByteOrder(value);
- }
-
- /// <summary>
- /// Returns the value encoded in Little Endian (x86, NDR) format.
- /// </summary>
- /// <param name="value">Value to encode.</param>
- /// <returns>Little-endian encoded value.</returns>
- public static UInt32 GetLittleEndian(UInt32 value)
- {
- if (BitConverter.IsLittleEndian)
- {
- return value;
- }
- return SwapByteOrder(value);
- }
-
- /// <summary>
- /// Returns the value encoded in Little Endian (x86, NDR) format.
- /// </summary>
- /// <param name="value">Value to encode.</param>
- /// <returns>Little-endian encoded value.</returns>
- public static UInt16 GetLittleEndian(UInt16 value)
- {
- if (BitConverter.IsLittleEndian)
- {
- return value;
- }
- return SwapByteOrder(value);
- }
-
- /// <summary>
- /// Returns the value encoded in Little Endian (x86, NDR) format.
- /// </summary>
- /// <param name="value">Value to encode.</param>
- /// <returns>Little-endian encoded value.</returns>
- public static long GetLittleEndian(long value)
- {
- if (BitConverter.IsLittleEndian)
- {
- return value;
- }
- return SwapByteOrder(value);
- }
-
- public static double GetLittleEndian(double value)
- {
- if (BitConverter.IsLittleEndian)
- {
- return value;
- }
- return SwapByteOrder(value);
- }
-
- /// <summary>
- /// Swaps the Byte order of an <see cref="Int32"/>.
- /// </summary>
- /// <param name="value"><see cref="Int32"/> to swap the bytes of.</param>
- /// <returns>Byte order swapped <see cref="Int32"/>.</returns>
- private static Int32 SwapByteOrder(Int32 value)
- {
- Int32 swapped = (Int32)((0x000000FF) & (value >> 24)
- | (0x0000FF00) & (value >> 8)
- | (0x00FF0000) & (value << 8)
- | (0xFF000000) & (value << 24));
- return swapped;
- }
-
- /// <summary>
- /// Swaps the byte order of a <see cref="UInt16"/>.
- /// </summary>
- /// <param name="value"><see cref="UInt16"/> to swap the bytes of.</param>
- /// <returns>Byte order swapped <see cref="UInt16"/>.</returns>
- private static UInt16 SwapByteOrder(UInt16 value)
- {
- return (UInt16)((0x00FF & (value >> 8))
- | (0xFF00 & (value << 8)));
- }
-
- /// <summary>
- /// Swaps the byte order of a <see cref="UInt32"/>.
- /// </summary>
- /// <param name="value"><see cref="UInt32"/> to swap the bytes of.</param>
- /// <returns>Byte order swapped <see cref="UInt32"/>.</returns>
- private static UInt32 SwapByteOrder(UInt32 value)
- {
- UInt32 swapped = ((0x000000FF) & (value >> 24)
- | (0x0000FF00) & (value >> 8)
- | (0x00FF0000) & (value << 8)
- | (0xFF000000) & (value << 24));
- return swapped;
- }
-
- /// <summary>
- /// Swaps the byte order of a <see cref="Double"/> (double precision IEEE 754)
- /// </summary>
- /// <param name="value"><see cref="Double"/> to swap.</param>
- /// <returns>Byte order swapped <see cref="Double"/> value.</returns>
- private static long SwapByteOrder(long value)
- {
- Byte[] buffer = BitConverter.GetBytes(value);
- Array.Reverse(buffer, 0, buffer.Length);
- return BitConverter.ToInt64(buffer, 0);
- }
-
- private static double SwapByteOrder(double value)
- {
- Byte[] buffer = BitConverter.GetBytes(value);
- Array.Reverse(buffer, 0, buffer.Length);
- return BitConverter.ToDouble(buffer,0) ;
- }
- #endregion
- }
-
-}
diff --git a/qpid/dotnet/client-010/client/transport/util/CircularBuffer.cs b/qpid/dotnet/client-010/client/transport/util/CircularBuffer.cs
deleted file mode 100644
index 00d7b20d4c..0000000000
--- a/qpid/dotnet/client-010/client/transport/util/CircularBuffer.cs
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Threading;
-
-namespace common.org.apache.qpid.transport.util
-{
- public class CircularBuffer<T>
- {
- private readonly T[] buffer;
- private Int32 nrp, nwp;
- private readonly Int32 len;
- private Int32 countValue;
- private readonly Int32 add;
-
-
- /// <summary>
- /// Constructor creates N=len element
- /// Circular Buffer that olds MemoryStream
- /// </summary>
- public CircularBuffer(Int32 len)
- {
- buffer = new T[len];
- this.len = len;
- add = 1 - len;
- nrp = 0;
- nwp = 0;
- countValue = 0;
- }
-
-
- public void Enqueue(T t)
- {
- lock (this)
- {
- if (countValue >= (len - 1))
- {
- // wait for room to be available
- Monitor.Wait(this);
- }
- bool notifyDequeue = countValue <= 0;
- Load(t);
- if (notifyDequeue) //notifyDequeue)
- {
- Monitor.PulseAll(this);
- }
- }
- }
-
-
- public T Dequeue()
- {
- lock (this)
- {
- if (countValue <= 0)
- {
- Monitor.Wait(this);
- }
- bool notifyEnqueue = countValue >= (len - 1);
- T temp = Get();
- if (notifyEnqueue) //notifyEnqueue)
- {
- Monitor.PulseAll(this);
- }
- return temp;
- }
- }
-
- public void Close()
- {
- nrp = 0;
- nwp = 0;
- countValue = 0;
- Array.Clear(buffer, 0, len);
- lock (this)
- {
- Monitor.PulseAll(this);
- }
- }
-
- #region Private Support Functions
-
- private void Load(T t)
- {
- Int32 i = nwp;
- buffer[i] = t;
- i += add;
- if (i < 0) i += len;
- nwp = i;
- UpdateCount();
- }
-
- private void UpdateCount()
- {
- countValue = nwp - nrp;
- if (countValue <= 0 )
- countValue += len; // modulo buffer size
- }
-
- private T Get()
- {
- Int32 i = nrp;
- T temp = buffer[i];
- i += add;
- if (i < 0) i += len;
- nrp = i;
- countValue--;
- return (temp);
- }
-
- #endregion
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/util/Functions.cs b/qpid/dotnet/client-010/client/transport/util/Functions.cs
deleted file mode 100644
index eee3848386..0000000000
--- a/qpid/dotnet/client-010/client/transport/util/Functions.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-namespace org.apache.qpid.transport.util
-{
-
- /// <summary>
- /// Functions
- /// </summary>
-
- public class Functions
- {
- public static sbyte Lsb(int i)
- {
- return (sbyte) (0xFF & i);
- }
-
- public static sbyte Lsb(long l)
- {
- return (sbyte) (0xFF & l);
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/util/Logger.cs b/qpid/dotnet/client-010/client/transport/util/Logger.cs
deleted file mode 100644
index f889fe2aab..0000000000
--- a/qpid/dotnet/client-010/client/transport/util/Logger.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using log4net;
-
-namespace org.apache.qpid.transport.util
-{
-
- /// <summary> Logger
- ///
- /// </summary>
-
- public sealed class Logger
- {
- private readonly ILog log;
-
- public static Logger Get(Type type)
- {
- return new Logger(LogManager.GetLogger(type));
- }
-
- private Logger(ILog log)
- {
- this.log = log;
- }
-
- public bool IsDebugEnabled()
- {
- return log.IsDebugEnabled;
- }
-
- public void Debug(String message, params Object[] args)
- {
- if (log.IsDebugEnabled)
- {
- log.Debug(String.Format(message, args));
- }
- }
-
- public void Debug(Exception t, String message, params Object[] args)
- {
- if (log.IsDebugEnabled)
- {
- log.Debug(String.Format(message, args), t);
- }
- }
-
- public void Error(String message, params Object[] args)
- {
- if (log.IsErrorEnabled)
- {
- log.Error(String.Format(message, args));
- }
- }
-
- public void Error(Exception t, String message, params Object[] args)
- {
- if (log.IsErrorEnabled)
- {
- log.Error(String.Format(message, args), t);
- }
- }
-
- public void Warn(String message, params Object[] args)
- {
- if (log.IsWarnEnabled)
- {
- log.Warn(String.Format(message, args));
- }
- }
-
- public void Warn(Exception t, String message, params Object[] args)
- {
- if (log.IsWarnEnabled)
- {
- log.Warn(String.Format(message, args), t);
- }
- }
-
- public void Info(String message, params Object[] args)
- {
- if (log.IsInfoEnabled)
- {
- log.Info(String.Format(message, args));
- }
- }
-
- public void Info(Exception t, String message, params Object[] args)
- {
- if (log.IsInfoEnabled)
- {
- log.Info(String.Format(message, args), t);
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/util/ResultFuture.cs b/qpid/dotnet/client-010/client/transport/util/ResultFuture.cs
deleted file mode 100644
index 0de2b27656..0000000000
--- a/qpid/dotnet/client-010/client/transport/util/ResultFuture.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Threading;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.util;
-
-namespace common.org.apache.qpid.transport.util
-{
- public class ResultFuture : IFuture
- {
- const long _timeout = 60000;
- private Struct _result;
- private Session _session;
- private static readonly Logger log = Logger.Get(typeof(ResultFuture));
-
- public Struct Get(long timeout)
- {
- lock (this)
- {
- DateTime start = DateTime.Now;
- long elapsed = 0;
- while (! _session.IsClosed && timeout - elapsed > 0 && _result == null)
- {
- log.Debug("{0} waiting for result: {1}", _session, this );
- Monitor.Wait(this, (int) (timeout - elapsed));
- elapsed = (long) (DateTime.Now.Subtract(start)).TotalMilliseconds;
- }
- }
- if( _session.IsClosed )
- {
- throw new SessionException(_session.GetExceptions());
- }
- return _result;
- }
-
- public Struct Result
- {
- get { return Get(_timeout); }
- set
- {
- lock (this)
- {
- _result = value;
- Monitor.PulseAll(this);
- }
- }
- }
-
- public Session Session
- {
- set { _session = value; }
- }
-
- public override String ToString()
- {
- return String.Format("Future({0})", _result);
- }
-
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/util/Serial.cs b/qpid/dotnet/client-010/client/transport/util/Serial.cs
deleted file mode 100644
index 874097084a..0000000000
--- a/qpid/dotnet/client-010/client/transport/util/Serial.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-namespace org.apache.qpid.transport.util
-{
- /// <summary>
- /// This class provides basic serial number comparisons as defined in
- /// RFC 1982.
- /// </summary>
- public class Serial
- {
- ///
- ///
- ///Compares two numbers using serial arithmetic.
- ///
- /// param s1 the first serial number
- /// param s2 the second serial number
- ///
- /// return a negative integer, zero, or a positive integer as the
- /// first argument is less than, equal to, or greater than the
- /// second
- ///
- public static int Compare(int s1, int s2)
- {
- return s1 - s2;
- }
-
- public static bool Lt(int s1, int s2)
- {
- return Compare(s1, s2) < 0;
- }
-
- public static bool Le(int s1, int s2)
- {
- return Compare(s1, s2) <= 0;
- }
-
- public static bool Gt(int s1, int s2)
- {
- return Compare(s1, s2) > 0;
- }
-
- public static bool Ge(int s1, int s2)
- {
- return Compare(s1, s2) >= 0;
- }
-
- public static bool Eq(int s1, int s2)
- {
- return s1 == s2;
- }
-
- public static int Min(int s1, int s2)
- {
- if (Lt(s1, s2))
- {
- return s1;
- }
- else
- {
- return s2;
- }
- }
-
- public static int Max(int s1, int s2)
- {
- if (Gt(s1, s2))
- {
- return s1;
- }
- else
- {
- return s2;
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/client/transport/util/UUID.cs b/qpid/dotnet/client-010/client/transport/util/UUID.cs
deleted file mode 100644
index 07a3d267a5..0000000000
--- a/qpid/dotnet/client-010/client/transport/util/UUID.cs
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-
-namespace org.apache.qpid.transport.util
-{
- public class UUID
- {
- private long _mostSigBits;
- private long _leastSigBits;
- private static readonly Random _random = new Random();
- private static readonly object _randomLock = new object();
-
-
- public UUID(long mostSigBits, long leastSigBits)
- {
- _mostSigBits = mostSigBits;
- _leastSigBits = leastSigBits;
- }
-
- public long MostSignificantBits
- {
- get { return _mostSigBits; }
- set { _mostSigBits = value; }
- }
-
- public long LeastSignificantBits
- {
- get { return _leastSigBits; }
- set { _leastSigBits = value; }
- }
-
- internal UUID(byte[] r)
- {
- MostSignificantBits = 0;
- LeastSignificantBits = 0;
- for (int i = 0; i < 8; i++)
- MostSignificantBits = (MostSignificantBits << 8) | (r[i] & 0xff);
- for (int i = 8; i < 16; i++)
- LeastSignificantBits = (LeastSignificantBits << 8) | (r[i] & 0xff);
- }
-
- public static UUID RandomUuid()
- {
- byte[] randomBytes = new byte[16];
- lock (_randomLock)
- {
- _random.NextBytes(randomBytes);
- }
-
- randomBytes[6] &= 0x0f;
- randomBytes[6] |= 0x40;
- randomBytes[8] &= 0x3f;
- randomBytes[8] |= 0x80;
-
- return new UUID(randomBytes);
- }
-
-
- public override String ToString()
- {
- return (Digits(_mostSigBits >> 32, 8) + "-" +
- Digits(_mostSigBits >> 16, 4) + "-" +
- Digits(_mostSigBits, 4) + "-" +
- Digits(_leastSigBits >> 48, 4) + "-" +
- Digits(_leastSigBits, 12));
- }
-
- private static String Digits(long val, int digits)
- {
- long hi = 1L << (digits * 4);
- return Convert.ToString((hi | (val & (hi - 1))), 16);
- }
-
- #region equality
- public bool Equals(UUID other)
- {
- if (ReferenceEquals(null, other)) return false;
- if (ReferenceEquals(this, other)) return true;
- return other._mostSigBits == _mostSigBits && other._leastSigBits == _leastSigBits;
- }
-
- public override bool Equals(object obj)
- {
- if (ReferenceEquals(null, obj)) return false;
- if (ReferenceEquals(this, obj)) return true;
- if (obj.GetType() != typeof (UUID)) return false;
- return Equals((UUID) obj);
- }
-
- public override int GetHashCode()
- {
- unchecked
- {
- return (_mostSigBits.GetHashCode()*397) ^ _leastSigBits.GetHashCode();
- }
- }
-
- public static bool operator ==(UUID left, UUID right)
- {
- return Equals(left, right);
- }
-
- public static bool operator !=(UUID left, UUID right)
- {
- return !Equals(left, right);
- }
- #endregion
- }
-}
diff --git a/qpid/dotnet/client-010/default.build b/qpid/dotnet/client-010/default.build
deleted file mode 100644
index eb6ee371f7..0000000000
--- a/qpid/dotnet/client-010/default.build
+++ /dev/null
@@ -1,275 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Qpid.NET" default="build">
-
- <!-- Determines the formatter to use to format output of test results. -->
- <property name="nant.formatter" value="Plain" />
-
- <!-- Determines whether a 'debug' or 'release' build is to be done. Defaults to 'debug' -->
- <property name="build.config" value="debug" />
-
- <!-- Sets build properties consistently accross all assemblies in the project. -->
- <property name="build.version.major" value="0"/>
- <property name="build.version.minor" value="5"/>
- <property name="build.version.build" value="0"/>
- <property name="build.version.revision" value="0"/>
- <property name="build.company" value="Apache Software Foundation"/>
- <property name="build.copyright" value="Apache Software Foundation"/>
- <property name="build.description" value="Built from svn revision number: "/>
-
- <!-- Fileset with build files for each 'core' assembly. -->
- <fileset id="src.builds">
- <include name="client/default.build" />
- <include name="management/console/default.build" />
- <include name="demo/default.build" />
- </fileset>
-
- <!-- Fileset with build files for each 'core' assembly. -->
- <fileset id="examples.builds">
- <include name="examples/request-response/example-request-response-Client/default.build" />
- <include name="examples/request-response/example-request-response-Server/default.build" />
- <include name="examples/direct/example-direct-Listener/default.build" />
- <include name="examples/direct/example-direct-producer/default.build" />
- <include name="examples/fanout/example-fanout-Listener/default.build" />
- <include name="examples/fanout/example-fanout-Producer/default.build" />
- <include name="examples/pub-sub/example-pub-sub-Listener/default.build" />
- <include name="examples/pub-sub/example-pub-sub-Publisher/default.build" />
- </fileset>
-
- <!-- Fileset with build files for 'integration' test assemblies. -->
- <fileset id="tests.builds">
- <include name="test/default.build" />
- </fileset>
-
- <!-- Fileset with build files for 'performence' test assemblies. -->
- <fileset id="perftest.builds">
- <include name="perftest/default.build" />
- </fileset>
-
- <!-- Prepare environment for a debug build. -->
- <target name="debug">
- <property name="build.debug" value="true" />
- <property name="build.defines" value="DEBUG;TRACE"/>
- </target>
-
- <!-- Prepare environment for a release build. -->
- <target name="release">
- <property name="build.debug" value="false" />
- <property name="build.defines" value=""/>
- </target>
-
- <!-- Prepare environment for build. -->
- <target name="init">
- <property name="base.dir" value="${project::get-base-directory()}" />
- <property name="build.dir" value="${base.dir}/bin/${framework::get-target-framework()}/${build.config}" />
- <call target="${build.config}" />
- </target>
-
- <!-- Cleans up the build output directory. -->
- <target name="clean" depends="init">
- <delete dir="${build.dir}" failonerror="false" />
- </target>
-
- <!-- Runs 'svnversion' to get the repository revision into the build property 'build.svnversion'. -->
- <target name="svnversion" description="Runs svnversion to get the current repository version into a build script property.">
- <exec program="svnversion" output="svnversion_tmp.txt">
- <arg value="-n"/>
- </exec>
-
- <loadfile file="svnversion_tmp.txt" property="build.svnversion"/>
- <delete file="svnversion_tmp.txt"/>
-
- <!-- For some competely retarted reason the '-n' parameter to svnversion doesn't really work under windows...
- Here is some code to strip the unwanted newlines. -->
- <script language="C#">
- <code><![CDATA[
- public static void ScriptMain(Project project)
- {
- project.Properties["build.svnversion"] = project.Properties["build.svnversion"].Trim("\n\r".ToCharArray());
- }
- ]]>
- </code>
- </script>
-
- </target>
-
- <!-- Performs a regex find-and-replace on assembly info files, substituting fields defined as build properties. -->
- <target name="setversion" description="Stamp the version info onto assemblyinfo.cs files" depends="svnversion">
-
- <echo>build.svnversion = ${build.svnversion}</echo>
-
- <foreach item="File" property="filename">
- <in>
- <items basedir=".">
- <include name="**\AssemblyInfo.cs"></include>
- </items>
- </in>
- <do>
- <script language="C#">
- <code><![CDATA[
- public static void ScriptMain(Project project)
- {
- // Read in the entire file to perform the substitution in.
- StreamReader reader = new StreamReader(project.Properties["filename"]);
- string contents = reader.ReadToEnd();
- reader.Close();
-
- // Substitute the version numbers.
- string replacement = string.Format("[assembly: AssemblyVersion(\"{0}.{1}.{2}.{3}\")]",
- project.Properties["build.version.major"],
- project.Properties["build.version.minor"],
- project.Properties["build.version.build"],
- project.Properties["build.version.revision"]);
- contents = Regex.Replace(contents, @"\[assembly: AssemblyVersion\("".*""\)\]", replacement);
-
- // Substitute the company name and copyright.
- replacement = string.Format("[assembly: AssemblyCompany(\"{0}\")]",
- project.Properties["build.company"]);
- contents = Regex.Replace(contents, @"\[assembly: AssemblyCompany\("".*""\)\]", replacement);
-
- replacement = string.Format("[assembly: AssemblyCopyright(\"{0}\")]",
- project.Properties["build.copyright"]);
- contents = Regex.Replace(contents, @"\[assembly: AssemblyCopyright\("".*""\)\]", replacement);
-
- // Update the description.
- //replacement = string.Format("[assembly: AssemblyDescription(\"{0} {1}\")]",
- // project.Properties["build.description"],
- // project.Properties["build.svnversion"]);
- replacement = string.Format("[assembly: AssemblyDescription(\"{0}\")]",
- project.Properties["build.description"]);
- contents = Regex.Replace(contents, @"\[assembly: AssemblyDescription\("".*""\)\]", replacement);
-
- // Write out the file with the substituted version.
- StreamWriter writer = new StreamWriter(project.Properties["filename"], false);
- writer.Write(contents);
- writer.Close();
- }
- ]]>
- </code>
- </script>
- </do>
- </foreach>
- </target>
-
- <!-- Do the build. -->
- <target name="build" depends="init, setversion">
- <echo message="Building all modules including tests."/>
-
- <!-- Make sure output folder exists. -->
- <mkdir dir="${build.dir}" />
-
- <echo message="Output folder: ${build.dir}"/>
-
- <!-- copy reference assemblies over to the output dir -->
- <copy todir="${build.dir}" file="lib/log4net/log4net.dll"/>
- <copy todir="${build.dir}" file="lib/nunit/nunit.framework.dll"/>
- <copy todir="${build.dir}" file="lib/plossum/C5.dll"/>
- <copy todir="${build.dir}" file="lib/plossum/Plossum CommandLine.dll"/>
-
- <!-- Compile assemblies. -->
- <nant target="build">
- <buildfiles refid="src.builds" />
- </nant>
-
- <!-- Compile test assemblies. -->
- <nant target="build">
- <buildfiles refid="examples.builds" />
- </nant>
-
- <!-- Compile test assemblies. -->
- <nant target="build">
- <buildfiles refid="tests.builds" />
- </nant>
-
- <!-- Compile test assemblies. -->
- <nant target="build">
- <buildfiles refid="perftest.builds" />
- </nant>
-
- <!-- copy config files over to the output dir -->
- <copy todir="${build.dir}" file="test/Qpid Test.dll.config"/>
- <copy todir="${build.dir}" file="log.xml"/>
-
-
- </target>
-
- <!-- Runs all 'pure unit' tests. -->
- <target name="test" depends="build">
- <echo message="Running all pure unit tests."/>
- <nant target="test">
- <buildfiles refid="tests.builds" />
- </nant>
- </target>
-
- <!-- Creates a release package. -->
- <target name="release-pkg">
- <echo message="Building and packaging a release."/>
-
- <call target="clean"/>
- <call target="build"/>
-
- <property name="build.date" value="${datetime::now()}"/>
-
- <zip zipfile="${build.dir}/Qpid.NET-${framework::get-target-framework()}-${datetime::get-year(build.date)}${datetime::get-month(build.date)}${datetime::get-day(build.date)}.zip">
- <fileset basedir="${build.dir}" prefix="qpid/lib">
- <include name="**/*.*"/>
- <exclude name="**/*.tests.*"/>
- <exclude name="**/example*.*"/>
- <exclude name="**/nunit.framework.dll"/>
- <exclude name="**/*.exe"/>
- <exclude name="**/*.pdb"/>
- </fileset>
-
- <fileset basedir="${build.dir}" prefix="qpid/examples/direct">
- <include name="**/example*direct*.exe"/>
- </fileset>
-
- <fileset basedir="${build.dir}" prefix="qpid/examples/fanout">
- <include name="**/example*fanout*.exe"/>
- </fileset>
-
- <fileset basedir="${build.dir}" prefix="qpid/examples/pub-sub">
- <include name="**/example*pub-sub*.exe"/>
- </fileset>
-
- <fileset basedir="${build.dir}" prefix="qpid/examples/request-response">
- <include name="**/example*request-response*.exe"/>
- </fileset>
-
- <fileset basedir="${base.dir}/.." prefix="qpid">
- <include name="LICENSE.txt"/>
- <include name="NOTICE.txt"/>
- <include name="RELEASE_NOTES.txt"/>
- <include name="DISCLAIMER"/>
- </fileset>
-
-
- <fileset basedir="${base.dir}" prefix="qpid">
- <include name="README.txt"/>
- </fileset>
- </zip>
- </target>
-
-</project>
-
-
diff --git a/qpid/dotnet/client-010/demo/Demo.csproj b/qpid/dotnet/client-010/demo/Demo.csproj
deleted file mode 100644
index 1668314425..0000000000
--- a/qpid/dotnet/client-010/demo/Demo.csproj
+++ /dev/null
@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{E4C46FBC-7560-406D-BFEF-CA010E584DF4}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>demo</RootNamespace>
- <AssemblyName>Qpid Demo</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <StartupObject>
- </StartupObject>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\lib\log4net\log4net.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Deployment" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="*.cs" />
- <EmbeddedResource Include="Properties\Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Resources.resx</DependentUpon>
- <DesignTime>True</DesignTime>
- </Compile>
- <None Include="..\App.config">
- <Link>App.config</Link>
- </None>
- <None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
- <LastGenOutput>Settings.Designer.cs</LastGenOutput>
- </None>
- <Compile Include="Properties\Settings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Settings.settings</DependentUpon>
- <DesignTimeSharedInput>True</DesignTimeSharedInput>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/demo/Program.cs b/qpid/dotnet/client-010/demo/Program.cs
deleted file mode 100644
index aa748544a0..0000000000
--- a/qpid/dotnet/client-010/demo/Program.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Configuration;
-using System.IO;
-using System.Text;
-using System.Threading;
-using log4net.Config;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.util;
-
-namespace WindowsClient
-{
- class Program
- {
- static void Main(string[] args)
- {
- XmlConfigurator.Configure(new FileInfo("..\\..\\log.xml"));
- // DOMConfigurator.Configure()
-
- string host = ConfigurationManager.AppSettings["Host"];
- int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
- string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
- string username = ConfigurationManager.AppSettings["Username"];
- string password = ConfigurationManager.AppSettings["Password"];
-
- Client client = new Client();
- Console.WriteLine("Client created");
- client.Connect(host, port, virtualhost, username, password);
- Console.WriteLine("Connection established");
-
- IClientSession ssn = client.CreateSession(50000);
- Console.WriteLine("Session created");
- ssn.QueueDeclare("queue1", null, null);
- ssn.ExchangeBind("queue1", "amq.direct", "queue1", null);
-
-
- Object wl = new Object();
- ssn.AttachMessageListener(new MyListener(ssn, wl), "myDest");
-
- ssn.MessageSubscribe("queue1", "myDest", MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED, null,
- 0, null);
- DateTime start = DateTime.Now;
-
- // issue credits
- ssn.MessageSetFlowMode("myDest", MessageFlowMode.WINDOW);
- ssn.MessageFlow("myDest", MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
- ssn.MessageFlow("myDest", MessageCreditUnit.MESSAGE, 10000);
- ssn.Sync();
-
-
- for (int i = 0; i < 10000; i ++)
- {
- ssn.MessageTransfer("amq.direct", MessageAcceptMode.NONE, MessageAcquireMode.PRE_ACQUIRED,
- new Header(new DeliveryProperties().SetRoutingKey("queue1"),
- new MessageProperties().SetMessageId(UUID.RandomUuid())),
- Encoding.UTF8.GetBytes("test: " + i));
- }
-
- lock(wl)
- {
- Monitor.Wait(wl);
- }
- DateTime now = DateTime.Now;
- Console.WriteLine("Start time " + start + " now: " + now);
-
- Console.WriteLine("Done time: " + (now - start));
- lock (wl)
- {
- Monitor.Wait(wl, 30000);
- }
- client.Close();
- }
- }
-
- class MyListener : IMessageListener
- {
- private readonly Object _wl;
- private IClientSession _session;
- private int _count;
-
- public MyListener(IClientSession session, object wl)
- {
- _wl = wl;
- _session = session;
- _count = 0;
- }
-
- public void MessageTransfer(IMessage m)
- {
- BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
- byte[] body = new byte[m.Body.Length - m.Body.Position];
- reader.Read(body, 0, body.Length);
- ASCIIEncoding enc = new ASCIIEncoding();
- // Console.WriteLine("Got a message: " + enc.GetString(body) + " count = " + _count);
- _count++;
- if (_count == 10000)
- {
- lock (_wl)
- {
- Monitor.PulseAll(_wl);
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/demo/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/demo/Properties/AssemblyInfo.cs
deleted file mode 100644
index 58c7baf4b4..0000000000
--- a/qpid/dotnet/client-010/demo/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Qpid Demo")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Qpid Demo")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("434bc34e-b59b-4800-87cf-c2d301cb5082")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/demo/Properties/Resources.Designer.cs b/qpid/dotnet/client-010/demo/Properties/Resources.Designer.cs
deleted file mode 100644
index 912f9e5b81..0000000000
--- a/qpid/dotnet/client-010/demo/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.3053
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace demo.Properties {
- using System;
-
-
- /// <summary>
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// </summary>
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- /// <summary>
- /// Returns the cached ResourceManager instance used by this class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("demo.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- /// <summary>
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/demo/Properties/Resources.resx b/qpid/dotnet/client-010/demo/Properties/Resources.resx
deleted file mode 100644
index af03750170..0000000000
--- a/qpid/dotnet/client-010/demo/Properties/Resources.resx
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root> \ No newline at end of file
diff --git a/qpid/dotnet/client-010/demo/Properties/Settings.Designer.cs b/qpid/dotnet/client-010/demo/Properties/Settings.Designer.cs
deleted file mode 100644
index fc41e577fe..0000000000
--- a/qpid/dotnet/client-010/demo/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.3053
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace demo.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/demo/Properties/Settings.settings b/qpid/dotnet/client-010/demo/Properties/Settings.settings
deleted file mode 100644
index 64cfd9241c..0000000000
--- a/qpid/dotnet/client-010/demo/Properties/Settings.settings
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
- <Profiles>
- <Profile Name="(Default)" />
- </Profiles>
- <Settings />
-</SettingsFile>
diff --git a/qpid/dotnet/client-010/demo/default.build b/qpid/dotnet/client-010/demo/default.build
deleted file mode 100644
index f582e392f8..0000000000
--- a/qpid/dotnet/client-010/demo/default.build
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="qpid.client.demo" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/qpid.client.dll" />
- <include name="System.Configuration.dll"/>
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/client-010/examples/direct/example-direct-Listener/Listener.cs b/qpid/dotnet/client-010/examples/direct/example-direct-Listener/Listener.cs
deleted file mode 100644
index f20090526d..0000000000
--- a/qpid/dotnet/client-010/examples/direct/example-direct-Listener/Listener.cs
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-using System.Configuration;
-using System.IO;
-using System.Text;
-using System.Threading;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-
-namespace org.apache.qpid.example.direct
-{
- /// <summary>
- /// This program is one of three programs designed to be used
- /// together. These programs use the "amq.direct" exchange.
- ///
- /// Producer:
- ///
- /// Publishes to a broker, specifying a routing key.
- ///
- /// Listener (this program):
- ///
- /// Reads from a queue on the broker using a message listener.
- ///
- /// </summary>
- public class Listener
- {
- private static void Main(string[] args)
- {
- string host = ConfigurationManager.AppSettings["Host"];
- int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
- string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
- string username = ConfigurationManager.AppSettings["Username"];
- string password = ConfigurationManager.AppSettings["Password"];
-
- Client connection = new Client();
- try
- {
- connection.Connect(host, port, virtualhost, username, password);
- IClientSession session = connection.CreateSession(50000);
-
- //--------- Main body of program --------------------------------------------
- // Create a queue named "message_queue", and route all messages whose
- // routing key is "routing_key" to this newly created queue.
-
- session.QueueDeclare("message_queue");
- session.ExchangeBind("message_queue", "amq.direct", "routing_key");
-
- lock (session)
- {
- // Create a listener and subscribe it to the queue named "message_queue"
- IMessageListener listener = new MessageListener(session);
- session.AttachMessageListener(listener, "message_queue");
- session.MessageSubscribe("message_queue");
- // Receive messages until all messages are received
- Monitor.Wait(session);
- }
-
- //---------------------------------------------------------------------------
-
- connection.Close();
- }
- catch (Exception e)
- {
- Console.WriteLine("Error: \n" + e.StackTrace);
- }
- }
- }
-
- public class MessageListener : IMessageListener
- {
- private readonly IClientSession _session;
- private readonly RangeSet _range = new RangeSet();
- public MessageListener(IClientSession session)
- {
- _session = session;
- }
-
- public void MessageTransfer(IMessage m)
- {
- BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
- byte[] body = new byte[m.Body.Length - m.Body.Position];
- reader.Read(body, 0, body.Length);
- ASCIIEncoding enc = new ASCIIEncoding();
- string message = enc.GetString(body);
- Console.WriteLine("Message: " + message);
- // Add this message to the list of message to be acknowledged
- _range.Add(m.Id);
- if( message.Equals("That's all, folks!") )
- {
- // Acknowledge all the received messages
- _session.MessageAccept(_range);
- lock(_session)
- {
- Monitor.Pulse(_session);
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/examples/direct/example-direct-Listener/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/examples/direct/example-direct-Listener/Properties/AssemblyInfo.cs
deleted file mode 100644
index 2fab6a538a..0000000000
--- a/qpid/dotnet/client-010/examples/direct/example-direct-Listener/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("example-direct-Listener")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("example-direct-Listener")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("6a24bfe4-4714-4d2a-acf4-96cf9a678a06")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/examples/direct/example-direct-Listener/default.build b/qpid/dotnet/client-010/examples/direct/example-direct-Listener/default.build
deleted file mode 100644
index f5db519af7..0000000000
--- a/qpid/dotnet/client-010/examples/direct/example-direct-Listener/default.build
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="example-direct-Listener" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/qpid.client.dll" />
- <include name="System.Configuration.dll" />
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/client-010/examples/direct/example-direct-Listener/example-direct-Listener.csproj b/qpid/dotnet/client-010/examples/direct/example-direct-Listener/example-direct-Listener.csproj
deleted file mode 100644
index ac026b397d..0000000000
--- a/qpid/dotnet/client-010/examples/direct/example-direct-Listener/example-direct-Listener.csproj
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{AE65B1B9-8779-4CB1-91AF-E7F6C7A736D7}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>example_direct_Listener</RootNamespace>
- <AssemblyName>example-direct-Listener</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Listener.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\..\App.config">
- <Link>App.config</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/examples/direct/example-direct-producer/Producer.cs b/qpid/dotnet/client-010/examples/direct/example-direct-producer/Producer.cs
deleted file mode 100644
index f62667bf98..0000000000
--- a/qpid/dotnet/client-010/examples/direct/example-direct-producer/Producer.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-using System.Configuration;
-using System.Text;
-using org.apache.qpid.client;
-
-namespace org.apache.qpid.example.direct
-{
- /// <summary>
- /// This program is one of three programs designed to be used
- /// together. These programs use the "amq.direct" exchange.
- ///
- /// Producer (this program):
- ///
- /// Publishes to a broker, specifying a routing key.
- ///
- /// Listener:
- ///
- /// Reads from a queue on the broker using a message listener.
- ///
- /// </summary>
- class Producer
- {
- static void Main(string[] args)
- {
- string host = ConfigurationManager.AppSettings["Host"];
- int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
- string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
- string username = ConfigurationManager.AppSettings["Username"];
- string password = ConfigurationManager.AppSettings["Password"];
-
- Client connection = new Client();
- try
- {
- connection.Connect(host, port, virtualhost, username, password);
- IClientSession session = connection.CreateSession(50000);
-
- //--------- Main body of program --------------------------------------------
-
- IMessage message = new Message();
-
- // The routing key is a message property. We will use the same
- // routing key for each message, so we'll set this property
- // just once. (In most simple cases, there is no need to set
- // other message properties.)
-
- message.DeliveryProperties.SetRoutingKey("routing_key");
-
- // Asynchronous transfer sends messages as quickly as
- // possible without waiting for confirmation.
- for (int i = 0; i < 10; i++)
- {
- message.ClearData();
- message.AppendData(Encoding.UTF8.GetBytes("Message " + i));
- session.MessageTransfer("amq.direct", message);
- }
-
- // And send a syncrhonous final message to indicate termination.
- message.ClearData();
- message.AppendData(Encoding.UTF8.GetBytes("That's all, folks!"));
- session.MessageTransfer("amq.direct", "routing_key", message);
- session.Sync();
-
- //-----------------------------------------------------------------------------
-
- connection.Close();
- }
- catch (Exception e)
- {
- Console.WriteLine("Error: \n" + e.StackTrace);
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/examples/direct/example-direct-producer/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/examples/direct/example-direct-producer/Properties/AssemblyInfo.cs
deleted file mode 100644
index 84590e67c1..0000000000
--- a/qpid/dotnet/client-010/examples/direct/example-direct-producer/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("example-direct-producer")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("example-direct-producer")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("006144c2-5e45-4543-8e16-c09cd4309ed7")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/examples/direct/example-direct-producer/default.build b/qpid/dotnet/client-010/examples/direct/example-direct-producer/default.build
deleted file mode 100644
index c4e78444c7..0000000000
--- a/qpid/dotnet/client-010/examples/direct/example-direct-producer/default.build
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="example-direct-Producer" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/qpid.client.dll" />
- <include name="System.Configuration.dll" />
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/client-010/examples/direct/example-direct-producer/example-direct-producer.csproj b/qpid/dotnet/client-010/examples/direct/example-direct-producer/example-direct-producer.csproj
deleted file mode 100644
index 10d9d96aea..0000000000
--- a/qpid/dotnet/client-010/examples/direct/example-direct-producer/example-direct-producer.csproj
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{96FCB250-8142-40EE-9BDD-CA839EE21021}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>example_direct_producer</RootNamespace>
- <AssemblyName>example-direct-producer</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Producer.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\..\App.config">
- <Link>App.config</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/examples/direct/verify b/qpid/dotnet/client-010/examples/direct/verify
deleted file mode 100644
index 7da08480a2..0000000000
--- a/qpid/dotnet/client-010/examples/direct/verify
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-##
-## Licensed to the Apache Software Foundation (ASF) under one
-## or more contributor license agreements. See the NOTICE file
-## distributed with this work for additional information
-## regarding copyright ownership. The ASF licenses this file
-## to you under the Apache License, Version 2.0 (the
-## "License"); you may not use this file except in compliance
-## with the License. You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing,
-## software distributed under the License is distributed on an
-## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-## KIND, either express or implied. See the License for the
-## specific language governing permissions and limitations
-## under the License.
-##
-##
-#
-
-# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify
-cpp=$CPP/direct
-
-direct_listener_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-direct-Listener.exe localhost 5672
-}
-
-direct_producer_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-direct-Producer.exe localhost 5672
-}
-
-clients $cpp/declare_queues direct_producer_dotnet direct_listener_dotnet
-outputs $cpp/declare_queues.out ./direct_producer_dotnet.out ./direct_listener_dotnet.out
diff --git a/qpid/dotnet/client-010/examples/direct/verify.in b/qpid/dotnet/client-010/examples/direct/verify.in
deleted file mode 100644
index f57d931663..0000000000
--- a/qpid/dotnet/client-010/examples/direct/verify.in
+++ /dev/null
@@ -1,14 +0,0 @@
-==== declare_queues.out
-==== direct_producer_dotnet.out
-==== direct_listener_dotnet.out
-Message: Message 0
-Message: Message 1
-Message: Message 2
-Message: Message 3
-Message: Message 4
-Message: Message 5
-Message: Message 6
-Message: Message 7
-Message: Message 8
-Message: Message 9
-Message: That's all, folks!
diff --git a/qpid/dotnet/client-010/examples/direct/verify_cpp_dotnet b/qpid/dotnet/client-010/examples/direct/verify_cpp_dotnet
deleted file mode 100644
index 648c8b6bc1..0000000000
--- a/qpid/dotnet/client-010/examples/direct/verify_cpp_dotnet
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify
-cpp=$CPP/direct
-
-direct_listener_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-direct-Listener.exe localhost 5672
-}
-
-clients $cpp/declare_queues $cpp/direct_producer direct_listener_dotnet
-outputs $cpp/declare_queues.out $cpp/direct_producer.out ./direct_listener_dotnet.out
diff --git a/qpid/dotnet/client-010/examples/direct/verify_cpp_dotnet.in b/qpid/dotnet/client-010/examples/direct/verify_cpp_dotnet.in
deleted file mode 100644
index b3543cefe5..0000000000
--- a/qpid/dotnet/client-010/examples/direct/verify_cpp_dotnet.in
+++ /dev/null
@@ -1,14 +0,0 @@
-==== declare_queues.out
-==== direct_producer.out
-==== direct_listener_dotnet.out
-Message: Message 0
-Message: Message 1
-Message: Message 2
-Message: Message 3
-Message: Message 4
-Message: Message 5
-Message: Message 6
-Message: Message 7
-Message: Message 8
-Message: Message 9
-Message: That's all, folks!
diff --git a/qpid/dotnet/client-010/examples/direct/verify_dotnet_cpp b/qpid/dotnet/client-010/examples/direct/verify_dotnet_cpp
deleted file mode 100644
index 5093da6088..0000000000
--- a/qpid/dotnet/client-010/examples/direct/verify_dotnet_cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify
-cpp=$CPP/direct
-
-direct_producer_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-direct-Producer.exe localhost 5672
-}
-
-clients $cpp/declare_queues direct_producer_dotnet $cpp/listener
-outputs $cpp/declare_queues.out ./direct_producer_dotnet.out $cpp/listener.out
diff --git a/qpid/dotnet/client-010/examples/direct/verify_dotnet_cpp.in b/qpid/dotnet/client-010/examples/direct/verify_dotnet_cpp.in
deleted file mode 100644
index fcb6cd66de..0000000000
--- a/qpid/dotnet/client-010/examples/direct/verify_dotnet_cpp.in
+++ /dev/null
@@ -1,15 +0,0 @@
-==== declare_queues.out
-==== direct_producer_dotnet.out
-==== listener.out
-Message: Message 0
-Message: Message 1
-Message: Message 2
-Message: Message 3
-Message: Message 4
-Message: Message 5
-Message: Message 6
-Message: Message 7
-Message: Message 8
-Message: Message 9
-Message: That's all, folks!
-Shutting down listener for message_queue
diff --git a/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Listener.cs b/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Listener.cs
deleted file mode 100644
index b1967b59be..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Listener.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-using System.Configuration;
-using System.IO;
-using System.Text;
-using System.Threading;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-
-namespace org.apache.qpid.example.fanout
-{
- /// <summary>
- /// This program is one of two programs designed to be used
- /// together.
- ///
- /// Producer (this program):
- ///
- /// Publishes to a broker, specifying a routing key.
- ///
- /// Listener:
- ///
- /// Reads from a queue on the broker using a message listener.
- ///
- /// </summary>
- public class Listener
- {
- private static void Main(string[] args)
- {
- string host = ConfigurationManager.AppSettings["Host"];
- int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
- string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
- string username = ConfigurationManager.AppSettings["Username"];
- string password = ConfigurationManager.AppSettings["Password"];
-
- Client connection = new Client();
- try
- {
- connection.Connect(host, port, virtualhost, username, password);
- IClientSession session = connection.CreateSession(50000);
-
- //--------- Main body of program --------------------------------------------
- // Each client creates its own private queue, using the
- // session id to guarantee a unique name. It then routes
- // all messages from the fanout exchange to its own queue
- // by binding to the queue.
- //
- // The binding specifies a binding key, but for a fanout
- // exchange, the binding key is optional and is not used
- // for routing decisions. It can be useful for tracking
- // messages and routing in logs.
-
- string myQueue = session.Name;
- session.QueueDeclare(myQueue, Option.EXCLUSIVE, Option.AUTO_DELETE);
- session.ExchangeBind(myQueue, "amq.fanout", "my-key");
-
- lock (session)
- {
- Console.WriteLine("Listening");
- // Create a listener and subscribe it to my queue.
- IMessageListener listener = new MessageListener(session);
- session.AttachMessageListener(listener, myQueue);
- session.MessageSubscribe(myQueue);
- // Receive messages until all messages are received
- Monitor.Wait(session);
- }
-
- //---------------------------------------------------------------------------
-
- connection.Close();
- }
- catch (Exception e)
- {
- Console.WriteLine("Error: \n" + e.StackTrace);
- }
- }
- }
-
- public class MessageListener : IMessageListener
- {
- private readonly IClientSession _session;
- private readonly RangeSet _range = new RangeSet();
- public MessageListener(IClientSession session)
- {
- _session = session;
- }
-
- public void MessageTransfer(IMessage m)
- {
- BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
- byte[] body = new byte[m.Body.Length - m.Body.Position];
- reader.Read(body, 0, body.Length);
- ASCIIEncoding enc = new ASCIIEncoding();
- string message = enc.GetString(body);
- Console.WriteLine("Message: " + message);
- // Add this message to the list of message to be acknowledged
- _range.Add(m.Id);
- if (message.Equals("That's all, folks!"))
- {
- // Acknowledge all the received messages
- _session.MessageAccept(_range);
- lock (_session)
- {
- Monitor.Pulse(_session);
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Properties/AssemblyInfo.cs
deleted file mode 100644
index 45ff62073e..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("example-fanout-Listener")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("example-fanout-Listener")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("68686ef9-aa0a-4334-9c52-d7e6fc507bec")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/default.build b/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/default.build
deleted file mode 100644
index dde36daf17..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/default.build
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="example-fanout-Listener" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/qpid.client.dll" />
- <include name="System.Configuration.dll" />
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/example-fanout-Listener.csproj b/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/example-fanout-Listener.csproj
deleted file mode 100644
index 3bd0b3d0d0..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/example-fanout-Listener/example-fanout-Listener.csproj
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{18A0792B-DC3A-4EC5-93D6-DB8A111D8F15}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>example_fanout_Listener</RootNamespace>
- <AssemblyName>example-fanout-Listener</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Listener.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\..\App.config">
- <Link>App.config</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Producer.cs b/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Producer.cs
deleted file mode 100644
index a781358a7e..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Producer.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-using System.Configuration;
-using System.Text;
-using org.apache.qpid.client;
-
-namespace org.apache.qpid.example.fanout
-{
- /// <summary>
- /// This program is one of two programs designed to be used
- /// together. These programs do not specify the exchange type - the
- /// default exchange type is the direct exchange.
- ///
- ///
- /// Producer (this program):
- ///
- /// Publishes to a broker, specifying a routing key.
- ///
- /// Listener:
- ///
- /// Reads from a queue on the broker using a message listener.
- ///
- /// </summary>
- class Producer
- {
- static void Main(string[] args)
- {
- string host = ConfigurationManager.AppSettings["Host"];
- int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
- string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
- string username = ConfigurationManager.AppSettings["Username"];
- string password = ConfigurationManager.AppSettings["Password"];
-
- Client connection = new Client();
- try
- {
- connection.Connect(host, port, virtualhost, username, password);
- IClientSession session = connection.CreateSession(50000);
-
- //--------- Main body of program --------------------------------------------
-
- // Unlike topic exchanges and direct exchanges, a fanout
- // exchange need not set a routing key.
- IMessage message = new Message();
-
- // Asynchronous transfer sends messages as quickly as
- // possible without waiting for confirmation.
- for (int i = 0; i < 10; i++)
- {
- message.ClearData();
- message.AppendData(Encoding.UTF8.GetBytes("Message " + i));
- session.MessageTransfer("amq.fanout", message);
- }
-
- // And send a syncrhonous final message to indicate termination.
- message.ClearData();
- message.AppendData(Encoding.UTF8.GetBytes("That's all, folks!"));
- session.MessageTransfer("amq.fanout", message);
- session.Sync();
-
- //-----------------------------------------------------------------------------
-
- connection.Close();
- }
- catch (Exception e)
- {
- Console.WriteLine("Error: \n" + e.StackTrace);
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Properties/AssemblyInfo.cs
deleted file mode 100644
index c19bb5b949..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("example-fanout-Producer")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("example-fanout-Producer")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("01c0ba10-2f23-409b-9adc-bc514a13131a")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/default.build b/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/default.build
deleted file mode 100644
index c4d39e41da..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/default.build
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="example-fanout-Producer" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/qpid.client.dll" />
- <include name="System.Configuration.dll" />
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/example-fanout-Producer.csproj b/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/example-fanout-Producer.csproj
deleted file mode 100644
index 8b04dd8199..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/example-fanout-Producer/example-fanout-Producer.csproj
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{4513BF94-D54A-42FE-8506-FE2CD57B2C51}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>example_fanout_Producer</RootNamespace>
- <AssemblyName>example-fanout-Producer</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Producer.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\..\App.config">
- <Link>App.config</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/examples/fanout/verify b/qpid/dotnet/client-010/examples/fanout/verify
deleted file mode 100644
index 51b7327243..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/verify
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify
-
-fanout_listener_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-fanout-Listener.exe localhost 5672
-}
-
-fanout_producer_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-fanout-Producer.exe localhost 5672
-}
-
-background "Listening" fanout_listener_dotnet
-clients fanout_producer_dotnet
-outputs ./fanout_listener_dotnet.out ./fanout_producer_dotnet.out
diff --git a/qpid/dotnet/client-010/examples/fanout/verify.in b/qpid/dotnet/client-010/examples/fanout/verify.in
deleted file mode 100644
index 37a4a4aaa8..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/verify.in
+++ /dev/null
@@ -1,14 +0,0 @@
-==== fanout_listener_dotnet.out
-Listening
-Message: Message 0
-Message: Message 1
-Message: Message 2
-Message: Message 3
-Message: Message 4
-Message: Message 5
-Message: Message 6
-Message: Message 7
-Message: Message 8
-Message: Message 9
-Message: That's all, folks!
-==== fanout_producer_dotnet.out
diff --git a/qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet b/qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet
deleted file mode 100644
index 5716d3119b..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify
-cpp=$CPP/fanout
-
-fanout_listener_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-fanout-Listener.exe localhost 5672
-}
-
-background "Listening" fanout_listener_dotnet
-clients $cpp/fanout_producer
-outputs $cpp/fanout_producer.out "./fanout_listener_dotnet.out | remove_uuid"
diff --git a/qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet.in b/qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet.in
deleted file mode 100644
index 0a72d8fd3c..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/verify_cpp_dotnet.in
+++ /dev/null
@@ -1,14 +0,0 @@
-==== fanout_producer.out
-==== fanout_listener_dotnet.out | remove_uuid
-Listening
-Message: Message 0
-Message: Message 1
-Message: Message 2
-Message: Message 3
-Message: Message 4
-Message: Message 5
-Message: Message 6
-Message: Message 7
-Message: Message 8
-Message: Message 9
-Message: That's all, folks!
diff --git a/qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp b/qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp
deleted file mode 100644
index c755d1da41..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify
-cpp=$CPP/fanout
-
-fanout_producer_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-fanout-Producer.exe localhost 5672
-}
-
-
-background "Listening" $cpp/listener
-clients fanout_producer_dotnet
-outputs ./fanout_producer_dotnet.out "$cpp/listener.out | remove_uuid"
diff --git a/qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp.in b/qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp.in
deleted file mode 100644
index 588559938f..0000000000
--- a/qpid/dotnet/client-010/examples/fanout/verify_dotnet_cpp.in
+++ /dev/null
@@ -1,15 +0,0 @@
-==== fanout_producer_dotnet.out
-==== listener.out | remove_uuid
-Listening
-Message: Message 0
-Message: Message 1
-Message: Message 2
-Message: Message 3
-Message: Message 4
-Message: Message 5
-Message: Message 6
-Message: Message 7
-Message: Message 8
-Message: Message 9
-Message: That's all, folks!
-Shutting down listener for
diff --git a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/Listener.cs b/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/Listener.cs
deleted file mode 100644
index aeaf3f043b..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/Listener.cs
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-using System.Configuration;
-using System.IO;
-using System.Text;
-using System.Threading;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-
-namespace org.apache.qpid.example.pubsub
-{
- /// <summary>
- /// This program is one of two programs designed to be used
- /// together. These programs use the topic exchange.
- ///
- /// Publisher:
- ///
- /// Publishes to a broker, specifying a routing key.
- ///
- /// Listener (this program):
- ///
- /// Reads from a queue on the broker using a message listener.
- ///
- /// </summary>
- internal class Listener
- {
- public static int _count = 4;
-
- private static void Main(string[] args)
- {
- string host = ConfigurationManager.AppSettings["Host"];
- int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
- string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
- string username = ConfigurationManager.AppSettings["Username"];
- string password = ConfigurationManager.AppSettings["Password"];
-
- Client connection = new Client();
- try
- {
- connection.Connect(host, port, virtualhost, username, password);
- IClientSession session = connection.CreateSession(50000);
-
- //--------- Main body of program --------------------------------------------
-
- lock (session)
- {
- Console.WriteLine("Listening for messages ...");
- // Create a listener
- prepareQueue("usa", "usa.#", session);
- prepareQueue("europe", "europe.#", session);
- prepareQueue("news", "#.news", session);
- prepareQueue("weather", "#.weather", session);
- while (_count > 0)
- {
- Monitor.Wait(session);
- }
- }
-
- //---------------------------------------------------------------------------
-
- connection.Close();
- }
- catch (Exception e)
- {
- Console.WriteLine("Error: \n" + e.StackTrace);
- }
- }
-
- private static void prepareQueue(string queue, string routing_key, IClientSession session)
- {
- // Create a unique queue name for this consumer by concatenating
- // the queue name parameter with the Session ID.
- Console.WriteLine("Declaring queue: " + queue);
- session.QueueDeclare(queue, Option.EXCLUSIVE, Option.AUTO_DELETE);
-
- // Route messages to the new queue if they match the routing key.
- // Also route any messages to with the "control" routing key to
- // this queue so we know when it's time to stop. A publisher sends
- // a message with the content "That's all, Folks!", using the
- // "control" routing key, when it is finished.
-
- session.ExchangeBind(queue, "amq.topic", routing_key);
- session.ExchangeBind(queue, "amq.topic", "control");
-
- // subscribe the listener to the queue
- IMessageListener listener = new MessageListener(session);
- session.AttachMessageListener(listener, queue);
- session.MessageSubscribe(queue);
- }
- }
-
- public class MessageListener : IMessageListener
- {
- private readonly IClientSession _session;
- private readonly RangeSet _range = new RangeSet();
-
- public MessageListener(IClientSession session)
- {
- _session = session;
- }
-
- public void MessageTransfer(IMessage m)
- {
- BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
- byte[] body = new byte[m.Body.Length - m.Body.Position];
- reader.Read(body, 0, body.Length);
- ASCIIEncoding enc = new ASCIIEncoding();
- string message = enc.GetString(body);
- Console.WriteLine("Message: " + message + " from " + m.Destination);
- // Add this message to the list of message to be acknowledged
- _range.Add(m.Id);
- if (message.Equals("That's all, folks!"))
- {
- Console.WriteLine("Shutting down listener for " + m.DeliveryProperties.GetRoutingKey());
- Listener._count--;
- // Acknowledge all the received messages
- _session.MessageAccept(_range);
- lock (_session)
- {
- Monitor.Pulse(_session);
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/Properties/AssemblyInfo.cs
deleted file mode 100644
index ef791c6738..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("example-pub-sub-Listener")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("example-pub-sub-Listener")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("74ab02ae-95d1-4bad-a7cf-9964005b9b05")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/default.build b/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/default.build
deleted file mode 100644
index fe2d9bf4ba..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/default.build
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="example-pub-sub-Listener" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/qpid.client.dll" />
- <include name="System.Configuration.dll" />
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/example-pub-sub-Listener.csproj b/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/example-pub-sub-Listener.csproj
deleted file mode 100644
index 851faa7f21..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Listener/example-pub-sub-Listener.csproj
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{2BCDC2CC-5BDA-4CC7-944D-2899AD8A53C7}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>example_pub_sub_Listener</RootNamespace>
- <AssemblyName>example-pub-sub-Listener</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Listener.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\..\App.config">
- <Link>App.config</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/Properties/AssemblyInfo.cs
deleted file mode 100644
index b6d7f3c818..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("example-pub-sub-Publisher")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("example-pub-sub-Publisher")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("f6d282a0-9dc5-46cf-a4cd-44ae402d667f")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/Publisher.cs b/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/Publisher.cs
deleted file mode 100644
index c87985d288..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/Publisher.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-using System.Configuration;
-using System.Text;
-using org.apache.qpid.client;
-
-namespace org.apache.qpid.example.pubsub
-{
- /// <summary>
- /// This program is one of two programs designed to be used
- /// together. These programs use the topic exchange.
- ///
- /// Publisher (this program):
- ///
- /// Publishes to a broker, specifying a routing key.
- ///
- /// Listener:
- ///
- /// Reads from a queue on the broker using a message listener.
- ///
- /// </summary>
- internal class Publisher
- {
- private static void Main(string[] args)
- {
- string host = ConfigurationManager.AppSettings["Host"];
- int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
- string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
- string username = ConfigurationManager.AppSettings["Username"];
- string password = ConfigurationManager.AppSettings["Password"];
-
- Client connection = new Client();
- try
- {
- connection.Connect(host, port, virtualhost, username, password);
- IClientSession session = connection.CreateSession(50000);
-
- //--------- Main body of program --------------------------------------------
-
- publishMessages(session, "usa.news");
- publishMessages(session, "usa.weather");
- publishMessages(session, "europe.news");
- publishMessages(session, "europe.weather");
-
- noMoreMessages(session);
-
- //-----------------------------------------------------------------------------
-
- connection.Close();
- }
- catch (Exception e)
- {
- Console.WriteLine("Error: \n" + e.StackTrace);
- }
- }
-
- private static void publishMessages(IClientSession session, string routing_key)
- {
- IMessage message = new Message();
- // Asynchronous transfer sends messages as quickly as
- // possible without waiting for confirmation.
- for (int i = 0; i < 10; i++)
- {
- message.ClearData();
- message.AppendData(Encoding.UTF8.GetBytes("Message " + i));
- session.MessageTransfer("amq.topic", routing_key, message);
- }
- }
-
- private static void noMoreMessages(IClientSession session)
- {
- IMessage message = new Message();
- // And send a syncrhonous final message to indicate termination.
- message.ClearData();
- message.AppendData(Encoding.UTF8.GetBytes("That's all, folks!"));
- session.MessageTransfer("amq.topic", "control", message);
- session.Sync();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/default.build b/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/default.build
deleted file mode 100644
index 3f270afe9e..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/default.build
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="example-pub-sub-Publisher" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/qpid.client.dll" />
- <include name="System.Configuration.dll" />
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/example-pub-sub-Publisher.csproj b/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/example-pub-sub-Publisher.csproj
deleted file mode 100644
index a9dee76a36..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/example-pub-sub-Publisher/example-pub-sub-Publisher.csproj
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{F8857634-A134-44E7-A953-F2B22688C599}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>example_pub_sub_Publisher</RootNamespace>
- <AssemblyName>example-pub-sub-Publisher</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Publisher.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\..\App.config">
- <Link>App.config</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/examples/pub-sub/verify b/qpid/dotnet/client-010/examples/pub-sub/verify
deleted file mode 100644
index 45d80c4866..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/verify
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify
-
-pubsub_listener_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-pub-sub-Listener.exe localhost 5672
-}
-
-pubsub_producer_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-pub-sub-Publisher.exe localhost 5672
-}
-
-background "Listening for messages ..." pubsub_listener_dotnet
-clients pubsub_producer_dotnet
-outputs pubsub_producer_dotnet.out "pubsub_listener_dotnet.out | remove_uuid | sort"
diff --git a/qpid/dotnet/client-010/examples/pub-sub/verify.in b/qpid/dotnet/client-010/examples/pub-sub/verify.in
deleted file mode 100644
index 6a5adc4d89..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/verify.in
+++ /dev/null
@@ -1,95 +0,0 @@
-==== pubsub_producer_dotnet.out
-==== pubsub_listener_dotnet.out | remove_uuid | sort
-Declaring queue: europe
-Declaring queue: news
-Declaring queue: usa
-Declaring queue: weather
-Listening for messages ...
-Message: Message 0 from europe
-Message: Message 0 from europe
-Message: Message 0 from news
-Message: Message 0 from news
-Message: Message 0 from usa
-Message: Message 0 from usa
-Message: Message 0 from weather
-Message: Message 0 from weather
-Message: Message 1 from europe
-Message: Message 1 from europe
-Message: Message 1 from news
-Message: Message 1 from news
-Message: Message 1 from usa
-Message: Message 1 from usa
-Message: Message 1 from weather
-Message: Message 1 from weather
-Message: Message 2 from europe
-Message: Message 2 from europe
-Message: Message 2 from news
-Message: Message 2 from news
-Message: Message 2 from usa
-Message: Message 2 from usa
-Message: Message 2 from weather
-Message: Message 2 from weather
-Message: Message 3 from europe
-Message: Message 3 from europe
-Message: Message 3 from news
-Message: Message 3 from news
-Message: Message 3 from usa
-Message: Message 3 from usa
-Message: Message 3 from weather
-Message: Message 3 from weather
-Message: Message 4 from europe
-Message: Message 4 from europe
-Message: Message 4 from news
-Message: Message 4 from news
-Message: Message 4 from usa
-Message: Message 4 from usa
-Message: Message 4 from weather
-Message: Message 4 from weather
-Message: Message 5 from europe
-Message: Message 5 from europe
-Message: Message 5 from news
-Message: Message 5 from news
-Message: Message 5 from usa
-Message: Message 5 from usa
-Message: Message 5 from weather
-Message: Message 5 from weather
-Message: Message 6 from europe
-Message: Message 6 from europe
-Message: Message 6 from news
-Message: Message 6 from news
-Message: Message 6 from usa
-Message: Message 6 from usa
-Message: Message 6 from weather
-Message: Message 6 from weather
-Message: Message 7 from europe
-Message: Message 7 from europe
-Message: Message 7 from news
-Message: Message 7 from news
-Message: Message 7 from usa
-Message: Message 7 from usa
-Message: Message 7 from weather
-Message: Message 7 from weather
-Message: Message 8 from europe
-Message: Message 8 from europe
-Message: Message 8 from news
-Message: Message 8 from news
-Message: Message 8 from usa
-Message: Message 8 from usa
-Message: Message 8 from weather
-Message: Message 8 from weather
-Message: Message 9 from europe
-Message: Message 9 from europe
-Message: Message 9 from news
-Message: Message 9 from news
-Message: Message 9 from usa
-Message: Message 9 from usa
-Message: Message 9 from weather
-Message: Message 9 from weather
-Message: That's all, folks! from europe
-Message: That's all, folks! from news
-Message: That's all, folks! from usa
-Message: That's all, folks! from weather
-Shutting down listener for control
-Shutting down listener for control
-Shutting down listener for control
-Shutting down listener for control
diff --git a/qpid/dotnet/client-010/examples/pub-sub/verify_cpp_dotnet b/qpid/dotnet/client-010/examples/pub-sub/verify_cpp_dotnet
deleted file mode 100644
index 39d92cbb8b..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/verify_cpp_dotnet
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify
-cpp=$CPP/pub-sub
-
-pubsub_listener_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-pub-sub-Listener.exe localhost 5672
-}
-
-
-background "Listening for messages ..." pubsub_listener_dotnet
-clients $cpp/topic_publisher
-outputs $cpp/topic_publisher.out "pubsub_listener_dotnet.out | remove_uuid | sort"
diff --git a/qpid/dotnet/client-010/examples/pub-sub/verify_cpp_dotnet.in b/qpid/dotnet/client-010/examples/pub-sub/verify_cpp_dotnet.in
deleted file mode 100644
index 4e058f7645..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/verify_cpp_dotnet.in
+++ /dev/null
@@ -1,55 +0,0 @@
-==== topic_publisher.out
-==== pubsub_listener_dotnet.out | remove_uuid | sort
-Declaring queue: europe
-Declaring queue: news
-Declaring queue: usa
-Declaring queue: weather
-Listening for messages ...
-Message: Message 0 from europe
-Message: Message 0 from europe
-Message: Message 0 from news
-Message: Message 0 from news
-Message: Message 0 from usa
-Message: Message 0 from usa
-Message: Message 0 from weather
-Message: Message 0 from weather
-Message: Message 1 from europe
-Message: Message 1 from europe
-Message: Message 1 from news
-Message: Message 1 from news
-Message: Message 1 from usa
-Message: Message 1 from usa
-Message: Message 1 from weather
-Message: Message 1 from weather
-Message: Message 2 from europe
-Message: Message 2 from europe
-Message: Message 2 from news
-Message: Message 2 from news
-Message: Message 2 from usa
-Message: Message 2 from usa
-Message: Message 2 from weather
-Message: Message 2 from weather
-Message: Message 3 from europe
-Message: Message 3 from europe
-Message: Message 3 from news
-Message: Message 3 from news
-Message: Message 3 from usa
-Message: Message 3 from usa
-Message: Message 3 from weather
-Message: Message 3 from weather
-Message: Message 4 from europe
-Message: Message 4 from europe
-Message: Message 4 from news
-Message: Message 4 from news
-Message: Message 4 from usa
-Message: Message 4 from usa
-Message: Message 4 from weather
-Message: Message 4 from weather
-Message: That's all, folks! from europe
-Message: That's all, folks! from news
-Message: That's all, folks! from usa
-Message: That's all, folks! from weather
-Shutting down listener for control
-Shutting down listener for control
-Shutting down listener for control
-Shutting down listener for control
diff --git a/qpid/dotnet/client-010/examples/pub-sub/verify_dotnet_cpp b/qpid/dotnet/client-010/examples/pub-sub/verify_dotnet_cpp
deleted file mode 100644
index bf99e422a1..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/verify_dotnet_cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify
-cpp=$CPP/pub-sub
-
-pubsub_producer_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-pub-sub-Publisher.exe localhost 5672
-}
-
-background "Listening" $cpp/topic_listener
-clients pubsub_producer_dotnet
-outputs pubsub_producer_dotnet.out "$cpp/topic_listener.out | remove_uuid | sort"
diff --git a/qpid/dotnet/client-010/examples/pub-sub/verify_dotnet_cpp.in b/qpid/dotnet/client-010/examples/pub-sub/verify_dotnet_cpp.in
deleted file mode 100644
index 64ac27846d..0000000000
--- a/qpid/dotnet/client-010/examples/pub-sub/verify_dotnet_cpp.in
+++ /dev/null
@@ -1,99 +0,0 @@
-==== pubsub_producer_dotnet.out
-==== topic_listener.out | remove_uuid | sort
-Declaring queue: europe
-Declaring queue: news
-Declaring queue: usa
-Declaring queue: weather
-Listening for messages ...
-Message: Message 0 from europe
-Message: Message 0 from europe
-Message: Message 0 from news
-Message: Message 0 from news
-Message: Message 0 from usa
-Message: Message 0 from usa
-Message: Message 0 from weather
-Message: Message 0 from weather
-Message: Message 1 from europe
-Message: Message 1 from europe
-Message: Message 1 from news
-Message: Message 1 from news
-Message: Message 1 from usa
-Message: Message 1 from usa
-Message: Message 1 from weather
-Message: Message 1 from weather
-Message: Message 2 from europe
-Message: Message 2 from europe
-Message: Message 2 from news
-Message: Message 2 from news
-Message: Message 2 from usa
-Message: Message 2 from usa
-Message: Message 2 from weather
-Message: Message 2 from weather
-Message: Message 3 from europe
-Message: Message 3 from europe
-Message: Message 3 from news
-Message: Message 3 from news
-Message: Message 3 from usa
-Message: Message 3 from usa
-Message: Message 3 from weather
-Message: Message 3 from weather
-Message: Message 4 from europe
-Message: Message 4 from europe
-Message: Message 4 from news
-Message: Message 4 from news
-Message: Message 4 from usa
-Message: Message 4 from usa
-Message: Message 4 from weather
-Message: Message 4 from weather
-Message: Message 5 from europe
-Message: Message 5 from europe
-Message: Message 5 from news
-Message: Message 5 from news
-Message: Message 5 from usa
-Message: Message 5 from usa
-Message: Message 5 from weather
-Message: Message 5 from weather
-Message: Message 6 from europe
-Message: Message 6 from europe
-Message: Message 6 from news
-Message: Message 6 from news
-Message: Message 6 from usa
-Message: Message 6 from usa
-Message: Message 6 from weather
-Message: Message 6 from weather
-Message: Message 7 from europe
-Message: Message 7 from europe
-Message: Message 7 from news
-Message: Message 7 from news
-Message: Message 7 from usa
-Message: Message 7 from usa
-Message: Message 7 from weather
-Message: Message 7 from weather
-Message: Message 8 from europe
-Message: Message 8 from europe
-Message: Message 8 from news
-Message: Message 8 from news
-Message: Message 8 from usa
-Message: Message 8 from usa
-Message: Message 8 from weather
-Message: Message 8 from weather
-Message: Message 9 from europe
-Message: Message 9 from europe
-Message: Message 9 from news
-Message: Message 9 from news
-Message: Message 9 from usa
-Message: Message 9 from usa
-Message: Message 9 from weather
-Message: Message 9 from weather
-Message: That's all, folks! from europe
-Message: That's all, folks! from news
-Message: That's all, folks! from usa
-Message: That's all, folks! from weather
-Shutting down listener for europe
-Shutting down listener for news
-Shutting down listener for usa
-Shutting down listener for weather
-Subscribing to queue europe
-Subscribing to queue news
-Subscribing to queue usa
-Subscribing to queue weather
diff --git a/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/Properties/AssemblyInfo.cs
deleted file mode 100644
index a438acaa1f..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("example-request-response-Client")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("example-request-response-Client")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("08bf6aed-bf79-4d16-9a28-6363d5322cdd")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/RequestResponseClient.cs b/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/RequestResponseClient.cs
deleted file mode 100644
index 170008c840..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/RequestResponseClient.cs
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-using System.Configuration;
-using System.IO;
-using System.Text;
-using System.Threading;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-
-namespace org.apache.qpid.example.requestresponse
-{
- /// <summary>
- /// This program is one of two programs that illustrate the
- /// request/response pattern.
- ///
- /// Client (this program):
- /// Make requests of a service, print the response.
- ///
- /// Server:
- /// Accept requests, set the letters to uppercase in each message, and
- /// return it as a response.
- ///
- /// </summary>
- internal class RequestResponseClient
- {
- private static void Main(string[] args)
- {
- string host = ConfigurationManager.AppSettings["Host"];
- int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
- string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
- string username = ConfigurationManager.AppSettings["Username"];
- string password = ConfigurationManager.AppSettings["Password"];
-
- Client connection = new Client();
- try
- {
- connection.Connect(host, port, virtualhost, username, password);
- IClientSession session = connection.CreateSession(50000);
- IMessage request = new Message();
-
- //--------- Main body of program --------------------------------------------
- // Create a response queue so the server can send us responses
- // to our requests. Use the client's session ID as the name
- // of the response queue.
- string response_queue = "client" + session.GetName();
- // Use the name of the response queue as the routing key
- session.QueueDeclare(response_queue);
- session.ExchangeBind(response_queue, "amq.direct", response_queue);
-
- // Each client sends the name of their own response queue so
- // the service knows where to route messages.
- request.DeliveryProperties.SetRoutingKey("request");
- request.MessageProperties.SetReplyTo(new ReplyTo("amq.direct", response_queue));
-
- lock (session)
- {
- // Create a listener for the response queue and listen for response messages.
- Console.WriteLine("Activating response queue listener for: " + response_queue);
- IMessageListener listener = new ClientMessageListener(session);
- session.AttachMessageListener(listener, response_queue);
- session.MessageSubscribe(response_queue);
-
- // Now send some requests ...
- string[] strs = {
- "Twas brillig, and the slithy toves",
- "Did gire and gymble in the wabe.",
- "All mimsy were the borogroves,",
- "And the mome raths outgrabe.",
- "That's all, folks!"
- };
- foreach (string s in strs)
- {
- request.ClearData();
- request.AppendData(Encoding.UTF8.GetBytes(s));
- session.MessageTransfer("amq.direct", request);
- }
- Console.WriteLine("Waiting for all responses to arrive ...");
- Monitor.Wait(session);
- }
- //---------------------------------------------------------------------------
-
- connection.Close();
- }
- catch (Exception e)
- {
- Console.WriteLine("Error: \n" + e.StackTrace);
- }
- }
- }
-
- public class ClientMessageListener : IMessageListener
- {
- private readonly IClientSession _session;
- private readonly RangeSet _range = new RangeSet();
- private int _counter;
- public ClientMessageListener(IClientSession session)
- {
- _session = session;
- }
-
- public void MessageTransfer(IMessage m)
- {
- _counter++;
- BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
- byte[] body = new byte[m.Body.Length - m.Body.Position];
- reader.Read(body, 0, body.Length);
- ASCIIEncoding enc = new ASCIIEncoding();
- string message = enc.GetString(body);
- Console.WriteLine("Response: " + message);
- // Add this message to the list of message to be acknowledged
- _range.Add(m.Id);
- if (_counter == 4)
- {
- Console.WriteLine("Shutting down listener for " + m.DeliveryProperties.GetRoutingKey());
- // Acknowledge all the received messages
- _session.MessageAccept(_range);
- lock (_session)
- {
- Monitor.Pulse(_session);
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/default.build b/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/default.build
deleted file mode 100644
index c3d9af9baf..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/default.build
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="example-request-response-Client" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/qpid.client.dll" />
- <include name="System.Configuration.dll" />
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/example-request-response-Client.csproj b/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/example-request-response-Client.csproj
deleted file mode 100644
index 21dc6ceed4..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/example-request-response-Client/example-request-response-Client.csproj
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{1BC63815-4029-4039-9207-35E7E06ECC99}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>example_request_response_Client</RootNamespace>
- <AssemblyName>example-request-response-Client</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="RequestResponseClient.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\..\App.config">
- <Link>App.config</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/Properties/AssemblyInfo.cs
deleted file mode 100644
index ba702a28cc..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("example-request-response-Server")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("example-request-response-Server")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("ef3456e2-7c19-47aa-8dd6-aeaa88c5c4ad")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/Server.cs b/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/Server.cs
deleted file mode 100644
index ea87627dbf..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/Server.cs
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-using System;
-using System.Configuration;
-using System.IO;
-using System.Text;
-using System.Threading;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-
-namespace org.apache.qpid.example.requestresponse
-{
- /// <summary>
- /// This program is one of two programs that illustrate the
- /// request/response pattern.
- ///
- /// Client:
- /// Make requests of a service, print the response.
- ///
- /// Server (this program):
- /// Accept requests, set the letters to uppercase in each message, and
- /// return it as a response.
- ///
- /// </summary>
- class Server
- {
- static void Main(string[] args)
- {
- string host = ConfigurationManager.AppSettings["Host"];
- int port = int.Parse(ConfigurationManager.AppSettings["Port"]);
- string virtualhost = ConfigurationManager.AppSettings["VirtualHost"];
- string username = ConfigurationManager.AppSettings["Username"];
- string password = ConfigurationManager.AppSettings["Password"];
-
- Client connection = new Client();
- try
- {
- connection.Connect(host, port, virtualhost, username, password);
- IClientSession session = connection.CreateSession(50000);
-
- //--------- Main body of program --------------------------------------------
- // Create a request queue for clients to use when making
- // requests.
- const string request_queue = "request";
- // Use the name of the request queue as the routing key
- session.QueueDeclare(request_queue);
- session.ExchangeBind(request_queue, "amq.direct", request_queue);
-
- lock (session)
- {
- // Create a listener and subscribe it to the request_queue
- IMessageListener listener = new MessageListener(session);
- session.AttachMessageListener(listener, request_queue);
- session.MessageSubscribe(request_queue);
- // Receive messages until all messages are received
- Console.WriteLine("Waiting for requests");
- Monitor.Wait(session);
- }
-
- //---------------------------------------------------------------------------
-
- connection.Close();
- }
- catch (Exception e)
- {
- Console.WriteLine("Error: \n" + e.StackTrace);
- }
- }
- }
-
- public class MessageListener : IMessageListener
- {
- private readonly IClientSession _session;
- private readonly RangeSet _range = new RangeSet();
- public MessageListener(IClientSession session)
- {
- _session = session;
- }
-
- public void MessageTransfer(IMessage request)
- {
- IMessage response = new Message();
-
- // Get routing key for response from the request's replyTo property
- string routingKey;
- if( request.MessageProperties.HasReplyTo() )
- {
- routingKey = request.MessageProperties.GetReplyTo().GetRoutingKey();
- }
- else
- {
- Console.WriteLine("Error: \n No routing key for request " + request);
- return;
- }
-
- BinaryReader reader = new BinaryReader(request.Body, Encoding.UTF8);
- byte[] body = new byte[request.Body.Length - request.Body.Position];
- reader.Read(body, 0, body.Length);
- ASCIIEncoding enc = new ASCIIEncoding();
- string message = enc.GetString(body);
- Console.WriteLine("Request: " + message);
-
- // Transform message content to upper case
- string responseBody = message.ToUpper();
-
- // Send it back to the user
- response.ClearData();
- response.AppendData(Encoding.UTF8.GetBytes(responseBody));
- _session.MessageTransfer("amq.direct", routingKey, response);
-
- // Add this message to the list of message to be acknowledged
- _range.Add(request.Id);
- if (message.Equals("That's all, folks!"))
- {
- // Acknowledge all the received messages
- _session.MessageAccept(_range);
- lock (_session)
- {
- Monitor.Pulse(_session);
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/default.build b/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/default.build
deleted file mode 100644
index a3e4691d10..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/default.build
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="example-request-response-Server" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/qpid.client.dll" />
- <include name="System.Configuration.dll" />
- </references>
- </csc>
- </target>
-</project>
-
diff --git a/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/example-request-response-Server.csproj b/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/example-request-response-Server.csproj
deleted file mode 100644
index 3eb2a3c035..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/example-request-response-Server/example-request-response-Server.csproj
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{922FBA9C-E483-4AEF-ABE8-AC87421E829B}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>example_request_response_Server</RootNamespace>
- <AssemblyName>example-request-response-Server</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Server.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\..\App.config">
- <Link>App.config</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/examples/request-response/verify b/qpid/dotnet/client-010/examples/request-response/verify
deleted file mode 100644
index fa69461f68..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/verify
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify
-
-server_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-request-response-Server.exe localhost 5672
-}
-
-client_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-request-response-Client.exe localhost 5672
-}
-
-background "Waiting for requests" server_dotnet
-clients client_dotnet
-outputs ./server_dotnet.out ./client_dotnet.out
diff --git a/qpid/dotnet/client-010/examples/request-response/verify.in b/qpid/dotnet/client-010/examples/request-response/verify.in
deleted file mode 100644
index 5357591289..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/verify.in
+++ /dev/null
@@ -1,16 +0,0 @@
-==== server_dotnet.out
-Waiting for requests
-Request: Twas brillig, and the slithy toves
-Request: Did gire and gymble in the wabe.
-Request: All mimsy were the borogroves,
-Request: And the mome raths outgrabe.
-Request: That's all, folks!
-==== client_dotnet.out
-Activating response queue listener for: clientSystem.Byte[]
-Waiting for all responses to arrive ...
-Response: TWAS BRILLIG, AND THE SLITHY TOVES
-Response: DID GIRE AND GYMBLE IN THE WABE.
-Response: ALL MIMSY WERE THE BOROGROVES,
-Response: AND THE MOME RATHS OUTGRABE.
-Shutting down listener for clientSystem.Byte[]
-Response: THAT'S ALL, FOLKS!
diff --git a/qpid/dotnet/client-010/examples/request-response/verify_cpp_dotnet b/qpid/dotnet/client-010/examples/request-response/verify_cpp_dotnet
deleted file mode 100644
index 791f48fe60..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/verify_cpp_dotnet
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify
-cpp=$CPP/request-response
-
-client_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-request-response-Client.exe localhost 5672
-}
-
-background "Waiting" $cpp/server
-clients client_dotnet
-kill %%
-outputs ./client_dotnet.out "$cpp/server.out | remove_uuid"
diff --git a/qpid/dotnet/client-010/examples/request-response/verify_cpp_dotnet.in b/qpid/dotnet/client-010/examples/request-response/verify_cpp_dotnet.in
deleted file mode 100644
index 0f4b5341b2..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/verify_cpp_dotnet.in
+++ /dev/null
@@ -1,17 +0,0 @@
-==== client_dotnet.out
-Activating response queue listener for: clientSystem.Byte[]
-Waiting for all responses to arrive ...
-Response: TWAS BRILLIG, AND THE SLITHY TOVES
-Response: DID GIRE AND GYMBLE IN THE WABE.
-Response: ALL MIMSY WERE THE BOROGROVES,
-Response: AND THE MOME RATHS OUTGRABE.
-Shutting down listener for clientSystem.Byte[]
-Response: THAT'S ALL, FOLKS!
-==== server.out | remove_uuid
-Activating request queue listener for: request
-Waiting for requests
-Request: Twas brillig, and the slithy toves (clientSystem.Byte[])
-Request: Did gire and gymble in the wabe. (clientSystem.Byte[])
-Request: All mimsy were the borogroves, (clientSystem.Byte[])
-Request: And the mome raths outgrabe. (clientSystem.Byte[])
-Request: That's all, folks! (clientSystem.Byte[])
diff --git a/qpid/dotnet/client-010/examples/request-response/verify_dotnet_cpp b/qpid/dotnet/client-010/examples/request-response/verify_dotnet_cpp
deleted file mode 100644
index 95905c43c9..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/verify_dotnet_cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify
-cpp=$CPP/request-response
-
-server_dotnet()
-{
-mono $DOTNET_EXAMPLES/example-request-response-Server.exe localhost 5672
-}
-
-background "Waiting for requests" server_dotnet
-clients $cpp/client
-kill %%
-outputs "$cpp/client.out | remove_uuid" ./server_dotnet.out
diff --git a/qpid/dotnet/client-010/examples/request-response/verify_dotnet_cpp.in b/qpid/dotnet/client-010/examples/request-response/verify_dotnet_cpp.in
deleted file mode 100644
index 849fad39c6..0000000000
--- a/qpid/dotnet/client-010/examples/request-response/verify_dotnet_cpp.in
+++ /dev/null
@@ -1,18 +0,0 @@
-==== client.out | remove_uuid
-Activating response queue listener for: client
-Request: Twas brillig, and the slithy toves
-Request: Did gire and gymble in the wabe.
-Request: All mimsy were the borogroves,
-Request: And the mome raths outgrabe.
-Waiting for all responses to arrive ...
-Response: TWAS BRILLIG, AND THE SLITHY TOVES
-Response: DID GIRE AND GYMBLE IN THE WABE.
-Response: ALL MIMSY WERE THE BOROGROVES,
-Response: AND THE MOME RATHS OUTGRABE.
-Shutting down listener for client
-==== server_dotnet.out
-Waiting for requests
-Request: Twas brillig, and the slithy toves
-Request: Did gire and gymble in the wabe.
-Request: All mimsy were the borogroves,
-Request: And the mome raths outgrabe.
diff --git a/qpid/dotnet/client-010/gentool/Composite.tpl b/qpid/dotnet/client-010/gentool/Composite.tpl
deleted file mode 100644
index c5a1099ef3..0000000000
--- a/qpid/dotnet/client-010/gentool/Composite.tpl
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using org.apache.qpid.transport.codec;
-using System.Collections.Generic;
-using org.apache.qpid.transport.util;
-using org.apache.qpid.transport.network;
-using System.IO;
-
-namespace org.apache.qpid.transport
-{
-
-${
-from genutil import *
-
-cls = klass(type)["@name"]
-
-segments = type["segments"]
-
-if type.name in ("control", "command"):
- override = "override"
- base = "Method"
- size = 0
- pack = 2
- if segments:
- payload = "true"
- else:
- payload = "false"
- if type.name == "control" and cls == "connection":
- track = "Frame.L1"
- elif cls == "session" and type["@name"] in ("attach", "attached", "detach", "detached"):
- track = "Frame.L2"
- elif type.name == "command":
- track = "Frame.L4"
- else:
- track = "Frame.L3"
-else:
- override = ""
- base = "Struct"
- size = type["@size"]
- pack = num(type["@pack"])
- payload = "false"
- track = "4"
-
-PACK_TYPES = {
- 1: "byte",
- 2: "int",
- 4: "int"
-}
-
-typecode = code(type)
-}
-
-public sealed class $name : $base {
-
- public const int TYPE = $typecode;
-
- public override int GetStructType() {
- return TYPE;
- }
-
- public override int GetSizeWidth() {
- return $size;
- }
-
- public override int GetPackWidth() {
- return $pack;
- }
-
- public $override bool HasPayload() {
- return $payload;
- }
-
- public $override byte EncodedTrack
- {
- get{ return $track; }
- set { throw new NotImplementedException(); }
- }
-
-${
-from dotnetgenutil import *
-if pack > 0:
- out(" private $(PACK_TYPES[pack]) packing_flags = 0;\n");
-
-fields = get_fields(type)
-params = get_dotnetparameters(type, fields)
-options = get_options(fields)
-
-for f in fields:
- if not f.empty:
- out(" private $(f.type) _$(f.name);\n")
-
-if segments:
- out(" private Header _header;\n")
- out(" private MemoryStream _body = new MemoryStream();\n")
-}
-
-${
-if fields:
- out(" public $name() {}\n")
-}
-
- public $name($(", ".join(params))) {
-${
-for f in fields:
- if f.option: continue
- out(" $(f.set)($(f.name));\n")
-
-if segments:
- out(" Header = header;\n")
- out(" Body = body;\n")
-
-if options or base == "Method":
- out("""
- for (int i=0; i < options.Length; i++) {
- switch (options[i]) {
-""")
-
- for f in options:
- out(" case Option.$(f.option): packing_flags |= $(f.flag_mask(pack)); break;\n")
-
- if base == "Method":
- out(""" case Option.SYNC: Sync = true; break;
- case Option.BATCH: Batch = true; break;
-""")
- out(""" case Option.NONE: break;
- default: throw new Exception("invalid option: " + options[i]);
- }
- }
-""")
-}
- }
-
- public $override void Dispatch<C>(C context, MethodDelegate<C> mdelegate) {
- mdelegate.$(name)(context, this);
- }
-
-${
-for f in fields:
- if pack > 0:
- out("""
- public bool $(f.has)() {
- return (packing_flags & $(f.flag_mask(pack))) != 0;
- }
-
- public $name $(f.clear)() {
- packing_flags = (byte) (packing_flags & ~$(f.flag_mask(pack)));
-${
-if (not f.empty and not (f.default == "null")):
- out(" _$(f.name) = $(f.default);")
-}
- Dirty = true;
- return this;
- }
-""")
-
- out("""
- public $(f.type) $(f.get)() {
-${
-if f.empty:
- out(" return $(f.has)();")
-else:
- out(" return _$(f.name);")
-}
- }
-
- public $name $(f.set)($(f.type) value) {
-${
-if not f.empty:
- out(" _$(f.name) = value;")
-}
-${
-if pack > 0:
- out(" packing_flags |= $(f.flag_mask(pack));")
-}
- Dirty = true;
- return this;
- }
-
-""")
-}
-
-${
-if segments:
- out(""" public override Header Header {
- get { return _header;}
- set { _header = value;}
- }
-
- public $name SetHeader(Header header) {
- Header = header;
- return this;
- }
-
- public override MemoryStream Body
- {
- get{ return _body;}
- set{ _body = value;}
- }
-
- public $name SetBody(MemoryStream body)
- {
- Body = body;
- return this;
- }
-""")
-}
-
- public override void Write(IEncoder enc)
- {
-${
-if pack > 0:
- out(" enc.WriteUint%s(packing_flags);\n" % (pack*8));
-
-for f in fields:
- if f.empty:
- continue
- if pack > 0:
- out(" if ((packing_flags & $(f.flag_mask(pack))) != 0)\n ")
- pre = ""
- post = ""
- if f.type_node.name == "struct":
- pre = "%s.TYPE, " % cname(f.type_node)
- elif f.type_node.name == "domain":
- post = ""
- pre = "(short)"
- out(" enc.Write$(f.coder)($(pre)_$(f.name)$(post));\n")
-}
- }
-
- public override void Read(IDecoder dec)
- {
-${
-if pack > 0:
- out(" packing_flags = ($(PACK_TYPES[pack])) dec.ReadUint%s();\n" % (pack*8));
-
-for f in fields:
- if f.empty:
- continue
- if pack > 0:
- out(" if ((packing_flags & $(f.flag_mask(pack))) != 0)\n ")
- pre = ""
- post = ""
- arg = ""
- if f.type_node.name == "struct":
- pre = "(%s)" % cname(f.type_node)
- arg = "%s.TYPE" % cname(f.type_node)
- elif f.type_node.name == "domain":
- pre = "%sGetter.Get(" % cname(f.type_node)
- post = ")"
- out(" _$(f.name) = $(pre)dec.Read$(f.coder)($(arg))$(post);\n")
-}
- }
-
- public override Dictionary<String,Object> Fields
- {
- get
- {
- Dictionary<String,Object> result = new Dictionary<String,Object>();
-
-${
-for f in fields:
- if pack > 0:
- out(" if ((packing_flags & $(f.flag_mask(pack))) != 0)\n ")
- out(' result.Add("_$(f.name)", $(f.get)());\n')
-}
- return result;
- }
- }
-
-}
-}
diff --git a/qpid/dotnet/client-010/gentool/Enum.tpl b/qpid/dotnet/client-010/gentool/Enum.tpl
deleted file mode 100644
index 5d958c7bf6..0000000000
--- a/qpid/dotnet/client-010/gentool/Enum.tpl
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-namespace org.apache.qpid.transport
-{
-${
-from genutil import *
-
-vtype = jtype(resolve_type(type))
-
-out(" public enum $name : $vtype")
-
-choices = [(scream(ch["@name"]), "= %s" % (ch["@value"]))
- for ch in type.query["enum/choice"]]
-}
- {
- $(",\n ".join(["%s%s" % ch for ch in choices]))
- }
-
-${
-
-out(" public struct $name")
-out("Getter")
-}
- {
- public static $name Get($vtype value)
- {
- switch (value)
- {
-${
-choices = [(scream(ch["@name"]), "%s" % (ch["@value"]))
- for ch in type.query["enum/choice"]]
-
-for ch, value in choices:
- out(' case $value: return $name.$ch;\n')
-} default: throw new Exception("no such value: " + value);
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/gentool/IInvoker.tpl b/qpid/dotnet/client-010/gentool/IInvoker.tpl
deleted file mode 100644
index 713d10c610..0000000000
--- a/qpid/dotnet/client-010/gentool/IInvoker.tpl
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-
-namespace org.apache.qpid.transport
-{
-
-public interface IInvoker {
-
- IFuture Invoke(Method method, IFuture resultClass);
-
-${
-from dotnetgenutil import *
-
-for c in composites:
- name = cname(c)
- fields = get_fields(c)
- params = get_dotnetparameters(c, fields)
- args = get_arguments(c, fields)
- result = c["result"]
- if result:
- if not result["@type"]:
- rname = cname(result["struct"])
- else:
- rname = cname(result, "@type")
- jresult = "IFuture"
- else:
- jresult = "void"
-
- out("""
- $jresult $(name)($(", ".join(params)));
-""")
-}
-
-}
-}
diff --git a/qpid/dotnet/client-010/gentool/Invoker.tpl b/qpid/dotnet/client-010/gentool/Invoker.tpl
deleted file mode 100644
index 2f69aee66d..0000000000
--- a/qpid/dotnet/client-010/gentool/Invoker.tpl
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using common.org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.transport
-{
-
-public abstract class Invoker : IInvoker {
-
- protected abstract void Invoke(Method method);
- public abstract IFuture Invoke(Method method, IFuture resultClass);
-
-${
-from dotnetgenutil import *
-
-for c in composites:
- name = cname(c)
- fields = get_fields(c)
- params = get_dotnetparameters(c, fields)
- args = get_arguments(c, fields)
- result = c["result"]
- if result:
- if not result["@type"]:
- rname = cname(result["struct"])
- else:
- rname = cname(result, "@type")
- jresult = "IFuture"
- jreturn = "return "
- jclass = ", new ResultFuture()"
- jinvoke = "Invoke"
- else:
- jinvoke = "Invoke"
- jresult = "void"
- jreturn = ""
- jclass = ""
-
- out("""
- public $jresult $(name)($(", ".join(params))) {
- $(jreturn)$jinvoke(new $name($(", ".join(args)))$jclass);
- }
-""")
-}
-
-}
-}
diff --git a/qpid/dotnet/client-010/gentool/StructFactory.tpl b/qpid/dotnet/client-010/gentool/StructFactory.tpl
deleted file mode 100644
index 2a11e2530c..0000000000
--- a/qpid/dotnet/client-010/gentool/StructFactory.tpl
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-
-namespace org.apache.qpid.transport
-{
-
-class StructFactory {
-
- public static Struct create(int type)
- {
- switch (type)
- {
-${
-from genutil import *
-
-fragment = """ case $name.TYPE:
- return new $name();
-"""
-
-for c in composites:
- name = cname(c)
- if c.name == "struct":
- out(fragment)
-} default:
- throw new Exception("type: " + type);
- }
- }
-
- public static Struct createInstruction(int type)
- {
- switch (type)
- {
-${
-for c in composites:
- name = cname(c)
- if c.name in ("command", "control"):
- out(fragment)
-} default:
- throw new Exception("type: " + type);
- }
- }
-
-}
-}
diff --git a/qpid/dotnet/client-010/gentool/Type.tpl b/qpid/dotnet/client-010/gentool/Type.tpl
deleted file mode 100644
index c8ec7ac153..0000000000
--- a/qpid/dotnet/client-010/gentool/Type.tpl
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-
-namespace org.apache.qpid.transport
-{
-
-${from genutil import *}
-
-public struct QpidType
-{
- public Code code;
- public int width;
- public bool isfixed;
-
- public Code Code
- {
- get { return code; }
- set { code = value; }
- }
-
- public int Width
- {
- get { return width; }
- set { width = value; }
- }
-
- public bool Fixed
- {
- get { return isfixed; }
- set { isfixed = value; }
- }
-
- QpidType(Code code, int width, bool isfixed)
- {
- this.code = code;
- this.width = width;
- this.isfixed = isfixed;
- }
-
- public static QpidType get(byte code)
- {
- switch (code)
- {
-${
-types = spec.query["amqp/type"] + spec.query["amqp/class/type"]
-codes = {}
-first = True
-for t in types:
- code = t["@code"]
- fix_width = t["@fixed-width"]
- var_width = t["@variable-width"]
-
- if code is None:
- continue
-
- if fix_width is None:
- width = var_width
- fixed = "false"
- else:
- width = fix_width
- fixed = "true"
-
- name = scream(t["@name"])
- codes[code] = name
-
- out(" case $code : return new QpidType(Code.$name, $width, $fixed);\n")
-}
- default: throw new Exception("unknown code: " + code);
- }
- }
-}
-
-public enum Code : byte
- {
-${
-keys = list(codes.keys())
-keys.sort()
-
-for code in keys:
- out(" $(codes[code]) = $code,\n")
-}
- }
-}
diff --git a/qpid/dotnet/client-010/gentool/build.xml b/qpid/dotnet/client-010/gentool/build.xml
deleted file mode 100644
index 76ddb1571d..0000000000
--- a/qpid/dotnet/client-010/gentool/build.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<project name="GenTool" default="build">
-
- <property name="generated.dir" location="../client/" />
- <property name="gentools.timestamp" location="${generated.dir}/gentools.timestamp" />
- <property name="jython.timestamp" location="${generated.dir}/jython.timestamp" />
- <property name="java.basedir" location="../../../java/common" />
- <property name="mllib.dir" location="../../../python" />
- <property name="xml.spec.dir" location="../../../specs" />
-
-
- <target name="check_jython_deps">
- <uptodate property="jython.notRequired" targetfile="${jython.timestamp}">
- <srcfiles dir="${xml.spec.dir}" includes="amqp.0-10-qpid-errata.xml" />
- </uptodate>
- </target>
-
- <target name="build" depends="check_jython_deps" unless="jython.notRequired">
- <java classname="org.python.util.jython" fork="true" failonerror="true">
- <arg value="-Dpython.cachedir.skip=true"/>
- <arg value="-Dpython.path=${java.basedir}/../lib/jython-lib.jar/Lib${path.separator}${mllib.dir}${path.separator}${java.basedir}${path.separator}${basedir}"/>
- <arg value="${basedir}/codegen"/>
- <arg value="${generated.dir}"/>
- <arg value="${xml.spec.dir}/amqp.0-10-qpid-errata.xml"/>
- <arg value="${basedir}"/>
- <classpath>
- <pathelement location="../../../java/lib/jython-2.5.0.jar"/>
- </classpath>
- </java>
- <touch file="${jython.timestamp}" />
- </target>
-
-</project>
diff --git a/qpid/dotnet/client-010/gentool/codegen b/qpid/dotnet/client-010/gentool/codegen
deleted file mode 100644
index baebf378fd..0000000000
--- a/qpid/dotnet/client-010/gentool/codegen
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/usr/bin/env python
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-
-import os, sys, mllib
-from templating import Parser
-from dotnetgenutil import *
-
-out_dir = sys.argv[1]
-spec_file = sys.argv[2]
-tpl_dir = sys.argv[3]
-pkg_dir = os.path.join(out_dir, "generated")
-
-if not os.path.exists(pkg_dir):
- os.makedirs(pkg_dir)
-
-spec = mllib.xml_parse(spec_file)
-
-def excludes(nd):
- if (nd.parent is not None and
- nd.parent.name == "class" and
- nd.parent["@name"] in ("file", "stream")):
- return False
- else:
- return True
-
-def execute(output, template, **kwargs):
- f = open(os.path.join(tpl_dir, template))
- input = f.read()
- f.close()
- p = Parser(**kwargs)
- p.parse(input)
- fname = os.path.join(pkg_dir, output)
- f = open(fname, "w")
- f.write(p.output)
- f.close()
-
-execute("Type.cs", "Type.tpl", spec = spec)
-execute("Constant.cs", "Constant.tpl", spec = spec)
-
-structs = spec.query["amqp/struct"] + \
- spec.query["amqp/class/struct", excludes] + \
- spec.query["amqp/class/command/result/struct", excludes]
-controls = spec.query["amqp/class/control", excludes]
-commands = spec.query["amqp/class/command", excludes]
-
-composites = structs + controls + commands
-
-for c in composites:
- name = cname(c)
- execute("%s.cs" % name, "Composite.tpl", type = c, name = name)
-
-execute("MethodDelegate.cs", "MethodDelegate.tpl", composites = composites)
-execute("Option.cs", "Option.tpl", composites = composites)
-execute("Invoker.cs", "Invoker.tpl", composites = controls + commands)
-execute("IInvoker.cs", "IInvoker.tpl", composites = controls + commands)
-execute("StructFactory.cs", "StructFactory.tpl", composites = composites)
-
-def is_enum(nd):
- return nd["enum"] is not None
-
-enums = spec.query["amqp/domain", is_enum] + \
- spec.query["amqp/class/domain", is_enum]
-
-for e in enums:
- name = cname(e)
- execute("%s.cs" % name, "Enum.tpl", name = name, type = e)
diff --git a/qpid/dotnet/client-010/gentool/dotnetgenutil.py b/qpid/dotnet/client-010/gentool/dotnetgenutil.py
deleted file mode 100644
index 4d9c8a69d7..0000000000
--- a/qpid/dotnet/client-010/gentool/dotnetgenutil.py
+++ /dev/null
@@ -1,271 +0,0 @@
-#
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-#
-
-
-def pascal(offset, *args):
- parts = []
- for a in args:
- parts.extend(a.split("-"))
- return "".join([p[0].upper() + p[1:] for p in parts[:offset]] + [p[0].upper() + p[1:] for p in parts[offset:]])
-
-
-def scream(*args):
- return "_".join([a.replace("-", "_").upper() for a in args])
-
-def num(x, default=None):
- if x is not None and x != "":
- return int(x, 0)
- else:
- return default
-
-def klass(nd):
- parent = nd.parent
- while parent is not None:
- if hasattr(parent, "name") and parent.name == "class":
- return parent
- parent = parent.parent
-
-untyped = -1
-
-def code(nd):
- global untyped
- cd = num(nd["@code"])
- if cd is None:
- cd = untyped
- untyped -= 1
- return cd
-
- cls = klass(nd)
- if cls:
- cd |= (num(cls["@code"]) << 8)
- return cd
-
-def root(nd):
- if nd.parent is None:
- return nd
- else:
- return root(nd.parent)
-
-def qname(nd):
- name = nd["@name"]
- cls = klass(nd)
- if cls != None:
- return "%s.%s" % (cls["@name"], name)
- else:
- return name
-
-RESOLVED = {}
-
-def resolve(node, name):
- key = (node, name)
- if RESOLVED.has_key(key):
- return RESOLVED[key]
- else:
- spec = root(node)
- cls = klass(node)
- if cls:
- for nd in cls.query["#tag"]:
- if nd["@name"] == name:
- RESOLVED[key] = nd
- return nd
- for nd in spec.query["amqp/#tag"] + spec.query["amqp/class/#tag"]:
- if name == qname(nd):
- RESOLVED[key] = nd
- return nd
- raise Exception("unresolved name: %s" % name)
-
-def resolve_type(nd):
- if hasattr(nd, "_resolved_type"):
- return nd._resolved_type
- else:
- name = nd["@type"]
- type = resolve(nd, name)
- if type.name == "domain" and not type["enum"]:
- type = resolve_type(type)
- nd._resolved_type = type
- return type
-
-TYPES = {
- "bit": "bool",
- "uint8": "short",
- "uint16": "int",
- "uint32": "long",
- "uint64": "long",
- "datetime": "long",
- "uuid": "UUID",
- "sequence-no": "int",
- "sequence-set": "RangeSet", # XXX
- "byte-ranges": "RangeSet", # XXX
- "str8": "String",
- "str16": "String",
- "vbin8": "byte[]",
- "vbin16": "byte[]",
- "vbin32": "byte[]",
- "struct32": "Struct",
- "map": "Dictionary<String,Object>",
- "array": "List<Object>"
- }
-
-def cname(nd, field="@name"):
- cls = klass(nd)
- if cls:
- if (nd.name in ("struct", "result") and
- cls["@name"] != "session" and
- nd[field] != "header"):
- return pascal(0, nd[field])
- else:
- return pascal(0, cls["@name"], nd[field])
- else:
- return pascal(0, nd[field])
-
-def jtype(nd):
- if nd.name == "struct" or nd["enum"]:
- return cname(nd)
- else:
- return TYPES[nd["@name"]]
-
-REFS = {
- "bool": "Boolean",
- "byte": "Byte",
- "short": "Short",
- "int": "Integer",
- "long": "Long",
- "float": "Float",
- "double": "Double",
- "char": "Character"
-}
-
-def jref(jt):
- return REFS.get(jt, jt)
-
-def jclass(jt):
- idx = jt.find('<')
- if idx > 0:
- return jt[:idx]
- else:
- return jt
-
-DEFAULTS = {
- "long": 0,
- "int": 0,
- "short": 0,
- "byte": 0,
- "char": 0,
- "bool": "false"
- }
-
-class Field:
-
- def __init__(self, index, nd):
- self.index = index
- self.name = pascal(1, nd["@name"])
- self.type_node = resolve_type(nd)
- if self.type_node.name == "domain":
- self.prim_type = resolve_type(self.type_node)
- else:
- self.prim_type = self.type_node
- self.variable_width = num(self.prim_type["@variable-width"], 0)
- self.fixed_width = num(self.prim_type["@fixed-width"], 0)
- self.empty = self.variable_width == 0 and self.fixed_width == 0 and self.prim_type.name != "struct"
- tname = cname(self.type_node)
- if self.type_node.name == "struct":
- self.read = "(%s) dec.ReadStruct(%s.TYPE)" % (tname, tname)
- self.write = "enc.WriteStruct(%s.TYPE, check(struct).%s)" % (tname, self.name)
- self.coder = "Struct"
- elif self.type_node.name == "domain":
- self.coder = pascal(0, self.prim_type["@name"])
- self.read = "%s.Get(dec.Read%s())" % (tname, self.coder)
- self.write = "enc.Write%s(check(struct).%s.GetValue())" % (self.coder, self.name)
- else:
- self.coder = pascal(0, self.type_node["@name"])
- self.read = "dec.Read%s()" % self.coder
- self.write = "enc.Write%s(check(struct).%s)" % (self.coder, self.name)
- self.type = jtype(self.type_node)
- self.default = DEFAULTS.get(self.type, "null")
- self.has = pascal(1, "Has", self.name)
- self.get = pascal(1, "Get", self.name)
- self.set = pascal(1, "Set", self.name)
- self.clear = pascal(1, "clear", self.name)
- if self.type == "bool":
- self.option = scream(nd["@name"])
- else:
- self.option = None
-
- def flag_mask(self, pack):
- flag = pack * 8 - 8 - (self.index/8)*8 + (self.index % 8)
- return 1 << flag
-
-
-def get_fields(nd):
- fields = []
- index = 0
- for f in nd.query["field"]:
- fields.append(Field(index, f))
- index += 1
- return fields
-
-def get_parameters(type, fields):
- params = []
- options = False
- for f in fields:
- if f.option:
- options = True
- else:
- params.append("%s %s" % (f.type, f.name))
- if type["segments"]:
- params.append("Header header")
- params.append("MemoryStream body")
- if options or type.name in ("control", "command"):
- params.append("Option ... options")
- return params
-
-def get_arguments(type, fields):
- args = []
- options = False
- for f in fields:
- if f.option:
- options = True
- else:
- args.append(f.name)
- if type["segments"]:
- args.append("header")
- args.append("body")
- if options or type.name in ("control", "command"):
- args.append("options")
- return args
-
-def get_options(fields):
- return [f for f in fields if f.option]
-
-def get_dotnetparameters(type, fields):
- params = []
- options = False
- for f in fields:
- if f.option:
- options = True
- else:
- params.append("%s %s" % (f.type, f.name))
- if type["segments"]:
- params.append("Header header")
- params.append("MemoryStream body")
- if options or type.name in ("control", "command"):
- params.append("params Option[] options")
- return params
diff --git a/qpid/dotnet/client-010/lib/log4net/log4net-licence.txt b/qpid/dotnet/client-010/lib/log4net/log4net-licence.txt
deleted file mode 100644
index 261eeb9e9f..0000000000
--- a/qpid/dotnet/client-010/lib/log4net/log4net-licence.txt
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/qpid/dotnet/client-010/lib/log4net/log4net.dll b/qpid/dotnet/client-010/lib/log4net/log4net.dll
deleted file mode 100644
index 995816f27b..0000000000
--- a/qpid/dotnet/client-010/lib/log4net/log4net.dll
+++ /dev/null
Binary files differ
diff --git a/qpid/dotnet/client-010/lib/log4net/log4net.xml b/qpid/dotnet/client-010/lib/log4net/log4net.xml
deleted file mode 100644
index 5beb669ab0..0000000000
--- a/qpid/dotnet/client-010/lib/log4net/log4net.xml
+++ /dev/null
@@ -1,28676 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<doc>
- <assembly>
- <name>log4net</name>
- </assembly>
- <members>
- <member name="T:log4net.Appender.AdoNetAppender">
- <summary>
- Appender that logs to a database.
- </summary>
- <remarks>
- <para>
- <see cref="T:log4net.Appender.AdoNetAppender"/> appends logging events to a table within a
- database. The appender can be configured to specify the connection
- string by setting the <see cref="P:log4net.Appender.AdoNetAppender.ConnectionString"/> property.
- The connection type (provider) can be specified by setting the <see cref="P:log4net.Appender.AdoNetAppender.ConnectionType"/>
- property. For more information on database connection strings for
- your specific database see <a href="http://www.connectionstrings.com/">http://www.connectionstrings.com/</a>.
- </para>
- <para>
- Records are written into the database either using a prepared
- statement or a stored procedure. The <see cref="P:log4net.Appender.AdoNetAppender.CommandType"/> property
- is set to <see cref="F:System.Data.CommandType.Text"/> (<c>System.Data.CommandType.Text</c>) to specify a prepared statement
- or to <see cref="F:System.Data.CommandType.StoredProcedure"/> (<c>System.Data.CommandType.StoredProcedure</c>) to specify a stored
- procedure.
- </para>
- <para>
- The prepared statement text or the name of the stored procedure
- must be set in the <see cref="P:log4net.Appender.AdoNetAppender.CommandText"/> property.
- </para>
- <para>
- The prepared statement or stored procedure can take a number
- of parameters. Parameters are added using the <see cref="M:log4net.Appender.AdoNetAppender.AddParameter(log4net.Appender.AdoNetAppenderParameter)"/>
- method. This adds a single <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> to the
- ordered list of parameters. The <see cref="T:log4net.Appender.AdoNetAppenderParameter"/>
- type may be subclassed if required to provide database specific
- functionality. The <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> specifies
- the parameter name, database type, size, and how the value should
- be generated using a <see cref="T:log4net.Layout.ILayout"/>.
- </para>
- </remarks>
- <example>
- An example of a SQL Server table that could be logged to:
- <code lang="SQL">
- CREATE TABLE [dbo].[Log] (
- [ID] [int] IDENTITY (1, 1) NOT NULL ,
- [Date] [datetime] NOT NULL ,
- [Thread] [varchar] (255) NOT NULL ,
- [Level] [varchar] (20) NOT NULL ,
- [Logger] [varchar] (255) NOT NULL ,
- [Message] [varchar] (4000) NOT NULL
- ) ON [PRIMARY]
- </code>
- </example>
- <example>
- An example configuration to log to the above table:
- <code lang="XML" escaped="true">
- <appender name="AdoNetAppender_SqlServer" type="log4net.Appender.AdoNetAppender">
- <connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
- <connectionString value="data source=SQLSVR;initial catalog=test_log4net;integrated security=false;persist security info=True;User ID=sa;Password=sa"/>
- <commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message]) VALUES (@log_date, @thread, @log_level, @logger, @message)"/>
- <parameter>
- <parameterName value="@log_date"/>
- <dbType value="DateTime"/>
- <layout type="log4net.Layout.PatternLayout" value="%date{yyyy'-'MM'-'dd HH':'mm':'ss'.'fff}"/>
- </parameter>
- <parameter>
- <parameterName value="@thread"/>
- <dbType value="String"/>
- <size value="255"/>
- <layout type="log4net.Layout.PatternLayout" value="%thread"/>
- </parameter>
- <parameter>
- <parameterName value="@log_level"/>
- <dbType value="String"/>
- <size value="50"/>
- <layout type="log4net.Layout.PatternLayout" value="%level"/>
- </parameter>
- <parameter>
- <parameterName value="@logger"/>
- <dbType value="String"/>
- <size value="255"/>
- <layout type="log4net.Layout.PatternLayout" value="%logger"/>
- </parameter>
- <parameter>
- <parameterName value="@message"/>
- <dbType value="String"/>
- <size value="4000"/>
- <layout type="log4net.Layout.PatternLayout" value="%message"/>
- </parameter>
- </appender>
- </code>
- </example>
- <author>Julian Biddle</author>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Lance Nehring</author>
- </member>
- <member name="T:log4net.Appender.BufferingAppenderSkeleton">
- <summary>
- Abstract base class implementation of <see cref="T:log4net.Appender.IAppender"/> that
- buffers events in a fixed size buffer.
- </summary>
- <remarks>
- <para>
- This base class should be used by appenders that need to buffer a
- number of events before logging them. For example the <see cref="T:log4net.Appender.AdoNetAppender"/>
- buffers events and then submits the entire contents of the buffer to
- the underlying database in one go.
- </para>
- <para>
- Subclasses should override the <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>
- method to deliver the buffered events.
- </para>
- <para>The BufferingAppenderSkeleton maintains a fixed size cyclic
- buffer of events. The size of the buffer is set using
- the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> property.
- </para>
- <para>A <see cref="T:log4net.Core.ITriggeringEventEvaluator"/> is used to inspect
- each event as it arrives in the appender. If the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/>
- triggers, then the current buffer is sent immediately
- (see <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>). Otherwise the event
- is stored in the buffer. For example, an evaluator can be used to
- deliver the events immediately when an ERROR event arrives.
- </para>
- <para>
- The buffering appender can be configured in a <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> mode.
- By default the appender is NOT lossy. When the buffer is full all
- the buffered events are sent with <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>.
- If the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> property is set to <c>true</c> then the
- buffer will not be sent when it is full, and new events arriving
- in the appender will overwrite the oldest event in the buffer.
- In lossy mode the buffer will only be sent when the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/>
- triggers. This can be useful behavior when you need to know about
- ERROR events but not about events with a lower level, configure an
- evaluator that will trigger when an ERROR event arrives, the whole
- buffer will be sent which gives a history of events leading up to
- the ERROR event.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Appender.AppenderSkeleton">
- <summary>
- Abstract base class implementation of <see cref="T:log4net.Appender.IAppender"/>.
- </summary>
- <remarks>
- <para>
- This class provides the code for common functionality, such
- as support for threshold filtering and support for general filters.
- </para>
- <para>
- Appenders can also implement the <see cref="T:log4net.Core.IOptionHandler"/> interface. Therefore
- they would require that the <see cref="M:log4net.Core.IOptionHandler.ActivateOptions"/> method
- be called after the appenders properties have been configured.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Appender.IAppender">
- <summary>
- Implement this interface for your own strategies for printing log statements.
- </summary>
- <remarks>
- <para>
- Implementors should consider extending the <see cref="T:log4net.Appender.AppenderSkeleton"/>
- class which provides a default implementation of this interface.
- </para>
- <para>
- Appenders can also implement the <see cref="T:log4net.Core.IOptionHandler"/> interface. Therefore
- they would require that the <see cref="M:log4net.Core.IOptionHandler.ActivateOptions"/> method
- be called after the appenders properties have been configured.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.IAppender.Close">
- <summary>
- Closes the appender and releases resources.
- </summary>
- <remarks>
- <para>
- Releases any resources allocated within the appender such as file handles,
- network connections, etc.
- </para>
- <para>
- It is a programming error to append to a closed appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.IAppender.DoAppend(log4net.Core.LoggingEvent)">
- <summary>
- Log the logging event in Appender specific way.
- </summary>
- <param name="loggingEvent">The event to log</param>
- <remarks>
- <para>
- This method is called to log a message into this appender.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.IAppender.Name">
- <summary>
- Gets or sets the name of this appender.
- </summary>
- <value>The name of the appender.</value>
- <remarks>
- <para>The name uniquely identifies the appender.</para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.IBulkAppender">
- <summary>
- Interface for appenders that support bulk logging.
- </summary>
- <remarks>
- <para>
- This interface extends the <see cref="T:log4net.Appender.IAppender"/> interface to
- support bulk logging of <see cref="T:log4net.Core.LoggingEvent"/> objects. Appenders
- should only implement this interface if they can bulk log efficiently.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.IBulkAppender.DoAppend(log4net.Core.LoggingEvent[])">
- <summary>
- Log the array of logging events in Appender specific way.
- </summary>
- <param name="loggingEvents">The events to log</param>
- <remarks>
- <para>
- This method is called to log an array of events into this appender.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.IOptionHandler">
- <summary>
- Interface used to delay activate a configured object.
- </summary>
- <remarks>
- <para>
- This allows an object to defer activation of its options until all
- options have been set. This is required for components which have
- related options that remain ambiguous until all are set.
- </para>
- <para>
- If a component implements this interface then the <see cref="M:log4net.Core.IOptionHandler.ActivateOptions"/> method
- must be called by the container after its all the configured properties have been set
- and before the component can be used.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Core.IOptionHandler.ActivateOptions">
- <summary>
- Activate the options that were previously set with calls to properties.
- </summary>
- <remarks>
- <para>
- This allows an object to defer activation of its options until all
- options have been set. This is required for components which have
- related options that remain ambiguous until all are set.
- </para>
- <para>
- If a component implements this interface then this method must be called
- after its properties have been set before the component can be used.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.c_renderBufferSize">
- <summary>
- Initial buffer size
- </summary>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.c_renderBufferMaxCapacity">
- <summary>
- Maximum buffer size before it is recycled
- </summary>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>Empty default constructor</para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.Finalize">
- <summary>
- Finalizes this appender by calling the implementation's
- <see cref="M:log4net.Appender.AppenderSkeleton.Close"/> method.
- </summary>
- <remarks>
- <para>
- If this appender has not been closed then the <c>Finalize</c> method
- will call <see cref="M:log4net.Appender.AppenderSkeleton.Close"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.ActivateOptions">
- <summary>
- Initialize the appender based on the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.AppenderSkeleton.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.AppenderSkeleton.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.AppenderSkeleton.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.Close">
- <summary>
- Closes the appender and release resources.
- </summary>
- <remarks>
- <para>
- Release any resources allocated within the appender such as file handles,
- network connections, etc.
- </para>
- <para>
- It is a programming error to append to a closed appender.
- </para>
- <para>
- This method cannot be overridden by subclasses. This method
- delegates the closing of the appender to the <see cref="M:log4net.Appender.AppenderSkeleton.OnClose"/>
- method which must be overridden in the subclass.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)">
- <summary>
- Performs threshold checks and invokes filters before
- delegating actual logging to the subclasses specific
- <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- This method cannot be overridden by derived classes. A
- derived class should override the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method
- which is called by this method.
- </para>
- <para>
- The implementation of this method is as follows:
- </para>
- <para>
- <list type="bullet">
- <item>
- <description>
- Checks that the severity of the <paramref name="loggingEvent"/>
- is greater than or equal to the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> of this
- appender.</description>
- </item>
- <item>
- <description>
- Checks that the <see cref="T:log4net.Filter.IFilter"/> chain accepts the
- <paramref name="loggingEvent"/>.
- </description>
- </item>
- <item>
- <description>
- Calls <see cref="M:log4net.Appender.AppenderSkeleton.PreAppendCheck"/> and checks that
- it returns <c>true</c>.</description>
- </item>
- </list>
- </para>
- <para>
- If all of the above steps succeed then the <paramref name="loggingEvent"/>
- will be passed to the abstract <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent[])">
- <summary>
- Performs threshold checks and invokes filters before
- delegating actual logging to the subclasses specific
- <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent[])"/> method.
- </summary>
- <param name="loggingEvents">The array of events to log.</param>
- <remarks>
- <para>
- This method cannot be overridden by derived classes. A
- derived class should override the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent[])"/> method
- which is called by this method.
- </para>
- <para>
- The implementation of this method is as follows:
- </para>
- <para>
- <list type="bullet">
- <item>
- <description>
- Checks that the severity of the <paramref name="loggingEvent"/>
- is greater than or equal to the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> of this
- appender.</description>
- </item>
- <item>
- <description>
- Checks that the <see cref="T:log4net.Filter.IFilter"/> chain accepts the
- <paramref name="loggingEvent"/>.
- </description>
- </item>
- <item>
- <description>
- Calls <see cref="M:log4net.Appender.AppenderSkeleton.PreAppendCheck"/> and checks that
- it returns <c>true</c>.</description>
- </item>
- </list>
- </para>
- <para>
- If all of the above steps succeed then the <paramref name="loggingEvents"/>
- will be passed to the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent[])"/> method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.FilterEvent(log4net.Core.LoggingEvent)">
- <summary>
- Test if the logging event should we output by this appender
- </summary>
- <param name="loggingEvent">the event to test</param>
- <returns><c>true</c> if the event should be output, <c>false</c> if the event should be ignored</returns>
- <remarks>
- <para>
- This method checks the logging event against the threshold level set
- on this appender and also against the filters specified on this
- appender.
- </para>
- <para>
- The implementation of this method is as follows:
- </para>
- <para>
- <list type="bullet">
- <item>
- <description>
- Checks that the severity of the <paramref name="loggingEvent"/>
- is greater than or equal to the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> of this
- appender.</description>
- </item>
- <item>
- <description>
- Checks that the <see cref="T:log4net.Filter.IFilter"/> chain accepts the
- <paramref name="loggingEvent"/>.
- </description>
- </item>
- </list>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.AddFilter(log4net.Filter.IFilter)">
- <summary>
- Adds a filter to the end of the filter chain.
- </summary>
- <param name="filter">the filter to add to this appender</param>
- <remarks>
- <para>
- The Filters are organized in a linked list.
- </para>
- <para>
- Setting this property causes the new filter to be pushed onto the
- back of the filter chain.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.ClearFilters">
- <summary>
- Clears the filter list for this appender.
- </summary>
- <remarks>
- <para>
- Clears the filter list for this appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.IsAsSevereAsThreshold(log4net.Core.Level)">
- <summary>
- Checks if the message level is below this appender's threshold.
- </summary>
- <param name="level"><see cref="T:log4net.Core.Level"/> to test against.</param>
- <remarks>
- <para>
- If there is no threshold set, then the return value is always <c>true</c>.
- </para>
- </remarks>
- <returns>
- <c>true</c> if the <paramref name="level"/> meets the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/>
- requirements of this appender.
- </returns>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.OnClose">
- <summary>
- Is called when the appender is closed. Derived classes should override
- this method if resources need to be released.
- </summary>
- <remarks>
- <para>
- Releases any resources allocated within the appender such as file handles,
- network connections, etc.
- </para>
- <para>
- It is a programming error to append to a closed appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)">
- <summary>
- Subclasses of <see cref="T:log4net.Appender.AppenderSkeleton"/> should implement this method
- to perform actual logging.
- </summary>
- <param name="loggingEvent">The event to append.</param>
- <remarks>
- <para>
- A subclass must implement this method to perform
- logging of the <paramref name="loggingEvent"/>.
- </para>
- <para>This method will be called by <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/>
- if all the conditions listed for that method are met.
- </para>
- <para>
- To restrict the logging of events in the appender
- override the <see cref="M:log4net.Appender.AppenderSkeleton.PreAppendCheck"/> method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent[])">
- <summary>
- Append a bulk array of logging events.
- </summary>
- <param name="loggingEvents">the array of logging events</param>
- <remarks>
- <para>
- This base class implementation calls the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/>
- method for each element in the bulk array.
- </para>
- <para>
- A sub class that can better process a bulk array of events should
- override this method in addition to <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.PreAppendCheck">
- <summary>
- Called before <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> as a precondition.
- </summary>
- <remarks>
- <para>
- This method is called by <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/>
- before the call to the abstract <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method.
- </para>
- <para>
- This method can be overridden in a subclass to extend the checks
- made before the event is passed to the <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> method.
- </para>
- <para>
- A subclass should ensure that they delegate this call to
- this base class if it is overridden.
- </para>
- </remarks>
- <returns><c>true</c> if the call to <see cref="M:log4net.Appender.AppenderSkeleton.Append(log4net.Core.LoggingEvent)"/> should proceed.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(log4net.Core.LoggingEvent)">
- <summary>
- Renders the <see cref="T:log4net.Core.LoggingEvent"/> to a string.
- </summary>
- <param name="loggingEvent">The event to render.</param>
- <returns>The event rendered as a string.</returns>
- <remarks>
- <para>
- Helper method to render a <see cref="T:log4net.Core.LoggingEvent"/> to
- a string. This appender must have a <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/>
- set to render the <paramref name="loggingEvent"/> to
- a string.
- </para>
- <para>If there is exception data in the logging event and
- the layout does not process the exception, this method
- will append the exception text to the rendered string.
- </para>
- <para>
- Where possible use the alternative version of this method
- <see cref="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(System.IO.TextWriter,log4net.Core.LoggingEvent)"/>.
- That method streams the rendering onto an existing Writer
- which can give better performance if the caller already has
- a <see cref="T:System.IO.TextWriter"/> open and ready for writing.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Renders the <see cref="T:log4net.Core.LoggingEvent"/> to a string.
- </summary>
- <param name="loggingEvent">The event to render.</param>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <remarks>
- <para>
- Helper method to render a <see cref="T:log4net.Core.LoggingEvent"/> to
- a string. This appender must have a <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/>
- set to render the <paramref name="loggingEvent"/> to
- a string.
- </para>
- <para>If there is exception data in the logging event and
- the layout does not process the exception, this method
- will append the exception text to the rendered string.
- </para>
- <para>
- Use this method in preference to <see cref="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(log4net.Core.LoggingEvent)"/>
- where possible. If, however, the caller needs to render the event
- to a string then <see cref="M:log4net.Appender.AppenderSkeleton.RenderLoggingEvent(log4net.Core.LoggingEvent)"/> does
- provide an efficient mechanism for doing so.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_layout">
- <summary>
- The layout of this appender.
- </summary>
- <remarks>
- See <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/> for more information.
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_name">
- <summary>
- The name of this appender.
- </summary>
- <remarks>
- See <see cref="P:log4net.Appender.AppenderSkeleton.Name"/> for more information.
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_threshold">
- <summary>
- The level threshold of this appender.
- </summary>
- <remarks>
- <para>
- There is no level threshold filtering by default.
- </para>
- <para>
- See <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_errorHandler">
- <summary>
- It is assumed and enforced that errorHandler is never null.
- </summary>
- <remarks>
- <para>
- It is assumed and enforced that errorHandler is never null.
- </para>
- <para>
- See <see cref="P:log4net.Appender.AppenderSkeleton.ErrorHandler"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_headFilter">
- <summary>
- The first filter in the filter chain.
- </summary>
- <remarks>
- <para>
- Set to <c>null</c> initially.
- </para>
- <para>
- See <see cref="T:log4net.Filter.IFilter"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_tailFilter">
- <summary>
- The last filter in the filter chain.
- </summary>
- <remarks>
- See <see cref="T:log4net.Filter.IFilter"/> for more information.
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_closed">
- <summary>
- Flag indicating if this appender is closed.
- </summary>
- <remarks>
- See <see cref="M:log4net.Appender.AppenderSkeleton.Close"/> for more information.
- </remarks>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_recursiveGuard">
- <summary>
- The guard prevents an appender from repeatedly calling its own DoAppend method
- </summary>
- </member>
- <member name="F:log4net.Appender.AppenderSkeleton.m_renderWriter">
- <summary>
- StringWriter used to render events
- </summary>
- </member>
- <member name="P:log4net.Appender.AppenderSkeleton.Threshold">
- <summary>
- Gets or sets the threshold <see cref="T:log4net.Core.Level"/> of this appender.
- </summary>
- <value>
- The threshold <see cref="T:log4net.Core.Level"/> of the appender.
- </value>
- <remarks>
- <para>
- All log events with lower level than the threshold level are ignored
- by the appender.
- </para>
- <para>
- In configuration files this option is specified by setting the
- value of the <see cref="P:log4net.Appender.AppenderSkeleton.Threshold"/> option to a level
- string, such as "DEBUG", "INFO" and so on.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AppenderSkeleton.ErrorHandler">
- <summary>
- Gets or sets the <see cref="T:log4net.Core.IErrorHandler"/> for this appender.
- </summary>
- <value>The <see cref="T:log4net.Core.IErrorHandler"/> of the appender</value>
- <remarks>
- <para>
- The <see cref="T:log4net.Appender.AppenderSkeleton"/> provides a default
- implementation for the <see cref="P:log4net.Appender.AppenderSkeleton.ErrorHandler"/> property.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AppenderSkeleton.FilterHead">
- <summary>
- The filter chain.
- </summary>
- <value>The head of the filter chain filter chain.</value>
- <remarks>
- <para>
- Returns the head Filter. The Filters are organized in a linked list
- and so all Filters on this Appender are available through the result.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AppenderSkeleton.Layout">
- <summary>
- Gets or sets the <see cref="T:log4net.Layout.ILayout"/> for this appender.
- </summary>
- <value>The layout of the appender.</value>
- <remarks>
- <para>
- See <see cref="P:log4net.Appender.AppenderSkeleton.RequiresLayout"/> for more information.
- </para>
- </remarks>
- <seealso cref="P:log4net.Appender.AppenderSkeleton.RequiresLayout"/>
- </member>
- <member name="P:log4net.Appender.AppenderSkeleton.Name">
- <summary>
- Gets or sets the name of this appender.
- </summary>
- <value>The name of the appender.</value>
- <remarks>
- <para>
- The name uniquely identifies the appender.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AppenderSkeleton.RequiresLayout">
- <summary>
- Tests if this appender requires a <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/> to be set.
- </summary>
- <remarks>
- <para>
- In the rather exceptional case, where the appender
- implementation admits a layout but can also work without it,
- then the appender should return <c>true</c>.
- </para>
- <para>
- This default implementation always returns <c>true</c>.
- </para>
- </remarks>
- <returns>
- <c>true</c> if the appender requires a layout object, otherwise <c>false</c>.
- </returns>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.DEFAULT_BUFFER_SIZE">
- <summary>
- The default buffer size.
- </summary>
- <remarks>
- The default size of the cyclic buffer used to store events.
- This is set to 512 by default.
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.BufferingAppenderSkeleton"/> class.
- </summary>
- <remarks>
- <para>
- Protected default constructor to allow subclassing.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.#ctor(System.Boolean)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.BufferingAppenderSkeleton"/> class.
- </summary>
- <param name="eventMustBeFixed">the events passed through this appender must be
- fixed by the time that they arrive in the derived class' <c>SendBuffer</c> method.</param>
- <remarks>
- <para>
- Protected constructor to allow subclassing.
- </para>
- <para>
- The <paramref name="eventMustBeFixed"/> should be set if the subclass
- expects the events delivered to be fixed even if the
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> is set to zero, i.e. when no buffering occurs.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.Flush">
- <summary>
- Flush the currently buffered events
- </summary>
- <remarks>
- <para>
- Flushes any events that have been buffered.
- </para>
- <para>
- If the appender is buffering in <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> mode then the contents
- of the buffer will NOT be flushed to the appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.Flush(System.Boolean)">
- <summary>
- Flush the currently buffered events
- </summary>
- <param name="flushLossyBuffer">set to <c>true</c> to flush the buffer of lossy events</param>
- <remarks>
- <para>
- Flushes events that have been buffered. If <paramref name="flushLossyBuffer"/> is
- <c>false</c> then events will only be flushed if this buffer is non-lossy mode.
- </para>
- <para>
- If the appender is buffering in <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> mode then the contents
- of the buffer will only be flushed if <paramref name="flushLossyBuffer"/> is <c>true</c>.
- In this case the contents of the buffer will be tested against the
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.LossyEvaluator"/> and if triggering will be output. All other buffered
- events will be discarded.
- </para>
- <para>
- If <paramref name="flushLossyBuffer"/> is <c>true</c> then the buffer will always
- be emptied by calling this method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.ActivateOptions">
- <summary>
- Initialize the appender based on the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.BufferingAppenderSkeleton.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.BufferingAppenderSkeleton.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.BufferingAppenderSkeleton.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.OnClose">
- <summary>
- Close this appender instance.
- </summary>
- <remarks>
- <para>
- Close this appender instance. If this appender is marked
- as not <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> then the remaining events in
- the buffer must be sent when the appender is closed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">the event to log</param>
- <remarks>
- <para>
- Stores the <paramref name="loggingEvent"/> in the cyclic buffer.
- </para>
- <para>
- The buffer will be sent (i.e. passed to the <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>
- method) if one of the following conditions is met:
- </para>
- <list type="bullet">
- <item>
- <description>The cyclic buffer is full and this appender is
- marked as not lossy (see <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/>)</description>
- </item>
- <item>
- <description>An <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> is set and
- it is triggered for the <paramref name="loggingEvent"/>
- specified.</description>
- </item>
- </list>
- <para>
- Before the event is stored in the buffer it is fixed
- (see <see cref="M:log4net.Core.LoggingEvent.FixVolatileData(log4net.Core.FixFlags)"/>) to ensure that
- any data referenced by the event will be valid when the buffer
- is processed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.SendFromBuffer(log4net.Core.LoggingEvent,log4net.Util.CyclicBuffer)">
- <summary>
- Sends the contents of the buffer.
- </summary>
- <param name="firstLoggingEvent">The first logging event.</param>
- <param name="buffer">The buffer containing the events that need to be send.</param>
- <remarks>
- <para>
- The subclass must override <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])">
- <summary>
- Sends the events.
- </summary>
- <param name="events">The events that need to be send.</param>
- <remarks>
- <para>
- The subclass must override this method to process the buffered events.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_bufferSize">
- <summary>
- The size of the cyclic buffer used to hold the logging events.
- </summary>
- <remarks>
- Set to <see cref="F:log4net.Appender.BufferingAppenderSkeleton.DEFAULT_BUFFER_SIZE"/> by default.
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_cb">
- <summary>
- The cyclic buffer used to store the logging events.
- </summary>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_evaluator">
- <summary>
- The triggering event evaluator that causes the buffer to be sent immediately.
- </summary>
- <remarks>
- The object that is used to determine if an event causes the entire
- buffer to be sent immediately. This field can be <c>null</c>, which
- indicates that event triggering is not to be done. The evaluator
- can be set using the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> property. If this appender
- has the <see cref="F:log4net.Appender.BufferingAppenderSkeleton.m_lossy"/> (<see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> property) set to
- <c>true</c> then an <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> must be set.
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_lossy">
- <summary>
- Indicates if the appender should overwrite events in the cyclic buffer
- when it becomes full, or if the buffer should be flushed when the
- buffer is full.
- </summary>
- <remarks>
- If this field is set to <c>true</c> then an <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> must
- be set.
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_lossyEvaluator">
- <summary>
- The triggering event evaluator filters discarded events.
- </summary>
- <remarks>
- The object that is used to determine if an event that is discarded should
- really be discarded or if it should be sent to the appenders.
- This field can be <c>null</c>, which indicates that all discarded events will
- be discarded.
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_fixFlags">
- <summary>
- Value indicating which fields in the event should be fixed
- </summary>
- <remarks>
- By default all fields are fixed
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingAppenderSkeleton.m_eventMustBeFixed">
- <summary>
- The events delivered to the subclass must be fixed.
- </summary>
- </member>
- <member name="P:log4net.Appender.BufferingAppenderSkeleton.Lossy">
- <summary>
- Gets or sets a value that indicates whether the appender is lossy.
- </summary>
- <value>
- <c>true</c> if the appender is lossy, otherwise <c>false</c>. The default is <c>false</c>.
- </value>
- <remarks>
- <para>
- This appender uses a buffer to store logging events before
- delivering them. A triggering event causes the whole buffer
- to be send to the remote sink. If the buffer overruns before
- a triggering event then logging events could be lost. Set
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> to <c>false</c> to prevent logging events
- from being lost.
- </para>
- <para>If <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> is set to <c>true</c> then an
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> must be specified.</para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize">
- <summary>
- Gets or sets the size of the cyclic buffer used to hold the
- logging events.
- </summary>
- <value>
- The size of the cyclic buffer used to hold the logging events.
- </value>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> option takes a positive integer
- representing the maximum number of logging events to collect in
- a cyclic buffer. When the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> is reached,
- oldest events are deleted as new events are added to the
- buffer. By default the size of the cyclic buffer is 512 events.
- </para>
- <para>
- If the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> is set to a value less than
- or equal to 1 then no buffering will occur. The logging event
- will be delivered synchronously (depending on the <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/>
- and <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> properties). Otherwise the event will
- be buffered.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator">
- <summary>
- Gets or sets the <see cref="T:log4net.Core.ITriggeringEventEvaluator"/> that causes the
- buffer to be sent immediately.
- </summary>
- <value>
- The <see cref="T:log4net.Core.ITriggeringEventEvaluator"/> that causes the buffer to be
- sent immediately.
- </value>
- <remarks>
- <para>
- The evaluator will be called for each event that is appended to this
- appender. If the evaluator triggers then the current buffer will
- immediately be sent (see <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>).
- </para>
- <para>If <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Lossy"/> is set to <c>true</c> then an
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.Evaluator"/> must be specified.</para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.BufferingAppenderSkeleton.LossyEvaluator">
- <summary>
- Gets or sets the value of the <see cref="T:log4net.Core.ITriggeringEventEvaluator"/> to use.
- </summary>
- <value>
- The value of the <see cref="T:log4net.Core.ITriggeringEventEvaluator"/> to use.
- </value>
- <remarks>
- <para>
- The evaluator will be called for each event that is discarded from this
- appender. If the evaluator triggers then the current buffer will immediately
- be sent (see <see cref="M:log4net.Appender.BufferingAppenderSkeleton.SendBuffer(log4net.Core.LoggingEvent[])"/>).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.BufferingAppenderSkeleton.OnlyFixPartialEventData">
- <summary>
- Gets or sets a value indicating if only part of the logging event data
- should be fixed.
- </summary>
- <value>
- <c>true</c> if the appender should only fix part of the logging event
- data, otherwise <c>false</c>. The default is <c>false</c>.
- </value>
- <remarks>
- <para>
- Setting this property to <c>true</c> will cause only part of the
- event data to be fixed and serialized. This will improve performance.
- </para>
- <para>
- See <see cref="M:log4net.Core.LoggingEvent.FixVolatileData(log4net.Core.FixFlags)"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.BufferingAppenderSkeleton.Fix">
- <summary>
- Gets or sets a the fields that will be fixed in the event
- </summary>
- <value>
- The event fields that will be fixed before the event is buffered
- </value>
- <remarks>
- <para>
- The logging event needs to have certain thread specific values
- captured before it can be buffered. See <see cref="P:log4net.Core.LoggingEvent.Fix"/>
- for details.
- </para>
- </remarks>
- <seealso cref="P:log4net.Core.LoggingEvent.Fix"/>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.AdoNetAppender"/> class.
- </summary>
- <remarks>
- Public default constructor to initialize a new instance of this class.
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.AdoNetAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.AdoNetAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.AdoNetAppender.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.OnClose">
- <summary>
- Override the parent method to close the database
- </summary>
- <remarks>
- <para>
- Closes the database command and database connection.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.SendBuffer(log4net.Core.LoggingEvent[])">
- <summary>
- Inserts the events into the database.
- </summary>
- <param name="events">The events to insert into the database.</param>
- <remarks>
- <para>
- Insert all the events specified in the <paramref name="events"/>
- array into the database.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.AddParameter(log4net.Appender.AdoNetAppenderParameter)">
- <summary>
- Adds a parameter to the command.
- </summary>
- <param name="parameter">The parameter to add to the command.</param>
- <remarks>
- <para>
- Adds a parameter to the ordered list of command parameters.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.SendBuffer(System.Data.IDbTransaction,log4net.Core.LoggingEvent[])">
- <summary>
- Writes the events to the database using the transaction specified.
- </summary>
- <param name="dbTran">The transaction that the events will be executed under.</param>
- <param name="events">The array of events to insert into the database.</param>
- <remarks>
- <para>
- The transaction argument can be <c>null</c> if the appender has been
- configured not to use transactions. See <see cref="P:log4net.Appender.AdoNetAppender.UseTransactions"/>
- property for more information.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.GetLogStatement(log4net.Core.LoggingEvent)">
- <summary>
- Formats the log message into database statement text.
- </summary>
- <param name="logEvent">The event being logged.</param>
- <remarks>
- This method can be overridden by subclasses to provide
- more control over the format of the database statement.
- </remarks>
- <returns>
- Text that can be passed to a <see cref="T:System.Data.IDbCommand"/>.
- </returns>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.InitializeDatabaseConnection">
- <summary>
- Connects to the database.
- </summary>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.ResolveConnectionType">
- <summary>
- Retrieves the class type of the ADO.NET provider.
- </summary>
- <remarks>
- <para>
- Gets the Type of the ADO.NET provider to use to connect to the
- database. This method resolves the type specified in the
- <see cref="P:log4net.Appender.AdoNetAppender.ConnectionType"/> property.
- </para>
- <para>
- Subclasses can override this method to return a different type
- if necessary.
- </para>
- </remarks>
- <returns>The <see cref="T:System.Type"/> of the ADO.NET provider</returns>
- </member>
- <member name="M:log4net.Appender.AdoNetAppender.InitializeDatabaseCommand">
- <summary>
- Prepares the database command and initialize the parameters.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_usePreparedCommand">
- <summary>
- Flag to indicate if we are using a command object
- </summary>
- <remarks>
- <para>
- Set to <c>true</c> when the appender is to use a prepared
- statement or stored procedure to insert into the database.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_parameters">
- <summary>
- The list of <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> objects.
- </summary>
- <remarks>
- <para>
- The list of <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> objects.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_securityContext">
- <summary>
- The security context to use for privileged calls
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_dbConnection">
- <summary>
- The <see cref="T:System.Data.IDbConnection"/> that will be used
- to insert logging events into a database.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_dbCommand">
- <summary>
- The database command.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_connectionString">
- <summary>
- Database connection string.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_connectionType">
- <summary>
- String type name of the <see cref="T:System.Data.IDbConnection"/> type name.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_commandText">
- <summary>
- The text of the command.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_commandType">
- <summary>
- The command type.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_useTransactions">
- <summary>
- Indicates whether to use transactions when writing to the database.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppender.m_reconnectOnError">
- <summary>
- Indicates whether to use transactions when writing to the database.
- </summary>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.ConnectionString">
- <summary>
- Gets or sets the database connection string that is used to connect to
- the database.
- </summary>
- <value>
- The database connection string used to connect to the database.
- </value>
- <remarks>
- <para>
- The connections string is specific to the connection type.
- See <see cref="P:log4net.Appender.AdoNetAppender.ConnectionType"/> for more information.
- </para>
- </remarks>
- <example>Connection string for MS Access via ODBC:
- <code>"DSN=MS Access Database;UID=admin;PWD=;SystemDB=C:\data\System.mdw;SafeTransactions = 0;FIL=MS Access;DriverID = 25;DBQ=C:\data\train33.mdb"</code>
- </example>
- <example>Another connection string for MS Access via ODBC:
- <code>"Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Work\cvs_root\log4net-1.2\access.mdb;UID=;PWD=;"</code>
- </example>
- <example>Connection string for MS Access via OLE DB:
- <code>"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Work\cvs_root\log4net-1.2\access.mdb;User Id=;Password=;"</code>
- </example>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.ConnectionType">
- <summary>
- Gets or sets the type name of the <see cref="T:System.Data.IDbConnection"/> connection
- that should be created.
- </summary>
- <value>
- The type name of the <see cref="T:System.Data.IDbConnection"/> connection.
- </value>
- <remarks>
- <para>
- The type name of the ADO.NET provider to use.
- </para>
- <para>
- The default is to use the OLE DB provider.
- </para>
- </remarks>
- <example>Use the OLE DB Provider. This is the default value.
- <code>System.Data.OleDb.OleDbConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</code>
- </example>
- <example>Use the MS SQL Server Provider.
- <code>System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</code>
- </example>
- <example>Use the ODBC Provider.
- <code>Microsoft.Data.Odbc.OdbcConnection,Microsoft.Data.Odbc,version=1.0.3300.0,publicKeyToken=b77a5c561934e089,culture=neutral</code>
- This is an optional package that you can download from
- <a href="http://msdn.microsoft.com/downloads">http://msdn.microsoft.com/downloads</a>
- search for <b>ODBC .NET Data Provider</b>.
- </example>
- <example>Use the Oracle Provider.
- <code>System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</code>
- This is an optional package that you can download from
- <a href="http://msdn.microsoft.com/downloads">http://msdn.microsoft.com/downloads</a>
- search for <b>.NET Managed Provider for Oracle</b>.
- </example>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.CommandText">
- <summary>
- Gets or sets the command text that is used to insert logging events
- into the database.
- </summary>
- <value>
- The command text used to insert logging events into the database.
- </value>
- <remarks>
- <para>
- Either the text of the prepared statement or the
- name of the stored procedure to execute to write into
- the database.
- </para>
- <para>
- The <see cref="P:log4net.Appender.AdoNetAppender.CommandType"/> property determines if
- this text is a prepared statement or a stored procedure.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.CommandType">
- <summary>
- Gets or sets the command type to execute.
- </summary>
- <value>
- The command type to execute.
- </value>
- <remarks>
- <para>
- This value may be either <see cref="F:System.Data.CommandType.Text"/> (<c>System.Data.CommandType.Text</c>) to specify
- that the <see cref="P:log4net.Appender.AdoNetAppender.CommandText"/> is a prepared statement to execute,
- or <see cref="F:System.Data.CommandType.StoredProcedure"/> (<c>System.Data.CommandType.StoredProcedure</c>) to specify that the
- <see cref="P:log4net.Appender.AdoNetAppender.CommandText"/> property is the name of a stored procedure
- to execute.
- </para>
- <para>
- The default value is <see cref="F:System.Data.CommandType.Text"/> (<c>System.Data.CommandType.Text</c>).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.UseTransactions">
- <summary>
- Should transactions be used to insert logging events in the database.
- </summary>
- <value>
- <c>true</c> if transactions should be used to insert logging events in
- the database, otherwise <c>false</c>. The default value is <c>true</c>.
- </value>
- <remarks>
- <para>
- Gets or sets a value that indicates whether transactions should be used
- to insert logging events in the database.
- </para>
- <para>
- When set a single transaction will be used to insert the buffered events
- into the database. Otherwise each event will be inserted without using
- an explicit transaction.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.SecurityContext">
- <summary>
- Gets or sets the <see cref="P:log4net.Appender.AdoNetAppender.SecurityContext"/> used to call the NetSend method.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.AdoNetAppender.SecurityContext"/> used to call the NetSend method.
- </value>
- <remarks>
- <para>
- Unless a <see cref="P:log4net.Appender.AdoNetAppender.SecurityContext"/> specified here for this appender
- the <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> is queried for the
- security context to use. The default behavior is to use the security context
- of the current thread.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.ReconnectOnError">
- <summary>
- Should this appender try to reconnect to the database on error.
- </summary>
- <value>
- <c>true</c> if the appender should try to reconnect to the database after an
- error has occurred, otherwise <c>false</c>. The default value is <c>false</c>,
- i.e. not to try to reconnect.
- </value>
- <remarks>
- <para>
- The default behaviour is for the appender not to try to reconnect to the
- database if an error occurs. Subsequent logging events are discarded.
- </para>
- <para>
- To force the appender to attempt to reconnect to the database set this
- property to <c>true</c>.
- </para>
- <note>
- When the appender attempts to connect to the database there may be a
- delay of up to the connection timeout specified in the connection string.
- This delay will block the calling application's thread.
- Until the connection can be reestablished this potential delay may occur multiple times.
- </note>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AdoNetAppender.Connection">
- <summary>
- Gets or sets the underlying <see cref="T:System.Data.IDbConnection"/>.
- </summary>
- <value>
- The underlying <see cref="T:System.Data.IDbConnection"/>.
- </value>
- <remarks>
- <see cref="T:log4net.Appender.AdoNetAppender"/> creates a <see cref="T:System.Data.IDbConnection"/> to insert
- logging events into a database. Classes deriving from <see cref="T:log4net.Appender.AdoNetAppender"/>
- can use this property to get or set this <see cref="T:System.Data.IDbConnection"/>. Use the
- underlying <see cref="T:System.Data.IDbConnection"/> returned from <see cref="P:log4net.Appender.AdoNetAppender.Connection"/> if
- you require access beyond that which <see cref="T:log4net.Appender.AdoNetAppender"/> provides.
- </remarks>
- </member>
- <member name="T:log4net.Appender.AdoNetAppenderParameter">
- <summary>
- Parameter type used by the <see cref="T:log4net.Appender.AdoNetAppender"/>.
- </summary>
- <remarks>
- <para>
- This class provides the basic database parameter properties
- as defined by the <see cref="T:System.Data.IDbDataParameter"/> interface.
- </para>
- <para>This type can be subclassed to provide database specific
- functionality. The two methods that are called externally are
- <see cref="M:log4net.Appender.AdoNetAppenderParameter.Prepare(System.Data.IDbCommand)"/> and <see cref="M:log4net.Appender.AdoNetAppenderParameter.FormatValue(System.Data.IDbCommand,log4net.Core.LoggingEvent)"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppenderParameter.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.AdoNetAppenderParameter"/> class.
- </summary>
- <remarks>
- Default constructor for the AdoNetAppenderParameter class.
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppenderParameter.Prepare(System.Data.IDbCommand)">
- <summary>
- Prepare the specified database command object.
- </summary>
- <param name="command">The command to prepare.</param>
- <remarks>
- <para>
- Prepares the database command object by adding
- this parameter to its collection of parameters.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AdoNetAppenderParameter.FormatValue(System.Data.IDbCommand,log4net.Core.LoggingEvent)">
- <summary>
- Renders the logging event and set the parameter value in the command.
- </summary>
- <param name="command">The command containing the parameter.</param>
- <param name="loggingEvent">The event to be rendered.</param>
- <remarks>
- <para>
- Renders the logging event using this parameters layout
- object. Sets the value of the parameter on the command object.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_parameterName">
- <summary>
- The name of this parameter.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_dbType">
- <summary>
- The database type for this parameter.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_inferType">
- <summary>
- Flag to infer type rather than use the DbType
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_precision">
- <summary>
- The precision for this parameter.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_scale">
- <summary>
- The scale for this parameter.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_size">
- <summary>
- The size for this parameter.
- </summary>
- </member>
- <member name="F:log4net.Appender.AdoNetAppenderParameter.m_layout">
- <summary>
- The <see cref="T:log4net.Layout.IRawLayout"/> to use to render the
- logging event into an object for this parameter.
- </summary>
- </member>
- <member name="P:log4net.Appender.AdoNetAppenderParameter.ParameterName">
- <summary>
- Gets or sets the name of this parameter.
- </summary>
- <value>
- The name of this parameter.
- </value>
- <remarks>
- <para>
- The name of this parameter. The parameter name
- must match up to a named parameter to the SQL stored procedure
- or prepared statement.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AdoNetAppenderParameter.DbType">
- <summary>
- Gets or sets the database type for this parameter.
- </summary>
- <value>
- The database type for this parameter.
- </value>
- <remarks>
- <para>
- The database type for this parameter. This property should
- be set to the database type from the <see cref="P:log4net.Appender.AdoNetAppenderParameter.DbType"/>
- enumeration. See <see cref="P:System.Data.IDataParameter.DbType"/>.
- </para>
- <para>
- This property is optional. If not specified the ADO.NET provider
- will attempt to infer the type from the value.
- </para>
- </remarks>
- <seealso cref="P:System.Data.IDataParameter.DbType"/>
- </member>
- <member name="P:log4net.Appender.AdoNetAppenderParameter.Precision">
- <summary>
- Gets or sets the precision for this parameter.
- </summary>
- <value>
- The precision for this parameter.
- </value>
- <remarks>
- <para>
- The maximum number of digits used to represent the Value.
- </para>
- <para>
- This property is optional. If not specified the ADO.NET provider
- will attempt to infer the precision from the value.
- </para>
- </remarks>
- <seealso cref="P:System.Data.IDbDataParameter.Precision"/>
- </member>
- <member name="P:log4net.Appender.AdoNetAppenderParameter.Scale">
- <summary>
- Gets or sets the scale for this parameter.
- </summary>
- <value>
- The scale for this parameter.
- </value>
- <remarks>
- <para>
- The number of decimal places to which Value is resolved.
- </para>
- <para>
- This property is optional. If not specified the ADO.NET provider
- will attempt to infer the scale from the value.
- </para>
- </remarks>
- <seealso cref="P:System.Data.IDbDataParameter.Scale"/>
- </member>
- <member name="P:log4net.Appender.AdoNetAppenderParameter.Size">
- <summary>
- Gets or sets the size for this parameter.
- </summary>
- <value>
- The size for this parameter.
- </value>
- <remarks>
- <para>
- The maximum size, in bytes, of the data within the column.
- </para>
- <para>
- This property is optional. If not specified the ADO.NET provider
- will attempt to infer the size from the value.
- </para>
- </remarks>
- <seealso cref="P:System.Data.IDbDataParameter.Size"/>
- </member>
- <member name="P:log4net.Appender.AdoNetAppenderParameter.Layout">
- <summary>
- Gets or sets the <see cref="T:log4net.Layout.IRawLayout"/> to use to
- render the logging event into an object for this
- parameter.
- </summary>
- <value>
- The <see cref="T:log4net.Layout.IRawLayout"/> used to render the
- logging event into an object for this parameter.
- </value>
- <remarks>
- <para>
- The <see cref="T:log4net.Layout.IRawLayout"/> that renders the value for this
- parameter.
- </para>
- <para>
- The <see cref="T:log4net.Layout.RawLayoutConverter"/> can be used to adapt
- any <see cref="T:log4net.Layout.ILayout"/> into a <see cref="T:log4net.Layout.IRawLayout"/>
- for use in the property.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.AnsiColorTerminalAppender">
- <summary>
- Appends logging events to the terminal using ANSI color escape sequences.
- </summary>
- <remarks>
- <para>
- AnsiColorTerminalAppender appends log events to the standard output stream
- or the error output stream using a layout specified by the
- user. It also allows the color of a specific level of message to be set.
- </para>
- <note>
- This appender expects the terminal to understand the VT100 control set
- in order to interpret the color codes. If the terminal or console does not
- understand the control codes the behavior is not defined.
- </note>
- <para>
- By default, all output is written to the console's standard output stream.
- The <see cref="P:log4net.Appender.AnsiColorTerminalAppender.Target"/> property can be set to direct the output to the
- error stream.
- </para>
- <para>
- NOTE: This appender writes each message to the <c>System.Console.Out</c> or
- <c>System.Console.Error</c> that is set at the time the event is appended.
- Therefore it is possible to programmatically redirect the output of this appender
- (for example NUnit does this to capture program output). While this is the desired
- behavior of this appender it may have security implications in your application.
- </para>
- <para>
- When configuring the ANSI colored terminal appender, a mapping should be
- specified to map a logging level to a color. For example:
- </para>
- <code lang="XML" escaped="true">
- <mapping>
- <level value="ERROR"/>
- <foreColor value="White"/>
- <backColor value="Red"/>
- <attributes value="Bright,Underscore"/>
- </mapping>
- <mapping>
- <level value="DEBUG"/>
- <backColor value="Green"/>
- </mapping>
- </code>
- <para>
- The Level is the standard log4net logging level and ForeColor and BackColor can be any
- of the following values:
- <list type="bullet">
- <item><term>Blue</term><description></description></item>
- <item><term>Green</term><description></description></item>
- <item><term>Red</term><description></description></item>
- <item><term>White</term><description></description></item>
- <item><term>Yellow</term><description></description></item>
- <item><term>Purple</term><description></description></item>
- <item><term>Cyan</term><description></description></item>
- </list>
- These color values cannot be combined together to make new colors.
- </para>
- <para>
- The attributes can be any combination of the following:
- <list type="bullet">
- <item><term>Bright</term><description>foreground is brighter</description></item>
- <item><term>Dim</term><description>foreground is dimmer</description></item>
- <item><term>Underscore</term><description>message is underlined</description></item>
- <item><term>Blink</term><description>foreground is blinking (does not work on all terminals)</description></item>
- <item><term>Reverse</term><description>foreground and background are reversed</description></item>
- <item><term>Hidden</term><description>output is hidden</description></item>
- <item><term>Strikethrough</term><description>message has a line through it</description></item>
- </list>
- While any of these attributes may be combined together not all combinations
- work well together, for example setting both <i>Bright</i> and <i>Dim</i> attributes makes
- no sense.
- </para>
- </remarks>
- <author>Patrick Wagstrom</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.ConsoleOut">
- <summary>
- The <see cref="P:log4net.Appender.AnsiColorTerminalAppender.Target"/> to use when writing to the Console
- standard output stream.
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.AnsiColorTerminalAppender.Target"/> to use when writing to the Console
- standard output stream.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.ConsoleError">
- <summary>
- The <see cref="P:log4net.Appender.AnsiColorTerminalAppender.Target"/> to use when writing to the Console
- standard error output stream.
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.AnsiColorTerminalAppender.Target"/> to use when writing to the Console
- standard error output stream.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.PostEventCodes">
- <summary>
- Ansi code to reset terminal
- </summary>
- </member>
- <member name="M:log4net.Appender.AnsiColorTerminalAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.AnsiColorTerminalAppender"/> class.
- </summary>
- <remarks>
- The instance of the <see cref="T:log4net.Appender.AnsiColorTerminalAppender"/> class is set up to write
- to the standard output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.AnsiColorTerminalAppender.AddMapping(log4net.Appender.AnsiColorTerminalAppender.LevelColors)">
- <summary>
- Add a mapping of level to color
- </summary>
- <param name="mapping">The mapping to add</param>
- <remarks>
- <para>
- Add a <see cref="T:log4net.Appender.AnsiColorTerminalAppender.LevelColors"/> mapping to this appender.
- Each mapping defines the foreground and background colours
- for a level.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AnsiColorTerminalAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the event to the console.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AnsiColorTerminalAppender.ActivateOptions">
- <summary>
- Initialize the options for this appender
- </summary>
- <remarks>
- <para>
- Initialize the level to color mappings set on this appender.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.m_writeToErrorStream">
- <summary>
- Flag to write output to the error stream rather than the standard output stream
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.m_levelMapping">
- <summary>
- Mapping from level object to color value
- </summary>
- </member>
- <member name="P:log4net.Appender.AnsiColorTerminalAppender.Target">
- <summary>
- Target is the value of the console output stream.
- </summary>
- <value>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </value>
- <remarks>
- <para>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AnsiColorTerminalAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes">
- <summary>
- The enum of possible display attributes
- </summary>
- <remarks>
- <para>
- The following flags can be combined together to
- form the ANSI color attributes.
- </para>
- </remarks>
- <seealso cref="T:log4net.Appender.AnsiColorTerminalAppender"/>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Bright">
- <summary>
- text is bright
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Dim">
- <summary>
- text is dim
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Underscore">
- <summary>
- text is underlined
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Blink">
- <summary>
- text is blinking
- </summary>
- <remarks>
- Not all terminals support this attribute
- </remarks>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Reverse">
- <summary>
- text and background colors are reversed
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Hidden">
- <summary>
- text is hidden
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiAttributes.Strikethrough">
- <summary>
- text is displayed with a strikethrough
- </summary>
- </member>
- <member name="T:log4net.Appender.AnsiColorTerminalAppender.AnsiColor">
- <summary>
- The enum of possible foreground or background color values for
- use with the color mapping method
- </summary>
- <remarks>
- <para>
- The output can be in one for the following ANSI colors.
- </para>
- </remarks>
- <seealso cref="T:log4net.Appender.AnsiColorTerminalAppender"/>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Black">
- <summary>
- color is black
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Red">
- <summary>
- color is red
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Green">
- <summary>
- color is green
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Yellow">
- <summary>
- color is yellow
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Blue">
- <summary>
- color is blue
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Magenta">
- <summary>
- color is magenta
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.Cyan">
- <summary>
- color is cyan
- </summary>
- </member>
- <member name="F:log4net.Appender.AnsiColorTerminalAppender.AnsiColor.White">
- <summary>
- color is white
- </summary>
- </member>
- <member name="T:log4net.Appender.AnsiColorTerminalAppender.LevelColors">
- <summary>
- A class to act as a mapping between the level that a logging call is made at and
- the color it should be displayed as.
- </summary>
- <remarks>
- <para>
- Defines the mapping between a level and the color it should be displayed in.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.LevelMappingEntry">
- <summary>
- An entry in the <see cref="T:log4net.Util.LevelMapping"/>
- </summary>
- <remarks>
- <para>
- This is an abstract base class for types that are stored in the
- <see cref="T:log4net.Util.LevelMapping"/> object.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.LevelMappingEntry.#ctor">
- <summary>
- Default protected constructor
- </summary>
- <remarks>
- <para>
- Default protected constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LevelMappingEntry.ActivateOptions">
- <summary>
- Initialize any options defined on this entry
- </summary>
- <remarks>
- <para>
- Should be overridden by any classes that need to initialise based on their options
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.LevelMappingEntry.Level">
- <summary>
- The level that is the key for this mapping
- </summary>
- <value>
- The <see cref="P:log4net.Util.LevelMappingEntry.Level"/> that is the key for this mapping
- </value>
- <remarks>
- <para>
- Get or set the <see cref="P:log4net.Util.LevelMappingEntry.Level"/> that is the key for this
- mapping subclass.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AnsiColorTerminalAppender.LevelColors.ActivateOptions">
- <summary>
- Initialize the options for the object
- </summary>
- <remarks>
- <para>
- Combine the <see cref="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.ForeColor"/> and <see cref="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.BackColor"/> together
- and append the attributes.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.ForeColor">
- <summary>
- The mapped foreground color for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The mapped foreground color for the specified level
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.BackColor">
- <summary>
- The mapped background color for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The mapped background color for the specified level
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.Attributes">
- <summary>
- The color attributes for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The color attributes for the specified level
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.CombinedColor">
- <summary>
- The combined <see cref="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.ForeColor"/>, <see cref="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.BackColor"/> and
- <see cref="P:log4net.Appender.AnsiColorTerminalAppender.LevelColors.Attributes"/> suitable for setting the ansi terminal color.
- </summary>
- </member>
- <member name="T:log4net.Appender.AppenderCollection">
- <summary>
- A strongly-typed collection of <see cref="T:log4net.Appender.IAppender"/> objects.
- </summary>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.ReadOnly(log4net.Appender.AppenderCollection)">
- <summary>
- Creates a read-only wrapper for a <c>AppenderCollection</c> instance.
- </summary>
- <param name="list">list to create a readonly wrapper arround</param>
- <returns>
- An <c>AppenderCollection</c> wrapper that is read-only.
- </returns>
- </member>
- <member name="F:log4net.Appender.AppenderCollection.EmptyCollection">
- <summary>
- An empty readonly static AppenderCollection
- </summary>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.#ctor">
- <summary>
- Initializes a new instance of the <c>AppenderCollection</c> class
- that is empty and has the default initial capacity.
- </summary>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.#ctor(System.Int32)">
- <summary>
- Initializes a new instance of the <c>AppenderCollection</c> class
- that has the specified initial capacity.
- </summary>
- <param name="capacity">
- The number of elements that the new <c>AppenderCollection</c> is initially capable of storing.
- </param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.#ctor(log4net.Appender.AppenderCollection)">
- <summary>
- Initializes a new instance of the <c>AppenderCollection</c> class
- that contains elements copied from the specified <c>AppenderCollection</c>.
- </summary>
- <param name="c">The <c>AppenderCollection</c> whose elements are copied to the new collection.</param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.#ctor(log4net.Appender.IAppender[])">
- <summary>
- Initializes a new instance of the <c>AppenderCollection</c> class
- that contains elements copied from the specified <see cref="T:log4net.Appender.IAppender"/> array.
- </summary>
- <param name="a">The <see cref="T:log4net.Appender.IAppender"/> array whose elements are copied to the new list.</param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.#ctor(System.Collections.ICollection)">
- <summary>
- Initializes a new instance of the <c>AppenderCollection</c> class
- that contains elements copied from the specified <see cref="T:log4net.Appender.IAppender"/> collection.
- </summary>
- <param name="col">The <see cref="T:log4net.Appender.IAppender"/> collection whose elements are copied to the new list.</param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.#ctor(log4net.Appender.AppenderCollection.Tag)">
- <summary>
- Allow subclasses to avoid our default constructors
- </summary>
- <param name="tag"></param>
- <exclude/>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.CopyTo(log4net.Appender.IAppender[])">
- <summary>
- Copies the entire <c>AppenderCollection</c> to a one-dimensional
- <see cref="T:log4net.Appender.IAppender"/> array.
- </summary>
- <param name="array">The one-dimensional <see cref="T:log4net.Appender.IAppender"/> array to copy to.</param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.CopyTo(log4net.Appender.IAppender[],System.Int32)">
- <summary>
- Copies the entire <c>AppenderCollection</c> to a one-dimensional
- <see cref="T:log4net.Appender.IAppender"/> array, starting at the specified index of the target array.
- </summary>
- <param name="array">The one-dimensional <see cref="T:log4net.Appender.IAppender"/> array to copy to.</param>
- <param name="start">The zero-based index in <paramref name="array"/> at which copying begins.</param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Add(log4net.Appender.IAppender)">
- <summary>
- Adds a <see cref="T:log4net.Appender.IAppender"/> to the end of the <c>AppenderCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Appender.IAppender"/> to be added to the end of the <c>AppenderCollection</c>.</param>
- <returns>The index at which the value has been added.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Clear">
- <summary>
- Removes all elements from the <c>AppenderCollection</c>.
- </summary>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Clone">
- <summary>
- Creates a shallow copy of the <see cref="T:log4net.Appender.AppenderCollection"/>.
- </summary>
- <returns>A new <see cref="T:log4net.Appender.AppenderCollection"/> with a shallow copy of the collection data.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Contains(log4net.Appender.IAppender)">
- <summary>
- Determines whether a given <see cref="T:log4net.Appender.IAppender"/> is in the <c>AppenderCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Appender.IAppender"/> to check for.</param>
- <returns><c>true</c> if <paramref name="item"/> is found in the <c>AppenderCollection</c>; otherwise, <c>false</c>.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.IndexOf(log4net.Appender.IAppender)">
- <summary>
- Returns the zero-based index of the first occurrence of a <see cref="T:log4net.Appender.IAppender"/>
- in the <c>AppenderCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Appender.IAppender"/> to locate in the <c>AppenderCollection</c>.</param>
- <returns>
- The zero-based index of the first occurrence of <paramref name="item"/>
- in the entire <c>AppenderCollection</c>, if found; otherwise, -1.
- </returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Insert(System.Int32,log4net.Appender.IAppender)">
- <summary>
- Inserts an element into the <c>AppenderCollection</c> at the specified index.
- </summary>
- <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
- <param name="item">The <see cref="T:log4net.Appender.IAppender"/> to insert.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Appender.AppenderCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Remove(log4net.Appender.IAppender)">
- <summary>
- Removes the first occurrence of a specific <see cref="T:log4net.Appender.IAppender"/> from the <c>AppenderCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Appender.IAppender"/> to remove from the <c>AppenderCollection</c>.</param>
- <exception cref="T:System.ArgumentException">
- The specified <see cref="T:log4net.Appender.IAppender"/> was not found in the <c>AppenderCollection</c>.
- </exception>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.RemoveAt(System.Int32)">
- <summary>
- Removes the element at the specified index of the <c>AppenderCollection</c>.
- </summary>
- <param name="index">The zero-based index of the element to remove.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Appender.AppenderCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.GetEnumerator">
- <summary>
- Returns an enumerator that can iterate through the <c>AppenderCollection</c>.
- </summary>
- <returns>An <see cref="T:log4net.Appender.AppenderCollection.Enumerator"/> for the entire <c>AppenderCollection</c>.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.AddRange(log4net.Appender.AppenderCollection)">
- <summary>
- Adds the elements of another <c>AppenderCollection</c> to the current <c>AppenderCollection</c>.
- </summary>
- <param name="x">The <c>AppenderCollection</c> whose elements should be added to the end of the current <c>AppenderCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Appender.AppenderCollection.Count"/> of the <c>AppenderCollection</c>.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.AddRange(log4net.Appender.IAppender[])">
- <summary>
- Adds the elements of a <see cref="T:log4net.Appender.IAppender"/> array to the current <c>AppenderCollection</c>.
- </summary>
- <param name="x">The <see cref="T:log4net.Appender.IAppender"/> array whose elements should be added to the end of the <c>AppenderCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Appender.AppenderCollection.Count"/> of the <c>AppenderCollection</c>.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.AddRange(System.Collections.ICollection)">
- <summary>
- Adds the elements of a <see cref="T:log4net.Appender.IAppender"/> collection to the current <c>AppenderCollection</c>.
- </summary>
- <param name="col">The <see cref="T:log4net.Appender.IAppender"/> collection whose elements should be added to the end of the <c>AppenderCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Appender.AppenderCollection.Count"/> of the <c>AppenderCollection</c>.</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.TrimToSize">
- <summary>
- Sets the capacity to the actual number of elements.
- </summary>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.ToArray">
- <summary>
- Return the collection elements as an array
- </summary>
- <returns>the array</returns>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.ValidateIndex(System.Int32)">
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Appender.AppenderCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.ValidateIndex(System.Int32,System.Boolean)">
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Appender.AppenderCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.Count">
- <summary>
- Gets the number of elements actually contained in the <c>AppenderCollection</c>.
- </summary>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.IsSynchronized">
- <summary>
- Gets a value indicating whether access to the collection is synchronized (thread-safe).
- </summary>
- <returns>true if access to the ICollection is synchronized (thread-safe); otherwise, false.</returns>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.SyncRoot">
- <summary>
- Gets an object that can be used to synchronize access to the collection.
- </summary>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.Item(System.Int32)">
- <summary>
- Gets or sets the <see cref="T:log4net.Appender.IAppender"/> at the specified index.
- </summary>
- <param name="index">The zero-based index of the element to get or set.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Appender.AppenderCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.IsFixedSize">
- <summary>
- Gets a value indicating whether the collection has a fixed size.
- </summary>
- <value>true if the collection has a fixed size; otherwise, false. The default is false</value>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.IsReadOnly">
- <summary>
- Gets a value indicating whether the IList is read-only.
- </summary>
- <value>true if the collection is read-only; otherwise, false. The default is false</value>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.Capacity">
- <summary>
- Gets or sets the number of elements the <c>AppenderCollection</c> can contain.
- </summary>
- </member>
- <member name="T:log4net.Appender.AppenderCollection.IAppenderCollectionEnumerator">
- <summary>
- Supports type-safe iteration over a <see cref="T:log4net.Appender.AppenderCollection"/>.
- </summary>
- <exclude/>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.IAppenderCollectionEnumerator.MoveNext">
- <summary>
- Advances the enumerator to the next element in the collection.
- </summary>
- <returns>
- <c>true</c> if the enumerator was successfully advanced to the next element;
- <c>false</c> if the enumerator has passed the end of the collection.
- </returns>
- <exception cref="T:System.InvalidOperationException">
- The collection was modified after the enumerator was created.
- </exception>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.IAppenderCollectionEnumerator.Reset">
- <summary>
- Sets the enumerator to its initial position, before the first element in the collection.
- </summary>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.IAppenderCollectionEnumerator.Current">
- <summary>
- Gets the current element in the collection.
- </summary>
- </member>
- <member name="T:log4net.Appender.AppenderCollection.Tag">
- <summary>
- Type visible only to our subclasses
- Used to access protected constructor
- </summary>
- <exclude/>
- </member>
- <member name="F:log4net.Appender.AppenderCollection.Tag.Default">
- <summary>
- A value
- </summary>
- </member>
- <member name="T:log4net.Appender.AppenderCollection.Enumerator">
- <summary>
- Supports simple iteration over a <see cref="T:log4net.Appender.AppenderCollection"/>.
- </summary>
- <exclude/>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Enumerator.#ctor(log4net.Appender.AppenderCollection)">
- <summary>
- Initializes a new instance of the <c>Enumerator</c> class.
- </summary>
- <param name="tc"></param>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Enumerator.MoveNext">
- <summary>
- Advances the enumerator to the next element in the collection.
- </summary>
- <returns>
- <c>true</c> if the enumerator was successfully advanced to the next element;
- <c>false</c> if the enumerator has passed the end of the collection.
- </returns>
- <exception cref="T:System.InvalidOperationException">
- The collection was modified after the enumerator was created.
- </exception>
- </member>
- <member name="M:log4net.Appender.AppenderCollection.Enumerator.Reset">
- <summary>
- Sets the enumerator to its initial position, before the first element in the collection.
- </summary>
- </member>
- <member name="P:log4net.Appender.AppenderCollection.Enumerator.Current">
- <summary>
- Gets the current element in the collection.
- </summary>
- </member>
- <member name="T:log4net.Appender.AppenderCollection.ReadOnlyAppenderCollection">
- <exclude/>
- </member>
- <member name="T:log4net.Appender.AspNetTraceAppender">
- <summary>
- <para>
- Appends log events to the ASP.NET <see cref="T:System.Web.TraceContext"/> system.
- </para>
- </summary>
- <remarks>
- <para>
- Diagnostic information and tracing messages that you specify are appended to the output
- of the page that is sent to the requesting browser. Optionally, you can view this information
- from a separate trace viewer (Trace.axd) that displays trace information for every page in a
- given application.
- </para>
- <para>
- Trace statements are processed and displayed only when tracing is enabled. You can control
- whether tracing is displayed to a page, to the trace viewer, or both.
- </para>
- <para>
- The logging event is passed to the <see cref="M:System.Web.TraceContext.Write(System.String)"/> or
- <see cref="M:System.Web.TraceContext.Warn(System.String)"/> method depending on the level of the logging event.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.AspNetTraceAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.AspNetTraceAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.AspNetTraceAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Write the logging event to the ASP.NET trace
- </summary>
- <param name="loggingEvent">the event to log</param>
- <remarks>
- <para>
- Write the logging event to the ASP.NET trace
- <c>HttpContext.Current.Trace</c>
- (<see cref="T:System.Web.TraceContext"/>).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.AspNetTraceAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.BufferingForwardingAppender">
- <summary>
- Buffers events and then forwards them to attached appenders.
- </summary>
- <remarks>
- <para>
- The events are buffered in this appender until conditions are
- met to allow the appender to deliver the events to the attached
- appenders. See <see cref="T:log4net.Appender.BufferingAppenderSkeleton"/> for the
- conditions that cause the buffer to be sent.
- </para>
- <para>The forwarding appender can be used to specify different
- thresholds and filters for the same appender at different locations
- within the hierarchy.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Core.IAppenderAttachable">
- <summary>
- Interface for attaching appenders to objects.
- </summary>
- <remarks>
- <para>
- Interface for attaching, removing and retrieving appenders.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.IAppenderAttachable.AddAppender(log4net.Appender.IAppender)">
- <summary>
- Attaches an appender.
- </summary>
- <param name="appender">The appender to add.</param>
- <remarks>
- <para>
- Add the specified appender. The implementation may
- choose to allow or deny duplicate appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IAppenderAttachable.GetAppender(System.String)">
- <summary>
- Gets an attached appender with the specified name.
- </summary>
- <param name="name">The name of the appender to get.</param>
- <returns>
- The appender with the name specified, or <c>null</c> if no appender with the
- specified name is found.
- </returns>
- <remarks>
- <para>
- Returns an attached appender with the <paramref name="name"/> specified.
- If no appender with the specified name is found <c>null</c> will be
- returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IAppenderAttachable.RemoveAllAppenders">
- <summary>
- Removes all attached appenders.
- </summary>
- <remarks>
- <para>
- Removes and closes all attached appenders
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IAppenderAttachable.RemoveAppender(log4net.Appender.IAppender)">
- <summary>
- Removes the specified appender from the list of attached appenders.
- </summary>
- <param name="appender">The appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- <para>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IAppenderAttachable.RemoveAppender(System.String)">
- <summary>
- Removes the appender with the specified name from the list of appenders.
- </summary>
- <param name="name">The name of the appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- <para>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.IAppenderAttachable.Appenders">
- <summary>
- Gets all attached appenders.
- </summary>
- <value>
- A collection of attached appenders.
- </value>
- <remarks>
- <para>
- Gets a collection of attached appenders.
- If there are no attached appenders the
- implementation should return an empty
- collection rather than <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.BufferingForwardingAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.OnClose">
- <summary>
- Closes the appender and releases resources.
- </summary>
- <remarks>
- <para>
- Releases any resources allocated within the appender such as file handles,
- network connections, etc.
- </para>
- <para>
- It is a programming error to append to a closed appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.SendBuffer(log4net.Core.LoggingEvent[])">
- <summary>
- Send the events.
- </summary>
- <param name="events">The events that need to be send.</param>
- <remarks>
- <para>
- Forwards the events to the attached appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.AddAppender(log4net.Appender.IAppender)">
- <summary>
- Adds an <see cref="T:log4net.Appender.IAppender"/> to the list of appenders of this
- instance.
- </summary>
- <param name="newAppender">The <see cref="T:log4net.Appender.IAppender"/> to add to this appender.</param>
- <remarks>
- <para>
- If the specified <see cref="T:log4net.Appender.IAppender"/> is already in the list of
- appenders, then it won't be added again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.GetAppender(System.String)">
- <summary>
- Looks for the appender with the specified name.
- </summary>
- <param name="name">The name of the appender to lookup.</param>
- <returns>
- The appender with the specified name, or <c>null</c>.
- </returns>
- <remarks>
- <para>
- Get the named appender attached to this buffering appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.RemoveAllAppenders">
- <summary>
- Removes all previously added appenders from this appender.
- </summary>
- <remarks>
- <para>
- This is useful when re-reading configuration information.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.RemoveAppender(log4net.Appender.IAppender)">
- <summary>
- Removes the specified appender from the list of appenders.
- </summary>
- <param name="appender">The appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </remarks>
- </member>
- <member name="M:log4net.Appender.BufferingForwardingAppender.RemoveAppender(System.String)">
- <summary>
- Removes the appender with the specified name from the list of appenders.
- </summary>
- <param name="name">The name of the appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </remarks>
- </member>
- <member name="F:log4net.Appender.BufferingForwardingAppender.m_appenderAttachedImpl">
- <summary>
- Implementation of the <see cref="T:log4net.Core.IAppenderAttachable"/> interface
- </summary>
- </member>
- <member name="P:log4net.Appender.BufferingForwardingAppender.Appenders">
- <summary>
- Gets the appenders contained in this appender as an
- <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <remarks>
- If no appenders can be found, then an <see cref="T:log4net.Util.EmptyCollection"/>
- is returned.
- </remarks>
- <returns>
- A collection of the appenders in this appender.
- </returns>
- </member>
- <member name="T:log4net.Appender.ColoredConsoleAppender">
- <summary>
- Appends logging events to the console.
- </summary>
- <remarks>
- <para>
- ColoredConsoleAppender appends log events to the standard output stream
- or the error output stream using a layout specified by the
- user. It also allows the color of a specific type of message to be set.
- </para>
- <para>
- By default, all output is written to the console's standard output stream.
- The <see cref="P:log4net.Appender.ColoredConsoleAppender.Target"/> property can be set to direct the output to the
- error stream.
- </para>
- <para>
- NOTE: This appender writes directly to the application's attached console
- not to the <c>System.Console.Out</c> or <c>System.Console.Error</c> <c>TextWriter</c>.
- The <c>System.Console.Out</c> and <c>System.Console.Error</c> streams can be
- programmatically redirected (for example NUnit does this to capture program output).
- This appender will ignore these redirections because it needs to use Win32
- API calls to colorize the output. To respect these redirections the <see cref="T:log4net.Appender.ConsoleAppender"/>
- must be used.
- </para>
- <para>
- When configuring the colored console appender, mapping should be
- specified to map a logging level to a color. For example:
- </para>
- <code lang="XML" escaped="true">
- <mapping>
- <level value="ERROR"/>
- <foreColor value="White"/>
- <backColor value="Red, HighIntensity"/>
- </mapping>
- <mapping>
- <level value="DEBUG"/>
- <backColor value="Green"/>
- </mapping>
- </code>
- <para>
- The Level is the standard log4net logging level and ForeColor and BackColor can be any
- combination of the following values:
- <list type="bullet">
- <item><term>Blue</term><description></description></item>
- <item><term>Green</term><description></description></item>
- <item><term>Red</term><description></description></item>
- <item><term>White</term><description></description></item>
- <item><term>Yellow</term><description></description></item>
- <item><term>Purple</term><description></description></item>
- <item><term>Cyan</term><description></description></item>
- <item><term>HighIntensity</term><description></description></item>
- </list>
- </para>
- </remarks>
- <author>Rick Hobbs</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.ConsoleOut">
- <summary>
- The <see cref="P:log4net.Appender.ColoredConsoleAppender.Target"/> to use when writing to the Console
- standard output stream.
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.ColoredConsoleAppender.Target"/> to use when writing to the Console
- standard output stream.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.ConsoleError">
- <summary>
- The <see cref="P:log4net.Appender.ColoredConsoleAppender.Target"/> to use when writing to the Console
- standard error output stream.
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.ColoredConsoleAppender.Target"/> to use when writing to the Console
- standard error output stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ColoredConsoleAppender"/> class.
- </summary>
- <remarks>
- The instance of the <see cref="T:log4net.Appender.ColoredConsoleAppender"/> class is set up to write
- to the standard output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.#ctor(log4net.Layout.ILayout)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ColoredConsoleAppender"/> class
- with the specified layout.
- </summary>
- <param name="layout">the layout to use for this appender</param>
- <remarks>
- The instance of the <see cref="T:log4net.Appender.ColoredConsoleAppender"/> class is set up to write
- to the standard output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.#ctor(log4net.Layout.ILayout,System.Boolean)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ColoredConsoleAppender"/> class
- with the specified layout.
- </summary>
- <param name="layout">the layout to use for this appender</param>
- <param name="writeToErrorStream">flag set to <c>true</c> to write to the console error stream</param>
- <remarks>
- When <paramref name="writeToErrorStream"/> is set to <c>true</c>, output is written to
- the standard error output stream. Otherwise, output is written to the standard
- output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.AddMapping(log4net.Appender.ColoredConsoleAppender.LevelColors)">
- <summary>
- Add a mapping of level to color - done by the config file
- </summary>
- <param name="mapping">The mapping to add</param>
- <remarks>
- <para>
- Add a <see cref="T:log4net.Appender.ColoredConsoleAppender.LevelColors"/> mapping to this appender.
- Each mapping defines the foreground and background colors
- for a level.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the event to the console.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.ActivateOptions">
- <summary>
- Initialize the options for this appender
- </summary>
- <remarks>
- <para>
- Initialize the level to color mappings set on this appender.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.m_writeToErrorStream">
- <summary>
- Flag to write output to the error stream rather than the standard output stream
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.m_levelMapping">
- <summary>
- Mapping from level object to color value
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.m_consoleOutputWriter">
- <summary>
- The console output stream writer to write to
- </summary>
- <remarks>
- <para>
- This writer is not thread safe.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ColoredConsoleAppender.Target">
- <summary>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </summary>
- <value>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </value>
- <remarks>
- <para>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ColoredConsoleAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.ColoredConsoleAppender.Colors">
- <summary>
- The enum of possible color values for use with the color mapping method
- </summary>
- <remarks>
- <para>
- The following flags can be combined together to
- form the colors.
- </para>
- </remarks>
- <seealso cref="T:log4net.Appender.ColoredConsoleAppender"/>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.Blue">
- <summary>
- color is blue
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.Green">
- <summary>
- color is green
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.Red">
- <summary>
- color is red
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.White">
- <summary>
- color is white
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.Yellow">
- <summary>
- color is yellow
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.Purple">
- <summary>
- color is purple
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.Cyan">
- <summary>
- color is cyan
- </summary>
- </member>
- <member name="F:log4net.Appender.ColoredConsoleAppender.Colors.HighIntensity">
- <summary>
- color is intensified
- </summary>
- </member>
- <member name="T:log4net.Appender.ColoredConsoleAppender.LevelColors">
- <summary>
- A class to act as a mapping between the level that a logging call is made at and
- the color it should be displayed as.
- </summary>
- <remarks>
- <para>
- Defines the mapping between a level and the color it should be displayed in.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ColoredConsoleAppender.LevelColors.ActivateOptions">
- <summary>
- Initialize the options for the object
- </summary>
- <remarks>
- <para>
- Combine the <see cref="P:log4net.Appender.ColoredConsoleAppender.LevelColors.ForeColor"/> and <see cref="P:log4net.Appender.ColoredConsoleAppender.LevelColors.BackColor"/> together.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ColoredConsoleAppender.LevelColors.ForeColor">
- <summary>
- The mapped foreground color for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The mapped foreground color for the specified level.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ColoredConsoleAppender.LevelColors.BackColor">
- <summary>
- The mapped background color for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The mapped background color for the specified level.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ColoredConsoleAppender.LevelColors.CombinedColor">
- <summary>
- The combined <see cref="P:log4net.Appender.ColoredConsoleAppender.LevelColors.ForeColor"/> and <see cref="P:log4net.Appender.ColoredConsoleAppender.LevelColors.BackColor"/> suitable for
- setting the console color.
- </summary>
- </member>
- <member name="T:log4net.Appender.ConsoleAppender">
- <summary>
- Appends logging events to the console.
- </summary>
- <remarks>
- <para>
- ConsoleAppender appends log events to the standard output stream
- or the error output stream using a layout specified by the
- user.
- </para>
- <para>
- By default, all output is written to the console's standard output stream.
- The <see cref="P:log4net.Appender.ConsoleAppender.Target"/> property can be set to direct the output to the
- error stream.
- </para>
- <para>
- NOTE: This appender writes each message to the <c>System.Console.Out</c> or
- <c>System.Console.Error</c> that is set at the time the event is appended.
- Therefore it is possible to programmatically redirect the output of this appender
- (for example NUnit does this to capture program output). While this is the desired
- behavior of this appender it may have security implications in your application.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Appender.ConsoleAppender.ConsoleOut">
- <summary>
- The <see cref="P:log4net.Appender.ConsoleAppender.Target"/> to use when writing to the Console
- standard output stream.
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.ConsoleAppender.Target"/> to use when writing to the Console
- standard output stream.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.ConsoleAppender.ConsoleError">
- <summary>
- The <see cref="P:log4net.Appender.ConsoleAppender.Target"/> to use when writing to the Console
- standard error output stream.
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.ConsoleAppender.Target"/> to use when writing to the Console
- standard error output stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ConsoleAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ConsoleAppender"/> class.
- </summary>
- <remarks>
- The instance of the <see cref="T:log4net.Appender.ConsoleAppender"/> class is set up to write
- to the standard output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ConsoleAppender.#ctor(log4net.Layout.ILayout)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ConsoleAppender"/> class
- with the specified layout.
- </summary>
- <param name="layout">the layout to use for this appender</param>
- <remarks>
- The instance of the <see cref="T:log4net.Appender.ConsoleAppender"/> class is set up to write
- to the standard output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ConsoleAppender.#ctor(log4net.Layout.ILayout,System.Boolean)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ConsoleAppender"/> class
- with the specified layout.
- </summary>
- <param name="layout">the layout to use for this appender</param>
- <param name="writeToErrorStream">flag set to <c>true</c> to write to the console error stream</param>
- <remarks>
- When <paramref name="writeToErrorStream"/> is set to <c>true</c>, output is written to
- the standard error output stream. Otherwise, output is written to the standard
- output stream.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ConsoleAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the event to the console.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ConsoleAppender.Target">
- <summary>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </summary>
- <value>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </value>
- <remarks>
- <para>
- Target is the value of the console output stream.
- This is either <c>"Console.Out"</c> or <c>"Console.Error"</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.ConsoleAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.DebugAppender">
- <summary>
- Appends log events to the <see cref="T:System.Diagnostics.Debug"/> system.
- </summary>
- <remarks>
- <para>
- The application configuration file can be used to control what listeners
- are actually used. See the MSDN documentation for the
- <see cref="T:System.Diagnostics.Debug"/> class for details on configuring the
- debug system.
- </para>
- <para>
- Events are written using the <see cref="M:System.Diagnostics.Debug.Write(System.String,System.String)"/>
- method. The event's logger name is passed as the value for the category name to the Write method.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.DebugAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.DebugAppender"/>.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.DebugAppender.#ctor(log4net.Layout.ILayout)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.DebugAppender"/>
- with a specified layout.
- </summary>
- <param name="layout">The layout to use with this appender.</param>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.DebugAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Writes the logging event to the <see cref="T:System.Diagnostics.Debug"/> system.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the logging event to the <see cref="T:System.Diagnostics.Debug"/> system.
- If <see cref="P:log4net.Appender.DebugAppender.ImmediateFlush"/> is <c>true</c> then the <see cref="M:System.Diagnostics.Debug.Flush"/>
- is called.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.DebugAppender.m_immediateFlush">
- <summary>
- Immediate flush means that the underlying writer or output stream
- will be flushed at the end of each append operation.
- </summary>
- <remarks>
- <para>
- Immediate flush is slower but ensures that each append request is
- actually written. If <see cref="P:log4net.Appender.DebugAppender.ImmediateFlush"/> is set to
- <c>false</c>, then there is a good chance that the last few
- logs events are not actually written to persistent media if and
- when the application crashes.
- </para>
- <para>
- The default value is <c>true</c>.</para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.DebugAppender.ImmediateFlush">
- <summary>
- Gets or sets a value that indicates whether the appender will
- flush at the end of each write.
- </summary>
- <remarks>
- <para>The default behavior is to flush at the end of each
- write. If the option is set to<c>false</c>, then the underlying
- stream can defer writing to physical medium to a later time.
- </para>
- <para>
- Avoiding the flush operation at the end of each append results
- in a performance gain of 10 to 20 percent. However, there is safety
- trade-off involved in skipping flushing. Indeed, when flushing is
- skipped, then it is likely that the last few log events will not
- be recorded on disk when the application exits. This is a high
- price to pay even for a 20% performance gain.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.DebugAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.EventLogAppender">
- <summary>
- Writes events to the system event log.
- </summary>
- <remarks>
- <para>
- The <c>EventID</c> of the event log entry can be
- set using the <c>EventLogEventID</c> property (<see cref="P:log4net.Core.LoggingEvent.Properties"/>)
- on the <see cref="T:log4net.Core.LoggingEvent"/>.
- </para>
- <para>
- There is a limit of 32K characters for an event log message
- </para>
- <para>
- When configuring the EventLogAppender a mapping can be
- specified to map a logging level to an event log entry type. For example:
- </para>
- <code lang="XML">
- &lt;mapping&gt;
- &lt;level value="ERROR" /&gt;
- &lt;eventLogEntryType value="Error" /&gt;
- &lt;/mapping&gt;
- &lt;mapping&gt;
- &lt;level value="DEBUG" /&gt;
- &lt;eventLogEntryType value="Information" /&gt;
- &lt;/mapping&gt;
- </code>
- <para>
- The Level is the standard log4net logging level and eventLogEntryType can be any value
- from the <see cref="T:System.Diagnostics.EventLogEntryType"/> enum, i.e.:
- <list type="bullet">
- <item><term>Error</term><description>an error event</description></item>
- <item><term>Warning</term><description>a warning event</description></item>
- <item><term>Information</term><description>an informational event</description></item>
- </list>
- </para>
- </remarks>
- <author>Aspi Havewala</author>
- <author>Douglas de la Torre</author>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Thomas Voss</author>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.EventLogAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.#ctor(log4net.Layout.ILayout)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.EventLogAppender"/> class
- with the specified <see cref="T:log4net.Layout.ILayout"/>.
- </summary>
- <param name="layout">The <see cref="T:log4net.Layout.ILayout"/> to use with this appender.</param>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.AddMapping(log4net.Appender.EventLogAppender.Level2EventLogEntryType)">
- <summary>
- Add a mapping of level to <see cref="T:System.Diagnostics.EventLogEntryType"/> - done by the config file
- </summary>
- <param name="mapping">The mapping to add</param>
- <remarks>
- <para>
- Add a <see cref="T:log4net.Appender.EventLogAppender.Level2EventLogEntryType"/> mapping to this appender.
- Each mapping defines the event log entry type for a level.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.EventLogAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.EventLogAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.EventLogAppender.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.CreateEventSource(System.String,System.String,System.String)">
- <summary>
- Create an event log source
- </summary>
- <remarks>
- Uses different API calls under NET_2_0
- </remarks>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/>
- method.
- </summary>
- <param name="loggingEvent">the event to log</param>
- <remarks>
- <para>Writes the event to the system event log using the
- <see cref="P:log4net.Appender.EventLogAppender.ApplicationName"/>.</para>
-
- <para>If the event has an <c>EventID</c> property (see <see cref="P:log4net.Core.LoggingEvent.Properties"/>)
- set then this integer will be used as the event log event id.</para>
-
- <para>
- There is a limit of 32K characters for an event log message
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.EventLogAppender.GetEntryType(log4net.Core.Level)">
- <summary>
- Get the equivalent <see cref="T:System.Diagnostics.EventLogEntryType"/> for a <see cref="T:log4net.Core.Level"/> <paramref name="p"/>
- </summary>
- <param name="level">the Level to convert to an EventLogEntryType</param>
- <returns>The equivalent <see cref="T:System.Diagnostics.EventLogEntryType"/> for a <see cref="T:log4net.Core.Level"/> <paramref name="p"/></returns>
- <remarks>
- Because there are fewer applicable <see cref="T:System.Diagnostics.EventLogEntryType"/>
- values to use in logging levels than there are in the
- <see cref="T:log4net.Core.Level"/> this is a one way mapping. There is
- a loss of information during the conversion.
- </remarks>
- </member>
- <member name="F:log4net.Appender.EventLogAppender.m_logName">
- <summary>
- The log name is the section in the event logs where the messages
- are stored.
- </summary>
- </member>
- <member name="F:log4net.Appender.EventLogAppender.m_applicationName">
- <summary>
- Name of the application to use when logging. This appears in the
- application column of the event log named by <see cref="F:log4net.Appender.EventLogAppender.m_logName"/>.
- </summary>
- </member>
- <member name="F:log4net.Appender.EventLogAppender.m_machineName">
- <summary>
- The name of the machine which holds the event log. This is
- currently only allowed to be '.' i.e. the current machine.
- </summary>
- </member>
- <member name="F:log4net.Appender.EventLogAppender.m_levelMapping">
- <summary>
- Mapping from level object to EventLogEntryType
- </summary>
- </member>
- <member name="F:log4net.Appender.EventLogAppender.m_securityContext">
- <summary>
- The security context to use for privileged calls
- </summary>
- </member>
- <member name="P:log4net.Appender.EventLogAppender.LogName">
- <summary>
- The name of the log where messages will be stored.
- </summary>
- <value>
- The string name of the log where messages will be stored.
- </value>
- <remarks>
- <para>This is the name of the log as it appears in the Event Viewer
- tree. The default value is to log into the <c>Application</c>
- log, this is where most applications write their events. However
- if you need a separate log for your application (or applications)
- then you should set the <see cref="P:log4net.Appender.EventLogAppender.LogName"/> appropriately.</para>
- <para>This should not be used to distinguish your event log messages
- from those of other applications, the <see cref="P:log4net.Appender.EventLogAppender.ApplicationName"/>
- property should be used to distinguish events. This property should be
- used to group together events into a single log.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.EventLogAppender.ApplicationName">
- <summary>
- Property used to set the Application name. This appears in the
- event logs when logging.
- </summary>
- <value>
- The string used to distinguish events from different sources.
- </value>
- <remarks>
- Sets the event log source property.
- </remarks>
- </member>
- <member name="P:log4net.Appender.EventLogAppender.MachineName">
- <summary>
- This property is used to return the name of the computer to use
- when accessing the event logs. Currently, this is the current
- computer, denoted by a dot "."
- </summary>
- <value>
- The string name of the machine holding the event log that
- will be logged into.
- </value>
- <remarks>
- This property cannot be changed. It is currently set to '.'
- i.e. the local machine. This may be changed in future.
- </remarks>
- </member>
- <member name="P:log4net.Appender.EventLogAppender.SecurityContext">
- <summary>
- Gets or sets the <see cref="P:log4net.Appender.EventLogAppender.SecurityContext"/> used to write to the EventLog.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.EventLogAppender.SecurityContext"/> used to write to the EventLog.
- </value>
- <remarks>
- <para>
- The system security context used to write to the EventLog.
- </para>
- <para>
- Unless a <see cref="P:log4net.Appender.EventLogAppender.SecurityContext"/> specified here for this appender
- the <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> is queried for the
- security context to use. The default behavior is to use the security context
- of the current thread.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.EventLogAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.EventLogAppender.Level2EventLogEntryType">
- <summary>
- A class to act as a mapping between the level that a logging call is made at and
- the color it should be displayed as.
- </summary>
- <remarks>
- <para>
- Defines the mapping between a level and its event log entry type.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.EventLogAppender.Level2EventLogEntryType.EventLogEntryType">
- <summary>
- The <see cref="P:log4net.Appender.EventLogAppender.Level2EventLogEntryType.EventLogEntryType"/> for this entry
- </summary>
- <remarks>
- <para>
- Required property.
- The <see cref="P:log4net.Appender.EventLogAppender.Level2EventLogEntryType.EventLogEntryType"/> for this entry
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.FileAppender">
- <summary>
- Appends logging events to a file.
- </summary>
- <remarks>
- <para>
- Logging events are sent to the file specified by
- the <see cref="P:log4net.Appender.FileAppender.File"/> property.
- </para>
- <para>
- The file can be opened in either append or overwrite mode
- by specifying the <see cref="P:log4net.Appender.FileAppender.AppendToFile"/> property.
- If the file path is relative it is taken as relative from
- the application base directory. The file encoding can be
- specified by setting the <see cref="P:log4net.Appender.FileAppender.Encoding"/> property.
- </para>
- <para>
- The layout's <see cref="P:log4net.Layout.ILayout.Header"/> and <see cref="P:log4net.Layout.ILayout.Footer"/>
- values will be written each time the file is opened and closed
- respectively. If the <see cref="P:log4net.Appender.FileAppender.AppendToFile"/> property is <see langword="true"/>
- then the file may contain multiple copies of the header and footer.
- </para>
- <para>
- This appender will first try to open the file for writing when <see cref="M:log4net.Appender.FileAppender.ActivateOptions"/>
- is called. This will typically be during configuration.
- If the file cannot be opened for writing the appender will attempt
- to open the file again each time a message is logged to the appender.
- If the file cannot be opened for writing when a message is logged then
- the message will be discarded by this appender.
- </para>
- <para>
- The <see cref="T:log4net.Appender.FileAppender"/> supports pluggable file locking models via
- the <see cref="P:log4net.Appender.FileAppender.LockingModel"/> property.
- The default behavior, implemented by <see cref="T:log4net.Appender.FileAppender.ExclusiveLock"/>
- is to obtain an exclusive write lock on the file until this appender is closed.
- The alternative model, <see cref="T:log4net.Appender.FileAppender.MinimalLock"/>, only holds a
- write lock while the appender is writing a logging event.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Rodrigo B. de Oliveira</author>
- <author>Douglas de la Torre</author>
- <author>Niall Daley</author>
- </member>
- <member name="T:log4net.Appender.TextWriterAppender">
- <summary>
- Sends logging events to a <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <remarks>
- <para>
- An Appender that writes to a <see cref="T:System.IO.TextWriter"/>.
- </para>
- <para>
- This appender may be used stand alone if initialized with an appropriate
- writer, however it is typically used as a base class for an appender that
- can open a <see cref="T:System.IO.TextWriter"/> to write to.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Douglas de la Torre</author>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.TextWriterAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.#ctor(log4net.Layout.ILayout,System.IO.Stream)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.TextWriterAppender"/> class and
- sets the output destination to a new <see cref="T:System.IO.StreamWriter"/> initialized
- with the specified <see cref="T:System.IO.Stream"/>.
- </summary>
- <param name="layout">The layout to use with this appender.</param>
- <param name="os">The <see cref="T:System.IO.Stream"/> to output to.</param>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.#ctor(log4net.Layout.ILayout,System.IO.TextWriter)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.TextWriterAppender"/> class and sets
- the output destination to the specified <see cref="T:System.IO.StreamWriter"/>.
- </summary>
- <param name="layout">The layout to use with this appender</param>
- <param name="writer">The <see cref="T:System.IO.TextWriter"/> to output to</param>
- <remarks>
- The <see cref="T:System.IO.TextWriter"/> must have been previously opened.
- </remarks>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.PreAppendCheck">
- <summary>
- This method determines if there is a sense in attempting to append.
- </summary>
- <remarks>
- <para>
- This method checked if an output target has been set and if a
- layout has been set.
- </para>
- </remarks>
- <returns><c>false</c> if any of the preconditions fail.</returns>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/>
- method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes a log statement to the output stream if the output stream exists
- and is writable.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.Append(log4net.Core.LoggingEvent[])">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent[])"/>
- method.
- </summary>
- <param name="loggingEvents">The array of events to log.</param>
- <remarks>
- <para>
- This method writes all the bulk logged events to the output writer
- before flushing the stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.OnClose">
- <summary>
- Close this appender instance. The underlying stream or writer is also closed.
- </summary>
- <remarks>
- Closed appenders cannot be reused.
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.WriteFooterAndCloseWriter">
- <summary>
- Writes the footer and closes the underlying <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <remarks>
- <para>
- Writes the footer and closes the underlying <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.CloseWriter">
- <summary>
- Closes the underlying <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <remarks>
- <para>
- Closes the underlying <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.Reset">
- <summary>
- Clears internal references to the underlying <see cref="T:System.IO.TextWriter"/>
- and other variables.
- </summary>
- <remarks>
- <para>
- Subclasses can override this method for an alternate closing behavior.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.WriteFooter">
- <summary>
- Writes a footer as produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Footer"/> property.
- </summary>
- <remarks>
- <para>
- Writes a footer as produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Footer"/> property.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.WriteHeader">
- <summary>
- Writes a header produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Header"/> property.
- </summary>
- <remarks>
- <para>
- Writes a header produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Header"/> property.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TextWriterAppender.PrepareWriter">
- <summary>
- Called to allow a subclass to lazily initialize the writer
- </summary>
- <remarks>
- <para>
- This method is called when an event is logged and the <see cref="P:log4net.Appender.TextWriterAppender.Writer"/> or
- <see cref="P:log4net.Appender.TextWriterAppender.QuietWriter"/> have not been set. This allows a subclass to
- attempt to initialize the writer multiple times.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.TextWriterAppender.m_qtw">
- <summary>
- This is the <see cref="T:log4net.Util.QuietTextWriter"/> where logging events
- will be written to.
- </summary>
- </member>
- <member name="F:log4net.Appender.TextWriterAppender.m_immediateFlush">
- <summary>
- Immediate flush means that the underlying <see cref="T:System.IO.TextWriter"/>
- or output stream will be flushed at the end of each append operation.
- </summary>
- <remarks>
- <para>
- Immediate flush is slower but ensures that each append request is
- actually written. If <see cref="P:log4net.Appender.TextWriterAppender.ImmediateFlush"/> is set to
- <c>false</c>, then there is a good chance that the last few
- logging events are not actually persisted if and when the application
- crashes.
- </para>
- <para>
- The default value is <c>true</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TextWriterAppender.ImmediateFlush">
- <summary>
- Gets or set whether the appender will flush at the end
- of each append operation.
- </summary>
- <value>
- <para>
- The default behavior is to flush at the end of each
- append operation.
- </para>
- <para>
- If this option is set to <c>false</c>, then the underlying
- stream can defer persisting the logging event to a later
- time.
- </para>
- </value>
- <remarks>
- Avoiding the flush operation at the end of each append results in
- a performance gain of 10 to 20 percent. However, there is safety
- trade-off involved in skipping flushing. Indeed, when flushing is
- skipped, then it is likely that the last few log events will not
- be recorded on disk when the application exits. This is a high
- price to pay even for a 20% performance gain.
- </remarks>
- </member>
- <member name="P:log4net.Appender.TextWriterAppender.Writer">
- <summary>
- Sets the <see cref="T:System.IO.TextWriter"/> where the log output will go.
- </summary>
- <remarks>
- <para>
- The specified <see cref="T:System.IO.TextWriter"/> must be open and writable.
- </para>
- <para>
- The <see cref="T:System.IO.TextWriter"/> will be closed when the appender
- instance is closed.
- </para>
- <para>
- <b>Note:</b> Logging to an unopened <see cref="T:System.IO.TextWriter"/> will fail.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TextWriterAppender.ErrorHandler">
- <summary>
- Gets or set the <see cref="T:log4net.Core.IErrorHandler"/> and the underlying
- <see cref="T:log4net.Util.QuietTextWriter"/>, if any, for this appender.
- </summary>
- <value>
- The <see cref="T:log4net.Core.IErrorHandler"/> for this appender.
- </value>
- </member>
- <member name="P:log4net.Appender.TextWriterAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TextWriterAppender.QuietWriter">
- <summary>
- Gets or sets the <see cref="T:log4net.Util.QuietTextWriter"/> where logging events
- will be written to.
- </summary>
- <value>
- The <see cref="T:log4net.Util.QuietTextWriter"/> where logging events are written.
- </value>
- <remarks>
- <para>
- This is the <see cref="T:log4net.Util.QuietTextWriter"/> where logging events
- will be written to.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.#ctor(log4net.Layout.ILayout,System.String,System.Boolean)">
- <summary>
- Construct a new appender using the layout, file and append mode.
- </summary>
- <param name="layout">the layout to use with this appender</param>
- <param name="filename">the full path to the file to write to</param>
- <param name="append">flag to indicate if the file should be appended to</param>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.#ctor(log4net.Layout.ILayout,System.String)">
- <summary>
- Construct a new appender using the layout and file specified.
- The file will be appended to.
- </summary>
- <param name="layout">the layout to use with this appender</param>
- <param name="filename">the full path to the file to write to</param>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.ActivateOptions">
- <summary>
- Activate the options on the file appender.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.FileAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.FileAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.FileAppender.ActivateOptions"/> must be called again.
- </para>
- <para>
- This will cause the file to be opened.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.Reset">
- <summary>
- Closes any previously opened file and calls the parent's <see cref="M:log4net.Appender.TextWriterAppender.Reset"/>.
- </summary>
- <remarks>
- <para>
- Resets the filename and the file stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.PrepareWriter">
- <summary>
- Called to initialize the file writer
- </summary>
- <remarks>
- <para>
- Will be called for each logged message until the file is
- successfully opened.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/>
- method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes a log statement to the output stream if the output stream exists
- and is writable.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.Append(log4net.Core.LoggingEvent[])">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent[])"/>
- method.
- </summary>
- <param name="loggingEvents">The array of events to log.</param>
- <remarks>
- <para>
- Acquires the output file locks once before writing all the events to
- the stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.WriteFooter">
- <summary>
- Writes a footer as produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Footer"/> property.
- </summary>
- <remarks>
- <para>
- Writes a footer as produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Footer"/> property.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.WriteHeader">
- <summary>
- Writes a header produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Header"/> property.
- </summary>
- <remarks>
- <para>
- Writes a header produced by the embedded layout's <see cref="P:log4net.Layout.ILayout.Header"/> property.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.CloseWriter">
- <summary>
- Closes the underlying <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <remarks>
- <para>
- Closes the underlying <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.CloseFile">
- <summary>
- Closes the previously opened file.
- </summary>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Layout.ILayout.Footer"/> to the file and then
- closes the file.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.SafeOpenFile(System.String,System.Boolean)">
- <summary>
- Sets and <i>opens</i> the file where the log output will go. The specified file must be writable.
- </summary>
- <param name="fileName">The path to the log file. Must be a fully qualified path.</param>
- <param name="append">If true will append to fileName. Otherwise will truncate fileName</param>
- <remarks>
- <para>
- Calls <see cref="M:log4net.Appender.FileAppender.OpenFile(System.String,System.Boolean)"/> but guarantees not to throw an exception.
- Errors are passed to the <see cref="P:log4net.Appender.TextWriterAppender.ErrorHandler"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.OpenFile(System.String,System.Boolean)">
- <summary>
- Sets and <i>opens</i> the file where the log output will go. The specified file must be writable.
- </summary>
- <param name="fileName">The path to the log file. Must be a fully qualified path.</param>
- <param name="append">If true will append to fileName. Otherwise will truncate fileName</param>
- <remarks>
- <para>
- If there was already an opened file, then the previous file
- is closed first.
- </para>
- <para>
- This method will ensure that the directory structure
- for the <paramref name="fileName"/> specified exists.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.SetQWForFiles(System.IO.Stream)">
- <summary>
- Sets the quiet writer used for file output
- </summary>
- <param name="fileStream">the file stream that has been opened for writing</param>
- <remarks>
- <para>
- This implementation of <see cref="M:log4net.Appender.FileAppender.SetQWForFiles(System.IO.Stream)"/> creates a <see cref="T:System.IO.StreamWriter"/>
- over the <paramref name="fileStream"/> and passes it to the
- <see cref="M:log4net.Appender.FileAppender.SetQWForFiles(System.IO.TextWriter)"/> method.
- </para>
- <para>
- This method can be overridden by sub classes that want to wrap the
- <see cref="T:System.IO.Stream"/> in some way, for example to encrypt the output
- data using a <c>System.Security.Cryptography.CryptoStream</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.SetQWForFiles(System.IO.TextWriter)">
- <summary>
- Sets the quiet writer being used.
- </summary>
- <param name="writer">the writer over the file stream that has been opened for writing</param>
- <remarks>
- <para>
- This method can be overridden by sub classes that want to
- wrap the <see cref="T:System.IO.TextWriter"/> in some way.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.ConvertToFullPath(System.String)">
- <summary>
- Convert a path into a fully qualified path.
- </summary>
- <param name="path">The path to convert.</param>
- <returns>The fully qualified path.</returns>
- <remarks>
- <para>
- Converts the path specified to a fully
- qualified path. If the path is relative it is
- taken as relative from the application base
- directory.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.FileAppender.m_appendToFile">
- <summary>
- Flag to indicate if we should append to the file
- or overwrite the file. The default is to append.
- </summary>
- </member>
- <member name="F:log4net.Appender.FileAppender.m_fileName">
- <summary>
- The name of the log file.
- </summary>
- </member>
- <member name="F:log4net.Appender.FileAppender.m_encoding">
- <summary>
- The encoding to use for the file stream.
- </summary>
- </member>
- <member name="F:log4net.Appender.FileAppender.m_securityContext">
- <summary>
- The security context to use for privileged calls
- </summary>
- </member>
- <member name="F:log4net.Appender.FileAppender.m_stream">
- <summary>
- The stream to log to. Has added locking semantics
- </summary>
- </member>
- <member name="F:log4net.Appender.FileAppender.m_lockingModel">
- <summary>
- The locking model to use
- </summary>
- </member>
- <member name="P:log4net.Appender.FileAppender.File">
- <summary>
- Gets or sets the path to the file that logging will be written to.
- </summary>
- <value>
- The path to the file that logging will be written to.
- </value>
- <remarks>
- <para>
- If the path is relative it is taken as relative from
- the application base directory.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.FileAppender.AppendToFile">
- <summary>
- Gets or sets a flag that indicates whether the file should be
- appended to or overwritten.
- </summary>
- <value>
- Indicates whether the file should be appended to or overwritten.
- </value>
- <remarks>
- <para>
- If the value is set to false then the file will be overwritten, if
- it is set to true then the file will be appended to.
- </para>
- The default value is true.
- </remarks>
- </member>
- <member name="P:log4net.Appender.FileAppender.Encoding">
- <summary>
- Gets or sets <see cref="P:log4net.Appender.FileAppender.Encoding"/> used to write to the file.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.FileAppender.Encoding"/> used to write to the file.
- </value>
- <remarks>
- <para>
- The default encoding set is <see cref="P:System.Text.Encoding.Default"/>
- which is the encoding for the system's current ANSI code page.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.FileAppender.SecurityContext">
- <summary>
- Gets or sets the <see cref="P:log4net.Appender.FileAppender.SecurityContext"/> used to write to the file.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.FileAppender.SecurityContext"/> used to write to the file.
- </value>
- <remarks>
- <para>
- Unless a <see cref="P:log4net.Appender.FileAppender.SecurityContext"/> specified here for this appender
- the <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> is queried for the
- security context to use. The default behavior is to use the security context
- of the current thread.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.FileAppender.LockingModel">
- <summary>
- Gets or sets the <see cref="P:log4net.Appender.FileAppender.LockingModel"/> used to handle locking of the file.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.FileAppender.LockingModel"/> used to lock the file.
- </value>
- <remarks>
- <para>
- Gets or sets the <see cref="P:log4net.Appender.FileAppender.LockingModel"/> used to handle locking of the file.
- </para>
- <para>
- There are two built in locking models, <see cref="T:log4net.Appender.FileAppender.ExclusiveLock"/> and <see cref="T:log4net.Appender.FileAppender.MinimalLock"/>.
- The former locks the file from the start of logging to the end and the
- later lock only for the minimal amount of time when logging each message.
- </para>
- <para>
- The default locking model is the <see cref="T:log4net.Appender.FileAppender.ExclusiveLock"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.FileAppender.LockingStream">
- <summary>
- Write only <see cref="T:System.IO.Stream"/> that uses the <see cref="T:log4net.Appender.FileAppender.LockingModelBase"/>
- to manage access to an underlying resource.
- </summary>
- </member>
- <member name="M:log4net.Appender.FileAppender.LockingStream.BeginWrite(System.Byte[],System.Int32,System.Int32,System.AsyncCallback,System.Object)">
- <summary>
- True asynchronous writes are not supported, the implementation forces a synchronous write.
- </summary>
- </member>
- <member name="T:log4net.Core.LogException">
- <summary>
- Exception base type for log4net.
- </summary>
- <remarks>
- <para>
- This type extends <see cref="T:System.ApplicationException"/>. It
- does not add any new functionality but does differentiate the
- type of exception being thrown.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.LogException.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LogException"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogException.#ctor(System.String)">
- <summary>
- Constructor
- </summary>
- <param name="message">A message to include with the exception.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LogException"/> class with
- the specified message.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogException.#ctor(System.String,System.Exception)">
- <summary>
- Constructor
- </summary>
- <param name="message">A message to include with the exception.</param>
- <param name="innerException">A nested exception to include.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LogException"/> class
- with the specified message and inner exception.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Serialization constructor
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
- <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LogException"/> class
- with serialized data.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.FileAppender.LockingModelBase">
- <summary>
- Locking model base class
- </summary>
- <remarks>
- <para>
- Base class for the locking models available to the <see cref="T:log4net.Appender.FileAppender"/> derived loggers.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.LockingModelBase.OpenFile(System.String,System.Boolean,System.Text.Encoding)">
- <summary>
- Open the output file
- </summary>
- <param name="filename">The filename to use</param>
- <param name="append">Whether to append to the file, or overwrite</param>
- <param name="encoding">The encoding to use</param>
- <remarks>
- <para>
- Open the file specified and prepare for logging.
- No writes will be made until <see cref="M:log4net.Appender.FileAppender.LockingModelBase.AcquireLock"/> is called.
- Must be called before any calls to <see cref="M:log4net.Appender.FileAppender.LockingModelBase.AcquireLock"/>,
- <see cref="M:log4net.Appender.FileAppender.LockingModelBase.ReleaseLock"/> and <see cref="M:log4net.Appender.FileAppender.LockingModelBase.CloseFile"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.LockingModelBase.CloseFile">
- <summary>
- Close the file
- </summary>
- <remarks>
- <para>
- Close the file. No further writes will be made.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.LockingModelBase.AcquireLock">
- <summary>
- Acquire the lock on the file
- </summary>
- <returns>A stream that is ready to be written to.</returns>
- <remarks>
- <para>
- Acquire the lock on the file in preparation for writing to it.
- Return a stream pointing to the file. <see cref="M:log4net.Appender.FileAppender.LockingModelBase.ReleaseLock"/>
- must be called to release the lock on the output file.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.LockingModelBase.ReleaseLock">
- <summary>
- Release the lock on the file
- </summary>
- <remarks>
- <para>
- Release the lock on the file. No further writes will be made to the
- stream until <see cref="M:log4net.Appender.FileAppender.LockingModelBase.AcquireLock"/> is called again.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.FileAppender.LockingModelBase.CurrentAppender">
- <summary>
- Gets or sets the <see cref="T:log4net.Appender.FileAppender"/> for this LockingModel
- </summary>
- <value>
- The <see cref="T:log4net.Appender.FileAppender"/> for this LockingModel
- </value>
- <remarks>
- <para>
- The file appender this locking model is attached to and working on
- behalf of.
- </para>
- <para>
- The file appender is used to locate the security context and the error handler to use.
- </para>
- <para>
- The value of this property will be set before <see cref="M:log4net.Appender.FileAppender.LockingModelBase.OpenFile(System.String,System.Boolean,System.Text.Encoding)"/> is
- called.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.FileAppender.ExclusiveLock">
- <summary>
- Hold an exclusive lock on the output file
- </summary>
- <remarks>
- <para>
- Open the file once for writing and hold it open until <see cref="M:log4net.Appender.FileAppender.ExclusiveLock.CloseFile"/> is called.
- Maintains an exclusive lock on the file during this time.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.ExclusiveLock.OpenFile(System.String,System.Boolean,System.Text.Encoding)">
- <summary>
- Open the file specified and prepare for logging.
- </summary>
- <param name="filename">The filename to use</param>
- <param name="append">Whether to append to the file, or overwrite</param>
- <param name="encoding">The encoding to use</param>
- <remarks>
- <para>
- Open the file specified and prepare for logging.
- No writes will be made until <see cref="M:log4net.Appender.FileAppender.ExclusiveLock.AcquireLock"/> is called.
- Must be called before any calls to <see cref="M:log4net.Appender.FileAppender.ExclusiveLock.AcquireLock"/>,
- <see cref="M:log4net.Appender.FileAppender.ExclusiveLock.ReleaseLock"/> and <see cref="M:log4net.Appender.FileAppender.ExclusiveLock.CloseFile"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.ExclusiveLock.CloseFile">
- <summary>
- Close the file
- </summary>
- <remarks>
- <para>
- Close the file. No further writes will be made.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.ExclusiveLock.AcquireLock">
- <summary>
- Acquire the lock on the file
- </summary>
- <returns>A stream that is ready to be written to.</returns>
- <remarks>
- <para>
- Does nothing. The lock is already taken
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.ExclusiveLock.ReleaseLock">
- <summary>
- Release the lock on the file
- </summary>
- <remarks>
- <para>
- Does nothing. The lock will be released when the file is closed.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.FileAppender.MinimalLock">
- <summary>
- Acquires the file lock for each write
- </summary>
- <remarks>
- <para>
- Opens the file once for each <see cref="M:log4net.Appender.FileAppender.MinimalLock.AcquireLock"/>/<see cref="M:log4net.Appender.FileAppender.MinimalLock.ReleaseLock"/> cycle,
- thus holding the lock for the minimal amount of time. This method of locking
- is considerably slower than <see cref="T:log4net.Appender.FileAppender.ExclusiveLock"/> but allows
- other processes to move/delete the log file whilst logging continues.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.MinimalLock.OpenFile(System.String,System.Boolean,System.Text.Encoding)">
- <summary>
- Prepares to open the file when the first message is logged.
- </summary>
- <param name="filename">The filename to use</param>
- <param name="append">Whether to append to the file, or overwrite</param>
- <param name="encoding">The encoding to use</param>
- <remarks>
- <para>
- Open the file specified and prepare for logging.
- No writes will be made until <see cref="M:log4net.Appender.FileAppender.MinimalLock.AcquireLock"/> is called.
- Must be called before any calls to <see cref="M:log4net.Appender.FileAppender.MinimalLock.AcquireLock"/>,
- <see cref="M:log4net.Appender.FileAppender.MinimalLock.ReleaseLock"/> and <see cref="M:log4net.Appender.FileAppender.MinimalLock.CloseFile"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.MinimalLock.CloseFile">
- <summary>
- Close the file
- </summary>
- <remarks>
- <para>
- Close the file. No further writes will be made.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.MinimalLock.AcquireLock">
- <summary>
- Acquire the lock on the file
- </summary>
- <returns>A stream that is ready to be written to.</returns>
- <remarks>
- <para>
- Acquire the lock on the file in preparation for writing to it.
- Return a stream pointing to the file. <see cref="M:log4net.Appender.FileAppender.MinimalLock.ReleaseLock"/>
- must be called to release the lock on the output file.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.FileAppender.MinimalLock.ReleaseLock">
- <summary>
- Release the lock on the file
- </summary>
- <remarks>
- <para>
- Release the lock on the file. No further writes will be made to the
- stream until <see cref="M:log4net.Appender.FileAppender.MinimalLock.AcquireLock"/> is called again.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.ForwardingAppender">
- <summary>
- This appender forwards logging events to attached appenders.
- </summary>
- <remarks>
- <para>
- The forwarding appender can be used to specify different thresholds
- and filters for the same appender at different locations within the hierarchy.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.ForwardingAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.OnClose">
- <summary>
- Closes the appender and releases resources.
- </summary>
- <remarks>
- <para>
- Releases any resources allocated within the appender such as file handles,
- network connections, etc.
- </para>
- <para>
- It is a programming error to append to a closed appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Forward the logging event to the attached appenders
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Delivers the logging event to all the attached appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.Append(log4net.Core.LoggingEvent[])">
- <summary>
- Forward the logging events to the attached appenders
- </summary>
- <param name="loggingEvents">The array of events to log.</param>
- <remarks>
- <para>
- Delivers the logging events to all the attached appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.AddAppender(log4net.Appender.IAppender)">
- <summary>
- Adds an <see cref="T:log4net.Appender.IAppender"/> to the list of appenders of this
- instance.
- </summary>
- <param name="newAppender">The <see cref="T:log4net.Appender.IAppender"/> to add to this appender.</param>
- <remarks>
- <para>
- If the specified <see cref="T:log4net.Appender.IAppender"/> is already in the list of
- appenders, then it won't be added again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.GetAppender(System.String)">
- <summary>
- Looks for the appender with the specified name.
- </summary>
- <param name="name">The name of the appender to lookup.</param>
- <returns>
- The appender with the specified name, or <c>null</c>.
- </returns>
- <remarks>
- <para>
- Get the named appender attached to this appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.RemoveAllAppenders">
- <summary>
- Removes all previously added appenders from this appender.
- </summary>
- <remarks>
- <para>
- This is useful when re-reading configuration information.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.RemoveAppender(log4net.Appender.IAppender)">
- <summary>
- Removes the specified appender from the list of appenders.
- </summary>
- <param name="appender">The appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </remarks>
- </member>
- <member name="M:log4net.Appender.ForwardingAppender.RemoveAppender(System.String)">
- <summary>
- Removes the appender with the specified name from the list of appenders.
- </summary>
- <param name="name">The name of the appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </remarks>
- </member>
- <member name="F:log4net.Appender.ForwardingAppender.m_appenderAttachedImpl">
- <summary>
- Implementation of the <see cref="T:log4net.Core.IAppenderAttachable"/> interface
- </summary>
- </member>
- <member name="P:log4net.Appender.ForwardingAppender.Appenders">
- <summary>
- Gets the appenders contained in this appender as an
- <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <remarks>
- If no appenders can be found, then an <see cref="T:log4net.Util.EmptyCollection"/>
- is returned.
- </remarks>
- <returns>
- A collection of the appenders in this appender.
- </returns>
- </member>
- <member name="T:log4net.Appender.LocalSyslogAppender">
- <summary>
- Logs events to a local syslog service.
- </summary>
- <remarks>
- <note>
- This appender uses the POSIX libc library functions <c>openlog</c>, <c>syslog</c>, and <c>closelog</c>.
- If these functions are not available on the local system then this appender will not work!
- </note>
- <para>
- The functions <c>openlog</c>, <c>syslog</c>, and <c>closelog</c> are specified in SUSv2 and
- POSIX 1003.1-2001 standards. These are used to log messages to the local syslog service.
- </para>
- <para>
- This appender talks to a local syslog service. If you need to log to a remote syslog
- daemon and you cannot configure your local syslog service to do this you may be
- able to use the <see cref="T:log4net.Appender.RemoteSyslogAppender"/> to log via UDP.
- </para>
- <para>
- Syslog messages must have a facility and and a severity. The severity
- is derived from the Level of the logging event.
- The facility must be chosen from the set of defined syslog
- <see cref="T:log4net.Appender.LocalSyslogAppender.SyslogFacility"/> values. The facilities list is predefined
- and cannot be extended.
- </para>
- <para>
- An identifier is specified with each log message. This can be specified
- by setting the <see cref="P:log4net.Appender.LocalSyslogAppender.Identity"/> property. The identity (also know
- as the tag) must not contain white space. The default value for the
- identity is the application name (from <see cref="P:log4net.Util.SystemInfo.ApplicationFriendlyName"/>).
- </para>
- </remarks>
- <author>Rob Lyon</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.LocalSyslogAppender"/> class.
- </summary>
- <remarks>
- This instance of the <see cref="T:log4net.Appender.LocalSyslogAppender"/> class is set up to write
- to a local syslog service.
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.AddMapping(log4net.Appender.LocalSyslogAppender.LevelSeverity)">
- <summary>
- Add a mapping of level to severity
- </summary>
- <param name="mapping">The mapping to add</param>
- <remarks>
- <para>
- Adds a <see cref="T:log4net.Appender.LocalSyslogAppender.LevelSeverity"/> to this appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.LocalSyslogAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.LocalSyslogAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.LocalSyslogAppender.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the event to a remote syslog daemon.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.OnClose">
- <summary>
- Close the syslog when the appender is closed
- </summary>
- <remarks>
- <para>
- Close the syslog when the appender is closed
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.GetSeverity(log4net.Core.Level)">
- <summary>
- Translates a log4net level to a syslog severity.
- </summary>
- <param name="level">A log4net level.</param>
- <returns>A syslog severity.</returns>
- <remarks>
- <para>
- Translates a log4net level to a syslog severity.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.GeneratePriority(log4net.Appender.LocalSyslogAppender.SyslogFacility,log4net.Appender.LocalSyslogAppender.SyslogSeverity)">
- <summary>
- Generate a syslog priority.
- </summary>
- <param name="facility">The syslog facility.</param>
- <param name="severity">The syslog severity.</param>
- <returns>A syslog priority.</returns>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.m_facility">
- <summary>
- The facility. The default facility is <see cref="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.User"/>.
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.m_identity">
- <summary>
- The message identity
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.m_handleToIdentity">
- <summary>
- Marshaled handle to the identity string. We have to hold on to the
- string as the <c>openlog</c> and <c>syslog</c> APIs just hold the
- pointer to the ident and dereference it for each log message.
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.m_levelMapping">
- <summary>
- Mapping from level object to syslog severity
- </summary>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.openlog(System.IntPtr,System.Int32,log4net.Appender.LocalSyslogAppender.SyslogFacility)">
- <summary>
- Open connection to system logger.
- </summary>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.syslog(System.Int32,System.String,System.String)">
- <summary>
- Generate a log message.
- </summary>
- <remarks>
- <para>
- The libc syslog method takes a format string and a variable argument list similar
- to the classic printf function. As this type of vararg list is not supported
- by C# we need to specify the arguments explicitly. Here we have specified the
- format string with a single message argument. The caller must set the format
- string to <c>"%s"</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.LocalSyslogAppender.closelog">
- <summary>
- Close descriptor used to write to system logger.
- </summary>
- </member>
- <member name="P:log4net.Appender.LocalSyslogAppender.Identity">
- <summary>
- Message identity
- </summary>
- <remarks>
- <para>
- An identifier is specified with each log message. This can be specified
- by setting the <see cref="P:log4net.Appender.LocalSyslogAppender.Identity"/> property. The identity (also know
- as the tag) must not contain white space. The default value for the
- identity is the application name (from <see cref="P:log4net.Util.SystemInfo.ApplicationFriendlyName"/>).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.LocalSyslogAppender.Facility">
- <summary>
- Syslog facility
- </summary>
- <remarks>
- Set to one of the <see cref="T:log4net.Appender.LocalSyslogAppender.SyslogFacility"/> values. The list of
- facilities is predefined and cannot be extended. The default value
- is <see cref="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.User"/>.
- </remarks>
- </member>
- <member name="P:log4net.Appender.LocalSyslogAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="P:log4net.Appender.AppenderSkeleton.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.LocalSyslogAppender.SyslogSeverity">
- <summary>
- syslog severities
- </summary>
- <remarks>
- <para>
- The log4net Level maps to a syslog severity using the
- <see cref="M:log4net.Appender.LocalSyslogAppender.AddMapping(log4net.Appender.LocalSyslogAppender.LevelSeverity)"/> method and the <see cref="T:log4net.Appender.LocalSyslogAppender.LevelSeverity"/>
- class. The severity is set on <see cref="P:log4net.Appender.LocalSyslogAppender.LevelSeverity.Severity"/>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Emergency">
- <summary>
- system is unusable
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Alert">
- <summary>
- action must be taken immediately
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Critical">
- <summary>
- critical conditions
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Error">
- <summary>
- error conditions
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Warning">
- <summary>
- warning conditions
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Notice">
- <summary>
- normal but significant condition
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Informational">
- <summary>
- informational
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogSeverity.Debug">
- <summary>
- debug-level messages
- </summary>
- </member>
- <member name="T:log4net.Appender.LocalSyslogAppender.SyslogFacility">
- <summary>
- syslog facilities
- </summary>
- <remarks>
- <para>
- The syslog facility defines which subsystem the logging comes from.
- This is set on the <see cref="P:log4net.Appender.LocalSyslogAppender.Facility"/> property.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Kernel">
- <summary>
- kernel messages
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.User">
- <summary>
- random user-level messages
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Mail">
- <summary>
- mail system
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Daemons">
- <summary>
- system daemons
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Authorization">
- <summary>
- security/authorization messages
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Syslog">
- <summary>
- messages generated internally by syslogd
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Printer">
- <summary>
- line printer subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.News">
- <summary>
- network news subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Uucp">
- <summary>
- UUCP subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Clock">
- <summary>
- clock (cron/at) daemon
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Authorization2">
- <summary>
- security/authorization messages (private)
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Ftp">
- <summary>
- ftp daemon
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Ntp">
- <summary>
- NTP subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Audit">
- <summary>
- log audit
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Alert">
- <summary>
- log alert
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Clock2">
- <summary>
- clock daemon
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local0">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local1">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local2">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local3">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local4">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local5">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local6">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.LocalSyslogAppender.SyslogFacility.Local7">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="T:log4net.Appender.LocalSyslogAppender.LevelSeverity">
- <summary>
- A class to act as a mapping between the level that a logging call is made at and
- the syslog severity that is should be logged at.
- </summary>
- <remarks>
- <para>
- A class to act as a mapping between the level that a logging call is made at and
- the syslog severity that is should be logged at.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.LocalSyslogAppender.LevelSeverity.Severity">
- <summary>
- The mapped syslog severity for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The mapped syslog severity for the specified level
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.MemoryAppender">
- <summary>
- Stores logging events in an array.
- </summary>
- <remarks>
- <para>
- The memory appender stores all the logging events
- that are appended in an in-memory array.
- </para>
- <para>
- Use the <see cref="M:log4net.Appender.MemoryAppender.GetEvents"/> method to get
- the current list of events that have been appended.
- </para>
- <para>
- Use the <see cref="M:log4net.Appender.MemoryAppender.Clear"/> method to clear the
- current list of events.
- </para>
- </remarks>
- <author>Julian Biddle</author>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.MemoryAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.MemoryAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.MemoryAppender.GetEvents">
- <summary>
- Gets the events that have been logged.
- </summary>
- <returns>The events that have been logged</returns>
- <remarks>
- <para>
- Gets the events that have been logged.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.MemoryAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">the event to log</param>
- <remarks>
- <para>Stores the <paramref name="loggingEvent"/> in the events list.</para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.MemoryAppender.Clear">
- <summary>
- Clear the list of events
- </summary>
- <remarks>
- Clear the list of events
- </remarks>
- </member>
- <member name="F:log4net.Appender.MemoryAppender.m_eventsList">
- <summary>
- The list of events that have been appended.
- </summary>
- </member>
- <member name="F:log4net.Appender.MemoryAppender.m_fixFlags">
- <summary>
- Value indicating which fields in the event should be fixed
- </summary>
- <remarks>
- By default all fields are fixed
- </remarks>
- </member>
- <member name="P:log4net.Appender.MemoryAppender.OnlyFixPartialEventData">
- <summary>
- Gets or sets a value indicating whether only part of the logging event
- data should be fixed.
- </summary>
- <value>
- <c>true</c> if the appender should only fix part of the logging event
- data, otherwise <c>false</c>. The default is <c>false</c>.
- </value>
- <remarks>
- <para>
- Setting this property to <c>true</c> will cause only part of the event
- data to be fixed and stored in the appender, hereby improving performance.
- </para>
- <para>
- See <see cref="M:log4net.Core.LoggingEvent.FixVolatileData(System.Boolean)"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.MemoryAppender.Fix">
- <summary>
- Gets or sets the fields that will be fixed in the event
- </summary>
- <remarks>
- <para>
- The logging event needs to have certain thread specific values
- captured before it can be buffered. See <see cref="P:log4net.Core.LoggingEvent.Fix"/>
- for details.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.NetSendAppender">
- <summary>
- Logs entries by sending network messages using the
- <see cref="M:log4net.Appender.NetSendAppender.NetMessageBufferSend(System.String,System.String,System.String,System.String,System.Int32)"/> native function.
- </summary>
- <remarks>
- <para>
- You can send messages only to names that are active
- on the network. If you send the message to a user name,
- that user must be logged on and running the Messenger
- service to receive the message.
- </para>
- <para>
- The receiver will get a top most window displaying the
- messages one at a time, therefore this appender should
- not be used to deliver a high volume of messages.
- </para>
- <para>
- The following table lists some possible uses for this appender :
- </para>
- <para>
- <list type="table">
- <listheader>
- <term>Action</term>
- <description>Property Value(s)</description>
- </listheader>
- <item>
- <term>Send a message to a user account on the local machine</term>
- <description>
- <para>
- <paramref name="Server"/> = &lt;name of the local machine&gt;
- </para>
- <para>
- <paramref name="Recipient"/> = &lt;user name&gt;
- </para>
- </description>
- </item>
- <item>
- <term>Send a message to a user account on a remote machine</term>
- <description>
- <para>
- <paramref name="Server"/> = &lt;name of the remote machine&gt;
- </para>
- <para>
- <paramref name="Recipient"/> = &lt;user name&gt;
- </para>
- </description>
- </item>
- <item>
- <term>Send a message to a domain user account</term>
- <description>
- <para>
- <paramref name="Server"/> = &lt;name of a domain controller | uninitialized&gt;
- </para>
- <para>
- <paramref name="Recipient"/> = &lt;user name&gt;
- </para>
- </description>
- </item>
- <item>
- <term>Send a message to all the names in a workgroup or domain</term>
- <description>
- <para>
- <paramref name="Recipient"/> = &lt;workgroup name | domain name&gt;*
- </para>
- </description>
- </item>
- <item>
- <term>Send a message from the local machine to a remote machine</term>
- <description>
- <para>
- <paramref name="Server"/> = &lt;name of the local machine | uninitialized&gt;
- </para>
- <para>
- <paramref name="Recipient"/> = &lt;name of the remote machine&gt;
- </para>
- </description>
- </item>
- </list>
- </para>
- <para>
- <b>Note :</b> security restrictions apply for sending
- network messages, see <see cref="M:log4net.Appender.NetSendAppender.NetMessageBufferSend(System.String,System.String,System.String,System.String,System.Int32)"/>
- for more information.
- </para>
- </remarks>
- <example>
- <para>
- An example configuration section to log information
- using this appender from the local machine, named
- LOCAL_PC, to machine OPERATOR_PC :
- </para>
- <code lang="XML" escaped="true">
- <appender name="NetSendAppender_Operator" type="log4net.Appender.NetSendAppender">
- <server value="LOCAL_PC"/>
- <recipient value="OPERATOR_PC"/>
- <layout type="log4net.Layout.PatternLayout" value="%-5p %c [%x] - %m%n"/>
- </appender>
- </code>
- </example>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Appender.NetSendAppender.m_server">
- <summary>
- The DNS or NetBIOS name of the server on which the function is to execute.
- </summary>
- </member>
- <member name="F:log4net.Appender.NetSendAppender.m_sender">
- <summary>
- The sender of the network message.
- </summary>
- </member>
- <member name="F:log4net.Appender.NetSendAppender.m_recipient">
- <summary>
- The message alias to which the message should be sent.
- </summary>
- </member>
- <member name="F:log4net.Appender.NetSendAppender.m_securityContext">
- <summary>
- The security context to use for privileged calls
- </summary>
- </member>
- <member name="M:log4net.Appender.NetSendAppender.#ctor">
- <summary>
- Initializes the appender.
- </summary>
- <remarks>
- The default constructor initializes all fields to their default values.
- </remarks>
- </member>
- <member name="M:log4net.Appender.NetSendAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.NetSendAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.NetSendAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.NetSendAppender.ActivateOptions"/> must be called again.
- </para>
- <para>
- The appender will be ignored if no <see cref="P:log4net.Appender.NetSendAppender.Recipient"/> was specified.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">The required property <see cref="P:log4net.Appender.NetSendAppender.Recipient"/> was not specified.</exception>
- </member>
- <member name="M:log4net.Appender.NetSendAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Sends the event using a network message.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.NetSendAppender.NetMessageBufferSend(System.String,System.String,System.String,System.String,System.Int32)">
- <summary>
- Sends a buffer of information to a registered message alias.
- </summary>
- <param name="serverName">The DNS or NetBIOS name of the server on which the function is to execute.</param>
- <param name="msgName">The message alias to which the message buffer should be sent</param>
- <param name="fromName">The originator of the message.</param>
- <param name="buffer">The message text.</param>
- <param name="bufferSize">The length, in bytes, of the message text.</param>
- <remarks>
- <para>
- The following restrictions apply for sending network messages:
- </para>
- <para>
- <list type="table">
- <listheader>
- <term>Platform</term>
- <description>Requirements</description>
- </listheader>
- <item>
- <term>Windows NT</term>
- <description>
- <para>
- No special group membership is required to send a network message.
- </para>
- <para>
- Admin, Accounts, Print, or Server Operator group membership is required to
- successfully send a network message on a remote server.
- </para>
- </description>
- </item>
- <item>
- <term>Windows 2000 or later</term>
- <description>
- <para>
- If you send a message on a domain controller that is running Active Directory,
- access is allowed or denied based on the access control list (ACL) for the securable
- object. The default ACL permits only Domain Admins and Account Operators to send a network message.
- </para>
- <para>
- On a member server or workstation, only Administrators and Server Operators can send a network message.
- </para>
- </description>
- </item>
- </list>
- </para>
- <para>
- For more information see <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/security_requirements_for_the_network_management_functions.asp">Security Requirements for the Network Management Functions</a>.
- </para>
- </remarks>
- <returns>
- <para>
- If the function succeeds, the return value is zero.
- </para>
- </returns>
- </member>
- <member name="P:log4net.Appender.NetSendAppender.Sender">
- <summary>
- Gets or sets the sender of the message.
- </summary>
- <value>
- The sender of the message.
- </value>
- <remarks>
- If this property is not specified, the message is sent from the local computer.
- </remarks>
- </member>
- <member name="P:log4net.Appender.NetSendAppender.Recipient">
- <summary>
- Gets or sets the message alias to which the message should be sent.
- </summary>
- <value>
- The recipient of the message.
- </value>
- <remarks>
- This property should always be specified in order to send a message.
- </remarks>
- </member>
- <member name="P:log4net.Appender.NetSendAppender.Server">
- <summary>
- Gets or sets the DNS or NetBIOS name of the remote server on which the function is to execute.
- </summary>
- <value>
- DNS or NetBIOS name of the remote server on which the function is to execute.
- </value>
- <remarks>
- <para>
- For Windows NT 4.0 and earlier, the string should begin with \\.
- </para>
- <para>
- If this property is not specified, the local computer is used.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.NetSendAppender.SecurityContext">
- <summary>
- Gets or sets the <see cref="P:log4net.Appender.NetSendAppender.SecurityContext"/> used to call the NetSend method.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.NetSendAppender.SecurityContext"/> used to call the NetSend method.
- </value>
- <remarks>
- <para>
- Unless a <see cref="P:log4net.Appender.NetSendAppender.SecurityContext"/> specified here for this appender
- the <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> is queried for the
- security context to use. The default behavior is to use the security context
- of the current thread.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.NetSendAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.OutputDebugStringAppender">
- <summary>
- Appends log events to the OutputDebugString system.
- </summary>
- <remarks>
- <para>
- OutputDebugStringAppender appends log events to the
- OutputDebugString system.
- </para>
- <para>
- The string is passed to the native <c>OutputDebugString</c>
- function.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.OutputDebugStringAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.OutputDebugStringAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.OutputDebugStringAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Write the logging event to the output debug string API
- </summary>
- <param name="loggingEvent">the event to log</param>
- <remarks>
- <para>
- Write the logging event to the output debug string API
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.OutputDebugStringAppender.OutputDebugString(System.String)">
- <summary>
- Stub for OutputDebugString native method
- </summary>
- <param name="message">the string to output</param>
- <remarks>
- <para>
- Stub for OutputDebugString native method
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.OutputDebugStringAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.RemoteSyslogAppender">
- <summary>
- Logs events to a remote syslog daemon.
- </summary>
- <remarks>
- <para>
- The BSD syslog protocol is used to remotely log to
- a syslog daemon. The syslogd listens for for messages
- on UDP port 514.
- </para>
- <para>
- The syslog UDP protocol is not authenticated. Most syslog daemons
- do not accept remote log messages because of the security implications.
- You may be able to use the LocalSyslogAppender to talk to a local
- syslog service.
- </para>
- <para>
- There is an RFC 3164 that claims to document the BSD Syslog Protocol.
- This RFC can be seen here: http://www.faqs.org/rfcs/rfc3164.html.
- This appender generates what the RFC calls an "Original Device Message",
- i.e. does not include the TIMESTAMP or HOSTNAME fields. By observation
- this format of message will be accepted by all current syslog daemon
- implementations. The daemon will attach the current time and the source
- hostname or IP address to any messages received.
- </para>
- <para>
- Syslog messages must have a facility and and a severity. The severity
- is derived from the Level of the logging event.
- The facility must be chosen from the set of defined syslog
- <see cref="T:log4net.Appender.RemoteSyslogAppender.SyslogFacility"/> values. The facilities list is predefined
- and cannot be extended.
- </para>
- <para>
- An identifier is specified with each log message. This can be specified
- by setting the <see cref="P:log4net.Appender.RemoteSyslogAppender.Identity"/> property. The identity (also know
- as the tag) must not contain white space. The default value for the
- identity is the application name (from <see cref="P:log4net.Core.LoggingEvent.Domain"/>).
- </para>
- </remarks>
- <author>Rob Lyon</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="T:log4net.Appender.UdpAppender">
- <summary>
- Sends logging events as connectionless UDP datagrams to a remote host or a
- multicast group using an <see cref="T:System.Net.Sockets.UdpClient"/>.
- </summary>
- <remarks>
- <para>
- UDP guarantees neither that messages arrive, nor that they arrive in the correct order.
- </para>
- <para>
- To view the logging results, a custom application can be developed that listens for logging
- events.
- </para>
- <para>
- When decoding events send via this appender remember to use the same encoding
- to decode the events as was used to send the events. See the <see cref="P:log4net.Appender.UdpAppender.Encoding"/>
- property to specify the encoding to use.
- </para>
- </remarks>
- <example>
- This example shows how to log receive logging events that are sent
- on IP address 244.0.0.1 and port 8080 to the console. The event is
- encoded in the packet as a unicode string and it is decoded as such.
- <code lang="C#">
- IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 0);
- UdpClient udpClient;
- byte[] buffer;
- string loggingEvent;
-
- try
- {
- udpClient = new UdpClient(8080);
-
- while(true)
- {
- buffer = udpClient.Receive(ref remoteEndPoint);
- loggingEvent = System.Text.Encoding.Unicode.GetString(buffer);
- Console.WriteLine(loggingEvent);
- }
- }
- catch(Exception e)
- {
- Console.WriteLine(e.ToString());
- }
- </code>
- <code lang="Visual Basic">
- Dim remoteEndPoint as IPEndPoint
- Dim udpClient as UdpClient
- Dim buffer as Byte()
- Dim loggingEvent as String
-
- Try
- remoteEndPoint = new IPEndPoint(IPAddress.Any, 0)
- udpClient = new UdpClient(8080)
-
- While True
- buffer = udpClient.Receive(ByRef remoteEndPoint)
- loggingEvent = System.Text.Encoding.Unicode.GetString(buffer)
- Console.WriteLine(loggingEvent)
- Wend
- Catch e As Exception
- Console.WriteLine(e.ToString())
- End Try
- </code>
- <para>
- An example configuration section to log information using this appender to the
- IP 224.0.0.1 on port 8080:
- </para>
- <code lang="XML" escaped="true">
- <appender name="UdpAppender" type="log4net.Appender.UdpAppender">
- <remoteAddress value="224.0.0.1"/>
- <remotePort value="8080"/>
- <layout type="log4net.Layout.PatternLayout" value="%-5level %logger [%ndc] - %message%newline"/>
- </appender>
- </code>
- </example>
- <author>Gert Driesen</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.UdpAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.UdpAppender"/> class.
- </summary>
- <remarks>
- The default constructor initializes all fields to their default values.
- </remarks>
- </member>
- <member name="M:log4net.Appender.UdpAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.UdpAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.UdpAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.UdpAppender.ActivateOptions"/> must be called again.
- </para>
- <para>
- The appender will be ignored if no <see cref="P:log4net.Appender.UdpAppender.RemoteAddress"/> was specified or
- an invalid remote or local TCP port number was specified.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">The required property <see cref="P:log4net.Appender.UdpAppender.RemoteAddress"/> was not specified.</exception>
- <exception cref="T:System.ArgumentOutOfRangeException">The TCP port number assigned to <see cref="P:log4net.Appender.UdpAppender.LocalPort"/> or <see cref="P:log4net.Appender.UdpAppender.RemotePort"/> is less than <see cref="F:System.Net.IPEndPoint.MinPort"/> or greater than <see cref="F:System.Net.IPEndPoint.MaxPort"/>.</exception>
- </member>
- <member name="M:log4net.Appender.UdpAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Sends the event using an UDP datagram.
- </para>
- <para>
- Exceptions are passed to the <see cref="P:log4net.Appender.AppenderSkeleton.ErrorHandler"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.UdpAppender.OnClose">
- <summary>
- Closes the UDP connection and releases all resources associated with
- this <see cref="T:log4net.Appender.UdpAppender"/> instance.
- </summary>
- <remarks>
- <para>
- Disables the underlying <see cref="T:System.Net.Sockets.UdpClient"/> and releases all managed
- and unmanaged resources associated with the <see cref="T:log4net.Appender.UdpAppender"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.UdpAppender.InitializeClientConnection">
- <summary>
- Initializes the underlying <see cref="T:System.Net.Sockets.UdpClient"/> connection.
- </summary>
- <remarks>
- <para>
- The underlying <see cref="T:System.Net.Sockets.UdpClient"/> is initialized and binds to the
- port number from which you intend to communicate.
- </para>
- <para>
- Exceptions are passed to the <see cref="P:log4net.Appender.AppenderSkeleton.ErrorHandler"/>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.UdpAppender.m_remoteAddress">
- <summary>
- The IP address of the remote host or multicast group to which
- the logging event will be sent.
- </summary>
- </member>
- <member name="F:log4net.Appender.UdpAppender.m_remotePort">
- <summary>
- The TCP port number of the remote host or multicast group to
- which the logging event will be sent.
- </summary>
- </member>
- <member name="F:log4net.Appender.UdpAppender.m_remoteEndPoint">
- <summary>
- The cached remote endpoint to which the logging events will be sent.
- </summary>
- </member>
- <member name="F:log4net.Appender.UdpAppender.m_localPort">
- <summary>
- The TCP port number from which the <see cref="T:System.Net.Sockets.UdpClient"/> will communicate.
- </summary>
- </member>
- <member name="F:log4net.Appender.UdpAppender.m_client">
- <summary>
- The <see cref="T:System.Net.Sockets.UdpClient"/> instance that will be used for sending the
- logging events.
- </summary>
- </member>
- <member name="F:log4net.Appender.UdpAppender.m_encoding">
- <summary>
- The encoding to use for the packet.
- </summary>
- </member>
- <member name="P:log4net.Appender.UdpAppender.RemoteAddress">
- <summary>
- Gets or sets the IP address of the remote host or multicast group to which
- the underlying <see cref="T:System.Net.Sockets.UdpClient"/> should sent the logging event.
- </summary>
- <value>
- The IP address of the remote host or multicast group to which the logging event
- will be sent.
- </value>
- <remarks>
- <para>
- Multicast addresses are identified by IP class <b>D</b> addresses (in the range 224.0.0.0 to
- 239.255.255.255). Multicast packets can pass across different networks through routers, so
- it is possible to use multicasts in an Internet scenario as long as your network provider
- supports multicasting.
- </para>
- <para>
- Hosts that want to receive particular multicast messages must register their interest by joining
- the multicast group. Multicast messages are not sent to networks where no host has joined
- the multicast group. Class <b>D</b> IP addresses are used for multicast groups, to differentiate
- them from normal host addresses, allowing nodes to easily detect if a message is of interest.
- </para>
- <para>
- Static multicast addresses that are needed globally are assigned by IANA. A few examples are listed in the table below:
- </para>
- <para>
- <list type="table">
- <listheader>
- <term>IP Address</term>
- <description>Description</description>
- </listheader>
- <item>
- <term>224.0.0.1</term>
- <description>
- <para>
- Sends a message to all system on the subnet.
- </para>
- </description>
- </item>
- <item>
- <term>224.0.0.2</term>
- <description>
- <para>
- Sends a message to all routers on the subnet.
- </para>
- </description>
- </item>
- <item>
- <term>224.0.0.12</term>
- <description>
- <para>
- The DHCP server answers messages on the IP address 224.0.0.12, but only on a subnet.
- </para>
- </description>
- </item>
- </list>
- </para>
- <para>
- A complete list of actually reserved multicast addresses and their owners in the ranges
- defined by RFC 3171 can be found at the <A href="http://www.iana.org/assignments/multicast-addresses">IANA web site</A>.
- </para>
- <para>
- The address range 239.0.0.0 to 239.255.255.255 is reserved for administrative scope-relative
- addresses. These addresses can be reused with other local groups. Routers are typically
- configured with filters to prevent multicast traffic in this range from flowing outside
- of the local network.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.UdpAppender.RemotePort">
- <summary>
- Gets or sets the TCP port number of the remote host or multicast group to which
- the underlying <see cref="T:System.Net.Sockets.UdpClient"/> should sent the logging event.
- </summary>
- <value>
- An integer value in the range <see cref="F:System.Net.IPEndPoint.MinPort"/> to <see cref="F:System.Net.IPEndPoint.MaxPort"/>
- indicating the TCP port number of the remote host or multicast group to which the logging event
- will be sent.
- </value>
- <remarks>
- The underlying <see cref="T:System.Net.Sockets.UdpClient"/> will send messages to this TCP port number
- on the remote host or multicast group.
- </remarks>
- <exception cref="T:System.ArgumentOutOfRangeException">The value specified is less than <see cref="F:System.Net.IPEndPoint.MinPort"/> or greater than <see cref="F:System.Net.IPEndPoint.MaxPort"/>.</exception>
- </member>
- <member name="P:log4net.Appender.UdpAppender.LocalPort">
- <summary>
- Gets or sets the TCP port number from which the underlying <see cref="T:System.Net.Sockets.UdpClient"/> will communicate.
- </summary>
- <value>
- An integer value in the range <see cref="F:System.Net.IPEndPoint.MinPort"/> to <see cref="F:System.Net.IPEndPoint.MaxPort"/>
- indicating the TCP port number from which the underlying <see cref="T:System.Net.Sockets.UdpClient"/> will communicate.
- </value>
- <remarks>
- <para>
- The underlying <see cref="T:System.Net.Sockets.UdpClient"/> will bind to this port for sending messages.
- </para>
- <para>
- Setting the value to 0 (the default) will cause the udp client not to bind to
- a local port.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentOutOfRangeException">The value specified is less than <see cref="F:System.Net.IPEndPoint.MinPort"/> or greater than <see cref="F:System.Net.IPEndPoint.MaxPort"/>.</exception>
- </member>
- <member name="P:log4net.Appender.UdpAppender.Encoding">
- <summary>
- Gets or sets <see cref="P:log4net.Appender.UdpAppender.Encoding"/> used to write the packets.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.UdpAppender.Encoding"/> used to write the packets.
- </value>
- <remarks>
- <para>
- The <see cref="P:log4net.Appender.UdpAppender.Encoding"/> used to write the packets.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.UdpAppender.Client">
- <summary>
- Gets or sets the underlying <see cref="T:System.Net.Sockets.UdpClient"/>.
- </summary>
- <value>
- The underlying <see cref="T:System.Net.Sockets.UdpClient"/>.
- </value>
- <remarks>
- <see cref="T:log4net.Appender.UdpAppender"/> creates a <see cref="T:System.Net.Sockets.UdpClient"/> to send logging events
- over a network. Classes deriving from <see cref="T:log4net.Appender.UdpAppender"/> can use this
- property to get or set this <see cref="T:System.Net.Sockets.UdpClient"/>. Use the underlying <see cref="T:System.Net.Sockets.UdpClient"/>
- returned from <see cref="P:log4net.Appender.UdpAppender.Client"/> if you require access beyond that which
- <see cref="T:log4net.Appender.UdpAppender"/> provides.
- </remarks>
- </member>
- <member name="P:log4net.Appender.UdpAppender.RemoteEndPoint">
- <summary>
- Gets or sets the cached remote endpoint to which the logging events should be sent.
- </summary>
- <value>
- The cached remote endpoint to which the logging events will be sent.
- </value>
- <remarks>
- The <see cref="M:log4net.Appender.UdpAppender.ActivateOptions"/> method will initialize the remote endpoint
- with the values of the <see cref="P:log4net.Appender.UdpAppender.RemoteAddress"/> and <see cref="P:log4net.Appender.UdpAppender.RemotePort"/>
- properties.
- </remarks>
- </member>
- <member name="P:log4net.Appender.UdpAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.DefaultSyslogPort">
- <summary>
- Syslog port 514
- </summary>
- </member>
- <member name="M:log4net.Appender.RemoteSyslogAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.RemoteSyslogAppender"/> class.
- </summary>
- <remarks>
- This instance of the <see cref="T:log4net.Appender.RemoteSyslogAppender"/> class is set up to write
- to a remote syslog daemon.
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemoteSyslogAppender.AddMapping(log4net.Appender.RemoteSyslogAppender.LevelSeverity)">
- <summary>
- Add a mapping of level to severity
- </summary>
- <param name="mapping">The mapping to add</param>
- <remarks>
- <para>
- Add a <see cref="T:log4net.Appender.RemoteSyslogAppender.LevelSeverity"/> mapping to this appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemoteSyslogAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- This method is called by the <see cref="M:log4net.Appender.AppenderSkeleton.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the event to a remote syslog daemon.
- </para>
- <para>
- The format of the output will depend on the appender's layout.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemoteSyslogAppender.ActivateOptions">
- <summary>
- Initialize the options for this appender
- </summary>
- <remarks>
- <para>
- Initialize the level to syslog severity mappings set on this appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemoteSyslogAppender.GetSeverity(log4net.Core.Level)">
- <summary>
- Translates a log4net level to a syslog severity.
- </summary>
- <param name="level">A log4net level.</param>
- <returns>A syslog severity.</returns>
- <remarks>
- <para>
- Translates a log4net level to a syslog severity.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemoteSyslogAppender.GeneratePriority(log4net.Appender.RemoteSyslogAppender.SyslogFacility,log4net.Appender.RemoteSyslogAppender.SyslogSeverity)">
- <summary>
- Generate a syslog priority.
- </summary>
- <param name="facility">The syslog facility.</param>
- <param name="severity">The syslog severity.</param>
- <returns>A syslog priority.</returns>
- <remarks>
- <para>
- Generate a syslog priority.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.m_facility">
- <summary>
- The facility. The default facility is <see cref="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.User"/>.
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.m_identity">
- <summary>
- The message identity
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.m_levelMapping">
- <summary>
- Mapping from level object to syslog severity
- </summary>
- </member>
- <member name="P:log4net.Appender.RemoteSyslogAppender.Identity">
- <summary>
- Message identity
- </summary>
- <remarks>
- <para>
- An identifier is specified with each log message. This can be specified
- by setting the <see cref="P:log4net.Appender.RemoteSyslogAppender.Identity"/> property. The identity (also know
- as the tag) must not contain white space. The default value for the
- identity is the application name (from <see cref="P:log4net.Core.LoggingEvent.Domain"/>).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RemoteSyslogAppender.Facility">
- <summary>
- Syslog facility
- </summary>
- <remarks>
- Set to one of the <see cref="T:log4net.Appender.RemoteSyslogAppender.SyslogFacility"/> values. The list of
- facilities is predefined and cannot be extended. The default value
- is <see cref="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.User"/>.
- </remarks>
- </member>
- <member name="T:log4net.Appender.RemoteSyslogAppender.SyslogSeverity">
- <summary>
- syslog severities
- </summary>
- <remarks>
- <para>
- The syslog severities.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Emergency">
- <summary>
- system is unusable
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Alert">
- <summary>
- action must be taken immediately
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Critical">
- <summary>
- critical conditions
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Error">
- <summary>
- error conditions
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Warning">
- <summary>
- warning conditions
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Notice">
- <summary>
- normal but significant condition
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Informational">
- <summary>
- informational
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogSeverity.Debug">
- <summary>
- debug-level messages
- </summary>
- </member>
- <member name="T:log4net.Appender.RemoteSyslogAppender.SyslogFacility">
- <summary>
- syslog facilities
- </summary>
- <remarks>
- <para>
- The syslog facilities
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Kernel">
- <summary>
- kernel messages
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.User">
- <summary>
- random user-level messages
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Mail">
- <summary>
- mail system
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Daemons">
- <summary>
- system daemons
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Authorization">
- <summary>
- security/authorization messages
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Syslog">
- <summary>
- messages generated internally by syslogd
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Printer">
- <summary>
- line printer subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.News">
- <summary>
- network news subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Uucp">
- <summary>
- UUCP subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Clock">
- <summary>
- clock (cron/at) daemon
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Authorization2">
- <summary>
- security/authorization messages (private)
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Ftp">
- <summary>
- ftp daemon
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Ntp">
- <summary>
- NTP subsystem
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Audit">
- <summary>
- log audit
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Alert">
- <summary>
- log alert
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Clock2">
- <summary>
- clock daemon
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local0">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local1">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local2">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local3">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local4">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local5">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local6">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="F:log4net.Appender.RemoteSyslogAppender.SyslogFacility.Local7">
- <summary>
- reserved for local use
- </summary>
- </member>
- <member name="T:log4net.Appender.RemoteSyslogAppender.LevelSeverity">
- <summary>
- A class to act as a mapping between the level that a logging call is made at and
- the syslog severity that is should be logged at.
- </summary>
- <remarks>
- <para>
- A class to act as a mapping between the level that a logging call is made at and
- the syslog severity that is should be logged at.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RemoteSyslogAppender.LevelSeverity.Severity">
- <summary>
- The mapped syslog severity for the specified level
- </summary>
- <remarks>
- <para>
- Required property.
- The mapped syslog severity for the specified level
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.RemotingAppender">
- <summary>
- Delivers logging events to a remote logging sink.
- </summary>
- <remarks>
- <para>
- This Appender is designed to deliver events to a remote sink.
- That is any object that implements the <see cref="T:log4net.Appender.RemotingAppender.IRemoteLoggingSink"/>
- interface. It delivers the events using .NET remoting. The
- object to deliver events to is specified by setting the
- appenders <see cref="P:log4net.Appender.RemotingAppender.Sink"/> property.</para>
- <para>
- The RemotingAppender buffers events before sending them. This allows it to
- make more efficient use of the remoting infrastructure.</para>
- <para>
- Once the buffer is full the events are still not sent immediately.
- They are scheduled to be sent using a pool thread. The effect is that
- the send occurs asynchronously. This is very important for a
- number of non obvious reasons. The remoting infrastructure will
- flow thread local variables (stored in the <see cref="T:System.Runtime.Remoting.Messaging.CallContext"/>),
- if they are marked as <see cref="T:System.Runtime.Remoting.Messaging.ILogicalThreadAffinative"/>, across the
- remoting boundary. If the server is not contactable then
- the remoting infrastructure will clear the <see cref="T:System.Runtime.Remoting.Messaging.ILogicalThreadAffinative"/>
- objects from the <see cref="T:System.Runtime.Remoting.Messaging.CallContext"/>. To prevent a logging failure from
- having side effects on the calling application the remoting call must be made
- from a separate thread to the one used by the application. A <see cref="T:System.Threading.ThreadPool"/>
- thread is used for this. If no <see cref="T:System.Threading.ThreadPool"/> thread is available then
- the events will block in the thread pool manager until a thread is available.</para>
- <para>
- Because the events are sent asynchronously using pool threads it is possible to close
- this appender before all the queued events have been sent.
- When closing the appender attempts to wait until all the queued events have been sent, but
- this will timeout after 30 seconds regardless.</para>
- <para>
- If this appender is being closed because the <see cref="E:System.AppDomain.ProcessExit"/>
- event has fired it may not be possible to send all the queued events. During process
- exit the runtime limits the time that a <see cref="E:System.AppDomain.ProcessExit"/>
- event handler is allowed to run for. If the runtime terminates the threads before
- the queued events have been sent then they will be lost. To ensure that all events
- are sent the appender must be closed before the application exits. See
- <see cref="M:log4net.Core.LoggerManager.Shutdown"/> for details on how to shutdown
- log4net programmatically.</para>
- </remarks>
- <seealso cref="T:log4net.Appender.RemotingAppender.IRemoteLoggingSink"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Daniel Cazzulino</author>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.RemotingAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.RemotingAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.RemotingAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.RemotingAppender.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.SendBuffer(log4net.Core.LoggingEvent[])">
- <summary>
- Send the contents of the buffer to the remote sink.
- </summary>
- <remarks>
- The events are not sent immediately. They are scheduled to be sent
- using a pool thread. The effect is that the send occurs asynchronously.
- This is very important for a number of non obvious reasons. The remoting
- infrastructure will flow thread local variables (stored in the <see cref="T:System.Runtime.Remoting.Messaging.CallContext"/>),
- if they are marked as <see cref="T:System.Runtime.Remoting.Messaging.ILogicalThreadAffinative"/>, across the
- remoting boundary. If the server is not contactable then
- the remoting infrastructure will clear the <see cref="T:System.Runtime.Remoting.Messaging.ILogicalThreadAffinative"/>
- objects from the <see cref="T:System.Runtime.Remoting.Messaging.CallContext"/>. To prevent a logging failure from
- having side effects on the calling application the remoting call must be made
- from a separate thread to the one used by the application. A <see cref="T:System.Threading.ThreadPool"/>
- thread is used for this. If no <see cref="T:System.Threading.ThreadPool"/> thread is available then
- the events will block in the thread pool manager until a thread is available.
- </remarks>
- <param name="events">The events to send.</param>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.OnClose">
- <summary>
- Override base class close.
- </summary>
- <remarks>
- <para>
- This method waits while there are queued work items. The events are
- sent asynchronously using <see cref="T:System.Threading.ThreadPool"/> work items. These items
- will be sent once a thread pool thread is available to send them, therefore
- it is possible to close the appender before all the queued events have been
- sent.</para>
- <para>
- This method attempts to wait until all the queued events have been sent, but this
- method will timeout after 30 seconds regardless.</para>
- <para>
- If the appender is being closed because the <see cref="E:System.AppDomain.ProcessExit"/>
- event has fired it may not be possible to send all the queued events. During process
- exit the runtime limits the time that a <see cref="E:System.AppDomain.ProcessExit"/>
- event handler is allowed to run for.</para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.BeginAsyncSend">
- <summary>
- A work item is being queued into the thread pool
- </summary>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.EndAsyncSend">
- <summary>
- A work item from the thread pool has completed
- </summary>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.SendBufferCallback(System.Object)">
- <summary>
- Send the contents of the buffer to the remote sink.
- </summary>
- <remarks>
- This method is designed to be used with the <see cref="T:System.Threading.ThreadPool"/>.
- This method expects to be passed an array of <see cref="T:log4net.Core.LoggingEvent"/>
- objects in the state param.
- </remarks>
- <param name="state">the logging events to send</param>
- </member>
- <member name="F:log4net.Appender.RemotingAppender.m_sinkUrl">
- <summary>
- The URL of the remote sink.
- </summary>
- </member>
- <member name="F:log4net.Appender.RemotingAppender.m_sinkObj">
- <summary>
- The local proxy (.NET remoting) for the remote logging sink.
- </summary>
- </member>
- <member name="F:log4net.Appender.RemotingAppender.m_queuedCallbackCount">
- <summary>
- The number of queued callbacks currently waiting or executing
- </summary>
- </member>
- <member name="F:log4net.Appender.RemotingAppender.m_workQueueEmptyEvent">
- <summary>
- Event used to signal when there are no queued work items
- </summary>
- <remarks>
- This event is set when there are no queued work items. In this
- state it is safe to close the appender.
- </remarks>
- </member>
- <member name="P:log4net.Appender.RemotingAppender.Sink">
- <summary>
- Gets or sets the URL of the well-known object that will accept
- the logging events.
- </summary>
- <value>
- The well-known URL of the remote sink.
- </value>
- <remarks>
- <para>
- The URL of the remoting sink that will accept logging events.
- The sink must implement the <see cref="T:log4net.Appender.RemotingAppender.IRemoteLoggingSink"/>
- interface.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.RemotingAppender.IRemoteLoggingSink">
- <summary>
- Interface used to deliver <see cref="T:log4net.Core.LoggingEvent"/> objects to a remote sink.
- </summary>
- <remarks>
- This interface must be implemented by a remoting sink
- if the <see cref="T:log4net.Appender.RemotingAppender"/> is to be used
- to deliver logging events to the sink.
- </remarks>
- </member>
- <member name="M:log4net.Appender.RemotingAppender.IRemoteLoggingSink.LogEvents(log4net.Core.LoggingEvent[])">
- <summary>
- Delivers logging events to the remote sink
- </summary>
- <param name="events">Array of events to log.</param>
- <remarks>
- <para>
- Delivers logging events to the remote sink
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.RollingFileAppender">
- <summary>
- Appender that rolls log files based on size or date or both.
- </summary>
- <remarks>
- <para>
- RollingFileAppender can roll log files based on size or date or both
- depending on the setting of the <see cref="P:log4net.Appender.RollingFileAppender.RollingStyle"/> property.
- When set to <see cref="F:log4net.Appender.RollingFileAppender.RollingMode.Size"/> the log file will be rolled
- once its size exceeds the <see cref="P:log4net.Appender.RollingFileAppender.MaximumFileSize"/>.
- When set to <see cref="F:log4net.Appender.RollingFileAppender.RollingMode.Date"/> the log file will be rolled
- once the date boundary specified in the <see cref="P:log4net.Appender.RollingFileAppender.DatePattern"/> property
- is crossed.
- When set to <see cref="F:log4net.Appender.RollingFileAppender.RollingMode.Composite"/> the log file will be
- rolled once the date boundary specified in the <see cref="P:log4net.Appender.RollingFileAppender.DatePattern"/> property
- is crossed, but within a date boundary the file will also be rolled
- once its size exceeds the <see cref="P:log4net.Appender.RollingFileAppender.MaximumFileSize"/>.
- When set to <see cref="F:log4net.Appender.RollingFileAppender.RollingMode.Once"/> the log file will be rolled when
- the appender is configured. This effectively means that the log file can be
- rolled once per program execution.
- </para>
- <para>
- A of few additional optional features have been added:
- <list type="bullet">
- <item>Attach date pattern for current log file <see cref="P:log4net.Appender.RollingFileAppender.StaticLogFileName"/></item>
- <item>Backup number increments for newer files <see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/></item>
- <item>Infinite number of backups by file size <see cref="P:log4net.Appender.RollingFileAppender.MaxSizeRollBackups"/></item>
- </list>
- </para>
-
- <note>
- <para>
- For large or infinite numbers of backup files a <see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/>
- greater than zero is highly recommended, otherwise all the backup files need
- to be renamed each time a new backup is created.
- </para>
- <para>
- When Date/Time based rolling is used setting <see cref="P:log4net.Appender.RollingFileAppender.StaticLogFileName"/>
- to <see langword="true"/> will reduce the number of file renamings to few or none.
- </para>
- </note>
-
- <note type="caution">
- <para>
- Changing <see cref="P:log4net.Appender.RollingFileAppender.StaticLogFileName"/> or <see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/> without clearing
- the log file directory of backup files will cause unexpected and unwanted side effects.
- </para>
- </note>
-
- <para>
- If Date/Time based rolling is enabled this appender will attempt to roll existing files
- in the directory without a Date/Time tag based on the last write date of the base log file.
- The appender only rolls the log file when a message is logged. If Date/Time based rolling
- is enabled then the appender will not roll the log file at the Date/Time boundary but
- at the point when the next message is logged after the boundary has been crossed.
- </para>
-
- <para>
- The <see cref="T:log4net.Appender.RollingFileAppender"/> extends the <see cref="T:log4net.Appender.FileAppender"/> and
- has the same behavior when opening the log file.
- The appender will first try to open the file for writing when <see cref="M:log4net.Appender.RollingFileAppender.ActivateOptions"/>
- is called. This will typically be during configuration.
- If the file cannot be opened for writing the appender will attempt
- to open the file again each time a message is logged to the appender.
- If the file cannot be opened for writing when a message is logged then
- the message will be discarded by this appender.
- </para>
- <para>
- When rolling a backup file necessitates deleting an older backup file the
- file to be deleted is moved to a temporary name before being deleted.
- </para>
-
- <note type="caution">
- <para>
- A maximum number of backup files when rolling on date/time boundaries is not supported.
- </para>
- </note>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Aspi Havewala</author>
- <author>Douglas de la Torre</author>
- <author>Edward Smit</author>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.RollingFileAppender"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.SetQWForFiles(System.IO.TextWriter)">
- <summary>
- Sets the quiet writer being used.
- </summary>
- <remarks>
- This method can be overridden by sub classes.
- </remarks>
- <param name="writer">the writer to set</param>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Write out a logging event.
- </summary>
- <param name="loggingEvent">the event to write to file.</param>
- <remarks>
- <para>
- Handles append time behavior for RollingFileAppender. This checks
- if a roll over either by date (checked first) or time (checked second)
- is need and then appends to the file last.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.Append(log4net.Core.LoggingEvent[])">
- <summary>
- Write out an array of logging events.
- </summary>
- <param name="loggingEvents">the events to write to file.</param>
- <remarks>
- <para>
- Handles append time behavior for RollingFileAppender. This checks
- if a roll over either by date (checked first) or time (checked second)
- is need and then appends to the file last.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.AdjustFileBeforeAppend">
- <summary>
- Performs any required rolling before outputting the next event
- </summary>
- <remarks>
- <para>
- Handles append time behavior for RollingFileAppender. This checks
- if a roll over either by date (checked first) or time (checked second)
- is need and then appends to the file last.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.OpenFile(System.String,System.Boolean)">
- <summary>
- Creates and opens the file for logging. If <see cref="P:log4net.Appender.RollingFileAppender.StaticLogFileName"/>
- is false then the fully qualified name is determined and used.
- </summary>
- <param name="fileName">the name of the file to open</param>
- <param name="append">true to append to existing file</param>
- <remarks>
- <para>This method will ensure that the directory structure
- for the <paramref name="fileName"/> specified exists.</para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.GetNextOutputFileName(System.String)">
- <summary>
- Get the current output file name
- </summary>
- <param name="fileName">the base file name</param>
- <returns>the output file name</returns>
- <remarks>
- The output file name is based on the base fileName specified.
- If <see cref="P:log4net.Appender.RollingFileAppender.StaticLogFileName"/> is set then the output
- file name is the same as the base file passed in. Otherwise
- the output file depends on the date pattern, on the count
- direction or both.
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.DetermineCurSizeRollBackups">
- <summary>
- Determines curSizeRollBackups (only within the current roll point)
- </summary>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.GetWildcardPatternForFile(System.String)">
- <summary>
- Generates a wildcard pattern that can be used to find all files
- that are similar to the base file name.
- </summary>
- <param name="baseFileName"></param>
- <returns></returns>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.GetExistingFiles(System.String)">
- <summary>
- Builds a list of filenames for all files matching the base filename plus a file
- pattern.
- </summary>
- <param name="baseFilePath"></param>
- <returns></returns>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.RollOverIfDateBoundaryCrossing">
- <summary>
- Initiates a roll over if needed for crossing a date boundary since the last run.
- </summary>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.ExistingInit">
- <summary>
- Initializes based on existing conditions at time of <see cref="M:log4net.Appender.RollingFileAppender.ActivateOptions"/>.
- </summary>
- <remarks>
- <para>
- Initializes based on existing conditions at time of <see cref="M:log4net.Appender.RollingFileAppender.ActivateOptions"/>.
- The following is done
- <list type="bullet">
- <item>determine curSizeRollBackups (only within the current roll point)</item>
- <item>initiates a roll over if needed for crossing a date boundary since the last run.</item>
- </list>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.InitializeFromOneFile(System.String,System.String)">
- <summary>
- Does the work of bumping the 'current' file counter higher
- to the highest count when an incremental file name is seen.
- The highest count is either the first file (when count direction
- is greater than 0) or the last file (when count direction less than 0).
- In either case, we want to know the highest count that is present.
- </summary>
- <param name="baseFile"></param>
- <param name="curFileName"></param>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.InitializeRollBackups(System.String,System.Collections.ArrayList)">
- <summary>
- Takes a list of files and a base file name, and looks for
- 'incremented' versions of the base file. Bumps the max
- count up to the highest count seen.
- </summary>
- <param name="baseFile"></param>
- <param name="arrayFiles"></param>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.ComputeCheckPeriod(System.String)">
- <summary>
- Calculates the RollPoint for the datePattern supplied.
- </summary>
- <param name="datePattern">the date pattern to calculate the check period for</param>
- <returns>The RollPoint that is most accurate for the date pattern supplied</returns>
- <remarks>
- Essentially the date pattern is examined to determine what the
- most suitable roll point is. The roll point chosen is the roll point
- with the smallest period that can be detected using the date pattern
- supplied. i.e. if the date pattern only outputs the year, month, day
- and hour then the smallest roll point that can be detected would be
- and hourly roll point as minutes could not be detected.
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.RollingFileAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.RollingFileAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.RollingFileAppender.ActivateOptions"/> must be called again.
- </para>
- <para>
- Sets initial conditions including date/time roll over information, first check,
- scheduledFilename, and calls <see cref="M:log4net.Appender.RollingFileAppender.ExistingInit"/> to initialize
- the current number of backups.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.RollOverTime(System.Boolean)">
- <summary>
- Rollover the file(s) to date/time tagged file(s).
- </summary>
- <param name="fileIsOpen">set to true if the file to be rolled is currently open</param>
- <remarks>
- <para>
- Rollover the file(s) to date/time tagged file(s).
- Resets curSizeRollBackups.
- If fileIsOpen is set then the new file is opened (through SafeOpenFile).
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.RollFile(System.String,System.String)">
- <summary>
- Renames file <paramref name="fromFile"/> to file <paramref name="toFile"/>.
- </summary>
- <param name="fromFile">Name of existing file to roll.</param>
- <param name="toFile">New name for file.</param>
- <remarks>
- <para>
- Renames file <paramref name="fromFile"/> to file <paramref name="toFile"/>. It
- also checks for existence of target file and deletes if it does.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.FileExists(System.String)">
- <summary>
- Test if a file exists at a specified path
- </summary>
- <param name="path">the path to the file</param>
- <returns>true if the file exists</returns>
- <remarks>
- <para>
- Test if a file exists at a specified path
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.DeleteFile(System.String)">
- <summary>
- Deletes the specified file if it exists.
- </summary>
- <param name="fileName">The file to delete.</param>
- <remarks>
- <para>
- Delete a file if is exists.
- The file is first moved to a new filename then deleted.
- This allows the file to be removed even when it cannot
- be deleted, but it still can be moved.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.RollOverSize">
- <summary>
- Implements file roll base on file size.
- </summary>
- <remarks>
- <para>
- If the maximum number of size based backups is reached
- (<c>curSizeRollBackups == maxSizeRollBackups</c>) then the oldest
- file is deleted -- its index determined by the sign of countDirection.
- If <c>countDirection</c> &lt; 0, then files
- {<c>File.1</c>, ..., <c>File.curSizeRollBackups -1</c>}
- are renamed to {<c>File.2</c>, ...,
- <c>File.curSizeRollBackups</c>}. Moreover, <c>File</c> is
- renamed <c>File.1</c> and closed.
- </para>
- <para>
- A new file is created to receive further log output.
- </para>
- <para>
- If <c>maxSizeRollBackups</c> is equal to zero, then the
- <c>File</c> is truncated with no backup files created.
- </para>
- <para>
- If <c>maxSizeRollBackups</c> &lt; 0, then <c>File</c> is
- renamed if needed and no files are deleted.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.RollOverRenameFiles(System.String)">
- <summary>
- Implements file roll.
- </summary>
- <param name="baseFileName">the base name to rename</param>
- <remarks>
- <para>
- If the maximum number of size based backups is reached
- (<c>curSizeRollBackups == maxSizeRollBackups</c>) then the oldest
- file is deleted -- its index determined by the sign of countDirection.
- If <c>countDirection</c> &lt; 0, then files
- {<c>File.1</c>, ..., <c>File.curSizeRollBackups -1</c>}
- are renamed to {<c>File.2</c>, ...,
- <c>File.curSizeRollBackups</c>}.
- </para>
- <para>
- If <c>maxSizeRollBackups</c> is equal to zero, then the
- <c>File</c> is truncated with no backup files created.
- </para>
- <para>
- If <c>maxSizeRollBackups</c> &lt; 0, then <c>File</c> is
- renamed if needed and no files are deleted.
- </para>
- <para>
- This is called by <see cref="M:log4net.Appender.RollingFileAppender.RollOverSize"/> to rename the files.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.RollingFileAppender.NextCheckDate(System.DateTime,log4net.Appender.RollingFileAppender.RollPoint)">
- <summary>
- Get the start time of the next window for the current rollpoint
- </summary>
- <param name="currentDateTime">the current date</param>
- <param name="rollPoint">the type of roll point we are working with</param>
- <returns>the start time for the next roll point an interval after the currentDateTime date</returns>
- <remarks>
- <para>
- Returns the date of the next roll point after the currentDateTime date passed to the method.
- </para>
- <para>
- The basic strategy is to subtract the time parts that are less significant
- than the rollpoint from the current time. This should roll the time back to
- the start of the time window for the current rollpoint. Then we add 1 window
- worth of time and get the start time of the next window for the rollpoint.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_dateTime">
- <summary>
- This object supplies the current date/time. Allows test code to plug in
- a method to control this class when testing date/time based rolling.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_datePattern">
- <summary>
- The date pattern. By default, the pattern is set to <c>".yyyy-MM-dd"</c>
- meaning daily rollover.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_scheduledFilename">
- <summary>
- The actual formatted filename that is currently being written to
- or will be the file transferred to on roll over
- (based on staticLogFileName).
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_nextCheck">
- <summary>
- The timestamp when we shall next recompute the filename.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_now">
- <summary>
- Holds date of last roll over
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_rollPoint">
- <summary>
- The type of rolling done
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_maxFileSize">
- <summary>
- The default maximum file size is 10MB
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_maxSizeRollBackups">
- <summary>
- There is zero backup files by default
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_curSizeRollBackups">
- <summary>
- How many sized based backups have been made so far
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_countDirection">
- <summary>
- The rolling file count direction.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_rollingStyle">
- <summary>
- The rolling mode used in this appender.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_rollDate">
- <summary>
- Cache flag set if we are rolling by date.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_rollSize">
- <summary>
- Cache flag set if we are rolling by size.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_staticLogFileName">
- <summary>
- Value indicating whether to always log to the same file.
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.m_baseFileName">
- <summary>
- FileName provided in configuration. Used for rolling properly
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.s_date1970">
- <summary>
- The 1st of January 1970 in UTC
- </summary>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.DatePattern">
- <summary>
- Gets or sets the date pattern to be used for generating file names
- when rolling over on date.
- </summary>
- <value>
- The date pattern to be used for generating file names when rolling
- over on date.
- </value>
- <remarks>
- <para>
- Takes a string in the same format as expected by
- <see cref="T:log4net.DateFormatter.SimpleDateFormatter"/>.
- </para>
- <para>
- This property determines the rollover schedule when rolling over
- on date.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.MaxSizeRollBackups">
- <summary>
- Gets or sets the maximum number of backup files that are kept before
- the oldest is erased.
- </summary>
- <value>
- The maximum number of backup files that are kept before the oldest is
- erased.
- </value>
- <remarks>
- <para>
- If set to zero, then there will be no backup files and the log file
- will be truncated when it reaches <see cref="P:log4net.Appender.RollingFileAppender.MaxFileSize"/>.
- </para>
- <para>
- If a negative number is supplied then no deletions will be made. Note
- that this could result in very slow performance as a large number of
- files are rolled over unless <see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/> is used.
- </para>
- <para>
- The maximum applies to <b>each</b> time based group of files and
- <b>not</b> the total.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.MaxFileSize">
- <summary>
- Gets or sets the maximum size that the output file is allowed to reach
- before being rolled over to backup files.
- </summary>
- <value>
- The maximum size in bytes that the output file is allowed to reach before being
- rolled over to backup files.
- </value>
- <remarks>
- <para>
- This property is equivalent to <see cref="P:log4net.Appender.RollingFileAppender.MaximumFileSize"/> except
- that it is required for differentiating the setter taking a
- <see cref="T:System.Int64"/> argument from the setter taking a <see cref="T:System.String"/>
- argument.
- </para>
- <para>
- The default maximum file size is 10MB (10*1024*1024).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.MaximumFileSize">
- <summary>
- Gets or sets the maximum size that the output file is allowed to reach
- before being rolled over to backup files.
- </summary>
- <value>
- The maximum size that the output file is allowed to reach before being
- rolled over to backup files.
- </value>
- <remarks>
- <para>
- This property allows you to specify the maximum size with the
- suffixes "KB", "MB" or "GB" so that the size is interpreted being
- expressed respectively in kilobytes, megabytes or gigabytes.
- </para>
- <para>
- For example, the value "10KB" will be interpreted as 10240 bytes.
- </para>
- <para>
- The default maximum file size is 10MB.
- </para>
- <para>
- If you have the option to set the maximum file size programmatically
- consider using the <see cref="P:log4net.Appender.RollingFileAppender.MaxFileSize"/> property instead as this
- allows you to set the size in bytes as a <see cref="T:System.Int64"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.CountDirection">
- <summary>
- Gets or sets the rolling file count direction.
- </summary>
- <value>
- The rolling file count direction.
- </value>
- <remarks>
- <para>
- Indicates if the current file is the lowest numbered file or the
- highest numbered file.
- </para>
- <para>
- By default newer files have lower numbers (<see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/> &lt; 0),
- i.e. log.1 is most recent, log.5 is the 5th backup, etc...
- </para>
- <para>
- <see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/> &gt;= 0 does the opposite i.e.
- log.1 is the first backup made, log.5 is the 5th backup made, etc.
- For infinite backups use <see cref="P:log4net.Appender.RollingFileAppender.CountDirection"/> &gt;= 0 to reduce
- rollover costs.
- </para>
- <para>The default file count direction is -1.</para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.RollingStyle">
- <summary>
- Gets or sets the rolling style.
- </summary>
- <value>The rolling style.</value>
- <remarks>
- <para>
- The default rolling style is <see cref="F:log4net.Appender.RollingFileAppender.RollingMode.Composite"/>.
- </para>
- <para>
- When set to <see cref="F:log4net.Appender.RollingFileAppender.RollingMode.Once"/> this appender's
- <see cref="P:log4net.Appender.FileAppender.AppendToFile"/> property is set to <c>false</c>, otherwise
- the appender would append to a single file rather than rolling
- the file each time it is opened.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.StaticLogFileName">
- <summary>
- Gets or sets a value indicating whether to always log to
- the same file.
- </summary>
- <value>
- <c>true</c> if always should be logged to the same file, otherwise <c>false</c>.
- </value>
- <remarks>
- <para>
- By default file.log is always the current file. Optionally
- file.log.yyyy-mm-dd for current formatted datePattern can by the currently
- logging file (or file.log.curSizeRollBackup or even
- file.log.yyyy-mm-dd.curSizeRollBackup).
- </para>
- <para>
- This will make time based rollovers with a large number of backups
- much faster as the appender it won't have to rename all the backups!
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.RollingFileAppender.RollingMode">
- <summary>
- Style of rolling to use
- </summary>
- <remarks>
- <para>
- Style of rolling to use
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollingMode.Once">
- <summary>
- Roll files once per program execution
- </summary>
- <remarks>
- <para>
- Roll files once per program execution.
- Well really once each time this appender is
- configured.
- </para>
- <para>
- Setting this option also sets <c>AppendToFile</c> to
- <c>false</c> on the <c>RollingFileAppender</c>, otherwise
- this appender would just be a normal file appender.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollingMode.Size">
- <summary>
- Roll files based only on the size of the file
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollingMode.Date">
- <summary>
- Roll files based only on the date
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollingMode.Composite">
- <summary>
- Roll files based on both the size and date of the file
- </summary>
- </member>
- <member name="T:log4net.Appender.RollingFileAppender.RollPoint">
- <summary>
- The code assumes that the following 'time' constants are in a increasing sequence.
- </summary>
- <remarks>
- <para>
- The code assumes that the following 'time' constants are in a increasing sequence.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.InvalidRollPoint">
- <summary>
- Roll the log not based on the date
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.TopOfMinute">
- <summary>
- Roll the log for each minute
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.TopOfHour">
- <summary>
- Roll the log for each hour
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.HalfDay">
- <summary>
- Roll the log twice a day (midday and midnight)
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.TopOfDay">
- <summary>
- Roll the log each day (midnight)
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.TopOfWeek">
- <summary>
- Roll the log each week
- </summary>
- </member>
- <member name="F:log4net.Appender.RollingFileAppender.RollPoint.TopOfMonth">
- <summary>
- Roll the log each month
- </summary>
- </member>
- <member name="T:log4net.Appender.RollingFileAppender.IDateTime">
- <summary>
- This interface is used to supply Date/Time information to the <see cref="T:log4net.Appender.RollingFileAppender"/>.
- </summary>
- <remarks>
- This interface is used to supply Date/Time information to the <see cref="T:log4net.Appender.RollingFileAppender"/>.
- Used primarily to allow test classes to plug themselves in so they can
- supply test date/times.
- </remarks>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.IDateTime.Now">
- <summary>
- Gets the <i>current</i> time.
- </summary>
- <value>The <i>current</i> time.</value>
- <remarks>
- <para>
- Gets the <i>current</i> time.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.RollingFileAppender.DefaultDateTime">
- <summary>
- Default implementation of <see cref="T:log4net.Appender.RollingFileAppender.IDateTime"/> that returns the current time.
- </summary>
- </member>
- <member name="P:log4net.Appender.RollingFileAppender.DefaultDateTime.Now">
- <summary>
- Gets the <b>current</b> time.
- </summary>
- <value>The <b>current</b> time.</value>
- <remarks>
- <para>
- Gets the <b>current</b> time.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.SmtpAppender">
- <summary>
- Send an e-mail when a specific logging event occurs, typically on errors
- or fatal errors.
- </summary>
- <remarks>
- <para>
- The number of logging events delivered in this e-mail depend on
- the value of <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> option. The
- <see cref="T:log4net.Appender.SmtpAppender"/> keeps only the last
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> logging events in its
- cyclic buffer. This keeps memory requirements at a reasonable level while
- still delivering useful application context.
- </para>
- <note type="caution">
- Authentication and setting the server Port are only available on the MS .NET 1.1 runtime.
- For these features to be enabled you need to ensure that you are using a version of
- the log4net assembly that is built against the MS .NET 1.1 framework and that you are
- running the your application on the MS .NET 1.1 runtime. On all other platforms only sending
- unauthenticated messages to a server listening on port 25 (the default) is supported.
- </note>
- <para>
- Authentication is supported by setting the <see cref="P:log4net.Appender.SmtpAppender.Authentication"/> property to
- either <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic"/> or <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Ntlm"/>.
- If using <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic"/> authentication then the <see cref="P:log4net.Appender.SmtpAppender.Username"/>
- and <see cref="P:log4net.Appender.SmtpAppender.Password"/> properties must also be set.
- </para>
- <para>
- To set the SMTP server port use the <see cref="P:log4net.Appender.SmtpAppender.Port"/> property. The default port is 25.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.SmtpAppender.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.SmtpAppender.SendBuffer(log4net.Core.LoggingEvent[])">
- <summary>
- Sends the contents of the cyclic buffer as an e-mail message.
- </summary>
- <param name="events">The logging events to send.</param>
- </member>
- <member name="M:log4net.Appender.SmtpAppender.SendEmail(System.String)">
- <summary>
- Send the email message
- </summary>
- <param name="messageBody">the body text to include in the mail</param>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.To">
- <summary>
- Gets or sets a semicolon-delimited list of recipient e-mail addresses.
- </summary>
- <value>
- A semicolon-delimited list of e-mail addresses.
- </value>
- <remarks>
- <para>
- A semicolon-delimited list of recipient e-mail addresses.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.From">
- <summary>
- Gets or sets the e-mail address of the sender.
- </summary>
- <value>
- The e-mail address of the sender.
- </value>
- <remarks>
- <para>
- The e-mail address of the sender.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.Subject">
- <summary>
- Gets or sets the subject line of the e-mail message.
- </summary>
- <value>
- The subject line of the e-mail message.
- </value>
- <remarks>
- <para>
- The subject line of the e-mail message.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.SmtpHost">
- <summary>
- Gets or sets the name of the SMTP relay mail server to use to send
- the e-mail messages.
- </summary>
- <value>
- The name of the e-mail relay server. If SmtpServer is not set, the
- name of the local SMTP server is used.
- </value>
- <remarks>
- <para>
- The name of the e-mail relay server. If SmtpServer is not set, the
- name of the local SMTP server is used.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.LocationInfo">
- <summary>
- Obsolete
- </summary>
- <remarks>
- Use the BufferingAppenderSkeleton Fix methods instead
- </remarks>
- <remarks>
- <para>
- Obsolete property.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.Authentication">
- <summary>
- The mode to use to authentication with the SMTP server
- </summary>
- <remarks>
- <note type="caution">Authentication is only available on the MS .NET 1.1 runtime.</note>
- <para>
- Valid Authentication mode values are: <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.None"/>,
- <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic"/>, and <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Ntlm"/>.
- The default value is <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.None"/>. When using
- <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic"/> you must specify the <see cref="P:log4net.Appender.SmtpAppender.Username"/>
- and <see cref="P:log4net.Appender.SmtpAppender.Password"/> to use to authenticate.
- When using <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Ntlm"/> the Windows credentials for the current
- thread, if impersonating, or the process will be used to authenticate.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.Username">
- <summary>
- The username to use to authenticate with the SMTP server
- </summary>
- <remarks>
- <note type="caution">Authentication is only available on the MS .NET 1.1 runtime.</note>
- <para>
- A <see cref="P:log4net.Appender.SmtpAppender.Username"/> and <see cref="P:log4net.Appender.SmtpAppender.Password"/> must be specified when
- <see cref="P:log4net.Appender.SmtpAppender.Authentication"/> is set to <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic"/>,
- otherwise the username will be ignored.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.Password">
- <summary>
- The password to use to authenticate with the SMTP server
- </summary>
- <remarks>
- <note type="caution">Authentication is only available on the MS .NET 1.1 runtime.</note>
- <para>
- A <see cref="P:log4net.Appender.SmtpAppender.Username"/> and <see cref="P:log4net.Appender.SmtpAppender.Password"/> must be specified when
- <see cref="P:log4net.Appender.SmtpAppender.Authentication"/> is set to <see cref="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic"/>,
- otherwise the password will be ignored.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.Port">
- <summary>
- The port on which the SMTP server is listening
- </summary>
- <remarks>
- <note type="caution">Server Port is only available on the MS .NET 1.1 runtime.</note>
- <para>
- The port on which the SMTP server is listening. The default
- port is <c>25</c>. The Port can only be changed when running on
- the MS .NET 1.1 runtime.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.Priority">
- <summary>
- Gets or sets the priority of the e-mail message
- </summary>
- <value>
- One of the <see cref="T:System.Web.Mail.MailPriority"/> values.
- </value>
- <remarks>
- <para>
- Sets the priority of the e-mails generated by this
- appender. The default priority is <see cref="F:System.Web.Mail.MailPriority.Normal"/>.
- </para>
- <para>
- If you are using this appender to report errors then
- you may want to set the priority to <see cref="F:System.Web.Mail.MailPriority.High"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.SmtpAppender.SmtpAuthentication">
- <summary>
- Values for the <see cref="P:log4net.Appender.SmtpAppender.Authentication"/> property.
- </summary>
- <remarks>
- <para>
- SMTP authentication modes.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.SmtpAppender.SmtpAuthentication.None">
- <summary>
- No authentication
- </summary>
- </member>
- <member name="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Basic">
- <summary>
- Basic authentication.
- </summary>
- <remarks>
- Requires a username and password to be supplied
- </remarks>
- </member>
- <member name="F:log4net.Appender.SmtpAppender.SmtpAuthentication.Ntlm">
- <summary>
- Integrated authentication
- </summary>
- <remarks>
- Uses the Windows credentials from the current thread or process to authenticate.
- </remarks>
- </member>
- <member name="T:log4net.Appender.SmtpPickupDirAppender">
- <summary>
- Send an email when a specific logging event occurs, typically on errors
- or fatal errors. Rather than sending via smtp it writes a file into the
- directory specified by <see cref="P:log4net.Appender.SmtpPickupDirAppender.PickupDir"/>. This allows services such
- as the IIS SMTP agent to manage sending the messages.
- </summary>
- <remarks>
- <para>
- The configuration for this appender is identical to that of the <c>SMTPAppender</c>,
- except that instead of specifying the <c>SMTPAppender.SMTPHost</c> you specify
- <see cref="P:log4net.Appender.SmtpPickupDirAppender.PickupDir"/>.
- </para>
- <para>
- The number of logging events delivered in this e-mail depend on
- the value of <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> option. The
- <see cref="T:log4net.Appender.SmtpPickupDirAppender"/> keeps only the last
- <see cref="P:log4net.Appender.BufferingAppenderSkeleton.BufferSize"/> logging events in its
- cyclic buffer. This keeps memory requirements at a reasonable level while
- still delivering useful application context.
- </para>
- </remarks>
- <author>Niall Daley</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.SmtpPickupDirAppender.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.SmtpPickupDirAppender.SendBuffer(log4net.Core.LoggingEvent[])">
- <summary>
- Sends the contents of the cyclic buffer as an e-mail message.
- </summary>
- <param name="events">The logging events to send.</param>
- <remarks>
- <para>
- Sends the contents of the cyclic buffer as an e-mail message.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.SmtpPickupDirAppender.ActivateOptions">
- <summary>
- Activate the options on this appender.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.SmtpPickupDirAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.SmtpPickupDirAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.SmtpPickupDirAppender.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.SmtpPickupDirAppender.ConvertToFullPath(System.String)">
- <summary>
- Convert a path into a fully qualified path.
- </summary>
- <param name="path">The path to convert.</param>
- <returns>The fully qualified path.</returns>
- <remarks>
- <para>
- Converts the path specified to a fully
- qualified path. If the path is relative it is
- taken as relative from the application base
- directory.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.SmtpPickupDirAppender.m_securityContext">
- <summary>
- The security context to use for privileged calls
- </summary>
- </member>
- <member name="P:log4net.Appender.SmtpPickupDirAppender.To">
- <summary>
- Gets or sets a semicolon-delimited list of recipient e-mail addresses.
- </summary>
- <value>
- A semicolon-delimited list of e-mail addresses.
- </value>
- <remarks>
- <para>
- A semicolon-delimited list of e-mail addresses.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpPickupDirAppender.From">
- <summary>
- Gets or sets the e-mail address of the sender.
- </summary>
- <value>
- The e-mail address of the sender.
- </value>
- <remarks>
- <para>
- The e-mail address of the sender.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpPickupDirAppender.Subject">
- <summary>
- Gets or sets the subject line of the e-mail message.
- </summary>
- <value>
- The subject line of the e-mail message.
- </value>
- <remarks>
- <para>
- The subject line of the e-mail message.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpPickupDirAppender.PickupDir">
- <summary>
- Gets or sets the path to write the messages to.
- </summary>
- <remarks>
- <para>
- Gets or sets the path to write the messages to. This should be the same
- as that used by the agent sending the messages.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpPickupDirAppender.SecurityContext">
- <summary>
- Gets or sets the <see cref="P:log4net.Appender.SmtpPickupDirAppender.SecurityContext"/> used to write to the pickup directory.
- </summary>
- <value>
- The <see cref="P:log4net.Appender.SmtpPickupDirAppender.SecurityContext"/> used to write to the pickup directory.
- </value>
- <remarks>
- <para>
- Unless a <see cref="P:log4net.Appender.SmtpPickupDirAppender.SecurityContext"/> specified here for this appender
- the <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> is queried for the
- security context to use. The default behavior is to use the security context
- of the current thread.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.SmtpPickupDirAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.TelnetAppender">
- <summary>
- Appender that allows clients to connect via Telnet to receive log messages
- </summary>
- <remarks>
- <para>
- The TelnetAppender accepts socket connections and streams logging messages
- back to the client.
- The output is provided in a telnet-friendly way so that a log can be monitored
- over a TCP/IP socket.
- This allows simple remote monitoring of application logging.
- </para>
- <para>
- The default <see cref="P:log4net.Appender.TelnetAppender.Port"/> is 23 (the telnet port).
- </para>
- </remarks>
- <author>Keith Long</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.OnClose">
- <summary>
- Overrides the parent method to close the socket handler
- </summary>
- <remarks>
- <para>
- Closes all the outstanding connections.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.ActivateOptions">
- <summary>
- Initialize the appender based on the options set.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Appender.TelnetAppender.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Appender.TelnetAppender.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Appender.TelnetAppender.ActivateOptions"/> must be called again.
- </para>
- <para>
- Create the socket handler and wait for connections
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Writes the logging event to each connected client.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the logging event to each connected client.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TelnetAppender.Port">
- <summary>
- Gets or sets the TCP port number on which this <see cref="T:log4net.Appender.TelnetAppender"/> will listen for connections.
- </summary>
- <value>
- An integer value in the range <see cref="F:System.Net.IPEndPoint.MinPort"/> to <see cref="F:System.Net.IPEndPoint.MaxPort"/>
- indicating the TCP port number on which this <see cref="T:log4net.Appender.TelnetAppender"/> will listen for connections.
- </value>
- <remarks>
- <para>
- The default value is 23 (the telnet port).
- </para>
- </remarks>
- <exception cref="T:System.ArgumentOutOfRangeException">The value specified is less than <see cref="F:System.Net.IPEndPoint.MinPort"/>
- or greater than <see cref="F:System.Net.IPEndPoint.MaxPort"/>.</exception>
- </member>
- <member name="P:log4net.Appender.TelnetAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.TelnetAppender.SocketHandler">
- <summary>
- Helper class to manage connected clients
- </summary>
- <remarks>
- <para>
- The SocketHandler class is used to accept connections from
- clients. It is threaded so that clients can connect/disconnect
- asynchronously.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.#ctor(System.Int32)">
- <summary>
- Opens a new server port on <paramref ref="port"/>
- </summary>
- <param name="port">the local port to listen on for connections</param>
- <remarks>
- <para>
- Creates a socket handler on the specified local server port.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.Send(System.String)">
- <summary>
- Sends a string message to each of the connected clients
- </summary>
- <param name="message">the text to send</param>
- <remarks>
- <para>
- Sends a string message to each of the connected clients
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.AddClient(log4net.Appender.TelnetAppender.SocketHandler.SocketClient)">
- <summary>
- Add a client to the internal clients list
- </summary>
- <param name="client">client to add</param>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.RemoveClient(log4net.Appender.TelnetAppender.SocketHandler.SocketClient)">
- <summary>
- Remove a client from the internal clients list
- </summary>
- <param name="client">client to remove</param>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.OnConnect(System.IAsyncResult)">
- <summary>
- Callback used to accept a connection on the server socket
- </summary>
- <param name="asyncResult">The result of the asynchronous operation</param>
- <remarks>
- <para>
- On connection adds to the list of connections
- if there are two many open connections you will be disconnected
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.Dispose">
- <summary>
- Close all network connections
- </summary>
- <remarks>
- <para>
- Make sure we close all network connections
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TelnetAppender.SocketHandler.HasConnections">
- <summary>
- Test if this handler has active connections
- </summary>
- <value>
- <c>true</c> if this handler has active connections
- </value>
- <remarks>
- <para>
- This property will be <c>true</c> while this handler has
- active connections, that is at least one connection that
- the handler will attempt to send a message to.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.TelnetAppender.SocketHandler.SocketClient">
- <summary>
- Class that represents a client connected to this handler
- </summary>
- <remarks>
- <para>
- Class that represents a client connected to this handler
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.SocketClient.#ctor(System.Net.Sockets.Socket)">
- <summary>
- Create this <see cref="T:log4net.Appender.TelnetAppender.SocketHandler.SocketClient"/> for the specified <see cref="T:System.Net.Sockets.Socket"/>
- </summary>
- <param name="socket">the client's socket</param>
- <remarks>
- <para>
- Opens a stream writer on the socket.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.SocketClient.Send(System.String)">
- <summary>
- Write a string to the client
- </summary>
- <param name="message">string to send</param>
- <remarks>
- <para>
- Write a string to the client
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TelnetAppender.SocketHandler.SocketClient.Dispose">
- <summary>
- Cleanup the clients connection
- </summary>
- <remarks>
- <para>
- Close the socket connection.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Appender.TraceAppender">
- <summary>
- Appends log events to the <see cref="T:System.Diagnostics.Trace"/> system.
- </summary>
- <remarks>
- <para>
- The application configuration file can be used to control what listeners
- are actually used. See the MSDN documentation for the
- <see cref="T:System.Diagnostics.Trace"/> class for details on configuring the
- trace system.
- </para>
- <para>
- Events are written using the <c>System.Diagnostics.Trace.Write(string,string)</c>
- method. The event's logger name is passed as the value for the category name to the Write method.
- </para>
- <para>
- <b>Compact Framework</b><br/>
- The Compact Framework does not support the <see cref="T:System.Diagnostics.Trace"/>
- class for any operation except <c>Assert</c>. When using the Compact Framework this
- appender will write to the <see cref="T:System.Diagnostics.Debug"/> system rather than
- the Trace system. This appender will therefore behave like the <see cref="T:log4net.Appender.DebugAppender"/>.
- </para>
- </remarks>
- <author>Douglas de la Torre</author>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Appender.TraceAppender.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.TraceAppender"/>.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TraceAppender.#ctor(log4net.Layout.ILayout)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Appender.TraceAppender"/>
- with a specified layout.
- </summary>
- <param name="layout">The layout to use with this appender.</param>
- <remarks>
- <para>
- Obsolete constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Appender.TraceAppender.Append(log4net.Core.LoggingEvent)">
- <summary>
- Writes the logging event to the <see cref="T:System.Diagnostics.Trace"/> system.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Writes the logging event to the <see cref="T:System.Diagnostics.Trace"/> system.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Appender.TraceAppender.m_immediateFlush">
- <summary>
- Immediate flush means that the underlying writer or output stream
- will be flushed at the end of each append operation.
- </summary>
- <remarks>
- <para>
- Immediate flush is slower but ensures that each append request is
- actually written. If <see cref="P:log4net.Appender.TraceAppender.ImmediateFlush"/> is set to
- <c>false</c>, then there is a good chance that the last few
- logs events are not actually written to persistent media if and
- when the application crashes.
- </para>
- <para>
- The default value is <c>true</c>.</para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TraceAppender.ImmediateFlush">
- <summary>
- Gets or sets a value that indicates whether the appender will
- flush at the end of each write.
- </summary>
- <remarks>
- <para>The default behavior is to flush at the end of each
- write. If the option is set to<c>false</c>, then the underlying
- stream can defer writing to physical medium to a later time.
- </para>
- <para>
- Avoiding the flush operation at the end of each append results
- in a performance gain of 10 to 20 percent. However, there is safety
- trade-off involved in skipping flushing. Indeed, when flushing is
- skipped, then it is likely that the last few log events will not
- be recorded on disk when the application exits. This is a high
- price to pay even for a 20% performance gain.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Appender.TraceAppender.RequiresLayout">
- <summary>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- This appender requires a <see cref="N:log4net.Layout"/> to be set.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.AliasDomainAttribute">
- <summary>
- Assembly level attribute that specifies a domain to alias to this assembly's repository.
- </summary>
- <remarks>
- <para>
- <b>AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute.</b>
- </para>
- <para>
- An assembly's logger repository is defined by its <see cref="T:log4net.Config.DomainAttribute"/>,
- however this can be overridden by an assembly loaded before the target assembly.
- </para>
- <para>
- An assembly can alias another assembly's domain to its repository by
- specifying this attribute with the name of the target domain.
- </para>
- <para>
- This attribute can only be specified on the assembly and may be used
- as many times as necessary to alias all the required domains.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Config.AliasRepositoryAttribute">
- <summary>
- Assembly level attribute that specifies a repository to alias to this assembly's repository.
- </summary>
- <remarks>
- <para>
- An assembly's logger repository is defined by its <see cref="T:log4net.Config.RepositoryAttribute"/>,
- however this can be overridden by an assembly loaded before the target assembly.
- </para>
- <para>
- An assembly can alias another assembly's repository to its repository by
- specifying this attribute with the name of the target repository.
- </para>
- <para>
- This attribute can only be specified on the assembly and may be used
- as many times as necessary to alias all the required repositories.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.AliasRepositoryAttribute.#ctor(System.String)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.AliasRepositoryAttribute"/> class with
- the specified repository to alias to this assembly's repository.
- </summary>
- <param name="name">The repository to alias to this assemby's repository.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Config.AliasRepositoryAttribute"/> class with
- the specified repository to alias to this assembly's repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.AliasRepositoryAttribute.Name">
- <summary>
- Gets or sets the repository to alias to this assemby's repository.
- </summary>
- <value>
- The repository to alias to this assemby's repository.
- </value>
- <remarks>
- <para>
- The name of the repository to alias to this assemby's repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.AliasDomainAttribute.#ctor(System.String)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.AliasDomainAttribute"/> class with
- the specified domain to alias to this assembly's repository.
- </summary>
- <param name="name">The domain to alias to this assemby's repository.</param>
- <remarks>
- <para>
- Obsolete. Use <see cref="T:log4net.Config.AliasRepositoryAttribute"/> instead of <see cref="T:log4net.Config.AliasDomainAttribute"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.BasicConfigurator">
- <summary>
- Use this class to quickly configure a <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>.
- </summary>
- <remarks>
- <para>
- Allows very simple programmatic configuration of log4net.
- </para>
- <para>
- Only one appender can be configured using this configurator.
- The appender is set at the root of the hierarchy and all logging
- events will be delivered to that appender.
- </para>
- <para>
- Appenders can also implement the <see cref="T:log4net.Core.IOptionHandler"/> interface. Therefore
- they would require that the <see cref="M:log4net.Core.IOptionHandler.ActivateOptions"/> method
- be called after the appenders properties have been configured.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.BasicConfigurator.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.BasicConfigurator"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to prevent instantiation of this class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.BasicConfigurator.Configure">
- <summary>
- Initializes the log4net system with a default configuration.
- </summary>
- <remarks>
- <para>
- Initializes the log4net logging system using a <see cref="T:log4net.Appender.ConsoleAppender"/>
- that will write to <c>Console.Out</c>. The log messages are
- formatted using the <see cref="T:log4net.Layout.PatternLayout"/> layout object
- with the <see cref="F:log4net.Layout.PatternLayout.DetailConversionPattern"/>
- layout style.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.BasicConfigurator.Configure(log4net.Appender.IAppender)">
- <summary>
- Initializes the log4net system using the specified appender.
- </summary>
- <param name="appender">The appender to use to log all logging events.</param>
- <remarks>
- <para>
- Initializes the log4net system using the specified appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.BasicConfigurator.Configure(log4net.Repository.ILoggerRepository)">
- <summary>
- Initializes the <see cref="T:log4net.Repository.ILoggerRepository"/> with a default configuration.
- </summary>
- <param name="repository">The repository to configure.</param>
- <remarks>
- <para>
- Initializes the specified repository using a <see cref="T:log4net.Appender.ConsoleAppender"/>
- that will write to <c>Console.Out</c>. The log messages are
- formatted using the <see cref="T:log4net.Layout.PatternLayout"/> layout object
- with the <see cref="F:log4net.Layout.PatternLayout.DetailConversionPattern"/>
- layout style.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.BasicConfigurator.Configure(log4net.Repository.ILoggerRepository,log4net.Appender.IAppender)">
- <summary>
- Initializes the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified appender.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="appender">The appender to use to log all logging events.</param>
- <remarks>
- <para>
- Initializes the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified appender.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.ConfiguratorAttribute">
- <summary>
- Base class for all log4net configuration attributes.
- </summary>
- <remarks>
- This is an abstract class that must be extended by
- specific configurators. This attribute allows the
- configurator to be parameterized by an assembly level
- attribute.
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.ConfiguratorAttribute.#ctor(System.Int32)">
- <summary>
- Constructor used by subclasses.
- </summary>
- <param name="priority">the ordering priority for this configurator</param>
- <remarks>
- <para>
- The <paramref name="priority"/> is used to order the configurator
- attributes before they are invoked. Higher priority configurators are executed
- before lower priority ones.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.ConfiguratorAttribute.Configure(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified assembly.
- </summary>
- <param name="sourceAssembly">The assembly that this attribute was defined on.</param>
- <param name="targetRepository">The repository to configure.</param>
- <remarks>
- <para>
- Abstract method implemented by a subclass. When this method is called
- the subclass should configure the <paramref name="targetRepository"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.ConfiguratorAttribute.CompareTo(System.Object)">
- <summary>
- Compare this instance to another ConfiguratorAttribute
- </summary>
- <param name="obj">the object to compare to</param>
- <returns>see <see cref="M:System.IComparable.CompareTo(System.Object)"/></returns>
- <remarks>
- <para>
- Compares the priorities of the two <see cref="T:log4net.Config.ConfiguratorAttribute"/> instances.
- Sorts by priority in descending order. Objects with the same priority are
- randomly ordered.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.DomainAttribute">
- <summary>
- Assembly level attribute that specifies the logging domain for the assembly.
- </summary>
- <remarks>
- <para>
- <b>DomainAttribute is obsolete. Use RepositoryAttribute instead of DomainAttribute.</b>
- </para>
- <para>
- Assemblies are mapped to logging domains. Each domain has its own
- logging repository. This attribute specified on the assembly controls
- the configuration of the domain. The <see cref="P:log4net.Config.RepositoryAttribute.Name"/> property specifies the name
- of the domain that this assembly is a part of. The <see cref="P:log4net.Config.RepositoryAttribute.RepositoryType"/>
- specifies the type of the repository objects to create for the domain. If
- this attribute is not specified and a <see cref="P:log4net.Config.RepositoryAttribute.Name"/> is not specified
- then the assembly will be part of the default shared logging domain.
- </para>
- <para>
- This attribute can only be specified on the assembly and may only be used
- once per assembly.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Config.RepositoryAttribute">
- <summary>
- Assembly level attribute that specifies the logging repository for the assembly.
- </summary>
- <remarks>
- <para>
- Assemblies are mapped to logging repository. This attribute specified
- on the assembly controls
- the configuration of the repository. The <see cref="P:log4net.Config.RepositoryAttribute.Name"/> property specifies the name
- of the repository that this assembly is a part of. The <see cref="P:log4net.Config.RepositoryAttribute.RepositoryType"/>
- specifies the type of the <see cref="T:log4net.Repository.ILoggerRepository"/> object
- to create for the assembly. If this attribute is not specified or a <see cref="P:log4net.Config.RepositoryAttribute.Name"/>
- is not specified then the assembly will be part of the default shared logging repository.
- </para>
- <para>
- This attribute can only be specified on the assembly and may only be used
- once per assembly.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.RepositoryAttribute.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.RepositoryAttribute"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.RepositoryAttribute.#ctor(System.String)">
- <summary>
- Initialize a new instance of the <see cref="T:log4net.Config.RepositoryAttribute"/> class
- with the name of the repository.
- </summary>
- <param name="name">The name of the repository.</param>
- <remarks>
- <para>
- Initialize the attribute with the name for the assembly's repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.RepositoryAttribute.Name">
- <summary>
- Gets or sets the name of the logging repository.
- </summary>
- <value>
- The string name to use as the name of the repository associated with this
- assembly.
- </value>
- <remarks>
- <para>
- This value does not have to be unique. Several assemblies can share the
- same repository. They will share the logging configuration of the repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.RepositoryAttribute.RepositoryType">
- <summary>
- Gets or sets the type of repository to create for this assembly.
- </summary>
- <value>
- The type of repository to create for this assembly.
- </value>
- <remarks>
- <para>
- The type of the repository to create for the assembly.
- The type must implement the <see cref="T:log4net.Repository.ILoggerRepository"/>
- interface.
- </para>
- <para>
- This will be the type of repository created when
- the repository is created. If multiple assemblies reference the
- same repository then the repository is only created once using the
- <see cref="P:log4net.Config.RepositoryAttribute.RepositoryType"/> of the first assembly to call into the
- repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.DomainAttribute.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.DomainAttribute"/> class.
- </summary>
- <remarks>
- <para>
- Obsolete. Use RepositoryAttribute instead of DomainAttribute.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.DomainAttribute.#ctor(System.String)">
- <summary>
- Initialize a new instance of the <see cref="T:log4net.Config.DomainAttribute"/> class
- with the name of the domain.
- </summary>
- <param name="name">The name of the domain.</param>
- <remarks>
- <para>
- Obsolete. Use RepositoryAttribute instead of DomainAttribute.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.DOMConfigurator">
- <summary>
- Use this class to initialize the log4net environment using an Xml tree.
- </summary>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- Configures a <see cref="T:log4net.Repository.ILoggerRepository"/> using an Xml tree.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.#ctor">
- <summary>
- Private constructor
- </summary>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure">
- <summary>
- Automatically configures the log4net system based on the
- application's configuration settings.
- </summary>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- Each application has a configuration file. This has the
- same name as the application with '.config' appended.
- This file is XML and calling this function prompts the
- configurator to look in that file for a section called
- <c>log4net</c> that contains the configuration data.
- </remarks>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(log4net.Repository.ILoggerRepository)">
- <summary>
- Automatically configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using settings
- stored in the application's configuration file.
- </summary>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- Each application has a configuration file. This has the
- same name as the application with '.config' appended.
- This file is XML and calling this function prompts the
- configurator to look in that file for a section called
- <c>log4net</c> that contains the configuration data.
- </remarks>
- <param name="repository">The repository to configure.</param>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(System.Xml.XmlElement)">
- <summary>
- Configures log4net using a <c>log4net</c> element
- </summary>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- Loads the log4net configuration from the XML element
- supplied as <paramref name="element"/>.
- </remarks>
- <param name="element">The element to parse.</param>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(log4net.Repository.ILoggerRepository,System.Xml.XmlElement)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified XML
- element.
- </summary>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- Loads the log4net configuration from the XML element
- supplied as <paramref name="element"/>.
- </remarks>
- <param name="repository">The repository to configure.</param>
- <param name="element">The element to parse.</param>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(System.IO.FileInfo)">
- <summary>
- Configures log4net using the specified configuration file.
- </summary>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the log4net configuration data.
- </para>
- <para>
- The log4net configuration file can possible be specified in the application's
- configuration file (either <c>MyAppName.exe.config</c> for a
- normal application on <c>Web.config</c> for an ASP.NET application).
- </para>
- <example>
- The following example configures log4net using a configuration file, of which the
- location is stored in the application's configuration file :
- </example>
- <code lang="C#">
- using log4net.Config;
- using System.IO;
- using System.Configuration;
-
- ...
-
- DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"]));
- </code>
- <para>
- In the <c>.config</c> file, the path to the log4net can be specified like this :
- </para>
- <code lang="XML" escaped="true">
- <configuration>
- <appSettings>
- <add key="log4net-config-file" value="log.config"/>
- </appSettings>
- </configuration>
- </code>
- </remarks>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(System.IO.Stream)">
- <summary>
- Configures log4net using the specified configuration file.
- </summary>
- <param name="configStream">A stream to load the XML configuration from.</param>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- The configuration data must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the log4net configuration data.
- </para>
- <para>
- Note that this method will NOT close the stream parameter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified configuration
- file.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The log4net configuration file can possible be specified in the application's
- configuration file (either <c>MyAppName.exe.config</c> for a
- normal application on <c>Web.config</c> for an ASP.NET application).
- </para>
- <example>
- The following example configures log4net using a configuration file, of which the
- location is stored in the application's configuration file :
- </example>
- <code lang="C#">
- using log4net.Config;
- using System.IO;
- using System.Configuration;
-
- ...
-
- DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"]));
- </code>
- <para>
- In the <c>.config</c> file, the path to the log4net can be specified like this :
- </para>
- <code lang="XML" escaped="true">
- <configuration>
- <appSettings>
- <add key="log4net-config-file" value="log.config"/>
- </appSettings>
- </configuration>
- </code>
- </remarks>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.Configure(log4net.Repository.ILoggerRepository,System.IO.Stream)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified configuration
- file.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configStream">The stream to load the XML configuration from.</param>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- The configuration data must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- Note that this method will NOT close the stream parameter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.ConfigureAndWatch(System.IO.FileInfo)">
- <summary>
- Configures log4net using the file specified, monitors the file for changes
- and reloads the configuration if a change is detected.
- </summary>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The configuration file will be monitored using a <see cref="T:System.IO.FileSystemWatcher"/>
- and depends on the behavior of that class.
- </para>
- <para>
- For more information on how to configure log4net using
- a separate configuration file, see <see cref="M:log4net.Config.DOMConfigurator.Configure(System.IO.FileInfo)"/>.
- </para>
- </remarks>
- <seealso cref="M:log4net.Config.DOMConfigurator.Configure(System.IO.FileInfo)"/>
- </member>
- <member name="M:log4net.Config.DOMConfigurator.ConfigureAndWatch(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the file specified,
- monitors the file for changes and reloads the configuration if a change
- is detected.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- <b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
- </para>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The configuration file will be monitored using a <see cref="T:System.IO.FileSystemWatcher"/>
- and depends on the behavior of that class.
- </para>
- <para>
- For more information on how to configure log4net using
- a separate configuration file, see <see cref="M:log4net.Config.DOMConfigurator.Configure(System.IO.FileInfo)"/>.
- </para>
- </remarks>
- <seealso cref="M:log4net.Config.DOMConfigurator.Configure(System.IO.FileInfo)"/>
- </member>
- <member name="T:log4net.Config.DOMConfiguratorAttribute">
- <summary>
- Assembly level attribute to configure the <see cref="T:log4net.Config.XmlConfigurator"/>.
- </summary>
- <remarks>
- <para>
- <b>AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute.</b>
- </para>
- <para>
- This attribute may only be used at the assembly scope and can only
- be used once per assembly.
- </para>
- <para>
- Use this attribute to configure the <see cref="T:log4net.Config.XmlConfigurator"/>
- without calling one of the <see cref="M:log4net.Config.XmlConfigurator.Configure"/>
- methods.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Config.XmlConfiguratorAttribute">
- <summary>
- Assembly level attribute to configure the <see cref="T:log4net.Config.XmlConfigurator"/>.
- </summary>
- <remarks>
- <para>
- This attribute may only be used at the assembly scope and can only
- be used once per assembly.
- </para>
- <para>
- Use this attribute to configure the <see cref="T:log4net.Config.XmlConfigurator"/>
- without calling one of the <see cref="M:log4net.Config.XmlConfigurator.Configure"/>
- methods.
- </para>
- <para>
- If neither of the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile"/> or <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/>
- properties are set the configuration is loaded from the application's .config file.
- If set the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile"/> property takes priority over the
- <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/> property. The <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile"/> property
- specifies a path to a file to load the config from. The path is relative to the
- application's base directory; <see cref="P:System.AppDomain.BaseDirectory"/>.
- The <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/> property is used as a postfix to the assembly file name.
- The config file must be located in the application's base directory; <see cref="P:System.AppDomain.BaseDirectory"/>.
- For example in a console application setting the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/> to
- <c>config</c> has the same effect as not specifying the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile"/> or
- <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/> properties.
- </para>
- <para>
- The <see cref="P:log4net.Config.XmlConfiguratorAttribute.Watch"/> property can be set to cause the <see cref="T:log4net.Config.XmlConfigurator"/>
- to watch the configuration file for changes.
- </para>
- <note>
- <para>
- Log4net will only look for assembly level configuration attributes once.
- When using the log4net assembly level attributes to control the configuration
- of log4net you must ensure that the first call to any of the
- <see cref="T:log4net.Core.LoggerManager"/> methods is made from the assembly with the configuration
- attributes.
- </para>
- <para>
- If you cannot guarantee the order in which log4net calls will be made from
- different assemblies you must use programmatic configuration instead, i.e.
- call the <see cref="M:log4net.Config.XmlConfigurator.Configure"/> method directly.
- </para>
- </note>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.XmlConfiguratorAttribute.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfiguratorAttribute.Configure(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified assembly.
- </summary>
- <param name="sourceAssembly">The assembly that this attribute was defined on.</param>
- <param name="targetRepository">The repository to configure.</param>
- <remarks>
- <para>
- Configure the repository using the <see cref="T:log4net.Config.XmlConfigurator"/>.
- The <paramref name="targetRepository"/> specified must extend the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>
- class otherwise the <see cref="T:log4net.Config.XmlConfigurator"/> will not be able to
- configure it.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="repository"/> does not extend <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>.</exception>
- </member>
- <member name="M:log4net.Config.XmlConfiguratorAttribute.ConfigureFromFile(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Attempt to load configuration from the local file system
- </summary>
- <param name="sourceAssembly">The assembly that this attribute was defined on.</param>
- <param name="targetRepository">The repository to configure.</param>
- </member>
- <member name="M:log4net.Config.XmlConfiguratorAttribute.ConfigureFromFile(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Configure the specified repository using a <see cref="T:System.IO.FileInfo"/>
- </summary>
- <param name="targetRepository">The repository to configure.</param>
- <param name="configFile">the FileInfo pointing to the config file</param>
- </member>
- <member name="M:log4net.Config.XmlConfiguratorAttribute.ConfigureFromUri(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Attempt to load configuration from a URI
- </summary>
- <param name="sourceAssembly">The assembly that this attribute was defined on.</param>
- <param name="targetRepository">The repository to configure.</param>
- </member>
- <member name="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile">
- <summary>
- Gets or sets the filename of the configuration file.
- </summary>
- <value>
- The filename of the configuration file.
- </value>
- <remarks>
- <para>
- If specified, this is the name of the configuration file to use with
- the <see cref="T:log4net.Config.XmlConfigurator"/>. This file path is relative to the
- <b>application base</b> directory (<see cref="P:System.AppDomain.BaseDirectory"/>).
- </para>
- <para>
- The <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile"/> takes priority over the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension">
- <summary>
- Gets or sets the extension of the configuration file.
- </summary>
- <value>
- The extension of the configuration file.
- </value>
- <remarks>
- <para>
- If specified this is the extension for the configuration file.
- The path to the config file is built by using the <b>application
- base</b> directory (<see cref="P:System.AppDomain.BaseDirectory"/>),
- the <b>assembly file name</b> and the config file extension.
- </para>
- <para>
- If the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/> is set to <c>MyExt</c> then
- possible config file names would be: <c>MyConsoleApp.exe.MyExt</c> or
- <c>MyClassLibrary.dll.MyExt</c>.
- </para>
- <para>
- The <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFile"/> takes priority over the <see cref="P:log4net.Config.XmlConfiguratorAttribute.ConfigFileExtension"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.XmlConfiguratorAttribute.Watch">
- <summary>
- Gets or sets a value indicating whether to watch the configuration file.
- </summary>
- <value>
- <c>true</c> if the configuration should be watched, <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- If this flag is specified and set to <c>true</c> then the framework
- will watch the configuration file and will reload the config each time
- the file is modified.
- </para>
- <para>
- The config file can only be watched if it is loaded from local disk.
- In a No-Touch (Smart Client) deployment where the application is downloaded
- from a web server the config file may not reside on the local disk
- and therefore it may not be able to watch it.
- </para>
- <note>
- Watching configuration is not supported on the SSCLI.
- </note>
- </remarks>
- </member>
- <member name="T:log4net.Config.Log4NetConfigurationSectionHandler">
- <summary>
- Class to register for the log4net section of the configuration file
- </summary>
- <remarks>
- The log4net section of the configuration file needs to have a section
- handler registered. This is the section handler used. It simply returns
- the XML element that is the root of the section.
- </remarks>
- <example>
- Example of registering the log4net section handler :
- <code lang="XML" escaped="true">
- <configuration>
- <configSections>
- <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
- </configSections>
- <log4net>
- log4net configuration XML goes here
- </log4net>
- </configuration>
- </code>
- </example>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.Log4NetConfigurationSectionHandler.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.Log4NetConfigurationSectionHandler"/> class.
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.Log4NetConfigurationSectionHandler.Create(System.Object,System.Object,System.Xml.XmlNode)">
- <summary>
- Parses the configuration section.
- </summary>
- <param name="parent">The configuration settings in a corresponding parent configuration section.</param>
- <param name="configContext">The configuration context when called from the ASP.NET configuration system. Otherwise, this parameter is reserved and is a null reference.</param>
- <param name="section">The <see cref="T:System.Xml.XmlNode"/> for the log4net section.</param>
- <returns>The <see cref="T:System.Xml.XmlNode"/> for the log4net section.</returns>
- <remarks>
- <para>
- Returns the <see cref="T:System.Xml.XmlNode"/> containing the configuration data,
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.PluginAttribute">
- <summary>
- Assembly level attribute that specifies a plugin to attach to
- the repository.
- </summary>
- <remarks>
- <para>
- Specifies the type of a plugin to create and attach to the
- assembly's repository. The plugin type must implement the
- <see cref="T:log4net.Plugin.IPlugin"/> interface.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Plugin.IPluginFactory">
- <summary>
- Interface used to create plugins.
- </summary>
- <remarks>
- <para>
- Interface used to create a plugin.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Plugin.IPluginFactory.CreatePlugin">
- <summary>
- Creates the plugin object.
- </summary>
- <returns>the new plugin instance</returns>
- <remarks>
- <para>
- Create and return a new plugin instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.PluginAttribute.#ctor(System.String)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.PluginAttribute"/> class
- with the specified type.
- </summary>
- <param name="typeName">The type name of plugin to create.</param>
- <remarks>
- <para>
- Create the attribute with the plugin type specified.
- </para>
- <para>
- Where possible use the constructor that takes a <see cref="T:System.Type"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.PluginAttribute.#ctor(System.Type)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.PluginAttribute"/> class
- with the specified type.
- </summary>
- <param name="type">The type of plugin to create.</param>
- <remarks>
- <para>
- Create the attribute with the plugin type specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.PluginAttribute.CreatePlugin">
- <summary>
- Creates the plugin object defined by this attribute.
- </summary>
- <remarks>
- <para>
- Creates the instance of the <see cref="T:log4net.Plugin.IPlugin"/> object as
- specified by this attribute.
- </para>
- </remarks>
- <returns>The plugin object.</returns>
- </member>
- <member name="M:log4net.Config.PluginAttribute.ToString">
- <summary>
- Returns a representation of the properties of this object.
- </summary>
- <remarks>
- <para>
- Overrides base class <see cref="M:System.Object.ToString"/> method to
- return a representation of the properties of this object.
- </para>
- </remarks>
- <returns>A representation of the properties of this object</returns>
- </member>
- <member name="P:log4net.Config.PluginAttribute.Type">
- <summary>
- Gets or sets the type for the plugin.
- </summary>
- <value>
- The type for the plugin.
- </value>
- <remarks>
- <para>
- The type for the plugin.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.PluginAttribute.TypeName">
- <summary>
- Gets or sets the type name for the plugin.
- </summary>
- <value>
- The type name for the plugin.
- </value>
- <remarks>
- <para>
- The type name for the plugin.
- </para>
- <para>
- Where possible use the <see cref="P:log4net.Config.PluginAttribute.Type"/> property instead.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.SecurityContextProviderAttribute">
- <summary>
- Assembly level attribute to configure the <see cref="T:log4net.Core.SecurityContextProvider"/>.
- </summary>
- <remarks>
- <para>
- This attribute may only be used at the assembly scope and can only
- be used once per assembly.
- </para>
- <para>
- Use this attribute to configure the <see cref="T:log4net.Config.XmlConfigurator"/>
- without calling one of the <see cref="M:log4net.Config.XmlConfigurator.Configure"/>
- methods.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Config.SecurityContextProviderAttribute.#ctor(System.Type)">
- <summary>
- Construct provider attribute with type specified
- </summary>
- <param name="providerType">the type of the provider to use</param>
- <remarks>
- <para>
- The provider specified must subclass the <see cref="T:log4net.Core.SecurityContextProvider"/>
- class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.SecurityContextProviderAttribute.Configure(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Configures the SecurityContextProvider
- </summary>
- <param name="sourceAssembly">The assembly that this attribute was defined on.</param>
- <param name="targetRepository">The repository to configure.</param>
- <remarks>
- <para>
- Creates a provider instance from the <see cref="P:log4net.Config.SecurityContextProviderAttribute.ProviderType"/> specified.
- Sets this as the default security context provider <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Config.SecurityContextProviderAttribute.ProviderType">
- <summary>
- Gets or sets the type of the provider to use.
- </summary>
- <value>
- the type of the provider to use.
- </value>
- <remarks>
- <para>
- The provider specified must subclass the <see cref="T:log4net.Core.SecurityContextProvider"/>
- class.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.XmlConfigurator">
- <summary>
- Use this class to initialize the log4net environment using an Xml tree.
- </summary>
- <remarks>
- <para>
- Configures a <see cref="T:log4net.Repository.ILoggerRepository"/> using an Xml tree.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.#ctor">
- <summary>
- Private constructor
- </summary>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure">
- <summary>
- Automatically configures the log4net system based on the
- application's configuration settings.
- </summary>
- <remarks>
- <para>
- Each application has a configuration file. This has the
- same name as the application with '.config' appended.
- This file is XML and calling this function prompts the
- configurator to look in that file for a section called
- <c>log4net</c> that contains the configuration data.
- </para>
- <para>
- To use this method to configure log4net you must specify
- the <see cref="T:log4net.Config.Log4NetConfigurationSectionHandler"/> section
- handler for the <c>log4net</c> configuration section. See the
- <see cref="T:log4net.Config.Log4NetConfigurationSectionHandler"/> for an example.
- </para>
- </remarks>
- <seealso cref="T:log4net.Config.Log4NetConfigurationSectionHandler"/>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(log4net.Repository.ILoggerRepository)">
- <summary>
- Automatically configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using settings
- stored in the application's configuration file.
- </summary>
- <remarks>
- <para>
- Each application has a configuration file. This has the
- same name as the application with '.config' appended.
- This file is XML and calling this function prompts the
- configurator to look in that file for a section called
- <c>log4net</c> that contains the configuration data.
- </para>
- <para>
- To use this method to configure log4net you must specify
- the <see cref="T:log4net.Config.Log4NetConfigurationSectionHandler"/> section
- handler for the <c>log4net</c> configuration section. See the
- <see cref="T:log4net.Config.Log4NetConfigurationSectionHandler"/> for an example.
- </para>
- </remarks>
- <param name="repository">The repository to configure.</param>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(System.Xml.XmlElement)">
- <summary>
- Configures log4net using a <c>log4net</c> element
- </summary>
- <remarks>
- <para>
- Loads the log4net configuration from the XML element
- supplied as <paramref name="element"/>.
- </para>
- </remarks>
- <param name="element">The element to parse.</param>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(log4net.Repository.ILoggerRepository,System.Xml.XmlElement)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified XML
- element.
- </summary>
- <remarks>
- Loads the log4net configuration from the XML element
- supplied as <paramref name="element"/>.
- </remarks>
- <param name="repository">The repository to configure.</param>
- <param name="element">The element to parse.</param>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(System.IO.FileInfo)">
- <summary>
- Configures log4net using the specified configuration file.
- </summary>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the log4net configuration data.
- </para>
- <para>
- The log4net configuration file can possible be specified in the application's
- configuration file (either <c>MyAppName.exe.config</c> for a
- normal application on <c>Web.config</c> for an ASP.NET application).
- </para>
- <para>
- The first element matching <c>&lt;configuration&gt;</c> will be read as the
- configuration. If this file is also a .NET .config file then you must specify
- a configuration section for the <c>log4net</c> element otherwise .NET will
- complain. Set the type for the section handler to <see cref="T:System.Configuration.IgnoreSectionHandler"/>, for example:
- <code lang="XML" escaped="true">
- <configSections>
- <section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
- </configSections>
- </code>
- </para>
- <example>
- The following example configures log4net using a configuration file, of which the
- location is stored in the application's configuration file :
- </example>
- <code lang="C#">
- using log4net.Config;
- using System.IO;
- using System.Configuration;
-
- ...
-
- XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"]));
- </code>
- <para>
- In the <c>.config</c> file, the path to the log4net can be specified like this :
- </para>
- <code lang="XML" escaped="true">
- <configuration>
- <appSettings>
- <add key="log4net-config-file" value="log.config"/>
- </appSettings>
- </configuration>
- </code>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(System.Uri)">
- <summary>
- Configures log4net using the specified configuration URI.
- </summary>
- <param name="configUri">A URI to load the XML configuration from.</param>
- <remarks>
- <para>
- The configuration data must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the log4net configuration data.
- </para>
- <para>
- The <see cref="T:System.Net.WebRequest"/> must support the URI scheme specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(System.IO.Stream)">
- <summary>
- Configures log4net using the specified configuration data stream.
- </summary>
- <param name="configStream">A stream to load the XML configuration from.</param>
- <remarks>
- <para>
- The configuration data must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the log4net configuration data.
- </para>
- <para>
- Note that this method will NOT close the stream parameter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified configuration
- file.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The log4net configuration file can possible be specified in the application's
- configuration file (either <c>MyAppName.exe.config</c> for a
- normal application on <c>Web.config</c> for an ASP.NET application).
- </para>
- <para>
- The first element matching <c>&lt;configuration&gt;</c> will be read as the
- configuration. If this file is also a .NET .config file then you must specify
- a configuration section for the <c>log4net</c> element otherwise .NET will
- complain. Set the type for the section handler to <see cref="T:System.Configuration.IgnoreSectionHandler"/>, for example:
- <code lang="XML" escaped="true">
- <configSections>
- <section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
- </configSections>
- </code>
- </para>
- <example>
- The following example configures log4net using a configuration file, of which the
- location is stored in the application's configuration file :
- </example>
- <code lang="C#">
- using log4net.Config;
- using System.IO;
- using System.Configuration;
-
- ...
-
- XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"]));
- </code>
- <para>
- In the <c>.config</c> file, the path to the log4net can be specified like this :
- </para>
- <code lang="XML" escaped="true">
- <configuration>
- <appSettings>
- <add key="log4net-config-file" value="log.config"/>
- </appSettings>
- </configuration>
- </code>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(log4net.Repository.ILoggerRepository,System.Uri)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified configuration
- URI.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configUri">A URI to load the XML configuration from.</param>
- <remarks>
- <para>
- The configuration data must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The <see cref="T:System.Net.WebRequest"/> must support the URI scheme specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.Configure(log4net.Repository.ILoggerRepository,System.IO.Stream)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the specified configuration
- file.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configStream">The stream to load the XML configuration from.</param>
- <remarks>
- <para>
- The configuration data must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- Note that this method will NOT close the stream parameter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatch(System.IO.FileInfo)">
- <summary>
- Configures log4net using the file specified, monitors the file for changes
- and reloads the configuration if a change is detected.
- </summary>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The configuration file will be monitored using a <see cref="T:System.IO.FileSystemWatcher"/>
- and depends on the behavior of that class.
- </para>
- <para>
- For more information on how to configure log4net using
- a separate configuration file, see <see cref="M:log4net.Config.XmlConfigurator.Configure(System.IO.FileInfo)"/>.
- </para>
- </remarks>
- <seealso cref="M:log4net.Config.XmlConfigurator.Configure(System.IO.FileInfo)"/>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatch(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Configures the <see cref="T:log4net.Repository.ILoggerRepository"/> using the file specified,
- monitors the file for changes and reloads the configuration if a change
- is detected.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configFile">The XML file to load the configuration from.</param>
- <remarks>
- <para>
- The configuration file must be valid XML. It must contain
- at least one element called <c>log4net</c> that holds
- the configuration data.
- </para>
- <para>
- The configuration file will be monitored using a <see cref="T:System.IO.FileSystemWatcher"/>
- and depends on the behavior of that class.
- </para>
- <para>
- For more information on how to configure log4net using
- a separate configuration file, see <see cref="M:log4net.Config.XmlConfigurator.Configure(System.IO.FileInfo)"/>.
- </para>
- </remarks>
- <seealso cref="M:log4net.Config.XmlConfigurator.Configure(System.IO.FileInfo)"/>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureFromXml(log4net.Repository.ILoggerRepository,System.Xml.XmlElement)">
- <summary>
- Configures the specified repository using a <c>log4net</c> element.
- </summary>
- <param name="repository">The hierarchy to configure.</param>
- <param name="element">The element to parse.</param>
- <remarks>
- <para>
- Loads the log4net configuration from the XML element
- supplied as <paramref name="element"/>.
- </para>
- <para>
- This method is ultimately called by one of the Configure methods
- to load the configuration from an <see cref="T:System.Xml.XmlElement"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler">
- <summary>
- Class used to watch config files.
- </summary>
- <remarks>
- <para>
- Uses the <see cref="T:System.IO.FileSystemWatcher"/> to monitor
- changes to a specified file. Because multiple change notifications
- may be raised when the file is modified, a timer is used to
- compress the notifications into a single event. The timer
- waits for <see cref="F:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.TimeoutMillis"/> time before delivering
- the event notification. If any further <see cref="T:System.IO.FileSystemWatcher"/>
- change notifications arrive while the timer is waiting it
- is reset and waits again for <see cref="F:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.TimeoutMillis"/> to
- elapse.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.TimeoutMillis">
- <summary>
- The default amount of time to wait after receiving notification
- before reloading the config file.
- </summary>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.StartWatching(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Watch a specified config file used to configure a repository
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configFile">The configuration file to watch.</param>
- <remarks>
- <para>
- Watch a specified config file used to configure a repository
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.m_configFile">
- <summary>
- Holds the FileInfo used to configure the XmlConfigurator
- </summary>
- </member>
- <member name="F:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.m_repository">
- <summary>
- Holds the repository being configured.
- </summary>
- </member>
- <member name="F:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.m_timer">
- <summary>
- The timer used to compress the notification events.
- </summary>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.#ctor(log4net.Repository.ILoggerRepository,System.IO.FileInfo)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler"/> class.
- </summary>
- <param name="repository">The repository to configure.</param>
- <param name="configFile">The configuration file to watch.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.ConfigureAndWatchHandler_OnChanged(System.Object,System.IO.FileSystemEventArgs)">
- <summary>
- Event handler used by <see cref="T:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler"/>.
- </summary>
- <param name="source">The <see cref="T:System.IO.FileSystemWatcher"/> firing the event.</param>
- <param name="e">The argument indicates the file that caused the event to be fired.</param>
- <remarks>
- <para>
- This handler reloads the configuration from the file when the event is fired.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.ConfigureAndWatchHandler_OnRenamed(System.Object,System.IO.RenamedEventArgs)">
- <summary>
- Event handler used by <see cref="T:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler"/>.
- </summary>
- <param name="source">The <see cref="T:System.IO.FileSystemWatcher"/> firing the event.</param>
- <param name="e">The argument indicates the file that caused the event to be fired.</param>
- <remarks>
- <para>
- This handler reloads the configuration from the file when the event is fired.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Config.XmlConfigurator.ConfigureAndWatchHandler.OnWatchedFileChange(System.Object)">
- <summary>
- Called by the timer when the configuration has been updated.
- </summary>
- <param name="state">null</param>
- </member>
- <member name="T:log4net.Core.CompactRepositorySelector">
- <summary>
- The implementation of the <see cref="T:log4net.Core.IRepositorySelector"/> interface suitable
- for use with the compact framework
- </summary>
- <remarks>
- <para>
- This <see cref="T:log4net.Core.IRepositorySelector"/> implementation is a simple
- mapping between repository name and <see cref="T:log4net.Repository.ILoggerRepository"/>
- object.
- </para>
- <para>
- The .NET Compact Framework 1.0 does not support retrieving assembly
- level attributes therefore unlike the <c>DefaultRepositorySelector</c>
- this selector does not examine the calling assembly for attributes.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="T:log4net.Core.IRepositorySelector">
- <summary>
- Interface used by the <see cref="T:log4net.LogManager"/> to select the <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.LogManager"/> uses a <see cref="T:log4net.Core.IRepositorySelector"/>
- to specify the policy for selecting the correct <see cref="T:log4net.Repository.ILoggerRepository"/>
- to return to the caller.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.IRepositorySelector.GetRepository(System.Reflection.Assembly)">
- <summary>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified assembly.
- </summary>
- <param name="assembly">The assembly to use to lookup to the <see cref="T:log4net.Repository.ILoggerRepository"/></param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> for the assembly.</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified assembly.
- </para>
- <para>
- How the association between <see cref="T:System.Reflection.Assembly"/> and <see cref="T:log4net.Repository.ILoggerRepository"/>
- is made is not defined. The implementation may choose any method for
- this association. The results of this method must be repeatable, i.e.
- when called again with the same arguments the result must be the
- save value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IRepositorySelector.GetRepository(System.String)">
- <summary>
- Gets the named <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </summary>
- <param name="repositoryName">The name to use to lookup to the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <returns>The named <see cref="T:log4net.Repository.ILoggerRepository"/></returns>
- <remarks>
- Lookup a named <see cref="T:log4net.Repository.ILoggerRepository"/>. This is the repository created by
- calling <see cref="M:log4net.Core.IRepositorySelector.CreateRepository(System.String,System.Type)"/>.
- </remarks>
- </member>
- <member name="M:log4net.Core.IRepositorySelector.CreateRepository(System.Reflection.Assembly,System.Type)">
- <summary>
- Creates a new repository for the assembly specified.
- </summary>
- <param name="assembly">The assembly to use to create the domain to associate with the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <param name="repositoryType">The type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <returns>The repository created.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the domain
- specified such that a call to <see cref="M:log4net.Core.IRepositorySelector.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- <para>
- How the association between <see cref="T:System.Reflection.Assembly"/> and <see cref="T:log4net.Repository.ILoggerRepository"/>
- is made is not defined. The implementation may choose any method for
- this association.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IRepositorySelector.CreateRepository(System.String,System.Type)">
- <summary>
- Creates a new repository with the name specified.
- </summary>
- <param name="repositoryName">The name to associate with the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <param name="repositoryType">The type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <returns>The repository created.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the name
- specified such that a call to <see cref="M:log4net.Core.IRepositorySelector.GetRepository(System.String)"/> with the
- same name will return the same repository instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IRepositorySelector.ExistsRepository(System.String)">
- <summary>
- Test if a named repository exists
- </summary>
- <param name="repositoryName">the named repository to check</param>
- <returns><c>true</c> if the repository exists</returns>
- <remarks>
- <para>
- Test if a named repository exists. Use <see cref="M:log4net.Core.IRepositorySelector.CreateRepository(System.Reflection.Assembly,System.Type)"/>
- to create a new repository and <see cref="M:log4net.Core.IRepositorySelector.GetRepository(System.Reflection.Assembly)"/> to retrieve
- a repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IRepositorySelector.GetAllRepositories">
- <summary>
- Gets an array of all currently defined repositories.
- </summary>
- <returns>
- An array of the <see cref="T:log4net.Repository.ILoggerRepository"/> instances created by
- this <see cref="T:log4net.Core.IRepositorySelector"/>.</returns>
- <remarks>
- <para>
- Gets an array of all of the repositories created by this selector.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Core.IRepositorySelector.LoggerRepositoryCreatedEvent">
- <summary>
- Event to notify that a logger repository has been created.
- </summary>
- <value>
- Event to notify that a logger repository has been created.
- </value>
- <remarks>
- <para>
- Event raised when a new repository is created.
- The event source will be this selector. The event args will
- be a <see cref="T:log4net.Core.LoggerRepositoryCreationEventArgs"/> which
- holds the newly created <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.#ctor(System.Type)">
- <summary>
- Create a new repository selector
- </summary>
- <param name="defaultRepositoryType">the type of the repositories to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/></param>
- <remarks>
- <para>
- Create an new compact repository selector.
- The default type for repositories must be specified,
- an appropriate value would be <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">throw if <paramref name="defaultRepositoryType"/> is null</exception>
- <exception cref="T:System.ArgumentOutOfRangeException">throw if <paramref name="defaultRepositoryType"/> does not implement <see cref="T:log4net.Repository.ILoggerRepository"/></exception>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.GetRepository(System.Reflection.Assembly)">
- <summary>
- Get the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified assembly
- </summary>
- <param name="assembly">not used</param>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/></returns>
- <remarks>
- <para>
- The <paramref name="assembly"/> argument is not used. This selector does not create a
- separate repository for each assembly.
- </para>
- <para>
- As a named repository is not specified the default repository is
- returned. The default repository is named <c>log4net-default-repository</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.GetRepository(System.String)">
- <summary>
- Get the named <see cref="T:log4net.Repository.ILoggerRepository"/>
- </summary>
- <param name="repositoryName">the name of the repository to lookup</param>
- <returns>The named <see cref="T:log4net.Repository.ILoggerRepository"/></returns>
- <remarks>
- <para>
- Get the named <see cref="T:log4net.Repository.ILoggerRepository"/>. The default
- repository is <c>log4net-default-repository</c>. Other repositories
- must be created using the <see cref="M:log4net.Core.CompactRepositorySelector.CreateRepository(System.String,System.Type)"/>.
- If the named repository does not exist an exception is thrown.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">throw if <paramref name="repositoryName"/> is null</exception>
- <exception cref="T:log4net.Core.LogException">throw if the <paramref name="repositoryName"/> does not exist</exception>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.CreateRepository(System.Reflection.Assembly,System.Type)">
- <summary>
- Create a new repository for the assembly specified
- </summary>
- <param name="assembly">not used</param>
- <param name="repositoryType">the type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/></param>
- <returns>the repository created</returns>
- <remarks>
- <para>
- The <paramref name="assembly"/> argument is not used. This selector does not create a
- separate repository for each assembly.
- </para>
- <para>
- If the <paramref name="repositoryType"/> is <c>null</c> then the
- default repository type specified to the constructor is used.
- </para>
- <para>
- As a named repository is not specified the default repository is
- returned. The default repository is named <c>log4net-default-repository</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.CreateRepository(System.String,System.Type)">
- <summary>
- Create a new repository for the repository specified
- </summary>
- <param name="repositoryName">the repository to associate with the <see cref="T:log4net.Repository.ILoggerRepository"/></param>
- <param name="repositoryType">the type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/>.
- If this param is null then the default repository type is used.</param>
- <returns>the repository created</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.Core.CompactRepositorySelector.GetRepository(System.String)"/> with the
- same repository specified will return the same repository instance.
- </para>
- <para>
- If the named repository already exists an exception will be thrown.
- </para>
- <para>
- If <paramref name="repositoryType"/> is <c>null</c> then the default
- repository type specified to the constructor is used.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">throw if <paramref name="repositoryName"/> is null</exception>
- <exception cref="T:log4net.Core.LogException">throw if the <paramref name="repositoryName"/> already exists</exception>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.ExistsRepository(System.String)">
- <summary>
- Test if a named repository exists
- </summary>
- <param name="repositoryName">the named repository to check</param>
- <returns><c>true</c> if the repository exists</returns>
- <remarks>
- <para>
- Test if a named repository exists. Use <see cref="M:log4net.Core.CompactRepositorySelector.CreateRepository(System.String,System.Type)"/>
- to create a new repository and <see cref="M:log4net.Core.CompactRepositorySelector.GetRepository(System.String)"/> to retrieve
- a repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.GetAllRepositories">
- <summary>
- Gets a list of <see cref="T:log4net.Repository.ILoggerRepository"/> objects
- </summary>
- <returns>an array of all known <see cref="T:log4net.Repository.ILoggerRepository"/> objects</returns>
- <remarks>
- <para>
- Gets an array of all of the repositories created by this selector.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.CompactRepositorySelector.OnLoggerRepositoryCreatedEvent(log4net.Repository.ILoggerRepository)">
- <summary>
- Notify the registered listeners that the repository has been created
- </summary>
- <param name="repository">The repository that has been created</param>
- <remarks>
- <para>
- Raises the <event cref="E:log4net.Core.CompactRepositorySelector.LoggerRepositoryCreatedEvent">LoggerRepositoryCreatedEvent</event>
- event.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Core.CompactRepositorySelector.LoggerRepositoryCreatedEvent">
- <summary>
- Event to notify that a logger repository has been created.
- </summary>
- <value>
- Event to notify that a logger repository has been created.
- </value>
- <remarks>
- <para>
- Event raised when a new repository is created.
- The event source will be this selector. The event args will
- be a <see cref="T:log4net.Core.LoggerRepositoryCreationEventArgs"/> which
- holds the newly created <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.DefaultRepositorySelector">
- <summary>
- The default implementation of the <see cref="T:log4net.Core.IRepositorySelector"/> interface.
- </summary>
- <remarks>
- <para>
- Uses attributes defined on the calling assembly to determine how to
- configure the hierarchy for the repository.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.#ctor(System.Type)">
- <summary>
- Creates a new repository selector.
- </summary>
- <param name="defaultRepositoryType">The type of the repositories to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/></param>
- <remarks>
- <para>
- Create an new repository selector.
- The default type for repositories must be specified,
- an appropriate value would be <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException"><paramref name="defaultRepositoryType"/> is <see langword="null"/>.</exception>
- <exception cref="T:System.ArgumentOutOfRangeException"><paramref name="defaultRepositoryType"/> does not implement <see cref="T:log4net.Repository.ILoggerRepository"/>.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.GetRepository(System.Reflection.Assembly)">
- <summary>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified assembly.
- </summary>
- <param name="repositoryAssembly">The assembly use to lookup the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <remarks>
- <para>
- The type of the <see cref="T:log4net.Repository.ILoggerRepository"/> created and the repository
- to create can be overridden by specifying the <see cref="T:log4net.Config.RepositoryAttribute"/>
- attribute on the <paramref name="repositoryAssembly"/>.
- </para>
- <para>
- The default values are to use the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>
- implementation of the <see cref="T:log4net.Repository.ILoggerRepository"/> interface and to use the
- <see cref="P:System.Reflection.AssemblyName.Name"/> as the name of the repository.
- </para>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be automatically configured using
- any <see cref="T:log4net.Config.ConfiguratorAttribute"/> attributes defined on
- the <paramref name="repositoryAssembly"/>.
- </para>
- </remarks>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> for the assembly</returns>
- <exception cref="T:System.ArgumentNullException"><paramref name="repositoryAssembly"/> is <see langword="null"/>.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.GetRepository(System.String)">
- <summary>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified repository.
- </summary>
- <param name="repositoryName">The repository to use to lookup the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> for the specified repository.</returns>
- <remarks>
- <para>
- Returns the named repository. If <paramref name="repositoryName"/> is <c>null</c>
- a <see cref="T:System.ArgumentNullException"/> is thrown. If the repository
- does not exist a <see cref="T:log4net.Core.LogException"/> is thrown.
- </para>
- <para>
- Use <see cref="M:log4net.Core.DefaultRepositorySelector.CreateRepository(System.String,System.Type)"/> to create a repository.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException"><paramref name="repositoryName"/> is <see langword="null"/>.</exception>
- <exception cref="T:log4net.Core.LogException"><paramref name="repositoryName"/> does not exist.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.CreateRepository(System.Reflection.Assembly,System.Type)">
- <summary>
- Create a new repository for the assembly specified
- </summary>
- <param name="repositoryAssembly">the assembly to use to create the repository to associate with the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <param name="repositoryType">The type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <returns>The repository created.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.Core.DefaultRepositorySelector.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- <para>
- The type of the <see cref="T:log4net.Repository.ILoggerRepository"/> created and
- the repository to create can be overridden by specifying the
- <see cref="T:log4net.Config.RepositoryAttribute"/> attribute on the
- <paramref name="repositoryAssembly"/>. The default values are to use the
- <paramref name="repositoryType"/> implementation of the
- <see cref="T:log4net.Repository.ILoggerRepository"/> interface and to use the
- <see cref="P:System.Reflection.AssemblyName.Name"/> as the name of the repository.
- </para>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be automatically
- configured using any <see cref="T:log4net.Config.ConfiguratorAttribute"/>
- attributes defined on the <paramref name="repositoryAssembly"/>.
- </para>
- <para>
- If a repository for the <paramref name="repositoryAssembly"/> already exists
- that repository will be returned. An error will not be raised and that
- repository may be of a different type to that specified in <paramref name="repositoryType"/>.
- Also the <see cref="T:log4net.Config.RepositoryAttribute"/> attribute on the
- assembly may be used to override the repository type specified in
- <paramref name="repositoryType"/>.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException"><paramref name="repositoryAssembly"/> is <see langword="null"/>.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.CreateRepository(System.Reflection.Assembly,System.Type,System.String,System.Boolean)">
- <summary>
- Creates a new repository for the assembly specified.
- </summary>
- <param name="repositoryAssembly">the assembly to use to create the repository to associate with the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <param name="repositoryType">The type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <param name="repositoryName">The name to assign to the created repository</param>
- <param name="readAssemblyAttributes">Set to <c>true</c> to read and apply the assembly attributes</param>
- <returns>The repository created.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.Core.DefaultRepositorySelector.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- <para>
- The type of the <see cref="T:log4net.Repository.ILoggerRepository"/> created and
- the repository to create can be overridden by specifying the
- <see cref="T:log4net.Config.RepositoryAttribute"/> attribute on the
- <paramref name="repositoryAssembly"/>. The default values are to use the
- <paramref name="repositoryType"/> implementation of the
- <see cref="T:log4net.Repository.ILoggerRepository"/> interface and to use the
- <see cref="P:System.Reflection.AssemblyName.Name"/> as the name of the repository.
- </para>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be automatically
- configured using any <see cref="T:log4net.Config.ConfiguratorAttribute"/>
- attributes defined on the <paramref name="repositoryAssembly"/>.
- </para>
- <para>
- If a repository for the <paramref name="repositoryAssembly"/> already exists
- that repository will be returned. An error will not be raised and that
- repository may be of a different type to that specified in <paramref name="repositoryType"/>.
- Also the <see cref="T:log4net.Config.RepositoryAttribute"/> attribute on the
- assembly may be used to override the repository type specified in
- <paramref name="repositoryType"/>.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException"><paramref name="repositoryAssembly"/> is <see langword="null"/>.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.CreateRepository(System.String,System.Type)">
- <summary>
- Creates a new repository for the specified repository.
- </summary>
- <param name="repositoryName">The repository to associate with the <see cref="T:log4net.Repository.ILoggerRepository"/>.</param>
- <param name="repositoryType">The type of repository to create, must implement <see cref="T:log4net.Repository.ILoggerRepository"/>.
- If this param is <see langword="null"/> then the default repository type is used.</param>
- <returns>The new repository.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.Core.DefaultRepositorySelector.GetRepository(System.String)"/> with the
- same repository specified will return the same repository instance.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException"><paramref name="repositoryName"/> is <see langword="null"/>.</exception>
- <exception cref="T:log4net.Core.LogException"><paramref name="repositoryName"/> already exists.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.ExistsRepository(System.String)">
- <summary>
- Test if a named repository exists
- </summary>
- <param name="repositoryName">the named repository to check</param>
- <returns><c>true</c> if the repository exists</returns>
- <remarks>
- <para>
- Test if a named repository exists. Use <see cref="M:log4net.Core.DefaultRepositorySelector.CreateRepository(System.String,System.Type)"/>
- to create a new repository and <see cref="M:log4net.Core.DefaultRepositorySelector.GetRepository(System.String)"/> to retrieve
- a repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.GetAllRepositories">
- <summary>
- Gets a list of <see cref="T:log4net.Repository.ILoggerRepository"/> objects
- </summary>
- <returns>an array of all known <see cref="T:log4net.Repository.ILoggerRepository"/> objects</returns>
- <remarks>
- <para>
- Gets an array of all of the repositories created by this selector.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.AliasRepository(System.String,log4net.Repository.ILoggerRepository)">
- <summary>
- Aliases a repository to an existing repository.
- </summary>
- <param name="repositoryAlias">The repository to alias.</param>
- <param name="repositoryTarget">The repository that the repository is aliased to.</param>
- <remarks>
- <para>
- The repository specified will be aliased to the repository when created.
- The repository must not already exist.
- </para>
- <para>
- When the repository is created it must utilize the same repository type as
- the repository it is aliased to, otherwise the aliasing will fail.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">
- <para><paramref name="repositoryAlias"/> is <see langword="null"/>.</para>
- <para>-or-</para>
- <para><paramref name="repositoryTarget"/> is <see langword="null"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.OnLoggerRepositoryCreatedEvent(log4net.Repository.ILoggerRepository)">
- <summary>
- Notifies the registered listeners that the repository has been created.
- </summary>
- <param name="repository">The repository that has been created.</param>
- <remarks>
- <para>
- Raises the <see cref="E:log4net.Core.DefaultRepositorySelector.LoggerRepositoryCreatedEvent"/> event.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.GetInfoForAssembly(System.Reflection.Assembly,System.String@,System.Type@)">
- <summary>
- Gets the repository name and repository type for the specified assembly.
- </summary>
- <param name="assembly">The assembly that has a <see cref="T:log4net.Config.RepositoryAttribute"/>.</param>
- <param name="repositoryName">in/out param to hold the repository name to use for the assembly, caller should set this to the default value before calling.</param>
- <param name="repositoryType">in/out param to hold the type of the repository to create for the assembly, caller should set this to the default value before calling.</param>
- <exception cref="T:System.ArgumentNullException"><paramref name="assembly"/> is <see langword="null"/>.</exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.ConfigureRepository(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Configures the repository using information from the assembly.
- </summary>
- <param name="assembly">The assembly containing <see cref="T:log4net.Config.ConfiguratorAttribute"/>
- attributes which define the configuration for the repository.</param>
- <param name="repository">The repository to configure.</param>
- <exception cref="T:System.ArgumentNullException">
- <para><paramref name="assembly"/> is <see langword="null"/>.</para>
- <para>-or-</para>
- <para><paramref name="repository"/> is <see langword="null"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.LoadPlugins(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Loads the attribute defined plugins on the assembly.
- </summary>
- <param name="assembly">The assembly that contains the attributes.</param>
- <param name="repository">The repository to add the plugins to.</param>
- <exception cref="T:System.ArgumentNullException">
- <para><paramref name="assembly"/> is <see langword="null"/>.</para>
- <para>-or-</para>
- <para><paramref name="repository"/> is <see langword="null"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Core.DefaultRepositorySelector.LoadAliases(System.Reflection.Assembly,log4net.Repository.ILoggerRepository)">
- <summary>
- Loads the attribute defined aliases on the assembly.
- </summary>
- <param name="assembly">The assembly that contains the attributes.</param>
- <param name="repository">The repository to alias to.</param>
- <exception cref="T:System.ArgumentNullException">
- <para><paramref name="assembly"/> is <see langword="null"/>.</para>
- <para>-or-</para>
- <para><paramref name="repository"/> is <see langword="null"/>.</para>
- </exception>
- </member>
- <member name="E:log4net.Core.DefaultRepositorySelector.LoggerRepositoryCreatedEvent">
- <summary>
- Event to notify that a logger repository has been created.
- </summary>
- <value>
- Event to notify that a logger repository has been created.
- </value>
- <remarks>
- <para>
- Event raised when a new repository is created.
- The event source will be this selector. The event args will
- be a <see cref="T:log4net.Core.LoggerRepositoryCreationEventArgs"/> which
- holds the newly created <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.ErrorCode">
- <summary>
- Defined error codes that can be passed to the <see cref="M:log4net.Core.IErrorHandler.Error(System.String,System.Exception,log4net.Core.ErrorCode)"/> method.
- </summary>
- <remarks>
- <para>
- Values passed to the <see cref="M:log4net.Core.IErrorHandler.Error(System.String,System.Exception,log4net.Core.ErrorCode)"/> method.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Core.ErrorCode.GenericFailure">
- <summary>
- A general error
- </summary>
- </member>
- <member name="F:log4net.Core.ErrorCode.WriteFailure">
- <summary>
- Error while writing output
- </summary>
- </member>
- <member name="F:log4net.Core.ErrorCode.FlushFailure">
- <summary>
- Failed to flush file
- </summary>
- </member>
- <member name="F:log4net.Core.ErrorCode.CloseFailure">
- <summary>
- Failed to close file
- </summary>
- </member>
- <member name="F:log4net.Core.ErrorCode.FileOpenFailure">
- <summary>
- Unable to open output file
- </summary>
- </member>
- <member name="F:log4net.Core.ErrorCode.MissingLayout">
- <summary>
- No layout specified
- </summary>
- </member>
- <member name="F:log4net.Core.ErrorCode.AddressParseFailure">
- <summary>
- Failed to parse address
- </summary>
- </member>
- <member name="T:log4net.Core.IErrorHandler">
- <summary>
- Appenders may delegate their error handling to an <see cref="T:log4net.Core.IErrorHandler"/>.
- </summary>
- <remarks>
- <para>
- Error handling is a particularly tedious to get right because by
- definition errors are hard to predict and to reproduce.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.IErrorHandler.Error(System.String,System.Exception,log4net.Core.ErrorCode)">
- <summary>
- Handles the error and information about the error condition is passed as
- a parameter.
- </summary>
- <param name="message">The message associated with the error.</param>
- <param name="e">The <see cref="T:System.Exception"/> that was thrown when the error occurred.</param>
- <param name="errorCode">The error code associated with the error.</param>
- <remarks>
- <para>
- Handles the error and information about the error condition is passed as
- a parameter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IErrorHandler.Error(System.String,System.Exception)">
- <summary>
- Prints the error message passed as a parameter.
- </summary>
- <param name="message">The message associated with the error.</param>
- <param name="e">The <see cref="T:System.Exception"/> that was thrown when the error occurred.</param>
- <remarks>
- <para>
- See <see cref="M:log4net.Core.IErrorHandler.Error(System.String,System.Exception,log4net.Core.ErrorCode)"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.IErrorHandler.Error(System.String)">
- <summary>
- Prints the error message passed as a parameter.
- </summary>
- <param name="message">The message associated with the error.</param>
- <remarks>
- <para>
- See <see cref="M:log4net.Core.IErrorHandler.Error(System.String,System.Exception,log4net.Core.ErrorCode)"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.IFixingRequired">
- <summary>
- Interface for objects that require fixing.
- </summary>
- <remarks>
- <para>
- Interface that indicates that the object requires fixing before it
- can be taken outside the context of the appender's
- <see cref="M:log4net.Appender.IAppender.DoAppend(log4net.Core.LoggingEvent)"/> method.
- </para>
- <para>
- When objects that implement this interface are stored
- in the context properties maps <see cref="T:log4net.GlobalContext"/>
- <see cref="P:log4net.GlobalContext.Properties"/> and <see cref="T:log4net.ThreadContext"/>
- <see cref="P:log4net.ThreadContext.Properties"/> are fixed
- (see <see cref="P:log4net.Core.LoggingEvent.Fix"/>) the <see cref="M:log4net.Core.IFixingRequired.GetFixedObject"/>
- method will be called.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Core.IFixingRequired.GetFixedObject">
- <summary>
- Get a portable version of this object
- </summary>
- <returns>the portable instance of this object</returns>
- <remarks>
- <para>
- Get a portable instance object that represents the current
- state of this object. The portable object can be stored
- and logged from any thread with identical results.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.ILogger">
- <summary>
- Interface that all loggers implement
- </summary>
- <remarks>
- <para>
- This interface supports logging events and testing if a level
- is enabled for logging.
- </para>
- <para>
- These methods will not throw exceptions. Note to implementor, ensure
- that the implementation of these methods cannot allow an exception
- to be thrown to the caller.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.ILogger.Log(System.Type,log4net.Core.Level,System.Object,System.Exception)">
- <summary>
- This generic form is intended to be used by wrappers.
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <param name="level">The level of the message to be logged.</param>
- <param name="message">The message object to log.</param>
- <param name="exception">the exception to log, including its stack trace. Pass <c>null</c> to not log an exception.</param>
- <remarks>
- <para>
- Generates a logging event for the specified <paramref name="level"/> using
- the <paramref name="message"/> and <paramref name="exception"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.ILogger.Log(log4net.Core.LoggingEvent)">
- <summary>
- This is the most generic printing method that is intended to be used
- by wrappers.
- </summary>
- <param name="logEvent">The event being logged.</param>
- <remarks>
- <para>
- Logs the specified logging event through this logger.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.ILogger.IsEnabledFor(log4net.Core.Level)">
- <summary>
- Checks if this logger is enabled for a given <see cref="T:log4net.Core.Level"/> passed as parameter.
- </summary>
- <param name="level">The level to check.</param>
- <returns>
- <c>true</c> if this logger is enabled for <c>level</c>, otherwise <c>false</c>.
- </returns>
- <remarks>
- <para>
- Test if this logger is going to log events of the specified <paramref name="level"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.ILogger.Name">
- <summary>
- Gets the name of the logger.
- </summary>
- <value>
- The name of the logger.
- </value>
- <remarks>
- <para>
- The name of this logger
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.ILogger.Repository">
- <summary>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> where this
- <c>Logger</c> instance is attached to.
- </summary>
- <value>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that this logger belongs to.
- </value>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> where this
- <c>Logger</c> instance is attached to.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.ILoggerWrapper">
- <summary>
- Base interface for all wrappers
- </summary>
- <remarks>
- <para>
- Base interface for all wrappers.
- </para>
- <para>
- All wrappers must implement this interface.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="P:log4net.Core.ILoggerWrapper.Logger">
- <summary>
- Get the implementation behind this wrapper object.
- </summary>
- <value>
- The <see cref="T:log4net.Core.ILogger"/> object that in implementing this object.
- </value>
- <remarks>
- <para>
- The <see cref="T:log4net.Core.ILogger"/> object that in implementing this
- object. The <c>Logger</c> object may not
- be the same object as this object because of logger decorators.
- This gets the actual underlying objects that is used to process
- the log events.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LoggerRepositoryCreationEventHandler">
- <summary>
- Delegate used to handle logger repository creation event notifications
- </summary>
- <param name="sender">The <see cref="T:log4net.Core.IRepositorySelector"/> which created the repository.</param>
- <param name="e">The <see cref="T:log4net.Core.LoggerRepositoryCreationEventArgs"/> event args
- that holds the <see cref="T:log4net.Repository.ILoggerRepository"/> instance that has been created.</param>
- <remarks>
- <para>
- Delegate used to handle logger repository creation event notifications.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LoggerRepositoryCreationEventArgs">
- <summary>
- Provides data for the <see cref="E:log4net.Core.IRepositorySelector.LoggerRepositoryCreatedEvent"/> event.
- </summary>
- <remarks>
- <para>
- A <see cref="E:log4net.Core.IRepositorySelector.LoggerRepositoryCreatedEvent"/>
- event is raised every time a <see cref="T:log4net.Repository.ILoggerRepository"/> is created.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggerRepositoryCreationEventArgs.m_repository">
- <summary>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created
- </summary>
- </member>
- <member name="M:log4net.Core.LoggerRepositoryCreationEventArgs.#ctor(log4net.Repository.ILoggerRepository)">
- <summary>
- Construct instance using <see cref="T:log4net.Repository.ILoggerRepository"/> specified
- </summary>
- <param name="repository">the <see cref="T:log4net.Repository.ILoggerRepository"/> that has been created</param>
- <remarks>
- <para>
- Construct instance using <see cref="T:log4net.Repository.ILoggerRepository"/> specified
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggerRepositoryCreationEventArgs.LoggerRepository">
- <summary>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that has been created
- </summary>
- <value>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that has been created
- </value>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that has been created
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.ITriggeringEventEvaluator">
- <summary>
- Test if an <see cref="T:log4net.Core.LoggingEvent"/> triggers an action
- </summary>
- <remarks>
- <para>
- Implementations of this interface allow certain appenders to decide
- when to perform an appender specific action.
- </para>
- <para>
- The action or behavior triggered is defined by the implementation.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Core.ITriggeringEventEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)">
- <summary>
- Test if this event triggers the action
- </summary>
- <param name="loggingEvent">The event to check</param>
- <returns><c>true</c> if this event triggers the action, otherwise <c>false</c></returns>
- <remarks>
- <para>
- Return <c>true</c> if this event triggers the action
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.Level">
- <summary>
- Defines the default set of levels recognized by the system.
- </summary>
- <remarks>
- <para>
- Each <see cref="T:log4net.Core.LoggingEvent"/> has an associated <see cref="T:log4net.Core.Level"/>.
- </para>
- <para>
- Levels have a numeric <see cref="P:log4net.Core.Level.Value"/> that defines the relative
- ordering between levels. Two Levels with the same <see cref="P:log4net.Core.Level.Value"/>
- are deemed to be equivalent.
- </para>
- <para>
- The levels that are recognized by log4net are set for each <see cref="T:log4net.Repository.ILoggerRepository"/>
- and each repository can have different levels defined. The levels are stored
- in the <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/> on the repository. Levels are
- looked up by name from the <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/>.
- </para>
- <para>
- When logging at level INFO the actual level used is not <see cref="F:log4net.Core.Level.Info"/> but
- the value of <c>LoggerRepository.LevelMap["INFO"]</c>. The default value for this is
- <see cref="F:log4net.Core.Level.Info"/>, but this can be changed by reconfiguring the level map.
- </para>
- <para>
- Each level has a <see cref="P:log4net.Core.Level.DisplayName"/> in addition to its <see cref="P:log4net.Core.Level.Name"/>. The
- <see cref="P:log4net.Core.Level.DisplayName"/> is the string that is written into the output log. By default
- the display name is the same as the level name, but this can be used to alias levels
- or to localize the log output.
- </para>
- <para>
- Some of the predefined levels recognized by the system are:
- </para>
- <list type="bullet">
- <item>
- <description><see cref="F:log4net.Core.Level.Off"/>.</description>
- </item>
- <item>
- <description><see cref="F:log4net.Core.Level.Fatal"/>.</description>
- </item>
- <item>
- <description><see cref="F:log4net.Core.Level.Error"/>.</description>
- </item>
- <item>
- <description><see cref="F:log4net.Core.Level.Warn"/>.</description>
- </item>
- <item>
- <description><see cref="F:log4net.Core.Level.Info"/>.</description>
- </item>
- <item>
- <description><see cref="F:log4net.Core.Level.Debug"/>.</description>
- </item>
- <item>
- <description><see cref="F:log4net.Core.Level.All"/>.</description>
- </item>
- </list>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.Level.#ctor(System.Int32,System.String,System.String)">
- <summary>
- Constructor
- </summary>
- <param name="level">Integer value for this level, higher values represent more severe levels.</param>
- <param name="levelName">The string name of this level.</param>
- <param name="displayName">The display name for this level. This may be localized or otherwise different from the name</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.Level"/> class with
- the specified level name and value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.#ctor(System.Int32,System.String)">
- <summary>
- Constructor
- </summary>
- <param name="level">Integer value for this level, higher values represent more severe levels.</param>
- <param name="levelName">The string name of this level.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.Level"/> class with
- the specified level name and value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.ToString">
- <summary>
- Returns the <see cref="T:System.String"/> representation of the current
- <see cref="T:log4net.Core.Level"/>.
- </summary>
- <returns>
- A <see cref="T:System.String"/> representation of the current <see cref="T:log4net.Core.Level"/>.
- </returns>
- <remarks>
- <para>
- Returns the level <see cref="P:log4net.Core.Level.Name"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.Equals(System.Object)">
- <summary>
- Compares levels.
- </summary>
- <param name="o">The object to compare against.</param>
- <returns><c>true</c> if the objects are equal.</returns>
- <remarks>
- <para>
- Compares the levels of <see cref="T:log4net.Core.Level"/> instances, and
- defers to base class if the target object is not a <see cref="T:log4net.Core.Level"/>
- instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.GetHashCode">
- <summary>
- Returns a hash code
- </summary>
- <returns>A hash code for the current <see cref="T:log4net.Core.Level"/>.</returns>
- <remarks>
- <para>
- Returns a hash code suitable for use in hashing algorithms and data
- structures like a hash table.
- </para>
- <para>
- Returns the hash code of the level <see cref="P:log4net.Core.Level.Value"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.CompareTo(System.Object)">
- <summary>
- Compares this instance to a specified object and returns an
- indication of their relative values.
- </summary>
- <param name="r">A <see cref="T:log4net.Core.Level"/> instance or <see langword="null"/> to compare with this instance.</param>
- <returns>
- A 32-bit signed integer that indicates the relative order of the
- values compared. The return value has these meanings:
- <list type="table">
- <listheader>
- <term>Value</term>
- <description>Meaning</description>
- </listheader>
- <item>
- <term>Less than zero</term>
- <description>This instance is less than <paramref name="r"/>.</description>
- </item>
- <item>
- <term>Zero</term>
- <description>This instance is equal to <paramref name="r"/>.</description>
- </item>
- <item>
- <term>Greater than zero</term>
- <description>
- <para>This instance is greater than <paramref name="r"/>.</para>
- <para>-or-</para>
- <para><paramref name="r"/> is <see langword="null"/>.</para>
- </description>
- </item>
- </list>
- </returns>
- <remarks>
- <para>
- <paramref name="r"/> must be an instance of <see cref="T:log4net.Core.Level"/>
- or <see langword="null"/>; otherwise, an exception is thrown.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentException"><paramref name="r"/> is not a <see cref="T:log4net.Core.Level"/>.</exception>
- </member>
- <member name="M:log4net.Core.Level.op_GreaterThan(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Returns a value indicating whether a specified <see cref="T:log4net.Core.Level"/>
- is greater than another specified <see cref="T:log4net.Core.Level"/>.
- </summary>
- <param name="l">A <see cref="T:log4net.Core.Level"/></param>
- <param name="r">A <see cref="T:log4net.Core.Level"/></param>
- <returns>
- <c>true</c> if <paramref name="l"/> is greater than
- <paramref name="r"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.op_LessThan(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Returns a value indicating whether a specified <see cref="T:log4net.Core.Level"/>
- is less than another specified <see cref="T:log4net.Core.Level"/>.
- </summary>
- <param name="l">A <see cref="T:log4net.Core.Level"/></param>
- <param name="r">A <see cref="T:log4net.Core.Level"/></param>
- <returns>
- <c>true</c> if <paramref name="l"/> is less than
- <paramref name="r"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.op_GreaterThanOrEqual(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Returns a value indicating whether a specified <see cref="T:log4net.Core.Level"/>
- is greater than or equal to another specified <see cref="T:log4net.Core.Level"/>.
- </summary>
- <param name="l">A <see cref="T:log4net.Core.Level"/></param>
- <param name="r">A <see cref="T:log4net.Core.Level"/></param>
- <returns>
- <c>true</c> if <paramref name="l"/> is greater than or equal to
- <paramref name="r"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.op_LessThanOrEqual(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Returns a value indicating whether a specified <see cref="T:log4net.Core.Level"/>
- is less than or equal to another specified <see cref="T:log4net.Core.Level"/>.
- </summary>
- <param name="l">A <see cref="T:log4net.Core.Level"/></param>
- <param name="r">A <see cref="T:log4net.Core.Level"/></param>
- <returns>
- <c>true</c> if <paramref name="l"/> is less than or equal to
- <paramref name="r"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.op_Equality(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Returns a value indicating whether two specified <see cref="T:log4net.Core.Level"/>
- objects have the same value.
- </summary>
- <param name="l">A <see cref="T:log4net.Core.Level"/> or <see langword="null"/>.</param>
- <param name="r">A <see cref="T:log4net.Core.Level"/> or <see langword="null"/>.</param>
- <returns>
- <c>true</c> if the value of <paramref name="l"/> is the same as the
- value of <paramref name="r"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.op_Inequality(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Returns a value indicating whether two specified <see cref="T:log4net.Core.Level"/>
- objects have different values.
- </summary>
- <param name="l">A <see cref="T:log4net.Core.Level"/> or <see langword="null"/>.</param>
- <param name="r">A <see cref="T:log4net.Core.Level"/> or <see langword="null"/>.</param>
- <returns>
- <c>true</c> if the value of <paramref name="l"/> is different from
- the value of <paramref name="r"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.Level.Compare(log4net.Core.Level,log4net.Core.Level)">
- <summary>
- Compares two specified <see cref="T:log4net.Core.Level"/> instances.
- </summary>
- <param name="l">The first <see cref="T:log4net.Core.Level"/> to compare.</param>
- <param name="r">The second <see cref="T:log4net.Core.Level"/> to compare.</param>
- <returns>
- A 32-bit signed integer that indicates the relative order of the
- two values compared. The return value has these meanings:
- <list type="table">
- <listheader>
- <term>Value</term>
- <description>Meaning</description>
- </listheader>
- <item>
- <term>Less than zero</term>
- <description><paramref name="l"/> is less than <paramref name="r"/>.</description>
- </item>
- <item>
- <term>Zero</term>
- <description><paramref name="l"/> is equal to <paramref name="r"/>.</description>
- </item>
- <item>
- <term>Greater than zero</term>
- <description><paramref name="l"/> is greater than <paramref name="r"/>.</description>
- </item>
- </list>
- </returns>
- <remarks>
- <para>
- Compares two levels.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.Level.Off">
- <summary>
- The <see cref="F:log4net.Core.Level.Off"/> level designates a higher level than all the rest.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Emergency">
- <summary>
- The <see cref="F:log4net.Core.Level.Emergency"/> level designates very severe error events.
- System unusable, emergencies.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Fatal">
- <summary>
- The <see cref="F:log4net.Core.Level.Fatal"/> level designates very severe error events
- that will presumably lead the application to abort.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Alert">
- <summary>
- The <see cref="F:log4net.Core.Level.Alert"/> level designates very severe error events.
- Take immediate action, alerts.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Critical">
- <summary>
- The <see cref="F:log4net.Core.Level.Critical"/> level designates very severe error events.
- Critical condition, critical.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Severe">
- <summary>
- The <see cref="F:log4net.Core.Level.Severe"/> level designates very severe error events.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Error">
- <summary>
- The <see cref="F:log4net.Core.Level.Error"/> level designates error events that might
- still allow the application to continue running.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Warn">
- <summary>
- The <see cref="F:log4net.Core.Level.Warn"/> level designates potentially harmful
- situations.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Notice">
- <summary>
- The <see cref="F:log4net.Core.Level.Notice"/> level designates informational messages
- that highlight the progress of the application at the highest level.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Info">
- <summary>
- The <see cref="F:log4net.Core.Level.Info"/> level designates informational messages that
- highlight the progress of the application at coarse-grained level.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Debug">
- <summary>
- The <see cref="F:log4net.Core.Level.Debug"/> level designates fine-grained informational
- events that are most useful to debug an application.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Fine">
- <summary>
- The <see cref="F:log4net.Core.Level.Fine"/> level designates fine-grained informational
- events that are most useful to debug an application.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Trace">
- <summary>
- The <see cref="F:log4net.Core.Level.Trace"/> level designates fine-grained informational
- events that are most useful to debug an application.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Finer">
- <summary>
- The <see cref="F:log4net.Core.Level.Finer"/> level designates fine-grained informational
- events that are most useful to debug an application.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Verbose">
- <summary>
- The <see cref="F:log4net.Core.Level.Verbose"/> level designates fine-grained informational
- events that are most useful to debug an application.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.Finest">
- <summary>
- The <see cref="F:log4net.Core.Level.Finest"/> level designates fine-grained informational
- events that are most useful to debug an application.
- </summary>
- </member>
- <member name="F:log4net.Core.Level.All">
- <summary>
- The <see cref="F:log4net.Core.Level.All"/> level designates the lowest level possible.
- </summary>
- </member>
- <member name="P:log4net.Core.Level.Name">
- <summary>
- Gets the name of this level.
- </summary>
- <value>
- The name of this level.
- </value>
- <remarks>
- <para>
- Gets the name of this level.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.Level.Value">
- <summary>
- Gets the value of this level.
- </summary>
- <value>
- The value of this level.
- </value>
- <remarks>
- <para>
- Gets the value of this level.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.Level.DisplayName">
- <summary>
- Gets the display name of this level.
- </summary>
- <value>
- The display name of this level.
- </value>
- <remarks>
- <para>
- Gets the display name of this level.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LevelCollection">
- <summary>
- A strongly-typed collection of <see cref="T:log4net.Core.Level"/> objects.
- </summary>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Core.LevelCollection.ReadOnly(log4net.Core.LevelCollection)">
- <summary>
- Creates a read-only wrapper for a <c>LevelCollection</c> instance.
- </summary>
- <param name="list">list to create a readonly wrapper arround</param>
- <returns>
- A <c>LevelCollection</c> wrapper that is read-only.
- </returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.#ctor">
- <summary>
- Initializes a new instance of the <c>LevelCollection</c> class
- that is empty and has the default initial capacity.
- </summary>
- </member>
- <member name="M:log4net.Core.LevelCollection.#ctor(System.Int32)">
- <summary>
- Initializes a new instance of the <c>LevelCollection</c> class
- that has the specified initial capacity.
- </summary>
- <param name="capacity">
- The number of elements that the new <c>LevelCollection</c> is initially capable of storing.
- </param>
- </member>
- <member name="M:log4net.Core.LevelCollection.#ctor(log4net.Core.LevelCollection)">
- <summary>
- Initializes a new instance of the <c>LevelCollection</c> class
- that contains elements copied from the specified <c>LevelCollection</c>.
- </summary>
- <param name="c">The <c>LevelCollection</c> whose elements are copied to the new collection.</param>
- </member>
- <member name="M:log4net.Core.LevelCollection.#ctor(log4net.Core.Level[])">
- <summary>
- Initializes a new instance of the <c>LevelCollection</c> class
- that contains elements copied from the specified <see cref="T:log4net.Core.Level"/> array.
- </summary>
- <param name="a">The <see cref="T:log4net.Core.Level"/> array whose elements are copied to the new list.</param>
- </member>
- <member name="M:log4net.Core.LevelCollection.#ctor(System.Collections.ICollection)">
- <summary>
- Initializes a new instance of the <c>LevelCollection</c> class
- that contains elements copied from the specified <see cref="T:log4net.Core.Level"/> collection.
- </summary>
- <param name="col">The <see cref="T:log4net.Core.Level"/> collection whose elements are copied to the new list.</param>
- </member>
- <member name="M:log4net.Core.LevelCollection.#ctor(log4net.Core.LevelCollection.Tag)">
- <summary>
- Allow subclasses to avoid our default constructors
- </summary>
- <param name="tag"></param>
- </member>
- <member name="M:log4net.Core.LevelCollection.CopyTo(log4net.Core.Level[])">
- <summary>
- Copies the entire <c>LevelCollection</c> to a one-dimensional
- <see cref="T:log4net.Core.Level"/> array.
- </summary>
- <param name="array">The one-dimensional <see cref="T:log4net.Core.Level"/> array to copy to.</param>
- </member>
- <member name="M:log4net.Core.LevelCollection.CopyTo(log4net.Core.Level[],System.Int32)">
- <summary>
- Copies the entire <c>LevelCollection</c> to a one-dimensional
- <see cref="T:log4net.Core.Level"/> array, starting at the specified index of the target array.
- </summary>
- <param name="array">The one-dimensional <see cref="T:log4net.Core.Level"/> array to copy to.</param>
- <param name="start">The zero-based index in <paramref name="array"/> at which copying begins.</param>
- </member>
- <member name="M:log4net.Core.LevelCollection.Add(log4net.Core.Level)">
- <summary>
- Adds a <see cref="T:log4net.Core.Level"/> to the end of the <c>LevelCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Core.Level"/> to be added to the end of the <c>LevelCollection</c>.</param>
- <returns>The index at which the value has been added.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.Clear">
- <summary>
- Removes all elements from the <c>LevelCollection</c>.
- </summary>
- </member>
- <member name="M:log4net.Core.LevelCollection.Clone">
- <summary>
- Creates a shallow copy of the <see cref="T:log4net.Core.LevelCollection"/>.
- </summary>
- <returns>A new <see cref="T:log4net.Core.LevelCollection"/> with a shallow copy of the collection data.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.Contains(log4net.Core.Level)">
- <summary>
- Determines whether a given <see cref="T:log4net.Core.Level"/> is in the <c>LevelCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Core.Level"/> to check for.</param>
- <returns><c>true</c> if <paramref name="item"/> is found in the <c>LevelCollection</c>; otherwise, <c>false</c>.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.IndexOf(log4net.Core.Level)">
- <summary>
- Returns the zero-based index of the first occurrence of a <see cref="T:log4net.Core.Level"/>
- in the <c>LevelCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Core.Level"/> to locate in the <c>LevelCollection</c>.</param>
- <returns>
- The zero-based index of the first occurrence of <paramref name="item"/>
- in the entire <c>LevelCollection</c>, if found; otherwise, -1.
- </returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.Insert(System.Int32,log4net.Core.Level)">
- <summary>
- Inserts an element into the <c>LevelCollection</c> at the specified index.
- </summary>
- <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
- <param name="item">The <see cref="T:log4net.Core.Level"/> to insert.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Core.LevelCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Core.LevelCollection.Remove(log4net.Core.Level)">
- <summary>
- Removes the first occurrence of a specific <see cref="T:log4net.Core.Level"/> from the <c>LevelCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Core.Level"/> to remove from the <c>LevelCollection</c>.</param>
- <exception cref="T:System.ArgumentException">
- The specified <see cref="T:log4net.Core.Level"/> was not found in the <c>LevelCollection</c>.
- </exception>
- </member>
- <member name="M:log4net.Core.LevelCollection.RemoveAt(System.Int32)">
- <summary>
- Removes the element at the specified index of the <c>LevelCollection</c>.
- </summary>
- <param name="index">The zero-based index of the element to remove.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Core.LevelCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Core.LevelCollection.GetEnumerator">
- <summary>
- Returns an enumerator that can iterate through the <c>LevelCollection</c>.
- </summary>
- <returns>An <see cref="T:log4net.Core.LevelCollection.Enumerator"/> for the entire <c>LevelCollection</c>.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.AddRange(log4net.Core.LevelCollection)">
- <summary>
- Adds the elements of another <c>LevelCollection</c> to the current <c>LevelCollection</c>.
- </summary>
- <param name="x">The <c>LevelCollection</c> whose elements should be added to the end of the current <c>LevelCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Core.LevelCollection.Count"/> of the <c>LevelCollection</c>.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.AddRange(log4net.Core.Level[])">
- <summary>
- Adds the elements of a <see cref="T:log4net.Core.Level"/> array to the current <c>LevelCollection</c>.
- </summary>
- <param name="x">The <see cref="T:log4net.Core.Level"/> array whose elements should be added to the end of the <c>LevelCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Core.LevelCollection.Count"/> of the <c>LevelCollection</c>.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.AddRange(System.Collections.ICollection)">
- <summary>
- Adds the elements of a <see cref="T:log4net.Core.Level"/> collection to the current <c>LevelCollection</c>.
- </summary>
- <param name="col">The <see cref="T:log4net.Core.Level"/> collection whose elements should be added to the end of the <c>LevelCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Core.LevelCollection.Count"/> of the <c>LevelCollection</c>.</returns>
- </member>
- <member name="M:log4net.Core.LevelCollection.TrimToSize">
- <summary>
- Sets the capacity to the actual number of elements.
- </summary>
- </member>
- <member name="M:log4net.Core.LevelCollection.ValidateIndex(System.Int32)">
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Core.LevelCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Core.LevelCollection.ValidateIndex(System.Int32,System.Boolean)">
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Core.LevelCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="P:log4net.Core.LevelCollection.Count">
- <summary>
- Gets the number of elements actually contained in the <c>LevelCollection</c>.
- </summary>
- </member>
- <member name="P:log4net.Core.LevelCollection.IsSynchronized">
- <summary>
- Gets a value indicating whether access to the collection is synchronized (thread-safe).
- </summary>
- <value>true if access to the ICollection is synchronized (thread-safe); otherwise, false.</value>
- </member>
- <member name="P:log4net.Core.LevelCollection.SyncRoot">
- <summary>
- Gets an object that can be used to synchronize access to the collection.
- </summary>
- </member>
- <member name="P:log4net.Core.LevelCollection.Item(System.Int32)">
- <summary>
- Gets or sets the <see cref="T:log4net.Core.Level"/> at the specified index.
- </summary>
- <param name="index">The zero-based index of the element to get or set.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Core.LevelCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="P:log4net.Core.LevelCollection.IsFixedSize">
- <summary>
- Gets a value indicating whether the collection has a fixed size.
- </summary>
- <value>true if the collection has a fixed size; otherwise, false. The default is false</value>
- </member>
- <member name="P:log4net.Core.LevelCollection.IsReadOnly">
- <summary>
- Gets a value indicating whether the IList is read-only.
- </summary>
- <value>true if the collection is read-only; otherwise, false. The default is false</value>
- </member>
- <member name="P:log4net.Core.LevelCollection.Capacity">
- <summary>
- Gets or sets the number of elements the <c>LevelCollection</c> can contain.
- </summary>
- </member>
- <member name="T:log4net.Core.LevelCollection.ILevelCollectionEnumerator">
- <summary>
- Supports type-safe iteration over a <see cref="T:log4net.Core.LevelCollection"/>.
- </summary>
- </member>
- <member name="M:log4net.Core.LevelCollection.ILevelCollectionEnumerator.MoveNext">
- <summary>
- Advances the enumerator to the next element in the collection.
- </summary>
- <returns>
- <c>true</c> if the enumerator was successfully advanced to the next element;
- <c>false</c> if the enumerator has passed the end of the collection.
- </returns>
- <exception cref="T:System.InvalidOperationException">
- The collection was modified after the enumerator was created.
- </exception>
- </member>
- <member name="M:log4net.Core.LevelCollection.ILevelCollectionEnumerator.Reset">
- <summary>
- Sets the enumerator to its initial position, before the first element in the collection.
- </summary>
- </member>
- <member name="P:log4net.Core.LevelCollection.ILevelCollectionEnumerator.Current">
- <summary>
- Gets the current element in the collection.
- </summary>
- </member>
- <member name="T:log4net.Core.LevelCollection.Tag">
- <summary>
- Type visible only to our subclasses
- Used to access protected constructor
- </summary>
- </member>
- <member name="F:log4net.Core.LevelCollection.Tag.Default">
- <summary>
- A value
- </summary>
- </member>
- <member name="T:log4net.Core.LevelCollection.Enumerator">
- <summary>
- Supports simple iteration over a <see cref="T:log4net.Core.LevelCollection"/>.
- </summary>
- </member>
- <member name="M:log4net.Core.LevelCollection.Enumerator.#ctor(log4net.Core.LevelCollection)">
- <summary>
- Initializes a new instance of the <c>Enumerator</c> class.
- </summary>
- <param name="tc"></param>
- </member>
- <member name="M:log4net.Core.LevelCollection.Enumerator.MoveNext">
- <summary>
- Advances the enumerator to the next element in the collection.
- </summary>
- <returns>
- <c>true</c> if the enumerator was successfully advanced to the next element;
- <c>false</c> if the enumerator has passed the end of the collection.
- </returns>
- <exception cref="T:System.InvalidOperationException">
- The collection was modified after the enumerator was created.
- </exception>
- </member>
- <member name="M:log4net.Core.LevelCollection.Enumerator.Reset">
- <summary>
- Sets the enumerator to its initial position, before the first element in the collection.
- </summary>
- </member>
- <member name="P:log4net.Core.LevelCollection.Enumerator.Current">
- <summary>
- Gets the current element in the collection.
- </summary>
- </member>
- <member name="T:log4net.Core.LevelEvaluator">
- <summary>
- An evaluator that triggers at a threshold level
- </summary>
- <remarks>
- <para>
- This evaluator will trigger if the level of the event
- passed to <see cref="M:log4net.Core.LevelEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)"/>
- is equal to or greater than the <see cref="P:log4net.Core.LevelEvaluator.Threshold"/>
- level.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Core.LevelEvaluator.m_threshold">
- <summary>
- The threshold for triggering
- </summary>
- </member>
- <member name="M:log4net.Core.LevelEvaluator.#ctor">
- <summary>
- Create a new evaluator using the <see cref="F:log4net.Core.Level.Off"/> threshold.
- </summary>
- <remarks>
- <para>
- Create a new evaluator using the <see cref="F:log4net.Core.Level.Off"/> threshold.
- </para>
- <para>
- This evaluator will trigger if the level of the event
- passed to <see cref="M:log4net.Core.LevelEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)"/>
- is equal to or greater than the <see cref="P:log4net.Core.LevelEvaluator.Threshold"/>
- level.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LevelEvaluator.#ctor(log4net.Core.Level)">
- <summary>
- Create a new evaluator using the specified <see cref="T:log4net.Core.Level"/> threshold.
- </summary>
- <param name="threshold">the threshold to trigger at</param>
- <remarks>
- <para>
- Create a new evaluator using the specified <see cref="T:log4net.Core.Level"/> threshold.
- </para>
- <para>
- This evaluator will trigger if the level of the event
- passed to <see cref="M:log4net.Core.LevelEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)"/>
- is equal to or greater than the <see cref="P:log4net.Core.LevelEvaluator.Threshold"/>
- level.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LevelEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)">
- <summary>
- Is this <paramref name="loggingEvent"/> the triggering event?
- </summary>
- <param name="loggingEvent">The event to check</param>
- <returns>This method returns <c>true</c>, if the event level
- is equal or higher than the <see cref="P:log4net.Core.LevelEvaluator.Threshold"/>.
- Otherwise it returns <c>false</c></returns>
- <remarks>
- <para>
- This evaluator will trigger if the level of the event
- passed to <see cref="M:log4net.Core.LevelEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)"/>
- is equal to or greater than the <see cref="P:log4net.Core.LevelEvaluator.Threshold"/>
- level.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LevelEvaluator.Threshold">
- <summary>
- the threshold to trigger at
- </summary>
- <value>
- The <see cref="T:log4net.Core.Level"/> that will cause this evaluator to trigger
- </value>
- <remarks>
- <para>
- This evaluator will trigger if the level of the event
- passed to <see cref="M:log4net.Core.LevelEvaluator.IsTriggeringEvent(log4net.Core.LoggingEvent)"/>
- is equal to or greater than the <see cref="P:log4net.Core.LevelEvaluator.Threshold"/>
- level.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LevelMap">
- <summary>
- Mapping between string name and Level object
- </summary>
- <remarks>
- <para>
- Mapping between string name and <see cref="T:log4net.Core.Level"/> object.
- This mapping is held separately for each <see cref="T:log4net.Repository.ILoggerRepository"/>.
- The level name is case insensitive.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Core.LevelMap.m_mapName2Level">
- <summary>
- Mapping from level name to Level object. The
- level name is case insensitive
- </summary>
- </member>
- <member name="M:log4net.Core.LevelMap.#ctor">
- <summary>
- Construct the level map
- </summary>
- <remarks>
- <para>
- Construct the level map.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LevelMap.Clear">
- <summary>
- Clear the internal maps of all levels
- </summary>
- <remarks>
- <para>
- Clear the internal maps of all levels
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LevelMap.Add(System.String,System.Int32)">
- <summary>
- Create a new Level and add it to the map
- </summary>
- <param name="name">the string to display for the Level</param>
- <param name="value">the level value to give to the Level</param>
- <remarks>
- <para>
- Create a new Level and add it to the map
- </para>
- </remarks>
- <seealso cref="M:log4net.Core.LevelMap.Add(System.String,System.Int32,System.String)"/>
- </member>
- <member name="M:log4net.Core.LevelMap.Add(System.String,System.Int32,System.String)">
- <summary>
- Create a new Level and add it to the map
- </summary>
- <param name="name">the string to display for the Level</param>
- <param name="value">the level value to give to the Level</param>
- <param name="displayName">the display name to give to the Level</param>
- <remarks>
- <para>
- Create a new Level and add it to the map
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LevelMap.Add(log4net.Core.Level)">
- <summary>
- Add a Level to the map
- </summary>
- <param name="level">the Level to add</param>
- <remarks>
- <para>
- Add a Level to the map
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LevelMap.LookupWithDefault(log4net.Core.Level)">
- <summary>
- Lookup a named level from the map
- </summary>
- <param name="defaultLevel">the name of the level to lookup is taken from this level.
- If the level is not set on the map then this level is added</param>
- <returns>the level in the map with the name specified</returns>
- <remarks>
- <para>
- Lookup a named level from the map. The name of the level to lookup is taken
- from the <see cref="P:log4net.Core.Level.Name"/> property of the <paramref name="defaultLevel"/>
- argument.
- </para>
- <para>
- If no level with the specified name is found then the
- <paramref name="defaultLevel"/> argument is added to the level map
- and returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LevelMap.Item(System.String)">
- <summary>
- Lookup a <see cref="T:log4net.Core.Level"/> by name
- </summary>
- <param name="name">The name of the Level to lookup</param>
- <returns>a Level from the map with the name specified</returns>
- <remarks>
- <para>
- Returns the <see cref="T:log4net.Core.Level"/> from the
- map with the name specified. If the no level is
- found then <c>null</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LevelMap.AllLevels">
- <summary>
- Return all possible levels as a list of Level objects.
- </summary>
- <returns>all possible levels as a list of Level objects</returns>
- <remarks>
- <para>
- Return all possible levels as a list of Level objects.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LocationInfo">
- <summary>
- The internal representation of caller location information.
- </summary>
- <remarks>
- <para>
- This class uses the <c>System.Diagnostics.StackTrace</c> class to generate
- a call stack. The caller's information is then extracted from this stack.
- </para>
- <para>
- The <c>System.Diagnostics.StackTrace</c> class is not supported on the
- .NET Compact Framework 1.0 therefore caller location information is not
- available on that framework.
- </para>
- <para>
- The <c>System.Diagnostics.StackTrace</c> class has this to say about Release builds:
- </para>
- <para>
- "StackTrace information will be most informative with Debug build configurations.
- By default, Debug builds include debug symbols, while Release builds do not. The
- debug symbols contain most of the file, method name, line number, and column
- information used in constructing StackFrame and StackTrace objects. StackTrace
- might not report as many method calls as expected, due to code transformations
- that occur during optimization."
- </para>
- <para>
- This means that in a Release build the caller information may be incomplete or may
- not exist at all! Therefore caller location information cannot be relied upon in a Release build.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Core.LocationInfo.NA">
- <summary>
- When location information is not available the constant
- <c>NA</c> is returned. Current value of this string
- constant is <b>?</b>.
- </summary>
- </member>
- <member name="M:log4net.Core.LocationInfo.#ctor(System.Type)">
- <summary>
- Constructor
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LocationInfo"/>
- class based on the current thread.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LocationInfo.#ctor(System.String,System.String,System.String,System.String)">
- <summary>
- Constructor
- </summary>
- <param name="className">The fully qualified class name.</param>
- <param name="methodName">The method name.</param>
- <param name="fileName">The file name.</param>
- <param name="lineNumber">The line number of the method within the file.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LocationInfo"/>
- class with the specified data.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LocationInfo.ClassName">
- <summary>
- Gets the fully qualified class name of the caller making the logging
- request.
- </summary>
- <value>
- The fully qualified class name of the caller making the logging
- request.
- </value>
- <remarks>
- <para>
- Gets the fully qualified class name of the caller making the logging
- request.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LocationInfo.FileName">
- <summary>
- Gets the file name of the caller.
- </summary>
- <value>
- The file name of the caller.
- </value>
- <remarks>
- <para>
- Gets the file name of the caller.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LocationInfo.LineNumber">
- <summary>
- Gets the line number of the caller.
- </summary>
- <value>
- The line number of the caller.
- </value>
- <remarks>
- <para>
- Gets the line number of the caller.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LocationInfo.MethodName">
- <summary>
- Gets the method name of the caller.
- </summary>
- <value>
- The method name of the caller.
- </value>
- <remarks>
- <para>
- Gets the method name of the caller.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LocationInfo.FullInfo">
- <summary>
- Gets all available caller information
- </summary>
- <value>
- All available caller information, in the format
- <c>fully.qualified.classname.of.caller.methodName(Filename:line)</c>
- </value>
- <remarks>
- <para>
- Gets all available caller information, in the format
- <c>fully.qualified.classname.of.caller.methodName(Filename:line)</c>
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LoggerManager">
- <summary>
- Static manager that controls the creation of repositories
- </summary>
- <remarks>
- <para>
- Static manager that controls the creation of repositories
- </para>
- <para>
- This class is used by the wrapper managers (e.g. <see cref="T:log4net.LogManager"/>)
- to provide access to the <see cref="T:log4net.Core.ILogger"/> objects.
- </para>
- <para>
- This manager also holds the <see cref="T:log4net.Core.IRepositorySelector"/> that is used to
- lookup and create repositories. The selector can be set either programmatically using
- the <see cref="P:log4net.Core.LoggerManager.RepositorySelector"/> property, or by setting the <c>log4net.RepositorySelector</c>
- AppSetting in the applications config file to the fully qualified type name of the
- selector to use.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.LoggerManager.#ctor">
- <summary>
- Private constructor to prevent instances. Only static methods should be used.
- </summary>
- <remarks>
- <para>
- Private constructor to prevent instances. Only static methods should be used.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.#cctor">
- <summary>
- Hook the shutdown event
- </summary>
- <remarks>
- <para>
- On the full .NET runtime, the static constructor hooks up the
- <c>AppDomain.ProcessExit</c> and <c>AppDomain.DomainUnload</c>> events.
- These are used to shutdown the log4net system as the application exits.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.RegisterAppDomainEvents">
- <summary>
- Register for ProcessExit and DomainUnload events on the AppDomain
- </summary>
- <remarks>
- <para>
- This needs to be in a separate method because the events make
- a LinkDemand for the ControlAppDomain SecurityPermission. Because
- this is a LinkDemand it is demanded at JIT time. Therefore we cannot
- catch the exception in the method itself, we have to catch it in the
- caller.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetLoggerRepository(System.String)">
- <summary>
- Return the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <param name="repository">the repository to lookup in</param>
- <returns>Return the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the <paramref name="repository"/> argument.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetLoggerRepository(System.Reflection.Assembly)">
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.</returns>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetRepository(System.String)">
- <summary>
- Return the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <param name="repository">the repository to lookup in</param>
- <returns>Return the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the <paramref name="repository"/> argument.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetRepository(System.Reflection.Assembly)">
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.</returns>
- <remarks>
- <para>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.Exists(System.String,System.String)">
- <summary>
- Returns the named logger if it exists.
- </summary>
- <param name="repository">The repository to lookup in.</param>
- <param name="name">The fully qualified logger name to look for.</param>
- <returns>
- The logger found, or <c>null</c> if the named logger does not exist in the
- specified repository.
- </returns>
- <remarks>
- <para>
- If the named logger exists (in the specified repository) then it
- returns a reference to the logger, otherwise it returns
- <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.Exists(System.Reflection.Assembly,System.String)">
- <summary>
- Returns the named logger if it exists.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <param name="name">The fully qualified logger name to look for.</param>
- <returns>
- The logger found, or <c>null</c> if the named logger does not exist in the
- specified assembly's repository.
- </returns>
- <remarks>
- <para>
- If the named logger exists (in the specified assembly's repository) then it
- returns a reference to the logger, otherwise it returns
- <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetCurrentLoggers(System.String)">
- <summary>
- Returns all the currently defined loggers in the specified repository.
- </summary>
- <param name="repository">The repository to lookup in.</param>
- <returns>All the defined loggers.</returns>
- <remarks>
- <para>
- The root logger is <b>not</b> included in the returned array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetCurrentLoggers(System.Reflection.Assembly)">
- <summary>
- Returns all the currently defined loggers in the specified assembly's repository.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <returns>All the defined loggers.</returns>
- <remarks>
- <para>
- The root logger is <b>not</b> included in the returned array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetLogger(System.String,System.String)">
- <summary>
- Retrieves or creates a named logger.
- </summary>
- <param name="repository">The repository to lookup in.</param>
- <param name="name">The name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- <remarks>
- <para>
- Retrieves a logger named as the <paramref name="name"/>
- parameter. If the named logger already exists, then the
- existing instance will be returned. Otherwise, a new instance is
- created.
- </para>
- <para>
- By default, loggers do not have a set level but inherit
- it from the hierarchy. This is one of the central features of
- log4net.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetLogger(System.Reflection.Assembly,System.String)">
- <summary>
- Retrieves or creates a named logger.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <param name="name">The name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- <remarks>
- <para>
- Retrieves a logger named as the <paramref name="name"/>
- parameter. If the named logger already exists, then the
- existing instance will be returned. Otherwise, a new instance is
- created.
- </para>
- <para>
- By default, loggers do not have a set level but inherit
- it from the hierarchy. This is one of the central features of
- log4net.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetLogger(System.String,System.Type)">
- <summary>
- Shorthand for <see cref="M:log4net.LogManager.GetLogger(System.String)"/>.
- </summary>
- <param name="repository">The repository to lookup in.</param>
- <param name="type">The <paramref name="type"/> of which the fullname will be used as the name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- <remarks>
- <para>
- Gets the logger for the fully qualified name of the type specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetLogger(System.Reflection.Assembly,System.Type)">
- <summary>
- Shorthand for <see cref="M:log4net.LogManager.GetLogger(System.String)"/>.
- </summary>
- <param name="repositoryAssembly">the assembly to use to lookup the repository</param>
- <param name="type">The <paramref name="type"/> of which the fullname will be used as the name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- <remarks>
- <para>
- Gets the logger for the fully qualified name of the type specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.Shutdown">
- <summary>
- Shuts down the log4net system.
- </summary>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in all the
- default repositories.
- </para>
- <para>
- Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>
- The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.ShutdownRepository(System.String)">
- <summary>
- Shuts down the repository for the repository specified.
- </summary>
- <param name="repository">The repository to shutdown.</param>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in the
- repository for the <paramref name="repository"/> specified.
- </para>
- <para>
- Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>
- The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.ShutdownRepository(System.Reflection.Assembly)">
- <summary>
- Shuts down the repository for the repository specified.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in the
- repository for the repository. The repository is looked up using
- the <paramref name="repositoryAssembly"/> specified.
- </para>
- <para>
- Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>
- The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.ResetConfiguration(System.String)">
- <summary>
- Resets all values contained in this repository instance to their defaults.
- </summary>
- <param name="repository">The repository to reset.</param>
- <remarks>
- <para>
- Resets all values contained in the repository instance to their
- defaults. This removes all appenders from all loggers, sets
- the level of all non-root loggers to <c>null</c>,
- sets their additivity flag to <c>true</c> and sets the level
- of the root logger to <see cref="F:log4net.Core.Level.Debug"/>. Moreover,
- message disabling is set its default "off" value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.ResetConfiguration(System.Reflection.Assembly)">
- <summary>
- Resets all values contained in this repository instance to their defaults.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository to reset.</param>
- <remarks>
- <para>
- Resets all values contained in the repository instance to their
- defaults. This removes all appenders from all loggers, sets
- the level of all non-root loggers to <c>null</c>,
- sets their additivity flag to <c>true</c> and sets the level
- of the root logger to <see cref="F:log4net.Core.Level.Debug"/>. Moreover,
- message disabling is set its default "off" value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.CreateDomain(System.String)">
- <summary>
- Creates a repository with the specified name.
- </summary>
- <param name="repository">The name of the repository, this must be unique amongst repositories.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- Creates the default type of <see cref="T:log4net.Repository.ILoggerRepository"/> which is a
- <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> object.
- </para>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An <see cref="T:System.Exception"/> will be thrown if the repository already exists.
- </para>
- </remarks>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.Core.LoggerManager.CreateRepository(System.String)">
- <summary>
- Creates a repository with the specified name.
- </summary>
- <param name="repository">The name of the repository, this must be unique amongst repositories.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- Creates the default type of <see cref="T:log4net.Repository.ILoggerRepository"/> which is a
- <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> object.
- </para>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An <see cref="T:System.Exception"/> will be thrown if the repository already exists.
- </para>
- </remarks>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.Core.LoggerManager.CreateDomain(System.String,System.Type)">
- <summary>
- Creates a repository with the specified name and repository type.
- </summary>
- <param name="repository">The name of the repository, this must be unique to the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An Exception will be thrown if the repository already exists.
- </para>
- </remarks>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.Core.LoggerManager.CreateRepository(System.String,System.Type)">
- <summary>
- Creates a repository with the specified name and repository type.
- </summary>
- <param name="repository">The name of the repository, this must be unique to the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An Exception will be thrown if the repository already exists.
- </para>
- </remarks>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.Core.LoggerManager.CreateDomain(System.Reflection.Assembly,System.Type)">
- <summary>
- Creates a repository for the specified assembly and repository type.
- </summary>
- <param name="repositoryAssembly">The assembly to use to get the name of the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.Core.LoggerManager.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.CreateRepository(System.Reflection.Assembly,System.Type)">
- <summary>
- Creates a repository for the specified assembly and repository type.
- </summary>
- <param name="repositoryAssembly">The assembly to use to get the name of the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.Core.LoggerManager.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetAllRepositories">
- <summary>
- Gets an array of all currently defined repositories.
- </summary>
- <returns>An array of all the known <see cref="T:log4net.Repository.ILoggerRepository"/> objects.</returns>
- <remarks>
- <para>
- Gets an array of all currently defined repositories.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.GetVersionInfo">
- <summary>
- Internal method to get pertinent version info.
- </summary>
- <returns>A string of version info.</returns>
- </member>
- <member name="M:log4net.Core.LoggerManager.OnDomainUnload(System.Object,System.EventArgs)">
- <summary>
- Called when the <see cref="E:System.AppDomain.DomainUnload"/> event fires
- </summary>
- <param name="sender">the <see cref="T:System.AppDomain"/> that is exiting</param>
- <param name="e">null</param>
- <remarks>
- <para>
- Called when the <see cref="E:System.AppDomain.DomainUnload"/> event fires.
- </para>
- <para>
- When the event is triggered the log4net system is <see cref="M:log4net.Core.LoggerManager.Shutdown"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggerManager.OnProcessExit(System.Object,System.EventArgs)">
- <summary>
- Called when the <see cref="E:System.AppDomain.ProcessExit"/> event fires
- </summary>
- <param name="sender">the <see cref="T:System.AppDomain"/> that is exiting</param>
- <param name="e">null</param>
- <remarks>
- <para>
- Called when the <see cref="E:System.AppDomain.ProcessExit"/> event fires.
- </para>
- <para>
- When the event is triggered the log4net system is <see cref="M:log4net.Core.LoggerManager.Shutdown"/>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggerManager.s_repositorySelector">
- <summary>
- Initialize the default repository selector
- </summary>
- </member>
- <member name="P:log4net.Core.LoggerManager.RepositorySelector">
- <summary>
- Gets or sets the repository selector used by the <see cref="T:log4net.LogManager"/>.
- </summary>
- <value>
- The repository selector used by the <see cref="T:log4net.LogManager"/>.
- </value>
- <remarks>
- <para>
- The repository selector (<see cref="T:log4net.Core.IRepositorySelector"/>) is used by
- the <see cref="T:log4net.LogManager"/> to create and select repositories
- (<see cref="T:log4net.Repository.ILoggerRepository"/>).
- </para>
- <para>
- The caller to <see cref="T:log4net.LogManager"/> supplies either a string name
- or an assembly (if not supplied the assembly is inferred using
- <see cref="M:System.Reflection.Assembly.GetCallingAssembly"/>).
- </para>
- <para>
- This context is used by the selector to lookup a specific repository.
- </para>
- <para>
- For the full .NET Framework, the default repository is <c>DefaultRepositorySelector</c>;
- for the .NET Compact Framework <c>CompactRepositorySelector</c> is the default
- repository.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LoggerWrapperImpl">
- <summary>
- Implementation of the <see cref="T:log4net.Core.ILoggerWrapper"/> interface.
- </summary>
- <remarks>
- <para>
- This class should be used as the base for all wrapper implementations.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.LoggerWrapperImpl.#ctor(log4net.Core.ILogger)">
- <summary>
- Constructs a new wrapper for the specified logger.
- </summary>
- <param name="logger">The logger to wrap.</param>
- <remarks>
- <para>
- Constructs a new wrapper for the specified logger.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggerWrapperImpl.m_logger">
- <summary>
- The logger that this object is wrapping
- </summary>
- </member>
- <member name="P:log4net.Core.LoggerWrapperImpl.Logger">
- <summary>
- Gets the implementation behind this wrapper object.
- </summary>
- <value>
- The <see cref="T:log4net.Core.ILogger"/> object that this object is implementing.
- </value>
- <remarks>
- <para>
- The <c>Logger</c> object may not be the same object as this object
- because of logger decorators.
- </para>
- <para>
- This gets the actual underlying objects that is used to process
- the log events.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LoggingEventData">
- <summary>
- Portable data structure used by <see cref="T:log4net.Core.LoggingEvent"/>
- </summary>
- <remarks>
- <para>
- Portable data structure used by <see cref="T:log4net.Core.LoggingEvent"/>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Core.LoggingEventData.LoggerName">
- <summary>
- The logger name.
- </summary>
- <remarks>
- <para>
- The logger name.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.Level">
- <summary>
- Level of logging event.
- </summary>
- <remarks>
- <para>
- Level of logging event. Level cannot be Serializable
- because it is a flyweight. Due to its special serialization it
- cannot be declared final either.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.Message">
- <summary>
- The application supplied message.
- </summary>
- <remarks>
- <para>
- The application supplied message of logging event.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.ThreadName">
- <summary>
- The name of thread
- </summary>
- <remarks>
- <para>
- The name of thread in which this logging event was generated
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.TimeStamp">
- <summary>
- The time the event was logged
- </summary>
- <remarks>
- <para>
- The TimeStamp is stored in the local time zone for this computer.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.LocationInfo">
- <summary>
- Location information for the caller.
- </summary>
- <remarks>
- <para>
- Location information for the caller.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.UserName">
- <summary>
- String representation of the user
- </summary>
- <remarks>
- <para>
- String representation of the user's windows name,
- like DOMAIN\username
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.Identity">
- <summary>
- String representation of the identity.
- </summary>
- <remarks>
- <para>
- String representation of the current thread's principal identity.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.ExceptionString">
- <summary>
- The string representation of the exception
- </summary>
- <remarks>
- <para>
- The string representation of the exception
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.Domain">
- <summary>
- String representation of the AppDomain.
- </summary>
- <remarks>
- <para>
- String representation of the AppDomain.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEventData.Properties">
- <summary>
- Additional event specific properties
- </summary>
- <remarks>
- <para>
- A logger or an appender may attach additional
- properties to specific events. These properties
- have a string key and an object value.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.FixFlags">
- <summary>
- Flags passed to the <see cref="P:log4net.Core.LoggingEvent.Fix"/> property
- </summary>
- <remarks>
- <para>
- Flags passed to the <see cref="P:log4net.Core.LoggingEvent.Fix"/> property
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Core.FixFlags.Mdc">
- <summary>
- Fix the MDC
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.Ndc">
- <summary>
- Fix the NDC
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.Message">
- <summary>
- Fix the rendered message
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.ThreadName">
- <summary>
- Fix the thread name
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.LocationInfo">
- <summary>
- Fix the callers location information
- </summary>
- <remarks>
- CAUTION: Very slow to generate
- </remarks>
- </member>
- <member name="F:log4net.Core.FixFlags.UserName">
- <summary>
- Fix the callers windows user name
- </summary>
- <remarks>
- CAUTION: Slow to generate
- </remarks>
- </member>
- <member name="F:log4net.Core.FixFlags.Domain">
- <summary>
- Fix the domain friendly name
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.Identity">
- <summary>
- Fix the callers principal name
- </summary>
- <remarks>
- CAUTION: May be slow to generate
- </remarks>
- </member>
- <member name="F:log4net.Core.FixFlags.Exception">
- <summary>
- Fix the exception text
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.Properties">
- <summary>
- Fix the event properties
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.None">
- <summary>
- No fields fixed
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.All">
- <summary>
- All fields fixed
- </summary>
- </member>
- <member name="F:log4net.Core.FixFlags.Partial">
- <summary>
- Partial fields fixed
- </summary>
- <remarks>
- <para>
- This set of partial fields gives good performance. The following fields are fixed:
- </para>
- <list type="bullet">
- <item><description><see cref="F:log4net.Core.FixFlags.Message"/></description></item>
- <item><description><see cref="F:log4net.Core.FixFlags.ThreadName"/></description></item>
- <item><description><see cref="F:log4net.Core.FixFlags.Exception"/></description></item>
- <item><description><see cref="F:log4net.Core.FixFlags.Domain"/></description></item>
- <item><description><see cref="F:log4net.Core.FixFlags.Properties"/></description></item>
- </list>
- </remarks>
- </member>
- <member name="T:log4net.Core.LoggingEvent">
- <summary>
- The internal representation of logging events.
- </summary>
- <remarks>
- <para>
- When an affirmative decision is made to log then a
- <see cref="T:log4net.Core.LoggingEvent"/> instance is created. This instance
- is passed around to the different log4net components.
- </para>
- <para>
- This class is of concern to those wishing to extend log4net.
- </para>
- <para>
- Some of the values in instances of <see cref="T:log4net.Core.LoggingEvent"/>
- are considered volatile, that is the values are correct at the
- time the event is delivered to appenders, but will not be consistent
- at any time afterwards. If an event is to be stored and then processed
- at a later time these volatile values must be fixed by calling
- <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/>. There is a performance penalty
- for incurred by calling <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/> but it
- is essential to maintaining data consistency.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Douglas de la Torre</author>
- <author>Daniel Cazzulino</author>
- </member>
- <member name="F:log4net.Core.LoggingEvent.HostNameProperty">
- <summary>
- The key into the Properties map for the host name value.
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.IdentityProperty">
- <summary>
- The key into the Properties map for the thread identity value.
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.UserNameProperty">
- <summary>
- The key into the Properties map for the user name value.
- </summary>
- </member>
- <member name="M:log4net.Core.LoggingEvent.#ctor(System.Type,log4net.Repository.ILoggerRepository,System.String,log4net.Core.Level,System.Object,System.Exception)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Core.LoggingEvent"/> class
- from the supplied parameters.
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <param name="repository">The repository this event is logged in.</param>
- <param name="loggerName">The name of the logger of this event.</param>
- <param name="level">The level of this event.</param>
- <param name="message">The message of this event.</param>
- <param name="exception">The exception for this event.</param>
- <remarks>
- <para>
- Except <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/>, <see cref="P:log4net.Core.LoggingEvent.Level"/> and <see cref="P:log4net.Core.LoggingEvent.LoggerName"/>,
- all fields of <c>LoggingEvent</c> are filled when actually needed. Call
- <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/> to cache all data locally
- to prevent inconsistencies.
- </para>
- <para>This method is called by the log4net framework
- to create a logging event.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.#ctor(System.Type,log4net.Repository.ILoggerRepository,log4net.Core.LoggingEventData,log4net.Core.FixFlags)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Core.LoggingEvent"/> class
- using specific data.
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <param name="repository">The repository this event is logged in.</param>
- <param name="data">Data used to initialize the logging event.</param>
- <param name="fixedData">The fields in the <paranref name="data"/> struct that have already been fixed.</param>
- <remarks>
- <para>
- This constructor is provided to allow a <see cref="T:log4net.Core.LoggingEvent"/>
- to be created independently of the log4net framework. This can
- be useful if you require a custom serialization scheme.
- </para>
- <para>
- Use the <see cref="M:log4net.Core.LoggingEvent.GetLoggingEventData(log4net.Core.FixFlags)"/> method to obtain an
- instance of the <see cref="T:log4net.Core.LoggingEventData"/> class.
- </para>
- <para>
- The <paramref name="fixedData"/> parameter should be used to specify which fields in the
- <paramref name="data"/> struct have been preset. Fields not specified in the <paramref name="fixedData"/>
- will be captured from the environment if requested or fixed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.#ctor(System.Type,log4net.Repository.ILoggerRepository,log4net.Core.LoggingEventData)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Core.LoggingEvent"/> class
- using specific data.
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <param name="repository">The repository this event is logged in.</param>
- <param name="data">Data used to initialize the logging event.</param>
- <remarks>
- <para>
- This constructor is provided to allow a <see cref="T:log4net.Core.LoggingEvent"/>
- to be created independently of the log4net framework. This can
- be useful if you require a custom serialization scheme.
- </para>
- <para>
- Use the <see cref="M:log4net.Core.LoggingEvent.GetLoggingEventData(log4net.Core.FixFlags)"/> method to obtain an
- instance of the <see cref="T:log4net.Core.LoggingEventData"/> class.
- </para>
- <para>
- This constructor sets this objects <see cref="P:log4net.Core.LoggingEvent.Fix"/> flags to <see cref="F:log4net.Core.FixFlags.All"/>,
- this assumes that all the data relating to this event is passed in via the <paramref name="data"/>
- parameter and no other data should be captured from the environment.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.#ctor(log4net.Core.LoggingEventData)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Core.LoggingEvent"/> class
- using specific data.
- </summary>
- <param name="data">Data used to initialize the logging event.</param>
- <remarks>
- <para>
- This constructor is provided to allow a <see cref="T:log4net.Core.LoggingEvent"/>
- to be created independently of the log4net framework. This can
- be useful if you require a custom serialization scheme.
- </para>
- <para>
- Use the <see cref="M:log4net.Core.LoggingEvent.GetLoggingEventData(log4net.Core.FixFlags)"/> method to obtain an
- instance of the <see cref="T:log4net.Core.LoggingEventData"/> class.
- </para>
- <para>
- This constructor sets this objects <see cref="P:log4net.Core.LoggingEvent.Fix"/> flags to <see cref="F:log4net.Core.FixFlags.All"/>,
- this assumes that all the data relating to this event is passed in via the <paramref name="data"/>
- parameter and no other data should be captured from the environment.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Serialization constructor
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data.</param>
- <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.LoggingEvent"/> class
- with serialized data.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.EnsureRepository(log4net.Repository.ILoggerRepository)">
- <summary>
- Ensure that the repository is set.
- </summary>
- <param name="repository">the value for the repository</param>
- </member>
- <member name="M:log4net.Core.LoggingEvent.WriteRenderedMessage(System.IO.TextWriter)">
- <summary>
- Write the rendered message to a TextWriter
- </summary>
- <param name="writer">the writer to write the message to</param>
- <remarks>
- <para>
- Unlike the <see cref="P:log4net.Core.LoggingEvent.RenderedMessage"/> property this method
- does store the message data in the internal cache. Therefore
- if called only once this method should be faster than the
- <see cref="P:log4net.Core.LoggingEvent.RenderedMessage"/> property, however if the message is
- to be accessed multiple times then the property will be more efficient.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Serializes this object into the <see cref="T:System.Runtime.Serialization.SerializationInfo"/> provided.
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
- <param name="context">The destination for this serialization.</param>
- <remarks>
- <para>
- The data in this event must be fixed before it can be serialized.
- </para>
- <para>
- The <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/> method must be called during the
- <see cref="M:log4net.Appender.IAppender.DoAppend(log4net.Core.LoggingEvent)"/> method call if this event
- is to be used outside that method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.GetLoggingEventData">
- <summary>
- Gets the portable data for this <see cref="T:log4net.Core.LoggingEvent"/>.
- </summary>
- <returns>The <see cref="T:log4net.Core.LoggingEventData"/> for this event.</returns>
- <remarks>
- <para>
- A new <see cref="T:log4net.Core.LoggingEvent"/> can be constructed using a
- <see cref="T:log4net.Core.LoggingEventData"/> instance.
- </para>
- <para>
- Does a <see cref="F:log4net.Core.FixFlags.Partial"/> fix of the data
- in the logging event before returning the event data.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.GetLoggingEventData(log4net.Core.FixFlags)">
- <summary>
- Gets the portable data for this <see cref="T:log4net.Core.LoggingEvent"/>.
- </summary>
- <param name="fixFlags">The set of data to ensure is fixed in the LoggingEventData</param>
- <returns>The <see cref="T:log4net.Core.LoggingEventData"/> for this event.</returns>
- <remarks>
- <para>
- A new <see cref="T:log4net.Core.LoggingEvent"/> can be constructed using a
- <see cref="T:log4net.Core.LoggingEventData"/> instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.GetExceptionStrRep">
- <summary>
- Returns this event's exception's rendered using the
- <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </summary>
- <returns>
- This event's exception's rendered using the <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </returns>
- <remarks>
- <para>
- <b>Obsolete. Use <see cref="M:log4net.Core.LoggingEvent.GetExceptionString"/> instead.</b>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.GetExceptionString">
- <summary>
- Returns this event's exception's rendered using the
- <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </summary>
- <returns>
- This event's exception's rendered using the <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </returns>
- <remarks>
- <para>
- Returns this event's exception's rendered using the
- <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.FixVolatileData">
- <summary>
- Fix instance fields that hold volatile data.
- </summary>
- <remarks>
- <para>
- Some of the values in instances of <see cref="T:log4net.Core.LoggingEvent"/>
- are considered volatile, that is the values are correct at the
- time the event is delivered to appenders, but will not be consistent
- at any time afterwards. If an event is to be stored and then processed
- at a later time these volatile values must be fixed by calling
- <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/>. There is a performance penalty
- incurred by calling <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/> but it
- is essential to maintaining data consistency.
- </para>
- <para>
- Calling <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/> is equivalent to
- calling <see cref="M:log4net.Core.LoggingEvent.FixVolatileData(System.Boolean)"/> passing the parameter
- <c>false</c>.
- </para>
- <para>
- See <see cref="M:log4net.Core.LoggingEvent.FixVolatileData(System.Boolean)"/> for more
- information.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.FixVolatileData(System.Boolean)">
- <summary>
- Fixes instance fields that hold volatile data.
- </summary>
- <param name="fastButLoose">Set to <c>true</c> to not fix data that takes a long time to fix.</param>
- <remarks>
- <para>
- Some of the values in instances of <see cref="T:log4net.Core.LoggingEvent"/>
- are considered volatile, that is the values are correct at the
- time the event is delivered to appenders, but will not be consistent
- at any time afterwards. If an event is to be stored and then processed
- at a later time these volatile values must be fixed by calling
- <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/>. There is a performance penalty
- for incurred by calling <see cref="M:log4net.Core.LoggingEvent.FixVolatileData"/> but it
- is essential to maintaining data consistency.
- </para>
- <para>
- The <paramref name="fastButLoose"/> param controls the data that
- is fixed. Some of the data that can be fixed takes a long time to
- generate, therefore if you do not require those settings to be fixed
- they can be ignored by setting the <paramref name="fastButLoose"/> param
- to <c>true</c>. This setting will ignore the <see cref="P:log4net.Core.LoggingEvent.LocationInformation"/>
- and <see cref="P:log4net.Core.LoggingEvent.UserName"/> settings.
- </para>
- <para>
- Set <paramref name="fastButLoose"/> to <c>false</c> to ensure that all
- settings are fixed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.FixVolatileData(log4net.Core.FixFlags)">
- <summary>
- Fix the fields specified by the <see cref="T:log4net.Core.FixFlags"/> parameter
- </summary>
- <param name="flags">the fields to fix</param>
- <remarks>
- <para>
- Only fields specified in the <paramref name="flags"/> will be fixed.
- Fields will not be fixed if they have previously been fixed.
- It is not possible to 'unfix' a field.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.LookupProperty(System.String)">
- <summary>
- Lookup a composite property in this event
- </summary>
- <param name="key">the key for the property to lookup</param>
- <returns>the value for the property</returns>
- <remarks>
- <para>
- This event has composite properties that combine together properties from
- several different contexts in the following order:
- <list type="definition">
- <item>
- <term>this events properties</term>
- <description>
- This event has <see cref="P:log4net.Core.LoggingEvent.Properties"/> that can be set. These
- properties are specific to this event only.
- </description>
- </item>
- <item>
- <term>the thread properties</term>
- <description>
- The <see cref="P:log4net.ThreadContext.Properties"/> that are set on the current
- thread. These properties are shared by all events logged on this thread.
- </description>
- </item>
- <item>
- <term>the global properties</term>
- <description>
- The <see cref="P:log4net.GlobalContext.Properties"/> that are set globally. These
- properties are shared by all the threads in the AppDomain.
- </description>
- </item>
- </list>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LoggingEvent.GetProperties">
- <summary>
- Get all the composite properties in this event
- </summary>
- <returns>the <see cref="T:log4net.Util.PropertiesDictionary"/> containing all the properties</returns>
- <remarks>
- <para>
- See <see cref="M:log4net.Core.LoggingEvent.LookupProperty(System.String)"/> for details of the composite properties
- stored by the event.
- </para>
- <para>
- This method returns a single <see cref="T:log4net.Util.PropertiesDictionary"/> containing all the
- properties defined for this event.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_data">
- <summary>
- The internal logging event data.
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_compositeProperties">
- <summary>
- The internal logging event data.
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_eventProperties">
- <summary>
- The internal logging event data.
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_callerStackBoundaryDeclaringType">
- <summary>
- The fully qualified Type of the calling
- logger class in the stack frame (i.e. the declaring type of the method).
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_message">
- <summary>
- The application supplied message of logging event.
- </summary>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_thrownException">
- <summary>
- The exception that was thrown.
- </summary>
- <remarks>
- This is not serialized. The string representation
- is serialized instead.
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_repository">
- <summary>
- The repository that generated the logging event
- </summary>
- <remarks>
- This is not serialized.
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_fixFlags">
- <summary>
- The fix state for this event
- </summary>
- <remarks>
- These flags indicate which fields have been fixed.
- Not serialized.
- </remarks>
- </member>
- <member name="F:log4net.Core.LoggingEvent.m_cacheUpdatable">
- <summary>
- Indicated that the internal cache is updateable (ie not fixed)
- </summary>
- <remarks>
- This is a seperate flag to m_fixFlags as it allows incrementel fixing and simpler
- changes in the caching strategy.
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.StartTime">
- <summary>
- Gets the time when the current process started.
- </summary>
- <value>
- This is the time when this process started.
- </value>
- <remarks>
- <para>
- The TimeStamp is stored in the local time zone for this computer.
- </para>
- <para>
- Tries to get the start time for the current process.
- Failing that it returns the time of the first call to
- this property.
- </para>
- <para>
- Note that AppDomains may be loaded and unloaded within the
- same process without the process terminating and therefore
- without the process start time being reset.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.Level">
- <summary>
- Gets the <see cref="P:log4net.Core.LoggingEvent.Level"/> of the logging event.
- </summary>
- <value>
- The <see cref="P:log4net.Core.LoggingEvent.Level"/> of the logging event.
- </value>
- <remarks>
- <para>
- Gets the <see cref="P:log4net.Core.LoggingEvent.Level"/> of the logging event.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.TimeStamp">
- <summary>
- Gets the time of the logging event.
- </summary>
- <value>
- The time of the logging event.
- </value>
- <remarks>
- <para>
- The TimeStamp is stored in the local time zone for this computer.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.LoggerName">
- <summary>
- Gets the name of the logger that logged the event.
- </summary>
- <value>
- The name of the logger that logged the event.
- </value>
- <remarks>
- <para>
- Gets the name of the logger that logged the event.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.LocationInformation">
- <summary>
- Gets the location information for this logging event.
- </summary>
- <value>
- The location information for this logging event.
- </value>
- <remarks>
- <para>
- The collected information is cached for future use.
- </para>
- <para>
- See the <see cref="T:log4net.Core.LocationInfo"/> class for more information on
- supported frameworks and the different behavior in Debug and
- Release builds.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.MessageObject">
- <summary>
- Gets the message object used to initialize this event.
- </summary>
- <value>
- The message object used to initialize this event.
- </value>
- <remarks>
- <para>
- Gets the message object used to initialize this event.
- Note that this event may not have a valid message object.
- If the event is serialized the message object will not
- be transferred. To get the text of the message the
- <see cref="P:log4net.Core.LoggingEvent.RenderedMessage"/> property must be used
- not this property.
- </para>
- <para>
- If there is no defined message object for this event then
- null will be returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.ExceptionObject">
- <summary>
- Gets the exception object used to initialize this event.
- </summary>
- <value>
- The exception object used to initialize this event.
- </value>
- <remarks>
- <para>
- Gets the exception object used to initialize this event.
- Note that this event may not have a valid exception object.
- If the event is serialized the exception object will not
- be transferred. To get the text of the exception the
- <see cref="M:log4net.Core.LoggingEvent.GetExceptionString"/> method must be used
- not this property.
- </para>
- <para>
- If there is no defined exception object for this event then
- null will be returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.Repository">
- <summary>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that this event was created in.
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that this event was created in.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.RenderedMessage">
- <summary>
- Gets the message, rendered through the <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </summary>
- <value>
- The message rendered through the <see cref="P:log4net.Repository.ILoggerRepository.RendererMap"/>.
- </value>
- <remarks>
- <para>
- The collected information is cached for future use.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.ThreadName">
- <summary>
- Gets the name of the current thread.
- </summary>
- <value>
- The name of the current thread, or the thread ID when
- the name is not available.
- </value>
- <remarks>
- <para>
- The collected information is cached for future use.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.UserName">
- <summary>
- Gets the name of the current user.
- </summary>
- <value>
- The name of the current user, or <c>NOT AVAILABLE</c> when the
- underlying runtime has no support for retrieving the name of the
- current user.
- </value>
- <remarks>
- <para>
- Calls <c>WindowsIdentity.GetCurrent().Name</c> to get the name of
- the current windows user.
- </para>
- <para>
- To improve performance, we could cache the string representation of
- the name, and reuse that as long as the identity stayed constant.
- Once the identity changed, we would need to re-assign and re-render
- the string.
- </para>
- <para>
- However, the <c>WindowsIdentity.GetCurrent()</c> call seems to
- return different objects every time, so the current implementation
- doesn't do this type of caching.
- </para>
- <para>
- Timing for these operations:
- </para>
- <list type="table">
- <listheader>
- <term>Method</term>
- <description>Results</description>
- </listheader>
- <item>
- <term><c>WindowsIdentity.GetCurrent()</c></term>
- <description>10000 loops, 00:00:00.2031250 seconds</description>
- </item>
- <item>
- <term><c>WindowsIdentity.GetCurrent().Name</c></term>
- <description>10000 loops, 00:00:08.0468750 seconds</description>
- </item>
- </list>
- <para>
- This means we could speed things up almost 40 times by caching the
- value of the <c>WindowsIdentity.GetCurrent().Name</c> property, since
- this takes (8.04-0.20) = 7.84375 seconds.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.Identity">
- <summary>
- Gets the identity of the current thread principal.
- </summary>
- <value>
- The string name of the identity of the current thread principal.
- </value>
- <remarks>
- <para>
- Calls <c>System.Threading.Thread.CurrentPrincipal.Identity.Name</c> to get
- the name of the current thread principal.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.Domain">
- <summary>
- Gets the AppDomain friendly name.
- </summary>
- <value>
- The AppDomain friendly name.
- </value>
- <remarks>
- <para>
- Gets the AppDomain friendly name.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.Properties">
- <summary>
- Additional event specific properties.
- </summary>
- <value>
- Additional event specific properties.
- </value>
- <remarks>
- <para>
- A logger or an appender may attach additional
- properties to specific events. These properties
- have a string key and an object value.
- </para>
- <para>
- This property is for events that have been added directly to
- this event. The aggregate properties (which include these
- event properties) can be retrieved using <see cref="M:log4net.Core.LoggingEvent.LookupProperty(System.String)"/>
- and <see cref="M:log4net.Core.LoggingEvent.GetProperties"/>.
- </para>
- <para>
- Once the properties have been fixed <see cref="P:log4net.Core.LoggingEvent.Fix"/> this property
- returns the combined cached properties. This ensures that updates to
- this property are always reflected in the underlying storage. When
- returning the combined properties there may be more keys in the
- Dictionary than expected.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LoggingEvent.Fix">
- <summary>
- The fixed fields in this event
- </summary>
- <value>
- The set of fields that are fixed in this event
- </value>
- <remarks>
- <para>
- Fields will not be fixed if they have previously been fixed.
- It is not possible to 'unfix' a field.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.LogImpl">
- <summary>
- Implementation of <see cref="T:log4net.ILog"/> wrapper interface.
- </summary>
- <remarks>
- <para>
- This implementation of the <see cref="T:log4net.ILog"/> interface
- forwards to the <see cref="T:log4net.Core.ILogger"/> held by the base class.
- </para>
- <para>
- This logger has methods to allow the caller to log at the following
- levels:
- </para>
- <list type="definition">
- <item>
- <term>DEBUG</term>
- <description>
- The <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/> and <see cref="M:log4net.Core.LogImpl.DebugFormat(System.String,System.Object[])"/> methods log messages
- at the <c>DEBUG</c> level. That is the level with that name defined in the
- repositories <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/>. The default value
- for this level is <see cref="F:log4net.Core.Level.Debug"/>. The <see cref="P:log4net.Core.LogImpl.IsDebugEnabled"/>
- property tests if this level is enabled for logging.
- </description>
- </item>
- <item>
- <term>INFO</term>
- <description>
- The <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/> and <see cref="M:log4net.Core.LogImpl.InfoFormat(System.String,System.Object[])"/> methods log messages
- at the <c>INFO</c> level. That is the level with that name defined in the
- repositories <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/>. The default value
- for this level is <see cref="F:log4net.Core.Level.Info"/>. The <see cref="P:log4net.Core.LogImpl.IsInfoEnabled"/>
- property tests if this level is enabled for logging.
- </description>
- </item>
- <item>
- <term>WARN</term>
- <description>
- The <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/> and <see cref="M:log4net.Core.LogImpl.WarnFormat(System.String,System.Object[])"/> methods log messages
- at the <c>WARN</c> level. That is the level with that name defined in the
- repositories <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/>. The default value
- for this level is <see cref="F:log4net.Core.Level.Warn"/>. The <see cref="P:log4net.Core.LogImpl.IsWarnEnabled"/>
- property tests if this level is enabled for logging.
- </description>
- </item>
- <item>
- <term>ERROR</term>
- <description>
- The <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/> and <see cref="M:log4net.Core.LogImpl.ErrorFormat(System.String,System.Object[])"/> methods log messages
- at the <c>ERROR</c> level. That is the level with that name defined in the
- repositories <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/>. The default value
- for this level is <see cref="F:log4net.Core.Level.Error"/>. The <see cref="P:log4net.Core.LogImpl.IsErrorEnabled"/>
- property tests if this level is enabled for logging.
- </description>
- </item>
- <item>
- <term>FATAL</term>
- <description>
- The <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/> and <see cref="M:log4net.Core.LogImpl.FatalFormat(System.String,System.Object[])"/> methods log messages
- at the <c>FATAL</c> level. That is the level with that name defined in the
- repositories <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/>. The default value
- for this level is <see cref="F:log4net.Core.Level.Fatal"/>. The <see cref="P:log4net.Core.LogImpl.IsFatalEnabled"/>
- property tests if this level is enabled for logging.
- </description>
- </item>
- </list>
- <para>
- The values for these levels and their semantic meanings can be changed by
- configuring the <see cref="P:log4net.Repository.ILoggerRepository.LevelMap"/> for the repository.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.ILog">
- <summary>
- The ILog interface is use by application to log messages into
- the log4net framework.
- </summary>
- <remarks>
- <para>
- Use the <see cref="T:log4net.LogManager"/> to obtain logger instances
- that implement this interface. The <see cref="M:log4net.LogManager.GetLogger(System.Reflection.Assembly,System.Type)"/>
- static method is used to get logger instances.
- </para>
- <para>
- This class contains methods for logging at different levels and also
- has properties for determining if those logging levels are
- enabled in the current configuration.
- </para>
- <para>
- This interface can be implemented in different ways. This documentation
- specifies reasonable behavior that a caller can expect from the actual
- implementation, however different implementations reserve the right to
- do things differently.
- </para>
- </remarks>
- <example>Simple example of logging messages
- <code lang="C#">
- ILog log = LogManager.GetLogger("application-log");
-
- log.Info("Application Start");
- log.Debug("This is a debug message");
-
- if (log.IsDebugEnabled)
- {
- log.Debug("This is another debug message");
- }
- </code>
- </example>
- <seealso cref="T:log4net.LogManager"/>
- <seealso cref="M:log4net.LogManager.GetLogger(System.Reflection.Assembly,System.Type)"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.ILog.Debug(System.Object)">
- <overloads>Log a message object with the <see cref="F:log4net.Core.Level.Debug"/> level.</overloads>
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <param name="message">The message object to log.</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>DEBUG</c>
- enabled by comparing the level of this logger with the
- <see cref="F:log4net.Core.Level.Debug"/> level. If this logger is
- <c>DEBUG</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of
- the additivity flag.
- </para>
- <para><b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.Debug(System.Object,System.Exception)">
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Debug"/> level including
- the stack trace of the <see cref="T:System.Exception"/> passed
- as a parameter.
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- See the <see cref="M:log4net.ILog.Debug(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.DebugFormat(System.String,System.Object[])">
- <overloads>Log a formatted string with the <see cref="F:log4net.Core.Level.Debug"/> level.</overloads>
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.DebugFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.DebugFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.DebugFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.DebugFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Debug(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.ILog.Info(System.Object)">
- <overloads>Log a message object with the <see cref="F:log4net.Core.Level.Info"/> level.</overloads>
- <summary>
- Logs a message object with the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <remarks>
- <para>
- This method first checks if this logger is <c>INFO</c>
- enabled by comparing the level of this logger with the
- <see cref="F:log4net.Core.Level.Info"/> level. If this logger is
- <c>INFO</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para><b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.ILog.Info(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- <param name="message">The message object to log.</param>
- <seealso cref="M:log4net.ILog.Info(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.Info(System.Object,System.Exception)">
- <summary>
- Logs a message object with the <c>INFO</c> level including
- the stack trace of the <see cref="T:System.Exception"/> passed
- as a parameter.
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- See the <see cref="M:log4net.ILog.Info(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.InfoFormat(System.String,System.Object[])">
- <overloads>Log a formatted message string with the <see cref="F:log4net.Core.Level.Info"/> level.</overloads>
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.InfoFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Info(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.InfoFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Info(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.InfoFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Info(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.InfoFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsInfoEnabled"/>
- </member>
- <member name="M:log4net.ILog.Warn(System.Object)">
- <overloads>Log a message object with the <see cref="F:log4net.Core.Level.Warn"/> level.</overloads>
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <remarks>
- <para>
- This method first checks if this logger is <c>WARN</c>
- enabled by comparing the level of this logger with the
- <see cref="F:log4net.Core.Level.Warn"/> level. If this logger is
- <c>WARN</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para><b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- <param name="message">The message object to log.</param>
- <seealso cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.Warn(System.Object,System.Exception)">
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Warn"/> level including
- the stack trace of the <see cref="T:System.Exception"/> passed
- as a parameter.
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- See the <see cref="M:log4net.ILog.Warn(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.WarnFormat(System.String,System.Object[])">
- <overloads>Log a formatted message string with the <see cref="F:log4net.Core.Level.Warn"/> level.</overloads>
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.WarnFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.WarnFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.WarnFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.WarnFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsWarnEnabled"/>
- </member>
- <member name="M:log4net.ILog.Error(System.Object)">
- <overloads>Log a message object with the <see cref="F:log4net.Core.Level.Error"/> level.</overloads>
- <summary>
- Logs a message object with the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <param name="message">The message object to log.</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>ERROR</c>
- enabled by comparing the level of this logger with the
- <see cref="F:log4net.Core.Level.Error"/> level. If this logger is
- <c>ERROR</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para><b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.ILog.Error(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.Error(System.Object,System.Exception)">
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Error"/> level including
- the stack trace of the <see cref="T:System.Exception"/> passed
- as a parameter.
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- See the <see cref="M:log4net.ILog.Error(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.ErrorFormat(System.String,System.Object[])">
- <overloads>Log a formatted message string with the <see cref="F:log4net.Core.Level.Error"/> level.</overloads>
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.ErrorFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Error(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.ErrorFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Error(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.ErrorFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Error(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.ErrorFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsErrorEnabled"/>
- </member>
- <member name="M:log4net.ILog.Fatal(System.Object)">
- <overloads>Log a message object with the <see cref="F:log4net.Core.Level.Fatal"/> level.</overloads>
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <remarks>
- <para>
- This method first checks if this logger is <c>FATAL</c>
- enabled by comparing the level of this logger with the
- <see cref="F:log4net.Core.Level.Fatal"/> level. If this logger is
- <c>FATAL</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para><b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- <param name="message">The message object to log.</param>
- <seealso cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="M:log4net.ILog.Fatal(System.Object,System.Exception)">
- <summary>
- Log a message object with the <see cref="F:log4net.Core.Level.Fatal"/> level including
- the stack trace of the <see cref="T:System.Exception"/> passed
- as a parameter.
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- See the <see cref="M:log4net.ILog.Fatal(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="M:log4net.ILog.FatalFormat(System.String,System.Object[])">
- <overloads>Log a formatted message string with the <see cref="F:log4net.Core.Level.Fatal"/> level.</overloads>
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="M:log4net.ILog.FatalFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="M:log4net.ILog.FatalFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="M:log4net.ILog.FatalFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="M:log4net.ILog.FatalFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <c>String.Format</c> method. See
- <see cref="M:System.String.Format(System.String,System.Object[])"/> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.ILog.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object,System.Exception)"/>
- <seealso cref="P:log4net.ILog.IsFatalEnabled"/>
- </member>
- <member name="P:log4net.ILog.IsDebugEnabled">
- <summary>
- Checks if this logger is enabled for the <see cref="F:log4net.Core.Level.Debug"/> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <see cref="F:log4net.Core.Level.Debug"/> events, <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- This function is intended to lessen the computational cost of
- disabled log debug statements.
- </para>
- <para> For some ILog interface <c>log</c>, when you write:</para>
- <code lang="C#">
- log.Debug("This is entry number: " + i );
- </code>
- <para>
- You incur the cost constructing the message, string construction and concatenation in
- this case, regardless of whether the message is logged or not.
- </para>
- <para>
- If you are worried about speed (who isn't), then you should write:
- </para>
- <code lang="C#">
- if (log.IsDebugEnabled)
- {
- log.Debug("This is entry number: " + i );
- }
- </code>
- <para>
- This way you will not incur the cost of parameter
- construction if debugging is disabled for <c>log</c>. On
- the other hand, if the <c>log</c> is debug enabled, you
- will incur the cost of evaluating whether the logger is debug
- enabled twice. Once in <see cref="P:log4net.ILog.IsDebugEnabled"/> and once in
- the <see cref="M:log4net.ILog.Debug(System.Object)"/>. This is an insignificant overhead
- since evaluating a logger takes about 1% of the time it
- takes to actually log. This is the preferred style of logging.
- </para>
- <para>Alternatively if your logger is available statically then the is debug
- enabled state can be stored in a static variable like this:
- </para>
- <code lang="C#">
- private static readonly bool isDebugEnabled = log.IsDebugEnabled;
- </code>
- <para>
- Then when you come to log you can write:
- </para>
- <code lang="C#">
- if (isDebugEnabled)
- {
- log.Debug("This is entry number: " + i );
- }
- </code>
- <para>
- This way the debug enabled state is only queried once
- when the class is loaded. Using a <c>private static readonly</c>
- variable is the most efficient because it is a run time constant
- and can be heavily optimized by the JIT compiler.
- </para>
- <para>
- Of course if you use a static readonly variable to
- hold the enabled state of the logger then you cannot
- change the enabled state at runtime to vary the logging
- that is produced. You have to decide if you need absolute
- speed or runtime flexibility.
- </para>
- </remarks>
- <seealso cref="M:log4net.ILog.Debug(System.Object)"/>
- <seealso cref="M:log4net.ILog.DebugFormat(System.IFormatProvider,System.String,System.Object[])"/>
- </member>
- <member name="P:log4net.ILog.IsInfoEnabled">
- <summary>
- Checks if this logger is enabled for the <see cref="F:log4net.Core.Level.Info"/> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <see cref="F:log4net.Core.Level.Info"/> events, <c>false</c> otherwise.
- </value>
- <remarks>
- For more information see <see cref="P:log4net.ILog.IsDebugEnabled"/>.
- </remarks>
- <seealso cref="M:log4net.ILog.Info(System.Object)"/>
- <seealso cref="M:log4net.ILog.InfoFormat(System.IFormatProvider,System.String,System.Object[])"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="P:log4net.ILog.IsWarnEnabled">
- <summary>
- Checks if this logger is enabled for the <see cref="F:log4net.Core.Level.Warn"/> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <see cref="F:log4net.Core.Level.Warn"/> events, <c>false</c> otherwise.
- </value>
- <remarks>
- For more information see <see cref="P:log4net.ILog.IsDebugEnabled"/>.
- </remarks>
- <seealso cref="M:log4net.ILog.Warn(System.Object)"/>
- <seealso cref="M:log4net.ILog.WarnFormat(System.IFormatProvider,System.String,System.Object[])"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="P:log4net.ILog.IsErrorEnabled">
- <summary>
- Checks if this logger is enabled for the <see cref="F:log4net.Core.Level.Error"/> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <see cref="F:log4net.Core.Level.Error"/> events, <c>false</c> otherwise.
- </value>
- <remarks>
- For more information see <see cref="P:log4net.ILog.IsDebugEnabled"/>.
- </remarks>
- <seealso cref="M:log4net.ILog.Error(System.Object)"/>
- <seealso cref="M:log4net.ILog.ErrorFormat(System.IFormatProvider,System.String,System.Object[])"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="P:log4net.ILog.IsFatalEnabled">
- <summary>
- Checks if this logger is enabled for the <see cref="F:log4net.Core.Level.Fatal"/> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <see cref="F:log4net.Core.Level.Fatal"/> events, <c>false</c> otherwise.
- </value>
- <remarks>
- For more information see <see cref="P:log4net.ILog.IsDebugEnabled"/>.
- </remarks>
- <seealso cref="M:log4net.ILog.Fatal(System.Object)"/>
- <seealso cref="M:log4net.ILog.FatalFormat(System.IFormatProvider,System.String,System.Object[])"/>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="M:log4net.Core.LogImpl.#ctor(log4net.Core.ILogger)">
- <summary>
- Construct a new wrapper for the specified logger.
- </summary>
- <param name="logger">The logger to wrap.</param>
- <remarks>
- <para>
- Construct a new wrapper for the specified logger.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.ReloadLevels(log4net.Repository.ILoggerRepository)">
- <summary>
- Virtual method called when the configuration of the repository changes
- </summary>
- <param name="repository">the repository holding the levels</param>
- <remarks>
- <para>
- Virtual method called when the configuration of the repository changes
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Debug(System.Object)">
- <summary>
- Logs a message object with the <c>DEBUG</c> level.
- </summary>
- <param name="message">The message object to log.</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>DEBUG</c>
- enabled by comparing the level of this logger with the
- <c>DEBUG</c> level. If this logger is
- <c>DEBUG</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para>
- <b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.Core.LogImpl.Debug(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Debug(System.Object,System.Exception)">
- <summary>
- Logs a message object with the <c>DEBUG</c> level
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Logs a message object with the <c>DEBUG</c> level including
- the stack trace of the <see cref="T:System.Exception"/> <paramref name="exception"/> passed
- as a parameter.
- </para>
- <para>
- See the <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.Core.LogImpl.Debug(System.Object)"/>
- </member>
- <member name="M:log4net.Core.LogImpl.DebugFormat(System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>DEBUG</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.DebugFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.DebugFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <c>DEBUG</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.DebugFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.DebugFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>DEBUG</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.DebugFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.DebugFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>DEBUG</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.DebugFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.DebugFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>DEBUG</c> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Debug(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Info(System.Object)">
- <summary>
- Logs a message object with the <c>INFO</c> level.
- </summary>
- <param name="message">The message object to log.</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>INFO</c>
- enabled by comparing the level of this logger with the
- <c>INFO</c> level. If this logger is
- <c>INFO</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger
- and also higher in the hierarchy depending on the value of
- the additivity flag.
- </para>
- <para>
- <b>WARNING</b> Note that passing an <see cref="T:System.Exception"/>
- to this method will print the name of the <see cref="T:System.Exception"/>
- but no stack trace. To print a stack trace use the
- <see cref="M:log4net.Core.LogImpl.Info(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Info(System.Object,System.Exception)">
- <summary>
- Logs a message object with the <c>INFO</c> level.
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Logs a message object with the <c>INFO</c> level including
- the stack trace of the <see cref="T:System.Exception"/> <paramref name="exception"/>
- passed as a parameter.
- </para>
- <para>
- See the <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.Core.LogImpl.Info(System.Object)"/>
- </member>
- <member name="M:log4net.Core.LogImpl.InfoFormat(System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>INFO</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.InfoFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.InfoFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <c>INFO</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.InfoFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.InfoFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>INFO</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.InfoFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.InfoFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>INFO</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.InfoFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.InfoFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>INFO</c> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Info(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Warn(System.Object)">
- <summary>
- Logs a message object with the <c>WARN</c> level.
- </summary>
- <param name="message">the message object to log</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>WARN</c>
- enabled by comparing the level of this logger with the
- <c>WARN</c> level. If this logger is
- <c>WARN</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger and
- also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para>
- <b>WARNING</b> Note that passing an <see cref="T:System.Exception"/> to this
- method will print the name of the <see cref="T:System.Exception"/> but no
- stack trace. To print a stack trace use the
- <see cref="M:log4net.Core.LogImpl.Warn(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Warn(System.Object,System.Exception)">
- <summary>
- Logs a message object with the <c>WARN</c> level
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Logs a message object with the <c>WARN</c> level including
- the stack trace of the <see cref="T:System.Exception"/> <paramref name="exception"/>
- passed as a parameter.
- </para>
- <para>
- See the <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.Core.LogImpl.Warn(System.Object)"/>
- </member>
- <member name="M:log4net.Core.LogImpl.WarnFormat(System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>WARN</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.WarnFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.WarnFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <c>WARN</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.WarnFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.WarnFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>WARN</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.WarnFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.WarnFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>WARN</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.WarnFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.WarnFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>WARN</c> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Warn(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Error(System.Object)">
- <summary>
- Logs a message object with the <c>ERROR</c> level.
- </summary>
- <param name="message">The message object to log.</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>ERROR</c>
- enabled by comparing the level of this logger with the
- <c>ERROR</c> level. If this logger is
- <c>ERROR</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger and
- also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para>
- <b>WARNING</b> Note that passing an <see cref="T:System.Exception"/> to this
- method will print the name of the <see cref="T:System.Exception"/> but no
- stack trace. To print a stack trace use the
- <see cref="M:log4net.Core.LogImpl.Error(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Error(System.Object,System.Exception)">
- <summary>
- Logs a message object with the <c>ERROR</c> level
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Logs a message object with the <c>ERROR</c> level including
- the stack trace of the <see cref="T:System.Exception"/> <paramref name="exception"/>
- passed as a parameter.
- </para>
- <para>
- See the <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.Core.LogImpl.Error(System.Object)"/>
- </member>
- <member name="M:log4net.Core.LogImpl.ErrorFormat(System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>ERROR</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.ErrorFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.ErrorFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <c>ERROR</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.ErrorFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.ErrorFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>ERROR</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.ErrorFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.ErrorFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>ERROR</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.ErrorFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.ErrorFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>ERROR</c> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Error(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Fatal(System.Object)">
- <summary>
- Logs a message object with the <c>FATAL</c> level.
- </summary>
- <param name="message">The message object to log.</param>
- <remarks>
- <para>
- This method first checks if this logger is <c>FATAL</c>
- enabled by comparing the level of this logger with the
- <c>FATAL</c> level. If this logger is
- <c>FATAL</c> enabled, then it converts the message object
- (passed as parameter) to a string by invoking the appropriate
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>. It then
- proceeds to call all the registered appenders in this logger and
- also higher in the hierarchy depending on the value of the
- additivity flag.
- </para>
- <para>
- <b>WARNING</b> Note that passing an <see cref="T:System.Exception"/> to this
- method will print the name of the <see cref="T:System.Exception"/> but no
- stack trace. To print a stack trace use the
- <see cref="M:log4net.Core.LogImpl.Fatal(System.Object,System.Exception)"/> form instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.Fatal(System.Object,System.Exception)">
- <summary>
- Logs a message object with the <c>FATAL</c> level
- </summary>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Logs a message object with the <c>FATAL</c> level including
- the stack trace of the <see cref="T:System.Exception"/> <paramref name="exception"/>
- passed as a parameter.
- </para>
- <para>
- See the <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/> form for more detailed information.
- </para>
- </remarks>
- <seealso cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/>
- </member>
- <member name="M:log4net.Core.LogImpl.FatalFormat(System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>FATAL</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.FatalFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.FatalFormat(System.String,System.Object)">
- <summary>
- Logs a formatted message string with the <c>FATAL</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.FatalFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.FatalFormat(System.String,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>FATAL</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.FatalFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.FatalFormat(System.String,System.Object,System.Object,System.Object)">
- <summary>
- Logs a formatted message string with the <c>FATAL</c> level.
- </summary>
- <param name="format">A String containing zero or more format items</param>
- <param name="arg0">An Object to format</param>
- <param name="arg1">An Object to format</param>
- <param name="arg2">An Object to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- The string is formatted using the <see cref="P:System.Globalization.CultureInfo.InvariantCulture"/>
- format provider. To specify a localized provider use the
- <see cref="M:log4net.Core.LogImpl.FatalFormat(System.IFormatProvider,System.String,System.Object[])"/> method.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.FatalFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Logs a formatted message string with the <c>FATAL</c> level.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information</param>
- <param name="format">A String containing zero or more format items</param>
- <param name="args">An Object array containing zero or more objects to format</param>
- <remarks>
- <para>
- The message is formatted using the <see cref="M:System.String.Format(System.IFormatProvider,System.String,System.Object[])"/> method. See
- <c>String.Format</c> for details of the syntax of the format string and the behavior
- of the formatting.
- </para>
- <para>
- This method does not take an <see cref="T:System.Exception"/> object to include in the
- log event. To pass an <see cref="T:System.Exception"/> use one of the <see cref="M:log4net.Core.LogImpl.Fatal(System.Object)"/>
- methods instead.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.LogImpl.LoggerRepositoryConfigurationChanged(System.Object,System.EventArgs)">
- <summary>
- Event handler for the <see cref="E:log4net.Repository.ILoggerRepository.ConfigurationChanged"/> event
- </summary>
- <param name="sender">the repository</param>
- <param name="e">Empty</param>
- </member>
- <member name="F:log4net.Core.LogImpl.ThisDeclaringType">
- <summary>
- The fully qualified name of this declaring type not the type of any subclass.
- </summary>
- </member>
- <member name="P:log4net.Core.LogImpl.IsDebugEnabled">
- <summary>
- Checks if this logger is enabled for the <c>DEBUG</c>
- level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <c>DEBUG</c> events,
- <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- This function is intended to lessen the computational cost of
- disabled log debug statements.
- </para>
- <para>
- For some <c>log</c> Logger object, when you write:
- </para>
- <code lang="C#">
- log.Debug("This is entry number: " + i );
- </code>
- <para>
- You incur the cost constructing the message, concatenation in
- this case, regardless of whether the message is logged or not.
- </para>
- <para>
- If you are worried about speed, then you should write:
- </para>
- <code lang="C#">
- if (log.IsDebugEnabled())
- {
- log.Debug("This is entry number: " + i );
- }
- </code>
- <para>
- This way you will not incur the cost of parameter
- construction if debugging is disabled for <c>log</c>. On
- the other hand, if the <c>log</c> is debug enabled, you
- will incur the cost of evaluating whether the logger is debug
- enabled twice. Once in <c>IsDebugEnabled</c> and once in
- the <c>Debug</c>. This is an insignificant overhead
- since evaluating a logger takes about 1% of the time it
- takes to actually log.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.LogImpl.IsInfoEnabled">
- <summary>
- Checks if this logger is enabled for the <c>INFO</c> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <c>INFO</c> events,
- <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- See <see cref="P:log4net.Core.LogImpl.IsDebugEnabled"/> for more information and examples
- of using this method.
- </para>
- </remarks>
- <seealso cref="P:log4net.Core.LogImpl.IsDebugEnabled"/>
- </member>
- <member name="P:log4net.Core.LogImpl.IsWarnEnabled">
- <summary>
- Checks if this logger is enabled for the <c>WARN</c> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <c>WARN</c> events,
- <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- See <see cref="P:log4net.Core.LogImpl.IsDebugEnabled"/> for more information and examples
- of using this method.
- </para>
- </remarks>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="P:log4net.Core.LogImpl.IsErrorEnabled">
- <summary>
- Checks if this logger is enabled for the <c>ERROR</c> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <c>ERROR</c> events,
- <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- See <see cref="P:log4net.Core.LogImpl.IsDebugEnabled"/> for more information and examples of using this method.
- </para>
- </remarks>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="P:log4net.Core.LogImpl.IsFatalEnabled">
- <summary>
- Checks if this logger is enabled for the <c>FATAL</c> level.
- </summary>
- <value>
- <c>true</c> if this logger is enabled for <c>FATAL</c> events,
- <c>false</c> otherwise.
- </value>
- <remarks>
- <para>
- See <see cref="P:log4net.Core.LogImpl.IsDebugEnabled"/> for more information and examples of using this method.
- </para>
- </remarks>
- <seealso cref="P:log4net.ILog.IsDebugEnabled"/>
- </member>
- <member name="T:log4net.Core.SecurityContext">
- <summary>
- A SecurityContext used by log4net when interacting with protected resources
- </summary>
- <remarks>
- <para>
- A SecurityContext used by log4net when interacting with protected resources
- for example with operating system services. This can be used to impersonate
- a principal that has been granted privileges on the system resources.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Core.SecurityContext.Impersonate(System.Object)">
- <summary>
- Impersonate this SecurityContext
- </summary>
- <param name="state">State supplied by the caller</param>
- <returns>An <see cref="T:System.IDisposable"/> instance that will
- revoke the impersonation of this SecurityContext, or <c>null</c></returns>
- <remarks>
- <para>
- Impersonate this security context. Further calls on the current
- thread should now be made in the security context provided
- by this object. When the <see cref="T:System.IDisposable"/> result
- <see cref="M:System.IDisposable.Dispose"/> method is called the security
- context of the thread should be reverted to the state it was in
- before <see cref="M:log4net.Core.SecurityContext.Impersonate(System.Object)"/> was called.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.SecurityContextProvider">
- <summary>
- The <see cref="T:log4net.Core.SecurityContextProvider"/> providers default <see cref="T:log4net.Core.SecurityContext"/> instances.
- </summary>
- <remarks>
- <para>
- A configured component that interacts with potentially protected system
- resources uses a <see cref="T:log4net.Core.SecurityContext"/> to provide the elevated
- privileges required. If the <see cref="T:log4net.Core.SecurityContext"/> object has
- been not been explicitly provided to the component then the component
- will request one from this <see cref="T:log4net.Core.SecurityContextProvider"/>.
- </para>
- <para>
- By default the <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> is
- an instance of <see cref="T:log4net.Core.SecurityContextProvider"/> which returns only
- <see cref="T:log4net.Util.NullSecurityContext"/> objects. This is a reasonable default
- where the privileges required are not know by the system.
- </para>
- <para>
- This default behavior can be overridden by subclassing the <see cref="T:log4net.Core.SecurityContextProvider"/>
- and overriding the <see cref="M:log4net.Core.SecurityContextProvider.CreateSecurityContext(System.Object)"/> method to return
- the desired <see cref="T:log4net.Core.SecurityContext"/> objects. The default provider
- can be replaced by programmatically setting the value of the
- <see cref="P:log4net.Core.SecurityContextProvider.DefaultProvider"/> property.
- </para>
- <para>
- An alternative is to use the <c>log4net.Config.SecurityContextProviderAttribute</c>
- This attribute can be applied to an assembly in the same way as the
- <c>log4net.Config.XmlConfiguratorAttribute"</c>. The attribute takes
- the type to use as the <see cref="T:log4net.Core.SecurityContextProvider"/> as an argument.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Core.SecurityContextProvider.s_defaultProvider">
- <summary>
- The default provider
- </summary>
- </member>
- <member name="M:log4net.Core.SecurityContextProvider.#ctor">
- <summary>
- Protected default constructor to allow subclassing
- </summary>
- <remarks>
- <para>
- Protected default constructor to allow subclassing
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.SecurityContextProvider.CreateSecurityContext(System.Object)">
- <summary>
- Create a SecurityContext for a consumer
- </summary>
- <param name="consumer">The consumer requesting the SecurityContext</param>
- <returns>An impersonation context</returns>
- <remarks>
- <para>
- The default implementation is to return a <see cref="T:log4net.Util.NullSecurityContext"/>.
- </para>
- <para>
- Subclasses should override this method to provide their own
- behavior.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Core.SecurityContextProvider.DefaultProvider">
- <summary>
- Gets or sets the default SecurityContextProvider
- </summary>
- <value>
- The default SecurityContextProvider
- </value>
- <remarks>
- <para>
- The default provider is used by configured components that
- require a <see cref="T:log4net.Core.SecurityContext"/> and have not had one
- given to them.
- </para>
- <para>
- By default this is an instance of <see cref="T:log4net.Core.SecurityContextProvider"/>
- that returns <see cref="T:log4net.Util.NullSecurityContext"/> objects.
- </para>
- <para>
- The default provider can be set programmatically by setting
- the value of this property to a sub class of <see cref="T:log4net.Core.SecurityContextProvider"/>
- that has the desired behavior.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.WrapperCreationHandler">
- <summary>
- Delegate used to handle creation of new wrappers.
- </summary>
- <param name="logger">The logger to wrap in a wrapper.</param>
- <remarks>
- <para>
- Delegate used to handle creation of new wrappers. This delegate
- is called from the <see cref="M:log4net.Core.WrapperMap.CreateNewWrapperObject(log4net.Core.ILogger)"/>
- method to construct the wrapper for the specified logger.
- </para>
- <para>
- The delegate to use is supplied to the <see cref="T:log4net.Core.WrapperMap"/>
- constructor.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Core.WrapperMap">
- <summary>
- Maps between logger objects and wrapper objects.
- </summary>
- <remarks>
- <para>
- This class maintains a mapping between <see cref="T:log4net.Core.ILogger"/> objects and
- <see cref="T:log4net.Core.ILoggerWrapper"/> objects. Use the <see cref="M:log4net.Core.WrapperMap.GetWrapper(log4net.Core.ILogger)"/> method to
- lookup the <see cref="T:log4net.Core.ILoggerWrapper"/> for the specified <see cref="T:log4net.Core.ILogger"/>.
- </para>
- <para>
- New wrapper instances are created by the <see cref="M:log4net.Core.WrapperMap.CreateNewWrapperObject(log4net.Core.ILogger)"/>
- method. The default behavior is for this method to delegate construction
- of the wrapper to the <see cref="T:log4net.Core.WrapperCreationHandler"/> delegate supplied
- to the constructor. This allows specialization of the behavior without
- requiring subclassing of this type.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Core.WrapperMap.#ctor(log4net.Core.WrapperCreationHandler)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Core.WrapperMap"/>
- </summary>
- <param name="createWrapperHandler">The handler to use to create the wrapper objects.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Core.WrapperMap"/> class with
- the specified handler to create the wrapper objects.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.WrapperMap.GetWrapper(log4net.Core.ILogger)">
- <summary>
- Gets the wrapper object for the specified logger.
- </summary>
- <returns>The wrapper object for the specified logger</returns>
- <remarks>
- <para>
- If the logger is null then the corresponding wrapper is null.
- </para>
- <para>
- Looks up the wrapper it it has previously been requested and
- returns it. If the wrapper has never been requested before then
- the <see cref="M:log4net.Core.WrapperMap.CreateNewWrapperObject(log4net.Core.ILogger)"/> virtual method is
- called.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.WrapperMap.CreateNewWrapperObject(log4net.Core.ILogger)">
- <summary>
- Creates the wrapper object for the specified logger.
- </summary>
- <param name="logger">The logger to wrap in a wrapper.</param>
- <returns>The wrapper object for the logger.</returns>
- <remarks>
- <para>
- This implementation uses the <see cref="T:log4net.Core.WrapperCreationHandler"/>
- passed to the constructor to create the wrapper. This method
- can be overridden in a subclass.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.WrapperMap.RepositoryShutdown(log4net.Repository.ILoggerRepository)">
- <summary>
- Called when a monitored repository shutdown event is received.
- </summary>
- <param name="repository">The <see cref="T:log4net.Repository.ILoggerRepository"/> that is shutting down</param>
- <remarks>
- <para>
- This method is called when a <see cref="T:log4net.Repository.ILoggerRepository"/> that this
- <see cref="T:log4net.Core.WrapperMap"/> is holding loggers for has signaled its shutdown
- event <see cref="E:log4net.Repository.ILoggerRepository.ShutdownEvent"/>. The default
- behavior of this method is to release the references to the loggers
- and their wrappers generated for this repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Core.WrapperMap.ILoggerRepository_Shutdown(System.Object,System.EventArgs)">
- <summary>
- Event handler for repository shutdown event.
- </summary>
- <param name="sender">The sender of the event.</param>
- <param name="e">The event args.</param>
- </member>
- <member name="F:log4net.Core.WrapperMap.m_repositories">
- <summary>
- Map of logger repositories to hashtables of ILogger to ILoggerWrapper mappings
- </summary>
- </member>
- <member name="F:log4net.Core.WrapperMap.m_createWrapperHandler">
- <summary>
- The handler to use to create the extension wrapper objects.
- </summary>
- </member>
- <member name="F:log4net.Core.WrapperMap.m_shutdownHandler">
- <summary>
- Internal reference to the delegate used to register for repository shutdown events.
- </summary>
- </member>
- <member name="P:log4net.Core.WrapperMap.Repositories">
- <summary>
- Gets the map of logger repositories.
- </summary>
- <value>
- Map of logger repositories.
- </value>
- <remarks>
- <para>
- Gets the hashtable that is keyed on <see cref="T:log4net.Repository.ILoggerRepository"/>. The
- values are hashtables keyed on <see cref="T:log4net.Core.ILogger"/> with the
- value being the corresponding <see cref="T:log4net.Core.ILoggerWrapper"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.DateFormatter.AbsoluteTimeDateFormatter">
- <summary>
- Formats a <see cref="T:System.DateTime"/> as <c>"HH:mm:ss,fff"</c>.
- </summary>
- <remarks>
- <para>
- Formats a <see cref="T:System.DateTime"/> in the format <c>"HH:mm:ss,fff"</c> for example, <c>"15:49:37,459"</c>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.DateFormatter.IDateFormatter">
- <summary>
- Render a <see cref="T:System.DateTime"/> as a string.
- </summary>
- <remarks>
- <para>
- Interface to abstract the rendering of a <see cref="T:System.DateTime"/>
- instance into a string.
- </para>
- <para>
- The <see cref="M:log4net.DateFormatter.IDateFormatter.FormatDate(System.DateTime,System.IO.TextWriter)"/> method is used to render the
- date to a text writer.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.DateFormatter.IDateFormatter.FormatDate(System.DateTime,System.IO.TextWriter)">
- <summary>
- Formats the specified date as a string.
- </summary>
- <param name="dateToFormat">The date to format.</param>
- <param name="writer">The writer to write to.</param>
- <remarks>
- <para>
- Format the <see cref="T:System.DateTime"/> as a string and write it
- to the <see cref="T:System.IO.TextWriter"/> provided.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.DateFormatter.AbsoluteTimeDateFormatter.AbsoluteTimeDateFormat">
- <summary>
- String constant used to specify AbsoluteTimeDateFormat in layouts. Current value is <b>ABSOLUTE</b>.
- </summary>
- </member>
- <member name="F:log4net.DateFormatter.AbsoluteTimeDateFormatter.DateAndTimeDateFormat">
- <summary>
- String constant used to specify DateTimeDateFormat in layouts. Current value is <b>DATE</b>.
- </summary>
- </member>
- <member name="F:log4net.DateFormatter.AbsoluteTimeDateFormatter.Iso8601TimeDateFormat">
- <summary>
- String constant used to specify ISO8601DateFormat in layouts. Current value is <b>ISO8601</b>.
- </summary>
- </member>
- <member name="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)">
- <summary>
- Renders the date into a string. Format is <c>"HH:mm:ss"</c>.
- </summary>
- <param name="dateToFormat">The date to render into a string.</param>
- <param name="buffer">The string builder to write to.</param>
- <remarks>
- <para>
- Subclasses should override this method to render the date
- into a string using a precision up to the second. This method
- will be called at most once per second and the result will be
- reused if it is needed again during the same second.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDate(System.DateTime,System.IO.TextWriter)">
- <summary>
- Renders the date into a string. Format is "HH:mm:ss,fff".
- </summary>
- <param name="dateToFormat">The date to render into a string.</param>
- <param name="writer">The writer to write to.</param>
- <remarks>
- <para>
- Uses the <see cref="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)"/> method to generate the
- time string up to the seconds and then appends the current
- milliseconds. The results from <see cref="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)"/> are
- cached and <see cref="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)"/> is called at most once
- per second.
- </para>
- <para>
- Sub classes should override <see cref="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)"/>
- rather than <see cref="M:log4net.DateFormatter.AbsoluteTimeDateFormatter.FormatDate(System.DateTime,System.IO.TextWriter)"/>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.DateFormatter.AbsoluteTimeDateFormatter.s_lastTimeToTheSecond">
- <summary>
- Last stored time with precision up to the second.
- </summary>
- </member>
- <member name="F:log4net.DateFormatter.AbsoluteTimeDateFormatter.s_lastTimeBuf">
- <summary>
- Last stored time with precision up to the second, formatted
- as a string.
- </summary>
- </member>
- <member name="F:log4net.DateFormatter.AbsoluteTimeDateFormatter.s_lastTimeString">
- <summary>
- Last stored time with precision up to the second, formatted
- as a string.
- </summary>
- </member>
- <member name="T:log4net.DateFormatter.DateTimeDateFormatter">
- <summary>
- Formats a <see cref="T:System.DateTime"/> as <c>"dd MMM yyyy HH:mm:ss,fff"</c>
- </summary>
- <remarks>
- <para>
- Formats a <see cref="T:System.DateTime"/> in the format
- <c>"dd MMM yyyy HH:mm:ss,fff"</c> for example,
- <c>"06 Nov 1994 15:49:37,459"</c>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Angelika Schnagl</author>
- </member>
- <member name="M:log4net.DateFormatter.DateTimeDateFormatter.#ctor">
- <summary>
- Default constructor.
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.DateFormatter.DateTimeDateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)">
- <summary>
- Formats the date without the milliseconds part
- </summary>
- <param name="dateToFormat">The date to format.</param>
- <param name="buffer">The string builder to write to.</param>
- <remarks>
- <para>
- Formats a DateTime in the format <c>"dd MMM yyyy HH:mm:ss"</c>
- for example, <c>"06 Nov 1994 15:49:37"</c>.
- </para>
- <para>
- The base class will append the <c>",fff"</c> milliseconds section.
- This method will only be called at most once per second.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.DateFormatter.DateTimeDateFormatter.m_dateTimeFormatInfo">
- <summary>
- The format info for the invariant culture.
- </summary>
- </member>
- <member name="T:log4net.DateFormatter.Iso8601DateFormatter">
- <summary>
- Formats the <see cref="T:System.DateTime"/> as <c>"yyyy-MM-dd HH:mm:ss,fff"</c>.
- </summary>
- <remarks>
- <para>
- Formats the <see cref="T:System.DateTime"/> specified as a string: <c>"yyyy-MM-dd HH:mm:ss,fff"</c>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.DateFormatter.Iso8601DateFormatter.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.DateFormatter.Iso8601DateFormatter.FormatDateWithoutMillis(System.DateTime,System.Text.StringBuilder)">
- <summary>
- Formats the date without the milliseconds part
- </summary>
- <param name="dateToFormat">The date to format.</param>
- <param name="buffer">The string builder to write to.</param>
- <remarks>
- <para>
- Formats the date specified as a string: <c>"yyyy-MM-dd HH:mm:ss"</c>.
- </para>
- <para>
- The base class will append the <c>",fff"</c> milliseconds section.
- This method will only be called at most once per second.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.DateFormatter.SimpleDateFormatter">
- <summary>
- Formats the <see cref="T:System.DateTime"/> using the <see cref="M:System.DateTime.ToString(System.String,System.IFormatProvider)"/> method.
- </summary>
- <remarks>
- <para>
- Formats the <see cref="T:System.DateTime"/> using the <see cref="T:System.DateTime"/> <see cref="M:System.DateTime.ToString(System.String,System.IFormatProvider)"/> method.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.DateFormatter.SimpleDateFormatter.#ctor(System.String)">
- <summary>
- Constructor
- </summary>
- <param name="format">The format string.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.DateFormatter.SimpleDateFormatter"/> class
- with the specified format string.
- </para>
- <para>
- The format string must be compatible with the options
- that can be supplied to <see cref="M:System.DateTime.ToString(System.String,System.IFormatProvider)"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.DateFormatter.SimpleDateFormatter.FormatDate(System.DateTime,System.IO.TextWriter)">
- <summary>
- Formats the date using <see cref="M:System.DateTime.ToString(System.String,System.IFormatProvider)"/>.
- </summary>
- <param name="dateToFormat">The date to convert to a string.</param>
- <param name="writer">The writer to write to.</param>
- <remarks>
- <para>
- Uses the date format string supplied to the constructor to call
- the <see cref="M:System.DateTime.ToString(System.String,System.IFormatProvider)"/> method to format the date.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.DateFormatter.SimpleDateFormatter.m_formatString">
- <summary>
- The format string used to format the <see cref="T:System.DateTime"/>.
- </summary>
- <remarks>
- <para>
- The format string must be compatible with the options
- that can be supplied to <see cref="M:System.DateTime.ToString(System.String,System.IFormatProvider)"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Filter.DenyAllFilter">
- <summary>
- This filter drops all <see cref="T:log4net.Core.LoggingEvent"/>.
- </summary>
- <remarks>
- <para>
- You can add this filter to the end of a filter chain to
- switch from the default "accept all unless instructed otherwise"
- filtering behavior to a "deny all unless instructed otherwise"
- behavior.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Filter.FilterSkeleton">
- <summary>
- Subclass this type to implement customized logging event filtering
- </summary>
- <remarks>
- <para>
- Users should extend this class to implement customized logging
- event filtering. Note that <see cref="T:log4net.Repository.Hierarchy.Logger"/> and
- <see cref="T:log4net.Appender.AppenderSkeleton"/>, the parent class of all standard
- appenders, have built-in filtering rules. It is suggested that you
- first use and understand the built-in rules before rushing to write
- your own custom filters.
- </para>
- <para>
- This abstract class assumes and also imposes that filters be
- organized in a linear chain. The <see cref="M:log4net.Filter.FilterSkeleton.Decide(log4net.Core.LoggingEvent)"/>
- method of each filter is called sequentially, in the order of their
- addition to the chain.
- </para>
- <para>
- The <see cref="M:log4net.Filter.FilterSkeleton.Decide(log4net.Core.LoggingEvent)"/> method must return one
- of the integer constants <see cref="F:log4net.Filter.FilterDecision.Deny"/>,
- <see cref="F:log4net.Filter.FilterDecision.Neutral"/> or <see cref="F:log4net.Filter.FilterDecision.Accept"/>.
- </para>
- <para>
- If the value <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned, then the log event is dropped
- immediately without consulting with the remaining filters.
- </para>
- <para>
- If the value <see cref="F:log4net.Filter.FilterDecision.Neutral"/> is returned, then the next filter
- in the chain is consulted. If there are no more filters in the
- chain, then the log event is logged. Thus, in the presence of no
- filters, the default behavior is to log all logging events.
- </para>
- <para>
- If the value <see cref="F:log4net.Filter.FilterDecision.Accept"/> is returned, then the log
- event is logged without consulting the remaining filters.
- </para>
- <para>
- The philosophy of log4net filters is largely inspired from the
- Linux ipchains.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Filter.IFilter">
- <summary>
- Implement this interface to provide customized logging event filtering
- </summary>
- <remarks>
- <para>
- Users should implement this interface to implement customized logging
- event filtering. Note that <see cref="T:log4net.Repository.Hierarchy.Logger"/> and
- <see cref="T:log4net.Appender.AppenderSkeleton"/>, the parent class of all standard
- appenders, have built-in filtering rules. It is suggested that you
- first use and understand the built-in rules before rushing to write
- your own custom filters.
- </para>
- <para>
- This abstract class assumes and also imposes that filters be
- organized in a linear chain. The <see cref="M:log4net.Filter.IFilter.Decide(log4net.Core.LoggingEvent)"/>
- method of each filter is called sequentially, in the order of their
- addition to the chain.
- </para>
- <para>
- The <see cref="M:log4net.Filter.IFilter.Decide(log4net.Core.LoggingEvent)"/> method must return one
- of the integer constants <see cref="F:log4net.Filter.FilterDecision.Deny"/>,
- <see cref="F:log4net.Filter.FilterDecision.Neutral"/> or <see cref="F:log4net.Filter.FilterDecision.Accept"/>.
- </para>
- <para>
- If the value <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned, then the log event is dropped
- immediately without consulting with the remaining filters.
- </para>
- <para>
- If the value <see cref="F:log4net.Filter.FilterDecision.Neutral"/> is returned, then the next filter
- in the chain is consulted. If there are no more filters in the
- chain, then the log event is logged. Thus, in the presence of no
- filters, the default behavior is to log all logging events.
- </para>
- <para>
- If the value <see cref="F:log4net.Filter.FilterDecision.Accept"/> is returned, then the log
- event is logged without consulting the remaining filters.
- </para>
- <para>
- The philosophy of log4net filters is largely inspired from the
- Linux ipchains.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Filter.IFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Decide if the logging event should be logged through an appender.
- </summary>
- <param name="loggingEvent">The LoggingEvent to decide upon</param>
- <returns>The decision of the filter</returns>
- <remarks>
- <para>
- If the decision is <see cref="F:log4net.Filter.FilterDecision.Deny"/>, then the event will be
- dropped. If the decision is <see cref="F:log4net.Filter.FilterDecision.Neutral"/>, then the next
- filter, if any, will be invoked. If the decision is <see cref="F:log4net.Filter.FilterDecision.Accept"/> then
- the event will be logged without consulting with other filters in
- the chain.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.IFilter.Next">
- <summary>
- Property to get and set the next filter
- </summary>
- <value>
- The next filter in the chain
- </value>
- <remarks>
- <para>
- Filters are typically composed into chains. This property allows the next filter in
- the chain to be accessed.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Filter.FilterSkeleton.m_next">
- <summary>
- Points to the next filter in the filter chain.
- </summary>
- <remarks>
- <para>
- See <see cref="P:log4net.Filter.FilterSkeleton.Next"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Filter.FilterSkeleton.ActivateOptions">
- <summary>
- Initialize the filter with the options set
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Filter.FilterSkeleton.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Filter.FilterSkeleton.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Filter.FilterSkeleton.ActivateOptions"/> must be called again.
- </para>
- <para>
- Typically filter's options become active immediately on set,
- however this method must still be called.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Filter.FilterSkeleton.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Decide if the <see cref="T:log4net.Core.LoggingEvent"/> should be logged through an appender.
- </summary>
- <param name="loggingEvent">The <see cref="T:log4net.Core.LoggingEvent"/> to decide upon</param>
- <returns>The decision of the filter</returns>
- <remarks>
- <para>
- If the decision is <see cref="F:log4net.Filter.FilterDecision.Deny"/>, then the event will be
- dropped. If the decision is <see cref="F:log4net.Filter.FilterDecision.Neutral"/>, then the next
- filter, if any, will be invoked. If the decision is <see cref="F:log4net.Filter.FilterDecision.Accept"/> then
- the event will be logged without consulting with other filters in
- the chain.
- </para>
- <para>
- This method is marked <c>abstract</c> and must be implemented
- in a subclass.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.FilterSkeleton.Next">
- <summary>
- Property to get and set the next filter
- </summary>
- <value>
- The next filter in the chain
- </value>
- <remarks>
- <para>
- Filters are typically composed into chains. This property allows the next filter in
- the chain to be accessed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Filter.DenyAllFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Filter.DenyAllFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Always returns the integer constant <see cref="F:log4net.Filter.FilterDecision.Deny"/>
- </summary>
- <param name="loggingEvent">the LoggingEvent to filter</param>
- <returns>Always returns <see cref="F:log4net.Filter.FilterDecision.Deny"/></returns>
- <remarks>
- <para>
- Ignores the event being logged and just returns
- <see cref="F:log4net.Filter.FilterDecision.Deny"/>. This can be used to change the default filter
- chain behavior from <see cref="F:log4net.Filter.FilterDecision.Accept"/> to <see cref="F:log4net.Filter.FilterDecision.Deny"/>. This filter
- should only be used as the last filter in the chain
- as any further filters will be ignored!
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Filter.FilterDecision">
- <summary>
- The return result from <see cref="M:log4net.Filter.IFilter.Decide(log4net.Core.LoggingEvent)"/>
- </summary>
- <remarks>
- <para>
- The return result from <see cref="M:log4net.Filter.IFilter.Decide(log4net.Core.LoggingEvent)"/>
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Filter.FilterDecision.Deny">
- <summary>
- The log event must be dropped immediately without
- consulting with the remaining filters, if any, in the chain.
- </summary>
- </member>
- <member name="F:log4net.Filter.FilterDecision.Neutral">
- <summary>
- This filter is neutral with respect to the log event.
- The remaining filters, if any, should be consulted for a final decision.
- </summary>
- </member>
- <member name="F:log4net.Filter.FilterDecision.Accept">
- <summary>
- The log event must be logged immediately without
- consulting with the remaining filters, if any, in the chain.
- </summary>
- </member>
- <member name="T:log4net.Filter.LevelMatchFilter">
- <summary>
- This is a very simple filter based on <see cref="T:log4net.Core.Level"/> matching.
- </summary>
- <remarks>
- <para>
- The filter admits two options <see cref="P:log4net.Filter.LevelMatchFilter.LevelToMatch"/> and
- <see cref="P:log4net.Filter.LevelMatchFilter.AcceptOnMatch"/>. If there is an exact match between the value
- of the <see cref="P:log4net.Filter.LevelMatchFilter.LevelToMatch"/> option and the <see cref="T:log4net.Core.Level"/> of the
- <see cref="T:log4net.Core.LoggingEvent"/>, then the <see cref="M:log4net.Filter.LevelMatchFilter.Decide(log4net.Core.LoggingEvent)"/> method returns <see cref="F:log4net.Filter.FilterDecision.Accept"/> in
- case the <see cref="P:log4net.Filter.LevelMatchFilter.AcceptOnMatch"/> option value is set
- to <c>true</c>, if it is <c>false</c> then
- <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned. If the <see cref="T:log4net.Core.Level"/> does not match then
- the result will be <see cref="F:log4net.Filter.FilterDecision.Neutral"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Filter.LevelMatchFilter.m_acceptOnMatch">
- <summary>
- flag to indicate if the filter should <see cref="F:log4net.Filter.FilterDecision.Accept"/> on a match
- </summary>
- </member>
- <member name="F:log4net.Filter.LevelMatchFilter.m_levelToMatch">
- <summary>
- the <see cref="T:log4net.Core.Level"/> to match against
- </summary>
- </member>
- <member name="M:log4net.Filter.LevelMatchFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Filter.LevelMatchFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Tests if the <see cref="T:log4net.Core.Level"/> of the logging event matches that of the filter
- </summary>
- <param name="loggingEvent">the event to filter</param>
- <returns>see remarks</returns>
- <remarks>
- <para>
- If the <see cref="T:log4net.Core.Level"/> of the event matches the level of the
- filter then the result of the function depends on the
- value of <see cref="P:log4net.Filter.LevelMatchFilter.AcceptOnMatch"/>. If it is true then
- the function will return <see cref="F:log4net.Filter.FilterDecision.Accept"/>, it it is false then it
- will return <see cref="F:log4net.Filter.FilterDecision.Deny"/>. If the <see cref="T:log4net.Core.Level"/> does not match then
- the result will be <see cref="F:log4net.Filter.FilterDecision.Neutral"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LevelMatchFilter.AcceptOnMatch">
- <summary>
- <see cref="F:log4net.Filter.FilterDecision.Accept"/> when matching <see cref="P:log4net.Filter.LevelMatchFilter.LevelToMatch"/>
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Filter.LevelMatchFilter.AcceptOnMatch"/> property is a flag that determines
- the behavior when a matching <see cref="T:log4net.Core.Level"/> is found. If the
- flag is set to true then the filter will <see cref="F:log4net.Filter.FilterDecision.Accept"/> the
- logging event, otherwise it will <see cref="F:log4net.Filter.FilterDecision.Deny"/> the event.
- </para>
- <para>
- The default is <c>true</c> i.e. to <see cref="F:log4net.Filter.FilterDecision.Accept"/> the event.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LevelMatchFilter.LevelToMatch">
- <summary>
- The <see cref="T:log4net.Core.Level"/> that the filter will match
- </summary>
- <remarks>
- <para>
- The level that this filter will attempt to match against the
- <see cref="T:log4net.Core.LoggingEvent"/> level. If a match is found then
- the result depends on the value of <see cref="P:log4net.Filter.LevelMatchFilter.AcceptOnMatch"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Filter.LevelRangeFilter">
- <summary>
- This is a simple filter based on <see cref="T:log4net.Core.Level"/> matching.
- </summary>
- <remarks>
- <para>
- The filter admits three options <see cref="P:log4net.Filter.LevelRangeFilter.LevelMin"/> and <see cref="P:log4net.Filter.LevelRangeFilter.LevelMax"/>
- that determine the range of priorities that are matched, and
- <see cref="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch"/>. If there is a match between the range
- of priorities and the <see cref="T:log4net.Core.Level"/> of the <see cref="T:log4net.Core.LoggingEvent"/>, then the
- <see cref="M:log4net.Filter.LevelRangeFilter.Decide(log4net.Core.LoggingEvent)"/> method returns <see cref="F:log4net.Filter.FilterDecision.Accept"/> in case the <see cref="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch"/>
- option value is set to <c>true</c>, if it is <c>false</c>
- then <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned. If there is no match, <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Filter.LevelRangeFilter.m_acceptOnMatch">
- <summary>
- Flag to indicate the behavior when matching a <see cref="T:log4net.Core.Level"/>
- </summary>
- </member>
- <member name="F:log4net.Filter.LevelRangeFilter.m_levelMin">
- <summary>
- the minimum <see cref="T:log4net.Core.Level"/> value to match
- </summary>
- </member>
- <member name="F:log4net.Filter.LevelRangeFilter.m_levelMax">
- <summary>
- the maximum <see cref="T:log4net.Core.Level"/> value to match
- </summary>
- </member>
- <member name="M:log4net.Filter.LevelRangeFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Filter.LevelRangeFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Check if the event should be logged.
- </summary>
- <param name="loggingEvent">the logging event to check</param>
- <returns>see remarks</returns>
- <remarks>
- <para>
- If the <see cref="T:log4net.Core.Level"/> of the logging event is outside the range
- matched by this filter then <see cref="F:log4net.Filter.FilterDecision.Deny"/>
- is returned. If the <see cref="T:log4net.Core.Level"/> is matched then the value of
- <see cref="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch"/> is checked. If it is true then
- <see cref="F:log4net.Filter.FilterDecision.Accept"/> is returned, otherwise
- <see cref="F:log4net.Filter.FilterDecision.Neutral"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch">
- <summary>
- <see cref="F:log4net.Filter.FilterDecision.Accept"/> when matching <see cref="P:log4net.Filter.LevelRangeFilter.LevelMin"/> and <see cref="P:log4net.Filter.LevelRangeFilter.LevelMax"/>
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch"/> property is a flag that determines
- the behavior when a matching <see cref="T:log4net.Core.Level"/> is found. If the
- flag is set to true then the filter will <see cref="F:log4net.Filter.FilterDecision.Accept"/> the
- logging event, otherwise it will <see cref="F:log4net.Filter.FilterDecision.Neutral"/> the event.
- </para>
- <para>
- The default is <c>true</c> i.e. to <see cref="F:log4net.Filter.FilterDecision.Accept"/> the event.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LevelRangeFilter.LevelMin">
- <summary>
- Set the minimum matched <see cref="T:log4net.Core.Level"/>
- </summary>
- <remarks>
- <para>
- The minimum level that this filter will attempt to match against the
- <see cref="T:log4net.Core.LoggingEvent"/> level. If a match is found then
- the result depends on the value of <see cref="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LevelRangeFilter.LevelMax">
- <summary>
- Sets the maximum matched <see cref="T:log4net.Core.Level"/>
- </summary>
- <remarks>
- <para>
- The maximum level that this filter will attempt to match against the
- <see cref="T:log4net.Core.LoggingEvent"/> level. If a match is found then
- the result depends on the value of <see cref="P:log4net.Filter.LevelRangeFilter.AcceptOnMatch"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Filter.LoggerMatchFilter">
- <summary>
- Simple filter to match a string in the event's logger name.
- </summary>
- <remarks>
- <para>
- The works very similar to the <see cref="T:log4net.Filter.LevelMatchFilter"/>. It admits two
- options <see cref="P:log4net.Filter.LoggerMatchFilter.LoggerToMatch"/> and <see cref="P:log4net.Filter.LoggerMatchFilter.AcceptOnMatch"/>. If the
- <see cref="P:log4net.Core.LoggingEvent.LoggerName"/> of the <see cref="T:log4net.Core.LoggingEvent"/> starts
- with the value of the <see cref="P:log4net.Filter.LoggerMatchFilter.LoggerToMatch"/> option, then the
- <see cref="M:log4net.Filter.LoggerMatchFilter.Decide(log4net.Core.LoggingEvent)"/> method returns <see cref="F:log4net.Filter.FilterDecision.Accept"/> in
- case the <see cref="P:log4net.Filter.LoggerMatchFilter.AcceptOnMatch"/> option value is set to <c>true</c>,
- if it is <c>false</c> then <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned.
- </para>
- </remarks>
- <author>Daniel Cazzulino</author>
- </member>
- <member name="F:log4net.Filter.LoggerMatchFilter.m_acceptOnMatch">
- <summary>
- Flag to indicate the behavior when we have a match
- </summary>
- </member>
- <member name="F:log4net.Filter.LoggerMatchFilter.m_loggerToMatch">
- <summary>
- The logger name string to substring match against the event
- </summary>
- </member>
- <member name="M:log4net.Filter.LoggerMatchFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Filter.LoggerMatchFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Check if this filter should allow the event to be logged
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <returns>see remarks</returns>
- <remarks>
- <para>
- The rendered message is matched against the <see cref="P:log4net.Filter.LoggerMatchFilter.LoggerToMatch"/>.
- If the <see cref="P:log4net.Filter.LoggerMatchFilter.LoggerToMatch"/> equals the beginning of
- the incoming <see cref="P:log4net.Core.LoggingEvent.LoggerName"/> (<see cref="M:System.String.StartsWith(System.String)"/>)
- then a match will have occurred. If no match occurs
- this function will return <see cref="F:log4net.Filter.FilterDecision.Neutral"/>
- allowing other filters to check the event. If a match occurs then
- the value of <see cref="P:log4net.Filter.LoggerMatchFilter.AcceptOnMatch"/> is checked. If it is
- true then <see cref="F:log4net.Filter.FilterDecision.Accept"/> is returned otherwise
- <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LoggerMatchFilter.AcceptOnMatch">
- <summary>
- <see cref="F:log4net.Filter.FilterDecision.Accept"/> when matching <see cref="P:log4net.Filter.LoggerMatchFilter.LoggerToMatch"/>
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Filter.LoggerMatchFilter.AcceptOnMatch"/> property is a flag that determines
- the behavior when a matching <see cref="T:log4net.Core.Level"/> is found. If the
- flag is set to true then the filter will <see cref="F:log4net.Filter.FilterDecision.Accept"/> the
- logging event, otherwise it will <see cref="F:log4net.Filter.FilterDecision.Deny"/> the event.
- </para>
- <para>
- The default is <c>true</c> i.e. to <see cref="F:log4net.Filter.FilterDecision.Accept"/> the event.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.LoggerMatchFilter.LoggerToMatch">
- <summary>
- The <see cref="P:log4net.Core.LoggingEvent.LoggerName"/> that the filter will match
- </summary>
- <remarks>
- <para>
- This filter will attempt to match this value against logger name in
- the following way. The match will be done against the beginning of the
- logger name (using <see cref="M:System.String.StartsWith(System.String)"/>). The match is
- case sensitive. If a match is found then
- the result depends on the value of <see cref="P:log4net.Filter.LoggerMatchFilter.AcceptOnMatch"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Filter.MdcFilter">
- <summary>
- Simple filter to match a keyed string in the <see cref="T:log4net.MDC"/>
- </summary>
- <remarks>
- <para>
- Simple filter to match a keyed string in the <see cref="T:log4net.MDC"/>
- </para>
- <para>
- As the MDC has been replaced with layered properties the
- <see cref="T:log4net.Filter.PropertyFilter"/> should be used instead.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Filter.PropertyFilter">
- <summary>
- Simple filter to match a string an event property
- </summary>
- <remarks>
- <para>
- Simple filter to match a string in the value for a
- specific event property
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="T:log4net.Filter.StringMatchFilter">
- <summary>
- Simple filter to match a string in the rendered message
- </summary>
- <remarks>
- <para>
- Simple filter to match a string in the rendered message
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Filter.StringMatchFilter.m_acceptOnMatch">
- <summary>
- Flag to indicate the behavior when we have a match
- </summary>
- </member>
- <member name="F:log4net.Filter.StringMatchFilter.m_stringToMatch">
- <summary>
- The string to substring match against the message
- </summary>
- </member>
- <member name="F:log4net.Filter.StringMatchFilter.m_stringRegexToMatch">
- <summary>
- A string regex to match
- </summary>
- </member>
- <member name="F:log4net.Filter.StringMatchFilter.m_regexToMatch">
- <summary>
- A regex object to match (generated from m_stringRegexToMatch)
- </summary>
- </member>
- <member name="M:log4net.Filter.StringMatchFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Filter.StringMatchFilter.ActivateOptions">
- <summary>
- Initialize and precompile the Regex if required
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Filter.StringMatchFilter.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Filter.StringMatchFilter.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Filter.StringMatchFilter.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Filter.StringMatchFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Check if this filter should allow the event to be logged
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <returns>see remarks</returns>
- <remarks>
- <para>
- The rendered message is matched against the <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/>.
- If the <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/> occurs as a substring within
- the message then a match will have occurred. If no match occurs
- this function will return <see cref="F:log4net.Filter.FilterDecision.Neutral"/>
- allowing other filters to check the event. If a match occurs then
- the value of <see cref="P:log4net.Filter.StringMatchFilter.AcceptOnMatch"/> is checked. If it is
- true then <see cref="F:log4net.Filter.FilterDecision.Accept"/> is returned otherwise
- <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.StringMatchFilter.AcceptOnMatch">
- <summary>
- <see cref="F:log4net.Filter.FilterDecision.Accept"/> when matching <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/> or <see cref="P:log4net.Filter.StringMatchFilter.RegexToMatch"/>
- </summary>
- <remarks>
- <para>
- The <see cref="P:log4net.Filter.StringMatchFilter.AcceptOnMatch"/> property is a flag that determines
- the behavior when a matching <see cref="T:log4net.Core.Level"/> is found. If the
- flag is set to true then the filter will <see cref="F:log4net.Filter.FilterDecision.Accept"/> the
- logging event, otherwise it will <see cref="F:log4net.Filter.FilterDecision.Neutral"/> the event.
- </para>
- <para>
- The default is <c>true</c> i.e. to <see cref="F:log4net.Filter.FilterDecision.Accept"/> the event.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.StringMatchFilter.StringToMatch">
- <summary>
- Sets the static string to match
- </summary>
- <remarks>
- <para>
- The string that will be substring matched against
- the rendered message. If the message contains this
- string then the filter will match. If a match is found then
- the result depends on the value of <see cref="P:log4net.Filter.StringMatchFilter.AcceptOnMatch"/>.
- </para>
- <para>
- One of <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/> or <see cref="P:log4net.Filter.StringMatchFilter.RegexToMatch"/>
- must be specified.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.StringMatchFilter.RegexToMatch">
- <summary>
- Sets the regular expression to match
- </summary>
- <remarks>
- <para>
- The regular expression pattern that will be matched against
- the rendered message. If the message matches this
- pattern then the filter will match. If a match is found then
- the result depends on the value of <see cref="P:log4net.Filter.StringMatchFilter.AcceptOnMatch"/>.
- </para>
- <para>
- One of <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/> or <see cref="P:log4net.Filter.StringMatchFilter.RegexToMatch"/>
- must be specified.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Filter.PropertyFilter.m_key">
- <summary>
- The key to use to lookup the string from the event properties
- </summary>
- </member>
- <member name="M:log4net.Filter.PropertyFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Filter.PropertyFilter.Decide(log4net.Core.LoggingEvent)">
- <summary>
- Check if this filter should allow the event to be logged
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <returns>see remarks</returns>
- <remarks>
- <para>
- The event property for the <see cref="P:log4net.Filter.PropertyFilter.Key"/> is matched against
- the <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/>.
- If the <see cref="P:log4net.Filter.StringMatchFilter.StringToMatch"/> occurs as a substring within
- the property value then a match will have occurred. If no match occurs
- this function will return <see cref="F:log4net.Filter.FilterDecision.Neutral"/>
- allowing other filters to check the event. If a match occurs then
- the value of <see cref="P:log4net.Filter.StringMatchFilter.AcceptOnMatch"/> is checked. If it is
- true then <see cref="F:log4net.Filter.FilterDecision.Accept"/> is returned otherwise
- <see cref="F:log4net.Filter.FilterDecision.Deny"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Filter.PropertyFilter.Key">
- <summary>
- The key to lookup in the event properties and then match against.
- </summary>
- <remarks>
- <para>
- The key name to use to lookup in the properties map of the
- <see cref="T:log4net.Core.LoggingEvent"/>. The match will be performed against
- the value of this property if it exists.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Filter.NdcFilter">
- <summary>
- Simple filter to match a string in the <see cref="T:log4net.NDC"/>
- </summary>
- <remarks>
- <para>
- Simple filter to match a string in the <see cref="T:log4net.NDC"/>
- </para>
- <para>
- As the MDC has been replaced with named stacks stored in the
- properties collections the <see cref="T:log4net.Filter.PropertyFilter"/> should
- be used instead.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Filter.NdcFilter.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Sets the <see cref="P:log4net.Filter.PropertyFilter.Key"/> to <c>"NDC"</c>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.AppDomainPatternConverter">
- <summary>
- Write the event appdomain name to the output
- </summary>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.LoggingEvent.Domain"/> to the output writer.
- </para>
- </remarks>
- <author>Daniel Cazzulino</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="T:log4net.Layout.Pattern.PatternLayoutConverter">
- <summary>
- Abstract class that provides the formatting functionality that
- derived classes need.
- </summary>
- <remarks>
- Conversion specifiers in a conversion patterns are parsed to
- individual PatternConverters. Each of which is responsible for
- converting a logging event in a converter specific manner.
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="T:log4net.Util.PatternConverter">
- <summary>
- Abstract class that provides the formatting functionality that
- derived classes need.
- </summary>
- <remarks>
- <para>
- Conversion specifiers in a conversion patterns are parsed to
- individual PatternConverters. Each of which is responsible for
- converting a logging event in a converter specific manner.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Util.PatternConverter.c_renderBufferSize">
- <summary>
- Initial buffer size
- </summary>
- </member>
- <member name="F:log4net.Util.PatternConverter.c_renderBufferMaxCapacity">
- <summary>
- Maximum buffer size before it is recycled
- </summary>
- </member>
- <member name="M:log4net.Util.PatternConverter.#ctor">
- <summary>
- Protected constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.PatternConverter"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Evaluate this pattern converter and write the output to a writer.
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">The state object on which the pattern converter should be executed.</param>
- <remarks>
- <para>
- Derived pattern converters must override this method in order to
- convert conversion specifiers in the appropriate way.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternConverter.SetNext(log4net.Util.PatternConverter)">
- <summary>
- Set the next pattern converter in the chains
- </summary>
- <param name="patternConverter">the pattern converter that should follow this converter in the chain</param>
- <returns>the next converter</returns>
- <remarks>
- <para>
- The PatternConverter can merge with its neighbor during this method (or a sub class).
- Therefore the return value may or may not be the value of the argument passed in.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternConverter.Format(System.IO.TextWriter,System.Object)">
- <summary>
- Write the pattern converter to the writer with appropriate formatting
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">The state object on which the pattern converter should be executed.</param>
- <remarks>
- <para>
- This method calls <see cref="M:log4net.Util.PatternConverter.Convert(System.IO.TextWriter,System.Object)"/> to allow the subclass to perform
- appropriate conversion of the pattern converter. If formatting options have
- been specified via the <see cref="P:log4net.Util.PatternConverter.FormattingInfo"/> then this method will
- apply those formattings before writing the output.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternConverter.SpacePad(System.IO.TextWriter,System.Int32)">
- <summary>
- Fast space padding method.
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> to which the spaces will be appended.</param>
- <param name="length">The number of spaces to be padded.</param>
- <remarks>
- <para>
- Fast space padding method.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.PatternConverter.m_option">
- <summary>
- The option string to the converter
- </summary>
- </member>
- <member name="M:log4net.Util.PatternConverter.WriteDictionary(System.IO.TextWriter,log4net.Repository.ILoggerRepository,System.Collections.IDictionary)">
- <summary>
- Write an dictionary to a <see cref="T:System.IO.TextWriter"/>
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="repository">a <see cref="T:log4net.Repository.ILoggerRepository"/> to use for object conversion</param>
- <param name="value">the value to write to the writer</param>
- <remarks>
- <para>
- Writes the <see cref="T:System.Collections.IDictionary"/> to a writer in the form:
- </para>
- <code>
- {key1=value1, key2=value2, key3=value3}
- </code>
- <para>
- If the <see cref="T:log4net.Repository.ILoggerRepository"/> specified
- is not null then it is used to render the key and value to text, otherwise
- the object's ToString method is called.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternConverter.WriteObject(System.IO.TextWriter,log4net.Repository.ILoggerRepository,System.Object)">
- <summary>
- Write an object to a <see cref="T:System.IO.TextWriter"/>
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="repository">a <see cref="T:log4net.Repository.ILoggerRepository"/> to use for object conversion</param>
- <param name="value">the value to write to the writer</param>
- <remarks>
- <para>
- Writes the Object to a writer. If the <see cref="T:log4net.Repository.ILoggerRepository"/> specified
- is not null then it is used to render the object to text, otherwise
- the object's ToString method is called.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PatternConverter.Next">
- <summary>
- Get the next pattern converter in the chain
- </summary>
- <value>
- the next pattern converter in the chain
- </value>
- <remarks>
- <para>
- Get the next pattern converter in the chain
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PatternConverter.FormattingInfo">
- <summary>
- Gets or sets the formatting info for this converter
- </summary>
- <value>
- The formatting info for this converter
- </value>
- <remarks>
- <para>
- Gets or sets the formatting info for this converter
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PatternConverter.Option">
- <summary>
- Gets or sets the option value for this converter
- </summary>
- <summary>
- The option for this converter
- </summary>
- <remarks>
- <para>
- Gets or sets the option value for this converter
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.PatternLayoutConverter.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Layout.Pattern.PatternLayoutConverter"/> class.
- </summary>
- </member>
- <member name="M:log4net.Layout.Pattern.PatternLayoutConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Derived pattern converters must override this method in order to
- convert conversion specifiers in the correct way.
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">The <see cref="T:log4net.Core.LoggingEvent"/> on which the pattern converter should be executed.</param>
- </member>
- <member name="M:log4net.Layout.Pattern.PatternLayoutConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Derived pattern converters must override this method in order to
- convert conversion specifiers in the correct way.
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">The state object on which the pattern converter should be executed.</param>
- </member>
- <member name="F:log4net.Layout.Pattern.PatternLayoutConverter.m_ignoresException">
- <summary>
- Flag indicating if this converter handles exceptions
- </summary>
- <remarks>
- <c>false</c> if this converter handles exceptions
- </remarks>
- </member>
- <member name="P:log4net.Layout.Pattern.PatternLayoutConverter.IgnoresException">
- <summary>
- Flag indicating if this converter handles the logging event exception
- </summary>
- <value><c>false</c> if this converter handles the logging event exception</value>
- <remarks>
- <para>
- If this converter handles the exception object contained within
- <see cref="T:log4net.Core.LoggingEvent"/>, then this property should be set to
- <c>false</c>. Otherwise, if the layout ignores the exception
- object, then the property should be set to <c>true</c>.
- </para>
- <para>
- Set this value to override a this default setting. The default
- value is <c>true</c>, this converter does not handle the exception.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.AppDomainPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the event appdomain name to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.LoggingEvent.Domain"/> to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.DatePatternConverter">
- <summary>
- Date pattern converter, uses a <see cref="T:log4net.DateFormatter.IDateFormatter"/> to format
- the date of a <see cref="T:log4net.Core.LoggingEvent"/>.
- </summary>
- <remarks>
- <para>
- Render the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> to the writer as a string.
- </para>
- <para>
- The value of the <see cref="P:log4net.Util.PatternConverter.Option"/> determines
- the formatting of the date. The following values are allowed:
- <list type="definition">
- <listheader>
- <term>Option value</term>
- <description>Output</description>
- </listheader>
- <item>
- <term>ISO8601</term>
- <description>
- Uses the <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/> formatter.
- Formats using the <c>"yyyy-MM-dd HH:mm:ss,fff"</c> pattern.
- </description>
- </item>
- <item>
- <term>DATE</term>
- <description>
- Uses the <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> formatter.
- Formats using the <c>"dd MMM yyyy HH:mm:ss,fff"</c> for example, <c>"06 Nov 1994 15:49:37,459"</c>.
- </description>
- </item>
- <item>
- <term>ABSOLUTE</term>
- <description>
- Uses the <see cref="T:log4net.DateFormatter.AbsoluteTimeDateFormatter"/> formatter.
- Formats using the <c>"HH:mm:ss,yyyy"</c> for example, <c>"15:49:37,459"</c>.
- </description>
- </item>
- <item>
- <term>other</term>
- <description>
- Any other pattern string uses the <see cref="T:log4net.DateFormatter.SimpleDateFormatter"/> formatter.
- This formatter passes the pattern string to the <see cref="T:System.DateTime"/>
- <see cref="M:System.DateTime.ToString(System.String)"/> method.
- For details on valid patterns see
- <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemglobalizationdatetimeformatinfoclasstopic.asp">DateTimeFormatInfo Class</a>.
- </description>
- </item>
- </list>
- </para>
- <para>
- The <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> is in the local time zone and is rendered in that zone.
- To output the time in Universal time see <see cref="T:log4net.Layout.Pattern.UtcDatePatternConverter"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Layout.Pattern.DatePatternConverter.m_dateFormatter">
- <summary>
- The <see cref="T:log4net.DateFormatter.IDateFormatter"/> used to render the date to a string
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.DateFormatter.IDateFormatter"/> used to render the date to a string
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.DatePatternConverter.ActivateOptions">
- <summary>
- Initialize the converter pattern based on the <see cref="P:log4net.Util.PatternConverter.Option"/> property.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.Pattern.DatePatternConverter.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.Pattern.DatePatternConverter.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.Pattern.DatePatternConverter.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.DatePatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Convert the pattern into the rendered message
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Pass the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> to the <see cref="T:log4net.DateFormatter.IDateFormatter"/>
- for it to render it to the writer.
- </para>
- <para>
- The <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> passed is in the local time zone.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.ExceptionPatternConverter">
- <summary>
- Write the exception text to the output
- </summary>
- <remarks>
- <para>
- If an exception object is stored in the logging event
- it will be rendered into the pattern output with a
- trailing newline.
- </para>
- <para>
- If there is no exception then nothing will be output
- and no trailing newline will be appended.
- It is typical to put a newline before the exception
- and to have the exception as the last data in the pattern.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.ExceptionPatternConverter.#ctor">
- <summary>
- Default constructor
- </summary>
- </member>
- <member name="M:log4net.Layout.Pattern.ExceptionPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the exception text to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- If an exception object is stored in the logging event
- it will be rendered into the pattern output with a
- trailing newline.
- </para>
- <para>
- If there is no exception then nothing will be output
- and no trailing newline will be appended.
- It is typical to put a newline before the exception
- and to have the exception as the last data in the pattern.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.FileLocationPatternConverter">
- <summary>
- Writes the caller location file name to the output
- </summary>
- <remarks>
- <para>
- Writes the value of the <see cref="P:log4net.Core.LocationInfo.FileName"/> for
- the event to the output writer.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.FileLocationPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the caller location file name to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the value of the <see cref="P:log4net.Core.LocationInfo.FileName"/> for
- the <paramref name="loggingEvent"/> to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.FullLocationPatternConverter">
- <summary>
- Write the caller location info to the output
- </summary>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.LocationInfo.FullInfo"/> to the output writer.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.FullLocationPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the caller location info to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.LocationInfo.FullInfo"/> to the output writer.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.IdentityPatternConverter">
- <summary>
- Writes the event identity to the output
- </summary>
- <remarks>
- <para>
- Writes the value of the <see cref="P:log4net.Core.LoggingEvent.Identity"/> to
- the output writer.
- </para>
- </remarks>
- <author>Daniel Cazzulino</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.IdentityPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Writes the event identity to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the value of the <paramref name="loggingEvent"/>
- <see cref="P:log4net.Core.LoggingEvent.Identity"/> to
- the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.LevelPatternConverter">
- <summary>
- Write the event level to the output
- </summary>
- <remarks>
- <para>
- Writes the display name of the event <see cref="P:log4net.Core.LoggingEvent.Level"/>
- to the writer.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.LevelPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the event level to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.Level.DisplayName"/> of the <paramref name="loggingEvent"/> <see cref="P:log4net.Core.LoggingEvent.Level"/>
- to the <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.LineLocationPatternConverter">
- <summary>
- Write the caller location line number to the output
- </summary>
- <remarks>
- <para>
- Writes the value of the <see cref="P:log4net.Core.LocationInfo.LineNumber"/> for
- the event to the output writer.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.LineLocationPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the caller location line number to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the value of the <see cref="P:log4net.Core.LocationInfo.LineNumber"/> for
- the <paramref name="loggingEvent"/> to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.LoggerPatternConverter">
- <summary>
- Converter for logger name
- </summary>
- <remarks>
- <para>
- Outputs the <see cref="P:log4net.Core.LoggingEvent.LoggerName"/> of the event.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="T:log4net.Layout.Pattern.NamedPatternConverter">
- <summary>
- Converter to output and truncate <c>'.'</c> separated strings
- </summary>
- <remarks>
- <para>
- This abstract class supports truncating a <c>'.'</c> separated string
- to show a specified number of elements from the right hand side.
- This is used to truncate class names that are fully qualified.
- </para>
- <para>
- Subclasses should override the <see cref="M:log4net.Layout.Pattern.NamedPatternConverter.GetFullyQualifiedName(log4net.Core.LoggingEvent)"/> method to
- return the fully qualified string.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.NamedPatternConverter.ActivateOptions">
- <summary>
- Initialize the converter
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.Pattern.NamedPatternConverter.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.Pattern.NamedPatternConverter.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.Pattern.NamedPatternConverter.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.NamedPatternConverter.GetFullyQualifiedName(log4net.Core.LoggingEvent)">
- <summary>
- Get the fully qualified string data
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <returns>the fully qualified name</returns>
- <remarks>
- <para>
- Overridden by subclasses to get the fully qualified name before the
- precision is applied to it.
- </para>
- <para>
- Return the fully qualified <c>'.'</c> (dot/period) separated string.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.NamedPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Convert the pattern to the rendered message
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- Render the <see cref="M:log4net.Layout.Pattern.NamedPatternConverter.GetFullyQualifiedName(log4net.Core.LoggingEvent)"/> to the precision
- specified by the <see cref="P:log4net.Util.PatternConverter.Option"/> property.
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.LoggerPatternConverter.GetFullyQualifiedName(log4net.Core.LoggingEvent)">
- <summary>
- Gets the fully qualified name of the logger
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <returns>The fully qualified logger name</returns>
- <remarks>
- <para>
- Returns the <see cref="P:log4net.Core.LoggingEvent.LoggerName"/> of the <paramref name="loggingEvent"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.MessagePatternConverter">
- <summary>
- Writes the event message to the output
- </summary>
- <remarks>
- <para>
- Uses the <see cref="M:log4net.Core.LoggingEvent.WriteRenderedMessage(System.IO.TextWriter)"/> method
- to write out the event message.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.MessagePatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Writes the event message to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Uses the <see cref="M:log4net.Core.LoggingEvent.WriteRenderedMessage(System.IO.TextWriter)"/> method
- to write out the event message.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.MethodLocationPatternConverter">
- <summary>
- Write the method name to the output
- </summary>
- <remarks>
- <para>
- Writes the caller location <see cref="P:log4net.Core.LocationInfo.MethodName"/> to
- the output.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.MethodLocationPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the method name to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the caller location <see cref="P:log4net.Core.LocationInfo.MethodName"/> to
- the output.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.NdcPatternConverter">
- <summary>
- Converter to include event NDC
- </summary>
- <remarks>
- <para>
- Outputs the value of the event property named <c>NDC</c>.
- </para>
- <para>
- The <see cref="T:log4net.Layout.Pattern.PropertyPatternConverter"/> should be used instead.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.NdcPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the event NDC to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- As the thread context stacks are now stored in named event properties
- this converter simply looks up the value of the <c>NDC</c> property.
- </para>
- <para>
- The <see cref="T:log4net.Layout.Pattern.PropertyPatternConverter"/> should be used instead.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.PropertyPatternConverter">
- <summary>
- Property pattern converter
- </summary>
- <remarks>
- <para>
- Writes out the value of a named property. The property name
- should be set in the <see cref="P:log4net.Util.PatternConverter.Option"/>
- property.
- </para>
- <para>
- If the <see cref="P:log4net.Util.PatternConverter.Option"/> is set to <c>null</c>
- then all the properties are written as key value pairs.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.PropertyPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the property value to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes out the value of a named property. The property name
- should be set in the <see cref="P:log4net.Util.PatternConverter.Option"/>
- property.
- </para>
- <para>
- If the <see cref="P:log4net.Util.PatternConverter.Option"/> is set to <c>null</c>
- then all the properties are written as key value pairs.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.RelativeTimePatternConverter">
- <summary>
- Converter to output the relative time of the event
- </summary>
- <remarks>
- <para>
- Converter to output the time of the event relative to the start of the program.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.RelativeTimePatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the relative time to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes out the relative time of the event in milliseconds.
- That is the number of milliseconds between the event <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/>
- and the <see cref="P:log4net.Core.LoggingEvent.StartTime"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Pattern.RelativeTimePatternConverter.TimeDifferenceInMillis(System.DateTime,System.DateTime)">
- <summary>
- Helper method to get the time difference between two DateTime objects
- </summary>
- <param name="start">start time (in the current local time zone)</param>
- <param name="end">end time (in the current local time zone)</param>
- <returns>the time difference in milliseconds</returns>
- </member>
- <member name="T:log4net.Layout.Pattern.ThreadPatternConverter">
- <summary>
- Converter to include event thread name
- </summary>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.LoggingEvent.ThreadName"/> to the output.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.ThreadPatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the ThreadName to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Writes the <see cref="P:log4net.Core.LoggingEvent.ThreadName"/> to the <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.TypeNamePatternConverter">
- <summary>
- Pattern converter for the class name
- </summary>
- <remarks>
- <para>
- Outputs the <see cref="P:log4net.Core.LocationInfo.ClassName"/> of the event.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.TypeNamePatternConverter.GetFullyQualifiedName(log4net.Core.LoggingEvent)">
- <summary>
- Gets the fully qualified name of the class
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <returns>The fully qualified type name for the caller location</returns>
- <remarks>
- <para>
- Returns the <see cref="P:log4net.Core.LocationInfo.ClassName"/> of the <paramref name="loggingEvent"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Pattern.UserNamePatternConverter">
- <summary>
- Converter to include event user name
- </summary>
- <author>Douglas de la Torre</author>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.UserNamePatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Convert the pattern to the rendered message
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- </member>
- <member name="T:log4net.Layout.Pattern.UtcDatePatternConverter">
- <summary>
- Write the TimeStamp to the output
- </summary>
- <remarks>
- <para>
- Date pattern converter, uses a <see cref="T:log4net.DateFormatter.IDateFormatter"/> to format
- the date of a <see cref="T:log4net.Core.LoggingEvent"/>.
- </para>
- <para>
- Uses a <see cref="T:log4net.DateFormatter.IDateFormatter"/> to format the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/>
- in Universal time.
- </para>
- <para>
- See the <see cref="T:log4net.Layout.Pattern.DatePatternConverter"/> for details on the date pattern syntax.
- </para>
- </remarks>
- <seealso cref="T:log4net.Layout.Pattern.DatePatternConverter"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.Pattern.UtcDatePatternConverter.Convert(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Write the TimeStamp to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Pass the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> to the <see cref="T:log4net.DateFormatter.IDateFormatter"/>
- for it to render it to the writer.
- </para>
- <para>
- The <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> passed is in the local time zone, this is converted
- to Universal time before it is rendered.
- </para>
- </remarks>
- <seealso cref="T:log4net.Layout.Pattern.DatePatternConverter"/>
- </member>
- <member name="T:log4net.Layout.ExceptionLayout">
- <summary>
- A Layout that renders only the Exception text from the logging event
- </summary>
- <remarks>
- <para>
- A Layout that renders only the Exception text from the logging event.
- </para>
- <para>
- This Layout should only be used with appenders that utilize multiple
- layouts (e.g. <see cref="T:log4net.Appender.AdoNetAppender"/>).
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Layout.LayoutSkeleton">
- <summary>
- Extend this abstract class to create your own log layout format.
- </summary>
- <remarks>
- <para>
- This is the base implementation of the <see cref="T:log4net.Layout.ILayout"/>
- interface. Most layout objects should extend this class.
- </para>
- </remarks>
- <remarks>
- <note type="inheritinfo">
- <para>
- Subclasses must implement the <see cref="M:log4net.Layout.LayoutSkeleton.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)"/>
- method.
- </para>
- <para>
- Subclasses should set the <see cref="P:log4net.Layout.LayoutSkeleton.IgnoresException"/> in their default
- constructor.
- </para>
- </note>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Layout.ILayout">
- <summary>
- Interface implemented by layout objects
- </summary>
- <remarks>
- <para>
- An <see cref="T:log4net.Layout.ILayout"/> object is used to format a <see cref="T:log4net.Core.LoggingEvent"/>
- as text. The <see cref="M:log4net.Layout.ILayout.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)"/> method is called by an
- appender to transform the <see cref="T:log4net.Core.LoggingEvent"/> into a string.
- </para>
- <para>
- The layout can also supply <see cref="P:log4net.Layout.ILayout.Header"/> and <see cref="P:log4net.Layout.ILayout.Footer"/>
- text that is appender before any events and after all the events respectively.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Layout.ILayout.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Implement this method to create your own layout format.
- </summary>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <param name="loggingEvent">The event to format</param>
- <remarks>
- <para>
- This method is called by an appender to format
- the <paramref name="loggingEvent"/> as text and output to a writer.
- </para>
- <para>
- If the caller does not have a <see cref="T:System.IO.TextWriter"/> and prefers the
- event to be formatted as a <see cref="T:System.String"/> then the following
- code can be used to format the event into a <see cref="T:System.IO.StringWriter"/>.
- </para>
- <code lang="C#">
- StringWriter writer = new StringWriter();
- Layout.Format(writer, loggingEvent);
- string formattedEvent = writer.ToString();
- </code>
- </remarks>
- </member>
- <member name="P:log4net.Layout.ILayout.ContentType">
- <summary>
- The content type output by this layout.
- </summary>
- <value>The content type</value>
- <remarks>
- <para>
- The content type output by this layout.
- </para>
- <para>
- This is a MIME type e.g. <c>"text/plain"</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.ILayout.Header">
- <summary>
- The header for the layout format.
- </summary>
- <value>the layout header</value>
- <remarks>
- <para>
- The Header text will be appended before any logging events
- are formatted and appended.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.ILayout.Footer">
- <summary>
- The footer for the layout format.
- </summary>
- <value>the layout footer</value>
- <remarks>
- <para>
- The Footer text will be appended after all the logging events
- have been formatted and appended.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.ILayout.IgnoresException">
- <summary>
- Flag indicating if this layout handle exceptions
- </summary>
- <value><c>false</c> if this layout handles exceptions</value>
- <remarks>
- <para>
- If this layout handles the exception object contained within
- <see cref="T:log4net.Core.LoggingEvent"/>, then the layout should return
- <c>false</c>. Otherwise, if the layout ignores the exception
- object, then the layout should return <c>true</c>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.LayoutSkeleton.m_header">
- <summary>
- The header text
- </summary>
- <remarks>
- <para>
- See <see cref="P:log4net.Layout.LayoutSkeleton.Header"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.LayoutSkeleton.m_footer">
- <summary>
- The footer text
- </summary>
- <remarks>
- <para>
- See <see cref="P:log4net.Layout.LayoutSkeleton.Footer"/> for more information.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.LayoutSkeleton.m_ignoresException">
- <summary>
- Flag indicating if this layout handles exceptions
- </summary>
- <remarks>
- <para>
- <c>false</c> if this layout handles exceptions
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.LayoutSkeleton.#ctor">
- <summary>
- Empty default constructor
- </summary>
- <remarks>
- <para>
- Empty default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.LayoutSkeleton.ActivateOptions">
- <summary>
- Activate component options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.LayoutSkeleton.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.LayoutSkeleton.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.LayoutSkeleton.ActivateOptions"/> must be called again.
- </para>
- <para>
- This method must be implemented by the subclass.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.LayoutSkeleton.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Implement this method to create your own layout format.
- </summary>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <param name="loggingEvent">The event to format</param>
- <remarks>
- <para>
- This method is called by an appender to format
- the <paramref name="loggingEvent"/> as text.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.LayoutSkeleton.ContentType">
- <summary>
- The content type output by this layout.
- </summary>
- <value>The content type is <c>"text/plain"</c></value>
- <remarks>
- <para>
- The content type output by this layout.
- </para>
- <para>
- This base class uses the value <c>"text/plain"</c>.
- To change this value a subclass must override this
- property.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.LayoutSkeleton.Header">
- <summary>
- The header for the layout format.
- </summary>
- <value>the layout header</value>
- <remarks>
- <para>
- The Header text will be appended before any logging events
- are formatted and appended.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.LayoutSkeleton.Footer">
- <summary>
- The footer for the layout format.
- </summary>
- <value>the layout footer</value>
- <remarks>
- <para>
- The Footer text will be appended after all the logging events
- have been formatted and appended.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.LayoutSkeleton.IgnoresException">
- <summary>
- Flag indicating if this layout handles exceptions
- </summary>
- <value><c>false</c> if this layout handles exceptions</value>
- <remarks>
- <para>
- If this layout handles the exception object contained within
- <see cref="T:log4net.Core.LoggingEvent"/>, then the layout should return
- <c>false</c>. Otherwise, if the layout ignores the exception
- object, then the layout should return <c>true</c>.
- </para>
- <para>
- Set this value to override a this default setting. The default
- value is <c>true</c>, this layout does not handle the exception.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.ExceptionLayout.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Constructs a ExceptionLayout
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.ExceptionLayout.ActivateOptions">
- <summary>
- Activate component options
- </summary>
- <remarks>
- <para>
- Part of the <see cref="T:log4net.Core.IOptionHandler"/> component activation
- framework.
- </para>
- <para>
- This method does nothing as options become effective immediately.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.ExceptionLayout.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Gets the exception text from the logging event
- </summary>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <param name="loggingEvent">the event being logged</param>
- <remarks>
- <para>
- Write the exception string to the <see cref="T:System.IO.TextWriter"/>.
- The exception string is retrieved from <see cref="M:log4net.Core.LoggingEvent.GetExceptionString"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.IRawLayout">
- <summary>
- Interface for raw layout objects
- </summary>
- <remarks>
- <para>
- Interface used to format a <see cref="T:log4net.Core.LoggingEvent"/>
- to an object.
- </para>
- <para>
- This interface should not be confused with the
- <see cref="T:log4net.Layout.ILayout"/> interface. This interface is used in
- only certain specialized situations where a raw object is
- required rather than a formatted string. The <see cref="T:log4net.Layout.ILayout"/>
- is not generally useful than this interface.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Layout.IRawLayout.Format(log4net.Core.LoggingEvent)">
- <summary>
- Implement this method to create your own layout format.
- </summary>
- <param name="loggingEvent">The event to format</param>
- <returns>returns the formatted event</returns>
- <remarks>
- <para>
- Implement this method to create your own layout format.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.Layout2RawLayoutAdapter">
- <summary>
- Adapts any <see cref="T:log4net.Layout.ILayout"/> to a <see cref="T:log4net.Layout.IRawLayout"/>
- </summary>
- <remarks>
- <para>
- Where an <see cref="T:log4net.Layout.IRawLayout"/> is required this adapter
- allows a <see cref="T:log4net.Layout.ILayout"/> to be specified.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Layout.Layout2RawLayoutAdapter.m_layout">
- <summary>
- The layout to adapt
- </summary>
- </member>
- <member name="M:log4net.Layout.Layout2RawLayoutAdapter.#ctor(log4net.Layout.ILayout)">
- <summary>
- Construct a new adapter
- </summary>
- <param name="layout">the layout to adapt</param>
- <remarks>
- <para>
- Create the adapter for the specified <paramref name="layout"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.Layout2RawLayoutAdapter.Format(log4net.Core.LoggingEvent)">
- <summary>
- Format the logging event as an object.
- </summary>
- <param name="loggingEvent">The event to format</param>
- <returns>returns the formatted event</returns>
- <remarks>
- <para>
- Format the logging event as an object.
- </para>
- <para>
- Uses the <see cref="T:log4net.Layout.ILayout"/> object supplied to
- the constructor to perform the formatting.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.PatternLayout">
- <summary>
- A flexible layout configurable with pattern string.
- </summary>
- <remarks>
- <para>
- The goal of this class is to <see cref="M:log4net.Layout.PatternLayout.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)"/> a
- <see cref="T:log4net.Core.LoggingEvent"/> as a string. The results
- depend on the <i>conversion pattern</i>.
- </para>
- <para>
- The conversion pattern is closely related to the conversion
- pattern of the printf function in C. A conversion pattern is
- composed of literal text and format control expressions called
- <i>conversion specifiers</i>.
- </para>
- <para>
- <i>You are free to insert any literal text within the conversion
- pattern.</i>
- </para>
- <para>
- Each conversion specifier starts with a percent sign (%) and is
- followed by optional <i>format modifiers</i> and a <i>conversion
- pattern name</i>. The conversion pattern name specifies the type of
- data, e.g. logger, level, date, thread name. The format
- modifiers control such things as field width, padding, left and
- right justification. The following is a simple example.
- </para>
- <para>
- Let the conversion pattern be <b>"%-5level [%thread]: %message%newline"</b> and assume
- that the log4net environment was set to use a PatternLayout. Then the
- statements
- </para>
- <code lang="C#">
- ILog log = LogManager.GetLogger(typeof(TestApp));
- log.Debug("Message 1");
- log.Warn("Message 2");
- </code>
- <para>would yield the output</para>
- <code>
- DEBUG [main]: Message 1
- WARN [main]: Message 2
- </code>
- <para>
- Note that there is no explicit separator between text and
- conversion specifiers. The pattern parser knows when it has reached
- the end of a conversion specifier when it reads a conversion
- character. In the example above the conversion specifier
- <b>%-5level</b> means the level of the logging event should be left
- justified to a width of five characters.
- </para>
- <para>
- The recognized conversion pattern names are:
- </para>
- <list type="table">
- <listheader>
- <term>Conversion Pattern Name</term>
- <description>Effect</description>
- </listheader>
- <item>
- <term>a</term>
- <description>Equivalent to <b>appdomain</b></description>
- </item>
- <item>
- <term>appdomain</term>
- <description>
- Used to output the friendly name of the AppDomain where the
- logging event was generated.
- </description>
- </item>
- <item>
- <term>c</term>
- <description>Equivalent to <b>logger</b></description>
- </item>
- <item>
- <term>C</term>
- <description>Equivalent to <b>type</b></description>
- </item>
- <item>
- <term>class</term>
- <description>Equivalent to <b>type</b></description>
- </item>
- <item>
- <term>d</term>
- <description>Equivalent to <b>date</b></description>
- </item>
- <item>
- <term>date</term>
- <description>
- <para>
- Used to output the date of the logging event in the local time zone.
- To output the date in universal time use the <c>%utcdate</c> pattern.
- The date conversion
- specifier may be followed by a <i>date format specifier</i> enclosed
- between braces. For example, <b>%date{HH:mm:ss,fff}</b> or
- <b>%date{dd MMM yyyy HH:mm:ss,fff}</b>. If no date format specifier is
- given then ISO8601 format is
- assumed (<see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>).
- </para>
- <para>
- The date format specifier admits the same syntax as the
- time pattern string of the <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- <para>
- For better results it is recommended to use the log4net date
- formatters. These can be specified using one of the strings
- "ABSOLUTE", "DATE" and "ISO8601" for specifying
- <see cref="T:log4net.DateFormatter.AbsoluteTimeDateFormatter"/>,
- <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> and respectively
- <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>. For example,
- <b>%date{ISO8601}</b> or <b>%date{ABSOLUTE}</b>.
- </para>
- <para>
- These dedicated date formatters perform significantly
- better than <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- </description>
- </item>
- <item>
- <term>exception</term>
- <description>
- <para>
- Used to output the exception passed in with the log message.
- </para>
- <para>
- If an exception object is stored in the logging event
- it will be rendered into the pattern output with a
- trailing newline.
- If there is no exception then nothing will be output
- and no trailing newline will be appended.
- It is typical to put a newline before the exception
- and to have the exception as the last data in the pattern.
- </para>
- </description>
- </item>
- <item>
- <term>F</term>
- <description>Equivalent to <b>file</b></description>
- </item>
- <item>
- <term>file</term>
- <description>
- <para>
- Used to output the file name where the logging request was
- issued.
- </para>
- <para>
- <b>WARNING</b> Generating caller location information is
- extremely slow. Its use should be avoided unless execution speed
- is not an issue.
- </para>
- <para>
- See the note below on the availability of caller location information.
- </para>
- </description>
- </item>
- <item>
- <term>identity</term>
- <description>
- <para>
- Used to output the user name for the currently active user
- (Principal.Identity.Name).
- </para>
- <para>
- <b>WARNING</b> Generating caller information is
- extremely slow. Its use should be avoided unless execution speed
- is not an issue.
- </para>
- </description>
- </item>
- <item>
- <term>l</term>
- <description>Equivalent to <b>location</b></description>
- </item>
- <item>
- <term>L</term>
- <description>Equivalent to <b>line</b></description>
- </item>
- <item>
- <term>location</term>
- <description>
- <para>
- Used to output location information of the caller which generated
- the logging event.
- </para>
- <para>
- The location information depends on the CLI implementation but
- usually consists of the fully qualified name of the calling
- method followed by the callers source the file name and line
- number between parentheses.
- </para>
- <para>
- The location information can be very useful. However, its
- generation is <b>extremely</b> slow. Its use should be avoided
- unless execution speed is not an issue.
- </para>
- <para>
- See the note below on the availability of caller location information.
- </para>
- </description>
- </item>
- <item>
- <term>level</term>
- <description>
- <para>
- Used to output the level of the logging event.
- </para>
- </description>
- </item>
- <item>
- <term>line</term>
- <description>
- <para>
- Used to output the line number from where the logging request
- was issued.
- </para>
- <para>
- <b>WARNING</b> Generating caller location information is
- extremely slow. Its use should be avoided unless execution speed
- is not an issue.
- </para>
- <para>
- See the note below on the availability of caller location information.
- </para>
- </description>
- </item>
- <item>
- <term>logger</term>
- <description>
- <para>
- Used to output the logger of the logging event. The
- logger conversion specifier can be optionally followed by
- <i>precision specifier</i>, that is a decimal constant in
- brackets.
- </para>
- <para>
- If a precision specifier is given, then only the corresponding
- number of right most components of the logger name will be
- printed. By default the logger name is printed in full.
- </para>
- <para>
- For example, for the logger name "a.b.c" the pattern
- <b>%logger{2}</b> will output "b.c".
- </para>
- </description>
- </item>
- <item>
- <term>m</term>
- <description>Equivalent to <b>message</b></description>
- </item>
- <item>
- <term>M</term>
- <description>Equivalent to <b>method</b></description>
- </item>
- <item>
- <term>message</term>
- <description>
- <para>
- Used to output the application supplied message associated with
- the logging event.
- </para>
- </description>
- </item>
- <item>
- <term>mdc</term>
- <description>
- <para>
- The MDC (old name for the ThreadContext.Properties) is now part of the
- combined event properties. This pattern is supported for compatibility
- but is equivalent to <b>property</b>.
- </para>
- </description>
- </item>
- <item>
- <term>method</term>
- <description>
- <para>
- Used to output the method name where the logging request was
- issued.
- </para>
- <para>
- <b>WARNING</b> Generating caller location information is
- extremely slow. Its use should be avoided unless execution speed
- is not an issue.
- </para>
- <para>
- See the note below on the availability of caller location information.
- </para>
- </description>
- </item>
- <item>
- <term>n</term>
- <description>Equivalent to <b>newline</b></description>
- </item>
- <item>
- <term>newline</term>
- <description>
- <para>
- Outputs the platform dependent line separator character or
- characters.
- </para>
- <para>
- This conversion pattern offers the same performance as using
- non-portable line separator strings such as "\n", or "\r\n".
- Thus, it is the preferred way of specifying a line separator.
- </para>
- </description>
- </item>
- <item>
- <term>ndc</term>
- <description>
- <para>
- Used to output the NDC (nested diagnostic context) associated
- with the thread that generated the logging event.
- </para>
- </description>
- </item>
- <item>
- <term>p</term>
- <description>Equivalent to <b>level</b></description>
- </item>
- <item>
- <term>P</term>
- <description>Equivalent to <b>property</b></description>
- </item>
- <item>
- <term>properties</term>
- <description>Equivalent to <b>property</b></description>
- </item>
- <item>
- <term>property</term>
- <description>
- <para>
- Used to output the an event specific property. The key to
- lookup must be specified within braces and directly following the
- pattern specifier, e.g. <b>%property{user}</b> would include the value
- from the property that is keyed by the string 'user'. Each property value
- that is to be included in the log must be specified separately.
- Properties are added to events by loggers or appenders. By default
- the <c>log4net:HostName</c> property is set to the name of machine on
- which the event was originally logged.
- </para>
- <para>
- If no key is specified, e.g. <b>%property</b> then all the keys and their
- values are printed in a comma separated list.
- </para>
- <para>
- The properties of an event are combined from a number of different
- contexts. These are listed below in the order in which they are searched.
- </para>
- <list type="definition">
- <item>
- <term>the event properties</term>
- <description>
- The event has <see cref="P:log4net.Core.LoggingEvent.Properties"/> that can be set. These
- properties are specific to this event only.
- </description>
- </item>
- <item>
- <term>the thread properties</term>
- <description>
- The <see cref="P:log4net.ThreadContext.Properties"/> that are set on the current
- thread. These properties are shared by all events logged on this thread.
- </description>
- </item>
- <item>
- <term>the global properties</term>
- <description>
- The <see cref="P:log4net.GlobalContext.Properties"/> that are set globally. These
- properties are shared by all the threads in the AppDomain.
- </description>
- </item>
- </list>
-
- </description>
- </item>
- <item>
- <term>r</term>
- <description>Equivalent to <b>timestamp</b></description>
- </item>
- <item>
- <term>t</term>
- <description>Equivalent to <b>thread</b></description>
- </item>
- <item>
- <term>timestamp</term>
- <description>
- <para>
- Used to output the number of milliseconds elapsed since the start
- of the application until the creation of the logging event.
- </para>
- </description>
- </item>
- <item>
- <term>thread</term>
- <description>
- <para>
- Used to output the name of the thread that generated the
- logging event. Uses the thread number if no name is available.
- </para>
- </description>
- </item>
- <item>
- <term>type</term>
- <description>
- <para>
- Used to output the fully qualified type name of the caller
- issuing the logging request. This conversion specifier
- can be optionally followed by <i>precision specifier</i>, that
- is a decimal constant in brackets.
- </para>
- <para>
- If a precision specifier is given, then only the corresponding
- number of right most components of the class name will be
- printed. By default the class name is output in fully qualified form.
- </para>
- <para>
- For example, for the class name "log4net.Layout.PatternLayout", the
- pattern <b>%type{1}</b> will output "PatternLayout".
- </para>
- <para>
- <b>WARNING</b> Generating the caller class information is
- slow. Thus, its use should be avoided unless execution speed is
- not an issue.
- </para>
- <para>
- See the note below on the availability of caller location information.
- </para>
- </description>
- </item>
- <item>
- <term>u</term>
- <description>Equivalent to <b>identity</b></description>
- </item>
- <item>
- <term>username</term>
- <description>
- <para>
- Used to output the WindowsIdentity for the currently
- active user.
- </para>
- <para>
- <b>WARNING</b> Generating caller WindowsIdentity information is
- extremely slow. Its use should be avoided unless execution speed
- is not an issue.
- </para>
- </description>
- </item>
- <item>
- <term>utcdate</term>
- <description>
- <para>
- Used to output the date of the logging event in universal time.
- The date conversion
- specifier may be followed by a <i>date format specifier</i> enclosed
- between braces. For example, <b>%utcdate{HH:mm:ss,fff}</b> or
- <b>%utcdate{dd MMM yyyy HH:mm:ss,fff}</b>. If no date format specifier is
- given then ISO8601 format is
- assumed (<see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>).
- </para>
- <para>
- The date format specifier admits the same syntax as the
- time pattern string of the <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- <para>
- For better results it is recommended to use the log4net date
- formatters. These can be specified using one of the strings
- "ABSOLUTE", "DATE" and "ISO8601" for specifying
- <see cref="T:log4net.DateFormatter.AbsoluteTimeDateFormatter"/>,
- <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> and respectively
- <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>. For example,
- <b>%utcdate{ISO8601}</b> or <b>%utcdate{ABSOLUTE}</b>.
- </para>
- <para>
- These dedicated date formatters perform significantly
- better than <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- </description>
- </item>
- <item>
- <term>w</term>
- <description>Equivalent to <b>username</b></description>
- </item>
- <item>
- <term>x</term>
- <description>Equivalent to <b>ndc</b></description>
- </item>
- <item>
- <term>X</term>
- <description>Equivalent to <b>mdc</b></description>
- </item>
- <item>
- <term>%</term>
- <description>
- <para>
- The sequence %% outputs a single percent sign.
- </para>
- </description>
- </item>
- </list>
- <para>
- The single letter patterns are deprecated in favor of the
- longer more descriptive pattern names.
- </para>
- <para>
- By default the relevant information is output as is. However,
- with the aid of format modifiers it is possible to change the
- minimum field width, the maximum field width and justification.
- </para>
- <para>
- The optional format modifier is placed between the percent sign
- and the conversion pattern name.
- </para>
- <para>
- The first optional format modifier is the <i>left justification
- flag</i> which is just the minus (-) character. Then comes the
- optional <i>minimum field width</i> modifier. This is a decimal
- constant that represents the minimum number of characters to
- output. If the data item requires fewer characters, it is padded on
- either the left or the right until the minimum width is
- reached. The default is to pad on the left (right justify) but you
- can specify right padding with the left justification flag. The
- padding character is space. If the data item is larger than the
- minimum field width, the field is expanded to accommodate the
- data. The value is never truncated.
- </para>
- <para>
- This behavior can be changed using the <i>maximum field
- width</i> modifier which is designated by a period followed by a
- decimal constant. If the data item is longer than the maximum
- field, then the extra characters are removed from the
- <i>beginning</i> of the data item and not from the end. For
- example, it the maximum field width is eight and the data item is
- ten characters long, then the first two characters of the data item
- are dropped. This behavior deviates from the printf function in C
- where truncation is done from the end.
- </para>
- <para>
- Below are various format modifier examples for the logger
- conversion specifier.
- </para>
- <div class="tablediv">
- <table class="dtTABLE" cellspacing="0">
- <tr>
- <th>Format modifier</th>
- <th>left justify</th>
- <th>minimum width</th>
- <th>maximum width</th>
- <th>comment</th>
- </tr>
- <tr>
- <td align="center">%20logger</td>
- <td align="center">false</td>
- <td align="center">20</td>
- <td align="center">none</td>
- <td>
- <para>
- Left pad with spaces if the logger name is less than 20
- characters long.
- </para>
- </td>
- </tr>
- <tr>
- <td align="center">%-20logger</td>
- <td align="center">true</td>
- <td align="center">20</td>
- <td align="center">none</td>
- <td>
- <para>
- Right pad with spaces if the logger
- name is less than 20 characters long.
- </para>
- </td>
- </tr>
- <tr>
- <td align="center">%.30logger</td>
- <td align="center">NA</td>
- <td align="center">none</td>
- <td align="center">30</td>
- <td>
- <para>
- Truncate from the beginning if the logger
- name is longer than 30 characters.
- </para>
- </td>
- </tr>
- <tr>
- <td align="center"><nobr>%20.30logger</nobr></td>
- <td align="center">false</td>
- <td align="center">20</td>
- <td align="center">30</td>
- <td>
- <para>
- Left pad with spaces if the logger name is shorter than 20
- characters. However, if logger name is longer than 30 characters,
- then truncate from the beginning.
- </para>
- </td>
- </tr>
- <tr>
- <td align="center">%-20.30logger</td>
- <td align="center">true</td>
- <td align="center">20</td>
- <td align="center">30</td>
- <td>
- <para>
- Right pad with spaces if the logger name is shorter than 20
- characters. However, if logger name is longer than 30 characters,
- then truncate from the beginning.
- </para>
- </td>
- </tr>
- </table>
- </div>
- <para>
- <b>Note about caller location information.</b><br/>
- The following patterns <c>%type %file %line %method %location %class %C %F %L %l %M</c>
- all generate caller location information.
- Location information uses the <c>System.Diagnostics.StackTrace</c> class to generate
- a call stack. The caller's information is then extracted from this stack.
- </para>
- <note type="caution">
- <para>
- The <c>System.Diagnostics.StackTrace</c> class is not supported on the
- .NET Compact Framework 1.0 therefore caller location information is not
- available on that framework.
- </para>
- </note>
- <note type="caution">
- <para>
- The <c>System.Diagnostics.StackTrace</c> class has this to say about Release builds:
- </para>
- <para>
- "StackTrace information will be most informative with Debug build configurations.
- By default, Debug builds include debug symbols, while Release builds do not. The
- debug symbols contain most of the file, method name, line number, and column
- information used in constructing StackFrame and StackTrace objects. StackTrace
- might not report as many method calls as expected, due to code transformations
- that occur during optimization."
- </para>
- <para>
- This means that in a Release build the caller information may be incomplete or may
- not exist at all! Therefore caller location information cannot be relied upon in a Release build.
- </para>
- </note>
- <para>
- Additional pattern converters may be registered with a specific <see cref="T:log4net.Layout.PatternLayout"/>
- instance using the <see cref="M:log4net.Layout.PatternLayout.AddConverter(System.String,System.Type)"/> method.
- </para>
- </remarks>
- <example>
- This is a more detailed pattern.
- <code><b>%timestamp [%thread] %level %logger %ndc - %message%newline</b></code>
- </example>
- <example>
- A similar pattern except that the relative time is
- right padded if less than 6 digits, thread name is right padded if
- less than 15 characters and truncated if longer and the logger
- name is left padded if shorter than 30 characters and truncated if
- longer.
- <code><b>%-6timestamp [%15.15thread] %-5level %30.30logger %ndc - %message%newline</b></code>
- </example>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Douglas de la Torre</author>
- <author>Daniel Cazzulino</author>
- </member>
- <member name="F:log4net.Layout.PatternLayout.DefaultConversionPattern">
- <summary>
- Default pattern string for log output.
- </summary>
- <remarks>
- <para>
- Default pattern string for log output.
- Currently set to the string <b>"%message%newline"</b>
- which just prints the application supplied message.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.PatternLayout.DetailConversionPattern">
- <summary>
- A detailed conversion pattern
- </summary>
- <remarks>
- <para>
- A conversion pattern which includes Time, Thread, Logger, and Nested Context.
- Current value is <b>%timestamp [%thread] %level %logger %ndc - %message%newline</b>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.PatternLayout.s_globalRulesRegistry">
- <summary>
- Internal map of converter identifiers to converter types.
- </summary>
- <remarks>
- <para>
- This static map is overridden by the m_converterRegistry instance map
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.PatternLayout.m_pattern">
- <summary>
- the pattern
- </summary>
- </member>
- <member name="F:log4net.Layout.PatternLayout.m_head">
- <summary>
- the head of the pattern converter chain
- </summary>
- </member>
- <member name="F:log4net.Layout.PatternLayout.m_instanceRulesRegistry">
- <summary>
- patterns defined on this PatternLayout only
- </summary>
- </member>
- <member name="M:log4net.Layout.PatternLayout.#cctor">
- <summary>
- Initialize the global registry
- </summary>
- <remarks>
- <para>
- Defines the builtin global rules.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.#ctor">
- <summary>
- Constructs a PatternLayout using the DefaultConversionPattern
- </summary>
- <remarks>
- <para>
- The default pattern just produces the application supplied message.
- </para>
- <para>
- Note to Inheritors: This constructor calls the virtual method
- <see cref="M:log4net.Layout.PatternLayout.CreatePatternParser(System.String)"/>. If you override this method be
- aware that it will be called before your is called constructor.
- </para>
- <para>
- As per the <see cref="T:log4net.Core.IOptionHandler"/> contract the <see cref="M:log4net.Layout.PatternLayout.ActivateOptions"/>
- method must be called after the properties on this object have been
- configured.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.#ctor(System.String)">
- <summary>
- Constructs a PatternLayout using the supplied conversion pattern
- </summary>
- <param name="pattern">the pattern to use</param>
- <remarks>
- <para>
- Note to Inheritors: This constructor calls the virtual method
- <see cref="M:log4net.Layout.PatternLayout.CreatePatternParser(System.String)"/>. If you override this method be
- aware that it will be called before your is called constructor.
- </para>
- <para>
- When using this constructor the <see cref="M:log4net.Layout.PatternLayout.ActivateOptions"/> method
- need not be called. This may not be the case when using a subclass.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.CreatePatternParser(System.String)">
- <summary>
- Create the pattern parser instance
- </summary>
- <param name="pattern">the pattern to parse</param>
- <returns>The <see cref="T:log4net.Util.PatternParser"/> that will format the event</returns>
- <remarks>
- <para>
- Creates the <see cref="T:log4net.Util.PatternParser"/> used to parse the conversion string. Sets the
- global and instance rules on the <see cref="T:log4net.Util.PatternParser"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.ActivateOptions">
- <summary>
- Initialize layout options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.PatternLayout.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.PatternLayout.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.PatternLayout.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Produces a formatted string as specified by the conversion pattern.
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <remarks>
- <para>
- Parse the <see cref="T:log4net.Core.LoggingEvent"/> using the patter format
- specified in the <see cref="P:log4net.Layout.PatternLayout.ConversionPattern"/> property.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.AddConverter(log4net.Layout.PatternLayout.ConverterInfo)">
- <summary>
- Add a converter to this PatternLayout
- </summary>
- <param name="converterInfo">the converter info</param>
- <remarks>
- <para>
- This version of the method is used by the configurator.
- Programmatic users should use the alternative <see cref="M:log4net.Layout.PatternLayout.AddConverter(System.String,System.Type)"/> method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.AddConverter(System.String,System.Type)">
- <summary>
- Add a converter to this PatternLayout
- </summary>
- <param name="name">the name of the conversion pattern for this converter</param>
- <param name="type">the type of the converter</param>
- <remarks>
- <para>
- Add a named pattern converter to this instance. This
- converter will be used in the formatting of the event.
- This method must be called before <see cref="M:log4net.Layout.PatternLayout.ActivateOptions"/>.
- </para>
- <para>
- The <paramref name="type"/> specified must extend the
- <see cref="T:log4net.Util.PatternConverter"/> type.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.PatternLayout.ConversionPattern">
- <summary>
- The pattern formatting string
- </summary>
- <remarks>
- <para>
- The <b>ConversionPattern</b> option. This is the string which
- controls formatting and consists of a mix of literal content and
- conversion specifiers.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.PatternLayout.ConverterInfo">
- <summary>
- Wrapper class used to map converter names to converter types
- </summary>
- <remarks>
- <para>
- Pattern converter info class used during configuration to
- pass to the <see cref="M:log4net.Layout.PatternLayout.AddConverter(log4net.Layout.PatternLayout.ConverterInfo)"/>
- method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.PatternLayout.ConverterInfo.#ctor">
- <summary>
- default constructor
- </summary>
- </member>
- <member name="P:log4net.Layout.PatternLayout.ConverterInfo.Name">
- <summary>
- Gets or sets the name of the conversion pattern
- </summary>
- <remarks>
- <para>
- The name of the pattern in the format string
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.PatternLayout.ConverterInfo.Type">
- <summary>
- Gets or sets the type of the converter
- </summary>
- <remarks>
- <para>
- The value specified must extend the
- <see cref="T:log4net.Util.PatternConverter"/> type.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.RawLayoutConverter">
- <summary>
- Type converter for the <see cref="T:log4net.Layout.IRawLayout"/> interface
- </summary>
- <remarks>
- <para>
- Used to convert objects to the <see cref="T:log4net.Layout.IRawLayout"/> interface.
- Supports converting from the <see cref="T:log4net.Layout.ILayout"/> interface to
- the <see cref="T:log4net.Layout.IRawLayout"/> interface using the <see cref="T:log4net.Layout.Layout2RawLayoutAdapter"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Util.TypeConverters.IConvertFrom">
- <summary>
- Interface supported by type converters
- </summary>
- <remarks>
- <para>
- This interface supports conversion from arbitrary types
- to a single target type. See <see cref="T:log4net.Util.TypeConverters.TypeConverterAttribute"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.IConvertFrom.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Test if the <paramref name="sourceType"/> can be converted to the
- type supported by this converter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.IConvertFrom.ConvertFrom(System.Object)">
- <summary>
- Convert the source object to the type supported by this object
- </summary>
- <param name="source">the object to convert</param>
- <returns>the converted object</returns>
- <remarks>
- <para>
- Converts the <paramref name="source"/> to the type supported
- by this converter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.RawLayoutConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the sourceType be converted to an <see cref="T:log4net.Layout.IRawLayout"/>
- </summary>
- <param name="sourceType">the source to be to be converted</param>
- <returns><c>true</c> if the source type can be converted to <see cref="T:log4net.Layout.IRawLayout"/></returns>
- <remarks>
- <para>
- Test if the <paramref name="sourceType"/> can be converted to a
- <see cref="T:log4net.Layout.IRawLayout"/>. Only <see cref="T:log4net.Layout.ILayout"/> is supported
- as the <paramref name="sourceType"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.RawLayoutConverter.ConvertFrom(System.Object)">
- <summary>
- Convert the value to a <see cref="T:log4net.Layout.IRawLayout"/> object
- </summary>
- <param name="source">the value to convert</param>
- <returns>the <see cref="T:log4net.Layout.IRawLayout"/> object</returns>
- <remarks>
- <para>
- Convert the <paramref name="source"/> object to a
- <see cref="T:log4net.Layout.IRawLayout"/> object. If the <paramref name="source"/> object
- is a <see cref="T:log4net.Layout.ILayout"/> then the <see cref="T:log4net.Layout.Layout2RawLayoutAdapter"/>
- is used to adapt between the two interfaces, otherwise an
- exception is thrown.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.RawPropertyLayout">
- <summary>
- Extract the value of a property from the <see cref="T:log4net.Core.LoggingEvent"/>
- </summary>
- <remarks>
- <para>
- Extract the value of a property from the <see cref="T:log4net.Core.LoggingEvent"/>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Layout.RawPropertyLayout.#ctor">
- <summary>
- Constructs a RawPropertyLayout
- </summary>
- </member>
- <member name="M:log4net.Layout.RawPropertyLayout.Format(log4net.Core.LoggingEvent)">
- <summary>
- Lookup the property for <see cref="P:log4net.Layout.RawPropertyLayout.Key"/>
- </summary>
- <param name="loggingEvent">The event to format</param>
- <returns>returns property value</returns>
- <remarks>
- <para>
- Looks up and returns the object value of the property
- named <see cref="P:log4net.Layout.RawPropertyLayout.Key"/>. If there is no property defined
- with than name then <c>null</c> will be returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.RawPropertyLayout.Key">
- <summary>
- The name of the value to lookup in the LoggingEvent Properties collection.
- </summary>
- <value>
- Value to lookup in the LoggingEvent Properties collection
- </value>
- <remarks>
- <para>
- String name of the property to lookup in the <see cref="T:log4net.Core.LoggingEvent"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.RawTimeStampLayout">
- <summary>
- Extract the date from the <see cref="T:log4net.Core.LoggingEvent"/>
- </summary>
- <remarks>
- <para>
- Extract the date from the <see cref="T:log4net.Core.LoggingEvent"/>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Layout.RawTimeStampLayout.#ctor">
- <summary>
- Constructs a RawTimeStampLayout
- </summary>
- </member>
- <member name="M:log4net.Layout.RawTimeStampLayout.Format(log4net.Core.LoggingEvent)">
- <summary>
- Gets the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> as a <see cref="T:System.DateTime"/>.
- </summary>
- <param name="loggingEvent">The event to format</param>
- <returns>returns the time stamp</returns>
- <remarks>
- <para>
- Gets the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> as a <see cref="T:System.DateTime"/>.
- </para>
- <para>
- The time stamp is in local time. To format the time stamp
- in universal time use <see cref="T:log4net.Layout.RawUtcTimeStampLayout"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.RawUtcTimeStampLayout">
- <summary>
- Extract the date from the <see cref="T:log4net.Core.LoggingEvent"/>
- </summary>
- <remarks>
- <para>
- Extract the date from the <see cref="T:log4net.Core.LoggingEvent"/>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Layout.RawUtcTimeStampLayout.#ctor">
- <summary>
- Constructs a RawUtcTimeStampLayout
- </summary>
- </member>
- <member name="M:log4net.Layout.RawUtcTimeStampLayout.Format(log4net.Core.LoggingEvent)">
- <summary>
- Gets the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> as a <see cref="T:System.DateTime"/>.
- </summary>
- <param name="loggingEvent">The event to format</param>
- <returns>returns the time stamp</returns>
- <remarks>
- <para>
- Gets the <see cref="P:log4net.Core.LoggingEvent.TimeStamp"/> as a <see cref="T:System.DateTime"/>.
- </para>
- <para>
- The time stamp is in universal time. To format the time stamp
- in local time use <see cref="T:log4net.Layout.RawTimeStampLayout"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.SimpleLayout">
- <summary>
- A very simple layout
- </summary>
- <remarks>
- <para>
- SimpleLayout consists of the level of the log statement,
- followed by " - " and then the log message itself. For example,
- <code>
- DEBUG - Hello world
- </code>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Layout.SimpleLayout.#ctor">
- <summary>
- Constructs a SimpleLayout
- </summary>
- </member>
- <member name="M:log4net.Layout.SimpleLayout.ActivateOptions">
- <summary>
- Initialize layout options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.SimpleLayout.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.SimpleLayout.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.SimpleLayout.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.SimpleLayout.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Produces a simple formatted output.
- </summary>
- <param name="loggingEvent">the event being logged</param>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <remarks>
- <para>
- Formats the event as the level of the even,
- followed by " - " and then the log message itself. The
- output is terminated by a newline.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.XmlLayout">
- <summary>
- Layout that formats the log events as XML elements.
- </summary>
- <remarks>
- <para>
- The output of the <see cref="T:log4net.Layout.XmlLayout"/> consists of a series of
- log4net:event elements. It does not output a complete well-formed XML
- file. The output is designed to be included as an <em>external entity</em>
- in a separate file to form a correct XML file.
- </para>
- <para>
- For example, if <c>abc</c> is the name of the file where
- the <see cref="T:log4net.Layout.XmlLayout"/> output goes, then a well-formed XML file would
- be:
- </para>
- <code lang="XML">
- &lt;?xml version="1.0" ?&gt;
-
- &lt;!DOCTYPE log4net:events SYSTEM "log4net-events.dtd" [&lt;!ENTITY data SYSTEM "abc"&gt;]&gt;
-
- &lt;log4net:events version="1.2" xmlns:log4net="http://logging.apache.org/log4net/schemas/log4net-events-1.2&gt;
- &amp;data;
- &lt;/log4net:events&gt;
- </code>
- <para>
- This approach enforces the independence of the <see cref="T:log4net.Layout.XmlLayout"/>
- and the appender where it is embedded.
- </para>
- <para>
- The <c>version</c> attribute helps components to correctly
- interpret output generated by <see cref="T:log4net.Layout.XmlLayout"/>. The value of
- this attribute should be "1.2" for release 1.2 and later.
- </para>
- <para>
- Alternatively the <c>Header</c> and <c>Footer</c> properties can be
- configured to output the correct XML header, open tag and close tag.
- When setting the <c>Header</c> and <c>Footer</c> properties it is essential
- that the underlying data store not be appendable otherwise the data
- will become invalid XML.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Layout.XmlLayoutBase">
- <summary>
- Layout that formats the log events as XML elements.
- </summary>
- <remarks>
- <para>
- This is an abstract class that must be subclassed by an implementation
- to conform to a specific schema.
- </para>
- <para>
- Deriving classes must implement the <see cref="M:log4net.Layout.XmlLayoutBase.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)"/> method.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Layout.XmlLayoutBase.#ctor">
- <summary>
- Protected constructor to support subclasses
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Layout.XmlLayoutBase"/> class
- with no location info.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayoutBase.#ctor(System.Boolean)">
- <summary>
- Protected constructor to support subclasses
- </summary>
- <remarks>
- <para>
- The <paramref name="locationInfo" /> parameter determines whether
- location information will be output by the layout. If
- <paramref name="locationInfo" /> is set to <c>true</c>, then the
- file name and line number of the statement at the origin of the log
- statement will be output.
- </para>
- <para>
- If you are embedding this layout within an SMTPAppender
- then make sure to set the <b>LocationInfo</b> option of that
- appender as well.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayoutBase.ActivateOptions">
- <summary>
- Initialize layout options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.XmlLayoutBase.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.XmlLayoutBase.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.XmlLayoutBase.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayoutBase.Format(System.IO.TextWriter,log4net.Core.LoggingEvent)">
- <summary>
- Produces a formatted string.
- </summary>
- <param name="loggingEvent">The event being logged.</param>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <remarks>
- <para>
- Format the <see cref="T:log4net.Core.LoggingEvent"/> and write it to the <see cref="T:System.IO.TextWriter"/>.
- </para>
- <para>
- This method creates an <see cref="T:System.Xml.XmlTextWriter"/> that writes to the
- <paramref name="writer"/>. The <see cref="T:System.Xml.XmlTextWriter"/> is passed
- to the <see cref="M:log4net.Layout.XmlLayoutBase.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)"/> method. Subclasses should override the
- <see cref="M:log4net.Layout.XmlLayoutBase.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)"/> method rather than this method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayoutBase.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)">
- <summary>
- Does the actual writing of the XML.
- </summary>
- <param name="writer">The writer to use to output the event to.</param>
- <param name="loggingEvent">The event to write.</param>
- <remarks>
- <para>
- Subclasses should override this method to format
- the <see cref="T:log4net.Core.LoggingEvent"/> as XML.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.XmlLayoutBase.m_locationInfo">
- <summary>
- Flag to indicate if location information should be included in
- the XML events.
- </summary>
- </member>
- <member name="F:log4net.Layout.XmlLayoutBase.m_protectCloseTextWriter">
- <summary>
- Writer adapter that ignores Close
- </summary>
- </member>
- <member name="F:log4net.Layout.XmlLayoutBase.m_invalidCharReplacement">
- <summary>
- The string to replace invalid chars with
- </summary>
- </member>
- <member name="P:log4net.Layout.XmlLayoutBase.LocationInfo">
- <summary>
- Gets a value indicating whether to include location information in
- the XML events.
- </summary>
- <value>
- <c>true</c> if location information should be included in the XML
- events; otherwise, <c>false</c>.
- </value>
- <remarks>
- <para>
- If <see cref="P:log4net.Layout.XmlLayoutBase.LocationInfo"/> is set to <c>true</c>, then the file
- name and line number of the statement at the origin of the log
- statement will be output.
- </para>
- <para>
- If you are embedding this layout within an <c>SMTPAppender</c>
- then make sure to set the <b>LocationInfo</b> option of that
- appender as well.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.XmlLayoutBase.InvalidCharReplacement">
- <summary>
- The string to replace characters that can not be expressed in XML with.
- <remarks>
- <para>
- Not all characters may be expressed in XML. This property contains the
- string to replace those that can not with. This defaults to a ?. Set it
- to the empty string to simply remove offending characters. For more
- details on the allowed character ranges see http://www.w3.org/TR/REC-xml/#charsets
- Character replacement will occur in the log message, the property names
- and the property values.
- </para>
- </remarks>
- </summary>
- </member>
- <member name="P:log4net.Layout.XmlLayoutBase.ContentType">
- <summary>
- Gets the content type output by this layout.
- </summary>
- <value>
- As this is the XML layout, the value is always <c>"text/xml"</c>.
- </value>
- <remarks>
- <para>
- As this is the XML layout, the value is always <c>"text/xml"</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayout.#ctor">
- <summary>
- Constructs an XmlLayout
- </summary>
- </member>
- <member name="M:log4net.Layout.XmlLayout.#ctor(System.Boolean)">
- <summary>
- Constructs an XmlLayout.
- </summary>
- <remarks>
- <para>
- The <b>LocationInfo</b> option takes a boolean value. By
- default, it is set to false which means there will be no location
- information output by this layout. If the the option is set to
- true, then the file name and line number of the statement
- at the origin of the log statement will be output.
- </para>
- <para>
- If you are embedding this layout within an SmtpAppender
- then make sure to set the <b>LocationInfo</b> option of that
- appender as well.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayout.ActivateOptions">
- <summary>
- Initialize layout options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Layout.XmlLayout.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Layout.XmlLayout.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Layout.XmlLayout.ActivateOptions"/> must be called again.
- </para>
- <para>
- Builds a cache of the element names
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayout.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)">
- <summary>
- Does the actual writing of the XML.
- </summary>
- <param name="writer">The writer to use to output the event to.</param>
- <param name="loggingEvent">The event to write.</param>
- <remarks>
- <para>
- Override the base class <see cref="M:log4net.Layout.XmlLayoutBase.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)"/> method
- to write the <see cref="T:log4net.Core.LoggingEvent"/> to the <see cref="T:System.Xml.XmlWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Layout.XmlLayout.m_prefix">
- <summary>
- The prefix to use for all generated element names
- </summary>
- </member>
- <member name="P:log4net.Layout.XmlLayout.Prefix">
- <summary>
- The prefix to use for all element names
- </summary>
- <remarks>
- <para>
- The default prefix is <b>log4net</b>. Set this property
- to change the prefix. If the prefix is set to an empty string
- then no prefix will be written.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.XmlLayout.Base64EncodeMessage">
- <summary>
- Set whether or not to base64 encode the message.
- </summary>
- <remarks>
- <para>
- By default the log message will be written as text to the xml
- output. This can cause problems when the message contains binary
- data. By setting this to true the contents of the message will be
- base64 encoded. If this is set then invalid character replacement
- (see <see cref="P:log4net.Layout.XmlLayoutBase.InvalidCharReplacement"/>) will not be performed
- on the log message.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.XmlLayout.Base64EncodeProperties">
- <summary>
- Set whether or not to base64 encode the property values.
- </summary>
- <remarks>
- <para>
- By default the properties will be written as text to the xml
- output. This can cause problems when one or more properties contain
- binary data. By setting this to true the values of the properties
- will be base64 encoded. If this is set then invalid character replacement
- (see <see cref="P:log4net.Layout.XmlLayoutBase.InvalidCharReplacement"/>) will not be performed
- on the property values.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Layout.XmlLayoutSchemaLog4j">
- <summary>
- Layout that formats the log events as XML elements compatible with the log4j schema
- </summary>
- <remarks>
- <para>
- Formats the log events according to the http://logging.apache.org/log4j schema.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Layout.XmlLayoutSchemaLog4j.s_date1970">
- <summary>
- The 1st of January 1970 in UTC
- </summary>
- </member>
- <member name="M:log4net.Layout.XmlLayoutSchemaLog4j.#ctor">
- <summary>
- Constructs an XMLLayoutSchemaLog4j
- </summary>
- </member>
- <member name="M:log4net.Layout.XmlLayoutSchemaLog4j.#ctor(System.Boolean)">
- <summary>
- Constructs an XMLLayoutSchemaLog4j.
- </summary>
- <remarks>
- <para>
- The <b>LocationInfo</b> option takes a boolean value. By
- default, it is set to false which means there will be no location
- information output by this layout. If the the option is set to
- true, then the file name and line number of the statement
- at the origin of the log statement will be output.
- </para>
- <para>
- If you are embedding this layout within an SMTPAppender
- then make sure to set the <b>LocationInfo</b> option of that
- appender as well.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Layout.XmlLayoutSchemaLog4j.FormatXml(System.Xml.XmlWriter,log4net.Core.LoggingEvent)">
- <summary>
- Actually do the writing of the xml
- </summary>
- <param name="writer">the writer to use</param>
- <param name="loggingEvent">the event to write</param>
- <remarks>
- <para>
- Generate XML that is compatible with the log4j schema.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Layout.XmlLayoutSchemaLog4j.Version">
- <summary>
- The version of the log4j schema to use.
- </summary>
- <remarks>
- <para>
- Only version 1.2 of the log4j schema is supported.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.ObjectRenderer.DefaultRenderer">
- <summary>
- The default object Renderer.
- </summary>
- <remarks>
- <para>
- The default renderer supports rendering objects and collections to strings.
- </para>
- <para>
- See the <see cref="M:log4net.ObjectRenderer.DefaultRenderer.RenderObject(log4net.ObjectRenderer.RendererMap,System.Object,System.IO.TextWriter)"/> method for details of the output.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.ObjectRenderer.IObjectRenderer">
- <summary>
- Implement this interface in order to render objects as strings
- </summary>
- <remarks>
- <para>
- Certain types require special case conversion to
- string form. This conversion is done by an object renderer.
- Object renderers implement the <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>
- interface.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.ObjectRenderer.IObjectRenderer.RenderObject(log4net.ObjectRenderer.RendererMap,System.Object,System.IO.TextWriter)">
- <summary>
- Render the object <paramref name="obj"/> to a string
- </summary>
- <param name="rendererMap">The map used to lookup renderers</param>
- <param name="obj">The object to render</param>
- <param name="writer">The writer to render to</param>
- <remarks>
- <para>
- Render the object <paramref name="obj"/> to a
- string.
- </para>
- <para>
- The <paramref name="rendererMap"/> parameter is
- provided to lookup and render other objects. This is
- very useful where <paramref name="obj"/> contains
- nested objects of unknown type. The <see cref="M:log4net.ObjectRenderer.RendererMap.FindAndRender(System.Object,System.IO.TextWriter)"/>
- method can be used to render these objects.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.DefaultRenderer.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.DefaultRenderer.RenderObject(log4net.ObjectRenderer.RendererMap,System.Object,System.IO.TextWriter)">
- <summary>
- Render the object <paramref name="obj"/> to a string
- </summary>
- <param name="rendererMap">The map used to lookup renderers</param>
- <param name="obj">The object to render</param>
- <param name="writer">The writer to render to</param>
- <remarks>
- <para>
- Render the object <paramref name="obj"/> to a string.
- </para>
- <para>
- The <paramref name="rendererMap"/> parameter is
- provided to lookup and render other objects. This is
- very useful where <paramref name="obj"/> contains
- nested objects of unknown type. The <see cref="M:log4net.ObjectRenderer.RendererMap.FindAndRender(System.Object)"/>
- method can be used to render these objects.
- </para>
- <para>
- The default renderer supports rendering objects to strings as follows:
- </para>
- <list type="table">
- <listheader>
- <term>Value</term>
- <description>Rendered String</description>
- </listheader>
- <item>
- <term><c>null</c></term>
- <description>
- <para>"(null)"</para>
- </description>
- </item>
- <item>
- <term><see cref="T:System.Array"/></term>
- <description>
- <para>
- For a one dimensional array this is the
- array type name, an open brace, followed by a comma
- separated list of the elements (using the appropriate
- renderer), followed by a close brace.
- </para>
- <para>
- For example: <c>int[] {1, 2, 3}</c>.
- </para>
- <para>
- If the array is not one dimensional the
- <c>Array.ToString()</c> is returned.
- </para>
- </description>
- </item>
- <item>
- <term><see cref="T:System.Collections.IEnumerable"/>, <see cref="T:System.Collections.ICollection"/> &amp; <see cref="T:System.Collections.IEnumerator"/></term>
- <description>
- <para>
- Rendered as an open brace, followed by a comma
- separated list of the elements (using the appropriate
- renderer), followed by a close brace.
- </para>
- <para>
- For example: <c>{a, b, c}</c>.
- </para>
- <para>
- All collection classes that implement <see cref="T:System.Collections.ICollection"/> its subclasses,
- or generic equivalents all implement the <see cref="T:System.Collections.IEnumerable"/> interface.
- </para>
- </description>
- </item>
- <item>
- <term><see cref="T:System.Collections.DictionaryEntry"/></term>
- <description>
- <para>
- Rendered as the key, an equals sign ('='), and the value (using the appropriate
- renderer).
- </para>
- <para>
- For example: <c>key=value</c>.
- </para>
- </description>
- </item>
- <item>
- <term>other</term>
- <description>
- <para><c>Object.ToString()</c></para>
- </description>
- </item>
- </list>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.DefaultRenderer.RenderArray(log4net.ObjectRenderer.RendererMap,System.Array,System.IO.TextWriter)">
- <summary>
- Render the array argument into a string
- </summary>
- <param name="rendererMap">The map used to lookup renderers</param>
- <param name="array">the array to render</param>
- <param name="writer">The writer to render to</param>
- <remarks>
- <para>
- For a one dimensional array this is the
- array type name, an open brace, followed by a comma
- separated list of the elements (using the appropriate
- renderer), followed by a close brace. For example:
- <c>int[] {1, 2, 3}</c>.
- </para>
- <para>
- If the array is not one dimensional the
- <c>Array.ToString()</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.DefaultRenderer.RenderEnumerator(log4net.ObjectRenderer.RendererMap,System.Collections.IEnumerator,System.IO.TextWriter)">
- <summary>
- Render the enumerator argument into a string
- </summary>
- <param name="rendererMap">The map used to lookup renderers</param>
- <param name="enumerator">the enumerator to render</param>
- <param name="writer">The writer to render to</param>
- <remarks>
- <para>
- Rendered as an open brace, followed by a comma
- separated list of the elements (using the appropriate
- renderer), followed by a close brace. For example:
- <c>{a, b, c}</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.DefaultRenderer.RenderDictionaryEntry(log4net.ObjectRenderer.RendererMap,System.Collections.DictionaryEntry,System.IO.TextWriter)">
- <summary>
- Render the DictionaryEntry argument into a string
- </summary>
- <param name="rendererMap">The map used to lookup renderers</param>
- <param name="entry">the DictionaryEntry to render</param>
- <param name="writer">The writer to render to</param>
- <remarks>
- <para>
- Render the key, an equals sign ('='), and the value (using the appropriate
- renderer). For example: <c>key=value</c>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.ObjectRenderer.RendererMap">
- <summary>
- Map class objects to an <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/>.
- </summary>
- <remarks>
- <para>
- Maintains a mapping between types that require special
- rendering and the <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/> that
- is used to render them.
- </para>
- <para>
- The <see cref="M:log4net.ObjectRenderer.RendererMap.FindAndRender(System.Object)"/> method is used to render an
- <c>object</c> using the appropriate renderers defined in this map.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.#ctor">
- <summary>
- Default Constructor
- </summary>
- <remarks>
- <para>
- Default constructor.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.FindAndRender(System.Object)">
- <summary>
- Render <paramref name="obj"/> using the appropriate renderer.
- </summary>
- <param name="obj">the object to render to a string</param>
- <returns>the object rendered as a string</returns>
- <remarks>
- <para>
- This is a convenience method used to render an object to a string.
- The alternative method <see cref="M:log4net.ObjectRenderer.RendererMap.FindAndRender(System.Object,System.IO.TextWriter)"/>
- should be used when streaming output to a <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.FindAndRender(System.Object,System.IO.TextWriter)">
- <summary>
- Render <paramref name="obj"/> using the appropriate renderer.
- </summary>
- <param name="obj">the object to render to a string</param>
- <param name="writer">The writer to render to</param>
- <remarks>
- <para>
- Find the appropriate renderer for the type of the
- <paramref name="obj"/> parameter. This is accomplished by calling the
- <see cref="M:log4net.ObjectRenderer.RendererMap.Get(System.Type)"/> method. Once a renderer is found, it is
- applied on the object <paramref name="obj"/> and the result is returned
- as a <see cref="T:System.String"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.Get(System.Object)">
- <summary>
- Gets the renderer for the specified object type
- </summary>
- <param name="obj">the object to lookup the renderer for</param>
- <returns>the renderer for <paramref name="obj"/></returns>
- <remarks>
- <param>
- Gets the renderer for the specified object type.
- </param>
- <param>
- Syntactic sugar method that calls <see cref="M:log4net.ObjectRenderer.RendererMap.Get(System.Type)"/>
- with the type of the object parameter.
- </param>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.Get(System.Type)">
- <summary>
- Gets the renderer for the specified type
- </summary>
- <param name="type">the type to lookup the renderer for</param>
- <returns>the renderer for the specified type</returns>
- <remarks>
- <para>
- Returns the renderer for the specified type.
- If no specific renderer has been defined the
- <see cref="P:log4net.ObjectRenderer.RendererMap.DefaultRenderer"/> will be returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.SearchTypeAndInterfaces(System.Type)">
- <summary>
- Internal function to recursively search interfaces
- </summary>
- <param name="type">the type to lookup the renderer for</param>
- <returns>the renderer for the specified type</returns>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.Clear">
- <summary>
- Clear the map of renderers
- </summary>
- <remarks>
- <para>
- Clear the custom renderers defined by using
- <see cref="M:log4net.ObjectRenderer.RendererMap.Put(System.Type,log4net.ObjectRenderer.IObjectRenderer)"/>. The <see cref="P:log4net.ObjectRenderer.RendererMap.DefaultRenderer"/>
- cannot be removed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.ObjectRenderer.RendererMap.Put(System.Type,log4net.ObjectRenderer.IObjectRenderer)">
- <summary>
- Register an <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/> for <paramref name="typeToRender"/>.
- </summary>
- <param name="typeToRender">the type that will be rendered by <paramref name="renderer"/></param>
- <param name="renderer">the renderer for <paramref name="typeToRender"/></param>
- <remarks>
- <para>
- Register an object renderer for a specific source type.
- This renderer will be returned from a call to <see cref="M:log4net.ObjectRenderer.RendererMap.Get(System.Type)"/>
- specifying the same <paramref name="typeToRender"/> as an argument.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.ObjectRenderer.RendererMap.DefaultRenderer">
- <summary>
- Get the default renderer instance
- </summary>
- <value>the default renderer</value>
- <remarks>
- <para>
- Get the default renderer
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Plugin.IPlugin">
- <summary>
- Interface implemented by logger repository plugins.
- </summary>
- <remarks>
- <para>
- Plugins define additional behavior that can be associated
- with a <see cref="T:log4net.Repository.ILoggerRepository"/>.
- The <see cref="T:log4net.Plugin.PluginMap"/> held by the <see cref="P:log4net.Repository.ILoggerRepository.PluginMap"/>
- property is used to store the plugins for a repository.
- </para>
- <para>
- The <c>log4net.Config.PluginAttribute</c> can be used to
- attach plugins to repositories created using configuration
- attributes.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Plugin.IPlugin.Attach(log4net.Repository.ILoggerRepository)">
- <summary>
- Attaches the plugin to the specified <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </summary>
- <param name="repository">The <see cref="T:log4net.Repository.ILoggerRepository"/> that this plugin should be attached to.</param>
- <remarks>
- <para>
- A plugin may only be attached to a single repository.
- </para>
- <para>
- This method is called when the plugin is attached to the repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.IPlugin.Shutdown">
- <summary>
- Is called when the plugin is to shutdown.
- </summary>
- <remarks>
- <para>
- This method is called to notify the plugin that
- it should stop operating and should detach from
- the repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Plugin.IPlugin.Name">
- <summary>
- Gets the name of the plugin.
- </summary>
- <value>
- The name of the plugin.
- </value>
- <remarks>
- <para>
- Plugins are stored in the <see cref="T:log4net.Plugin.PluginMap"/>
- keyed by name. Each plugin instance attached to a
- repository must be a unique name.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Plugin.PluginCollection">
- <summary>
- A strongly-typed collection of <see cref="T:log4net.Plugin.IPlugin"/> objects.
- </summary>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.ReadOnly(log4net.Plugin.PluginCollection)">
- <summary>
- Creates a read-only wrapper for a <c>PluginCollection</c> instance.
- </summary>
- <param name="list">list to create a readonly wrapper arround</param>
- <returns>
- A <c>PluginCollection</c> wrapper that is read-only.
- </returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.#ctor">
- <summary>
- Initializes a new instance of the <c>PluginCollection</c> class
- that is empty and has the default initial capacity.
- </summary>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.#ctor(System.Int32)">
- <summary>
- Initializes a new instance of the <c>PluginCollection</c> class
- that has the specified initial capacity.
- </summary>
- <param name="capacity">
- The number of elements that the new <c>PluginCollection</c> is initially capable of storing.
- </param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.#ctor(log4net.Plugin.PluginCollection)">
- <summary>
- Initializes a new instance of the <c>PluginCollection</c> class
- that contains elements copied from the specified <c>PluginCollection</c>.
- </summary>
- <param name="c">The <c>PluginCollection</c> whose elements are copied to the new collection.</param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.#ctor(log4net.Plugin.IPlugin[])">
- <summary>
- Initializes a new instance of the <c>PluginCollection</c> class
- that contains elements copied from the specified <see cref="T:log4net.Plugin.IPlugin"/> array.
- </summary>
- <param name="a">The <see cref="T:log4net.Plugin.IPlugin"/> array whose elements are copied to the new list.</param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.#ctor(System.Collections.ICollection)">
- <summary>
- Initializes a new instance of the <c>PluginCollection</c> class
- that contains elements copied from the specified <see cref="T:log4net.Plugin.IPlugin"/> collection.
- </summary>
- <param name="col">The <see cref="T:log4net.Plugin.IPlugin"/> collection whose elements are copied to the new list.</param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.#ctor(log4net.Plugin.PluginCollection.Tag)">
- <summary>
- Allow subclasses to avoid our default constructors
- </summary>
- <param name="tag"></param>
- <exclude/>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.CopyTo(log4net.Plugin.IPlugin[])">
- <summary>
- Copies the entire <c>PluginCollection</c> to a one-dimensional
- <see cref="T:log4net.Plugin.IPlugin"/> array.
- </summary>
- <param name="array">The one-dimensional <see cref="T:log4net.Plugin.IPlugin"/> array to copy to.</param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.CopyTo(log4net.Plugin.IPlugin[],System.Int32)">
- <summary>
- Copies the entire <c>PluginCollection</c> to a one-dimensional
- <see cref="T:log4net.Plugin.IPlugin"/> array, starting at the specified index of the target array.
- </summary>
- <param name="array">The one-dimensional <see cref="T:log4net.Plugin.IPlugin"/> array to copy to.</param>
- <param name="start">The zero-based index in <paramref name="array"/> at which copying begins.</param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Add(log4net.Plugin.IPlugin)">
- <summary>
- Adds a <see cref="T:log4net.Plugin.IPlugin"/> to the end of the <c>PluginCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Plugin.IPlugin"/> to be added to the end of the <c>PluginCollection</c>.</param>
- <returns>The index at which the value has been added.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Clear">
- <summary>
- Removes all elements from the <c>PluginCollection</c>.
- </summary>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Clone">
- <summary>
- Creates a shallow copy of the <see cref="T:log4net.Plugin.PluginCollection"/>.
- </summary>
- <returns>A new <see cref="T:log4net.Plugin.PluginCollection"/> with a shallow copy of the collection data.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Contains(log4net.Plugin.IPlugin)">
- <summary>
- Determines whether a given <see cref="T:log4net.Plugin.IPlugin"/> is in the <c>PluginCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Plugin.IPlugin"/> to check for.</param>
- <returns><c>true</c> if <paramref name="item"/> is found in the <c>PluginCollection</c>; otherwise, <c>false</c>.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.IndexOf(log4net.Plugin.IPlugin)">
- <summary>
- Returns the zero-based index of the first occurrence of a <see cref="T:log4net.Plugin.IPlugin"/>
- in the <c>PluginCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Plugin.IPlugin"/> to locate in the <c>PluginCollection</c>.</param>
- <returns>
- The zero-based index of the first occurrence of <paramref name="item"/>
- in the entire <c>PluginCollection</c>, if found; otherwise, -1.
- </returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Insert(System.Int32,log4net.Plugin.IPlugin)">
- <summary>
- Inserts an element into the <c>PluginCollection</c> at the specified index.
- </summary>
- <param name="index">The zero-based index at which <paramref name="item"/> should be inserted.</param>
- <param name="item">The <see cref="T:log4net.Plugin.IPlugin"/> to insert.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Plugin.PluginCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Remove(log4net.Plugin.IPlugin)">
- <summary>
- Removes the first occurrence of a specific <see cref="T:log4net.Plugin.IPlugin"/> from the <c>PluginCollection</c>.
- </summary>
- <param name="item">The <see cref="T:log4net.Plugin.IPlugin"/> to remove from the <c>PluginCollection</c>.</param>
- <exception cref="T:System.ArgumentException">
- The specified <see cref="T:log4net.Plugin.IPlugin"/> was not found in the <c>PluginCollection</c>.
- </exception>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.RemoveAt(System.Int32)">
- <summary>
- Removes the element at the specified index of the <c>PluginCollection</c>.
- </summary>
- <param name="index">The zero-based index of the element to remove.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero.</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Plugin.PluginCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.GetEnumerator">
- <summary>
- Returns an enumerator that can iterate through the <c>PluginCollection</c>.
- </summary>
- <returns>An <see cref="T:log4net.Plugin.PluginCollection.Enumerator"/> for the entire <c>PluginCollection</c>.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.AddRange(log4net.Plugin.PluginCollection)">
- <summary>
- Adds the elements of another <c>PluginCollection</c> to the current <c>PluginCollection</c>.
- </summary>
- <param name="x">The <c>PluginCollection</c> whose elements should be added to the end of the current <c>PluginCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Plugin.PluginCollection.Count"/> of the <c>PluginCollection</c>.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.AddRange(log4net.Plugin.IPlugin[])">
- <summary>
- Adds the elements of a <see cref="T:log4net.Plugin.IPlugin"/> array to the current <c>PluginCollection</c>.
- </summary>
- <param name="x">The <see cref="T:log4net.Plugin.IPlugin"/> array whose elements should be added to the end of the <c>PluginCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Plugin.PluginCollection.Count"/> of the <c>PluginCollection</c>.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.AddRange(System.Collections.ICollection)">
- <summary>
- Adds the elements of a <see cref="T:log4net.Plugin.IPlugin"/> collection to the current <c>PluginCollection</c>.
- </summary>
- <param name="col">The <see cref="T:log4net.Plugin.IPlugin"/> collection whose elements should be added to the end of the <c>PluginCollection</c>.</param>
- <returns>The new <see cref="P:log4net.Plugin.PluginCollection.Count"/> of the <c>PluginCollection</c>.</returns>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.TrimToSize">
- <summary>
- Sets the capacity to the actual number of elements.
- </summary>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.ValidateIndex(System.Int32)">
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero.</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Plugin.PluginCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.ValidateIndex(System.Int32,System.Boolean)">
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero.</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Plugin.PluginCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.Count">
- <summary>
- Gets the number of elements actually contained in the <c>PluginCollection</c>.
- </summary>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.IsSynchronized">
- <summary>
- Gets a value indicating whether access to the collection is synchronized (thread-safe).
- </summary>
- <returns>true if access to the ICollection is synchronized (thread-safe); otherwise, false.</returns>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.SyncRoot">
- <summary>
- Gets an object that can be used to synchronize access to the collection.
- </summary>
- <value>
- An object that can be used to synchronize access to the collection.
- </value>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.Item(System.Int32)">
- <summary>
- Gets or sets the <see cref="T:log4net.Plugin.IPlugin"/> at the specified index.
- </summary>
- <value>
- The <see cref="T:log4net.Plugin.IPlugin"/> at the specified index.
- </value>
- <param name="index">The zero-based index of the element to get or set.</param>
- <exception cref="T:System.ArgumentOutOfRangeException">
- <para><paramref name="index"/> is less than zero.</para>
- <para>-or-</para>
- <para><paramref name="index"/> is equal to or greater than <see cref="P:log4net.Plugin.PluginCollection.Count"/>.</para>
- </exception>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.IsFixedSize">
- <summary>
- Gets a value indicating whether the collection has a fixed size.
- </summary>
- <value><c>true</c> if the collection has a fixed size; otherwise, <c>false</c>. The default is <c>false</c>.</value>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.IsReadOnly">
- <summary>
- Gets a value indicating whether the IList is read-only.
- </summary>
- <value><c>true</c> if the collection is read-only; otherwise, <c>false</c>. The default is <c>false</c>.</value>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.Capacity">
- <summary>
- Gets or sets the number of elements the <c>PluginCollection</c> can contain.
- </summary>
- <value>
- The number of elements the <c>PluginCollection</c> can contain.
- </value>
- </member>
- <member name="T:log4net.Plugin.PluginCollection.IPluginCollectionEnumerator">
- <summary>
- Supports type-safe iteration over a <see cref="T:log4net.Plugin.PluginCollection"/>.
- </summary>
- <exclude/>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.IPluginCollectionEnumerator.MoveNext">
- <summary>
- Advances the enumerator to the next element in the collection.
- </summary>
- <returns>
- <c>true</c> if the enumerator was successfully advanced to the next element;
- <c>false</c> if the enumerator has passed the end of the collection.
- </returns>
- <exception cref="T:System.InvalidOperationException">
- The collection was modified after the enumerator was created.
- </exception>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.IPluginCollectionEnumerator.Reset">
- <summary>
- Sets the enumerator to its initial position, before the first element in the collection.
- </summary>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.IPluginCollectionEnumerator.Current">
- <summary>
- Gets the current element in the collection.
- </summary>
- </member>
- <member name="T:log4net.Plugin.PluginCollection.Tag">
- <summary>
- Type visible only to our subclasses
- Used to access protected constructor
- </summary>
- <exclude/>
- </member>
- <member name="F:log4net.Plugin.PluginCollection.Tag.Default">
- <summary>
- A value
- </summary>
- </member>
- <member name="T:log4net.Plugin.PluginCollection.Enumerator">
- <summary>
- Supports simple iteration over a <see cref="T:log4net.Plugin.PluginCollection"/>.
- </summary>
- <exclude/>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Enumerator.#ctor(log4net.Plugin.PluginCollection)">
- <summary>
- Initializes a new instance of the <c>Enumerator</c> class.
- </summary>
- <param name="tc"></param>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Enumerator.MoveNext">
- <summary>
- Advances the enumerator to the next element in the collection.
- </summary>
- <returns>
- <c>true</c> if the enumerator was successfully advanced to the next element;
- <c>false</c> if the enumerator has passed the end of the collection.
- </returns>
- <exception cref="T:System.InvalidOperationException">
- The collection was modified after the enumerator was created.
- </exception>
- </member>
- <member name="M:log4net.Plugin.PluginCollection.Enumerator.Reset">
- <summary>
- Sets the enumerator to its initial position, before the first element in the collection.
- </summary>
- </member>
- <member name="P:log4net.Plugin.PluginCollection.Enumerator.Current">
- <summary>
- Gets the current element in the collection.
- </summary>
- <value>
- The current element in the collection.
- </value>
- </member>
- <member name="T:log4net.Plugin.PluginCollection.ReadOnlyPluginCollection">
- <exclude/>
- </member>
- <member name="T:log4net.Plugin.PluginMap">
- <summary>
- Map of repository plugins.
- </summary>
- <remarks>
- <para>
- This class is a name keyed map of the plugins that are
- attached to a repository.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Plugin.PluginMap.#ctor(log4net.Repository.ILoggerRepository)">
- <summary>
- Constructor
- </summary>
- <param name="repository">The repository that the plugins should be attached to.</param>
- <remarks>
- <para>
- Initialize a new instance of the <see cref="T:log4net.Plugin.PluginMap"/> class with a
- repository that the plugins should be attached to.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.PluginMap.Add(log4net.Plugin.IPlugin)">
- <summary>
- Adds a <see cref="T:log4net.Plugin.IPlugin"/> to the map.
- </summary>
- <param name="plugin">The <see cref="T:log4net.Plugin.IPlugin"/> to add to the map.</param>
- <remarks>
- <para>
- The <see cref="T:log4net.Plugin.IPlugin"/> will be attached to the repository when added.
- </para>
- <para>
- If there already exists a plugin with the same name
- attached to the repository then the old plugin will
- be <see cref="M:log4net.Plugin.IPlugin.Shutdown"/> and replaced with
- the new plugin.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.PluginMap.Remove(log4net.Plugin.IPlugin)">
- <summary>
- Removes a <see cref="T:log4net.Plugin.IPlugin"/> from the map.
- </summary>
- <param name="plugin">The <see cref="T:log4net.Plugin.IPlugin"/> to remove from the map.</param>
- <remarks>
- <para>
- Remove a specific plugin from this map.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Plugin.PluginMap.Item(System.String)">
- <summary>
- Gets a <see cref="T:log4net.Plugin.IPlugin"/> by name.
- </summary>
- <param name="name">The name of the <see cref="T:log4net.Plugin.IPlugin"/> to lookup.</param>
- <returns>
- The <see cref="T:log4net.Plugin.IPlugin"/> from the map with the name specified, or
- <c>null</c> if no plugin is found.
- </returns>
- <remarks>
- <para>
- Lookup a plugin by name. If the plugin is not found <c>null</c>
- will be returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Plugin.PluginMap.AllPlugins">
- <summary>
- Gets all possible plugins as a list of <see cref="T:log4net.Plugin.IPlugin"/> objects.
- </summary>
- <value>All possible plugins as a list of <see cref="T:log4net.Plugin.IPlugin"/> objects.</value>
- <remarks>
- <para>
- Get a collection of all the plugins defined in this map.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Plugin.PluginSkeleton">
- <summary>
- Base implementation of <see cref="T:log4net.Plugin.IPlugin"/>
- </summary>
- <remarks>
- <para>
- Default abstract implementation of the <see cref="T:log4net.Plugin.IPlugin"/>
- interface. This base class can be used by implementors
- of the <see cref="T:log4net.Plugin.IPlugin"/> interface.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Plugin.PluginSkeleton.#ctor(System.String)">
- <summary>
- Constructor
- </summary>
- <param name="name">the name of the plugin</param>
- <remarks>
- Initializes a new Plugin with the specified name.
- </remarks>
- </member>
- <member name="M:log4net.Plugin.PluginSkeleton.Attach(log4net.Repository.ILoggerRepository)">
- <summary>
- Attaches this plugin to a <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </summary>
- <param name="repository">The <see cref="T:log4net.Repository.ILoggerRepository"/> that this plugin should be attached to.</param>
- <remarks>
- <para>
- A plugin may only be attached to a single repository.
- </para>
- <para>
- This method is called when the plugin is attached to the repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.PluginSkeleton.Shutdown">
- <summary>
- Is called when the plugin is to shutdown.
- </summary>
- <remarks>
- <para>
- This method is called to notify the plugin that
- it should stop operating and should detach from
- the repository.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Plugin.PluginSkeleton.m_name">
- <summary>
- The name of this plugin.
- </summary>
- </member>
- <member name="F:log4net.Plugin.PluginSkeleton.m_repository">
- <summary>
- The repository this plugin is attached to.
- </summary>
- </member>
- <member name="P:log4net.Plugin.PluginSkeleton.Name">
- <summary>
- Gets or sets the name of the plugin.
- </summary>
- <value>
- The name of the plugin.
- </value>
- <remarks>
- <para>
- Plugins are stored in the <see cref="T:log4net.Plugin.PluginMap"/>
- keyed by name. Each plugin instance attached to a
- repository must be a unique name.
- </para>
- <para>
- The name of the plugin must not change one the
- plugin has been attached to a repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Plugin.PluginSkeleton.LoggerRepository">
- <summary>
- The repository for this plugin
- </summary>
- <value>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that this plugin is attached to.
- </value>
- <remarks>
- <para>
- Gets or sets the <see cref="T:log4net.Repository.ILoggerRepository"/> that this plugin is
- attached to.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Plugin.RemoteLoggingServerPlugin">
- <summary>
- Plugin that listens for events from the <see cref="T:log4net.Appender.RemotingAppender"/>
- </summary>
- <remarks>
- <para>
- This plugin publishes an instance of <see cref="T:log4net.Appender.RemotingAppender.IRemoteLoggingSink"/>
- on a specified <see cref="P:log4net.Plugin.RemoteLoggingServerPlugin.SinkUri"/>. This listens for logging events delivered from
- a remote <see cref="T:log4net.Appender.RemotingAppender"/>.
- </para>
- <para>
- When an event is received it is relogged within the attached repository
- as if it had been raised locally.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Plugin.RemoteLoggingServerPlugin"/> class.
- </para>
- <para>
- The <see cref="P:log4net.Plugin.RemoteLoggingServerPlugin.SinkUri"/> property must be set.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.#ctor(System.String)">
- <summary>
- Construct with sink Uri.
- </summary>
- <param name="sinkUri">The name to publish the sink under in the remoting infrastructure.
- See <see cref="P:log4net.Plugin.RemoteLoggingServerPlugin.SinkUri"/> for more details.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Plugin.RemoteLoggingServerPlugin"/> class
- with specified name.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.Attach(log4net.Repository.ILoggerRepository)">
- <summary>
- Attaches this plugin to a <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </summary>
- <param name="repository">The <see cref="T:log4net.Repository.ILoggerRepository"/> that this plugin should be attached to.</param>
- <remarks>
- <para>
- A plugin may only be attached to a single repository.
- </para>
- <para>
- This method is called when the plugin is attached to the repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.Shutdown">
- <summary>
- Is called when the plugin is to shutdown.
- </summary>
- <remarks>
- <para>
- When the plugin is shutdown the remote logging
- sink is disconnected.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Plugin.RemoteLoggingServerPlugin.SinkUri">
- <summary>
- Gets or sets the URI of this sink.
- </summary>
- <value>
- The URI of this sink.
- </value>
- <remarks>
- <para>
- This is the name under which the object is marshaled.
- <see cref="M:System.Runtime.Remoting.RemotingServices.Marshal(System.MarshalByRefObject,System.String,System.Type)"/>
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Plugin.RemoteLoggingServerPlugin.RemoteLoggingSinkImpl">
- <summary>
- Delivers <see cref="T:log4net.Core.LoggingEvent"/> objects to a remote sink.
- </summary>
- <remarks>
- <para>
- Internal class used to listen for logging events
- and deliver them to the local repository.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.RemoteLoggingSinkImpl.#ctor(log4net.Repository.ILoggerRepository)">
- <summary>
- Constructor
- </summary>
- <param name="repository">The repository to log to.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Plugin.RemoteLoggingServerPlugin.RemoteLoggingSinkImpl"/> for the
- specified <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.RemoteLoggingSinkImpl.LogEvents(log4net.Core.LoggingEvent[])">
- <summary>
- Logs the events to the repository.
- </summary>
- <param name="events">The events to log.</param>
- <remarks>
- <para>
- The events passed are logged to the <see cref="T:log4net.Repository.ILoggerRepository"/>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Plugin.RemoteLoggingServerPlugin.RemoteLoggingSinkImpl.InitializeLifetimeService">
- <summary>
- Obtains a lifetime service object to control the lifetime
- policy for this instance.
- </summary>
- <returns><c>null</c> to indicate that this instance should live forever.</returns>
- <remarks>
- <para>
- Obtains a lifetime service object to control the lifetime
- policy for this instance. This object should live forever
- therefore this implementation returns <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Plugin.RemoteLoggingServerPlugin.RemoteLoggingSinkImpl.m_repository">
- <summary>
- The underlying <see cref="T:log4net.Repository.ILoggerRepository"/> that events should
- be logged to.
- </summary>
- </member>
- <member name="T:log4net.Repository.Hierarchy.DefaultLoggerFactory">
- <summary>
- Default implementation of <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/>
- </summary>
- <remarks>
- <para>
- This default implementation of the <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/>
- interface is used to create the default subclass
- of the <see cref="T:log4net.Repository.Hierarchy.Logger"/> object.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Repository.Hierarchy.ILoggerFactory">
- <summary>
- Interface abstracts creation of <see cref="T:log4net.Repository.Hierarchy.Logger"/> instances
- </summary>
- <remarks>
- <para>
- This interface is used by the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> to
- create new <see cref="T:log4net.Repository.Hierarchy.Logger"/> objects.
- </para>
- <para>
- The <see cref="M:log4net.Repository.Hierarchy.ILoggerFactory.CreateLogger(System.String)"/> method is called
- to create a named <see cref="T:log4net.Repository.Hierarchy.Logger"/>.
- </para>
- <para>
- Implement this interface to create new subclasses of <see cref="T:log4net.Repository.Hierarchy.Logger"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.Hierarchy.ILoggerFactory.CreateLogger(System.String)">
- <summary>
- Create a new <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance
- </summary>
- <param name="name">The name of the <see cref="T:log4net.Repository.Hierarchy.Logger"/>.</param>
- <returns>The <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance for the specified name.</returns>
- <remarks>
- <para>
- Create a new <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance with the
- specified name.
- </para>
- <para>
- Called by the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> to create
- new named <see cref="T:log4net.Repository.Hierarchy.Logger"/> instances.
- </para>
- <para>
- If the <paramref name="name"/> is <c>null</c> then the root logger
- must be returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.DefaultLoggerFactory.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.DefaultLoggerFactory"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.DefaultLoggerFactory.CreateLogger(System.String)">
- <summary>
- Create a new <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance
- </summary>
- <param name="name">The name of the <see cref="T:log4net.Repository.Hierarchy.Logger"/>.</param>
- <returns>The <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance for the specified name.</returns>
- <remarks>
- <para>
- Create a new <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance with the
- specified name.
- </para>
- <para>
- Called by the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> to create
- new named <see cref="T:log4net.Repository.Hierarchy.Logger"/> instances.
- </para>
- <para>
- If the <paramref name="name"/> is <c>null</c> then the root logger
- must be returned.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.DefaultLoggerFactory.LoggerImpl">
- <summary>
- Default internal subclass of <see cref="T:log4net.Repository.Hierarchy.Logger"/>
- </summary>
- <remarks>
- <para>
- This subclass has no additional behavior over the
- <see cref="T:log4net.Repository.Hierarchy.Logger"/> class but does allow instances
- to be created.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.Logger">
- <summary>
- Implementation of <see cref="T:log4net.Core.ILogger"/> used by <see cref="P:log4net.Repository.Hierarchy.Logger.Hierarchy"/>
- </summary>
- <remarks>
- <para>
- Internal class used to provide implementation of <see cref="T:log4net.Core.ILogger"/>
- interface. Applications should use <see cref="T:log4net.LogManager"/> to get
- logger instances.
- </para>
- <para>
- This is one of the central classes in the log4net implementation. One of the
- distinctive features of log4net are hierarchical loggers and their
- evaluation. The <see cref="P:log4net.Repository.Hierarchy.Logger.Hierarchy"/> organizes the <see cref="T:log4net.Repository.Hierarchy.Logger"/>
- instances into a rooted tree hierarchy.
- </para>
- <para>
- The <see cref="T:log4net.Repository.Hierarchy.Logger"/> class is abstract. Only concrete subclasses of
- <see cref="T:log4net.Repository.Hierarchy.Logger"/> can be created. The <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/>
- is used to create instances of this type for the <see cref="P:log4net.Repository.Hierarchy.Logger.Hierarchy"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Aspi Havewala</author>
- <author>Douglas de la Torre</author>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.#ctor(System.String)">
- <summary>
- This constructor created a new <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance and
- sets its name.
- </summary>
- <param name="name">The name of the <see cref="T:log4net.Repository.Hierarchy.Logger"/>.</param>
- <remarks>
- <para>
- This constructor is protected and designed to be used by
- a subclass that is not abstract.
- </para>
- <para>
- Loggers are constructed by <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/>
- objects. See <see cref="T:log4net.Repository.Hierarchy.DefaultLoggerFactory"/> for the default
- logger creator.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.AddAppender(log4net.Appender.IAppender)">
- <summary>
- Add <paramref name="newAppender"/> to the list of appenders of this
- Logger instance.
- </summary>
- <param name="newAppender">An appender to add to this logger</param>
- <remarks>
- <para>
- Add <paramref name="newAppender"/> to the list of appenders of this
- Logger instance.
- </para>
- <para>
- If <paramref name="newAppender"/> is already in the list of
- appenders, then it won't be added again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.GetAppender(System.String)">
- <summary>
- Look for the appender named as <c>name</c>
- </summary>
- <param name="name">The name of the appender to lookup</param>
- <returns>The appender with the name specified, or <c>null</c>.</returns>
- <remarks>
- <para>
- Returns the named appender, or null if the appender is not found.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.RemoveAllAppenders">
- <summary>
- Remove all previously added appenders from this Logger instance.
- </summary>
- <remarks>
- <para>
- Remove all previously added appenders from this Logger instance.
- </para>
- <para>
- This is useful when re-reading configuration information.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.RemoveAppender(log4net.Appender.IAppender)">
- <summary>
- Remove the appender passed as parameter form the list of appenders.
- </summary>
- <param name="appender">The appender to remove</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- <para>
- Remove the appender passed as parameter form the list of appenders.
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.RemoveAppender(System.String)">
- <summary>
- Remove the appender passed as parameter form the list of appenders.
- </summary>
- <param name="name">The name of the appender to remove</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- <para>
- Remove the named appender passed as parameter form the list of appenders.
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.Log(System.Type,log4net.Core.Level,System.Object,System.Exception)">
- <summary>
- This generic form is intended to be used by wrappers.
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <param name="level">The level of the message to be logged.</param>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Generate a logging event for the specified <paramref name="level"/> using
- the <paramref name="message"/> and <paramref name="exception"/>.
- </para>
- <para>
- This method must not throw any exception to the caller.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.Log(log4net.Core.LoggingEvent)">
- <summary>
- This is the most generic printing method that is intended to be used
- by wrappers.
- </summary>
- <param name="logEvent">The event being logged.</param>
- <remarks>
- <para>
- Logs the specified logging event through this logger.
- </para>
- <para>
- This method must not throw any exception to the caller.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.IsEnabledFor(log4net.Core.Level)">
- <summary>
- Checks if this logger is enabled for a given <see cref="P:log4net.Repository.Hierarchy.Logger.Level"/> passed as parameter.
- </summary>
- <param name="level">The level to check.</param>
- <returns>
- <c>true</c> if this logger is enabled for <c>level</c>, otherwise <c>false</c>.
- </returns>
- <remarks>
- <para>
- Test if this logger is going to log events of the specified <paramref name="level"/>.
- </para>
- <para>
- This method must not throw any exception to the caller.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.CallAppenders(log4net.Core.LoggingEvent)">
- <summary>
- Deliver the <see cref="T:log4net.Core.LoggingEvent"/> to the attached appenders.
- </summary>
- <param name="loggingEvent">The event to log.</param>
- <remarks>
- <para>
- Call the appenders in the hierarchy starting at
- <c>this</c>. If no appenders could be found, emit a
- warning.
- </para>
- <para>
- This method calls all the appenders inherited from the
- hierarchy circumventing any evaluation of whether to log or not
- to log the particular log request.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.CloseNestedAppenders">
- <summary>
- Closes all attached appenders implementing the <see cref="T:log4net.Core.IAppenderAttachable"/> interface.
- </summary>
- <remarks>
- <para>
- Used to ensure that the appenders are correctly shutdown.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.Log(log4net.Core.Level,System.Object,System.Exception)">
- <summary>
- This is the most generic printing method. This generic form is intended to be used by wrappers
- </summary>
- <param name="level">The level of the message to be logged.</param>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Generate a logging event for the specified <paramref name="level"/> using
- the <paramref name="message"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.ForcedLog(System.Type,log4net.Core.Level,System.Object,System.Exception)">
- <summary>
- Creates a new logging event and logs the event without further checks.
- </summary>
- <param name="callerStackBoundaryDeclaringType">The declaring type of the method that is
- the stack boundary into the logging system for this call.</param>
- <param name="level">The level of the message to be logged.</param>
- <param name="message">The message object to log.</param>
- <param name="exception">The exception to log, including its stack trace.</param>
- <remarks>
- <para>
- Generates a logging event and delivers it to the attached
- appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Logger.ForcedLog(log4net.Core.LoggingEvent)">
- <summary>
- Creates a new logging event and logs the event without further checks.
- </summary>
- <param name="logEvent">The event being logged.</param>
- <remarks>
- <para>
- Delivers the logging event to the attached appenders.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.ThisDeclaringType">
- <summary>
- The fully qualified type of the Logger class.
- </summary>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_name">
- <summary>
- The name of this logger.
- </summary>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_level">
- <summary>
- The assigned level of this logger.
- </summary>
- <remarks>
- <para>
- The <c>level</c> variable need not be
- assigned a value in which case it is inherited
- form the hierarchy.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_parent">
- <summary>
- The parent of this logger.
- </summary>
- <remarks>
- <para>
- The parent of this logger.
- All loggers have at least one ancestor which is the root logger.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_hierarchy">
- <summary>
- Loggers need to know what Hierarchy they are in.
- </summary>
- <remarks>
- <para>
- Loggers need to know what Hierarchy they are in.
- The hierarchy that this logger is a member of is stored
- here.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_appenderAttachedImpl">
- <summary>
- Helper implementation of the <see cref="T:log4net.Core.IAppenderAttachable"/> interface
- </summary>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_additive">
- <summary>
- Flag indicating if child loggers inherit their parents appenders
- </summary>
- <remarks>
- <para>
- Additivity is set to true by default, that is children inherit
- the appenders of their ancestors by default. If this variable is
- set to <c>false</c> then the appenders found in the
- ancestors of this logger are not used. However, the children
- of this logger will inherit its appenders, unless the children
- have their additivity flag set to <c>false</c> too. See
- the user manual for more details.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.Logger.m_appenderLock">
- <summary>
- Lock to protect AppenderAttachedImpl variable m_appenderAttachedImpl
- </summary>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Parent">
- <summary>
- Gets or sets the parent logger in the hierarchy.
- </summary>
- <value>
- The parent logger in the hierarchy.
- </value>
- <remarks>
- <para>
- Part of the Composite pattern that makes the hierarchy.
- The hierarchy is parent linked rather than child linked.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Additivity">
- <summary>
- Gets or sets a value indicating if child loggers inherit their parent's appenders.
- </summary>
- <value>
- <c>true</c> if child loggers inherit their parent's appenders.
- </value>
- <remarks>
- <para>
- Additivity is set to <c>true</c> by default, that is children inherit
- the appenders of their ancestors by default. If this variable is
- set to <c>false</c> then the appenders found in the
- ancestors of this logger are not used. However, the children
- of this logger will inherit its appenders, unless the children
- have their additivity flag set to <c>false</c> too. See
- the user manual for more details.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.EffectiveLevel">
- <summary>
- Gets the effective level for this logger.
- </summary>
- <returns>The nearest level in the logger hierarchy.</returns>
- <remarks>
- <para>
- Starting from this logger, searches the logger hierarchy for a
- non-null level and returns it. Otherwise, returns the level of the
- root logger.
- </para>
- <para>The Logger class is designed so that this method executes as
- quickly as possible.</para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Hierarchy">
- <summary>
- Gets or sets the <see cref="P:log4net.Repository.Hierarchy.Logger.Hierarchy"/> where this
- <c>Logger</c> instance is attached to.
- </summary>
- <value>The hierarchy that this logger belongs to.</value>
- <remarks>
- <para>
- This logger must be attached to a single <see cref="P:log4net.Repository.Hierarchy.Logger.Hierarchy"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Level">
- <summary>
- Gets or sets the assigned <see cref="P:log4net.Repository.Hierarchy.Logger.Level"/>, if any, for this Logger.
- </summary>
- <value>
- The <see cref="P:log4net.Repository.Hierarchy.Logger.Level"/> of this logger.
- </value>
- <remarks>
- <para>
- The assigned <see cref="P:log4net.Repository.Hierarchy.Logger.Level"/> can be <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Appenders">
- <summary>
- Get the appenders contained in this logger as an
- <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <returns>A collection of the appenders in this logger</returns>
- <remarks>
- <para>
- Get the appenders contained in this logger as an
- <see cref="T:System.Collections.ICollection"/>. If no appenders
- can be found, then a <see cref="T:log4net.Util.EmptyCollection"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Name">
- <summary>
- Gets the logger name.
- </summary>
- <value>
- The name of the logger.
- </value>
- <remarks>
- <para>
- The name of this logger
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Logger.Repository">
- <summary>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> where this
- <c>Logger</c> instance is attached to.
- </summary>
- <value>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> that this logger belongs to.
- </value>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> where this
- <c>Logger</c> instance is attached to.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.DefaultLoggerFactory.LoggerImpl.#ctor(System.String)">
- <summary>
- Construct a new Logger
- </summary>
- <param name="name">the name of the logger</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.DefaultLoggerFactory.LoggerImpl"/> class
- with the specified name.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.LoggerCreationEventHandler">
- <summary>
- Delegate used to handle logger creation event notifications.
- </summary>
- <param name="sender">The <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> in which the <see cref="T:log4net.Repository.Hierarchy.Logger"/> has been created.</param>
- <param name="e">The <see cref="T:log4net.Repository.Hierarchy.LoggerCreationEventArgs"/> event args that hold the <see cref="T:log4net.Repository.Hierarchy.Logger"/> instance that has been created.</param>
- <remarks>
- <para>
- Delegate used to handle logger creation event notifications.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.LoggerCreationEventArgs">
- <summary>
- Provides data for the <see cref="E:log4net.Repository.Hierarchy.Hierarchy.LoggerCreatedEvent"/> event.
- </summary>
- <remarks>
- <para>
- A <see cref="E:log4net.Repository.Hierarchy.Hierarchy.LoggerCreatedEvent"/> event is raised every time a
- <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/> is created.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.LoggerCreationEventArgs.m_log">
- <summary>
- The <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/> created
- </summary>
- </member>
- <member name="M:log4net.Repository.Hierarchy.LoggerCreationEventArgs.#ctor(log4net.Repository.Hierarchy.Logger)">
- <summary>
- Constructor
- </summary>
- <param name="log">The <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/> that has been created.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.LoggerCreationEventArgs"/> event argument
- class,with the specified <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger">
- <summary>
- Gets the <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/> that has been created.
- </summary>
- <value>
- The <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/> that has been created.
- </value>
- <remarks>
- <para>
- The <see cref="P:log4net.Repository.Hierarchy.LoggerCreationEventArgs.Logger"/> that has been created.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.Hierarchy">
- <summary>
- Hierarchical organization of loggers
- </summary>
- <remarks>
- <para>
- <i>The casual user should not have to deal with this class
- directly.</i>
- </para>
- <para>
- This class is specialized in retrieving loggers by name and
- also maintaining the logger hierarchy. Implements the
- <see cref="T:log4net.Repository.ILoggerRepository"/> interface.
- </para>
- <para>
- The structure of the logger hierarchy is maintained by the
- <see cref="M:log4net.Repository.Hierarchy.Hierarchy.GetLogger(System.String)"/> method. The hierarchy is such that children
- link to their parent but parents do not have any references to their
- children. Moreover, loggers can be instantiated in any order, in
- particular descendant before ancestor.
- </para>
- <para>
- In case a descendant is created before a particular ancestor,
- then it creates a provision node for the ancestor and adds itself
- to the provision node. Other descendants of the same ancestor add
- themselves to the previously created provision node.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Repository.LoggerRepositorySkeleton">
- <summary>
- Base implementation of <see cref="T:log4net.Repository.ILoggerRepository"/>
- </summary>
- <remarks>
- <para>
- Default abstract implementation of the <see cref="T:log4net.Repository.ILoggerRepository"/> interface.
- </para>
- <para>
- Skeleton implementation of the <see cref="T:log4net.Repository.ILoggerRepository"/> interface.
- All <see cref="T:log4net.Repository.ILoggerRepository"/> types can extend this type.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Repository.ILoggerRepository">
- <summary>
- Interface implemented by logger repositories.
- </summary>
- <remarks>
- <para>
- This interface is implemented by logger repositories. e.g.
- <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>.
- </para>
- <para>
- This interface is used by the <see cref="T:log4net.LogManager"/>
- to obtain <see cref="T:log4net.ILog"/> interfaces.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.Exists(System.String)">
- <summary>
- Check if the named logger exists in the repository. If so return
- its reference, otherwise returns <c>null</c>.
- </summary>
- <param name="name">The name of the logger to lookup</param>
- <returns>The Logger object with the name specified</returns>
- <remarks>
- <para>
- If the names logger exists it is returned, otherwise
- <c>null</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.GetCurrentLoggers">
- <summary>
- Returns all the currently defined loggers as an Array.
- </summary>
- <returns>All the defined loggers</returns>
- <remarks>
- <para>
- Returns all the currently defined loggers as an Array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.GetLogger(System.String)">
- <summary>
- Returns a named logger instance
- </summary>
- <param name="name">The name of the logger to retrieve</param>
- <returns>The logger object with the name specified</returns>
- <remarks>
- <para>
- Returns a named logger instance.
- </para>
- <para>
- If a logger of that name already exists, then it will be
- returned. Otherwise, a new logger will be instantiated and
- then linked with its existing ancestors as well as children.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.Shutdown">
- <summary>Shutdown the repository</summary>
- <remarks>
- <para>
- Shutting down a repository will <i>safely</i> close and remove
- all appenders in all loggers including the root logger.
- </para>
- <para>
- Some appenders need to be closed before the
- application exists. Otherwise, pending logging events might be
- lost.
- </para>
- <para>
- The <see cref="M:log4net.Repository.ILoggerRepository.Shutdown"/> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.ResetConfiguration">
- <summary>
- Reset the repositories configuration to a default state
- </summary>
- <remarks>
- <para>
- Reset all values contained in this instance to their
- default state.
- </para>
- <para>
- Existing loggers are not removed. They are just reset.
- </para>
- <para>
- This method should be used sparingly and with care as it will
- block all logging until it is completed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.Log(log4net.Core.LoggingEvent)">
- <summary>
- Log the <see cref="T:log4net.Core.LoggingEvent"/> through this repository.
- </summary>
- <param name="logEvent">the event to log</param>
- <remarks>
- <para>
- This method should not normally be used to log.
- The <see cref="T:log4net.ILog"/> interface should be used
- for routine logging. This interface can be obtained
- using the <see cref="M:log4net.LogManager.GetLogger(System.String)"/> method.
- </para>
- <para>
- The <c>logEvent</c> is delivered to the appropriate logger and
- that logger is then responsible for logging the event.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.ILoggerRepository.GetAppenders">
- <summary>
- Returns all the Appenders that are configured as an Array.
- </summary>
- <returns>All the Appenders</returns>
- <remarks>
- <para>
- Returns all the Appenders that are configured as an Array.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.Name">
- <summary>
- The name of the repository
- </summary>
- <value>
- The name of the repository
- </value>
- <remarks>
- <para>
- The name of the repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.RendererMap">
- <summary>
- RendererMap accesses the object renderer map for this repository.
- </summary>
- <value>
- RendererMap accesses the object renderer map for this repository.
- </value>
- <remarks>
- <para>
- RendererMap accesses the object renderer map for this repository.
- </para>
- <para>
- The RendererMap holds a mapping between types and
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/> objects.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.PluginMap">
- <summary>
- The plugin map for this repository.
- </summary>
- <value>
- The plugin map for this repository.
- </value>
- <remarks>
- <para>
- The plugin map holds the <see cref="T:log4net.Plugin.IPlugin"/> instances
- that have been attached to this repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.LevelMap">
- <summary>
- Get the level map for the Repository.
- </summary>
- <remarks>
- <para>
- Get the level map for the Repository.
- </para>
- <para>
- The level map defines the mappings between
- level names and <see cref="T:log4net.Core.Level"/> objects in
- this repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.Threshold">
- <summary>
- The threshold for all events in this repository
- </summary>
- <value>
- The threshold for all events in this repository
- </value>
- <remarks>
- <para>
- The threshold for all events in this repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.Configured">
- <summary>
- Flag indicates if this repository has been configured.
- </summary>
- <value>
- Flag indicates if this repository has been configured.
- </value>
- <remarks>
- <para>
- Flag indicates if this repository has been configured.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.ILoggerRepository.ShutdownEvent">
- <summary>
- Event to notify that the repository has been shutdown.
- </summary>
- <value>
- Event to notify that the repository has been shutdown.
- </value>
- <remarks>
- <para>
- Event raised when the repository has been shutdown.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.ILoggerRepository.ConfigurationReset">
- <summary>
- Event to notify that the repository has had its configuration reset.
- </summary>
- <value>
- Event to notify that the repository has had its configuration reset.
- </value>
- <remarks>
- <para>
- Event raised when the repository's configuration has been
- reset to default.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.ILoggerRepository.ConfigurationChanged">
- <summary>
- Event to notify that the repository has had its configuration changed.
- </summary>
- <value>
- Event to notify that the repository has had its configuration changed.
- </value>
- <remarks>
- <para>
- Event raised when the repository's configuration has been changed.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.ILoggerRepository.Properties">
- <summary>
- Repository specific properties
- </summary>
- <value>
- Repository specific properties
- </value>
- <remarks>
- <para>
- These properties can be specified on a repository specific basis.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.#ctor">
- <summary>
- Default Constructor
- </summary>
- <remarks>
- <para>
- Initializes the repository with default (empty) properties.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.#ctor(log4net.Util.PropertiesDictionary)">
- <summary>
- Construct the repository using specific properties
- </summary>
- <param name="properties">the properties to set for this repository</param>
- <remarks>
- <para>
- Initializes the repository with specified properties.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.Exists(System.String)">
- <summary>
- Test if logger exists
- </summary>
- <param name="name">The name of the logger to lookup</param>
- <returns>The Logger object with the name specified</returns>
- <remarks>
- <para>
- Check if the named logger exists in the repository. If so return
- its reference, otherwise returns <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.GetCurrentLoggers">
- <summary>
- Returns all the currently defined loggers in the repository
- </summary>
- <returns>All the defined loggers</returns>
- <remarks>
- <para>
- Returns all the currently defined loggers in the repository as an Array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.GetLogger(System.String)">
- <summary>
- Return a new logger instance
- </summary>
- <param name="name">The name of the logger to retrieve</param>
- <returns>The logger object with the name specified</returns>
- <remarks>
- <para>
- Return a new logger instance.
- </para>
- <para>
- If a logger of that name already exists, then it will be
- returned. Otherwise, a new logger will be instantiated and
- then linked with its existing ancestors as well as children.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.Shutdown">
- <summary>
- Shutdown the repository
- </summary>
- <remarks>
- <para>
- Shutdown the repository. Can be overridden in a subclass.
- This base class implementation notifies the <see cref="E:log4net.Repository.LoggerRepositorySkeleton.ShutdownEvent"/>
- listeners and all attached plugins of the shutdown event.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.ResetConfiguration">
- <summary>
- Reset the repositories configuration to a default state
- </summary>
- <remarks>
- <para>
- Reset all values contained in this instance to their
- default state.
- </para>
- <para>
- Existing loggers are not removed. They are just reset.
- </para>
- <para>
- This method should be used sparingly and with care as it will
- block all logging until it is completed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.Log(log4net.Core.LoggingEvent)">
- <summary>
- Log the logEvent through this repository.
- </summary>
- <param name="logEvent">the event to log</param>
- <remarks>
- <para>
- This method should not normally be used to log.
- The <see cref="T:log4net.ILog"/> interface should be used
- for routine logging. This interface can be obtained
- using the <see cref="M:log4net.LogManager.GetLogger(System.String)"/> method.
- </para>
- <para>
- The <c>logEvent</c> is delivered to the appropriate logger and
- that logger is then responsible for logging the event.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.GetAppenders">
- <summary>
- Returns all the Appenders that are configured as an Array.
- </summary>
- <returns>All the Appenders</returns>
- <remarks>
- <para>
- Returns all the Appenders that are configured as an Array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.AddRenderer(System.Type,log4net.ObjectRenderer.IObjectRenderer)">
- <summary>
- Adds an object renderer for a specific class.
- </summary>
- <param name="typeToRender">The type that will be rendered by the renderer supplied.</param>
- <param name="rendererInstance">The object renderer used to render the object.</param>
- <remarks>
- <para>
- Adds an object renderer for a specific class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.OnShutdown(System.EventArgs)">
- <summary>
- Notify the registered listeners that the repository is shutting down
- </summary>
- <param name="e">Empty EventArgs</param>
- <remarks>
- <para>
- Notify any listeners that this repository is shutting down.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.OnConfigurationReset(System.EventArgs)">
- <summary>
- Notify the registered listeners that the repository has had its configuration reset
- </summary>
- <param name="e">Empty EventArgs</param>
- <remarks>
- <para>
- Notify any listeners that this repository's configuration has been reset.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.OnConfigurationChanged(System.EventArgs)">
- <summary>
- Notify the registered listeners that the repository has had its configuration changed
- </summary>
- <param name="e">Empty EventArgs</param>
- <remarks>
- <para>
- Notify any listeners that this repository's configuration has changed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.LoggerRepositorySkeleton.RaiseConfigurationChanged(System.EventArgs)">
- <summary>
- Raise a configuration changed event on this repository
- </summary>
- <param name="e">EventArgs.Empty</param>
- <remarks>
- <para>
- Applications that programmatically change the configuration of the repository should
- raise this event notification to notify listeners.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.Name">
- <summary>
- The name of the repository
- </summary>
- <value>
- The string name of the repository
- </value>
- <remarks>
- <para>
- The name of this repository. The name is
- used to store and lookup the repositories
- stored by the <see cref="T:log4net.Core.IRepositorySelector"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.Threshold">
- <summary>
- The threshold for all events in this repository
- </summary>
- <value>
- The threshold for all events in this repository
- </value>
- <remarks>
- <para>
- The threshold for all events in this repository
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.RendererMap">
- <summary>
- RendererMap accesses the object renderer map for this repository.
- </summary>
- <value>
- RendererMap accesses the object renderer map for this repository.
- </value>
- <remarks>
- <para>
- RendererMap accesses the object renderer map for this repository.
- </para>
- <para>
- The RendererMap holds a mapping between types and
- <see cref="T:log4net.ObjectRenderer.IObjectRenderer"/> objects.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.PluginMap">
- <summary>
- The plugin map for this repository.
- </summary>
- <value>
- The plugin map for this repository.
- </value>
- <remarks>
- <para>
- The plugin map holds the <see cref="T:log4net.Plugin.IPlugin"/> instances
- that have been attached to this repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.LevelMap">
- <summary>
- Get the level map for the Repository.
- </summary>
- <remarks>
- <para>
- Get the level map for the Repository.
- </para>
- <para>
- The level map defines the mappings between
- level names and <see cref="T:log4net.Core.Level"/> objects in
- this repository.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.Configured">
- <summary>
- Flag indicates if this repository has been configured.
- </summary>
- <value>
- Flag indicates if this repository has been configured.
- </value>
- <remarks>
- <para>
- Flag indicates if this repository has been configured.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.LoggerRepositorySkeleton.ShutdownEvent">
- <summary>
- Event to notify that the repository has been shutdown.
- </summary>
- <value>
- Event to notify that the repository has been shutdown.
- </value>
- <remarks>
- <para>
- Event raised when the repository has been shutdown.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.LoggerRepositorySkeleton.ConfigurationReset">
- <summary>
- Event to notify that the repository has had its configuration reset.
- </summary>
- <value>
- Event to notify that the repository has had its configuration reset.
- </value>
- <remarks>
- <para>
- Event raised when the repository's configuration has been
- reset to default.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.LoggerRepositorySkeleton.ConfigurationChanged">
- <summary>
- Event to notify that the repository has had its configuration changed.
- </summary>
- <value>
- Event to notify that the repository has had its configuration changed.
- </value>
- <remarks>
- <para>
- Event raised when the repository's configuration has been changed.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.LoggerRepositorySkeleton.Properties">
- <summary>
- Repository specific properties
- </summary>
- <value>
- Repository specific properties
- </value>
- <remarks>
- These properties can be specified on a repository specific basis
- </remarks>
- </member>
- <member name="T:log4net.Repository.IBasicRepositoryConfigurator">
- <summary>
- Basic Configurator interface for repositories
- </summary>
- <remarks>
- <para>
- Interface used by basic configurator to configure a <see cref="T:log4net.Repository.ILoggerRepository"/>
- with a default <see cref="T:log4net.Appender.IAppender"/>.
- </para>
- <para>
- A <see cref="T:log4net.Repository.ILoggerRepository"/> should implement this interface to support
- configuration by the <see cref="T:log4net.Config.BasicConfigurator"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.IBasicRepositoryConfigurator.Configure(log4net.Appender.IAppender)">
- <summary>
- Initialize the repository using the specified appender
- </summary>
- <param name="appender">the appender to use to log all logging events</param>
- <remarks>
- <para>
- Configure the repository to route all logging events to the
- specified appender.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.IXmlRepositoryConfigurator">
- <summary>
- Configure repository using XML
- </summary>
- <remarks>
- <para>
- Interface used by Xml configurator to configure a <see cref="T:log4net.Repository.ILoggerRepository"/>.
- </para>
- <para>
- A <see cref="T:log4net.Repository.ILoggerRepository"/> should implement this interface to support
- configuration by the <see cref="T:log4net.Config.XmlConfigurator"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.IXmlRepositoryConfigurator.Configure(System.Xml.XmlElement)">
- <summary>
- Initialize the repository using the specified config
- </summary>
- <param name="element">the element containing the root of the config</param>
- <remarks>
- <para>
- The schema for the XML configuration data is defined by
- the implementation.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.#ctor(log4net.Util.PropertiesDictionary)">
- <summary>
- Construct with properties
- </summary>
- <param name="properties">The properties to pass to this repository.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.#ctor(log4net.Repository.Hierarchy.ILoggerFactory)">
- <summary>
- Construct with a logger factory
- </summary>
- <param name="loggerFactory">The factory to use to create new logger instances.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> class with
- the specified <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.#ctor(log4net.Util.PropertiesDictionary,log4net.Repository.Hierarchy.ILoggerFactory)">
- <summary>
- Construct with properties and a logger factory
- </summary>
- <param name="properties">The properties to pass to this repository.</param>
- <param name="loggerFactory">The factory to use to create new logger instances.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> class with
- the specified <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.Exists(System.String)">
- <summary>
- Test if a logger exists
- </summary>
- <param name="name">The name of the logger to lookup</param>
- <returns>The Logger object with the name specified</returns>
- <remarks>
- <para>
- Check if the named logger exists in the hierarchy. If so return
- its reference, otherwise returns <c>null</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.GetCurrentLoggers">
- <summary>
- Returns all the currently defined loggers in the hierarchy as an Array
- </summary>
- <returns>All the defined loggers</returns>
- <remarks>
- <para>
- Returns all the currently defined loggers in the hierarchy as an Array.
- The root logger is <b>not</b> included in the returned
- enumeration.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.GetLogger(System.String)">
- <summary>
- Return a new logger instance named as the first parameter using
- the default factory.
- </summary>
- <remarks>
- <para>
- Return a new logger instance named as the first parameter using
- the default factory.
- </para>
- <para>
- If a logger of that name already exists, then it will be
- returned. Otherwise, a new logger will be instantiated and
- then linked with its existing ancestors as well as children.
- </para>
- </remarks>
- <param name="name">The name of the logger to retrieve</param>
- <returns>The logger object with the name specified</returns>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.Shutdown">
- <summary>
- Shutting down a hierarchy will <i>safely</i> close and remove
- all appenders in all loggers including the root logger.
- </summary>
- <remarks>
- <para>
- Shutting down a hierarchy will <i>safely</i> close and remove
- all appenders in all loggers including the root logger.
- </para>
- <para>
- Some appenders need to be closed before the
- application exists. Otherwise, pending logging events might be
- lost.
- </para>
- <para>
- The <c>Shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.ResetConfiguration">
- <summary>
- Reset all values contained in this hierarchy instance to their default.
- </summary>
- <remarks>
- <para>
- Reset all values contained in this hierarchy instance to their
- default. This removes all appenders from all loggers, sets
- the level of all non-root loggers to <c>null</c>,
- sets their additivity flag to <c>true</c> and sets the level
- of the root logger to <see cref="F:log4net.Core.Level.Debug"/>. Moreover,
- message disabling is set its default "off" value.
- </para>
- <para>
- Existing loggers are not removed. They are just reset.
- </para>
- <para>
- This method should be used sparingly and with care as it will
- block all logging until it is completed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.Log(log4net.Core.LoggingEvent)">
- <summary>
- Log the logEvent through this hierarchy.
- </summary>
- <param name="logEvent">the event to log</param>
- <remarks>
- <para>
- This method should not normally be used to log.
- The <see cref="T:log4net.ILog"/> interface should be used
- for routine logging. This interface can be obtained
- using the <see cref="M:log4net.LogManager.GetLogger(System.String)"/> method.
- </para>
- <para>
- The <c>logEvent</c> is delivered to the appropriate logger and
- that logger is then responsible for logging the event.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.GetAppenders">
- <summary>
- Returns all the Appenders that are currently configured
- </summary>
- <returns>An array containing all the currently configured appenders</returns>
- <remarks>
- <para>
- Returns all the <see cref="T:log4net.Appender.IAppender"/> instances that are currently configured.
- All the loggers are searched for appenders. The appenders may also be containers
- for appenders and these are also searched for additional loggers.
- </para>
- <para>
- The list returned is unordered but does not contain duplicates.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.CollectAppender(System.Collections.ArrayList,log4net.Appender.IAppender)">
- <summary>
- Collect the appenders from an <see cref="T:log4net.Core.IAppenderAttachable"/>.
- The appender may also be a container.
- </summary>
- <param name="appenderList"></param>
- <param name="appender"></param>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.CollectAppenders(System.Collections.ArrayList,log4net.Core.IAppenderAttachable)">
- <summary>
- Collect the appenders from an <see cref="T:log4net.Core.IAppenderAttachable"/> container
- </summary>
- <param name="appenderList"></param>
- <param name="container"></param>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.log4net#Repository#IBasicRepositoryConfigurator#Configure(log4net.Appender.IAppender)">
- <summary>
- Initialize the log4net system using the specified appender
- </summary>
- <param name="appender">the appender to use to log all logging events</param>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.BasicRepositoryConfigure(log4net.Appender.IAppender)">
- <summary>
- Initialize the log4net system using the specified appender
- </summary>
- <param name="appender">the appender to use to log all logging events</param>
- <remarks>
- <para>
- This method provides the same functionality as the
- <see cref="M:log4net.Repository.IBasicRepositoryConfigurator.Configure(log4net.Appender.IAppender)"/> method implemented
- on this object, but it is protected and therefore can be called by subclasses.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.log4net#Repository#IXmlRepositoryConfigurator#Configure(System.Xml.XmlElement)">
- <summary>
- Initialize the log4net system using the specified config
- </summary>
- <param name="element">the element containing the root of the config</param>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.XmlRepositoryConfigure(System.Xml.XmlElement)">
- <summary>
- Initialize the log4net system using the specified config
- </summary>
- <param name="element">the element containing the root of the config</param>
- <remarks>
- <para>
- This method provides the same functionality as the
- <see cref="M:log4net.Repository.IBasicRepositoryConfigurator.Configure(log4net.Appender.IAppender)"/> method implemented
- on this object, but it is protected and therefore can be called by subclasses.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.IsDisabled(log4net.Core.Level)">
- <summary>
- Test if this hierarchy is disabled for the specified <see cref="T:log4net.Core.Level"/>.
- </summary>
- <param name="level">The level to check against.</param>
- <returns>
- <c>true</c> if the repository is disabled for the level argument, <c>false</c> otherwise.
- </returns>
- <remarks>
- <para>
- If this hierarchy has not been configured then this method will
- always return <c>true</c>.
- </para>
- <para>
- This method will return <c>true</c> if this repository is
- disabled for <c>level</c> object passed as parameter and
- <c>false</c> otherwise.
- </para>
- <para>
- See also the <see cref="P:log4net.Repository.ILoggerRepository.Threshold"/> property.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.Clear">
- <summary>
- Clear all logger definitions from the internal hashtable
- </summary>
- <remarks>
- <para>
- This call will clear all logger definitions from the internal
- hashtable. Invoking this method will irrevocably mess up the
- logger hierarchy.
- </para>
- <para>
- You should <b>really</b> know what you are doing before
- invoking this method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.GetLogger(System.String,log4net.Repository.Hierarchy.ILoggerFactory)">
- <summary>
- Return a new logger instance named as the first parameter using
- <paramref name="factory"/>.
- </summary>
- <param name="name">The name of the logger to retrieve</param>
- <param name="factory">The factory that will make the new logger instance</param>
- <returns>The logger object with the name specified</returns>
- <remarks>
- <para>
- If a logger of that name already exists, then it will be
- returned. Otherwise, a new logger will be instantiated by the
- <paramref name="factory"/> parameter and linked with its existing
- ancestors as well as children.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.OnLoggerCreationEvent(log4net.Repository.Hierarchy.Logger)">
- <summary>
- Sends a logger creation event to all registered listeners
- </summary>
- <param name="logger">The newly created logger</param>
- <remarks>
- Raises the logger creation event.
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.UpdateParents(log4net.Repository.Hierarchy.Logger)">
- <summary>
- Updates all the parents of the specified logger
- </summary>
- <param name="log">The logger to update the parents for</param>
- <remarks>
- <para>
- This method loops through all the <i>potential</i> parents of
- <paramref name="log"/>. There 3 possible cases:
- </para>
- <list type="number">
- <item>
- <term>No entry for the potential parent of <paramref name="log"/> exists</term>
- <description>
- We create a ProvisionNode for this potential
- parent and insert <paramref name="log"/> in that provision node.
- </description>
- </item>
- <item>
- <term>The entry is of type Logger for the potential parent.</term>
- <description>
- The entry is <paramref name="log"/>'s nearest existing parent. We
- update <paramref name="log"/>'s parent field with this entry. We also break from
- he loop because updating our parent's parent is our parent's
- responsibility.
- </description>
- </item>
- <item>
- <term>The entry is of type ProvisionNode for this potential parent.</term>
- <description>
- We add <paramref name="log"/> to the list of children for this
- potential parent.
- </description>
- </item>
- </list>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.UpdateChildren(log4net.Repository.Hierarchy.ProvisionNode,log4net.Repository.Hierarchy.Logger)">
- <summary>
- Replace a <see cref="T:log4net.Repository.Hierarchy.ProvisionNode"/> with a <see cref="T:log4net.Repository.Hierarchy.Logger"/> in the hierarchy.
- </summary>
- <param name="pn"></param>
- <param name="log"></param>
- <remarks>
- <para>
- We update the links for all the children that placed themselves
- in the provision node 'pn'. The second argument 'log' is a
- reference for the newly created Logger, parent of all the
- children in 'pn'.
- </para>
- <para>
- We loop on all the children 'c' in 'pn'.
- </para>
- <para>
- If the child 'c' has been already linked to a child of
- 'log' then there is no need to update 'c'.
- </para>
- <para>
- Otherwise, we set log's parent field to c's parent and set
- c's parent field to log.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.AddLevel(log4net.Repository.Hierarchy.Hierarchy.LevelEntry)">
- <summary>
- Define or redefine a Level using the values in the <see cref="T:log4net.Repository.Hierarchy.Hierarchy.LevelEntry"/> argument
- </summary>
- <param name="levelEntry">the level values</param>
- <remarks>
- <para>
- Define or redefine a Level using the values in the <see cref="T:log4net.Repository.Hierarchy.Hierarchy.LevelEntry"/> argument
- </para>
- <para>
- Supports setting levels via the configuration file.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.AddProperty(log4net.Repository.Hierarchy.Hierarchy.PropertyEntry)">
- <summary>
- Set a Property using the values in the <see cref="T:log4net.Repository.Hierarchy.Hierarchy.LevelEntry"/> argument
- </summary>
- <param name="propertyEntry">the property value</param>
- <remarks>
- <para>
- Set a Property using the values in the <see cref="T:log4net.Repository.Hierarchy.Hierarchy.LevelEntry"/> argument.
- </para>
- <para>
- Supports setting property values via the configuration file.
- </para>
- </remarks>
- </member>
- <member name="E:log4net.Repository.Hierarchy.Hierarchy.LoggerCreatedEvent">
- <summary>
- Event used to notify that a logger has been created.
- </summary>
- <remarks>
- <para>
- Event raised when a logger is created.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.EmittedNoAppenderWarning">
- <summary>
- Has no appender warning been emitted
- </summary>
- <remarks>
- <para>
- Flag to indicate if we have already issued a warning
- about not having an appender warning.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.Root">
- <summary>
- Get the root of this hierarchy
- </summary>
- <remarks>
- <para>
- Get the root of this hierarchy.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.LoggerFactory">
- <summary>
- Gets or sets the default <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/> instance.
- </summary>
- <value>The default <see cref="T:log4net.Repository.Hierarchy.ILoggerFactory"/></value>
- <remarks>
- <para>
- The logger factory is used to create logger instances.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.Hierarchy.LevelEntry">
- <summary>
- A class to hold the value, name and display name for a level
- </summary>
- <remarks>
- <para>
- A class to hold the value, name and display name for a level
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.LevelEntry.ToString">
- <summary>
- Override <c>Object.ToString</c> to return sensible debug info
- </summary>
- <returns>string info about this object</returns>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.LevelEntry.Value">
- <summary>
- Value of the level
- </summary>
- <remarks>
- <para>
- If the value is not set (defaults to -1) the value will be looked
- up for the current level with the same name.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.LevelEntry.Name">
- <summary>
- Name of the level
- </summary>
- <value>
- The name of the level
- </value>
- <remarks>
- <para>
- The name of the level.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.LevelEntry.DisplayName">
- <summary>
- Display name for the level
- </summary>
- <value>
- The display name of the level
- </value>
- <remarks>
- <para>
- The display name of the level.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.Hierarchy.PropertyEntry">
- <summary>
- A class to hold the key and data for a property set in the config file
- </summary>
- <remarks>
- <para>
- A class to hold the key and data for a property set in the config file
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.Hierarchy.PropertyEntry.ToString">
- <summary>
- Override <c>Object.ToString</c> to return sensible debug info
- </summary>
- <returns>string info about this object</returns>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.PropertyEntry.Key">
- <summary>
- Property Key
- </summary>
- <value>
- Property Key
- </value>
- <remarks>
- <para>
- Property Key.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.Hierarchy.PropertyEntry.Value">
- <summary>
- Property Value
- </summary>
- <value>
- Property Value
- </value>
- <remarks>
- <para>
- Property Value.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.LoggerKey">
- <summary>
- Used internally to accelerate hash table searches.
- </summary>
- <remarks>
- <para>
- Internal class used to improve performance of
- string keyed hashtables.
- </para>
- <para>
- The hashcode of the string is cached for reuse.
- The string is stored as an interned value.
- When comparing two <see cref="T:log4net.Repository.Hierarchy.LoggerKey"/> objects for equality
- the reference equality of the interned strings is compared.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.Hierarchy.LoggerKey.#ctor(System.String)">
- <summary>
- Construct key with string name
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.LoggerKey"/> class
- with the specified name.
- </para>
- <para>
- Stores the hashcode of the string and interns
- the string key to optimize comparisons.
- </para>
- <note>
- The Compact Framework 1.0 the <see cref="M:System.String.Intern(System.String)"/>
- method does not work. On the Compact Framework
- the string keys are not interned nor are they
- compared by reference.
- </note>
- </remarks>
- <param name="name">The name of the logger.</param>
- </member>
- <member name="M:log4net.Repository.Hierarchy.LoggerKey.GetHashCode">
- <summary>
- Returns a hash code for the current instance.
- </summary>
- <returns>A hash code for the current instance.</returns>
- <remarks>
- <para>
- Returns the cached hashcode.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.LoggerKey.Equals(System.Object)">
- <summary>
- Determines whether two <see cref="T:log4net.Repository.Hierarchy.LoggerKey"/> instances
- are equal.
- </summary>
- <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:log4net.Repository.Hierarchy.LoggerKey"/>.</param>
- <returns>
- <c>true</c> if the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:log4net.Repository.Hierarchy.LoggerKey"/>; otherwise, <c>false</c>.
- </returns>
- <remarks>
- <para>
- Compares the references of the interned strings.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.ProvisionNode">
- <summary>
- Provision nodes are used where no logger instance has been specified
- </summary>
- <remarks>
- <para>
- <see cref="T:log4net.Repository.Hierarchy.ProvisionNode"/> instances are used in the
- <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> when there is no specified
- <see cref="T:log4net.Repository.Hierarchy.Logger"/> for that node.
- </para>
- <para>
- A provision node holds a list of child loggers on behalf of
- a logger that does not exist.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.Hierarchy.ProvisionNode.#ctor(log4net.Repository.Hierarchy.Logger)">
- <summary>
- Create a new provision node with child node
- </summary>
- <param name="log">A child logger to add to this node.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.ProvisionNode"/> class
- with the specified child logger.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.RootLogger">
- <summary>
- The <see cref="T:log4net.Repository.Hierarchy.RootLogger"/> sits at the root of the logger hierarchy tree.
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.Hierarchy.RootLogger"/> is a regular <see cref="T:log4net.Repository.Hierarchy.Logger"/> except
- that it provides several guarantees.
- </para>
- <para>
- First, it cannot be assigned a <c>null</c>
- level. Second, since the root logger cannot have a parent, the
- <see cref="P:log4net.Repository.Hierarchy.RootLogger.EffectiveLevel"/> property always returns the value of the
- level field without walking the hierarchy.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.Hierarchy.RootLogger.#ctor(log4net.Core.Level)">
- <summary>
- Construct a <see cref="T:log4net.Repository.Hierarchy.RootLogger"/>
- </summary>
- <param name="level">The level to assign to the root logger.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.RootLogger"/> class with
- the specified logging level.
- </para>
- <para>
- The root logger names itself as "root". However, the root
- logger cannot be retrieved by name.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.RootLogger.EffectiveLevel">
- <summary>
- Gets the assigned level value without walking the logger hierarchy.
- </summary>
- <value>The assigned level value without walking the logger hierarchy.</value>
- <remarks>
- <para>
- Because the root logger cannot have a parent and its level
- must not be <c>null</c> this property just returns the
- value of <see cref="P:log4net.Repository.Hierarchy.Logger.Level"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Repository.Hierarchy.RootLogger.Level">
- <summary>
- Gets or sets the assigned <see cref="P:log4net.Repository.Hierarchy.RootLogger.Level"/> for the root logger.
- </summary>
- <value>
- The <see cref="P:log4net.Repository.Hierarchy.RootLogger.Level"/> of the root logger.
- </value>
- <remarks>
- <para>
- Setting the level of the root logger to a <c>null</c> reference
- may have catastrophic results. We prevent this here.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.Hierarchy.XmlHierarchyConfigurator">
- <summary>
- Initializes the log4net environment using an XML DOM.
- </summary>
- <remarks>
- <para>
- Configures a <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> using an XML DOM.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.#ctor(log4net.Repository.Hierarchy.Hierarchy)">
- <summary>
- Construct the configurator for a hierarchy
- </summary>
- <param name="hierarchy">The hierarchy to build.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Repository.Hierarchy.XmlHierarchyConfigurator"/> class
- with the specified <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.Configure(System.Xml.XmlElement)">
- <summary>
- Configure the hierarchy by parsing a DOM tree of XML elements.
- </summary>
- <param name="element">The root element to parse.</param>
- <remarks>
- <para>
- Configure the hierarchy by parsing a DOM tree of XML elements.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.FindAppenderByReference(System.Xml.XmlElement)">
- <summary>
- Parse appenders by IDREF.
- </summary>
- <param name="appenderRef">The appender ref element.</param>
- <returns>The instance of the appender that the ref refers to.</returns>
- <remarks>
- <para>
- Parse an XML element that represents an appender and return
- the appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(System.Xml.XmlElement)">
- <summary>
- Parses an appender element.
- </summary>
- <param name="appenderElement">The appender element.</param>
- <returns>The appender instance or <c>null</c> when parsing failed.</returns>
- <remarks>
- <para>
- Parse an XML element that represents an appender and return
- the appender instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseLogger(System.Xml.XmlElement)">
- <summary>
- Parses a logger element.
- </summary>
- <param name="loggerElement">The logger element.</param>
- <remarks>
- <para>
- Parse an XML element that represents a logger.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseRoot(System.Xml.XmlElement)">
- <summary>
- Parses the root logger element.
- </summary>
- <param name="rootElement">The root element.</param>
- <remarks>
- <para>
- Parse an XML element that represents the root logger.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseChildrenOfLoggerElement(System.Xml.XmlElement,log4net.Repository.Hierarchy.Logger,System.Boolean)">
- <summary>
- Parses the children of a logger element.
- </summary>
- <param name="catElement">The category element.</param>
- <param name="log">The logger instance.</param>
- <param name="isRoot">Flag to indicate if the logger is the root logger.</param>
- <remarks>
- <para>
- Parse the child elements of a &lt;logger&gt; element.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseRenderer(System.Xml.XmlElement)">
- <summary>
- Parses an object renderer.
- </summary>
- <param name="element">The renderer element.</param>
- <remarks>
- <para>
- Parse an XML element that represents a renderer.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseLevel(System.Xml.XmlElement,log4net.Repository.Hierarchy.Logger,System.Boolean)">
- <summary>
- Parses a level element.
- </summary>
- <param name="element">The level element.</param>
- <param name="log">The logger object to set the level on.</param>
- <param name="isRoot">Flag to indicate if the logger is the root logger.</param>
- <remarks>
- <para>
- Parse an XML element that represents a level.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.SetParameter(System.Xml.XmlElement,System.Object)">
- <summary>
- Sets a parameter on an object.
- </summary>
- <param name="element">The parameter element.</param>
- <param name="target">The object to set the parameter on.</param>
- <remarks>
- The parameter name must correspond to a writable property
- on the object. The value of the parameter is a string,
- therefore this function will attempt to set a string
- property first. If unable to set a string property it
- will inspect the property and its argument type. It will
- attempt to call a static method called <c>Parse</c> on the
- type of the property. This method will take a single
- string argument and return a value that can be used to
- set the property.
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.HasAttributesOrElements(System.Xml.XmlElement)">
- <summary>
- Test if an element has no attributes or child elements
- </summary>
- <param name="element">the element to inspect</param>
- <returns><c>true</c> if the element has any attributes or child elements, <c>false</c> otherwise</returns>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.IsTypeConstructible(System.Type)">
- <summary>
- Test if a <see cref="T:System.Type"/> is constructible with <c>Activator.CreateInstance</c>.
- </summary>
- <param name="type">the type to inspect</param>
- <returns><c>true</c> if the type is creatable using a default constructor, <c>false</c> otherwise</returns>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.FindMethodInfo(System.Type,System.String)">
- <summary>
- Look for a method on the <paramref name="targetType"/> that matches the <paramref name="name"/> supplied
- </summary>
- <param name="targetType">the type that has the method</param>
- <param name="name">the name of the method</param>
- <returns>the method info found</returns>
- <remarks>
- <para>
- The method must be a public instance method on the <paramref name="targetType"/>.
- The method must be named <paramref name="name"/> or "Add" followed by <paramref name="name"/>.
- The method must take a single parameter.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ConvertStringTo(System.Type,System.String)">
- <summary>
- Converts a string value to a target type.
- </summary>
- <param name="type">The type of object to convert the string to.</param>
- <param name="value">The string value to use as the value of the object.</param>
- <returns>
- <para>
- An object of type <paramref name="type"/> with value <paramref name="value"/> or
- <c>null</c> when the conversion could not be performed.
- </para>
- </returns>
- </member>
- <member name="M:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.CreateObjectFromXml(System.Xml.XmlElement,System.Type,System.Type)">
- <summary>
- Creates an object as specified in XML.
- </summary>
- <param name="element">The XML element that contains the definition of the object.</param>
- <param name="defaultTargetType">The object type to use if not explicitly specified.</param>
- <param name="typeConstraint">The type that the returned object must be or must inherit from.</param>
- <returns>The object or <c>null</c></returns>
- <remarks>
- <para>
- Parse an XML element and create an object instance based on the configuration
- data.
- </para>
- <para>
- The type of the instance may be specified in the XML. If not
- specified then the <paramref name="defaultTargetType"/> is used
- as the type. However the type is specified it must support the
- <paramref name="typeConstraint"/> type.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.m_appenderBag">
- <summary>
- key: appenderName, value: appender.
- </summary>
- </member>
- <member name="F:log4net.Repository.Hierarchy.XmlHierarchyConfigurator.m_hierarchy">
- <summary>
- The Hierarchy being configured.
- </summary>
- </member>
- <member name="T:log4net.Repository.LoggerRepositoryShutdownEventHandler">
- <summary>
- Delegate used to handle logger repository shutdown event notifications
- </summary>
- <param name="sender">The <see cref="T:log4net.Repository.ILoggerRepository"/> that is shutting down.</param>
- <param name="e">Empty event args</param>
- <remarks>
- <para>
- Delegate used to handle logger repository shutdown event notifications.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.LoggerRepositoryConfigurationResetEventHandler">
- <summary>
- Delegate used to handle logger repository configuration reset event notifications
- </summary>
- <param name="sender">The <see cref="T:log4net.Repository.ILoggerRepository"/> that has had its configuration reset.</param>
- <param name="e">Empty event args</param>
- <remarks>
- <para>
- Delegate used to handle logger repository configuration reset event notifications.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Repository.LoggerRepositoryConfigurationChangedEventHandler">
- <summary>
- Delegate used to handle event notifications for logger repository configuration changes.
- </summary>
- <param name="sender">The <see cref="T:log4net.Repository.ILoggerRepository"/> that has had its configuration changed.</param>
- <param name="e">Empty event arguments.</param>
- <remarks>
- <para>
- Delegate used to handle event notifications for logger repository configuration changes.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.AppDomainPatternConverter">
- <summary>
- Write the name of the current AppDomain to the output
- </summary>
- <remarks>
- <para>
- Write the name of the current AppDomain to the output writer
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.AppDomainPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the name of the current AppDomain to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Writes name of the current AppDomain to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.DatePatternConverter">
- <summary>
- Write the current date to the output
- </summary>
- <remarks>
- <para>
- Date pattern converter, uses a <see cref="T:log4net.DateFormatter.IDateFormatter"/> to format
- the current date and time to the writer as a string.
- </para>
- <para>
- The value of the <see cref="P:log4net.Util.PatternConverter.Option"/> determines
- the formatting of the date. The following values are allowed:
- <list type="definition">
- <listheader>
- <term>Option value</term>
- <description>Output</description>
- </listheader>
- <item>
- <term>ISO8601</term>
- <description>
- Uses the <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/> formatter.
- Formats using the <c>"yyyy-MM-dd HH:mm:ss,fff"</c> pattern.
- </description>
- </item>
- <item>
- <term>DATE</term>
- <description>
- Uses the <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> formatter.
- Formats using the <c>"dd MMM yyyy HH:mm:ss,fff"</c> for example, <c>"06 Nov 1994 15:49:37,459"</c>.
- </description>
- </item>
- <item>
- <term>ABSOLUTE</term>
- <description>
- Uses the <see cref="T:log4net.DateFormatter.AbsoluteTimeDateFormatter"/> formatter.
- Formats using the <c>"HH:mm:ss,fff"</c> for example, <c>"15:49:37,459"</c>.
- </description>
- </item>
- <item>
- <term>other</term>
- <description>
- Any other pattern string uses the <see cref="T:log4net.DateFormatter.SimpleDateFormatter"/> formatter.
- This formatter passes the pattern string to the <see cref="T:System.DateTime"/>
- <see cref="M:System.DateTime.ToString(System.String)"/> method.
- For details on valid patterns see
- <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemglobalizationdatetimeformatinfoclasstopic.asp">DateTimeFormatInfo Class</a>.
- </description>
- </item>
- </list>
- </para>
- <para>
- The date and time is in the local time zone and is rendered in that zone.
- To output the time in Universal time see <see cref="T:log4net.Util.PatternStringConverters.UtcDatePatternConverter"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.PatternStringConverters.DatePatternConverter.m_dateFormatter">
- <summary>
- The <see cref="T:log4net.DateFormatter.IDateFormatter"/> used to render the date to a string
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.DateFormatter.IDateFormatter"/> used to render the date to a string
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.DatePatternConverter.ActivateOptions">
- <summary>
- Initialize the converter options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Util.PatternStringConverters.DatePatternConverter.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Util.PatternStringConverters.DatePatternConverter.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Util.PatternStringConverters.DatePatternConverter.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.DatePatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the current date to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Pass the current date and time to the <see cref="T:log4net.DateFormatter.IDateFormatter"/>
- for it to render it to the writer.
- </para>
- <para>
- The date and time passed is in the local time zone.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.EnvironmentPatternConverter">
- <summary>
- Write an environment variable to the output
- </summary>
- <remarks>
- <para>
- Write an environment variable to the output writer.
- The value of the <see cref="P:log4net.Util.PatternConverter.Option"/> determines
- the name of the variable to output.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.EnvironmentPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write an environment variable to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Writes the environment variable to the output <paramref name="writer"/>.
- The name of the environment variable to output must be set
- using the <see cref="P:log4net.Util.PatternConverter.Option"/>
- property.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.IdentityPatternConverter">
- <summary>
- Write the current thread identity to the output
- </summary>
- <remarks>
- <para>
- Write the current thread identity to the output writer
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.IdentityPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the current thread identity to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Writes the current thread identity to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.LiteralPatternConverter">
- <summary>
- Pattern converter for literal string instances in the pattern
- </summary>
- <remarks>
- <para>
- Writes the literal string value specified in the
- <see cref="P:log4net.Util.PatternConverter.Option"/> property to
- the output.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.LiteralPatternConverter.SetNext(log4net.Util.PatternConverter)">
- <summary>
- Set the next converter in the chain
- </summary>
- <param name="pc">The next pattern converter in the chain</param>
- <returns>The next pattern converter</returns>
- <remarks>
- <para>
- Special case the building of the pattern converter chain
- for <see cref="T:log4net.Util.PatternStringConverters.LiteralPatternConverter"/> instances. Two adjacent
- literals in the pattern can be represented by a single combined
- pattern converter. This implementation detects when a
- <see cref="T:log4net.Util.PatternStringConverters.LiteralPatternConverter"/> is added to the chain
- after this converter and combines its value with this converter's
- literal value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.LiteralPatternConverter.Format(System.IO.TextWriter,System.Object)">
- <summary>
- Write the literal to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, not set</param>
- <remarks>
- <para>
- Override the formatting behavior to ignore the FormattingInfo
- because we have a literal instead.
- </para>
- <para>
- Writes the value of <see cref="P:log4net.Util.PatternConverter.Option"/>
- to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.LiteralPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Convert this pattern into the rendered message
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">null, not set</param>
- <remarks>
- <para>
- This method is not used.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.NewLinePatternConverter">
- <summary>
- Writes a newline to the output
- </summary>
- <remarks>
- <para>
- Writes the system dependent line terminator to the output.
- This behavior can be overridden by setting the <see cref="P:log4net.Util.PatternConverter.Option"/>:
- </para>
- <list type="definition">
- <listheader>
- <term>Option Value</term>
- <description>Output</description>
- </listheader>
- <item>
- <term>DOS</term>
- <description>DOS or Windows line terminator <c>"\r\n"</c></description>
- </item>
- <item>
- <term>UNIX</term>
- <description>UNIX line terminator <c>"\n"</c></description>
- </item>
- </list>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.NewLinePatternConverter.ActivateOptions">
- <summary>
- Initialize the converter
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Util.PatternStringConverters.NewLinePatternConverter.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Util.PatternStringConverters.NewLinePatternConverter.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Util.PatternStringConverters.NewLinePatternConverter.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.ProcessIdPatternConverter">
- <summary>
- Write the current process ID to the output
- </summary>
- <remarks>
- <para>
- Write the current process ID to the output writer
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.ProcessIdPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the current process ID to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Write the current process ID to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.PropertyPatternConverter">
- <summary>
- Property pattern converter
- </summary>
- <remarks>
- <para>
- This pattern converter reads the thread and global properties.
- The thread properties take priority over global properties.
- See <see cref="P:log4net.ThreadContext.Properties"/> for details of the
- thread properties. See <see cref="P:log4net.GlobalContext.Properties"/> for
- details of the global properties.
- </para>
- <para>
- If the <see cref="P:log4net.Util.PatternConverter.Option"/> is specified then that will be used to
- lookup a single property. If no <see cref="P:log4net.Util.PatternConverter.Option"/> is specified
- then all properties will be dumped as a list of key value pairs.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.PropertyPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the property value to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Writes out the value of a named property. The property name
- should be set in the <see cref="P:log4net.Util.PatternConverter.Option"/>
- property.
- </para>
- <para>
- If the <see cref="P:log4net.Util.PatternConverter.Option"/> is set to <c>null</c>
- then all the properties are written as key value pairs.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.RandomStringPatternConverter">
- <summary>
- A Pattern converter that generates a string of random characters
- </summary>
- <remarks>
- <para>
- The converter generates a string of random characters. By default
- the string is length 4. This can be changed by setting the <see cref="P:log4net.Util.PatternConverter.Option"/>
- to the string value of the length required.
- </para>
- <para>
- The random characters in the string are limited to uppercase letters
- and numbers only.
- </para>
- <para>
- The random number generator used by this class is not cryptographically secure.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.PatternStringConverters.RandomStringPatternConverter.s_random">
- <summary>
- Shared random number generator
- </summary>
- </member>
- <member name="F:log4net.Util.PatternStringConverters.RandomStringPatternConverter.m_length">
- <summary>
- Length of random string to generate. Default length 4.
- </summary>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.RandomStringPatternConverter.ActivateOptions">
- <summary>
- Initialize the converter options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Util.PatternStringConverters.RandomStringPatternConverter.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Util.PatternStringConverters.RandomStringPatternConverter.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Util.PatternStringConverters.RandomStringPatternConverter.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.RandomStringPatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write a randoim string to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Write a randoim string to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.UserNamePatternConverter">
- <summary>
- Write the current threads username to the output
- </summary>
- <remarks>
- <para>
- Write the current threads username to the output writer
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.UserNamePatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the current threads username to the output
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Write the current threads username to the output <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternStringConverters.UtcDatePatternConverter">
- <summary>
- Write the UTC date time to the output
- </summary>
- <remarks>
- <para>
- Date pattern converter, uses a <see cref="T:log4net.DateFormatter.IDateFormatter"/> to format
- the current date and time in Universal time.
- </para>
- <para>
- See the <see cref="T:log4net.Util.PatternStringConverters.DatePatternConverter"/> for details on the date pattern syntax.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.PatternStringConverters.DatePatternConverter"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.PatternStringConverters.UtcDatePatternConverter.Convert(System.IO.TextWriter,System.Object)">
- <summary>
- Write the current date and time to the output
- </summary>
- <param name="writer"><see cref="T:System.IO.TextWriter"/> that will receive the formatted result.</param>
- <param name="state">null, state is not set</param>
- <remarks>
- <para>
- Pass the current date and time to the <see cref="T:log4net.DateFormatter.IDateFormatter"/>
- for it to render it to the writer.
- </para>
- <para>
- The date is in Universal time when it is rendered.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.PatternStringConverters.DatePatternConverter"/>
- </member>
- <member name="T:log4net.Util.TypeConverters.BooleanConverter">
- <summary>
- Type converter for Boolean.
- </summary>
- <remarks>
- <para>
- Supports conversion from string to <c>bool</c> type.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.ConverterRegistry"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertTo"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.BooleanConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="sourceType"/> is
- the <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.BooleanConverter.ConvertFrom(System.Object)">
- <summary>
- Convert the source object to the type supported by this object
- </summary>
- <param name="source">the object to convert</param>
- <returns>the converted object</returns>
- <remarks>
- <para>
- Uses the <see cref="M:System.Boolean.Parse(System.String)"/> method to convert the
- <see cref="T:System.String"/> argument to a <see cref="T:System.Boolean"/>.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- target type. To check for this condition use the <see cref="M:log4net.Util.TypeConverters.BooleanConverter.CanConvertFrom(System.Type)"/>
- method.
- </exception>
- </member>
- <member name="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- <summary>
- Exception base type for conversion errors.
- </summary>
- <remarks>
- <para>
- This type extends <see cref="T:System.ApplicationException"/>. It
- does not add any new functionality but does differentiate the
- type of exception being thrown.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConversionNotSupportedException.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConversionNotSupportedException.#ctor(System.String)">
- <summary>
- Constructor
- </summary>
- <param name="message">A message to include with the exception.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class
- with the specified message.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConversionNotSupportedException.#ctor(System.String,System.Exception)">
- <summary>
- Constructor
- </summary>
- <param name="message">A message to include with the exception.</param>
- <param name="innerException">A nested exception to include.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class
- with the specified message and inner exception.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConversionNotSupportedException.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Serialization constructor
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
- <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class
- with serialized data.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConversionNotSupportedException.Create(System.Type,System.Object)">
- <summary>
- Creates a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class.
- </summary>
- <param name="destinationType">The conversion destination type.</param>
- <param name="sourceValue">The value to convert.</param>
- <returns>An instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/>.</returns>
- <remarks>
- <para>
- Creates a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConversionNotSupportedException.Create(System.Type,System.Object,System.Exception)">
- <summary>
- Creates a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class.
- </summary>
- <param name="destinationType">The conversion destination type.</param>
- <param name="sourceValue">The value to convert.</param>
- <param name="innerException">A nested exception to include.</param>
- <returns>An instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/>.</returns>
- <remarks>
- <para>
- Creates a new instance of the <see cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException"/> class.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.TypeConverters.ConverterRegistry">
- <summary>
- Register of type converters for specific types.
- </summary>
- <remarks>
- <para>
- Maintains a registry of type converters used to convert between
- types.
- </para>
- <para>
- Use the <see cref="M:log4net.Util.TypeConverters.ConverterRegistry.AddConverter(System.Type,System.Object)"/> and
- <see cref="M:log4net.Util.TypeConverters.ConverterRegistry.AddConverter(System.Type,System.Type)"/> methods to register new converters.
- The <see cref="M:log4net.Util.TypeConverters.ConverterRegistry.GetConvertTo(System.Type,System.Type)"/> and <see cref="M:log4net.Util.TypeConverters.ConverterRegistry.GetConvertFrom(System.Type)"/> methods
- lookup appropriate converters to use.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertTo"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.#ctor">
- <summary>
- Private constructor
- </summary>
- <remarks>
- Initializes a new instance of the <see cref="T:log4net.Util.TypeConverters.ConverterRegistry"/> class.
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.#cctor">
- <summary>
- Static constructor.
- </summary>
- <remarks>
- <para>
- This constructor defines the intrinsic type converters.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.AddConverter(System.Type,System.Object)">
- <summary>
- Adds a converter for a specific type.
- </summary>
- <param name="destinationType">The type being converted to.</param>
- <param name="converter">The type converter to use to convert to the destination type.</param>
- <remarks>
- <para>
- Adds a converter instance for a specific type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.AddConverter(System.Type,System.Type)">
- <summary>
- Adds a converter for a specific type.
- </summary>
- <param name="destinationType">The type being converted to.</param>
- <param name="converterType">The type of the type converter to use to convert to the destination type.</param>
- <remarks>
- <para>
- Adds a converter <see cref="T:System.Type"/> for a specific type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.GetConvertTo(System.Type,System.Type)">
- <summary>
- Gets the type converter to use to convert values to the destination type.
- </summary>
- <param name="sourceType">The type being converted from.</param>
- <param name="destinationType">The type being converted to.</param>
- <returns>
- The type converter instance to use for type conversions or <c>null</c>
- if no type converter is found.
- </returns>
- <remarks>
- <para>
- Gets the type converter to use to convert values to the destination type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.GetConvertFrom(System.Type)">
- <summary>
- Gets the type converter to use to convert values to the destination type.
- </summary>
- <param name="destinationType">The type being converted to.</param>
- <returns>
- The type converter instance to use for type conversions or <c>null</c>
- if no type converter is found.
- </returns>
- <remarks>
- <para>
- Gets the type converter to use to convert values to the destination type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.GetConverterFromAttribute(System.Type)">
- <summary>
- Lookups the type converter to use as specified by the attributes on the
- destination type.
- </summary>
- <param name="destinationType">The type being converted to.</param>
- <returns>
- The type converter instance to use for type conversions or <c>null</c>
- if no type converter is found.
- </returns>
- </member>
- <member name="M:log4net.Util.TypeConverters.ConverterRegistry.CreateConverterInstance(System.Type)">
- <summary>
- Creates the instance of the type converter.
- </summary>
- <param name="converterType">The type of the type converter.</param>
- <returns>
- The type converter instance to use for type conversions or <c>null</c>
- if no type converter is found.
- </returns>
- <remarks>
- <para>
- The type specified for the type converter must implement
- the <see cref="T:log4net.Util.TypeConverters.IConvertFrom"/> or <see cref="T:log4net.Util.TypeConverters.IConvertTo"/> interfaces
- and must have a public default (no argument) constructor.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.TypeConverters.ConverterRegistry.s_type2converter">
- <summary>
- Mapping from <see cref="T:System.Type"/> to type converter.
- </summary>
- </member>
- <member name="T:log4net.Util.TypeConverters.EncodingConverter">
- <summary>
- Supports conversion from string to <see cref="T:System.Text.Encoding"/> type.
- </summary>
- <remarks>
- <para>
- Supports conversion from string to <see cref="T:System.Text.Encoding"/> type.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.ConverterRegistry"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertTo"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.EncodingConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="sourceType"/> is
- the <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.EncodingConverter.ConvertFrom(System.Object)">
- <summary>
- Overrides the ConvertFrom method of IConvertFrom.
- </summary>
- <param name="source">the object to convert to an encoding</param>
- <returns>the encoding</returns>
- <remarks>
- <para>
- Uses the <see cref="M:System.Text.Encoding.GetEncoding(System.String)"/> method to
- convert the <see cref="T:System.String"/> argument to an <see cref="T:System.Text.Encoding"/>.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- target type. To check for this condition use the <see cref="M:log4net.Util.TypeConverters.EncodingConverter.CanConvertFrom(System.Type)"/>
- method.
- </exception>
- </member>
- <member name="T:log4net.Util.TypeConverters.IConvertTo">
- <summary>
- Interface supported by type converters
- </summary>
- <remarks>
- <para>
- This interface supports conversion from a single type to arbitrary types.
- See <see cref="T:log4net.Util.TypeConverters.TypeConverterAttribute"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.IConvertTo.CanConvertTo(System.Type)">
- <summary>
- Returns whether this converter can convert the object to the specified type
- </summary>
- <param name="targetType">A Type that represents the type you want to convert to</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Test if the type supported by this converter can be converted to the
- <paramref name="targetType"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.IConvertTo.ConvertTo(System.Object,System.Type)">
- <summary>
- Converts the given value object to the specified type, using the arguments
- </summary>
- <param name="source">the object to convert</param>
- <param name="targetType">The Type to convert the value parameter to</param>
- <returns>the converted object</returns>
- <remarks>
- <para>
- Converts the <paramref name="source"/> (which must be of the type supported
- by this converter) to the <paramref name="targetType"/> specified..
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.TypeConverters.IPAddressConverter">
- <summary>
- Supports conversion from string to <see cref="T:System.Net.IPAddress"/> type.
- </summary>
- <remarks>
- <para>
- Supports conversion from string to <see cref="T:System.Net.IPAddress"/> type.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.ConverterRegistry"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.IPAddressConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="sourceType"/> is
- the <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.IPAddressConverter.ConvertFrom(System.Object)">
- <summary>
- Overrides the ConvertFrom method of IConvertFrom.
- </summary>
- <param name="source">the object to convert to an IPAddress</param>
- <returns>the IPAddress</returns>
- <remarks>
- <para>
- Uses the <see cref="M:System.Net.IPAddress.Parse(System.String)"/> method to convert the
- <see cref="T:System.String"/> argument to an <see cref="T:System.Net.IPAddress"/>.
- If that fails then the string is resolved as a DNS hostname.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- target type. To check for this condition use the <see cref="M:log4net.Util.TypeConverters.IPAddressConverter.CanConvertFrom(System.Type)"/>
- method.
- </exception>
- </member>
- <member name="F:log4net.Util.TypeConverters.IPAddressConverter.validIpAddressChars">
- <summary>
- Valid characters in an IPv4 or IPv6 address string. (Does not support subnets)
- </summary>
- </member>
- <member name="T:log4net.Util.TypeConverters.PatternLayoutConverter">
- <summary>
- Supports conversion from string to <see cref="T:log4net.Layout.PatternLayout"/> type.
- </summary>
- <remarks>
- <para>
- Supports conversion from string to <see cref="T:log4net.Layout.PatternLayout"/> type.
- </para>
- <para>
- The string is used as the <see cref="P:log4net.Layout.PatternLayout.ConversionPattern"/>
- of the <see cref="T:log4net.Layout.PatternLayout"/>.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.ConverterRegistry"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertTo"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.PatternLayoutConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="sourceType"/> is
- the <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.PatternLayoutConverter.ConvertFrom(System.Object)">
- <summary>
- Overrides the ConvertFrom method of IConvertFrom.
- </summary>
- <param name="source">the object to convert to a PatternLayout</param>
- <returns>the PatternLayout</returns>
- <remarks>
- <para>
- Creates and returns a new <see cref="T:log4net.Layout.PatternLayout"/> using
- the <paramref name="source"/> <see cref="T:System.String"/> as the
- <see cref="P:log4net.Layout.PatternLayout.ConversionPattern"/>.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- target type. To check for this condition use the <see cref="M:log4net.Util.TypeConverters.PatternLayoutConverter.CanConvertFrom(System.Type)"/>
- method.
- </exception>
- </member>
- <member name="T:log4net.Util.TypeConverters.PatternStringConverter">
- <summary>
- Convert between string and <see cref="T:log4net.Util.PatternString"/>
- </summary>
- <remarks>
- <para>
- Supports conversion from string to <see cref="T:log4net.Util.PatternString"/> type,
- and from a <see cref="T:log4net.Util.PatternString"/> type to a string.
- </para>
- <para>
- The string is used as the <see cref="P:log4net.Util.PatternString.ConversionPattern"/>
- of the <see cref="T:log4net.Util.PatternString"/>.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.ConverterRegistry"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertTo"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.PatternStringConverter.CanConvertTo(System.Type)">
- <summary>
- Can the target type be converted to the type supported by this object
- </summary>
- <param name="targetType">A <see cref="T:System.Type"/> that represents the type you want to convert to</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="targetType"/> is
- assignable from a <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.PatternStringConverter.ConvertTo(System.Object,System.Type)">
- <summary>
- Converts the given value object to the specified type, using the arguments
- </summary>
- <param name="source">the object to convert</param>
- <param name="targetType">The Type to convert the value parameter to</param>
- <returns>the converted object</returns>
- <remarks>
- <para>
- Uses the <see cref="M:log4net.Util.PatternString.Format"/> method to convert the
- <see cref="T:log4net.Util.PatternString"/> argument to a <see cref="T:System.String"/>.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- <paramref name="targetType"/>. To check for this condition use the
- <see cref="M:log4net.Util.TypeConverters.PatternStringConverter.CanConvertTo(System.Type)"/> method.
- </exception>
- </member>
- <member name="M:log4net.Util.TypeConverters.PatternStringConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="sourceType"/> is
- the <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.PatternStringConverter.ConvertFrom(System.Object)">
- <summary>
- Overrides the ConvertFrom method of IConvertFrom.
- </summary>
- <param name="source">the object to convert to a PatternString</param>
- <returns>the PatternString</returns>
- <remarks>
- <para>
- Creates and returns a new <see cref="T:log4net.Util.PatternString"/> using
- the <paramref name="source"/> <see cref="T:System.String"/> as the
- <see cref="P:log4net.Util.PatternString.ConversionPattern"/>.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- target type. To check for this condition use the <see cref="M:log4net.Util.TypeConverters.PatternStringConverter.CanConvertFrom(System.Type)"/>
- method.
- </exception>
- </member>
- <member name="T:log4net.Util.TypeConverters.TypeConverter">
- <summary>
- Supports conversion from string to <see cref="T:System.Type"/> type.
- </summary>
- <remarks>
- <para>
- Supports conversion from string to <see cref="T:System.Type"/> type.
- </para>
- </remarks>
- <seealso cref="T:log4net.Util.TypeConverters.ConverterRegistry"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- <seealso cref="T:log4net.Util.TypeConverters.IConvertTo"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.TypeConverters.TypeConverter.CanConvertFrom(System.Type)">
- <summary>
- Can the source type be converted to the type supported by this object
- </summary>
- <param name="sourceType">the type to convert</param>
- <returns>true if the conversion is possible</returns>
- <remarks>
- <para>
- Returns <c>true</c> if the <paramref name="sourceType"/> is
- the <see cref="T:System.String"/> type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.TypeConverter.ConvertFrom(System.Object)">
- <summary>
- Overrides the ConvertFrom method of IConvertFrom.
- </summary>
- <param name="source">the object to convert to a Type</param>
- <returns>the Type</returns>
- <remarks>
- <para>
- Uses the <see cref="M:System.Type.GetType(System.String,System.Boolean)"/> method to convert the
- <see cref="T:System.String"/> argument to a <see cref="T:System.Type"/>.
- Additional effort is made to locate partially specified types
- by searching the loaded assemblies.
- </para>
- </remarks>
- <exception cref="T:log4net.Util.TypeConverters.ConversionNotSupportedException">
- The <paramref name="source"/> object cannot be converted to the
- target type. To check for this condition use the <see cref="M:log4net.Util.TypeConverters.TypeConverter.CanConvertFrom(System.Type)"/>
- method.
- </exception>
- </member>
- <member name="T:log4net.Util.TypeConverters.TypeConverterAttribute">
- <summary>
- Attribute used to associate a type converter
- </summary>
- <remarks>
- <para>
- Class and Interface level attribute that specifies a type converter
- to use with the associated type.
- </para>
- <para>
- To associate a type converter with a target type apply a
- <c>TypeConverterAttribute</c> to the target type. Specify the
- type of the type converter on the attribute.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Util.TypeConverters.TypeConverterAttribute.m_typeName">
- <summary>
- The string type name of the type converter
- </summary>
- </member>
- <member name="M:log4net.Util.TypeConverters.TypeConverterAttribute.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.TypeConverterAttribute.#ctor(System.String)">
- <summary>
- Create a new type converter attribute for the specified type name
- </summary>
- <param name="typeName">The string type name of the type converter</param>
- <remarks>
- <para>
- The type specified must implement the <see cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- or the <see cref="T:log4net.Util.TypeConverters.IConvertTo"/> interfaces.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TypeConverters.TypeConverterAttribute.#ctor(System.Type)">
- <summary>
- Create a new type converter attribute for the specified type
- </summary>
- <param name="converterType">The type of the type converter</param>
- <remarks>
- <para>
- The type specified must implement the <see cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- or the <see cref="T:log4net.Util.TypeConverters.IConvertTo"/> interfaces.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.TypeConverters.TypeConverterAttribute.ConverterTypeName">
- <summary>
- The string type name of the type converter
- </summary>
- <value>
- The string type name of the type converter
- </value>
- <remarks>
- <para>
- The type specified must implement the <see cref="T:log4net.Util.TypeConverters.IConvertFrom"/>
- or the <see cref="T:log4net.Util.TypeConverters.IConvertTo"/> interfaces.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.AppenderAttachedImpl">
- <summary>
- A straightforward implementation of the <see cref="T:log4net.Core.IAppenderAttachable"/> interface.
- </summary>
- <remarks>
- <para>
- This is the default implementation of the <see cref="T:log4net.Core.IAppenderAttachable"/>
- interface. Implementors of the <see cref="T:log4net.Core.IAppenderAttachable"/> interface
- should aggregate an instance of this type.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.AppenderAttachedImpl"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.AppendLoopOnAppenders(log4net.Core.LoggingEvent)">
- <summary>
- Append on on all attached appenders.
- </summary>
- <param name="loggingEvent">The event being logged.</param>
- <returns>The number of appenders called.</returns>
- <remarks>
- <para>
- Calls the <see cref="M:log4net.Appender.IAppender.DoAppend(log4net.Core.LoggingEvent)"/> method on all
- attached appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.AppendLoopOnAppenders(log4net.Core.LoggingEvent[])">
- <summary>
- Append on on all attached appenders.
- </summary>
- <param name="loggingEvents">The array of events being logged.</param>
- <returns>The number of appenders called.</returns>
- <remarks>
- <para>
- Calls the <see cref="M:log4net.Appender.IAppender.DoAppend(log4net.Core.LoggingEvent)"/> method on all
- attached appenders.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.CallAppend(log4net.Appender.IAppender,log4net.Core.LoggingEvent[])">
- <summary>
- Calls the DoAppende method on the <see cref="T:log4net.Appender.IAppender"/> with
- the <see cref="T:log4net.Core.LoggingEvent"/> objects supplied.
- </summary>
- <param name="appender">The appender</param>
- <param name="loggingEvents">The events</param>
- <remarks>
- <para>
- If the <paramref name="appender"/> supports the <see cref="T:log4net.Appender.IBulkAppender"/>
- interface then the <paramref name="loggingEvents"/> will be passed
- through using that interface. Otherwise the <see cref="T:log4net.Core.LoggingEvent"/>
- objects in the array will be passed one at a time.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.AddAppender(log4net.Appender.IAppender)">
- <summary>
- Attaches an appender.
- </summary>
- <param name="newAppender">The appender to add.</param>
- <remarks>
- <para>
- If the appender is already in the list it won't be added again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.GetAppender(System.String)">
- <summary>
- Gets an attached appender with the specified name.
- </summary>
- <param name="name">The name of the appender to get.</param>
- <returns>
- The appender with the name specified, or <c>null</c> if no appender with the
- specified name is found.
- </returns>
- <remarks>
- <para>
- Lookup an attached appender by name.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.RemoveAllAppenders">
- <summary>
- Removes all attached appenders.
- </summary>
- <remarks>
- <para>
- Removes and closes all attached appenders
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.RemoveAppender(log4net.Appender.IAppender)">
- <summary>
- Removes the specified appender from the list of attached appenders.
- </summary>
- <param name="appender">The appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- <para>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.AppenderAttachedImpl.RemoveAppender(System.String)">
- <summary>
- Removes the appender with the specified name from the list of appenders.
- </summary>
- <param name="name">The name of the appender to remove.</param>
- <returns>The appender removed from the list</returns>
- <remarks>
- <para>
- The appender removed is not closed.
- If you are discarding the appender you must call
- <see cref="M:log4net.Appender.IAppender.Close"/> on the appender removed.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.AppenderAttachedImpl.m_appenderList">
- <summary>
- List of appenders
- </summary>
- </member>
- <member name="F:log4net.Util.AppenderAttachedImpl.m_appenderArray">
- <summary>
- Array of appenders, used to cache the m_appenderList
- </summary>
- </member>
- <member name="P:log4net.Util.AppenderAttachedImpl.Appenders">
- <summary>
- Gets all attached appenders.
- </summary>
- <returns>
- A collection of attached appenders, or <c>null</c> if there
- are no attached appenders.
- </returns>
- <remarks>
- <para>
- The read only collection of all currently attached appenders.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.CompositeProperties">
- <summary>
- This class aggregates several PropertiesDictionary collections together.
- </summary>
- <remarks>
- <para>
- Provides a dictionary style lookup over an ordered list of
- <see cref="T:log4net.Util.PropertiesDictionary"/> collections.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.CompositeProperties.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.CompositeProperties"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CompositeProperties.Add(log4net.Util.ReadOnlyPropertiesDictionary)">
- <summary>
- Add a Properties Dictionary to this composite collection
- </summary>
- <param name="properties">the properties to add</param>
- <remarks>
- <para>
- Properties dictionaries added first take precedence over dictionaries added
- later.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CompositeProperties.Flatten">
- <summary>
- Flatten this composite collection into a single properties dictionary
- </summary>
- <returns>the flattened dictionary</returns>
- <remarks>
- <para>
- Reduces the collection of ordered dictionaries to a single dictionary
- containing the resultant values for the keys.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.CompositeProperties.Item(System.String)">
- <summary>
- Gets the value of a property
- </summary>
- <value>
- The value for the property with the specified key
- </value>
- <remarks>
- <para>
- Looks up the value for the <paramref name="key"/> specified.
- The <see cref="T:log4net.Util.PropertiesDictionary"/> collections are searched
- in the order in which they were added to this collection. The value
- returned is the value held by the first collection that contains
- the specified key.
- </para>
- <para>
- If none of the collections contain the specified key then
- <c>null</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ContextPropertiesBase">
- <summary>
- Base class for Context Properties implementations
- </summary>
- <remarks>
- <para>
- This class defines a basic property get set accessor
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="P:log4net.Util.ContextPropertiesBase.Item(System.String)">
- <summary>
- Gets or sets the value of a property
- </summary>
- <value>
- The value for the property with the specified key
- </value>
- <remarks>
- <para>
- Gets or sets the value of a property
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.CountingQuietTextWriter">
- <summary>
- Subclass of <see cref="T:log4net.Util.QuietTextWriter"/> that maintains a count of
- the number of bytes written.
- </summary>
- <remarks>
- <para>
- This writer counts the number of bytes written.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Util.QuietTextWriter">
- <summary>
- <see cref="T:System.IO.TextWriter"/> that does not leak exceptions
- </summary>
- <remarks>
- <para>
- <see cref="T:log4net.Util.QuietTextWriter"/> does not throw exceptions when things go wrong.
- Instead, it delegates error handling to its <see cref="T:log4net.Core.IErrorHandler"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Util.TextWriterAdapter">
- <summary>
- Adapter that extends <see cref="T:System.IO.TextWriter"/> and forwards all
- messages to an instance of <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <remarks>
- <para>
- Adapter that extends <see cref="T:System.IO.TextWriter"/> and forwards all
- messages to an instance of <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.TextWriterAdapter.m_writer">
- <summary>
- The writer to forward messages to
- </summary>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.#ctor(System.IO.TextWriter)">
- <summary>
- Create an instance of <see cref="T:log4net.Util.TextWriterAdapter"/> that forwards all
- messages to a <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <param name="writer">The <see cref="T:System.IO.TextWriter"/> to forward to</param>
- <remarks>
- <para>
- Create an instance of <see cref="T:log4net.Util.TextWriterAdapter"/> that forwards all
- messages to a <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.Close">
- <summary>
- Closes the writer and releases any system resources associated with the writer
- </summary>
- <remarks>
- <para>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.Dispose(System.Boolean)">
- <summary>
- Dispose this writer
- </summary>
- <param name="disposing">flag indicating if we are being disposed</param>
- <remarks>
- <para>
- Dispose this writer
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.Flush">
- <summary>
- Flushes any buffered output
- </summary>
- <remarks>
- <para>
- Clears all buffers for the writer and causes any buffered data to be written
- to the underlying device
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.Write(System.Char)">
- <summary>
- Writes a character to the wrapped TextWriter
- </summary>
- <param name="value">the value to write to the TextWriter</param>
- <remarks>
- <para>
- Writes a character to the wrapped TextWriter
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.Write(System.Char[],System.Int32,System.Int32)">
- <summary>
- Writes a character buffer to the wrapped TextWriter
- </summary>
- <param name="buffer">the data buffer</param>
- <param name="index">the start index</param>
- <param name="count">the number of characters to write</param>
- <remarks>
- <para>
- Writes a character buffer to the wrapped TextWriter
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.TextWriterAdapter.Write(System.String)">
- <summary>
- Writes a string to the wrapped TextWriter
- </summary>
- <param name="value">the value to write to the TextWriter</param>
- <remarks>
- <para>
- Writes a string to the wrapped TextWriter
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.TextWriterAdapter.Writer">
- <summary>
- Gets or sets the underlying <see cref="T:System.IO.TextWriter"/>.
- </summary>
- <value>
- The underlying <see cref="T:System.IO.TextWriter"/>.
- </value>
- <remarks>
- <para>
- Gets or sets the underlying <see cref="T:System.IO.TextWriter"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.TextWriterAdapter.Encoding">
- <summary>
- The Encoding in which the output is written
- </summary>
- <value>
- The <see cref="P:log4net.Util.TextWriterAdapter.Encoding"/>
- </value>
- <remarks>
- <para>
- The Encoding in which the output is written
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.TextWriterAdapter.FormatProvider">
- <summary>
- Gets an object that controls formatting
- </summary>
- <value>
- The format provider
- </value>
- <remarks>
- <para>
- Gets an object that controls formatting
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.TextWriterAdapter.NewLine">
- <summary>
- Gets or sets the line terminator string used by the TextWriter
- </summary>
- <value>
- The line terminator to use
- </value>
- <remarks>
- <para>
- Gets or sets the line terminator string used by the TextWriter
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.QuietTextWriter.#ctor(System.IO.TextWriter,log4net.Core.IErrorHandler)">
- <summary>
- Constructor
- </summary>
- <param name="writer">the writer to actually write to</param>
- <param name="errorHandler">the error handler to report error to</param>
- <remarks>
- <para>
- Create a new QuietTextWriter using a writer and error handler
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.QuietTextWriter.Write(System.Char)">
- <summary>
- Writes a character to the underlying writer
- </summary>
- <param name="value">the char to write</param>
- <remarks>
- <para>
- Writes a character to the underlying writer
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.QuietTextWriter.Write(System.Char[],System.Int32,System.Int32)">
- <summary>
- Writes a buffer to the underlying writer
- </summary>
- <param name="buffer">the buffer to write</param>
- <param name="index">the start index to write from</param>
- <param name="count">the number of characters to write</param>
- <remarks>
- <para>
- Writes a buffer to the underlying writer
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.QuietTextWriter.Write(System.String)">
- <summary>
- Writes a string to the output.
- </summary>
- <param name="value">The string data to write to the output.</param>
- <remarks>
- <para>
- Writes a string to the output.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.QuietTextWriter.Close">
- <summary>
- Closes the underlying output writer.
- </summary>
- <remarks>
- <para>
- Closes the underlying output writer.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.QuietTextWriter.m_errorHandler">
- <summary>
- The error handler instance to pass all errors to
- </summary>
- </member>
- <member name="F:log4net.Util.QuietTextWriter.m_closed">
- <summary>
- Flag to indicate if this writer is closed
- </summary>
- </member>
- <member name="P:log4net.Util.QuietTextWriter.ErrorHandler">
- <summary>
- Gets or sets the error handler that all errors are passed to.
- </summary>
- <value>
- The error handler that all errors are passed to.
- </value>
- <remarks>
- <para>
- Gets or sets the error handler that all errors are passed to.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.QuietTextWriter.Closed">
- <summary>
- Gets a value indicating whether this writer is closed.
- </summary>
- <value>
- <c>true</c> if this writer is closed, otherwise <c>false</c>.
- </value>
- <remarks>
- <para>
- Gets a value indicating whether this writer is closed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CountingQuietTextWriter.#ctor(System.IO.TextWriter,log4net.Core.IErrorHandler)">
- <summary>
- Constructor
- </summary>
- <param name="writer">The <see cref="T:System.IO.TextWriter"/> to actually write to.</param>
- <param name="errorHandler">The <see cref="T:log4net.Core.IErrorHandler"/> to report errors to.</param>
- <remarks>
- <para>
- Creates a new instance of the <see cref="T:log4net.Util.CountingQuietTextWriter"/> class
- with the specified <see cref="T:System.IO.TextWriter"/> and <see cref="T:log4net.Core.IErrorHandler"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CountingQuietTextWriter.Write(System.Char)">
- <summary>
- Writes a character to the underlying writer and counts the number of bytes written.
- </summary>
- <param name="value">the char to write</param>
- <remarks>
- <para>
- Overrides implementation of <see cref="T:log4net.Util.QuietTextWriter"/>. Counts
- the number of bytes written.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CountingQuietTextWriter.Write(System.Char[],System.Int32,System.Int32)">
- <summary>
- Writes a buffer to the underlying writer and counts the number of bytes written.
- </summary>
- <param name="buffer">the buffer to write</param>
- <param name="index">the start index to write from</param>
- <param name="count">the number of characters to write</param>
- <remarks>
- <para>
- Overrides implementation of <see cref="T:log4net.Util.QuietTextWriter"/>. Counts
- the number of bytes written.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CountingQuietTextWriter.Write(System.String)">
- <summary>
- Writes a string to the output and counts the number of bytes written.
- </summary>
- <param name="str">The string data to write to the output.</param>
- <remarks>
- <para>
- Overrides implementation of <see cref="T:log4net.Util.QuietTextWriter"/>. Counts
- the number of bytes written.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.CountingQuietTextWriter.m_countBytes">
- <summary>
- Total number of bytes written.
- </summary>
- </member>
- <member name="P:log4net.Util.CountingQuietTextWriter.Count">
- <summary>
- Gets or sets the total number of bytes written.
- </summary>
- <value>
- The total number of bytes written.
- </value>
- <remarks>
- <para>
- Gets or sets the total number of bytes written.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.CyclicBuffer">
- <summary>
- A fixed size rolling buffer of logging events.
- </summary>
- <remarks>
- <para>
- An array backed fixed size leaky bucket.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.CyclicBuffer.#ctor(System.Int32)">
- <summary>
- Constructor
- </summary>
- <param name="maxSize">The maximum number of logging events in the buffer.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.CyclicBuffer"/> class with
- the specified maximum number of buffered logging events.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="maxSize"/> argument is not a positive integer.</exception>
- </member>
- <member name="M:log4net.Util.CyclicBuffer.Append(log4net.Core.LoggingEvent)">
- <summary>
- Appends a <paramref name="loggingEvent"/> to the buffer.
- </summary>
- <param name="loggingEvent">The event to append to the buffer.</param>
- <returns>The event discarded from the buffer, if the buffer is full, otherwise <c>null</c>.</returns>
- <remarks>
- <para>
- Append an event to the buffer. If the buffer still contains free space then
- <c>null</c> is returned. If the buffer is full then an event will be dropped
- to make space for the new event, the event dropped is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CyclicBuffer.PopOldest">
- <summary>
- Get and remove the oldest event in the buffer.
- </summary>
- <returns>The oldest logging event in the buffer</returns>
- <remarks>
- <para>
- Gets the oldest (first) logging event in the buffer and removes it
- from the buffer.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CyclicBuffer.PopAll">
- <summary>
- Pops all the logging events from the buffer into an array.
- </summary>
- <returns>An array of all the logging events in the buffer.</returns>
- <remarks>
- <para>
- Get all the events in the buffer and clear the buffer.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.CyclicBuffer.Clear">
- <summary>
- Clear the buffer
- </summary>
- <remarks>
- <para>
- Clear the buffer of all events. The events in the buffer are lost.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.CyclicBuffer.Item(System.Int32)">
- <summary>
- Gets the <paramref name="i"/>th oldest event currently in the buffer.
- </summary>
- <value>The <paramref name="i"/>th oldest event currently in the buffer.</value>
- <remarks>
- <para>
- If <paramref name="i"/> is outside the range 0 to the number of events
- currently in the buffer, then <c>null</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.CyclicBuffer.MaxSize">
- <summary>
- Gets the maximum size of the buffer.
- </summary>
- <value>The maximum size of the buffer.</value>
- <remarks>
- <para>
- Gets the maximum size of the buffer
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.CyclicBuffer.Length">
- <summary>
- Gets the number of logging events in the buffer.
- </summary>
- <value>The number of logging events in the buffer.</value>
- <remarks>
- <para>
- This number is guaranteed to be in the range 0 to <see cref="P:log4net.Util.CyclicBuffer.MaxSize"/>
- (inclusive).
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.EmptyCollection">
- <summary>
- An always empty <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <remarks>
- <para>
- A singleton implementation of the <see cref="T:System.Collections.ICollection"/>
- interface that always represents an empty collection.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.EmptyCollection.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.EmptyCollection"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to enforce the singleton pattern.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyCollection.CopyTo(System.Array,System.Int32)">
- <summary>
- Copies the elements of the <see cref="T:System.Collections.ICollection"/> to an
- <see cref="T:System.Array"/>, starting at a particular Array index.
- </summary>
- <param name="array">The one-dimensional <see cref="T:System.Array"/>
- that is the destination of the elements copied from
- <see cref="T:System.Collections.ICollection"/>. The Array must have zero-based
- indexing.</param>
- <param name="index">The zero-based index in array at which
- copying begins.</param>
- <remarks>
- <para>
- As the collection is empty no values are copied into the array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyCollection.GetEnumerator">
- <summary>
- Returns an enumerator that can iterate through a collection.
- </summary>
- <returns>
- An <see cref="T:System.Collections.IEnumerator"/> that can be used to
- iterate through the collection.
- </returns>
- <remarks>
- <para>
- As the collection is empty a <see cref="T:log4net.Util.NullEnumerator"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.EmptyCollection.s_instance">
- <summary>
- The singleton instance of the empty collection.
- </summary>
- </member>
- <member name="P:log4net.Util.EmptyCollection.Instance">
- <summary>
- Gets the singleton instance of the empty collection.
- </summary>
- <returns>The singleton instance of the empty collection.</returns>
- <remarks>
- <para>
- Gets the singleton instance of the empty collection.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyCollection.IsSynchronized">
- <summary>
- Gets a value indicating if access to the <see cref="T:System.Collections.ICollection"/> is synchronized (thread-safe).
- </summary>
- <value>
- <b>true</b> if access to the <see cref="T:System.Collections.ICollection"/> is synchronized (thread-safe); otherwise, <b>false</b>.
- </value>
- <remarks>
- <para>
- For the <see cref="T:log4net.Util.EmptyCollection"/> this property is always <c>true</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyCollection.Count">
- <summary>
- Gets the number of elements contained in the <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <value>
- The number of elements contained in the <see cref="T:System.Collections.ICollection"/>.
- </value>
- <remarks>
- <para>
- As the collection is empty the <see cref="P:log4net.Util.EmptyCollection.Count"/> is always <c>0</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyCollection.SyncRoot">
- <summary>
- Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <value>
- An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"/>.
- </value>
- <remarks>
- <para>
- As the collection is empty and thread safe and synchronized this instance is also
- the <see cref="P:log4net.Util.EmptyCollection.SyncRoot"/> object.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.EmptyDictionary">
- <summary>
- An always empty <see cref="T:System.Collections.IDictionary"/>.
- </summary>
- <remarks>
- <para>
- A singleton implementation of the <see cref="T:System.Collections.IDictionary"/>
- interface that always represents an empty collection.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.EmptyDictionary"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to enforce the singleton pattern.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.CopyTo(System.Array,System.Int32)">
- <summary>
- Copies the elements of the <see cref="T:System.Collections.ICollection"/> to an
- <see cref="T:System.Array"/>, starting at a particular Array index.
- </summary>
- <param name="array">The one-dimensional <see cref="T:System.Array"/>
- that is the destination of the elements copied from
- <see cref="T:System.Collections.ICollection"/>. The Array must have zero-based
- indexing.</param>
- <param name="index">The zero-based index in array at which
- copying begins.</param>
- <remarks>
- <para>
- As the collection is empty no values are copied into the array.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.System#Collections#IEnumerable#GetEnumerator">
- <summary>
- Returns an enumerator that can iterate through a collection.
- </summary>
- <returns>
- An <see cref="T:System.Collections.IEnumerator"/> that can be used to
- iterate through the collection.
- </returns>
- <remarks>
- <para>
- As the collection is empty a <see cref="T:log4net.Util.NullEnumerator"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.Add(System.Object,System.Object)">
- <summary>
- Adds an element with the provided key and value to the
- <see cref="T:log4net.Util.EmptyDictionary"/>.
- </summary>
- <param name="key">The <see cref="T:System.Object"/> to use as the key of the element to add.</param>
- <param name="value">The <see cref="T:System.Object"/> to use as the value of the element to add.</param>
- <remarks>
- <para>
- As the collection is empty no new values can be added. A <see cref="T:System.InvalidOperationException"/>
- is thrown if this method is called.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">This dictionary is always empty and cannot be modified.</exception>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.Clear">
- <summary>
- Removes all elements from the <see cref="T:log4net.Util.EmptyDictionary"/>.
- </summary>
- <remarks>
- <para>
- As the collection is empty no values can be removed. A <see cref="T:System.InvalidOperationException"/>
- is thrown if this method is called.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">This dictionary is always empty and cannot be modified.</exception>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.Contains(System.Object)">
- <summary>
- Determines whether the <see cref="T:log4net.Util.EmptyDictionary"/> contains an element
- with the specified key.
- </summary>
- <param name="key">The key to locate in the <see cref="T:log4net.Util.EmptyDictionary"/>.</param>
- <returns><c>false</c></returns>
- <remarks>
- <para>
- As the collection is empty the <see cref="M:log4net.Util.EmptyDictionary.Contains(System.Object)"/> method always returns <c>false</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.GetEnumerator">
- <summary>
- Returns an enumerator that can iterate through a collection.
- </summary>
- <returns>
- An <see cref="T:System.Collections.IEnumerator"/> that can be used to
- iterate through the collection.
- </returns>
- <remarks>
- <para>
- As the collection is empty a <see cref="T:log4net.Util.NullEnumerator"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.EmptyDictionary.Remove(System.Object)">
- <summary>
- Removes the element with the specified key from the <see cref="T:log4net.Util.EmptyDictionary"/>.
- </summary>
- <param name="key">The key of the element to remove.</param>
- <remarks>
- <para>
- As the collection is empty no values can be removed. A <see cref="T:System.InvalidOperationException"/>
- is thrown if this method is called.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">This dictionary is always empty and cannot be modified.</exception>
- </member>
- <member name="F:log4net.Util.EmptyDictionary.s_instance">
- <summary>
- The singleton instance of the empty dictionary.
- </summary>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.Instance">
- <summary>
- Gets the singleton instance of the <see cref="T:log4net.Util.EmptyDictionary"/>.
- </summary>
- <returns>The singleton instance of the <see cref="T:log4net.Util.EmptyDictionary"/>.</returns>
- <remarks>
- <para>
- Gets the singleton instance of the <see cref="T:log4net.Util.EmptyDictionary"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.IsSynchronized">
- <summary>
- Gets a value indicating if access to the <see cref="T:System.Collections.ICollection"/> is synchronized (thread-safe).
- </summary>
- <value>
- <b>true</b> if access to the <see cref="T:System.Collections.ICollection"/> is synchronized (thread-safe); otherwise, <b>false</b>.
- </value>
- <remarks>
- <para>
- For the <see cref="T:log4net.Util.EmptyCollection"/> this property is always <b>true</b>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.Count">
- <summary>
- Gets the number of elements contained in the <see cref="T:System.Collections.ICollection"/>
- </summary>
- <value>
- The number of elements contained in the <see cref="T:System.Collections.ICollection"/>.
- </value>
- <remarks>
- <para>
- As the collection is empty the <see cref="P:log4net.Util.EmptyDictionary.Count"/> is always <c>0</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.SyncRoot">
- <summary>
- Gets an object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"/>.
- </summary>
- <value>
- An object that can be used to synchronize access to the <see cref="T:System.Collections.ICollection"/>.
- </value>
- <remarks>
- <para>
- As the collection is empty and thread safe and synchronized this instance is also
- the <see cref="P:log4net.Util.EmptyDictionary.SyncRoot"/> object.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.IsFixedSize">
- <summary>
- Gets a value indicating whether the <see cref="T:log4net.Util.EmptyDictionary"/> has a fixed size.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- As the collection is empty <see cref="P:log4net.Util.EmptyDictionary.IsFixedSize"/> always returns <c>true</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.IsReadOnly">
- <summary>
- Gets a value indicating whether the <see cref="T:log4net.Util.EmptyDictionary"/> is read-only.
- </summary>
- <value><c>true</c></value>
- <remarks>
- <para>
- As the collection is empty <see cref="P:log4net.Util.EmptyDictionary.IsReadOnly"/> always returns <c>true</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.Keys">
- <summary>
- Gets an <see cref="T:System.Collections.ICollection"/> containing the keys of the <see cref="T:log4net.Util.EmptyDictionary"/>.
- </summary>
- <value>An <see cref="T:System.Collections.ICollection"/> containing the keys of the <see cref="T:log4net.Util.EmptyDictionary"/>.</value>
- <remarks>
- <para>
- As the collection is empty a <see cref="T:log4net.Util.EmptyCollection"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.Values">
- <summary>
- Gets an <see cref="T:System.Collections.ICollection"/> containing the values of the <see cref="T:log4net.Util.EmptyDictionary"/>.
- </summary>
- <value>An <see cref="T:System.Collections.ICollection"/> containing the values of the <see cref="T:log4net.Util.EmptyDictionary"/>.</value>
- <remarks>
- <para>
- As the collection is empty a <see cref="T:log4net.Util.EmptyCollection"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.EmptyDictionary.Item(System.Object)">
- <summary>
- Gets or sets the element with the specified key.
- </summary>
- <param name="key">The key of the element to get or set.</param>
- <value><c>null</c></value>
- <remarks>
- <para>
- As the collection is empty no values can be looked up or stored.
- If the index getter is called then <c>null</c> is returned.
- A <see cref="T:System.InvalidOperationException"/> is thrown if the setter is called.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">This dictionary is always empty and cannot be modified.</exception>
- </member>
- <member name="T:log4net.Util.FormattingInfo">
- <summary>
- Contain the information obtained when parsing formatting modifiers
- in conversion modifiers.
- </summary>
- <remarks>
- <para>
- Holds the formatting information extracted from the format string by
- the <see cref="T:log4net.Util.PatternParser"/>. This is used by the <see cref="T:log4net.Util.PatternConverter"/>
- objects when rendering the output.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.FormattingInfo.#ctor">
- <summary>
- Defaut Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.FormattingInfo"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.FormattingInfo.#ctor(System.Int32,System.Int32,System.Boolean)">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.FormattingInfo"/> class
- with the specified parameters.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.FormattingInfo.Min">
- <summary>
- Gets or sets the minimum value.
- </summary>
- <value>
- The minimum value.
- </value>
- <remarks>
- <para>
- Gets or sets the minimum value.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.FormattingInfo.Max">
- <summary>
- Gets or sets the maximum value.
- </summary>
- <value>
- The maximum value.
- </value>
- <remarks>
- <para>
- Gets or sets the maximum value.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.FormattingInfo.LeftAlign">
- <summary>
- Gets or sets a flag indicating whether left align is enabled
- or not.
- </summary>
- <value>
- A flag indicating whether left align is enabled or not.
- </value>
- <remarks>
- <para>
- Gets or sets a flag indicating whether left align is enabled or not.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.GlobalContextProperties">
- <summary>
- Implementation of Properties collection for the <see cref="T:log4net.GlobalContext"/>
- </summary>
- <remarks>
- <para>
- This class implements a properties collection that is thread safe and supports both
- storing properties and capturing a read only copy of the current propertied.
- </para>
- <para>
- This class is optimized to the scenario where the properties are read frequently
- and are modified infrequently.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.GlobalContextProperties.m_readOnlyProperties">
- <summary>
- The read only copy of the properties.
- </summary>
- <remarks>
- <para>
- This variable is declared <c>volatile</c> to prevent the compiler and JIT from
- reordering reads and writes of this thread performed on different threads.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.GlobalContextProperties.m_syncRoot">
- <summary>
- Lock object used to synchronize updates within this instance
- </summary>
- </member>
- <member name="M:log4net.Util.GlobalContextProperties.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.GlobalContextProperties"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.GlobalContextProperties.Remove(System.String)">
- <summary>
- Remove a property from the global context
- </summary>
- <param name="key">the key for the entry to remove</param>
- <remarks>
- <para>
- Removing an entry from the global context properties is relatively expensive compared
- with reading a value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.GlobalContextProperties.Clear">
- <summary>
- Clear the global context properties
- </summary>
- </member>
- <member name="M:log4net.Util.GlobalContextProperties.GetReadOnlyProperties">
- <summary>
- Get a readonly immutable copy of the properties
- </summary>
- <returns>the current global context properties</returns>
- <remarks>
- <para>
- This implementation is fast because the GlobalContextProperties class
- stores a readonly copy of the properties.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.GlobalContextProperties.Item(System.String)">
- <summary>
- Gets or sets the value of a property
- </summary>
- <value>
- The value for the property with the specified key
- </value>
- <remarks>
- <para>
- Reading the value for a key is faster than setting the value.
- When the value is written a new read only copy of
- the properties is created.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.LevelMapping">
- <summary>
- Manages a mapping from levels to <see cref="T:log4net.Util.LevelMappingEntry"/>
- </summary>
- <remarks>
- <para>
- Manages an ordered mapping from <see cref="T:log4net.Core.Level"/> instances
- to <see cref="T:log4net.Util.LevelMappingEntry"/> subclasses.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.LevelMapping.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Initialise a new instance of <see cref="T:log4net.Util.LevelMapping"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LevelMapping.Add(log4net.Util.LevelMappingEntry)">
- <summary>
- Add a <see cref="T:log4net.Util.LevelMappingEntry"/> to this mapping
- </summary>
- <param name="entry">the entry to add</param>
- <remarks>
- <para>
- If a <see cref="T:log4net.Util.LevelMappingEntry"/> has previously been added
- for the same <see cref="T:log4net.Core.Level"/> then that entry will be
- overwritten.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LevelMapping.Lookup(log4net.Core.Level)">
- <summary>
- Lookup the mapping for the specified level
- </summary>
- <param name="level">the level to lookup</param>
- <returns>the <see cref="T:log4net.Util.LevelMappingEntry"/> for the level or <c>null</c> if no mapping found</returns>
- <remarks>
- <para>
- Lookup the value for the specified level. Finds the nearest
- mapping value for the level that is equal to or less than the
- <paramref name="level"/> specified.
- </para>
- <para>
- If no mapping could be found then <c>null</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LevelMapping.ActivateOptions">
- <summary>
- Initialize options
- </summary>
- <remarks>
- <para>
- Caches the sorted list of <see cref="T:log4net.Util.LevelMappingEntry"/> in an array
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.LogicalThreadContextProperties">
- <summary>
- Implementation of Properties collection for the <see cref="T:log4net.LogicalThreadContext"/>
- </summary>
- <remarks>
- <para>
- Class implements a collection of properties that is specific to each thread.
- The class is not synchronized as each thread has its own <see cref="T:log4net.Util.PropertiesDictionary"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.LogicalThreadContextProperties.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.LogicalThreadContextProperties"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogicalThreadContextProperties.Remove(System.String)">
- <summary>
- Remove a property
- </summary>
- <param name="key">the key for the entry to remove</param>
- <remarks>
- <para>
- Remove the value for the specified <paramref name="key"/> from the context.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogicalThreadContextProperties.Clear">
- <summary>
- Clear all the context properties
- </summary>
- <remarks>
- <para>
- Clear all the context properties
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogicalThreadContextProperties.GetProperties(System.Boolean)">
- <summary>
- Get the PropertiesDictionary stored in the LocalDataStoreSlot for this thread.
- </summary>
- <param name="create">create the dictionary if it does not exist, otherwise return null if is does not exist</param>
- <returns>the properties for this thread</returns>
- <remarks>
- <para>
- The collection returned is only to be used on the calling thread. If the
- caller needs to share the collection between different threads then the
- caller must clone the collection before doings so.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.LogicalThreadContextProperties.Item(System.String)">
- <summary>
- Gets or sets the value of a property
- </summary>
- <value>
- The value for the property with the specified key
- </value>
- <remarks>
- <para>
- Get or set the property value for the <paramref name="key"/> specified.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.LogLog">
- <summary>
- Outputs log statements from within the log4net assembly.
- </summary>
- <remarks>
- <para>
- Log4net components cannot make log4net logging calls. However, it is
- sometimes useful for the user to learn about what log4net is
- doing.
- </para>
- <para>
- All log4net internal debug calls go to the standard output stream
- whereas internal error messages are sent to the standard error output
- stream.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.LogLog.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.LogLog"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to prevent instantiation of this class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.#cctor">
- <summary>
- Static constructor that initializes logging by reading
- settings from the application configuration file.
- </summary>
- <remarks>
- <para>
- The <c>log4net.Internal.Debug</c> application setting
- controls internal debugging. This setting should be set
- to <c>true</c> to enable debugging.
- </para>
- <para>
- The <c>log4net.Internal.Quiet</c> application setting
- suppresses all internal logging including error messages.
- This setting should be set to <c>true</c> to enable message
- suppression.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.Debug(System.String)">
- <summary>
- Writes log4net internal debug messages to the
- standard output stream.
- </summary>
- <param name="message">The message to log.</param>
- <remarks>
- <para>
- All internal debug messages are prepended with
- the string "log4net: ".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.Debug(System.String,System.Exception)">
- <summary>
- Writes log4net internal debug messages to the
- standard output stream.
- </summary>
- <param name="message">The message to log.</param>
- <param name="exception">An exception to log.</param>
- <remarks>
- <para>
- All internal debug messages are prepended with
- the string "log4net: ".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.Warn(System.String)">
- <summary>
- Writes log4net internal warning messages to the
- standard error stream.
- </summary>
- <param name="message">The message to log.</param>
- <remarks>
- <para>
- All internal warning messages are prepended with
- the string "log4net:WARN ".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.Warn(System.String,System.Exception)">
- <summary>
- Writes log4net internal warning messages to the
- standard error stream.
- </summary>
- <param name="message">The message to log.</param>
- <param name="exception">An exception to log.</param>
- <remarks>
- <para>
- All internal warning messages are prepended with
- the string "log4net:WARN ".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.Error(System.String)">
- <summary>
- Writes log4net internal error messages to the
- standard error stream.
- </summary>
- <param name="message">The message to log.</param>
- <remarks>
- <para>
- All internal error messages are prepended with
- the string "log4net:ERROR ".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.Error(System.String,System.Exception)">
- <summary>
- Writes log4net internal error messages to the
- standard error stream.
- </summary>
- <param name="message">The message to log.</param>
- <param name="exception">An exception to log.</param>
- <remarks>
- <para>
- All internal debug messages are prepended with
- the string "log4net:ERROR ".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.EmitOutLine(System.String)">
- <summary>
- Writes output to the standard output stream.
- </summary>
- <param name="message">The message to log.</param>
- <remarks>
- <para>
- Writes to both Console.Out and System.Diagnostics.Trace.
- Note that the System.Diagnostics.Trace is not supported
- on the Compact Framework.
- </para>
- <para>
- If the AppDomain is not configured with a config file then
- the call to System.Diagnostics.Trace may fail. This is only
- an issue if you are programmatically creating your own AppDomains.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.LogLog.EmitErrorLine(System.String)">
- <summary>
- Writes output to the standard error stream.
- </summary>
- <param name="message">The message to log.</param>
- <remarks>
- <para>
- Writes to both Console.Error and System.Diagnostics.Trace.
- Note that the System.Diagnostics.Trace is not supported
- on the Compact Framework.
- </para>
- <para>
- If the AppDomain is not configured with a config file then
- the call to System.Diagnostics.Trace may fail. This is only
- an issue if you are programmatically creating your own AppDomains.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.LogLog.s_debugEnabled">
- <summary>
- Default debug level
- </summary>
- </member>
- <member name="F:log4net.Util.LogLog.s_quietMode">
- <summary>
- In quietMode not even errors generate any output.
- </summary>
- </member>
- <member name="P:log4net.Util.LogLog.InternalDebugging">
- <summary>
- Gets or sets a value indicating whether log4net internal logging
- is enabled or disabled.
- </summary>
- <value>
- <c>true</c> if log4net internal logging is enabled, otherwise
- <c>false</c>.
- </value>
- <remarks>
- <para>
- When set to <c>true</c>, internal debug level logging will be
- displayed.
- </para>
- <para>
- This value can be set by setting the application setting
- <c>log4net.Internal.Debug</c> in the application configuration
- file.
- </para>
- <para>
- The default value is <c>false</c>, i.e. debugging is
- disabled.
- </para>
- </remarks>
- <example>
- <para>
- The following example enables internal debugging using the
- application configuration file :
- </para>
- <code lang="XML" escaped="true">
- <configuration>
- <appSettings>
- <add key="log4net.Internal.Debug" value="true" />
- </appSettings>
- </configuration>
- </code>
- </example>
- </member>
- <member name="P:log4net.Util.LogLog.QuietMode">
- <summary>
- Gets or sets a value indicating whether log4net should generate no output
- from internal logging, not even for errors.
- </summary>
- <value>
- <c>true</c> if log4net should generate no output at all from internal
- logging, otherwise <c>false</c>.
- </value>
- <remarks>
- <para>
- When set to <c>true</c> will cause internal logging at all levels to be
- suppressed. This means that no warning or error reports will be logged.
- This option overrides the <see cref="P:log4net.Util.LogLog.InternalDebugging"/> setting and
- disables all debug also.
- </para>
- <para>This value can be set by setting the application setting
- <c>log4net.Internal.Quiet</c> in the application configuration file.
- </para>
- <para>
- The default value is <c>false</c>, i.e. internal logging is not
- disabled.
- </para>
- </remarks>
- <example>
- The following example disables internal logging using the
- application configuration file :
- <code lang="XML" escaped="true">
- <configuration>
- <appSettings>
- <add key="log4net.Internal.Quiet" value="true"/>
- </appSettings>
- </configuration>
- </code>
- </example>
- </member>
- <member name="P:log4net.Util.LogLog.IsDebugEnabled">
- <summary>
- Test if LogLog.Debug is enabled for output.
- </summary>
- <value>
- <c>true</c> if Debug is enabled
- </value>
- <remarks>
- <para>
- Test if LogLog.Debug is enabled for output.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.LogLog.IsWarnEnabled">
- <summary>
- Test if LogLog.Warn is enabled for output.
- </summary>
- <value>
- <c>true</c> if Warn is enabled
- </value>
- <remarks>
- <para>
- Test if LogLog.Warn is enabled for output.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.LogLog.IsErrorEnabled">
- <summary>
- Test if LogLog.Error is enabled for output.
- </summary>
- <value>
- <c>true</c> if Error is enabled
- </value>
- <remarks>
- <para>
- Test if LogLog.Error is enabled for output.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.NativeError">
- <summary>
- Represents a native error code and message.
- </summary>
- <remarks>
- <para>
- Represents a Win32 platform native error.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.NativeError.#ctor(System.Int32,System.String)">
- <summary>
- Create an instance of the <see cref="T:log4net.Util.NativeError"/> class with the specified
- error number and message.
- </summary>
- <param name="number">The number of the native error.</param>
- <param name="message">The message of the native error.</param>
- <remarks>
- <para>
- Create an instance of the <see cref="T:log4net.Util.NativeError"/> class with the specified
- error number and message.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NativeError.GetLastError">
- <summary>
- Create a new instance of the <see cref="T:log4net.Util.NativeError"/> class for the last Windows error.
- </summary>
- <returns>
- An instance of the <see cref="T:log4net.Util.NativeError"/> class for the last windows error.
- </returns>
- <remarks>
- <para>
- The message for the <see cref="M:System.Runtime.InteropServices.Marshal.GetLastWin32Error"/> error number is lookup up using the
- native Win32 <c>FormatMessage</c> function.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NativeError.GetError(System.Int32)">
- <summary>
- Create a new instance of the <see cref="T:log4net.Util.NativeError"/> class.
- </summary>
- <param name="number">the error number for the native error</param>
- <returns>
- An instance of the <see cref="T:log4net.Util.NativeError"/> class for the specified
- error number.
- </returns>
- <remarks>
- <para>
- The message for the specified error number is lookup up using the
- native Win32 <c>FormatMessage</c> function.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NativeError.GetErrorMessage(System.Int32)">
- <summary>
- Retrieves the message corresponding with a Win32 message identifier.
- </summary>
- <param name="messageId">Message identifier for the requested message.</param>
- <returns>
- The message corresponding with the specified message identifier.
- </returns>
- <remarks>
- <para>
- The message will be searched for in system message-table resource(s)
- using the native <c>FormatMessage</c> function.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NativeError.ToString">
- <summary>
- Return error information string
- </summary>
- <returns>error information string</returns>
- <remarks>
- <para>
- Return error information string
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NativeError.FormatMessage(System.Int32,System.IntPtr@,System.Int32,System.Int32,System.String@,System.Int32,System.IntPtr)">
- <summary>
- Formats a message string.
- </summary>
- <param name="dwFlags">Formatting options, and how to interpret the <paramref name="lpSource"/> parameter.</param>
- <param name="lpSource">Location of the message definition.</param>
- <param name="dwMessageId">Message identifier for the requested message.</param>
- <param name="dwLanguageId">Language identifier for the requested message.</param>
- <param name="lpBuffer">If <paramref name="dwFlags"/> includes FORMAT_MESSAGE_ALLOCATE_BUFFER, the function allocates a buffer using the <c>LocalAlloc</c> function, and places the pointer to the buffer at the address specified in <paramref name="lpBuffer"/>.</param>
- <param name="nSize">If the FORMAT_MESSAGE_ALLOCATE_BUFFER flag is not set, this parameter specifies the maximum number of TCHARs that can be stored in the output buffer. If FORMAT_MESSAGE_ALLOCATE_BUFFER is set, this parameter specifies the minimum number of TCHARs to allocate for an output buffer.</param>
- <param name="Arguments">Pointer to an array of values that are used as insert values in the formatted message.</param>
- <remarks>
- <para>
- The function requires a message definition as input. The message definition can come from a
- buffer passed into the function. It can come from a message table resource in an
- already-loaded module. Or the caller can ask the function to search the system's message
- table resource(s) for the message definition. The function finds the message definition
- in a message table resource based on a message identifier and a language identifier.
- The function copies the formatted message text to an output buffer, processing any embedded
- insert sequences if requested.
- </para>
- <para>
- To prevent the usage of unsafe code, this stub does not support inserting values in the formatted message.
- </para>
- </remarks>
- <returns>
- <para>
- If the function succeeds, the return value is the number of TCHARs stored in the output
- buffer, excluding the terminating null character.
- </para>
- <para>
- If the function fails, the return value is zero. To get extended error information,
- call <see cref="M:System.Runtime.InteropServices.Marshal.GetLastWin32Error"/>.
- </para>
- </returns>
- </member>
- <member name="P:log4net.Util.NativeError.Number">
- <summary>
- Gets the number of the native error.
- </summary>
- <value>
- The number of the native error.
- </value>
- <remarks>
- <para>
- Gets the number of the native error.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.NativeError.Message">
- <summary>
- Gets the message of the native error.
- </summary>
- <value>
- The message of the native error.
- </value>
- <remarks>
- <para>
- </para>
- Gets the message of the native error.
- </remarks>
- </member>
- <member name="T:log4net.Util.NullDictionaryEnumerator">
- <summary>
- An always empty <see cref="T:System.Collections.IDictionaryEnumerator"/>.
- </summary>
- <remarks>
- <para>
- A singleton implementation of the <see cref="T:System.Collections.IDictionaryEnumerator"/> over a collection
- that is empty and not modifiable.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.NullDictionaryEnumerator.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.NullDictionaryEnumerator"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to enforce the singleton pattern.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NullDictionaryEnumerator.MoveNext">
- <summary>
- Test if the enumerator can advance, if so advance.
- </summary>
- <returns><c>false</c> as the <see cref="T:log4net.Util.NullDictionaryEnumerator"/> cannot advance.</returns>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="M:log4net.Util.NullDictionaryEnumerator.MoveNext"/>
- will always return <c>false</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NullDictionaryEnumerator.Reset">
- <summary>
- Resets the enumerator back to the start.
- </summary>
- <remarks>
- <para>
- As the enumerator is over an empty collection <see cref="M:log4net.Util.NullDictionaryEnumerator.Reset"/> does nothing.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.NullDictionaryEnumerator.s_instance">
- <summary>
- The singleton instance of the <see cref="T:log4net.Util.NullDictionaryEnumerator"/>.
- </summary>
- </member>
- <member name="P:log4net.Util.NullDictionaryEnumerator.Instance">
- <summary>
- Gets the singleton instance of the <see cref="T:log4net.Util.NullDictionaryEnumerator"/>.
- </summary>
- <returns>The singleton instance of the <see cref="T:log4net.Util.NullDictionaryEnumerator"/>.</returns>
- <remarks>
- <para>
- Gets the singleton instance of the <see cref="T:log4net.Util.NullDictionaryEnumerator"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.NullDictionaryEnumerator.Current">
- <summary>
- Gets the current object from the enumerator.
- </summary>
- <remarks>
- Throws an <see cref="T:System.InvalidOperationException"/> because the
- <see cref="T:log4net.Util.NullDictionaryEnumerator"/> never has a current value.
- </remarks>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- will throw an <see cref="T:System.InvalidOperationException"/>.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">The collection is empty and <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- cannot be positioned over a valid location.</exception>
- </member>
- <member name="P:log4net.Util.NullDictionaryEnumerator.Key">
- <summary>
- Gets the current key from the enumerator.
- </summary>
- <remarks>
- Throws an exception because the <see cref="T:log4net.Util.NullDictionaryEnumerator"/>
- never has a current value.
- </remarks>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="P:log4net.Util.NullDictionaryEnumerator.Key"/>
- will throw an <see cref="T:System.InvalidOperationException"/>.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">The collection is empty and <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- cannot be positioned over a valid location.</exception>
- </member>
- <member name="P:log4net.Util.NullDictionaryEnumerator.Value">
- <summary>
- Gets the current value from the enumerator.
- </summary>
- <value>The current value from the enumerator.</value>
- <remarks>
- Throws an <see cref="T:System.InvalidOperationException"/> because the
- <see cref="T:log4net.Util.NullDictionaryEnumerator"/> never has a current value.
- </remarks>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="P:log4net.Util.NullDictionaryEnumerator.Value"/>
- will throw an <see cref="T:System.InvalidOperationException"/>.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">The collection is empty and <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- cannot be positioned over a valid location.</exception>
- </member>
- <member name="P:log4net.Util.NullDictionaryEnumerator.Entry">
- <summary>
- Gets the current entry from the enumerator.
- </summary>
- <remarks>
- Throws an <see cref="T:System.InvalidOperationException"/> because the
- <see cref="T:log4net.Util.NullDictionaryEnumerator"/> never has a current entry.
- </remarks>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="P:log4net.Util.NullDictionaryEnumerator.Entry"/>
- will throw an <see cref="T:System.InvalidOperationException"/>.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">The collection is empty and <see cref="P:log4net.Util.NullDictionaryEnumerator.Current"/>
- cannot be positioned over a valid location.</exception>
- </member>
- <member name="T:log4net.Util.NullEnumerator">
- <summary>
- An always empty <see cref="T:System.Collections.IEnumerator"/>.
- </summary>
- <remarks>
- <para>
- A singleton implementation of the <see cref="T:System.Collections.IEnumerator"/> over a collection
- that is empty and not modifiable.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.NullEnumerator.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.NullEnumerator"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to enforce the singleton pattern.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NullEnumerator.MoveNext">
- <summary>
- Test if the enumerator can advance, if so advance
- </summary>
- <returns><c>false</c> as the <see cref="T:log4net.Util.NullEnumerator"/> cannot advance.</returns>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="M:log4net.Util.NullEnumerator.MoveNext"/>
- will always return <c>false</c>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NullEnumerator.Reset">
- <summary>
- Resets the enumerator back to the start.
- </summary>
- <remarks>
- <para>
- As the enumerator is over an empty collection <see cref="M:log4net.Util.NullEnumerator.Reset"/> does nothing.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.NullEnumerator.s_instance">
- <summary>
- The singleton instance of the <see cref="T:log4net.Util.NullEnumerator"/>.
- </summary>
- </member>
- <member name="P:log4net.Util.NullEnumerator.Instance">
- <summary>
- Get the singleton instance of the <see cref="T:log4net.Util.NullEnumerator"/>.
- </summary>
- <returns>The singleton instance of the <see cref="T:log4net.Util.NullEnumerator"/>.</returns>
- <remarks>
- <para>
- Gets the singleton instance of the <see cref="T:log4net.Util.NullEnumerator"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.NullEnumerator.Current">
- <summary>
- Gets the current object from the enumerator.
- </summary>
- <remarks>
- Throws an <see cref="T:System.InvalidOperationException"/> because the
- <see cref="T:log4net.Util.NullDictionaryEnumerator"/> never has a current value.
- </remarks>
- <remarks>
- <para>
- As the enumerator is over an empty collection its <see cref="P:log4net.Util.NullEnumerator.Current"/>
- value cannot be moved over a valid position, therefore <see cref="P:log4net.Util.NullEnumerator.Current"/>
- will throw an <see cref="T:System.InvalidOperationException"/>.
- </para>
- </remarks>
- <exception cref="T:System.InvalidOperationException">The collection is empty and <see cref="P:log4net.Util.NullEnumerator.Current"/>
- cannot be positioned over a valid location.</exception>
- </member>
- <member name="T:log4net.Util.NullSecurityContext">
- <summary>
- A SecurityContext used when a SecurityContext is not required
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.Util.NullSecurityContext"/> is a no-op implementation of the
- <see cref="T:log4net.Core.SecurityContext"/> base class. It is used where a <see cref="T:log4net.Core.SecurityContext"/>
- is required but one has not been provided.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.NullSecurityContext.Instance">
- <summary>
- Singleton instance of <see cref="T:log4net.Util.NullSecurityContext"/>
- </summary>
- <remarks>
- <para>
- Singleton instance of <see cref="T:log4net.Util.NullSecurityContext"/>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NullSecurityContext.#ctor">
- <summary>
- Private constructor
- </summary>
- <remarks>
- <para>
- Private constructor for singleton pattern.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.NullSecurityContext.Impersonate(System.Object)">
- <summary>
- Impersonate this SecurityContext
- </summary>
- <param name="state">State supplied by the caller</param>
- <returns><c>null</c></returns>
- <remarks>
- <para>
- No impersonation is done and <c>null</c> is always returned.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.OnlyOnceErrorHandler">
- <summary>
- Implements log4net's default error handling policy which consists
- of emitting a message for the first error in an appender and
- ignoring all subsequent errors.
- </summary>
- <remarks>
- <para>
- The error message is printed on the standard error output stream.
- </para>
- <para>
- This policy aims at protecting an otherwise working application
- from being flooded with error messages when logging fails.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.OnlyOnceErrorHandler.#ctor">
- <summary>
- Default Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.OnlyOnceErrorHandler"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OnlyOnceErrorHandler.#ctor(System.String)">
- <summary>
- Constructor
- </summary>
- <param name="prefix">The prefix to use for each message.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.OnlyOnceErrorHandler"/> class
- with the specified prefix.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OnlyOnceErrorHandler.Error(System.String,System.Exception,log4net.Core.ErrorCode)">
- <summary>
- Log an Error
- </summary>
- <param name="message">The error message.</param>
- <param name="e">The exception.</param>
- <param name="errorCode">The internal error code.</param>
- <remarks>
- <para>
- Prints the message and the stack trace of the exception on the standard
- error output stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OnlyOnceErrorHandler.Error(System.String,System.Exception)">
- <summary>
- Log an Error
- </summary>
- <param name="message">The error message.</param>
- <param name="e">The exception.</param>
- <remarks>
- <para>
- Prints the message and the stack trace of the exception on the standard
- error output stream.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OnlyOnceErrorHandler.Error(System.String)">
- <summary>
- Log an error
- </summary>
- <param name="message">The error message.</param>
- <remarks>
- <para>
- Print a the error message passed as parameter on the standard
- error output stream.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.OnlyOnceErrorHandler.m_firstTime">
- <summary>
- Flag to indicate if it is the first error
- </summary>
- </member>
- <member name="F:log4net.Util.OnlyOnceErrorHandler.m_prefix">
- <summary>
- String to prefix each message with
- </summary>
- </member>
- <member name="P:log4net.Util.OnlyOnceErrorHandler.IsEnabled">
- <summary>
- Is error logging enabled
- </summary>
- <remarks>
- <para>
- Is error logging enabled. Logging is only enabled for the
- first error delivered to the <see cref="T:log4net.Util.OnlyOnceErrorHandler"/>.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.OptionConverter">
- <summary>
- A convenience class to convert property values to specific types.
- </summary>
- <remarks>
- <para>
- Utility functions for converting types and parsing values.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.OptionConverter.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.OptionConverter"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to prevent instantiation of this class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.ToBoolean(System.String,System.Boolean)">
- <summary>
- Converts a string to a <see cref="T:System.Boolean"/> value.
- </summary>
- <param name="argValue">String to convert.</param>
- <param name="defaultValue">The default value.</param>
- <returns>The <see cref="T:System.Boolean"/> value of <paramref name="argValue"/>.</returns>
- <remarks>
- <para>
- If <paramref name="argValue"/> is "true", then <c>true</c> is returned.
- If <paramref name="argValue"/> is "false", then <c>false</c> is returned.
- Otherwise, <paramref name="defaultValue"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.ToFileSize(System.String,System.Int64)">
- <summary>
- Parses a file size into a number.
- </summary>
- <param name="argValue">String to parse.</param>
- <param name="defaultValue">The default value.</param>
- <returns>The <see cref="T:System.Int64"/> value of <paramref name="argValue"/>.</returns>
- <remarks>
- <para>
- Parses a file size of the form: number[KB|MB|GB] into a
- long value. It is scaled with the appropriate multiplier.
- </para>
- <para>
- <paramref name="defaultValue"/> is returned when <paramref name="argValue"/>
- cannot be converted to a <see cref="T:System.Int64"/> value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.ConvertStringTo(System.Type,System.String)">
- <summary>
- Converts a string to an object.
- </summary>
- <param name="target">The target type to convert to.</param>
- <param name="txt">The string to convert to an object.</param>
- <returns>
- The object converted from a string or <c>null</c> when the
- conversion failed.
- </returns>
- <remarks>
- <para>
- Converts a string to an object. Uses the converter registry to try
- to convert the string value into the specified target type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.CanConvertTypeTo(System.Type,System.Type)">
- <summary>
- Checks if there is an appropriate type conversion from the source type to the target type.
- </summary>
- <param name="sourceType">The type to convert from.</param>
- <param name="targetType">The type to convert to.</param>
- <returns><c>true</c> if there is a conversion from the source type to the target type.</returns>
- <remarks>
- Checks if there is an appropriate type conversion from the source type to the target type.
- <para>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.ConvertTypeTo(System.Object,System.Type)">
- <summary>
- Converts an object to the target type.
- </summary>
- <param name="sourceInstance">The object to convert to the target type.</param>
- <param name="targetType">The type to convert to.</param>
- <returns>The converted object.</returns>
- <remarks>
- <para>
- Converts an object to the target type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.InstantiateByClassName(System.String,System.Type,System.Object)">
- <summary>
- Instantiates an object given a class name.
- </summary>
- <param name="className">The fully qualified class name of the object to instantiate.</param>
- <param name="superClass">The class to which the new object should belong.</param>
- <param name="defaultValue">The object to return in case of non-fulfillment.</param>
- <returns>
- An instance of the <paramref name="className"/> or <paramref name="defaultValue"/>
- if the object could not be instantiated.
- </returns>
- <remarks>
- <para>
- Checks that the <paramref name="className"/> is a subclass of
- <paramref name="superClass"/>. If that test fails or the object could
- not be instantiated, then <paramref name="defaultValue"/> is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.SubstituteVariables(System.String,System.Collections.IDictionary)">
- <summary>
- Performs variable substitution in string <paramref name="val"/> from the
- values of keys found in <paramref name="props"/>.
- </summary>
- <param name="value">The string on which variable substitution is performed.</param>
- <param name="props">The dictionary to use to lookup variables.</param>
- <returns>The result of the substitutions.</returns>
- <remarks>
- <para>
- The variable substitution delimiters are <b>${</b> and <b>}</b>.
- </para>
- <para>
- For example, if props contains <c>key=value</c>, then the call
- </para>
- <para>
- <code lang="C#">
- string s = OptionConverter.SubstituteVariables("Value of key is ${key}.");
- </code>
- </para>
- <para>
- will set the variable <c>s</c> to "Value of key is value.".
- </para>
- <para>
- If no value could be found for the specified key, then substitution
- defaults to an empty string.
- </para>
- <para>
- For example, if system properties contains no value for the key
- "nonExistentKey", then the call
- </para>
- <para>
- <code lang="C#">
- string s = OptionConverter.SubstituteVariables("Value of nonExistentKey is [${nonExistentKey}]");
- </code>
- </para>
- <para>
- will set <s>s</s> to "Value of nonExistentKey is []".
- </para>
- <para>
- An Exception is thrown if <paramref name="value"/> contains a start
- delimiter "${" which is not balanced by a stop delimiter "}".
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.OptionConverter.ParseEnum(System.Type,System.String,System.Boolean)">
- <summary>
- Converts the string representation of the name or numeric value of one or
- more enumerated constants to an equivalent enumerated object.
- </summary>
- <param name="enumType">The type to convert to.</param>
- <param name="value">The enum string value.</param>
- <param name="ignoreCase">If <c>true</c>, ignore case; otherwise, regard case.</param>
- <returns>An object of type <paramref name="enumType" /> whose value is represented by <paramref name="value" />.</returns>
- </member>
- <member name="T:log4net.Util.PatternParser">
- <summary>
- Most of the work of the <see cref="T:log4net.Layout.PatternLayout"/> class
- is delegated to the PatternParser class.
- </summary>
- <remarks>
- <para>
- The <c>PatternParser</c> processes a pattern string and
- returns a chain of <see cref="T:log4net.Util.PatternConverter"/> objects.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.PatternParser.#ctor(System.String)">
- <summary>
- Constructor
- </summary>
- <param name="pattern">The pattern to parse.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.PatternParser"/> class
- with the specified pattern string.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternParser.Parse">
- <summary>
- Parses the pattern into a chain of pattern converters.
- </summary>
- <returns>The head of a chain of pattern converters.</returns>
- <remarks>
- <para>
- Parses the pattern into a chain of pattern converters.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternParser.BuildCache">
- <summary>
- Build the unified cache of converters from the static and instance maps
- </summary>
- <returns>the list of all the converter names</returns>
- <remarks>
- <para>
- Build the unified cache of converters from the static and instance maps
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternParser.ParseInternal(System.String,System.String[])">
- <summary>
- Internal method to parse the specified pattern to find specified matches
- </summary>
- <param name="pattern">the pattern to parse</param>
- <param name="matches">the converter names to match in the pattern</param>
- <remarks>
- <para>
- The matches param must be sorted such that longer strings come before shorter ones.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternParser.ProcessLiteral(System.String)">
- <summary>
- Process a parsed literal
- </summary>
- <param name="text">the literal text</param>
- </member>
- <member name="M:log4net.Util.PatternParser.ProcessConverter(System.String,System.String,log4net.Util.FormattingInfo)">
- <summary>
- Process a parsed converter pattern
- </summary>
- <param name="converterName">the name of the converter</param>
- <param name="option">the optional option for the converter</param>
- <param name="formattingInfo">the formatting info for the converter</param>
- </member>
- <member name="M:log4net.Util.PatternParser.AddConverter(log4net.Util.PatternConverter)">
- <summary>
- Resets the internal state of the parser and adds the specified pattern converter
- to the chain.
- </summary>
- <param name="pc">The pattern converter to add.</param>
- </member>
- <member name="F:log4net.Util.PatternParser.m_head">
- <summary>
- The first pattern converter in the chain
- </summary>
- </member>
- <member name="F:log4net.Util.PatternParser.m_tail">
- <summary>
- the last pattern converter in the chain
- </summary>
- </member>
- <member name="F:log4net.Util.PatternParser.m_pattern">
- <summary>
- The pattern
- </summary>
- </member>
- <member name="F:log4net.Util.PatternParser.m_patternConverters">
- <summary>
- Internal map of converter identifiers to converter types
- </summary>
- <remarks>
- <para>
- This map overrides the static s_globalRulesRegistry map.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PatternParser.PatternConverters">
- <summary>
- Get the converter registry used by this parser
- </summary>
- <value>
- The converter registry used by this parser
- </value>
- <remarks>
- <para>
- Get the converter registry used by this parser
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternParser.StringLengthComparer">
- <summary>
- Sort strings by length
- </summary>
- <remarks>
- <para>
- <see cref="T:System.Collections.IComparer"/> that orders strings by string length.
- The longest strings are placed first
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternString">
- <summary>
- This class implements a patterned string.
- </summary>
- <remarks>
- <para>
- This string has embedded patterns that are resolved and expanded
- when the string is formatted.
- </para>
- <para>
- This class functions similarly to the <see cref="T:log4net.Layout.PatternLayout"/>
- in that it accepts a pattern and renders it to a string. Unlike the
- <see cref="T:log4net.Layout.PatternLayout"/> however the <c>PatternString</c>
- does not render the properties of a specific <see cref="T:log4net.Core.LoggingEvent"/> but
- of the process in general.
- </para>
- <para>
- The recognized conversion pattern names are:
- </para>
- <list type="table">
- <listheader>
- <term>Conversion Pattern Name</term>
- <description>Effect</description>
- </listheader>
- <item>
- <term>appdomain</term>
- <description>
- <para>
- Used to output the friendly name of the current AppDomain.
- </para>
- </description>
- </item>
- <item>
- <term>date</term>
- <description>
- <para>
- Used to output the date of the logging event in the local time zone.
- To output the date in universal time use the <c>%utcdate</c> pattern.
- The date conversion
- specifier may be followed by a <i>date format specifier</i> enclosed
- between braces. For example, <b>%date{HH:mm:ss,fff}</b> or
- <b>%date{dd MMM yyyy HH:mm:ss,fff}</b>. If no date format specifier is
- given then ISO8601 format is
- assumed (<see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>).
- </para>
- <para>
- The date format specifier admits the same syntax as the
- time pattern string of the <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- <para>
- For better results it is recommended to use the log4net date
- formatters. These can be specified using one of the strings
- "ABSOLUTE", "DATE" and "ISO8601" for specifying
- <see cref="T:log4net.DateFormatter.AbsoluteTimeDateFormatter"/>,
- <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> and respectively
- <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>. For example,
- <b>%date{ISO8601}</b> or <b>%date{ABSOLUTE}</b>.
- </para>
- <para>
- These dedicated date formatters perform significantly
- better than <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- </description>
- </item>
- <item>
- <term>env</term>
- <description>
- <para>
- Used to output the a specific environment variable. The key to
- lookup must be specified within braces and directly following the
- pattern specifier, e.g. <b>%env{COMPUTERNAME}</b> would include the value
- of the <c>COMPUTERNAME</c> environment variable.
- </para>
- <para>
- The <c>env</c> pattern is not supported on the .NET Compact Framework.
- </para>
- </description>
- </item>
- <item>
- <term>identity</term>
- <description>
- <para>
- Used to output the user name for the currently active user
- (Principal.Identity.Name).
- </para>
- </description>
- </item>
- <item>
- <term>newline</term>
- <description>
- <para>
- Outputs the platform dependent line separator character or
- characters.
- </para>
- <para>
- This conversion pattern name offers the same performance as using
- non-portable line separator strings such as "\n", or "\r\n".
- Thus, it is the preferred way of specifying a line separator.
- </para>
- </description>
- </item>
- <item>
- <term>processid</term>
- <description>
- <para>
- Used to output the system process ID for the current process.
- </para>
- </description>
- </item>
- <item>
- <term>property</term>
- <description>
- <para>
- Used to output a specific context property. The key to
- lookup must be specified within braces and directly following the
- pattern specifier, e.g. <b>%property{user}</b> would include the value
- from the property that is keyed by the string 'user'. Each property value
- that is to be included in the log must be specified separately.
- Properties are stored in logging contexts. By default
- the <c>log4net:HostName</c> property is set to the name of machine on
- which the event was originally logged.
- </para>
- <para>
- If no key is specified, e.g. <b>%property</b> then all the keys and their
- values are printed in a comma separated list.
- </para>
- <para>
- The properties of an event are combined from a number of different
- contexts. These are listed below in the order in which they are searched.
- </para>
- <list type="definition">
- <item>
- <term>the thread properties</term>
- <description>
- The <see cref="P:log4net.ThreadContext.Properties"/> that are set on the current
- thread. These properties are shared by all events logged on this thread.
- </description>
- </item>
- <item>
- <term>the global properties</term>
- <description>
- The <see cref="P:log4net.GlobalContext.Properties"/> that are set globally. These
- properties are shared by all the threads in the AppDomain.
- </description>
- </item>
- </list>
- </description>
- </item>
- <item>
- <term>random</term>
- <description>
- <para>
- Used to output a random string of characters. The string is made up of
- uppercase letters and numbers. By default the string is 4 characters long.
- The length of the string can be specified within braces directly following the
- pattern specifier, e.g. <b>%random{8}</b> would output an 8 character string.
- </para>
- </description>
- </item>
- <item>
- <term>username</term>
- <description>
- <para>
- Used to output the WindowsIdentity for the currently
- active user.
- </para>
- </description>
- </item>
- <item>
- <term>utcdate</term>
- <description>
- <para>
- Used to output the date of the logging event in universal time.
- The date conversion
- specifier may be followed by a <i>date format specifier</i> enclosed
- between braces. For example, <b>%utcdate{HH:mm:ss,fff}</b> or
- <b>%utcdate{dd MMM yyyy HH:mm:ss,fff}</b>. If no date format specifier is
- given then ISO8601 format is
- assumed (<see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>).
- </para>
- <para>
- The date format specifier admits the same syntax as the
- time pattern string of the <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- <para>
- For better results it is recommended to use the log4net date
- formatters. These can be specified using one of the strings
- "ABSOLUTE", "DATE" and "ISO8601" for specifying
- <see cref="T:log4net.DateFormatter.AbsoluteTimeDateFormatter"/>,
- <see cref="T:log4net.DateFormatter.DateTimeDateFormatter"/> and respectively
- <see cref="T:log4net.DateFormatter.Iso8601DateFormatter"/>. For example,
- <b>%utcdate{ISO8601}</b> or <b>%utcdate{ABSOLUTE}</b>.
- </para>
- <para>
- These dedicated date formatters perform significantly
- better than <see cref="M:System.DateTime.ToString(System.String)"/>.
- </para>
- </description>
- </item>
- <item>
- <term>%</term>
- <description>
- <para>
- The sequence %% outputs a single percent sign.
- </para>
- </description>
- </item>
- </list>
- <para>
- Additional pattern converters may be registered with a specific <see cref="T:log4net.Util.PatternString"/>
- instance using <see cref="M:log4net.Util.PatternString.AddConverter(log4net.Util.PatternString.ConverterInfo)"/> or
- <see cref="M:log4net.Util.PatternString.AddConverter(System.String,System.Type)"/>.
- </para>
- <para>
- See the <see cref="T:log4net.Layout.PatternLayout"/> for details on the
- <i>format modifiers</i> supported by the patterns.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.PatternString.s_globalRulesRegistry">
- <summary>
- Internal map of converter identifiers to converter types.
- </summary>
- </member>
- <member name="F:log4net.Util.PatternString.m_pattern">
- <summary>
- the pattern
- </summary>
- </member>
- <member name="F:log4net.Util.PatternString.m_head">
- <summary>
- the head of the pattern converter chain
- </summary>
- </member>
- <member name="F:log4net.Util.PatternString.m_instanceRulesRegistry">
- <summary>
- patterns defined on this PatternString only
- </summary>
- </member>
- <member name="M:log4net.Util.PatternString.#cctor">
- <summary>
- Initialize the global registry
- </summary>
- </member>
- <member name="M:log4net.Util.PatternString.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Initialize a new instance of <see cref="T:log4net.Util.PatternString"/>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.#ctor(System.String)">
- <summary>
- Constructs a PatternString
- </summary>
- <param name="pattern">The pattern to use with this PatternString</param>
- <remarks>
- <para>
- Initialize a new instance of <see cref="T:log4net.Util.PatternString"/> with the pattern specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.ActivateOptions">
- <summary>
- Initialize object options
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Util.PatternString.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Util.PatternString.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Util.PatternString.ActivateOptions"/> must be called again.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.CreatePatternParser(System.String)">
- <summary>
- Create the <see cref="T:log4net.Util.PatternParser"/> used to parse the pattern
- </summary>
- <param name="pattern">the pattern to parse</param>
- <returns>The <see cref="T:log4net.Util.PatternParser"/></returns>
- <remarks>
- <para>
- Returns PatternParser used to parse the conversion string. Subclasses
- may override this to return a subclass of PatternParser which recognize
- custom conversion pattern name.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.Format(System.IO.TextWriter)">
- <summary>
- Produces a formatted string as specified by the conversion pattern.
- </summary>
- <param name="writer">The TextWriter to write the formatted event to</param>
- <remarks>
- <para>
- Format the pattern to the <paramref name="writer"/>.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.Format">
- <summary>
- Format the pattern as a string
- </summary>
- <returns>the pattern formatted as a string</returns>
- <remarks>
- <para>
- Format the pattern to a string.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.AddConverter(log4net.Util.PatternString.ConverterInfo)">
- <summary>
- Add a converter to this PatternString
- </summary>
- <param name="converterInfo">the converter info</param>
- <remarks>
- <para>
- This version of the method is used by the configurator.
- Programmatic users should use the alternative <see cref="M:log4net.Util.PatternString.AddConverter(System.String,System.Type)"/> method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.AddConverter(System.String,System.Type)">
- <summary>
- Add a converter to this PatternString
- </summary>
- <param name="name">the name of the conversion pattern for this converter</param>
- <param name="type">the type of the converter</param>
- <remarks>
- <para>
- Add a converter to this PatternString
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PatternString.ConversionPattern">
- <summary>
- Gets or sets the pattern formatting string
- </summary>
- <value>
- The pattern formatting string
- </value>
- <remarks>
- <para>
- The <b>ConversionPattern</b> option. This is the string which
- controls formatting and consists of a mix of literal content and
- conversion specifiers.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PatternString.ConverterInfo">
- <summary>
- Wrapper class used to map converter names to converter types
- </summary>
- <remarks>
- <para>
- Wrapper class used to map converter names to converter types
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PatternString.ConverterInfo.#ctor">
- <summary>
- default constructor
- </summary>
- </member>
- <member name="P:log4net.Util.PatternString.ConverterInfo.Name">
- <summary>
- Gets or sets the name of the conversion pattern
- </summary>
- <value>
- The name of the conversion pattern
- </value>
- <remarks>
- <para>
- Gets or sets the name of the conversion pattern
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PatternString.ConverterInfo.Type">
- <summary>
- Gets or sets the type of the converter
- </summary>
- <value>
- The type of the converter
- </value>
- <remarks>
- <para>
- Gets or sets the type of the converter
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.PropertiesDictionary">
- <summary>
- String keyed object map.
- </summary>
- <remarks>
- <para>
- While this collection is serializable only member
- objects that are serializable will
- be serialized along with this collection.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="T:log4net.Util.ReadOnlyPropertiesDictionary">
- <summary>
- String keyed object map that is read only.
- </summary>
- <remarks>
- <para>
- This collection is readonly and cannot be modified.
- </para>
- <para>
- While this collection is serializable only member
- objects that are serializable will
- be serialized along with this collection.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="F:log4net.Util.ReadOnlyPropertiesDictionary.m_hashtable">
- <summary>
- The Hashtable used to store the properties data
- </summary>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ReadOnlyPropertiesDictionary"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.#ctor(log4net.Util.ReadOnlyPropertiesDictionary)">
- <summary>
- Copy Constructor
- </summary>
- <param name="propertiesDictionary">properties to copy</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ReadOnlyPropertiesDictionary"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Deserialization constructor
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data.</param>
- <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ReadOnlyPropertiesDictionary"/> class
- with serialized data.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.GetKeys">
- <summary>
- Gets the key names.
- </summary>
- <returns>An array of all the keys.</returns>
- <remarks>
- <para>
- Gets the key names.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.Contains(System.String)">
- <summary>
- Test if the dictionary contains a specified key
- </summary>
- <param name="key">the key to look for</param>
- <returns>true if the dictionary contains the specified key</returns>
- <remarks>
- <para>
- Test if the dictionary contains a specified key
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Serializes this object into the <see cref="T:System.Runtime.Serialization.SerializationInfo"/> provided.
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> to populate with data.</param>
- <param name="context">The destination for this serialization.</param>
- <remarks>
- <para>
- Serializes this object into the <see cref="T:System.Runtime.Serialization.SerializationInfo"/> provided.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#GetEnumerator">
- <summary>
- See <see cref="M:System.Collections.IDictionary.GetEnumerator"/>
- </summary>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#Remove(System.Object)">
- <summary>
- See <see cref="M:System.Collections.IDictionary.Remove(System.Object)"/>
- </summary>
- <param name="key"></param>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#Contains(System.Object)">
- <summary>
- See <see cref="M:System.Collections.IDictionary.Contains(System.Object)"/>
- </summary>
- <param name="key"></param>
- <returns></returns>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.Clear">
- <summary>
- Remove all properties from the properties collection
- </summary>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#Add(System.Object,System.Object)">
- <summary>
- See <see cref="M:System.Collections.IDictionary.Add(System.Object,System.Object)"/>
- </summary>
- <param name="key"></param>
- <param name="value"></param>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#ICollection#CopyTo(System.Array,System.Int32)">
- <summary>
- See <see cref="M:System.Collections.ICollection.CopyTo(System.Array,System.Int32)"/>
- </summary>
- <param name="array"></param>
- <param name="index"></param>
- </member>
- <member name="M:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IEnumerable#GetEnumerator">
- <summary>
- See <see cref="M:System.Collections.IEnumerable.GetEnumerator"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.Item(System.String)">
- <summary>
- Gets or sets the value of the property with the specified key.
- </summary>
- <value>
- The value of the property with the specified key.
- </value>
- <param name="key">The key of the property to get or set.</param>
- <remarks>
- <para>
- The property value will only be serialized if it is serializable.
- If it cannot be serialized it will be silently ignored if
- a serialization operation is performed.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.InnerHashtable">
- <summary>
- The hashtable used to store the properties
- </summary>
- <value>
- The internal collection used to store the properties
- </value>
- <remarks>
- <para>
- The hashtable used to store the properties
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#IsReadOnly">
- <summary>
- See <see cref="P:System.Collections.IDictionary.IsReadOnly"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#Item(System.Object)">
- <summary>
- See <see cref="P:System.Collections.IDictionary.Item(System.Object)"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#Values">
- <summary>
- See <see cref="P:System.Collections.IDictionary.Values"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#Keys">
- <summary>
- See <see cref="P:System.Collections.IDictionary.Keys"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#IDictionary#IsFixedSize">
- <summary>
- See <see cref="P:System.Collections.IDictionary.IsFixedSize"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#ICollection#IsSynchronized">
- <summary>
- See <see cref="P:System.Collections.ICollection.IsSynchronized"/>
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.Count">
- <summary>
- The number of properties in this collection
- </summary>
- </member>
- <member name="P:log4net.Util.ReadOnlyPropertiesDictionary.System#Collections#ICollection#SyncRoot">
- <summary>
- See <see cref="P:System.Collections.ICollection.SyncRoot"/>
- </summary>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.PropertiesDictionary"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.#ctor(log4net.Util.ReadOnlyPropertiesDictionary)">
- <summary>
- Constructor
- </summary>
- <param name="propertiesDictionary">properties to copy</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.PropertiesDictionary"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.PropertiesDictionary"/> class
- with serialized data.
- </summary>
- <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data.</param>
- <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
- <remarks>
- <para>
- Because this class is sealed the serialization constructor is private.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.Remove(System.String)">
- <summary>
- Remove the entry with the specified key from this dictionary
- </summary>
- <param name="key">the key for the entry to remove</param>
- <remarks>
- <para>
- Remove the entry with the specified key from this dictionary
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#GetEnumerator">
- <summary>
- See <see cref="M:System.Collections.IDictionary.GetEnumerator"/>
- </summary>
- <returns>an enumerator</returns>
- <remarks>
- <para>
- Returns a <see cref="T:System.Collections.IDictionaryEnumerator"/> over the contest of this collection.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#Remove(System.Object)">
- <summary>
- See <see cref="M:System.Collections.IDictionary.Remove(System.Object)"/>
- </summary>
- <param name="key">the key to remove</param>
- <remarks>
- <para>
- Remove the entry with the specified key from this dictionary
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#Contains(System.Object)">
- <summary>
- See <see cref="M:System.Collections.IDictionary.Contains(System.Object)"/>
- </summary>
- <param name="key">the key to lookup in the collection</param>
- <returns><c>true</c> if the collection contains the specified key</returns>
- <remarks>
- <para>
- Test if this collection contains a specified key.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.Clear">
- <summary>
- Remove all properties from the properties collection
- </summary>
- <remarks>
- <para>
- Remove all properties from the properties collection
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#Add(System.Object,System.Object)">
- <summary>
- See <see cref="M:System.Collections.IDictionary.Add(System.Object,System.Object)"/>
- </summary>
- <param name="key">the key</param>
- <param name="value">the value to store for the key</param>
- <remarks>
- <para>
- Store a value for the specified <see cref="T:System.String"/> <paramref name="key"/>.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentException">Thrown if the <paramref name="key"/> is not a string</exception>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.System#Collections#ICollection#CopyTo(System.Array,System.Int32)">
- <summary>
- See <see cref="M:System.Collections.ICollection.CopyTo(System.Array,System.Int32)"/>
- </summary>
- <param name="array"></param>
- <param name="index"></param>
- </member>
- <member name="M:log4net.Util.PropertiesDictionary.System#Collections#IEnumerable#GetEnumerator">
- <summary>
- See <see cref="M:System.Collections.IEnumerable.GetEnumerator"/>
- </summary>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.Item(System.String)">
- <summary>
- Gets or sets the value of the property with the specified key.
- </summary>
- <value>
- The value of the property with the specified key.
- </value>
- <param name="key">The key of the property to get or set.</param>
- <remarks>
- <para>
- The property value will only be serialized if it is serializable.
- If it cannot be serialized it will be silently ignored if
- a serialization operation is performed.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#IsReadOnly">
- <summary>
- See <see cref="P:System.Collections.IDictionary.IsReadOnly"/>
- </summary>
- <value>
- <c>false</c>
- </value>
- <remarks>
- <para>
- This collection is modifiable. This property always
- returns <c>false</c>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#Item(System.Object)">
- <summary>
- See <see cref="P:System.Collections.IDictionary.Item(System.Object)"/>
- </summary>
- <value>
- The value for the key specified.
- </value>
- <remarks>
- <para>
- Get or set a value for the specified <see cref="T:System.String"/> <paramref name="key"/>.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentException">Thrown if the <paramref name="key"/> is not a string</exception>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#Values">
- <summary>
- See <see cref="P:System.Collections.IDictionary.Values"/>
- </summary>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#Keys">
- <summary>
- See <see cref="P:System.Collections.IDictionary.Keys"/>
- </summary>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#IDictionary#IsFixedSize">
- <summary>
- See <see cref="P:System.Collections.IDictionary.IsFixedSize"/>
- </summary>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#ICollection#IsSynchronized">
- <summary>
- See <see cref="P:System.Collections.ICollection.IsSynchronized"/>
- </summary>
- </member>
- <member name="P:log4net.Util.PropertiesDictionary.System#Collections#ICollection#SyncRoot">
- <summary>
- See <see cref="P:System.Collections.ICollection.SyncRoot"/>
- </summary>
- </member>
- <member name="T:log4net.Util.ProtectCloseTextWriter">
- <summary>
- A <see cref="T:System.IO.TextWriter"/> that ignores the <see cref="M:log4net.Util.ProtectCloseTextWriter.Close"/> message
- </summary>
- <remarks>
- <para>
- This writer is used in special cases where it is necessary
- to protect a writer from being closed by a client.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.ProtectCloseTextWriter.#ctor(System.IO.TextWriter)">
- <summary>
- Constructor
- </summary>
- <param name="writer">the writer to actually write to</param>
- <remarks>
- <para>
- Create a new ProtectCloseTextWriter using a writer
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ProtectCloseTextWriter.Attach(System.IO.TextWriter)">
- <summary>
- Attach this instance to a different underlying <see cref="T:System.IO.TextWriter"/>
- </summary>
- <param name="writer">the writer to attach to</param>
- <remarks>
- <para>
- Attach this instance to a different underlying <see cref="T:System.IO.TextWriter"/>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ProtectCloseTextWriter.Close">
- <summary>
- Does not close the underlying output writer.
- </summary>
- <remarks>
- <para>
- Does not close the underlying output writer.
- This method does nothing.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ReaderWriterLock">
- <summary>
- Defines a lock that supports single writers and multiple readers
- </summary>
- <remarks>
- <para>
- <c>ReaderWriterLock</c> is used to synchronize access to a resource.
- At any given time, it allows either concurrent read access for
- multiple threads, or write access for a single thread. In a
- situation where a resource is changed infrequently, a
- <c>ReaderWriterLock</c> provides better throughput than a simple
- one-at-a-time lock, such as <see cref="T:System.Threading.Monitor"/>.
- </para>
- <para>
- If a platform does not support a <c>System.Threading.ReaderWriterLock</c>
- implementation then all readers and writers are serialized. Therefore
- the caller must not rely on multiple simultaneous readers.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.ReaderWriterLock.#ctor">
- <summary>
- Constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ReaderWriterLock"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReaderWriterLock.AcquireReaderLock">
- <summary>
- Acquires a reader lock
- </summary>
- <remarks>
- <para>
- <see cref="M:log4net.Util.ReaderWriterLock.AcquireReaderLock"/> blocks if a different thread has the writer
- lock, or if at least one thread is waiting for the writer lock.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReaderWriterLock.ReleaseReaderLock">
- <summary>
- Decrements the lock count
- </summary>
- <remarks>
- <para>
- <see cref="M:log4net.Util.ReaderWriterLock.ReleaseReaderLock"/> decrements the lock count. When the count
- reaches zero, the lock is released.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReaderWriterLock.AcquireWriterLock">
- <summary>
- Acquires the writer lock
- </summary>
- <remarks>
- <para>
- This method blocks if another thread has a reader lock or writer lock.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReaderWriterLock.ReleaseWriterLock">
- <summary>
- Decrements the lock count on the writer lock
- </summary>
- <remarks>
- <para>
- ReleaseWriterLock decrements the writer lock count.
- When the count reaches zero, the writer lock is released.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ReusableStringWriter">
- <summary>
- A <see cref="T:System.IO.StringWriter"/> that can be <see cref="M:log4net.Util.ReusableStringWriter.Reset(System.Int32,System.Int32)"/> and reused
- </summary>
- <remarks>
- <para>
- A <see cref="T:System.IO.StringWriter"/> that can be <see cref="M:log4net.Util.ReusableStringWriter.Reset(System.Int32,System.Int32)"/> and reused.
- This uses a single buffer for string operations.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.ReusableStringWriter.#ctor(System.IFormatProvider)">
- <summary>
- Create an instance of <see cref="T:log4net.Util.ReusableStringWriter"/>
- </summary>
- <param name="formatProvider">the format provider to use</param>
- <remarks>
- <para>
- Create an instance of <see cref="T:log4net.Util.ReusableStringWriter"/>
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReusableStringWriter.Dispose(System.Boolean)">
- <summary>
- Override Dispose to prevent closing of writer
- </summary>
- <param name="disposing">flag</param>
- <remarks>
- <para>
- Override Dispose to prevent closing of writer
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ReusableStringWriter.Reset(System.Int32,System.Int32)">
- <summary>
- Reset this string writer so that it can be reused.
- </summary>
- <param name="maxCapacity">the maximum buffer capacity before it is trimmed</param>
- <param name="defaultSize">the default size to make the buffer</param>
- <remarks>
- <para>
- Reset this string writer so that it can be reused.
- The internal buffers are cleared and reset.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.SystemInfo">
- <summary>
- Utility class for system specific information.
- </summary>
- <remarks>
- <para>
- Utility class of static methods for system specific information.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- <author>Alexey Solofnenko</author>
- </member>
- <member name="M:log4net.Util.SystemInfo.#ctor">
- <summary>
- Private constructor to prevent instances.
- </summary>
- <remarks>
- <para>
- Only static methods are exposed from this type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.#cctor">
- <summary>
- Initialize default values for private static fields.
- </summary>
- <remarks>
- <para>
- Only static methods are exposed from this type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.AssemblyLocationInfo(System.Reflection.Assembly)">
- <summary>
- Gets the assembly location path for the specified assembly.
- </summary>
- <param name="myAssembly">The assembly to get the location for.</param>
- <returns>The location of the assembly.</returns>
- <remarks>
- <para>
- This method does not guarantee to return the correct path
- to the assembly. If only tries to give an indication as to
- where the assembly was loaded from.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.AssemblyQualifiedName(System.Type)">
- <summary>
- Gets the fully qualified name of the <see cref="T:System.Type"/>, including
- the name of the assembly from which the <see cref="T:System.Type"/> was
- loaded.
- </summary>
- <param name="type">The <see cref="T:System.Type"/> to get the fully qualified name for.</param>
- <returns>The fully qualified name for the <see cref="T:System.Type"/>.</returns>
- <remarks>
- <para>
- This is equivalent to the <c>Type.AssemblyQualifiedName</c> property,
- but this method works on the .NET Compact Framework 1.0 as well as
- the full .NET runtime.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.AssemblyShortName(System.Reflection.Assembly)">
- <summary>
- Gets the short name of the <see cref="T:System.Reflection.Assembly"/>.
- </summary>
- <param name="myAssembly">The <see cref="T:System.Reflection.Assembly"/> to get the name for.</param>
- <returns>The short name of the <see cref="T:System.Reflection.Assembly"/>.</returns>
- <remarks>
- <para>
- The short name of the assembly is the <see cref="P:System.Reflection.Assembly.FullName"/>
- without the version, culture, or public key. i.e. it is just the
- assembly's file name without the extension.
- </para>
- <para>
- Use this rather than <c>Assembly.GetName().Name</c> because that
- is not available on the Compact Framework.
- </para>
- <para>
- Because of a FileIOPermission security demand we cannot do
- the obvious Assembly.GetName().Name. We are allowed to get
- the <see cref="P:System.Reflection.Assembly.FullName"/> of the assembly so we
- start from there and strip out just the assembly name.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.AssemblyFileName(System.Reflection.Assembly)">
- <summary>
- Gets the file name portion of the <see cref="T:System.Reflection.Assembly"/>, including the extension.
- </summary>
- <param name="myAssembly">The <see cref="T:System.Reflection.Assembly"/> to get the file name for.</param>
- <returns>The file name of the assembly.</returns>
- <remarks>
- <para>
- Gets the file name portion of the <see cref="T:System.Reflection.Assembly"/>, including the extension.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.GetTypeFromString(System.Type,System.String,System.Boolean,System.Boolean)">
- <summary>
- Loads the type specified in the type string.
- </summary>
- <param name="relativeType">A sibling type to use to load the type.</param>
- <param name="typeName">The name of the type to load.</param>
- <param name="throwOnError">Flag set to <c>true</c> to throw an exception if the type cannot be loaded.</param>
- <param name="ignoreCase"><c>true</c> to ignore the case of the type name; otherwise, <c>false</c></param>
- <returns>The type loaded or <c>null</c> if it could not be loaded.</returns>
- <remarks>
- <para>
- If the type name is fully qualified, i.e. if contains an assembly name in
- the type name, the type will be loaded from the system using
- <see cref="M:System.Type.GetType(System.String,System.Boolean)"/>.
- </para>
- <para>
- If the type name is not fully qualified, it will be loaded from the assembly
- containing the specified relative type. If the type is not found in the assembly
- then all the loaded assemblies will be searched for the type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.GetTypeFromString(System.String,System.Boolean,System.Boolean)">
- <summary>
- Loads the type specified in the type string.
- </summary>
- <param name="typeName">The name of the type to load.</param>
- <param name="throwOnError">Flag set to <c>true</c> to throw an exception if the type cannot be loaded.</param>
- <param name="ignoreCase"><c>true</c> to ignore the case of the type name; otherwise, <c>false</c></param>
- <returns>The type loaded or <c>null</c> if it could not be loaded.</returns>
- <remarks>
- <para>
- If the type name is fully qualified, i.e. if contains an assembly name in
- the type name, the type will be loaded from the system using
- <see cref="M:System.Type.GetType(System.String,System.Boolean)"/>.
- </para>
- <para>
- If the type name is not fully qualified it will be loaded from the
- assembly that is directly calling this method. If the type is not found
- in the assembly then all the loaded assemblies will be searched for the type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.GetTypeFromString(System.Reflection.Assembly,System.String,System.Boolean,System.Boolean)">
- <summary>
- Loads the type specified in the type string.
- </summary>
- <param name="relativeAssembly">An assembly to load the type from.</param>
- <param name="typeName">The name of the type to load.</param>
- <param name="throwOnError">Flag set to <c>true</c> to throw an exception if the type cannot be loaded.</param>
- <param name="ignoreCase"><c>true</c> to ignore the case of the type name; otherwise, <c>false</c></param>
- <returns>The type loaded or <c>null</c> if it could not be loaded.</returns>
- <remarks>
- <para>
- If the type name is fully qualified, i.e. if contains an assembly name in
- the type name, the type will be loaded from the system using
- <see cref="M:System.Type.GetType(System.String,System.Boolean)"/>.
- </para>
- <para>
- If the type name is not fully qualified it will be loaded from the specified
- assembly. If the type is not found in the assembly then all the loaded assemblies
- will be searched for the type.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.NewGuid">
- <summary>
- Generate a new guid
- </summary>
- <returns>A new Guid</returns>
- <remarks>
- <para>
- Generate a new guid
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.CreateArgumentOutOfRangeException(System.String,System.Object,System.String)">
- <summary>
- Create an <see cref="T:System.ArgumentOutOfRangeException"/>
- </summary>
- <param name="parameterName">The name of the parameter that caused the exception</param>
- <param name="actualValue">The value of the argument that causes this exception</param>
- <param name="message">The message that describes the error</param>
- <returns>the ArgumentOutOfRangeException object</returns>
- <remarks>
- <para>
- Create a new instance of the <see cref="T:System.ArgumentOutOfRangeException"/> class
- with a specified error message, the parameter name, and the value
- of the argument.
- </para>
- <para>
- The Compact Framework does not support the 3 parameter constructor for the
- <see cref="T:System.ArgumentOutOfRangeException"/> type. This method provides an
- implementation that works for all platforms.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.TryParse(System.String,System.Int32@)">
- <summary>
- Parse a string into an <see cref="T:System.Int32"/> value
- </summary>
- <param name="s">the string to parse</param>
- <param name="val">out param where the parsed value is placed</param>
- <returns><c>true</c> if the string was able to be parsed into an integer</returns>
- <remarks>
- <para>
- Attempts to parse the string into an integer. If the string cannot
- be parsed then this method returns <c>false</c>. The method does not throw an exception.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.TryParse(System.String,System.Int64@)">
- <summary>
- Parse a string into an <see cref="T:System.Int64"/> value
- </summary>
- <param name="s">the string to parse</param>
- <param name="val">out param where the parsed value is placed</param>
- <returns><c>true</c> if the string was able to be parsed into an integer</returns>
- <remarks>
- <para>
- Attempts to parse the string into an integer. If the string cannot
- be parsed then this method returns <c>false</c>. The method does not throw an exception.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.GetAppSetting(System.String)">
- <summary>
- Lookup an application setting
- </summary>
- <param name="key">the application settings key to lookup</param>
- <returns>the value for the key, or <c>null</c></returns>
- <remarks>
- <para>
- Configuration APIs are not supported under the Compact Framework
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.ConvertToFullPath(System.String)">
- <summary>
- Convert a path into a fully qualified local file path.
- </summary>
- <param name="path">The path to convert.</param>
- <returns>The fully qualified path.</returns>
- <remarks>
- <para>
- Converts the path specified to a fully
- qualified path. If the path is relative it is
- taken as relative from the application base
- directory.
- </para>
- <para>
- The path specified must be a local file path, a URI is not supported.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemInfo.CreateCaseInsensitiveHashtable">
- <summary>
- Creates a new case-insensitive instance of the <see cref="T:System.Collections.Hashtable"/> class with the default initial capacity.
- </summary>
- <returns>A new case-insensitive instance of the <see cref="T:System.Collections.Hashtable"/> class with the default initial capacity</returns>
- <remarks>
- <para>
- The new Hashtable instance uses the default load factor, the CaseInsensitiveHashCodeProvider, and the CaseInsensitiveComparer.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.SystemInfo.EmptyTypes">
- <summary>
- Gets an empty array of types.
- </summary>
- <remarks>
- <para>
- The <c>Type.EmptyTypes</c> field is not available on
- the .NET Compact Framework 1.0.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.SystemInfo.s_hostName">
- <summary>
- Cache the host name for the current machine
- </summary>
- </member>
- <member name="F:log4net.Util.SystemInfo.s_appFriendlyName">
- <summary>
- Cache the application friendly name
- </summary>
- </member>
- <member name="F:log4net.Util.SystemInfo.s_nullText">
- <summary>
- Text to output when a <c>null</c> is encountered.
- </summary>
- </member>
- <member name="F:log4net.Util.SystemInfo.s_notAvailableText">
- <summary>
- Text to output when an unsupported feature is requested.
- </summary>
- </member>
- <member name="F:log4net.Util.SystemInfo.s_processStartTime">
- <summary>
- Start time for the current process.
- </summary>
- </member>
- <member name="P:log4net.Util.SystemInfo.NewLine">
- <summary>
- Gets the system dependent line terminator.
- </summary>
- <value>
- The system dependent line terminator.
- </value>
- <remarks>
- <para>
- Gets the system dependent line terminator.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.ApplicationBaseDirectory">
- <summary>
- Gets the base directory for this <see cref="T:System.AppDomain"/>.
- </summary>
- <value>The base directory path for the current <see cref="T:System.AppDomain"/>.</value>
- <remarks>
- <para>
- Gets the base directory for this <see cref="T:System.AppDomain"/>.
- </para>
- <para>
- The value returned may be either a local file path or a URI.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.ConfigurationFileLocation">
- <summary>
- Gets the path to the configuration file for the current <see cref="T:System.AppDomain"/>.
- </summary>
- <value>The path to the configuration file for the current <see cref="T:System.AppDomain"/>.</value>
- <remarks>
- <para>
- The .NET Compact Framework 1.0 does not have a concept of a configuration
- file. For this runtime, we use the entry assembly location as the root for
- the configuration file name.
- </para>
- <para>
- The value returned may be either a local file path or a URI.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.EntryAssemblyLocation">
- <summary>
- Gets the path to the file that first executed in the current <see cref="T:System.AppDomain"/>.
- </summary>
- <value>The path to the entry assembly.</value>
- <remarks>
- <para>
- Gets the path to the file that first executed in the current <see cref="T:System.AppDomain"/>.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.CurrentThreadId">
- <summary>
- Gets the ID of the current thread.
- </summary>
- <value>The ID of the current thread.</value>
- <remarks>
- <para>
- On the .NET framework, the <c>AppDomain.GetCurrentThreadId</c> method
- is used to obtain the thread ID for the current thread. This is the
- operating system ID for the thread.
- </para>
- <para>
- On the .NET Compact Framework 1.0 it is not possible to get the
- operating system thread ID for the current thread. The native method
- <c>GetCurrentThreadId</c> is implemented inline in a header file
- and cannot be called.
- </para>
- <para>
- On the .NET Framework 2.0 the <c>Thread.ManagedThreadId</c> is used as this
- gives a stable id unrelated to the operating system thread ID which may
- change if the runtime is using fibers.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.HostName">
- <summary>
- Get the host name or machine name for the current machine
- </summary>
- <value>
- The hostname or machine name
- </value>
- <remarks>
- <para>
- Get the host name or machine name for the current machine
- </para>
- <para>
- The host name (<see cref="M:System.Net.Dns.GetHostName"/>) or
- the machine name (<c>Environment.MachineName</c>) for
- the current machine, or if neither of these are available
- then <c>NOT AVAILABLE</c> is returned.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.ApplicationFriendlyName">
- <summary>
- Get this application's friendly name
- </summary>
- <value>
- The friendly name of this application as a string
- </value>
- <remarks>
- <para>
- If available the name of the application is retrieved from
- the <c>AppDomain</c> using <c>AppDomain.CurrentDomain.FriendlyName</c>.
- </para>
- <para>
- Otherwise the file name of the entry assembly is used.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.ProcessStartTime">
- <summary>
- Get the start time for the current process.
- </summary>
- <remarks>
- <para>
- This is the time at which the log4net library was loaded into the
- AppDomain. Due to reports of a hang in the call to <c>System.Diagnostics.Process.StartTime</c>
- this is not the start time for the current process.
- </para>
- <para>
- The log4net library should be loaded by an application early during its
- startup, therefore this start time should be a good approximation for
- the actual start time.
- </para>
- <para>
- Note that AppDomains may be loaded and unloaded within the
- same process without the process terminating, however this start time
- will be set per AppDomain.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.NullText">
- <summary>
- Text to output when a <c>null</c> is encountered.
- </summary>
- <remarks>
- <para>
- Use this value to indicate a <c>null</c> has been encountered while
- outputting a string representation of an item.
- </para>
- <para>
- The default value is <c>(null)</c>. This value can be overridden by specifying
- a value for the <c>log4net.NullText</c> appSetting in the application's
- .config file.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.SystemInfo.NotAvailableText">
- <summary>
- Text to output when an unsupported feature is requested.
- </summary>
- <remarks>
- <para>
- Use this value when an unsupported feature is requested.
- </para>
- <para>
- The default value is <c>NOT AVAILABLE</c>. This value can be overridden by specifying
- a value for the <c>log4net.NotAvailableText</c> appSetting in the application's
- .config file.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.SystemStringFormat">
- <summary>
- Utility class that represents a format string.
- </summary>
- <remarks>
- <para>
- Utility class that represents a format string.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.SystemStringFormat.#ctor(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Initialise the <see cref="T:log4net.Util.SystemStringFormat"/>
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information.</param>
- <param name="format">A <see cref="T:System.String"/> containing zero or more format items.</param>
- <param name="args">An <see cref="T:System.Object"/> array containing zero or more objects to format.</param>
- </member>
- <member name="M:log4net.Util.SystemStringFormat.ToString">
- <summary>
- Format the string and arguments
- </summary>
- <returns>the formatted string</returns>
- </member>
- <member name="M:log4net.Util.SystemStringFormat.StringFormat(System.IFormatProvider,System.String,System.Object[])">
- <summary>
- Replaces the format item in a specified <see cref="T:System.String"/> with the text equivalent
- of the value of a corresponding <see cref="T:System.Object"/> instance in a specified array.
- A specified parameter supplies culture-specific formatting information.
- </summary>
- <param name="provider">An <see cref="T:System.IFormatProvider"/> that supplies culture-specific formatting information.</param>
- <param name="format">A <see cref="T:System.String"/> containing zero or more format items.</param>
- <param name="args">An <see cref="T:System.Object"/> array containing zero or more objects to format.</param>
- <returns>
- A copy of format in which the format items have been replaced by the <see cref="T:System.String"/>
- equivalent of the corresponding instances of <see cref="T:System.Object"/> in args.
- </returns>
- <remarks>
- <para>
- This method does not throw exceptions. If an exception thrown while formatting the result the
- exception and arguments are returned in the result string.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.SystemStringFormat.StringFormatError(System.Exception,System.String,System.Object[])">
- <summary>
- Process an error during StringFormat
- </summary>
- </member>
- <member name="M:log4net.Util.SystemStringFormat.RenderArray(System.Array,System.Text.StringBuilder)">
- <summary>
- Dump the contents of an array into a string builder
- </summary>
- </member>
- <member name="M:log4net.Util.SystemStringFormat.RenderObject(System.Object,System.Text.StringBuilder)">
- <summary>
- Dump an object to a string
- </summary>
- </member>
- <member name="T:log4net.Util.ThreadContextProperties">
- <summary>
- Implementation of Properties collection for the <see cref="T:log4net.ThreadContext"/>
- </summary>
- <remarks>
- <para>
- Class implements a collection of properties that is specific to each thread.
- The class is not synchronized as each thread has its own <see cref="T:log4net.Util.PropertiesDictionary"/>.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.ThreadContextProperties.s_threadLocalSlot">
- <summary>
- The thread local data slot to use to store a PropertiesDictionary.
- </summary>
- </member>
- <member name="M:log4net.Util.ThreadContextProperties.#ctor">
- <summary>
- Internal constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ThreadContextProperties"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextProperties.Remove(System.String)">
- <summary>
- Remove a property
- </summary>
- <param name="key">the key for the entry to remove</param>
- <remarks>
- <para>
- Remove a property
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextProperties.Clear">
- <summary>
- Clear all properties
- </summary>
- <remarks>
- <para>
- Clear all properties
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextProperties.GetProperties(System.Boolean)">
- <summary>
- Get the <c>PropertiesDictionary</c> for this thread.
- </summary>
- <param name="create">create the dictionary if it does not exist, otherwise return null if is does not exist</param>
- <returns>the properties for this thread</returns>
- <remarks>
- <para>
- The collection returned is only to be used on the calling thread. If the
- caller needs to share the collection between different threads then the
- caller must clone the collection before doing so.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ThreadContextProperties.Item(System.String)">
- <summary>
- Gets or sets the value of a property
- </summary>
- <value>
- The value for the property with the specified key
- </value>
- <remarks>
- <para>
- Gets or sets the value of a property
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ThreadContextStack">
- <summary>
- Implementation of Stack for the <see cref="T:log4net.ThreadContext"/>
- </summary>
- <remarks>
- <para>
- Implementation of Stack for the <see cref="T:log4net.ThreadContext"/>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="F:log4net.Util.ThreadContextStack.m_stack">
- <summary>
- The stack store.
- </summary>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.#ctor">
- <summary>
- Internal constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ThreadContextStack"/> class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.Clear">
- <summary>
- Clears all the contextual information held in this stack.
- </summary>
- <remarks>
- <para>
- Clears all the contextual information held in this stack.
- Only call this if you think that this tread is being reused after
- a previous call execution which may not have completed correctly.
- You do not need to use this method if you always guarantee to call
- the <see cref="M:System.IDisposable.Dispose"/> method of the <see cref="T:System.IDisposable"/>
- returned from <see cref="M:log4net.Util.ThreadContextStack.Push(System.String)"/> even in exceptional circumstances,
- for example by using the <c>using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message"))</c>
- syntax.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.Pop">
- <summary>
- Removes the top context from this stack.
- </summary>
- <returns>The message in the context that was removed from the top of this stack.</returns>
- <remarks>
- <para>
- Remove the top context from this stack, and return
- it to the caller. If this stack is empty then an
- empty string (not <see langword="null"/>) is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.Push(System.String)">
- <summary>
- Pushes a new context message into this stack.
- </summary>
- <param name="message">The new context message.</param>
- <returns>
- An <see cref="T:System.IDisposable"/> that can be used to clean up the context stack.
- </returns>
- <remarks>
- <para>
- Pushes a new context onto this stack. An <see cref="T:System.IDisposable"/>
- is returned that can be used to clean up this stack. This
- can be easily combined with the <c>using</c> keyword to scope the
- context.
- </para>
- </remarks>
- <example>Simple example of using the <c>Push</c> method with the <c>using</c> keyword.
- <code lang="C#">
- using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message"))
- {
- log.Warn("This should have an ThreadContext Stack message");
- }
- </code>
- </example>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.GetFullMessage">
- <summary>
- Gets the current context information for this stack.
- </summary>
- <returns>The current context information.</returns>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.ToString">
- <summary>
- Gets the current context information for this stack.
- </summary>
- <returns>Gets the current context information</returns>
- <remarks>
- <para>
- Gets the current context information for this stack.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.log4net#Core#IFixingRequired#GetFixedObject">
- <summary>
- Get a portable version of this object
- </summary>
- <returns>the portable instance of this object</returns>
- <remarks>
- <para>
- Get a cross thread portable version of this object
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ThreadContextStack.Count">
- <summary>
- The number of messages in the stack
- </summary>
- <value>
- The current number of messages in the stack
- </value>
- <remarks>
- <para>
- The current number of messages in the stack. That is
- the number of times <see cref="M:log4net.Util.ThreadContextStack.Push(System.String)"/> has been called
- minus the number of times <see cref="M:log4net.Util.ThreadContextStack.Pop"/> has been called.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ThreadContextStack.InternalStack">
- <summary>
- Gets and sets the internal stack used by this <see cref="T:log4net.Util.ThreadContextStack"/>
- </summary>
- <value>The internal storage stack</value>
- <remarks>
- <para>
- This property is provided only to support backward compatability
- of the <see cref="T:log4net.NDC"/>. Tytpically the internal stack should not
- be modified.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ThreadContextStack.StackFrame">
- <summary>
- Inner class used to represent a single context frame in the stack.
- </summary>
- <remarks>
- <para>
- Inner class used to represent a single context frame in the stack.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.StackFrame.#ctor(System.String,log4net.Util.ThreadContextStack.StackFrame)">
- <summary>
- Constructor
- </summary>
- <param name="message">The message for this context.</param>
- <param name="parent">The parent context in the chain.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ThreadContextStack.StackFrame"/> class
- with the specified message and parent context.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ThreadContextStack.StackFrame.Message">
- <summary>
- Get the message.
- </summary>
- <value>The message.</value>
- <remarks>
- <para>
- Get the message.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ThreadContextStack.StackFrame.FullMessage">
- <summary>
- Gets the full text of the context down to the root level.
- </summary>
- <value>
- The full text of the context down to the root level.
- </value>
- <remarks>
- <para>
- Gets the full text of the context down to the root level.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ThreadContextStack.AutoPopStackFrame">
- <summary>
- Struct returned from the <see cref="M:log4net.Util.ThreadContextStack.Push(System.String)"/> method.
- </summary>
- <remarks>
- <para>
- This struct implements the <see cref="T:System.IDisposable"/> and is designed to be used
- with the <see langword="using"/> pattern to remove the stack frame at the end of the scope.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.ThreadContextStack.AutoPopStackFrame.m_frameStack">
- <summary>
- The ThreadContextStack internal stack
- </summary>
- </member>
- <member name="F:log4net.Util.ThreadContextStack.AutoPopStackFrame.m_frameDepth">
- <summary>
- The depth to trim the stack to when this instance is disposed
- </summary>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.AutoPopStackFrame.#ctor(System.Collections.Stack,System.Int32)">
- <summary>
- Constructor
- </summary>
- <param name="frameStack">The internal stack used by the ThreadContextStack.</param>
- <param name="frameDepth">The depth to return the stack to when this object is disposed.</param>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ThreadContextStack.AutoPopStackFrame"/> class with
- the specified stack and return depth.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.ThreadContextStack.AutoPopStackFrame.Dispose">
- <summary>
- Returns the stack to the correct depth.
- </summary>
- <remarks>
- <para>
- Returns the stack to the correct depth.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.ThreadContextStacks">
- <summary>
- Implementation of Stacks collection for the <see cref="T:log4net.ThreadContext"/>
- </summary>
- <remarks>
- <para>
- Implementation of Stacks collection for the <see cref="T:log4net.ThreadContext"/>
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.Util.ThreadContextStacks.#ctor(log4net.Util.ContextPropertiesBase)">
- <summary>
- Internal constructor
- </summary>
- <remarks>
- <para>
- Initializes a new instance of the <see cref="T:log4net.Util.ThreadContextStacks"/> class.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.ThreadContextStacks.Item(System.String)">
- <summary>
- Gets the named thread context stack
- </summary>
- <value>
- The named stack
- </value>
- <remarks>
- <para>
- Gets the named thread context stack
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.Transform">
- <summary>
- Utility class for transforming strings.
- </summary>
- <remarks>
- <para>
- Utility class for transforming strings.
- </para>
- </remarks>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.Util.Transform.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.Util.Transform"/> class.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to prevent instantiation of this class.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.Transform.WriteEscapedXmlString(System.Xml.XmlWriter,System.String,System.String)">
- <summary>
- Write a string to an <see cref="T:System.Xml.XmlWriter"/>
- </summary>
- <param name="writer">the writer to write to</param>
- <param name="textData">the string to write</param>
- <param name="invalidCharReplacement">The string to replace non XML compliant chars with</param>
- <remarks>
- <para>
- The test is escaped either using XML escape entities
- or using CDATA sections.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.Transform.MaskXmlInvalidCharacters(System.String,System.String)">
- <summary>
- Replace invalid XML characters in text string
- </summary>
- <param name="textData">the XML text input string</param>
- <param name="mask">the string to use in place of invalid characters</param>
- <returns>A string that does not contain invalid XML characters.</returns>
- <remarks>
- <para>
- Certain Unicode code points are not allowed in the XML InfoSet, for
- details see: <a href="http://www.w3.org/TR/REC-xml/#charsets">http://www.w3.org/TR/REC-xml/#charsets</a>.
- </para>
- <para>
- This method replaces any illegal characters in the input string
- with the mask string specified.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.Transform.CountSubstrings(System.String,System.String)">
- <summary>
- Count the number of times that the substring occurs in the text
- </summary>
- <param name="text">the text to search</param>
- <param name="substring">the substring to find</param>
- <returns>the number of times the substring occurs in the text</returns>
- <remarks>
- <para>
- The substring is assumed to be non repeating within itself.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.WindowsSecurityContext">
- <summary>
- Impersonate a Windows Account
- </summary>
- <remarks>
- <para>
- This <see cref="T:log4net.Core.SecurityContext"/> impersonates a Windows account.
- </para>
- <para>
- How the impersonation is done depends on the value of <see cref="M:log4net.Util.WindowsSecurityContext.Impersonate(System.Object)"/>.
- This allows the context to either impersonate a set of user credentials specified
- using username, domain name and password or to revert to the process credentials.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.WindowsSecurityContext.#ctor">
- <summary>
- Default constructor
- </summary>
- <remarks>
- <para>
- Default constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.WindowsSecurityContext.ActivateOptions">
- <summary>
- Initialize the SecurityContext based on the options set.
- </summary>
- <remarks>
- <para>
- This is part of the <see cref="T:log4net.Core.IOptionHandler"/> delayed object
- activation scheme. The <see cref="M:log4net.Util.WindowsSecurityContext.ActivateOptions"/> method must
- be called on this object after the configuration properties have
- been set. Until <see cref="M:log4net.Util.WindowsSecurityContext.ActivateOptions"/> is called this
- object is in an undefined state and must not be used.
- </para>
- <para>
- If any of the configuration properties are modified then
- <see cref="M:log4net.Util.WindowsSecurityContext.ActivateOptions"/> must be called again.
- </para>
- <para>
- The security context will try to Logon the specified user account and
- capture a primary token for impersonation.
- </para>
- </remarks>
- <exception cref="T:System.ArgumentNullException">The required <see cref="P:log4net.Util.WindowsSecurityContext.UserName"/>,
- <see cref="P:log4net.Util.WindowsSecurityContext.DomainName"/> or <see cref="P:log4net.Util.WindowsSecurityContext.Password"/> properties were not specified.</exception>
- </member>
- <member name="M:log4net.Util.WindowsSecurityContext.Impersonate(System.Object)">
- <summary>
- Impersonate the Windows account specified by the <see cref="P:log4net.Util.WindowsSecurityContext.UserName"/> and <see cref="P:log4net.Util.WindowsSecurityContext.DomainName"/> properties.
- </summary>
- <param name="state">caller provided state</param>
- <returns>
- An <see cref="T:System.IDisposable"/> instance that will revoke the impersonation of this SecurityContext
- </returns>
- <remarks>
- <para>
- Depending on the <see cref="P:log4net.Util.WindowsSecurityContext.Credentials"/> property either
- impersonate a user using credentials supplied or revert
- to the process credentials.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.WindowsSecurityContext.LogonUser(System.String,System.String,System.String)">
- <summary>
- Create a <see cref="T:System.Security.Principal.WindowsIdentity"/> given the userName, domainName and password.
- </summary>
- <param name="userName">the user name</param>
- <param name="domainName">the domain name</param>
- <param name="password">the password</param>
- <returns>the <see cref="T:System.Security.Principal.WindowsIdentity"/> for the account specified</returns>
- <remarks>
- <para>
- Uses the Windows API call LogonUser to get a principal token for the account. This
- token is used to initialize the WindowsIdentity.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.WindowsSecurityContext.Credentials">
- <summary>
- Gets or sets the impersonation mode for this security context
- </summary>
- <value>
- The impersonation mode for this security context
- </value>
- <remarks>
- <para>
- Impersonate either a user with user credentials or
- revert this thread to the credentials of the process.
- The value is one of the <see cref="T:log4net.Util.WindowsSecurityContext.ImpersonationMode"/>
- enum.
- </para>
- <para>
- The default value is <see cref="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.User"/>
- </para>
- <para>
- When the mode is set to <see cref="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.User"/>
- the user's credentials are established using the
- <see cref="P:log4net.Util.WindowsSecurityContext.UserName"/>, <see cref="P:log4net.Util.WindowsSecurityContext.DomainName"/> and <see cref="P:log4net.Util.WindowsSecurityContext.Password"/>
- values.
- </para>
- <para>
- When the mode is set to <see cref="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.Process"/>
- no other properties need to be set. If the calling thread is
- impersonating then it will be reverted back to the process credentials.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.WindowsSecurityContext.UserName">
- <summary>
- Gets or sets the Windows username for this security context
- </summary>
- <value>
- The Windows username for this security context
- </value>
- <remarks>
- <para>
- This property must be set if <see cref="P:log4net.Util.WindowsSecurityContext.Credentials"/>
- is set to <see cref="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.User"/> (the default setting).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.WindowsSecurityContext.DomainName">
- <summary>
- Gets or sets the Windows domain name for this security context
- </summary>
- <value>
- The Windows domain name for this security context
- </value>
- <remarks>
- <para>
- The default value for <see cref="P:log4net.Util.WindowsSecurityContext.DomainName"/> is the local machine name
- taken from the <see cref="P:System.Environment.MachineName"/> property.
- </para>
- <para>
- This property must be set if <see cref="P:log4net.Util.WindowsSecurityContext.Credentials"/>
- is set to <see cref="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.User"/> (the default setting).
- </para>
- </remarks>
- </member>
- <member name="P:log4net.Util.WindowsSecurityContext.Password">
- <summary>
- Sets the password for the Windows account specified by the <see cref="P:log4net.Util.WindowsSecurityContext.UserName"/> and <see cref="P:log4net.Util.WindowsSecurityContext.DomainName"/> properties.
- </summary>
- <value>
- The password for the Windows account specified by the <see cref="P:log4net.Util.WindowsSecurityContext.UserName"/> and <see cref="P:log4net.Util.WindowsSecurityContext.DomainName"/> properties.
- </value>
- <remarks>
- <para>
- This property must be set if <see cref="P:log4net.Util.WindowsSecurityContext.Credentials"/>
- is set to <see cref="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.User"/> (the default setting).
- </para>
- </remarks>
- </member>
- <member name="T:log4net.Util.WindowsSecurityContext.ImpersonationMode">
- <summary>
- The impersonation modes for the <see cref="T:log4net.Util.WindowsSecurityContext"/>
- </summary>
- <remarks>
- <para>
- See the <see cref="P:log4net.Util.WindowsSecurityContext.Credentials"/> property for
- details.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.User">
- <summary>
- Impersonate a user using the credentials supplied
- </summary>
- </member>
- <member name="F:log4net.Util.WindowsSecurityContext.ImpersonationMode.Process">
- <summary>
- Revert this the thread to the credentials of the process
- </summary>
- </member>
- <member name="T:log4net.Util.WindowsSecurityContext.DisposableImpersonationContext">
- <summary>
- Adds <see cref="T:System.IDisposable"/> to <see cref="T:System.Security.Principal.WindowsImpersonationContext"/>
- </summary>
- <remarks>
- <para>
- Helper class to expose the <see cref="T:System.Security.Principal.WindowsImpersonationContext"/>
- through the <see cref="T:System.IDisposable"/> interface.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.WindowsSecurityContext.DisposableImpersonationContext.#ctor(System.Security.Principal.WindowsImpersonationContext)">
- <summary>
- Constructor
- </summary>
- <param name="impersonationContext">the impersonation context being wrapped</param>
- <remarks>
- <para>
- Constructor
- </para>
- </remarks>
- </member>
- <member name="M:log4net.Util.WindowsSecurityContext.DisposableImpersonationContext.Dispose">
- <summary>
- Revert the impersonation
- </summary>
- <remarks>
- <para>
- Revert the impersonation
- </para>
- </remarks>
- </member>
- <member name="T:log4net.GlobalContext">
- <summary>
- The log4net Global Context.
- </summary>
- <remarks>
- <para>
- The <c>GlobalContext</c> provides a location for global debugging
- information to be stored.
- </para>
- <para>
- The global context has a properties map and these properties can
- be included in the output of log messages. The <see cref="T:log4net.Layout.PatternLayout"/>
- supports selecting and outputing these properties.
- </para>
- <para>
- By default the <c>log4net:HostName</c> property is set to the name of
- the current machine.
- </para>
- </remarks>
- <example>
- <code lang="C#">
- GlobalContext.Properties["hostname"] = Environment.MachineName;
- </code>
- </example>
- <threadsafety static="true" instance="true"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.GlobalContext.#ctor">
- <summary>
- Private Constructor.
- </summary>
- <remarks>
- Uses a private access modifier to prevent instantiation of this class.
- </remarks>
- </member>
- <member name="F:log4net.GlobalContext.s_properties">
- <summary>
- The global context properties instance
- </summary>
- </member>
- <member name="P:log4net.GlobalContext.Properties">
- <summary>
- The global properties map.
- </summary>
- <value>
- The global properties map.
- </value>
- <remarks>
- <para>
- The global properties map.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.LogicalThreadContext">
- <summary>
- The log4net Logical Thread Context.
- </summary>
- <remarks>
- <para>
- The <c>LogicalThreadContext</c> provides a location for <see cref="T:System.Runtime.Remoting.Messaging.CallContext"/> specific debugging
- information to be stored.
- The <c>LogicalThreadContext</c> properties override any <see cref="T:log4net.ThreadContext"/> or <see cref="T:log4net.GlobalContext"/>
- properties with the same name.
- </para>
- <para>
- The Logical Thread Context has a properties map and a stack.
- The properties and stack can
- be included in the output of log messages. The <see cref="T:log4net.Layout.PatternLayout"/>
- supports selecting and outputting these properties.
- </para>
- <para>
- The Logical Thread Context provides a diagnostic context for the current call context.
- This is an instrument for distinguishing interleaved log
- output from different sources. Log output is typically interleaved
- when a server handles multiple clients near-simultaneously.
- </para>
- <para>
- The Logical Thread Context is managed on a per <see cref="T:System.Runtime.Remoting.Messaging.CallContext"/> basis.
- </para>
- </remarks>
- <example>Example of using the thread context properties to store a username.
- <code lang="C#">
- LogicalThreadContext.Properties["user"] = userName;
- log.Info("This log message has a LogicalThreadContext Property called 'user'");
- </code>
- </example>
- <example>Example of how to push a message into the context stack
- <code lang="C#">
- using(LogicalThreadContext.Stacks["LDC"].Push("my context message"))
- {
- log.Info("This log message has a LogicalThreadContext Stack message that includes 'my context message'");
-
- } // at the end of the using block the message is automatically popped
- </code>
- </example>
- <threadsafety static="true" instance="true"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.LogicalThreadContext.#ctor">
- <summary>
- Private Constructor.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to prevent instantiation of this class.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.LogicalThreadContext.s_properties">
- <summary>
- The thread context properties instance
- </summary>
- </member>
- <member name="F:log4net.LogicalThreadContext.s_stacks">
- <summary>
- The thread context stacks instance
- </summary>
- </member>
- <member name="P:log4net.LogicalThreadContext.Properties">
- <summary>
- The thread properties map
- </summary>
- <value>
- The thread properties map
- </value>
- <remarks>
- <para>
- The <c>LogicalThreadContext</c> properties override any <see cref="T:log4net.ThreadContext"/>
- or <see cref="T:log4net.GlobalContext"/> properties with the same name.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.LogicalThreadContext.Stacks">
- <summary>
- The thread stacks
- </summary>
- <value>
- stack map
- </value>
- <remarks>
- <para>
- The logical thread stacks.
- </para>
- </remarks>
- </member>
- <member name="T:log4net.LogManager">
- <summary>
- This class is used by client applications to request logger instances.
- </summary>
- <remarks>
- <para>
- This class has static methods that are used by a client to request
- a logger instance. The <see cref="M:log4net.LogManager.GetLogger(System.String)"/> method is
- used to retrieve a logger.
- </para>
- <para>
- See the <see cref="T:log4net.ILog"/> interface for more details.
- </para>
- </remarks>
- <example>Simple example of logging messages
- <code lang="C#">
- ILog log = LogManager.GetLogger("application-log");
-
- log.Info("Application Start");
- log.Debug("This is a debug message");
-
- if (log.IsDebugEnabled)
- {
- log.Debug("This is another debug message");
- }
- </code>
- </example>
- <threadsafety static="true" instance="true"/>
- <seealso cref="T:log4net.ILog"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.LogManager.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.LogManager"/> class.
- </summary>
- <remarks>
- Uses a private access modifier to prevent instantiation of this class.
- </remarks>
- </member>
- <member name="M:log4net.LogManager.Exists(System.String)">
- <overloads>Returns the named logger if it exists.</overloads>
- <summary>
- Returns the named logger if it exists.
- </summary>
- <remarks>
- <para>
- If the named logger exists (in the default repository) then it
- returns a reference to the logger, otherwise it returns <c>null</c>.
- </para>
- </remarks>
- <param name="name">The fully qualified logger name to look for.</param>
- <returns>The logger found, or <c>null</c> if no logger could be found.</returns>
- </member>
- <member name="M:log4net.LogManager.Exists(System.String,System.String)">
- <summary>
- Returns the named logger if it exists.
- </summary>
- <remarks>
- <para>
- If the named logger exists (in the specified repository) then it
- returns a reference to the logger, otherwise it returns
- <c>null</c>.
- </para>
- </remarks>
- <param name="repository">The repository to lookup in.</param>
- <param name="name">The fully qualified logger name to look for.</param>
- <returns>
- The logger found, or <c>null</c> if the logger doesn't exist in the specified
- repository.
- </returns>
- </member>
- <member name="M:log4net.LogManager.Exists(System.Reflection.Assembly,System.String)">
- <summary>
- Returns the named logger if it exists.
- </summary>
- <remarks>
- <para>
- If the named logger exists (in the repository for the specified assembly) then it
- returns a reference to the logger, otherwise it returns
- <c>null</c>.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <param name="name">The fully qualified logger name to look for.</param>
- <returns>
- The logger, or <c>null</c> if the logger doesn't exist in the specified
- assembly's repository.
- </returns>
- </member>
- <member name="M:log4net.LogManager.GetCurrentLoggers">
- <overloads>Get the currently defined loggers.</overloads>
- <summary>
- Returns all the currently defined loggers in the default repository.
- </summary>
- <remarks>
- <para>The root logger is <b>not</b> included in the returned array.</para>
- </remarks>
- <returns>All the defined loggers.</returns>
- </member>
- <member name="M:log4net.LogManager.GetCurrentLoggers(System.String)">
- <summary>
- Returns all the currently defined loggers in the specified repository.
- </summary>
- <param name="repository">The repository to lookup in.</param>
- <remarks>
- The root logger is <b>not</b> included in the returned array.
- </remarks>
- <returns>All the defined loggers.</returns>
- </member>
- <member name="M:log4net.LogManager.GetCurrentLoggers(System.Reflection.Assembly)">
- <summary>
- Returns all the currently defined loggers in the specified assembly's repository.
- </summary>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <remarks>
- The root logger is <b>not</b> included in the returned array.
- </remarks>
- <returns>All the defined loggers.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLogger(System.String)">
- <overloads>Get or create a logger.</overloads>
- <summary>
- Retrieves or creates a named logger.
- </summary>
- <remarks>
- <para>
- Retrieves a logger named as the <paramref name="name"/>
- parameter. If the named logger already exists, then the
- existing instance will be returned. Otherwise, a new instance is
- created.
- </para>
- <para>By default, loggers do not have a set level but inherit
- it from the hierarchy. This is one of the central features of
- log4net.
- </para>
- </remarks>
- <param name="name">The name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLogger(System.String,System.String)">
- <summary>
- Retrieves or creates a named logger.
- </summary>
- <remarks>
- <para>
- Retrieve a logger named as the <paramref name="name"/>
- parameter. If the named logger already exists, then the
- existing instance will be returned. Otherwise, a new instance is
- created.
- </para>
- <para>
- By default, loggers do not have a set level but inherit
- it from the hierarchy. This is one of the central features of
- log4net.
- </para>
- </remarks>
- <param name="repository">The repository to lookup in.</param>
- <param name="name">The name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLogger(System.Reflection.Assembly,System.String)">
- <summary>
- Retrieves or creates a named logger.
- </summary>
- <remarks>
- <para>
- Retrieve a logger named as the <paramref name="name"/>
- parameter. If the named logger already exists, then the
- existing instance will be returned. Otherwise, a new instance is
- created.
- </para>
- <para>
- By default, loggers do not have a set level but inherit
- it from the hierarchy. This is one of the central features of
- log4net.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <param name="name">The name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLogger(System.Type)">
- <summary>
- Shorthand for <see cref="M:log4net.LogManager.GetLogger(System.String)"/>.
- </summary>
- <remarks>
- Get the logger for the fully qualified name of the type specified.
- </remarks>
- <param name="type">The full name of <paramref name="type"/> will be used as the name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLogger(System.String,System.Type)">
- <summary>
- Shorthand for <see cref="M:log4net.LogManager.GetLogger(System.String)"/>.
- </summary>
- <remarks>
- Gets the logger for the fully qualified name of the type specified.
- </remarks>
- <param name="repository">The repository to lookup in.</param>
- <param name="type">The full name of <paramref name="type"/> will be used as the name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLogger(System.Reflection.Assembly,System.Type)">
- <summary>
- Shorthand for <see cref="M:log4net.LogManager.GetLogger(System.String)"/>.
- </summary>
- <remarks>
- Gets the logger for the fully qualified name of the type specified.
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- <param name="type">The full name of <paramref name="type"/> will be used as the name of the logger to retrieve.</param>
- <returns>The logger with the name specified.</returns>
- </member>
- <member name="M:log4net.LogManager.Shutdown">
- <summary>
- Shuts down the log4net system.
- </summary>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in all the
- default repositories.
- </para>
- <para>
- Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.LogManager.ShutdownRepository">
- <overloads>Shutdown a logger repository.</overloads>
- <summary>
- Shuts down the default repository.
- </summary>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in the
- default repository.
- </para>
- <para>Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.LogManager.ShutdownRepository(System.String)">
- <summary>
- Shuts down the repository for the repository specified.
- </summary>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in the
- <paramref name="repository"/> specified.
- </para>
- <para>
- Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- <param name="repository">The repository to shutdown.</param>
- </member>
- <member name="M:log4net.LogManager.ShutdownRepository(System.Reflection.Assembly)">
- <summary>
- Shuts down the repository specified.
- </summary>
- <remarks>
- <para>
- Calling this method will <b>safely</b> close and remove all
- appenders in all the loggers including root contained in the
- repository. The repository is looked up using
- the <paramref name="repositoryAssembly"/> specified.
- </para>
- <para>
- Some appenders need to be closed before the application exists.
- Otherwise, pending logging events might be lost.
- </para>
- <para>
- The <c>shutdown</c> method is careful to close nested
- appenders before closing regular appenders. This is allows
- configurations where a regular appender is attached to a logger
- and again to a nested appender.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- </member>
- <member name="M:log4net.LogManager.ResetConfiguration">
- <overloads>Reset the configuration of a repository</overloads>
- <summary>
- Resets all values contained in this repository instance to their defaults.
- </summary>
- <remarks>
- <para>
- Resets all values contained in the repository instance to their
- defaults. This removes all appenders from all loggers, sets
- the level of all non-root loggers to <c>null</c>,
- sets their additivity flag to <c>true</c> and sets the level
- of the root logger to <see cref="F:log4net.Core.Level.Debug"/>. Moreover,
- message disabling is set to its default "off" value.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.LogManager.ResetConfiguration(System.String)">
- <summary>
- Resets all values contained in this repository instance to their defaults.
- </summary>
- <remarks>
- <para>
- Reset all values contained in the repository instance to their
- defaults. This removes all appenders from all loggers, sets
- the level of all non-root loggers to <c>null</c>,
- sets their additivity flag to <c>true</c> and sets the level
- of the root logger to <see cref="F:log4net.Core.Level.Debug"/>. Moreover,
- message disabling is set to its default "off" value.
- </para>
- </remarks>
- <param name="repository">The repository to reset.</param>
- </member>
- <member name="M:log4net.LogManager.ResetConfiguration(System.Reflection.Assembly)">
- <summary>
- Resets all values contained in this repository instance to their defaults.
- </summary>
- <remarks>
- <para>
- Reset all values contained in the repository instance to their
- defaults. This removes all appenders from all loggers, sets
- the level of all non-root loggers to <c>null</c>,
- sets their additivity flag to <c>true</c> and sets the level
- of the root logger to <see cref="F:log4net.Core.Level.Debug"/>. Moreover,
- message disabling is set to its default "off" value.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository to reset.</param>
- </member>
- <member name="M:log4net.LogManager.GetLoggerRepository">
- <overloads>Get the logger repository.</overloads>
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the callers assembly (<see cref="M:System.Reflection.Assembly.GetCallingAssembly"/>).
- </para>
- </remarks>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> instance for the default repository.</returns>
- </member>
- <member name="M:log4net.LogManager.GetLoggerRepository(System.String)">
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the <paramref name="repository"/> argument.
- </para>
- </remarks>
- <param name="repository">The repository to lookup in.</param>
- </member>
- <member name="M:log4net.LogManager.GetLoggerRepository(System.Reflection.Assembly)">
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the <paramref name="repositoryAssembly"/> argument.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- </member>
- <member name="M:log4net.LogManager.GetRepository">
- <overloads>Get a logger repository.</overloads>
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the callers assembly (<see cref="M:System.Reflection.Assembly.GetCallingAssembly"/>).
- </para>
- </remarks>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> instance for the default repository.</returns>
- </member>
- <member name="M:log4net.LogManager.GetRepository(System.String)">
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the <paramref name="repository"/> argument.
- </para>
- </remarks>
- <param name="repository">The repository to lookup in.</param>
- </member>
- <member name="M:log4net.LogManager.GetRepository(System.Reflection.Assembly)">
- <summary>
- Returns the default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.
- </summary>
- <returns>The default <see cref="T:log4net.Repository.ILoggerRepository"/> instance.</returns>
- <remarks>
- <para>
- Gets the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified
- by the <paramref name="repositoryAssembly"/> argument.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to lookup the repository.</param>
- </member>
- <member name="M:log4net.LogManager.CreateDomain(System.Type)">
- <overloads>Create a domain</overloads>
- <summary>
- Creates a repository with the specified repository type.
- </summary>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.LogManager.GetRepository"/> will return
- the same repository instance.
- </para>
- </remarks>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- </member>
- <member name="M:log4net.LogManager.CreateRepository(System.Type)">
- <overloads>Create a logger repository.</overloads>
- <summary>
- Creates a repository with the specified repository type.
- </summary>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.LogManager.GetRepository"/> will return
- the same repository instance.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.LogManager.CreateDomain(System.String)">
- <summary>
- Creates a repository with the specified name.
- </summary>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- Creates the default type of <see cref="T:log4net.Repository.ILoggerRepository"/> which is a
- <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> object.
- </para>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An <see cref="T:System.Exception"/> will be thrown if the repository already exists.
- </para>
- </remarks>
- <param name="repository">The name of the repository, this must be unique amongst repositories.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.LogManager.CreateRepository(System.String)">
- <summary>
- Creates a repository with the specified name.
- </summary>
- <remarks>
- <para>
- Creates the default type of <see cref="T:log4net.Repository.ILoggerRepository"/> which is a
- <see cref="T:log4net.Repository.Hierarchy.Hierarchy"/> object.
- </para>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An <see cref="T:System.Exception"/> will be thrown if the repository already exists.
- </para>
- </remarks>
- <param name="repository">The name of the repository, this must be unique amongst repositories.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.LogManager.CreateDomain(System.String,System.Type)">
- <summary>
- Creates a repository with the specified name and repository type.
- </summary>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An <see cref="T:System.Exception"/> will be thrown if the repository already exists.
- </para>
- </remarks>
- <param name="repository">The name of the repository, this must be unique to the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.LogManager.CreateRepository(System.String,System.Type)">
- <summary>
- Creates a repository with the specified name and repository type.
- </summary>
- <remarks>
- <para>
- The <paramref name="repository"/> name must be unique. Repositories cannot be redefined.
- An <see cref="T:System.Exception"/> will be thrown if the repository already exists.
- </para>
- </remarks>
- <param name="repository">The name of the repository, this must be unique to the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- <exception cref="T:log4net.Core.LogException">The specified repository already exists.</exception>
- </member>
- <member name="M:log4net.LogManager.CreateDomain(System.Reflection.Assembly,System.Type)">
- <summary>
- Creates a repository for the specified assembly and repository type.
- </summary>
- <remarks>
- <para>
- <b>CreateDomain is obsolete. Use CreateRepository instead of CreateDomain.</b>
- </para>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.LogManager.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to get the name of the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- </member>
- <member name="M:log4net.LogManager.CreateRepository(System.Reflection.Assembly,System.Type)">
- <summary>
- Creates a repository for the specified assembly and repository type.
- </summary>
- <remarks>
- <para>
- The <see cref="T:log4net.Repository.ILoggerRepository"/> created will be associated with the repository
- specified such that a call to <see cref="M:log4net.LogManager.GetRepository(System.Reflection.Assembly)"/> with the
- same assembly specified will return the same repository instance.
- </para>
- </remarks>
- <param name="repositoryAssembly">The assembly to use to get the name of the repository.</param>
- <param name="repositoryType">A <see cref="T:System.Type"/> that implements <see cref="T:log4net.Repository.ILoggerRepository"/>
- and has a no arg constructor. An instance of this type will be created to act
- as the <see cref="T:log4net.Repository.ILoggerRepository"/> for the repository specified.</param>
- <returns>The <see cref="T:log4net.Repository.ILoggerRepository"/> created for the repository.</returns>
- </member>
- <member name="M:log4net.LogManager.GetAllRepositories">
- <summary>
- Gets the list of currently defined repositories.
- </summary>
- <remarks>
- <para>
- Get an array of all the <see cref="T:log4net.Repository.ILoggerRepository"/> objects that have been created.
- </para>
- </remarks>
- <returns>An array of all the known <see cref="T:log4net.Repository.ILoggerRepository"/> objects.</returns>
- </member>
- <member name="M:log4net.LogManager.WrapLogger(log4net.Core.ILogger)">
- <summary>
- Looks up the wrapper object for the logger specified.
- </summary>
- <param name="logger">The logger to get the wrapper for.</param>
- <returns>The wrapper for the logger specified.</returns>
- </member>
- <member name="M:log4net.LogManager.WrapLoggers(log4net.Core.ILogger[])">
- <summary>
- Looks up the wrapper objects for the loggers specified.
- </summary>
- <param name="loggers">The loggers to get the wrappers for.</param>
- <returns>The wrapper objects for the loggers specified.</returns>
- </member>
- <member name="M:log4net.LogManager.WrapperCreationHandler(log4net.Core.ILogger)">
- <summary>
- Create the <see cref="T:log4net.Core.ILoggerWrapper"/> objects used by
- this manager.
- </summary>
- <param name="logger">The logger to wrap.</param>
- <returns>The wrapper for the logger specified.</returns>
- </member>
- <member name="F:log4net.LogManager.s_wrapperMap">
- <summary>
- The wrapper map to use to hold the <see cref="T:log4net.Core.LogImpl"/> objects.
- </summary>
- </member>
- <member name="T:log4net.MDC">
- <summary>
- Implementation of Mapped Diagnostic Contexts.
- </summary>
- <remarks>
- <note>
- <para>
- The MDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Properties"/>.
- The current MDC implementation forwards to the <c>ThreadContext.Properties</c>.
- </para>
- </note>
- <para>
- The MDC class is similar to the <see cref="T:log4net.NDC"/> class except that it is
- based on a map instead of a stack. It provides <i>mapped
- diagnostic contexts</i>. A <i>Mapped Diagnostic Context</i>, or
- MDC in short, is an instrument for distinguishing interleaved log
- output from different sources. Log output is typically interleaved
- when a server handles multiple clients near-simultaneously.
- </para>
- <para>
- The MDC is managed on a per thread basis.
- </para>
- </remarks>
- <threadsafety static="true" instance="true"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.MDC.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.MDC"/> class.
- </summary>
- <remarks>
- Uses a private access modifier to prevent instantiation of this class.
- </remarks>
- </member>
- <member name="M:log4net.MDC.Get(System.String)">
- <summary>
- Gets the context value identified by the <paramref name="key"/> parameter.
- </summary>
- <param name="key">The key to lookup in the MDC.</param>
- <returns>The string value held for the key, or a <c>null</c> reference if no corresponding value is found.</returns>
- <remarks>
- <note>
- <para>
- The MDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Properties"/>.
- The current MDC implementation forwards to the <c>ThreadContext.Properties</c>.
- </para>
- </note>
- <para>
- If the <paramref name="key"/> parameter does not look up to a
- previously defined context then <c>null</c> will be returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.MDC.Set(System.String,System.String)">
- <summary>
- Add an entry to the MDC
- </summary>
- <param name="key">The key to store the value under.</param>
- <param name="value">The value to store.</param>
- <remarks>
- <note>
- <para>
- The MDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Properties"/>.
- The current MDC implementation forwards to the <c>ThreadContext.Properties</c>.
- </para>
- </note>
- <para>
- Puts a context value (the <paramref name="val"/> parameter) as identified
- with the <paramref name="key"/> parameter into the current thread's
- context map.
- </para>
- <para>
- If a value is already defined for the <paramref name="key"/>
- specified then the value will be replaced. If the <paramref name="val"/>
- is specified as <c>null</c> then the key value mapping will be removed.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.MDC.Remove(System.String)">
- <summary>
- Removes the key value mapping for the key specified.
- </summary>
- <param name="key">The key to remove.</param>
- <remarks>
- <note>
- <para>
- The MDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Properties"/>.
- The current MDC implementation forwards to the <c>ThreadContext.Properties</c>.
- </para>
- </note>
- <para>
- Remove the specified entry from this thread's MDC
- </para>
- </remarks>
- </member>
- <member name="M:log4net.MDC.Clear">
- <summary>
- Clear all entries in the MDC
- </summary>
- <remarks>
- <note>
- <para>
- The MDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Properties"/>.
- The current MDC implementation forwards to the <c>ThreadContext.Properties</c>.
- </para>
- </note>
- <para>
- Remove all the entries from this thread's MDC
- </para>
- </remarks>
- </member>
- <member name="T:log4net.NDC">
- <summary>
- Implementation of Nested Diagnostic Contexts.
- </summary>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- A Nested Diagnostic Context, or NDC in short, is an instrument
- to distinguish interleaved log output from different sources. Log
- output is typically interleaved when a server handles multiple
- clients near-simultaneously.
- </para>
- <para>
- Interleaved log output can still be meaningful if each log entry
- from different contexts had a distinctive stamp. This is where NDCs
- come into play.
- </para>
- <para>
- Note that NDCs are managed on a per thread basis. The NDC class
- is made up of static methods that operate on the context of the
- calling thread.
- </para>
- </remarks>
- <example>How to push a message into the context
- <code lang="C#">
- using(NDC.Push("my context message"))
- {
- ... all log calls will have 'my context message' included ...
-
- } // at the end of the using block the message is automatically removed
- </code>
- </example>
- <threadsafety static="true" instance="true"/>
- <author>Nicko Cadell</author>
- <author>Gert Driesen</author>
- </member>
- <member name="M:log4net.NDC.#ctor">
- <summary>
- Initializes a new instance of the <see cref="T:log4net.NDC"/> class.
- </summary>
- <remarks>
- Uses a private access modifier to prevent instantiation of this class.
- </remarks>
- </member>
- <member name="M:log4net.NDC.Clear">
- <summary>
- Clears all the contextual information held on the current thread.
- </summary>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- Clears the stack of NDC data held on the current thread.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.NDC.CloneStack">
- <summary>
- Creates a clone of the stack of context information.
- </summary>
- <returns>A clone of the context info for this thread.</returns>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- The results of this method can be passed to the <see cref="M:log4net.NDC.Inherit(System.Collections.Stack)"/>
- method to allow child threads to inherit the context of their
- parent thread.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.NDC.Inherit(System.Collections.Stack)">
- <summary>
- Inherits the contextual information from another thread.
- </summary>
- <param name="stack">The context stack to inherit.</param>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- This thread will use the context information from the stack
- supplied. This can be used to initialize child threads with
- the same contextual information as their parent threads. These
- contexts will <b>NOT</b> be shared. Any further contexts that
- are pushed onto the stack will not be visible to the other.
- Call <see cref="M:log4net.NDC.CloneStack"/> to obtain a stack to pass to
- this method.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.NDC.Pop">
- <summary>
- Removes the top context from the stack.
- </summary>
- <returns>
- The message in the context that was removed from the top
- of the stack.
- </returns>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- Remove the top context from the stack, and return
- it to the caller. If the stack is empty then an
- empty string (not <c>null</c>) is returned.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.NDC.Push(System.String)">
- <summary>
- Pushes a new context message.
- </summary>
- <param name="message">The new context message.</param>
- <returns>
- An <see cref="T:System.IDisposable"/> that can be used to clean up
- the context stack.
- </returns>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- Pushes a new context onto the context stack. An <see cref="T:System.IDisposable"/>
- is returned that can be used to clean up the context stack. This
- can be easily combined with the <c>using</c> keyword to scope the
- context.
- </para>
- </remarks>
- <example>Simple example of using the <c>Push</c> method with the <c>using</c> keyword.
- <code lang="C#">
- using(log4net.NDC.Push("NDC_Message"))
- {
- log.Warn("This should have an NDC message");
- }
- </code>
- </example>
- </member>
- <member name="M:log4net.NDC.Remove">
- <summary>
- Removes the context information for this thread. It is
- not required to call this method.
- </summary>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- This method is not implemented.
- </para>
- </remarks>
- </member>
- <member name="M:log4net.NDC.SetMaxDepth(System.Int32)">
- <summary>
- Forces the stack depth to be at most <paramref name="maxDepth"/>.
- </summary>
- <param name="maxDepth">The maximum depth of the stack</param>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- Forces the stack depth to be at most <paramref name="maxDepth"/>.
- This may truncate the head of the stack. This only affects the
- stack in the current thread. Also it does not prevent it from
- growing, it only sets the maximum depth at the time of the
- call. This can be used to return to a known context depth.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.NDC.Depth">
- <summary>
- Gets the current context depth.
- </summary>
- <value>The current context depth.</value>
- <remarks>
- <note>
- <para>
- The NDC is deprecated and has been replaced by the <see cref="P:log4net.ThreadContext.Stacks"/>.
- The current NDC implementation forwards to the <c>ThreadContext.Stacks["NDC"]</c>.
- </para>
- </note>
- <para>
- The number of context values pushed onto the context stack.
- </para>
- <para>
- Used to record the current depth of the context. This can then
- be restored using the <see cref="M:log4net.NDC.SetMaxDepth(System.Int32)"/> method.
- </para>
- </remarks>
- <seealso cref="M:log4net.NDC.SetMaxDepth(System.Int32)"/>
- </member>
- <member name="T:log4net.ThreadContext">
- <summary>
- The log4net Thread Context.
- </summary>
- <remarks>
- <para>
- The <c>ThreadContext</c> provides a location for thread specific debugging
- information to be stored.
- The <c>ThreadContext</c> properties override any <see cref="T:log4net.GlobalContext"/>
- properties with the same name.
- </para>
- <para>
- The thread context has a properties map and a stack.
- The properties and stack can
- be included in the output of log messages. The <see cref="T:log4net.Layout.PatternLayout"/>
- supports selecting and outputting these properties.
- </para>
- <para>
- The Thread Context provides a diagnostic context for the current thread.
- This is an instrument for distinguishing interleaved log
- output from different sources. Log output is typically interleaved
- when a server handles multiple clients near-simultaneously.
- </para>
- <para>
- The Thread Context is managed on a per thread basis.
- </para>
- </remarks>
- <example>Example of using the thread context properties to store a username.
- <code lang="C#">
- ThreadContext.Properties["user"] = userName;
- log.Info("This log message has a ThreadContext Property called 'user'");
- </code>
- </example>
- <example>Example of how to push a message into the context stack
- <code lang="C#">
- using(ThreadContext.Stacks["NDC"].Push("my context message"))
- {
- log.Info("This log message has a ThreadContext Stack message that includes 'my context message'");
-
- } // at the end of the using block the message is automatically popped
- </code>
- </example>
- <threadsafety static="true" instance="true"/>
- <author>Nicko Cadell</author>
- </member>
- <member name="M:log4net.ThreadContext.#ctor">
- <summary>
- Private Constructor.
- </summary>
- <remarks>
- <para>
- Uses a private access modifier to prevent instantiation of this class.
- </para>
- </remarks>
- </member>
- <member name="F:log4net.ThreadContext.s_properties">
- <summary>
- The thread context properties instance
- </summary>
- </member>
- <member name="F:log4net.ThreadContext.s_stacks">
- <summary>
- The thread context stacks instance
- </summary>
- </member>
- <member name="P:log4net.ThreadContext.Properties">
- <summary>
- The thread properties map
- </summary>
- <value>
- The thread properties map
- </value>
- <remarks>
- <para>
- The <c>ThreadContext</c> properties override any <see cref="T:log4net.GlobalContext"/>
- properties with the same name.
- </para>
- </remarks>
- </member>
- <member name="P:log4net.ThreadContext.Stacks">
- <summary>
- The thread stacks
- </summary>
- <value>
- stack map
- </value>
- <remarks>
- <para>
- The thread local stacks.
- </para>
- </remarks>
- </member>
- </members>
-</doc>
diff --git a/qpid/dotnet/client-010/lib/nunit/nunit-licence.txt b/qpid/dotnet/client-010/lib/nunit/nunit-licence.txt
deleted file mode 100644
index b2316295d3..0000000000
--- a/qpid/dotnet/client-010/lib/nunit/nunit-licence.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov,
- Charlie Poole
-Copyright © 2000-2004 Philip A. Craig
-
-This software is provided 'as-is', without any express or implied warranty. In
-no event will the authors be held liable for any damages arising from the use
-of this software.
-
-Permission is granted to anyone to use this software for any purpose, including
-commercial applications, and to alter it and redistribute it freely, subject to
-the following restrictions:
-
-1. The origin of this software must not be misrepresented; you must not claim
- that you wrote the original software. If you use this software in a product, an
- acknowledgment (see the following) in the product documentation is required.
-
- Portions Copyright © 2002 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov
- or Copyright © 2000-2002 Philip A. Craig
-
-2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
-
-3. This notice may not be removed or altered from any source distribution.
diff --git a/qpid/dotnet/client-010/lib/nunit/nunit.framework.dll b/qpid/dotnet/client-010/lib/nunit/nunit.framework.dll
deleted file mode 100644
index 53666e74c9..0000000000
--- a/qpid/dotnet/client-010/lib/nunit/nunit.framework.dll
+++ /dev/null
Binary files differ
diff --git a/qpid/dotnet/client-010/lib/plossum/C5-License.txt b/qpid/dotnet/client-010/lib/plossum/C5-License.txt
deleted file mode 100644
index 5649c70cf3..0000000000
--- a/qpid/dotnet/client-010/lib/plossum/C5-License.txt
+++ /dev/null
@@ -1,27 +0,0 @@
------------------------------------------------------------------------------
-
-The following license applies to the C5 library (found in C5.dll and C5.pdb)
-The source code for this library together with more information can be found on
-http://www.itu.dk/research/c5/.
-
------------------------------------------------------------------------------
-
-Copyright (c) 2003-2007 Niels Kokholm and Peter Sestoft.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/qpid/dotnet/client-010/lib/plossum/C5.dll b/qpid/dotnet/client-010/lib/plossum/C5.dll
deleted file mode 100644
index 08362849c9..0000000000
--- a/qpid/dotnet/client-010/lib/plossum/C5.dll
+++ /dev/null
Binary files differ
diff --git a/qpid/dotnet/client-010/lib/plossum/Plossum CommandLine.dll b/qpid/dotnet/client-010/lib/plossum/Plossum CommandLine.dll
deleted file mode 100644
index d3aad9485d..0000000000
--- a/qpid/dotnet/client-010/lib/plossum/Plossum CommandLine.dll
+++ /dev/null
Binary files differ
diff --git a/qpid/dotnet/client-010/lib/plossum/license.txt b/qpid/dotnet/client-010/lib/plossum/license.txt
deleted file mode 100644
index 532b9c11a3..0000000000
--- a/qpid/dotnet/client-010/lib/plossum/license.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) Peter Palotas 2007
-
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the distribution.
- * Neither the name of the copyright holder nor the names of its
- contributors may be used to endorse or promote products derived
- from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
-CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/qpid/dotnet/client-010/log.xml b/qpid/dotnet/client-010/log.xml
deleted file mode 100644
index cda84d7c7b..0000000000
--- a/qpid/dotnet/client-010/log.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<log4net>
- <appender name="Console" type="log4net.Appender.ConsoleAppender">
- <layout type="log4net.Layout.PatternLayout">
- <!-- Pattern to output the caller's file name and line number -->
- <conversionPattern value="%5level [%thread] (%file:%line) - %message%newline" />
- </layout>
- </appender>
-
- <appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
- <file value="logs/mylogfile.log" />
- <appendToFile value="true" />
- <maximumFileSize value="8192KB" />
- <maxSizeRollBackups value="2" />
-
- <layout type="log4net.Layout.PatternLayout">
- <conversionPattern value="%date [%thread] %-5level %ndc - %message%newline" />
- <!--<conversionPattern value="%level %thread %logger - %message%newline" />-->
- </layout>
- </appender>
-
- <root>
- <level value="DEBUG" />
- <appender-ref ref="Console" />
- <appender-ref ref="RollingFile" />
- </root>
-</log4net>
diff --git a/qpid/dotnet/client-010/management/console/AbstractConsole.cs b/qpid/dotnet/client-010/management/console/AbstractConsole.cs
deleted file mode 100644
index 315b2b6d48..0000000000
--- a/qpid/dotnet/client-010/management/console/AbstractConsole.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-
-namespace org.apache.qpid.console
-{
- public class AbstractConsole : Console
- {
- public AbstractConsole(){}
- public virtual void NewAgent(Agent agent) {}
- public virtual void AgentRemoved(Agent agent) {}
- public virtual void BrokerConnected(Broker broker) {}
- public virtual void BrokerDisconnected(Broker broker) {}
- public virtual void BrokerInformation(Broker broker) {}
- public virtual void NewPackage(String packageName) {}
- public virtual void NewClass(short kind, ClassKey key) {}
- public virtual void ObjectProperties(Broker broker, QMFObject obj) {}
- public virtual void ObjectStatistics(Broker broker, QMFObject obj) {}
- public virtual void MethodResponse(Broker broker, long seq, MethodResult response) {}
- public virtual void EventRecieved(Broker broker, QMFEvent anEvent) {}
- public virtual void HearbeatRecieved(Agent agent, long timestamp) {}
- public virtual Type TypeMapping(ClassKey key) {
- return typeof(QMFObject) ;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/Agent.cs b/qpid/dotnet/client-010/management/console/Agent.cs
deleted file mode 100644
index df544a4dd0..0000000000
--- a/qpid/dotnet/client-010/management/console/Agent.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using log4net ;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * Local representation of a remote agent which has been found on the bus.
- */
- public class Agent
- {
- public static ILog log = LogManager.GetLogger(typeof(Agent)) ;
-
- public Broker Broker {get;set;}
- public long BrokerBank {get;set;}
- public long AgentBank {get;set;}
- public string label {get;set;}
-
- public Agent(Broker broker, long agentBank, string label)
- {
- this.Broker = broker ;
- this.BrokerBank = broker.BrokerBank() ;
- this.AgentBank = agentBank ;
- this.label = label ;
- }
-
- public string AgentKey() {
- return Agent.AgentKey(AgentBank, BrokerBank) ;
- }
-
- public string RoutingCode() {
- return Agent.RoutingCode(AgentBank, BrokerBank) ;
- }
-
- public static string AgentKey(long AgentBank, long BrokerBank) {
- return String.Format("{0}:{1}", AgentBank, BrokerBank) ;
- }
-
- public static string RoutingCode(long AgentBank, long BrokerBank) {
- return String.Format("agent.{0}.{1}", BrokerBank, AgentBank) ;
- }
-
- public static long GetBrokerBank(string routingKey) {
- string delim = "." ;
- return long.Parse(routingKey.Split(delim.ToCharArray())[2]) ;
- }
-
- public static long GetAgentBank(string routingKey) {
- string delim = "." ;
- return long.Parse(routingKey.Split(delim.ToCharArray())[3]) ;
- }
-
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/Broker.cs b/qpid/dotnet/client-010/management/console/Broker.cs
deleted file mode 100644
index 7684da9e12..0000000000
--- a/qpid/dotnet/client-010/management/console/Broker.cs
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic ;
-using System.Threading ;
-using org.apache.qpid.client ;
-using org.apache.qpid.transport ;
-using org.apache.qpid.transport.codec ;
-using log4net ;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * Controls all communication with a broker. Works with the session to provide
- * synhchronous method calls across the asynchronous QMF bus.
- */
- public class Broker : IMessageListener
- {
- public static ILog log = LogManager.GetLogger(typeof(Broker)) ;
- public static int SYNC_TIME = 60000 ;
-
- public BrokerURL url ;
- public Dictionary<string, Agent> Agents = new Dictionary<string, Agent>() ;
-
- private IClient client ;
- private IClientSession clientSession ;
- //FIXME This second session should not be needed. There is a bug in the underlieing code.
- private IClientSession outSession ;
- private int timeout = 50000 ;
- private string replyName ;
- private string topicName ;
- private bool connected = false ;
- private bool syncInFlight = false ;
- private bool topicBound = false ;
- private int reqsOutstanding = 0 ;
- private org.apache.qpid.console.Session consoleSession ;
- private object lockObject = new Object() ;
-
-
- public Broker(org.apache.qpid.console.Session session, BrokerURL url)
- {
- log.Debug("Creating a new Broker for url " + url) ;
- this.url = url;
- consoleSession = session ;
- this.TryToConnect() ;
- }
-
- ~Broker() {
- if (connected) {
- this.Shutdown() ;
- }
- }
-
- public int BrokerBank() {
- return 1 ;
- }
-
- public bool IsConnected() {
- return connected ;
- }
-
- protected void TryToConnect() {
- reqsOutstanding = 1 ;
- Agent newAgent = new Agent(this,0,"BrokerAgent") ;
- Agents.Add(newAgent.AgentKey(), newAgent) ;
- client = new Client() ;
- client.Connect(url.Hostname, url.Port, null, url.AuthName, url.AuthPassword) ;
- clientSession = client.CreateSession(timeout) ;
- //clientSession.SetAutoSync(false) ;
- string name = System.Text.Encoding.UTF8.GetString(clientSession.GetName()) ;
- replyName = "reply-" + name ;
- topicName = "topic-" + name ;
- clientSession.SetAutoSync(true) ;
- Option[] options = new Option[] {Option.EXCLUSIVE, Option.AUTO_DELETE} ;
-
- // This queue is used for responses to messages which are sent.
- clientSession.QueueDeclare(replyName,options) ;
- clientSession.ExchangeBind(replyName,"amq.direct",replyName) ;
- clientSession.AttachMessageListener(this, "rdest") ;
- clientSession.MessageSubscribe(replyName,"rdest",MessageAcceptMode.NONE,MessageAcquireMode.PRE_ACQUIRED,null,0,null) ;
- clientSession.MessageSetFlowMode("rdest", MessageFlowMode.WINDOW);
- clientSession.MessageFlow("rdest", MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
- clientSession.MessageFlow("rdest", MessageCreditUnit.MESSAGE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
-
- // This queue is used for unsolicited messages sent to this class.
- clientSession.QueueDeclare(topicName, options) ;
- clientSession.AttachMessageListener(this, "tdest") ;
- clientSession.MessageSubscribe(topicName,"tdest",MessageAcceptMode.NONE,MessageAcquireMode.PRE_ACQUIRED,null,0,null) ;
- clientSession.MessageSetFlowMode("tdest", MessageFlowMode.WINDOW);
- clientSession.MessageFlow("tdest", MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
- clientSession.MessageFlow("tdest", MessageCreditUnit.MESSAGE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
-
- outSession = client.CreateSession(timeout) ;
- outSession.ExchangeBind(replyName,"amq.direct",replyName) ;
-
- connected = true ;
- consoleSession.HandleBrokerConnect(this) ;
-
-
- IEncoder encoder = CreateEncoder() ;
- this.SetHeader(encoder, 'B', 0) ;
- this.Send(encoder) ;
- }
-
- public void Shutdown() {
- if (connected) {
- this.WaitForStable() ;
- clientSession.MessageStop("rdest") ;
- clientSession.MessageStop("tdest") ;
- clientSession.Close() ;
- client.Close() ;
- this.connected = false ;
- }
- }
-
- public void UpdateAgent(QMFObject obj) {
- long agentBank = (long)obj.GetProperty("agentBank") ;
- long brokerBank = (long)obj.GetProperty("brokerBank") ;
- String key = Agent.AgentKey(agentBank, brokerBank) ;
- if (obj.IsDeleted()) {
- if (Agents.ContainsKey(key)) {
- Agent agent = Agents[key] ;
- Agents.Remove(key) ;
- consoleSession.HandleAgentRemoved(agent) ;
- }
- }
- else {
- if (! Agents.ContainsKey(key)) {
- Agent newAgent = new Agent(this, agentBank, (string)obj.GetProperty("label")) ;
- Agents.Add(key, newAgent) ;
- consoleSession.HandleNewAgent(newAgent) ;
- }
- }
- }
-
- public IEncoder CreateEncoder() {
- return new MSEncoder(1000) ;
- }
-
-
- public IEncoder CreateEncoder(char opcode, long sequence) {
- return SetHeader(this.CreateEncoder(), opcode, sequence) ;
- }
-
- public IEncoder SetHeader(IEncoder enc, char opcode, long sequence) {
- enc.WriteUint8((short)'A') ;
- enc.WriteUint8((short)'M') ;
- enc.WriteUint8((short)'2') ;
- enc.WriteUint8((short)opcode) ;
- enc.WriteUint32(sequence) ;
- return enc ;
- }
-
- public Message CreateMessage(IEncoder enc) {
- return this.CreateMessage(enc, "broker", -1) ;
- }
-
- public Message CreateMessage(IEncoder enc, string routingKey) {
- return this.CreateMessage(enc, routingKey, -1) ;
- }
-
- public Message CreateMessage(IEncoder enc, string routingKey, long ttl) {
- Message msg = new Message() ;
- msg.Body = ((MSEncoder)enc).Segment() ;
- msg.DeliveryProperties.SetRoutingKey(routingKey) ;
- if (-1 != ttl) {
- msg.DeliveryProperties.SetTtl(ttl) ;
- }
- msg.MessageProperties.SetContentType("x-application/qmf") ;
- msg.MessageProperties.SetReplyTo(new ReplyTo("amq.direct", replyName)) ;
- return msg ;
- }
-
- public void Send(IEncoder enc) {
- this.Send(this.CreateMessage(enc)) ;
- }
-
- public void Send(Message msg) {
-
- lock (lockObject) {
- log.Debug(String.Format("Sending message to routing key '{0}'", msg.DeliveryProperties.GetRoutingKey())) ;
- //log.Debug(System.Text.Encoding.UTF8.GetString(msg.Body.ToArray())) ;
- outSession.MessageTransfer("qpid.management", msg) ;
- //clientSession.sync() ;
- }
- }
-
- protected bool CheckHeader(IDecoder decoder, out char opcode, out long sequence) {
- bool returnValue = false ;
- opcode = 'x' ;
- sequence = -1 ;
- if(decoder.HasRemaining()) {
- char character = (char) decoder.ReadUint8() ;
- if (character != 'A') {
- return returnValue ;
- }
- character = (char) decoder.ReadUint8() ;
- if (character != 'M') {
- return returnValue ;
- }
- character = (char) decoder.ReadUint8() ;
- if (character != '2') {
- return returnValue ;
- }
- returnValue = true ;
- opcode = (char) decoder.ReadUint8() ;
- sequence = decoder.ReadUint32() ;
- }
- return returnValue ;
- }
-
- public void MessageTransfer(IMessage msg) {
- MSDecoder decoder = new MSDecoder() ;
- decoder.Init(msg.Body) ;
- RangeSet rangeSet = new RangeSet() ;
- rangeSet.Add(msg.Id) ;
- char opcode = 'x' ;
- long seq = -1 ;
- while (this.CheckHeader(decoder, out opcode, out seq)) {
- //log.Debug("Message recieved with opcode " + opcode + " and sequence " + seq) ;
- //log.Debug(System.Text.Encoding.UTF8.GetString(msg.Body.ToArray())) ;
- switch (opcode) {
- case 'b':
- consoleSession.HandleBrokerResponse(this, decoder, seq) ;
- break ;
- case 'p':
- consoleSession.HandlePackageIndicator(this, decoder, seq) ;
- break ;
- case 'z':
- consoleSession.HandleCommandComplete(this, decoder, seq) ;
- break ;
- case 'q':
- consoleSession.HandleClassIndicator(this, decoder, seq) ;
- break ;
- case 'm':
- consoleSession.HandleMethodResponse(this, decoder, seq) ;
- break ;
- case 'h':
- consoleSession.HandleHeartbeatIndicator(this, decoder, seq, msg) ;
- break ;
- case 'e':
- consoleSession.HandleEventIndicator(this, decoder, seq) ;
- break ;
- case 's':
- consoleSession.HandleSchemaResponse(this, decoder, seq) ;
- break ;
- case 'c':
- consoleSession.HandleContentIndicator(this, decoder, seq, true, false) ;
- break ;
- case 'i':
- consoleSession.HandleContentIndicator(this, decoder, seq, false, true) ;
- break ;
- case 'g':
- consoleSession.HandleContentIndicator(this, decoder, seq, true, true) ;
- break ;
- default:
- log.Error("Invalid message type recieved with opcode " + opcode) ;
- break ;
- }
- }
- lock (lockObject) {
- outSession.MessageAccept(rangeSet) ;
- }
- }
-
- public void IncrementOutstanding() {
- lock (lockObject) {
- this.reqsOutstanding += 1 ;
- }
- }
-
- public void DecrementOutstanding() {
- lock (lockObject) {
- this.reqsOutstanding -= 1 ;
- if ((reqsOutstanding == 0) & !topicBound) {
- foreach (string key in consoleSession.BindingKeys()) {
- //this.clientSession.ExchangeBind(topicName, "qpid.mannagement", key) ;
- log.Debug("Setting Topic Binding " + key) ;
- this.outSession.ExchangeBind(topicName, "qpid.management", key) ;
- }
- topicBound = true ;
- }
- if ((reqsOutstanding == 0) & syncInFlight) {
- syncInFlight = false ;
- Monitor.PulseAll(lockObject) ;
- }
- }
- }
-
- public void WaitForStable() {
- lock (lockObject) {
- if (connected) {
- DateTime start = DateTime.Now ;
- syncInFlight = true ;
- while (reqsOutstanding != 0) {
- log.Debug("Waiting to recieve messages") ;
- Monitor.Wait(lockObject,SYNC_TIME) ;
- TimeSpan duration = DateTime.Now - start;
- if (duration.TotalMilliseconds > SYNC_TIME) {
- throw new Exception("Timeout waiting for Broker to Sync") ;
- }
- }
- }
- }
- }
-
- public void SetSyncInFlight(bool inFlight) {
- lock(lockObject) {
- syncInFlight = inFlight ;
- Monitor.PulseAll(lockObject) ;
- }
- }
-
- public bool GetSyncInFlight() {
- return syncInFlight ;
- }
-
- public void WaitForSync(int timeout) {
- lock(lockObject) {
- DateTime start = DateTime.Now ;
- while (syncInFlight) {
- Monitor.Wait(lockObject,timeout) ;
- }
- TimeSpan duration = DateTime.Now - start;
- if (duration.TotalMilliseconds > timeout) {
- throw new Exception("Timeout waiting for Broker to Sync") ;
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/BrokerURL.cs b/qpid/dotnet/client-010/management/console/BrokerURL.cs
deleted file mode 100644
index 77318e4295..0000000000
--- a/qpid/dotnet/client-010/management/console/BrokerURL.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * URL which defines the connection to the broker to hook up to the QMF
- * Bus.
- */
- public class BrokerURL
- {
- public string Hostname {get;set;}
- public int Port {get;set;}
- public string AuthName {get;set;}
- public string AuthPassword {get;set;}
- public string AuthMechanism {get;set;}
- protected bool ssl = false ;
-
- public BrokerURL(string str)
- {
- Uri uri = new Uri(str) ;
- this.Hostname = uri.Host ;
- if (uri.Scheme.Equals("amqp")) {
- Port=5672 ;
- } else {
- ssl = true ;
- Port=5673 ;
- }
-
- //FIXME Make this more robust
- this.AuthName = "guest" ;
- this.AuthPassword = "guest" ;
- this.AuthMechanism = "PLAIN" ;
- }
-
- public string GetURI() {
- return Hostname ;
- }
-
- public override string ToString ()
- {
- if (ssl) {
- return String.Format("amqps://{0}:{1}", Hostname, Port) ;
- } else {
- return String.Format("amqp://{0}:{1}", Hostname, Port) ;
- }
- }
-
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/ClassKey.cs b/qpid/dotnet/client-010/management/console/ClassKey.cs
deleted file mode 100644
index a3aba2761a..0000000000
--- a/qpid/dotnet/client-010/management/console/ClassKey.cs
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Globalization ;
-using org.apache.qpid.transport.util;
-using org.apache.qpid.transport.codec ;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * Identifies a specific class and version on the bus.
- */
- public class ClassKey
- {
- public string PackageName { get; set; }
- public string ClassName { get; set; }
- public long[] Hash = new long[4] ;
-
- public ClassKey(String keyString) {
- string delims = ":()" ;
- string[] parts = keyString.Split(delims.ToCharArray()) ;
- if (parts.Length < 3) {
- throw new Exception("Invalid class key format. Format should be package:class(bytes)") ;
- }
- PackageName = parts[0] ;
- ClassName = parts[1] ;
- delims = "-" ;
- string[] bytes = parts[2].Split(delims.ToCharArray()) ;
- if (bytes.Length != 4) {
- throw new Exception("Invalid class key format. Bytes should be in the format HEX-HEX-HEX-HEX") ;
- }
- Hash[0] = long.Parse(bytes[0], NumberStyles.HexNumber) ;
- Hash[1] = long.Parse(bytes[1], NumberStyles.HexNumber) ;
- Hash[2] = long.Parse(bytes[2], NumberStyles.HexNumber) ;
- Hash[3] = long.Parse(bytes[3], NumberStyles.HexNumber) ;
- }
-
- public ClassKey(IDecoder dec) {
- PackageName = dec.ReadStr8() ;
- ClassName = dec.ReadStr8() ;
- Hash[0] = dec.ReadUint32() ;
- Hash[1] = dec.ReadUint32() ;
- Hash[2] = dec.ReadUint32() ;
- Hash[3] = dec.ReadUint32() ;
-
- }
-
- public string GetKeyString() {
- string hashString = GetHashString() ;
- return String.Format("{0}:{1}({2})", PackageName, ClassName, hashString) ;
- }
-
- public string GetHashString() {
- return String.Format("{0:x8}-{1:x8}-{2:x8}-{3:x8}", (long) Hash[0],Hash[1], Hash[2],Hash[3]) ;
- }
-
- public void encode(IEncoder enc) {
- enc.WriteStr8(PackageName) ;
- enc.WriteStr8(ClassName) ;
- enc.WriteUint32(Hash[0]) ;
- enc.WriteUint32(Hash[1]) ;
- enc.WriteUint32(Hash[2]) ;
- enc.WriteUint32(Hash[3]) ;
- }
-
- override public string ToString() {
- return String.Format("ClassKey: {0}", GetKeyString()) ;
- }
-
- public override int GetHashCode ()
- {
- return GetKeyString().GetHashCode() ;
- }
-
- public override bool Equals (object obj)
- {
- if (obj.GetType().Equals(this.GetType())) {
- ClassKey other = (ClassKey) obj ;
- return (other.GetKeyString().Equals(this.GetKeyString())) ;
- }
- else {
- return false ;
- }
- }
-
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/Console.cs b/qpid/dotnet/client-010/management/console/Console.cs
deleted file mode 100644
index 8ff201c676..0000000000
--- a/qpid/dotnet/client-010/management/console/Console.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-
-namespace org.apache.qpid.console
-{
- /**
- * Callbacks which are exposed by the Session. Clients should create anm implementaiton of this
- * for more fine grained interaction with the bus.
- */
- public interface Console
- {
- void NewAgent(Agent agent) ;
- void AgentRemoved(Agent agent) ;
- void BrokerConnected(Broker broker) ;
- void BrokerDisconnected(Broker broker) ;
- void BrokerInformation(Broker broker) ;
- void NewPackage(String packageName) ;
- void NewClass(short kind, ClassKey key) ;
- void ObjectProperties(Broker broker, QMFObject obj) ;
- void ObjectStatistics(Broker broker, QMFObject obj) ;
- void MethodResponse(Broker broker, long seq, MethodResult response) ;
- void EventRecieved(Broker broker, QMFEvent anEvent) ;
- void HearbeatRecieved(Agent agent, long timestamp) ;
- Type TypeMapping(ClassKey key) ;
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/MethodResult.cs b/qpid/dotnet/client-010/management/console/MethodResult.cs
deleted file mode 100644
index 7215f5dcbc..0000000000
--- a/qpid/dotnet/client-010/management/console/MethodResult.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic ;
-
-namespace org.apache.qpid.console
-{
- /**
- * The result on invoking a method on a managed object
- */
- public class MethodResult
- {
-
- public long ReturnCode {get;set;}
- public string Text {get;set;}
- protected Dictionary<string, object> ReturnValues ;
-
- public MethodResult(long aCode, string aMsg, Dictionary<string, object> args)
- {
- ReturnCode = aCode ;
- Text = aMsg ;
- ReturnValues = args ;
- }
-
- public object GetReturnValue(string name) {
- object returnValue = null ;
- if (ReturnValues.ContainsKey(name)) {
- returnValue = ReturnValues[name] ;
- }
- return returnValue ;
- }
-
- public Dictionary<string, object> GetReturnValues() {
- return ReturnValues ;
- }
-
- public override string ToString()
- {
- string returnString = "" ;
- foreach (KeyValuePair<string, object> pair in ReturnValues) {
- returnString = returnString + String.Format("(Key: '{0}' Value: '{1}')", pair.Key, pair.Value) ;
- }
-
- return string.Format("MethodResult: ReturnCode={0}, Text={1} Values=[{2}]", ReturnCode, Text, returnString);
- }
-
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/ObjectID.cs b/qpid/dotnet/client-010/management/console/ObjectID.cs
deleted file mode 100644
index 9532c8e64c..0000000000
--- a/qpid/dotnet/client-010/management/console/ObjectID.cs
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using org.apache.qpid.transport.codec ;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * Uniquely identifies an object on the bus.
- */
- public class ObjectID
- {
-
- protected long first ;
- protected long second ;
-
- public ObjectID() {
- }
-
- public ObjectID(IDecoder dec)
- {
- first = (long)dec.ReadUint64() ;
- second = (long)dec.ReadUint64() ;
- }
-
- public ObjectID(long first, long second) {
- this.first = first ;
- this.second = second ;
- }
-
- public long Flags() {
- return (long) ((ulong)this.first & 0xF000000000000000) >> 60 ;
- }
-
- public long Sequence() {
- return (long)((ulong)this.first & 0x0FFF000000000000) >> 48 ;
- }
-
- public long BrokerBank() {
- return (long)((ulong)this.first & 0x0000FFFFF0000000) >> 28 ;
- }
-
- public long AgentBank() {
- return (this.first & 0x000000000FFFFFFF) ;
- }
-
- public long Object() {
- return second ;
- }
-
- public bool IsDurable() {
- return Sequence() == 0 ;
- }
-
- public void encode(IEncoder enc) {
- enc.WriteUint64((long)first) ;
- enc.WriteUint64((long)second) ;
- }
-
- override public string ToString() {
- return "" + Flags() + "-" + Sequence() + "-" + BrokerBank() + "-" + AgentBank() + "-" + Object() ;
- }
-
- public string RoutingCode() {
- return Agent.RoutingCode((long)AgentBank(), (long)BrokerBank()) ;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/QMFEvent.cs b/qpid/dotnet/client-010/management/console/QMFEvent.cs
deleted file mode 100644
index 73e1a34c43..0000000000
--- a/qpid/dotnet/client-010/management/console/QMFEvent.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic;
-using org.apache.qpid.transport.codec ;
-
-
-namespace org.apache.qpid.console
-{
- public enum EventSeverity : short {
- EMER = 0 ,
- ALERT = 1 ,
- CRIT = 2 ,
- ERROR = 3 ,
- WARN = 4 ,
- NOTIC = 5 ,
- INFO = 6 ,
- DEBUG = 7
- }
-
- /**
- * An event raised by an agent on the bus.
- */
- public class QMFEvent
- {
- public Session Session { get;set; }
- public ClassKey ClassKey {get;set;}
- //FIXME time?
- public long Timestamp {get;set;}
- public EventSeverity Severity {get;set;}
- public Dictionary<string, object> Arguments {get;set;}
-
- public QMFEvent(Session session, IDecoder dec)
- {
- Session = session ;
- ClassKey = new ClassKey(dec) ;
- Timestamp = dec.ReadInt64() ;
- Severity = (EventSeverity) dec.ReadUint8() ;
- SchemaClass sClass = Session.GetSchema(ClassKey) ;
- Arguments = new Dictionary<string, object>() ;
-
- if (sClass != null) {
- foreach (SchemaArgument arg in sClass.Arguments) {
- Arguments[arg.Name] = Session.DecodeValue(dec, arg.Type) ;
- }
- }
- }
-
- public object GetArgument(string argName) {
- object returnValue = null ;
- Arguments.TryGetValue(argName, out returnValue) ;
- return returnValue ;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/QMFObject.cs b/qpid/dotnet/client-010/management/console/QMFObject.cs
deleted file mode 100644
index 905422efd9..0000000000
--- a/qpid/dotnet/client-010/management/console/QMFObject.cs
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic ;
-using log4net ;
-using org.apache.qpid.transport.codec ;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * An object which is returned from an agent by the Session. It can have
- * methods, properties, and statistics.
- */
- public class QMFObject
- {
-
- public static ILog log = LogManager.GetLogger(typeof(QMFObject)) ;
-
- public Session Session {get;set;}
- protected SchemaClass _Schema ;
- virtual public SchemaClass Schema {get {return _Schema;} set {_Schema=value;}}
- bool Managed ;
- public DateTime CurrentTime {get;set;}
- public DateTime CreateTime {get;set;}
- public DateTime DeleteTime {get;set;}
- public ObjectID ObjectID {get;set;}
- public Dictionary<string, object> Properties = new Dictionary<string, object>() ;
- public Dictionary<string, object> Statistics = new Dictionary<string, object>() ;
-
-
- // This constructor is the "naked" constructor which creates
- // an object without a session or a schema. It is used by
- // subclasses which are auto generated
- public QMFObject() {
- }
-
- public QMFObject(QMFObject source) {
- this.Session = source.Session ;
- this.Schema = source.Schema ;
- this.Managed = source.Managed ;
- this.CurrentTime = source.CurrentTime ;
- this.CreateTime = source.CreateTime ;
- this.DeleteTime = source.DeleteTime ;
- this.ObjectID = source.ObjectID ;
- this.Properties = source.Properties ;
- this.Statistics = source.Statistics ;
- }
-
- // This constructor is used by a session make object call to
- // create a blank object from a schema.
- public QMFObject(Session session, SchemaClass schema, bool hasProperties, bool hasStats , bool isManaged) {
- Session = session ;
- Schema = schema ;
- Managed = isManaged ;
-
- if (hasProperties) {
- foreach (SchemaProperty prop in Schema.GetAllProperties()) {
- object propValue = null ;
- if (!prop.Optional) {
- propValue = Util.DefaultValue(prop.Type) ;
- }
- this.SetProperty(prop.Name, propValue) ;
- }
- }
-
- if (hasStats) {
- foreach (SchemaStatistic stat in Schema.Statistics) {
- SetStatistic(stat.Name, Util.DefaultValue(stat.Type)) ;
- }
- }
- }
-
- // This constructor is used by the session to create an object based on a data
- // stream by the agent.
- public QMFObject(Session session, SchemaClass schema, IDecoder dec, bool hasProperties, bool hasStats , bool isManaged)
- {
- Session = session ;
- Schema = schema ;
- Managed = isManaged ;
-
- if (Managed) {
- // FIXME DateTime or Uint64??
- CurrentTime = new DateTime(dec.ReadDatetime()) ;
- CreateTime = new DateTime(dec.ReadDatetime()) ;
- DeleteTime = new DateTime(dec.ReadDatetime()) ;
- ObjectID = new ObjectID(dec) ;
- }
-
- if (hasProperties) {
- List<string> excluded = ProcessPresenceMasks(dec, Schema) ;
-
- foreach (SchemaProperty prop in Schema.GetAllProperties()) {
- if (excluded.Contains(prop.Name)) {
- log.Debug(String.Format("Setting Property Default {0}", prop.Name)) ;
- safeAddProperty(prop.Name, null) ;
- } else {
- //log.Debug(String.Format("Setting Property {0}", prop.Name)) ;
- safeAddProperty(prop.Name, session.DecodeValue(dec, prop.Type)) ;
- }
- }
- }
-
- if (hasStats) {
- foreach (SchemaStatistic stat in Schema.GetAllStatistics()) {
- //log.Debug(String.Format("Setting Statistic {0}", stat.Name)) ;
- Statistics.Add(stat.Name, session.DecodeValue(dec, stat.Type)) ;
- }
- }
-
- }
-
- protected List<string> ProcessPresenceMasks(IDecoder dec, SchemaClass schema) {
- List<string> excludes = new List<string> () ;
- short bit = 0 ;
- short mask = 0 ;
- foreach (SchemaProperty prop in Schema.GetAllProperties()) {
- if (prop.Optional) {
- //log.Debug(String.Format("Property named {0} is optional", prop.Name)) ;
- if (bit == 0) {
- mask=dec.ReadUint8() ;
- bit = 1 ;
- }
-
- if ((mask & bit) == 0) {
- //log.Debug(String.Format("Property named {0} is not present", prop.Name)) ;
- excludes.Add(prop.Name) ;
- }
- bit *= 2 ;
- if (bit == 256) {
- bit = 0 ;
- }
- }
- }
- return excludes ;
- }
-
- protected List<SchemaMethod> getMethods() {
- return Schema.GetAllMethods() ;
- }
-
- public object GetProperty(string attributeName) {
- //FIXME any object refs?
- object returnValue = null ;
- Properties.TryGetValue(attributeName, out returnValue) ;
- return returnValue ;
- }
-
- protected void SetStatistic(string attributeName, object newValue) {
- Statistics.Remove(attributeName) ;
- Statistics.Add(attributeName, newValue) ;
- }
-
- public void SetProperty(string attributeName, object newValue) {
- Properties.Remove(attributeName) ;
- Properties.Add(attributeName, newValue) ;
- }
-
- public bool IsDeleted() {
- return !DeleteTime.Equals(new DateTime(0)) ;
- }
-
- public string RoutingKey() {
- return ObjectID.RoutingCode() ;
- }
-
- public long AgentBank() {
- return ObjectID.AgentBank() ;
- }
-
- public long BrokerBank() {
- return ObjectID.BrokerBank() ;
- }
-
- override public string ToString() {
- string propertyString = "" ;
- foreach (KeyValuePair<string, object> pair in Properties) {
- propertyString = propertyString + String.Format("(Name: '{0}' Value: '{1}')", pair.Key, pair.Value) ;
- }
-
- string statsString = "" ;
- foreach (KeyValuePair<string, object> sPair in Statistics) {
- statsString = statsString + String.Format("(Name: '{0}' Value: '{1}')", sPair.Key, sPair.Value) ;
- }
- if (Managed) {
- return String.Format("Managed QMFObject {0}:{1}({2}) Properties: [{3}] Statistics: [{4}])", Schema.PackageName, Schema.ClassName, ObjectID, propertyString, statsString) ;
- } else {
- return String.Format("QMFObject {0}:{1} Properties: [{2}] Statistics: [{3}]", Schema.PackageName, Schema.ClassName, propertyString, statsString) ;
- }
- }
-
- public MethodResult InvokeMethod(string name, params object[] args) {
- return this.InternalInvokeMethod(name, new List<object>(args), true, Broker.SYNC_TIME ) ;
- }
-
- public MethodResult InvokeMethod(string name, int timeToLive, params object[] args) {
- return this.InternalInvokeMethod(name, new List<object>(args), true, timeToLive) ;
- }
-
- public MethodResult InvokeMethod(string name, bool synchronous, int timeToLive, params object[] args) {
- return this.InternalInvokeMethod(name, new List<object>(args), synchronous, timeToLive ) ;
- }
-
- public MethodResult InvokeMethod(string name, bool synchronous, params object[] args) {
- return this.InternalInvokeMethod(name, new List<object>(args), synchronous, Broker.SYNC_TIME) ;
- }
-
- protected MethodResult InternalInvokeMethod(string name, List<object> args, bool synchronous, int timeToLive) {
- if (!Managed) {
- throw new Exception ("Object is not Managed") ;
- }
- if (Schema.GetMethod(name) == null) {
- throw new Exception (String.Format("Method named '{0}' does not exist", name)) ;
- }
- return Session.InvokeMethod(this, name, args, synchronous, timeToLive) ;
- }
-
- public void Encode (IEncoder enc) {
- int mask = 0 ;
- int bit = 0 ;
- List<SchemaProperty> propsToEncode = new List<SchemaProperty>() ;
- log.Debug(String.Format("Encoding class {0}:{1}", Schema.PackageName, Schema.ClassName)) ;
-
- enc.WriteUint8(20) ;
- Schema.Key.encode(enc) ;
-
- foreach (SchemaProperty prop in Schema.GetAllProperties()) {
- if (prop.Optional) {
- if (bit == 0) {
- bit =1 ;
- }
- if ((Properties.ContainsKey(prop.Name)) && (Properties[prop.Name] != null)) {
- mask |= bit ;
- propsToEncode.Add(prop) ;
- } else {
- }
- bit = bit << 1 ;
- if (bit == 256) {
- bit = 0 ;
- enc.WriteUint8((short)mask) ;
- mask = 0 ;
- }
- } else {
- propsToEncode.Add(prop) ;
- }
- }
- if (bit != 0) {
- enc.WriteUint8((short)mask) ;
- }
-
- foreach (SchemaProperty prop in propsToEncode) {
- object obj = Properties[prop.Name] ;
- //log.Debug(String.Format("Encoding property {0}", prop.Name)) ;
- Session.EncodeValue(enc, prop.Type, obj) ;
- }
- foreach (SchemaStatistic stat in Schema.Statistics) {
- object obj = Statistics[stat.Name] ;
- Session.EncodeValue(enc, stat.Type, obj) ;
- }
- log.Debug("Done") ;
-
- }
-
-
- protected void safeAddProperty(string propName, object value) {
- if (Properties.ContainsKey(propName)) {
- Properties[propName] = value ;
- } else {
- Properties.Add(propName, value) ;
- }
- }
-
-
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/SchemaArgument.cs b/qpid/dotnet/client-010/management/console/SchemaArgument.cs
deleted file mode 100644
index d3ee508b31..0000000000
--- a/qpid/dotnet/client-010/management/console/SchemaArgument.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic ;
-using org.apache.qpid.transport.codec ;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * Metadata that describes the mapping of a method parameter to a QMF Object
- */
- public class SchemaArgument : SchemaVariable
- {
-
- public string Direction {get;set;}
-
- public SchemaArgument(IDecoder dec, bool methodArg)
- {
- Dictionary<string, Object> map = dec.ReadMap() ;
- base.PopulateData(map) ;
-
- if (map.ContainsKey("dir")) {
- Direction = (string) map["dir"] ;
- }
- }
-
- public bool IsInput() {
- return Direction.Equals("I") | Direction.Equals("IO") ;
- }
-
- public bool IsOutput() {
- return Direction.Equals("O") | Direction.Equals("IO") ;
- }
-
- public bool IsBidirectional() {
- return Direction.Equals("IO") ;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/SchemaClass.cs b/qpid/dotnet/client-010/management/console/SchemaClass.cs
deleted file mode 100644
index 320312b61d..0000000000
--- a/qpid/dotnet/client-010/management/console/SchemaClass.cs
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic ;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.codec ;
-
-using log4net ;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * Metadata that describes the mapping of a class to a QMF Object
- */
- public class SchemaClass
- {
- public static int CLASS_KIND_TABLE = 1 ;
- public static int CLASS_KIND_EVENT = 2 ;
-
- public static ILog log = LogManager.GetLogger(typeof(SchemaClass)) ;
-
-
- public ClassKey Key {get;set;}
- public ClassKey SuperType {get;set;}
- public int Kind {get;set;}
- public List<SchemaMethod> Methods = new List<SchemaMethod>() ;
- public List<SchemaArgument> Arguments = new List<SchemaArgument>() ;
- public List<SchemaProperty> Properties = new List<SchemaProperty>() ;
- public List<SchemaStatistic> Statistics = new List<SchemaStatistic>() ;
-
- public string ClassName { get { return Key.ClassName;}}
- public string PackageName { get { return Key.PackageName;}}
- public string ClassKeyString { get { return Key.GetKeyString();}}
-
- protected Session Session {get;set;}
-
- public SchemaClass(int kind, ClassKey key, IDecoder dec, Session session)
- {
- log.Debug(String.Format("New schema class {0}", key)) ;
- Kind = kind ;
- Session = session ;
- this.Key = key ;
- bool hasSupertype = false ;
-
- if (kind == CLASS_KIND_TABLE) {
- int propCount = dec.ReadUint16() ;
- int statCount = dec.ReadUint16() ;
- int methodCount = dec.ReadUint16() ;
-
- if (hasSupertype) {
- SuperType = new ClassKey(dec) ;
- }
-
- for(int x = 0 ; x < propCount ; x++) {
- Properties.Add(new SchemaProperty(dec)) ;
- }
- for(int x = 0 ; x < statCount ; x++) {
- Statistics.Add(new SchemaStatistic(dec)) ;
- }
- for(int x = 0 ; x < methodCount ; x++) {
- Methods.Add(new SchemaMethod(dec)) ;
- }
- }
-
- if (kind == CLASS_KIND_EVENT) {
- int argCount = dec.ReadUint16() ;
- if (hasSupertype) {
- SuperType = new ClassKey(dec) ;
- }
- for(int x = 0 ; x < argCount ; x++) {
- Arguments.Add(new SchemaArgument(dec, false)) ;
- }
- }
- }
-
- public SchemaMethod GetMethod(string name) {
- SchemaMethod returnValue = null ;
- foreach(SchemaMethod method in Methods) {
- if (method.Name.Equals(name)) {
- returnValue = method ;
- break ;
- }
- }
- return returnValue ;
- }
-
- public List<SchemaProperty> GetAllProperties() {
- if (SuperType == null) {
- return Properties ;
- } else {
- List<SchemaProperty> allProperties = new List<SchemaProperty>(Properties) ;
- allProperties.AddRange(Session.GetSchema(SuperType).GetAllProperties()) ;
- return allProperties ;
- }
- }
-
- public List<SchemaStatistic> GetAllStatistics() {
- if (SuperType == null) {
- return Statistics ;
- } else {
- List<SchemaStatistic> allStats = new List<SchemaStatistic>(Statistics) ;
- allStats.AddRange(Session.GetSchema(SuperType).GetAllStatistics()) ;
- return allStats ;
- }
- }
-
- public List<SchemaMethod> GetAllMethods() {
- if (SuperType == null) {
- return Methods ;
- } else {
- List<SchemaMethod> allMethods = new List<SchemaMethod>(Methods) ;
- allMethods.AddRange(Session.GetSchema(SuperType).GetAllMethods()) ;
- return allMethods ;
- }
- }
-
- public bool HasSuperType() {
- return SuperType != null ;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/SchemaMethod.cs b/qpid/dotnet/client-010/management/console/SchemaMethod.cs
deleted file mode 100644
index 0a843262a4..0000000000
--- a/qpid/dotnet/client-010/management/console/SchemaMethod.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic ;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.codec ;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * Metadata that describes the mapping of a method to a QMF Object
- */
- public class SchemaMethod
- {
- public string Name {get;set;}
- public int ArgCount {get;set;}
- public int InputArgCount {get;set;}
- public int OutputArgCount {get;set;}
- public int BidirectionalArgCount {get;set;}
- public string Description {get;set;}
- public List<SchemaArgument> Arguments = new List<SchemaArgument>();
-
- public SchemaMethod(IDecoder dec)
- {
- Dictionary<string, Object> map = dec.ReadMap() ;
- Name = (string) map["name"] ;
- ArgCount = (int) map["argCount"] ;
- if (map.ContainsKey("desc")) {
- Description = (string) map["desc"] ;
- }
- for (int x = 0 ; x < ArgCount ; x++) {
- SchemaArgument arg = new SchemaArgument(dec, true) ;
- Arguments.Add(arg) ;
- if (arg.IsInput()) {
- InputArgCount += 1 ;
- }
- if (arg.IsOutput()) {
- OutputArgCount += 1 ;
- }
- if (arg.IsBidirectional()) {
- BidirectionalArgCount += 1 ;
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/SchemaProperty.cs b/qpid/dotnet/client-010/management/console/SchemaProperty.cs
deleted file mode 100644
index 50d3c62f8d..0000000000
--- a/qpid/dotnet/client-010/management/console/SchemaProperty.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic ;
-using org.apache.qpid.transport.codec ;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * Metadata that describes the mapping of an object property to a QMF Object
- */
- public class SchemaProperty : SchemaVariable
- {
- public int Access {get;set;}
- public bool Index {get;set;}
- public bool Optional {get;set;}
-
- public SchemaProperty(IDecoder dec)
- {
- Dictionary<string, Object> map = dec.ReadMap() ;
- base.PopulateData(map) ;
- Name = (string) map["name"] ;
-
- if (map.ContainsKey("optional")) {
- //System.Console.WriteLine("optional") ;
- Optional = (int)map["optional"] != 0 ;
- }
- if (map.ContainsKey("index")) {
- //System.Console.WriteLine("index") ;
- Index = (int)map["index"] != 0 ;
- }
- if (map.ContainsKey("access")) {
- //System.Console.WriteLine("access") ;
- Access = (int) map["access"] ;
- }
-
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/SchemaStatistic.cs b/qpid/dotnet/client-010/management/console/SchemaStatistic.cs
deleted file mode 100644
index ff96b98388..0000000000
--- a/qpid/dotnet/client-010/management/console/SchemaStatistic.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic ;
-using org.apache.qpid.transport.codec ;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * Metadata that describes the mapping of an object Statistic
- */
- public class SchemaStatistic
- {
-
- public string Name {get;set;}
- public short Type {get;set;}
- public string Description {get;set;}
- public string Unit {get;set;}
-
- public SchemaStatistic(IDecoder dec)
- {
- Dictionary<string, Object> map = dec.ReadMap() ;
- Name = (string) map["name"] ;
- Type = (short) short.Parse(""+map["type"]) ;
-
- if (map.ContainsKey("unit")) {
- Unit = (string) map["unit"] ;
- }
- if (map.ContainsKey("description")) {
- Description = (string) map["description"] ;
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/SchemaVariable.cs b/qpid/dotnet/client-010/management/console/SchemaVariable.cs
deleted file mode 100644
index 50455ab38a..0000000000
--- a/qpid/dotnet/client-010/management/console/SchemaVariable.cs
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic ;
-using org.apache.qpid.transport.codec ;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * Metadata for mapping properties, arguments, and statistics
- */
- public abstract class SchemaVariable
- {
- public string Name {get;set;}
- public short Type {get;set;}
- public string Description {get;set;}
- public string Unit {get;set;}
- public int? Min {get;set;}
- public int? Max {get;set;}
- public int? MaxLength {get;set;}
- public string Default {get;set;}
- public string RefPackage {get;set;}
- public string RefClass {get;set;}
-
- public SchemaVariable() {
- }
-
- protected void PopulateData(Dictionary<string, Object> map)
- {
-
- if (map.ContainsKey("name")) {
- Name = (string) map["name"] ;
- }
- if (map.ContainsKey("type")) {
- Type = short.Parse((""+ map["type"])) ;
- }
-
- if (map.ContainsKey("unit")) {
- Unit = (string) map["unit"] ;
- }
- if (map.ContainsKey("min")) {
- Min = (int) map["min"] ;
- }
- if (map.ContainsKey("max")) {
- Max = (int) map["max"] ;
- }
- if (map.ContainsKey("maxlen")) {
- MaxLength = (int) map["maxlen"] ;
- }
- if (map.ContainsKey("description")) {
- Description = (string) map["description"] ;
- }
- if (map.ContainsKey("refClass")) {
- RefClass = (string) map["refClass"] ;
- }
- if (map.ContainsKey("refPackage")) {
- RefPackage = (string) map["refPackage"] ;
- }
- if (map.ContainsKey("Default")) {
- Default = (string) map["default"] ;
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/SequenceManager.cs b/qpid/dotnet/client-010/management/console/SequenceManager.cs
deleted file mode 100644
index 29f1ba26b0..0000000000
--- a/qpid/dotnet/client-010/management/console/SequenceManager.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic;
-using System.Threading ;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * Holds state during asynchronous calls to the broker.
- */
- public class SequenceManager
- {
- long sequence = 0 ;
- Dictionary<long, Object> pending = new Dictionary<long, Object>() ;
- Object lockObject = new Object() ;
-
- public SequenceManager()
- {
- }
-
- public long Reserve(Object data) {
- long returnValue = 0 ;
- lock(lockObject) {
- returnValue = sequence ;
- sequence += 1 ;
- pending.Add(returnValue, data) ;
- }
- return returnValue;
- }
-
- public Object Release(long seq) {
- Object returnValue = null ;
- lock(lockObject) {
- returnValue = pending[seq] ;
- pending.Remove(seq) ;
- }
-
- return returnValue ;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/Session.cs b/qpid/dotnet/client-010/management/console/Session.cs
deleted file mode 100644
index d9c5948e57..0000000000
--- a/qpid/dotnet/client-010/management/console/Session.cs
+++ /dev/null
@@ -1,796 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic;
-using System.IO ;
-using System.Reflection ;
-using System.Threading ;
-using log4net ;
-using org.apache.qpid.client ;
-using org.apache.qpid.transport.util;
-using org.apache.qpid.transport.codec ;
-
-namespace org.apache.qpid.console
-{
-
- /**
- * Main Interaction point for interaction with the bus. Can be used to locate objects
- * on the bus, and invoke messages on them.
- */
- public class Session
- {
- public static ILog log = LogManager.GetLogger(typeof(Session)) ;
-
- public static int CONTEXT_SYNC = 1 ;
- public static int CONTEXT_STARTUP = 2 ;
- public static int CONTEXT_MULTIGET = 3 ;
- public static int DEFAULT_GET_WAIT_TIME = 60000 ;
-
- public bool RecieveObjects = true ;
- public bool RecieveEvents = true ;
- public bool RecieveHeartbeat = true ;
- public bool UserBindings = false ;
- public Console Console ;
-
- protected Dictionary<string, Dictionary<string, SchemaClass>> Packages = new Dictionary<string, Dictionary<string, SchemaClass>>() ;
- protected List<Broker> Brokers = new List<Broker>() ;
- protected SequenceManager SequenceManager = new SequenceManager() ;
- protected object LockObject = new Object();
- protected List<long> SyncSequenceList = new List<long>() ;
- protected List<QMFObject> GetResult ;
- protected Object SyncResult ;
-
- public Session()
- {
- }
-
- public Session(Console console) {
- Console = console ;
- }
-
- public void AddBroker(string url) {
- BrokerURL brokerurl = GetBrokerURL(url) ;
- Broker broker = new Broker(this, brokerurl) ;
- Brokers.Add(broker) ;
-
- Dictionary<string, object> args = new Dictionary<string, object>() ;
- args.Add("_class", "agent") ;
- args.Add("_broker", broker) ;
- this.GetObjects(args) ;
- }
-
- public void RemoveBroker(Broker broker) {
- if (Brokers.Contains(broker)) {
- Brokers.Remove(broker) ;
- }
-
- broker.Shutdown() ;
- }
-
- public void Close() {
- foreach (Broker broker in Brokers.ToArray()) {
- this.RemoveBroker(broker) ;
- }
- }
-
- protected BrokerURL GetBrokerURL(string url) {
- return new BrokerURL(url) ;
- }
-
-
- public List<QMFObject> GetObjects(Dictionary<string, object> args) {
- List<Broker> brokerList = null ;
- List<Agent> agentList = new List<Agent>() ;
-
- if (args.ContainsKey("_broker")) {
- brokerList = new List<Broker>() ;
- brokerList.Add((Broker)args["_broker"]) ;
- } else {
- brokerList = this.Brokers ;
- }
-
- foreach (Broker broker in brokerList) {
- broker.WaitForStable() ;
- }
-
- if (args.ContainsKey("_agent")) {
- Agent agent = (Agent)args["_agent"] ;
- if (brokerList.Contains(agent.Broker)) {
- agentList.Add(agent) ;
- } else {
- throw new Exception("Agent is not managed by this console or the supplied broker") ;
- }
- } else {
- if (args.ContainsKey("_objectId")) {
- ObjectID oid = (ObjectID) args["_objectId"] ;
- foreach (Broker broker in Brokers) {
- foreach (Agent agent in broker.Agents.Values) {
- if ((agent.AgentBank == oid.AgentBank()) && (agent.BrokerBank == oid.BrokerBank())) {
- agentList.Add(agent) ;
- }
- }
- }
- }
- else {
- foreach (Broker broker in brokerList) {
- foreach (Agent agent in broker.Agents.Values) {
- if (agent.Broker.IsConnected()) {
- agentList.Add(agent) ;
- }
- }
- }
- }
- }
-
- GetResult = new List<QMFObject>() ;
-
- if (agentList.Count > 0) {
- //FIXME Add a bunch of other suff too
- foreach (Agent agent in agentList) {
- Dictionary<string, object> getParameters = new Dictionary<string, object>() ;
- Broker broker = agent.Broker ;
- long seq = -1 ;
- lock(LockObject) {
- seq = SequenceManager.Reserve(Session.CONTEXT_MULTIGET) ;
- SyncSequenceList.Add(seq) ;
- }
- object packageName = null ;
- object className = null ;
- object key = null ;
- object sClass = null ;
- object oid = null ;
- object hash = null ;
-
- args.TryGetValue("_schema", out sClass) ;
- args.TryGetValue("_key", out key) ;
- args.TryGetValue("_class", out className) ;
- args.TryGetValue("_package", out packageName) ;
- args.TryGetValue("_objectID", out oid) ;
- args.TryGetValue("_hash", out hash) ;
-
- if ((className == null) && (oid == null) && (oid == null)) {
- throw new Exception("No class supplied, use '_schema', '_key', '_class', or '_objectId' argument") ;
- }
-
- if (oid != null) {
- getParameters.Add("_objectID", oid) ;
- }
- else {
- if (sClass != null) {
- key = key ?? ((SchemaClass)sClass).Key ;
- }
- if (key != null) {
- ClassKey cKey = (ClassKey)key ;
- className = className ?? cKey.ClassName ;
- packageName = packageName ?? cKey.PackageName ;
- hash = hash ?? cKey.Hash ;
- }
-
- if (packageName != null) {
- getParameters.Add("_package", packageName) ;
- }
- if (className != null) {
- getParameters.Add("_class", className) ;
- }
- if (hash != null) {
- getParameters.Add("_hash", hash) ;
- }
- foreach (KeyValuePair<string, object> pair in args) {
- if (!pair.Key.StartsWith("_")) {
- getParameters.Add(pair.Key, pair.Value) ;
- }
- }
- }
-
- IEncoder enc = broker.CreateEncoder('G', seq) ;
- enc.WriteMap(getParameters) ;
- string routingKey = String.Format("agent.{0}.{1}", agent.BrokerBank, agent.AgentBank) ;
- Message msg = broker.CreateMessage(enc, routingKey) ;
- log.Debug("Get Object Keys: ") ;
- foreach (string pKey in getParameters.Keys) {
- log.Debug(String.Format("\tKey: '{0}' Value: '{1}'", pKey, getParameters[pKey])) ;
- }
- broker.Send(msg) ;
- }
-
- int waittime = DEFAULT_GET_WAIT_TIME ;
- bool timeout = false ;
- if (args.ContainsKey("_timeout")) {
- waittime = (int) args["_timeout"] ;
- }
- DateTime start = DateTime.Now ;
- lock (LockObject) {
- // FIXME ERROR
- while (SyncSequenceList.Count > 0){
- Monitor.Wait(LockObject,waittime) ;
- TimeSpan duration = DateTime.Now - start;
- if (duration.TotalMilliseconds > waittime) {
- foreach (long pendingSeq in SyncSequenceList) {
- SequenceManager.Release(pendingSeq) ;
- }
- SyncSequenceList.Clear() ;
- timeout = true ;
- }
- }
- }
-
- //FIXME Add the error logic
- if ((GetResult.Count == 0) && timeout) {
- throw new Exception ("Get Request timed out") ;
- }
- }
- return GetResult ;
- }
-
- public List<string> GetPackages() {
- this.WaitForStable() ;
- List<string> returnValue = new List<string>() ;
- foreach (String name in Packages.Keys) {
- returnValue.Add(name) ;
- }
-
- return returnValue ;
- }
-
- public List<ClassKey> GetClasses(string packageName) {
- List<ClassKey> returnValue = new List<ClassKey>() ;
- this.WaitForStable() ;
-
- if (Packages.ContainsKey(packageName)) {
- foreach (SchemaClass sClass in Packages[packageName].Values) {
- returnValue.Add(sClass.Key) ;
- }
- }
-
- return returnValue ;
- }
-
- public SchemaClass GetSchema(ClassKey key) {
- return GetSchema(key, true) ;
- }
-
- protected SchemaClass GetSchema(ClassKey key, bool waitForStable) {
- if (waitForStable) {
- this.WaitForStable() ;
- }
-
- SchemaClass returnValue = null ;
-
- try {
- returnValue = Packages[key.PackageName][key.GetKeyString()] ;
- }
- catch (KeyNotFoundException) {
- // eat it
- }
-
- return returnValue ;
- }
-
-
- protected void WaitForStable() {
- foreach (Broker broker in Brokers) {
- broker.WaitForStable() ;
- }
- }
-
-
- public Broker GetBroker(long BrokerBank) {
- Broker returnValue = null ;
-
- foreach (Broker broker in Brokers) {
- if (broker.BrokerBank() == BrokerBank) {
- returnValue = broker ;
- break ;
- }
- }
-
- return returnValue ;
- }
-
- public MethodResult InvokeMethod(QMFObject obj, string name, List<object> args, bool synchronous, int timeToLive) {
- Broker aBroker = this.GetBroker(obj.BrokerBank()) ;
-
- long seq = this.SendMethodRequest(obj, aBroker, name, args, synchronous, timeToLive) ;
- if (seq != 0) {
- if (!synchronous) {
- return null ;
- }
- try {
- aBroker.WaitForSync(timeToLive) ;
- } catch (Exception e) {
- SequenceManager.Release(seq) ;
- throw e ;
- }
-
- // FIXME missing error logic in the broker
- return (MethodResult) SyncResult ;
- }
-
- return null ;
- }
-
- protected long SendMethodRequest(QMFObject obj, Broker aBroker, string name, List<object> args, bool synchronous, int timeToLive) {
-
- SchemaMethod method = obj.Schema.GetMethod(name) ;
- if (args == null) {
- args = new List<object>() ;
- }
-
- long seq = 0 ;
- if (method != null) {
- KeyValuePair<SchemaMethod, bool> pair = new KeyValuePair<SchemaMethod, bool>(method, synchronous) ;
- seq = SequenceManager.Reserve(pair) ;
- IEncoder enc = aBroker.CreateEncoder('M', seq) ;
- obj.ObjectID.encode(enc) ;
- obj.Schema.Key.encode(enc) ;
- enc.WriteStr8(name) ;
-
- if (args.Count < method.InputArgCount) {
- throw new Exception(String.Format("Incorrect number of arguments: expected {0}, got{1}", method.InputArgCount, args.Count)) ;
- }
-
- int argIndex = 0 ;
- foreach (SchemaArgument arg in method.Arguments) {
- if (arg.IsInput()) {;
- this.EncodeValue(enc, arg.Type, args[argIndex]) ;
- argIndex += 1 ;
- }
- }
-
- Message msg = aBroker.CreateMessage(enc,obj.RoutingKey(),timeToLive) ;
-
- if (synchronous) {
- aBroker.SetSyncInFlight(true) ;
- }
- aBroker.Send(msg) ;
- }
- return seq ;
- }
-
- public QMFObject MakeObject(ClassKey key) {
- SchemaClass sClass = this.GetSchema(key) ;
- if (sClass == null) {
- throw new Exception("No schema found for class " + key.ToString()) ;
- }
-
- return this.CreateQMFObject(sClass, true, true, false) ;
- }
-
- public QMFObject MakeObject(String keyString) {
- return this.MakeObject(new ClassKey(keyString)) ;
- }
-
- // Callback Methods
- public void HandleNewAgent(Agent agent) {
- if (Console != null) {
- Console.NewAgent(agent) ;
- }
- }
-
- public void HandleAgentRemoved(Agent agent) {
- if (Console != null) {
- Console.AgentRemoved(agent) ;
- }
- }
-
- public void HandleBrokerConnect(Broker broker) {
- if (Console != null) {
- Console.BrokerConnected(broker) ;
- }
- }
-
- public void HandleBrokerDisconnect(Broker broker) {
- if (Console != null) {
- Console.BrokerDisconnected(broker) ;
- }
- }
-
- public void HandleBrokerResponse(Broker broker, IDecoder decoder, long sequence) {
- if (Console != null) {
- Console.BrokerInformation(broker) ;
- }
-
- long seq = SequenceManager.Reserve(CONTEXT_STARTUP) ;
- IEncoder endocder = broker.CreateEncoder('P', seq) ;
- broker.Send(endocder) ;
- }
-
- public void HandlePackageIndicator(Broker broker, IDecoder decoder, long sequence) {
- string packageName = decoder.ReadStr8() ;
- bool notify = false ;
- if (!Packages.ContainsKey(packageName)) {
- lock (LockObject) {
- Packages[packageName] = new Dictionary<string, SchemaClass>() ;
- notify = true ;
- }
- }
-
- if (notify && Console != null) {
- Console.NewPackage(packageName) ;
- }
-
- broker.IncrementOutstanding() ;
- long seq = SequenceManager.Reserve(Session.CONTEXT_STARTUP) ;
- IEncoder enc = broker.CreateEncoder('Q', seq) ;
- enc.WriteStr8(packageName) ;
- broker.Send(enc) ;
- }
-
- public void HandleCommandComplete(Broker broker, IDecoder decoder, long sequence) {
-
- long code = decoder.ReadUint32() ;
- string text = decoder.ReadStr8() ;
- Object context = this.SequenceManager.Release(sequence) ;
-
- if (context.Equals(CONTEXT_STARTUP)) {
- broker.DecrementOutstanding() ;
- } else {
- if ((context.Equals(CONTEXT_SYNC)) & broker.GetSyncInFlight()) {
- broker.SetSyncInFlight(false) ;
- } else {
- if (context.Equals(CONTEXT_MULTIGET) && SyncSequenceList.Contains(sequence)) {
- lock(LockObject) {
- SyncSequenceList.Remove(sequence) ;
- if (SyncSequenceList.Count == 0) {
- Monitor.PulseAll(LockObject) ;
- }
- }
- }
- }
- }
- }
-
- public void HandleClassIndicator(Broker broker, IDecoder decoder, long sequence) {
- short kind = decoder.ReadUint8() ;
- ClassKey classKey = new ClassKey(decoder) ;
- bool unknown = false ;
-
-
- lock (LockObject) {
- if (Packages.ContainsKey(classKey.PackageName)) {
- if (!Packages[classKey.PackageName].ContainsKey(classKey.GetKeyString())) {
- unknown = true ;
- }
- }
- }
-
- if (unknown) {
- broker.IncrementOutstanding() ;
- long seq = SequenceManager.Reserve(Session.CONTEXT_STARTUP) ;
- IEncoder enc = broker.CreateEncoder('S', seq) ;
- classKey.encode(enc) ;
- broker.Send(enc) ;
- }
- }
-
- public void HandleMethodResponse(Broker broker, IDecoder decoder, long sequence) {
- long code = decoder.ReadUint32() ;
- string text = decoder.ReadStr16() ;
-
- Dictionary<string, object> outArgs = new Dictionary<string, object>() ;
- object obj = SequenceManager.Release(sequence) ;
-
- if (obj == null) {
- return ;
- }
-
- KeyValuePair<SchemaMethod, bool> pair = (KeyValuePair<SchemaMethod, bool>) obj ;
- if (code == 0) {
- foreach (SchemaArgument arg in pair.Key.Arguments) {
- if (arg.IsOutput()) {
- outArgs.Add(arg.Name, this.DecodeValue(decoder, arg.Type)) ;
- }
- }
- }
-
- MethodResult result = new MethodResult(code, text, outArgs) ;
-
- if (pair.Value) {
- this.SyncResult = result;
- broker.SetSyncInFlight(false) ;
- }
-
- if (Console != null) {
- Console.MethodResponse(broker, sequence, result) ;
- }
- }
-
- public void HandleHeartbeatIndicator(Broker broker, IDecoder decoder, long sequence, IMessage msg) {
- if (Console != null) {
- long brokerBank = 1 ;
- long agentBank = 0 ;
- try {
- string routingKey = msg.DeliveryProperties.GetRoutingKey() ;
- if (routingKey != null) {
- agentBank = Agent.GetBrokerBank(routingKey) ;
- brokerBank = Agent.GetBrokerBank(routingKey) ;
- }
- }
- catch (Exception e) {
- log.Warn("Internal QPID error", e) ;
- }
-
- string agentKey = Agent.AgentKey(agentBank, brokerBank) ;
- long timestamp = decoder.ReadUint64() ;
- if (broker.Agents.ContainsKey(agentKey)) {
- Agent agent = broker.Agents[agentKey] ;
- Console.HearbeatRecieved(agent, timestamp) ;
- }
- }
-
- }
-
- public void HandleEventIndicator(Broker broker, IDecoder decoder, long sequence) {
- if (Console != null) {
- QMFEvent newEvent = new QMFEvent(this, decoder) ;
- Console.EventRecieved(broker, newEvent) ;
- }
- }
-
- public void HandleSchemaResponse(Broker broker, IDecoder decoder, long sequence) {
- short kind = decoder.ReadUint8() ;
- ClassKey classKey = new ClassKey(decoder) ;
- SchemaClass sClass = new SchemaClass(kind, classKey, decoder, this) ;
- lock(LockObject) {
- Dictionary<string, SchemaClass> classMappings = Packages[sClass.PackageName] ;
- classMappings.Remove(sClass.ClassKeyString) ;
- classMappings.Add(sClass.ClassKeyString, sClass) ;
- }
-
- SequenceManager.Release(sequence) ;
- broker.DecrementOutstanding() ;
- if (Console != null) {
- this.Console.NewClass(kind, classKey) ;
- }
- }
-
- public void HandleContentIndicator(Broker broker, IDecoder decoder, long sequence, bool hasProperties, bool hasStatistics) {
-
- ClassKey key = new ClassKey(decoder) ;
- SchemaClass sClass = null ;;
- lock (LockObject) {
- sClass = GetSchema(key, false) ;
- }
- if (sClass != null) {
- QMFObject obj = this.CreateQMFObject(sClass, decoder, hasProperties, hasStatistics, true) ;
-
- if (key.PackageName.Equals("org.apache.qpid.broker") && key.ClassName.Equals("agent") && hasProperties) {
- broker.UpdateAgent(obj) ;
- }
-
- lock (LockObject) {
- if (SyncSequenceList.Contains(sequence)) {
- if (!obj.IsDeleted() && this.SelectMatch(obj)) {
- GetResult.Add(obj) ;
- }
- }
- }
-
- if (Console != null) {
- if (hasProperties) {
- Console.ObjectProperties(broker, obj) ;
- }
- if (hasStatistics) {
- Console.ObjectStatistics(broker, obj) ;
- }
- }
- }
- }
-
- public bool SelectMatch(QMFObject obj) {
- return true ;
- }
-
- public object DecodeValue(IDecoder dec, short type) {
-
- switch (type) {
- case 1: return dec.ReadUint8() ; // U8
- case 2: return dec.ReadUint16() ; // U16
- case 3: return dec.ReadUint32() ; // U32
- case 4: return dec.ReadUint64() ; // U64
- case 6: return dec.ReadStr8() ; // SSTR
- case 7: return dec.ReadStr16() ; // LSTR
- case 8: return dec.ReadDatetime() ; // ABSTIME
- case 9: return dec.ReadUint32() ; // DELTATIME
- case 10: return new ObjectID(dec) ; // ref
- case 11: return dec.ReadUint8() != 0 ; // bool
- case 12: return dec.ReadFloat() ; // float
- case 13: return dec.ReadDouble() ; // double
- case 14: return dec.ReadUuid() ; // UUID
- case 15: return dec.ReadMap() ; // Ftable
- case 16: return dec.ReadInt8() ; // int8
- case 17: return dec.ReadInt16() ; // int16
- case 18: return dec.ReadInt32() ; // int32
- case 19: return dec.ReadInt64() ; // int64
- case 20: // Object
- // Peek into the inner type code, make sure
- // it is actually an object
- object returnValue = null ;
- short innerTypeCode = dec.ReadUint8() ;
- if (innerTypeCode != 20) {
- returnValue = this.DecodeValue(dec, innerTypeCode) ;
- }
- else {
- ClassKey classKey = new ClassKey(dec) ;
- lock(LockObject) {
- SchemaClass sClass = GetSchema(classKey) ;
- if (sClass != null) {
- returnValue = this.CreateQMFObject(sClass, dec, true, true, false) ;
- }
- }
- }
- return returnValue;
- case 21: // List
- {
- MSDecoder lDec = new MSDecoder();
- lDec.Init(new MemoryStream(dec.ReadVbin32()));
- long count = lDec.ReadUint32();
- List<object> newList = new List<object>();
- while (count > 0)
- {
- short innerType = lDec.ReadUint8();
- newList.Add(this.DecodeValue(lDec, innerType));
- count -= 1;
- }
- return newList;
- }
- case 22: // Array
- {
- MSDecoder aDec = new MSDecoder();
- aDec.Init(new MemoryStream(dec.ReadVbin32()));
- long cnt = aDec.ReadUint32();
- short innerType = aDec.ReadUint8();
- List<object> aList = new List<object>();
- while (cnt > 0)
- {
- aList.Add(this.DecodeValue(aDec, innerType));
- cnt -= 1;
- }
- return aList;
- }
- default:
- throw new Exception(String.Format("Invalid Type Code: {0}", type)) ;
- }
- }
-
-
- public void EncodeValue(IEncoder enc, short type, object val) {
- try {
- switch ((int)type) {
- case 1: enc.WriteUint8((short) val) ; break; // U8
- case 2: enc.WriteUint16((int) val) ; break; // U16
- case 3: enc.WriteUint32((long) val) ; break; // U32
- case 4: enc.WriteUint64((long) val) ; break; // U64
- case 6: enc.WriteStr8((string) val) ; break; // SSTR
- case 7: enc.WriteStr16((string) val) ; break; // LSTR
- case 8: enc.WriteDatetime((long) val); break; // ABSTIME
- case 9: enc.WriteUint32((long) val); break; // DELTATIME
- case 10: ((ObjectID)val).encode(enc) ; break; // ref
- case 11:
- if ((bool) val) {
- enc.WriteUint8(1) ;
- } else {
- enc.WriteUint8(0) ;
- }
- break ;
- case 12: enc.WriteFloat((float) val); break; // FLOAT
- case 13: enc.WriteDouble((double) val); break; // DOUBLE
- case 14: enc.WriteUuid((UUID) val) ; break ; // UUID
- case 15: enc.WriteMap((Dictionary<string, object>) val) ; break ; // Ftable
- case 16: enc.WriteInt8((short) val) ; break; // int8
- case 17: enc.WriteInt16((int) val) ; break; // int16
- case 18: enc.WriteInt32(long.Parse(""+ val)) ; break; // int32
- case 19: enc.WriteInt64(long.Parse("" + val)) ; break; // int64
- case 20: // Object
- // Check that the object has a session, if not
- // take ownership of it
- QMFObject qObj = (QMFObject) val ;
- if (qObj.Session == null) {
- qObj.Session = this ;
- }
- qObj.Encode(enc) ;
- break;
- case 21: // List
- List<object> items = (List<object>) val ;
- MSEncoder lEnc = new MSEncoder(1) ;
- lEnc.Init() ;
- lEnc.WriteUint32(items.Count) ;
- foreach (object obj in items) {
- short innerType = Util.QMFType(obj) ;
- lEnc.WriteUint8(innerType) ;
- this.EncodeValue(lEnc,innerType,obj) ;
- }
- enc.WriteVbin32(lEnc.Segment().ToArray()) ;
- break ;
- case 22: // Array
- List<object> aItems = (List<object>) val ;
- MSEncoder aEnc = new MSEncoder(1) ;
- aEnc.Init() ;
- long aCount = aItems.Count ;
- aEnc.WriteUint32(aCount) ;
- if (aCount > 0) {
- Object anObj = aItems[0] ;
- short innerType = Util.QMFType(anObj) ;
- aEnc.WriteUint8(innerType) ;
- foreach (object obj in aItems) {
- this.EncodeValue(aEnc,innerType,obj) ;
- }
- }
- enc.WriteVbin32(aEnc.Segment().ToArray()) ;
- break ;
- default:
- throw new Exception(String.Format("Invalid Type Code: {0}", type)) ;
- }
- }
- catch (System.InvalidCastException e) {
- string msg = String.Format("Class cast exception for typecode {0}, type {1} ", type, val.GetType()) ;
- log.Error(msg) ;
- throw new Exception(msg + type, e) ;
- }
- }
-
- public List<string> BindingKeys() {
- List<string> bindings = new List<string>() ;
- bindings.Add("schema.#") ;
- if (RecieveObjects & RecieveEvents & RecieveHeartbeat & !UserBindings) {
- bindings.Add("console.#") ;
- }
- else {
- if (RecieveObjects & !UserBindings) {
- bindings.Add("console.obj.#") ;
- }
- else {
- bindings.Add("console.obj.*.*.org.apache.qpid.broker.agent") ;
- }
- if (RecieveEvents) {
- bindings.Add("console.event.#") ;
- }
- if (RecieveHeartbeat) {
- bindings.Add("console.heartbeat.#") ;
- }
- }
- return bindings ;
- }
-
- protected QMFObject CreateQMFObject(SchemaClass schema, bool hasProperties, bool hasStats , bool isManaged) {
- Type realClass = typeof(QMFObject) ;
- if (Console != null) {
- realClass = Console.TypeMapping(schema.Key) ;
- }
- Type[] types = new Type[] {typeof(Session), typeof(SchemaClass), typeof(bool), typeof(bool),typeof(bool)} ;
- object[] args = new object[] {this, schema, hasProperties, hasStats, isManaged} ;
- ConstructorInfo ci = realClass.GetConstructor(types);
- return (QMFObject) ci.Invoke(args) ;
- }
-
- protected QMFObject CreateQMFObject(SchemaClass schema, IDecoder dec, bool hasProperties, bool hasStats , bool isManaged) {
- Type realClass = typeof(QMFObject) ;
- if (Console != null) {
- realClass = Console.TypeMapping(schema.Key) ;
- }
- Type[] types = new Type[] {typeof(Session), typeof(SchemaClass), typeof(IDecoder), typeof(bool), typeof(bool),typeof(bool)} ;
- object[] args = new object[] {this, schema, dec, hasProperties, hasStats, isManaged} ;
- ConstructorInfo ci = realClass.GetConstructor(types);
- return (QMFObject) ci.Invoke(args) ;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/Util.cs b/qpid/dotnet/client-010/management/console/Util.cs
deleted file mode 100644
index 4a06f4e6af..0000000000
--- a/qpid/dotnet/client-010/management/console/Util.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic;
-using org.apache.qpid.client ;
-using org.apache.qpid.transport.util;
-using org.apache.qpid.transport.codec ;
-
-namespace org.apache.qpid.console
-{
- public class Util
- {
- static Dictionary<Type, short> ENCODINGS = new Dictionary<Type, short>() ;
-
-
- static Util() {
- ENCODINGS.Add(typeof(string), 7) ;
- ENCODINGS.Add(typeof(short), 1) ;
- //ENCODINGS.Add(typeof(int), 2) ;
- //ENCODINGS.Add(typeof(long), 3) ;
- ENCODINGS.Add(typeof(float), 13) ;
- ENCODINGS.Add(typeof(QMFObject), 20) ;
- ENCODINGS.Add(typeof(int), 17) ;
- ENCODINGS.Add(typeof(long), 18) ;
- ENCODINGS.Add(typeof(System.Collections.Generic.List<>), 21) ;
- }
-
- /**
- * Converts type numbers to schema type names
- */
- public static string TypeName(short type) {
- switch(type) {
- //case 0: return "UNKNOWN" ;
- case 1: return "uint8" ;
- case 2: return "uint16" ;
- case 3: return "uint32" ;
- case 4: return "uint64" ;
- case 5: return "bool" ;
- case 6: return "short-string" ;
- case 7: return "long-string" ;
- case 8: return "abs-time" ;
- case 9: return "delta-time" ;
- case 10: return "reference" ;
- case 11: return "boolean" ;
- case 12: return "float" ;
- case 13: return "double" ;
- case 14: return "uuid" ;
- case 15: return "field-table" ;
- case 16: return "int8" ;
- case 17: return "int16" ;
- case 18: return "int32" ;
- case 19: return "int64" ;
- case 20: return "object" ;
- case 21: return "list" ;
- case 22: return "array" ;
- }
-
- throw new Exception(String.Format("Invalid Type Code: {0}", type)) ;
- }
-
- /**
- * Converts schema numbers to schema access names
- */
- public static string AccessName(int type) {
- switch(type) {
- //case 0: return "UNKNOWN" ;
- case 1: return "ReadCreate" ;
- case 2: return "ReadWrite" ;
- case 3: return "ReadOnly" ;
- }
-
- throw new Exception(String.Format("Invalid Access Code: {0}", type)) ;
- }
-
- /**
- * Default values per schema type
- */
- public static object DefaultValue(short type) {
- switch(type) {
- //case 0: return "UNKNOWN" ;
- case 1: return 0 ;
- case 2: return 0 ;
- case 3: return 0l ;
- case 4: return 0l ;
- case 5: return false ;
- case 6: return "" ;
- case 7: return "" ;
- case 8: return 0l ;
- case 9: return 0l ;
- case 10: return new ObjectID() ;
- case 11: return false ;
- case 12: return 0f ;
- case 13: return 0d ;
- case 14: return new UUID(0,0) ;
- case 15: return new Dictionary<string, object>();
- case 16: return 0 ;
- case 17: return 0 ;
- case 18: return 0l ;
- case 19: return 0l ;
- case 20: return null ;
- case 21: return new List<object>() ;
- case 22: return new List<object>() ;
- }
-
- throw new Exception(String.Format("Invalid Type Code: {0}", type)) ;
- }
-
- /**
- * Returns a QMF type based on C# object type
- */
- public static short QMFType(object obj) {
- if (ENCODINGS.ContainsKey(obj.GetType())) {
- return ENCODINGS[obj.GetType()] ;
- } else {
- throw new Exception (String.Format("Unkown Type of {0}", obj.GetType())) ;
- }
- }
-
- /**
- * Grabs a friendly string version of bytes.
- */
- public static string ByteString(byte[] bytes) {
- return System.Text.Encoding.UTF8.GetString(bytes) ;
- }
-
- protected Util()
- {
-
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/XMLUtil.cs b/qpid/dotnet/client-010/management/console/XMLUtil.cs
deleted file mode 100644
index b24ad51747..0000000000
--- a/qpid/dotnet/client-010/management/console/XMLUtil.cs
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-
-using System;
-using System.Collections.Generic;
-using org.apache.qpid.client ;
-
-namespace org.apache.qpid.console
-{
-
-
- public class XMLUtil
- {
-
- public static string CommonAttributes(SchemaVariable var) {
- string returnString = "" ;
- if (var.Description != null){
- returnString = returnString + String.Format(" desc='{0}'", var.Description) ;
- }
-
- if (var.RefPackage != null){
- returnString = returnString + String.Format(" refPackage='{0}'", var.RefPackage) ;
- }
-
- if (var.RefClass != null){
- returnString = returnString + String.Format(" refClass='{0}'", var.RefClass) ;
- }
-
- if (var.Unit != null){
- returnString = returnString + String.Format(" unit='{0}'", var.Unit) ;
- }
-
- if (var.Min != null){
- returnString = returnString + String.Format(" min='{0}'", var.Min) ;
- }
- if (var.Max != null){
- returnString = returnString + String.Format(" max='{0}'", var.Max) ;
- }
- if (var.MaxLength != null){
- returnString = returnString + String.Format(" maxLength='{0}'", var.MaxLength) ;
- }
-
- return returnString ;
- }
-
- public static string SchemaXML(Session sess, string packageName) {
- string returnValue = String.Format("<schema package='{0}'>\n", packageName) ;
- foreach (ClassKey key in sess.GetClasses(packageName)) {
- SchemaClass schema = sess.GetSchema(key) ;
- if (schema.Kind == 1) {
- if (schema.SuperType == null)
- returnValue += String.Format("\t<class name='{0}' hash='{1}'>\n", key.ClassName, key.GetHashString()) ;
- else
- returnValue += String.Format("\t<class name='{0}' hash='{1}' extends='{2}'>\n", key.ClassName, key.GetHashString(), schema.SuperType.GetKeyString()) ;
- foreach (SchemaProperty prop in schema.Properties) {
- object[] attributes = new object[5] ;
- attributes[0] = prop.Name ;
- attributes[1] = Util.TypeName(prop.Type) ;
- attributes[2] = Util.AccessName(prop.Access) ;
- attributes[3] = prop.Optional ;
- attributes[4] = XMLUtil.CommonAttributes(prop);
- returnValue += String.Format("\t\t<property name='{0}' type='{1}' access='{2}' optional='{3}'{4}/>\n", attributes) ;
- }
- foreach (SchemaMethod meth in schema.Methods) {
- returnValue += String.Format("\t\t<method name='{0}'/>\n", meth.Name) ;
- foreach (SchemaArgument arg in meth.Arguments) {
- object[] attributes = new object[4] ;
- attributes[0] = arg.Name ;
- attributes[1] = arg.Direction ;
- attributes[2] = Util.TypeName(arg.Type) ;
- attributes[3] = XMLUtil.CommonAttributes(arg);
- returnValue += String.Format("\t\t\t<arg name='{0}' dir='{1}' type='{2}'{3}/>\n", attributes) ;
- }
- returnValue += String.Format("\t\t</method>\n") ;
- }
- returnValue += String.Format("\t</class>\n") ;
- } else {
- returnValue += String.Format("\t<event name='{0}' hash='{1}'>\n", key.ClassName, key.GetHashString()) ;
- foreach (SchemaArgument arg in schema.Arguments) {
- object[] attributes = new object[4] ;
- attributes[0] = arg.Name ;
- attributes[1] = Util.TypeName(arg.Type) ;
- attributes[2] = XMLUtil.CommonAttributes(arg);
- returnValue += String.Format("\t\t\t<arg name='{0}' type='{1}'{2}/>\n", attributes) ;
- }
- returnValue += String.Format("\t</event>\n") ;
- }
- }
- returnValue += String.Format("</schema>\n") ;
-
- return returnValue ;
- }
-
- public static string SchemaXML(Session sess, string[] packageNames) {
- string returnValue = "<schemas>\n" ;
- foreach (string package in packageNames) {
- returnValue += XMLUtil.SchemaXML(sess, package) ;
- returnValue += "\n" ;
- }
- returnValue += "</schemas>\n" ;
- return returnValue ;
- }
-
- protected XMLUtil()
- {
- }
- }
-}
diff --git a/qpid/dotnet/client-010/management/console/console.csproj b/qpid/dotnet/client-010/management/console/console.csproj
deleted file mode 100644
index 3cc84e6073..0000000000
--- a/qpid/dotnet/client-010/management/console/console.csproj
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{E8D2202F-3959-4F29-AA0D-875CD37905CA}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Console</RootNamespace>
- <AssemblyName>Console</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\lib\log4net\log4net.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="AbstractConsole.cs" />
- <Compile Include="Agent.cs" />
- <Compile Include="Broker.cs" />
- <Compile Include="BrokerURL.cs" />
- <Compile Include="ClassKey.cs" />
- <Compile Include="Console.cs" />
- <Compile Include="MethodResult.cs" />
- <Compile Include="ObjectID.cs" />
- <Compile Include="QMFEvent.cs" />
- <Compile Include="QMFObject.cs" />
- <Compile Include="SchemaArgument.cs" />
- <Compile Include="SchemaClass.cs" />
- <Compile Include="SchemaMethod.cs" />
- <Compile Include="SchemaProperty.cs" />
- <Compile Include="SchemaStatistic.cs" />
- <Compile Include="SchemaVariable.cs" />
- <Compile Include="SequenceManager.cs" />
- <Compile Include="Session.cs" />
- <Compile Include="Util.cs" />
- <Compile Include="XMLUtil.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/management/console/console.sln b/qpid/dotnet/client-010/management/console/console.sln
deleted file mode 100644
index 1cfc056302..0000000000
--- a/qpid/dotnet/client-010/management/console/console.sln
+++ /dev/null
@@ -1,46 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Console", "Console.csproj", "{E8D2202F-3959-4F29-AA0D-875CD37905CA}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "..\..\client\Client.csproj", "{B911FFD7-754F-4735-A188-218D5065BE79}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E8D2202F-3959-4F29-AA0D-875CD37905CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E8D2202F-3959-4F29-AA0D-875CD37905CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E8D2202F-3959-4F29-AA0D-875CD37905CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E8D2202F-3959-4F29-AA0D-875CD37905CA}.Release|Any CPU.Build.0 = Release|Any CPU
- {B911FFD7-754F-4735-A188-218D5065BE79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B911FFD7-754F-4735-A188-218D5065BE79}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B911FFD7-754F-4735-A188-218D5065BE79}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B911FFD7-754F-4735-A188-218D5065BE79}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/qpid/dotnet/client-010/management/console/default.build b/qpid/dotnet/client-010/management/console/default.build
deleted file mode 100644
index c71e695569..0000000000
--- a/qpid/dotnet/client-010/management/console/default.build
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="qpid.console" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <property name="build.config" value="debug" />
- <property name="build.debug" value="true" />
- <property name="build.defines" value="DEBUG;TRACE"/>
- <property name="base.dir" value="${project::get-base-directory()}/../.." />
- <property name="build.dir" value="${base.dir}/bin/${framework::get-target-framework()}/${build.config}" />
-
-
- <target name="build">
- <csc target="library"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.dll">
-
- <sources>
- <include name="***.cs" />
- <exclude name="test/*.cs"/>
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/qpid.client.dll" />
- </references>
- </csc>
- </target>
-</project>
diff --git a/qpid/dotnet/client-010/perftest/PerfTest.cs b/qpid/dotnet/client-010/perftest/PerfTest.cs
deleted file mode 100644
index c94dd865d5..0000000000
--- a/qpid/dotnet/client-010/perftest/PerfTest.cs
+++ /dev/null
@@ -1,715 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-using System.Threading;
-using common.org.apache.qpid.transport.util;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.util;
-using Plossum.CommandLine;
-
-namespace PerfTest
-{
- [CommandLineManager(ApplicationName = "Qpid Perf Tests", Copyright = "Apache Software Foundation")]
- public class Options
- {
- [CommandLineOption(Description = "Displays this help text")]
- public bool Help;
-
- [CommandLineOption(Description = "Create shared queues.", MinOccurs = 0)]
- public Boolean Setup;
-
- [CommandLineOption(Description = "Run test, print report.", MinOccurs = 0)]
- public Boolean Control;
-
- [CommandLineOption(Description = "Publish messages.", MinOccurs = 0)]
- public Boolean Publish;
-
- [CommandLineOption(Description = "Subscribe for messages.", MinOccurs = 0)]
- public Boolean Subscribe;
-
- [CommandLineOption(Description = "Test mode: [shared|fanout|topic]", MinOccurs = 0)]
- public string Mode
- {
- get { return _mMode; }
- set
- {
- if (! value.Equals("shared") && ! value.Equals("fanout") && ! value.Equals("topic"))
- throw new InvalidOptionValueException(
- "The mode must not be shared|fanout|topic", false);
- _mMode = value;
- }
- }
-
- private string _mMode = "shared";
-
- [CommandLineOption(Description = "Specifies the broler name", MinOccurs = 0)]
- public string Broker
- {
- get { return _broker; }
- set
- {
- if (String.IsNullOrEmpty(value))
- throw new InvalidOptionValueException(
- "The broker name must not be empty", false);
- _broker = value;
- }
- }
-
- private string _broker = "localhost";
-
- [CommandLineOption(Description = "Specifies the port name", MinOccurs = 0)]
- public int Port
- {
- get { return _port; }
- set { _port = value; }
- }
-
- private int _port = 5672;
-
- #region Publisher
-
- [CommandLineOption(Description = "Create N publishers.", MinOccurs = 0)]
- public int Pubs
- {
- get { return _pubs; }
- set { _pubs = value; }
- }
-
- private int _pubs = 1;
-
- [CommandLineOption(Description = "Each publisher sends N messages.", MinOccurs = 0)]
- public double Count
- {
- get { return _count; }
- set { _count = value; }
- }
-
- private double _count = 5000;
-
- [CommandLineOption(Description = "Size of messages in bytes.", MinOccurs = 0)]
- public long Size
- {
- get { return _size; }
- set { _size = value; }
- }
-
- private long _size = 1024;
-
- [CommandLineOption(Description = "Publisher use confirm-mode.", MinOccurs = 0)]
- public Boolean Confirm = true;
-
- [CommandLineOption(Description = "Publish messages as durable.", MinOccurs = 0)]
- public Boolean Durable;
-
- [CommandLineOption(Description = "Make data for each message unique.", MinOccurs = 0)]
- public Boolean UniqueData;
-
- [CommandLineOption(Description = "Wait for confirmation of each message before sending the next one.",
- MinOccurs = 0)]
- public Boolean SyncPub;
-
- [CommandLineOption(Description = ">=0 delay between msg publish.", MinOccurs = 0)]
- public double IntervalPub
- {
- get { return _interval_pub; }
- set { _interval_pub = value; }
- }
-
- private double _interval_pub;
-
- #endregion
-
- #region Subscriber
-
- [CommandLineOption(Description = "Create N subscribers.", MinOccurs = 0)]
- public int Subs
- {
- get { return _subs; }
- set { _subs = value; }
- }
-
- private int _subs = 1;
-
- [CommandLineOption(Description = "N>0: Subscriber acks batches of N.\n N==0: Subscriber uses unconfirmed mode",
- MinOccurs = 0)]
- public int SubAck
- {
- get { return _suback; }
- set { _suback = value; }
- }
-
- private int _suback;
-
- [CommandLineOption(Description = ">=0 delay between msg consume", MinOccurs = 0)]
- public double IntervalSub
- {
- get { return _interval_sub; }
- set { _interval_sub = value; }
- }
-
- private double _interval_sub;
-
- #endregion
-
- [CommandLineOption(Description = "Create N queues.", MinOccurs = 0)]
- public int Queues
- {
- get { return _qt; }
- set { _qt = value; }
- }
-
- private int _qt = 1;
-
- [CommandLineOption(Description = "Desired number of iterations of the test.", MinOccurs = 0)]
- public int Iterations
- {
- get { return _iterations; }
- set { _iterations = value; }
- }
-
- private int _iterations = 1;
-
- [CommandLineOption(Description = "If non-zero, the transaction batch size.", MinOccurs = 0)]
- public int Tx
- {
- get { return _tx; }
- set { _tx = value; }
- }
-
- private int _tx;
-
- [CommandLineOption(Description = "Make queue durable (implied if durable set.", MinOccurs = 0)]
- public Boolean QueueDurable;
-
- [CommandLineOption(Description = "Queue policy: count to trigger 'flow to disk'", MinOccurs = 0)]
- public double QueueMaxCount
- {
- get { return _queueMaxCount; }
- set { _queueMaxCount = value; }
- }
-
- private double _queueMaxCount;
-
- [CommandLineOption(Description = "Queue policy: accumulated size to trigger 'flow to disk'", MinOccurs = 0)]
- public double QueueMaxSize
- {
- get { return _queueMaxSize; }
- set { _queueMaxSize = value; }
- }
-
- private double _queueMaxSize;
-
- public double SubQuota
- {
- get { return _subQuota; }
- set { _subQuota = value; }
- }
-
- private double _subQuota;
- }
-
- internal interface Startable
- {
- void Start();
- }
-
- public abstract class PerfTestClient : Startable
- {
- private readonly IClient _connection;
- private readonly IClientSession _session;
- private readonly Options _options;
-
- public IClientSession Session
- {
- get { return _session; }
- }
-
- public Options Options
- {
- get { return _options; }
- }
-
- protected PerfTestClient(Options options)
- {
- _options = options;
- _connection = new Client();
- _connection.Connect(options.Broker, options.Port, "test", "guest", "guest");
- _session = _connection.CreateSession(50000);
- }
-
- public abstract void Start();
- }
-
- public class SetupTest : PerfTestClient
- {
- public SetupTest(Options options)
- : base(options)
- {
- }
-
- private void queueInit(String name, Boolean durable, Dictionary<String, Object> arguments)
- {
- Session.QueueDeclare(name, null, arguments, durable ? Option.DURABLE : Option.NONE);
- Session.QueuePurge(name);
- Session.ExchangeBind(name, "amq.direct", name);
- Session.Sync();
- }
-
- public override void Start()
- {
- queueInit("pub_start", false, null);
- queueInit("pub_done", false, null);
- queueInit("sub_ready", false, null);
- queueInit("sub_done", false, null);
- if (Options.Mode.Equals("shared"))
- {
- Dictionary<String, Object> settings = new Dictionary<string, object>();
- if (Options.QueueMaxCount > 0)
- settings.Add("qpid.max_count", Options.QueueMaxCount);
- if (Options.QueueMaxSize > 0)
- settings.Add("qpid.max_size", Options.QueueMaxSize);
- for (int i = 0; i < Options.Queues; ++i)
- {
- string qname = "perftest" + i;
- queueInit(qname, Options.Durable || Options.QueueDurable, settings);
- }
- }
- }
- }
-
- public class SubscribeThread : PerfTestClient
- {
- private readonly string _queue;
-
- public SubscribeThread(Options options, string key, string exchange)
- : base(options)
- {
- _queue = "perftest" + (new UUID(10, 10));
- Session.QueueDeclare(_queue, null, null, Option.EXCLUSIVE, Option.AUTO_DELETE,
- Options.Durable ? Option.DURABLE : Option.NONE);
- Session.ExchangeBind(_queue, exchange, key);
- }
-
- public SubscribeThread(Options options, string key)
- : base(options)
- {
- _queue = key;
- }
-
- public override void Start()
- {
- if (Options.Tx > 0)
- {
- Session.TxSelect();
- Session.Sync();
- }
- CircularBuffer<IMessage> buffer = new CircularBuffer<IMessage>(100);
- // Create a listener and subscribe it to the queue named "message_queue"
- IMessageListener listener = new SyncListener(buffer);
-
- string dest = "dest" + UUID.RandomUuid();
- Session.AttachMessageListener(listener, dest);
- Session.MessageSubscribe(_queue, dest,
- Options.Tx > 0 || Options.SubAck > 0
- ? MessageAcceptMode.EXPLICIT
- : MessageAcceptMode.NONE,
- MessageAcquireMode.PRE_ACQUIRED, null, 0, null);
- // issue credits
- Session.MessageSetFlowMode(dest, MessageFlowMode.WINDOW);
- Session.MessageFlow(dest, MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
-
- // Notify controller we are ready.
- IMessage message = new Message();
- message.DeliveryProperties.SetRoutingKey("sub_ready");
-
- message.AppendData(Encoding.UTF8.GetBytes("ready"));
- Session.MessageTransfer("amq.direct", message);
-
- if (Options.Tx > 0)
- {
- Session.TxCommit();
- Session.Sync();
- }
-
-
- for (int j = 0; j < Options.Iterations; ++j)
- {
-
- //need to allocate some more credit
- Session.MessageFlow(dest, MessageCreditUnit.MESSAGE, (long)Options.SubQuota);
-
- RangeSet range = new RangeSet();
- IMessage msg;
- DateTime start = DateTime.Now;
- for (long i = 0; i < Options.SubQuota; ++i)
- {
- msg = buffer.Dequeue();
- if (Options.Tx > 0 && ((i + 1)%Options.Tx == 0))
- {
- Session.TxCommit();
- Session.Sync();
- }
- if (Options.IntervalSub > 0)
- {
- Thread.Sleep((int) Options.IntervalSub*1000);
- }
- range.Add(msg.Id);
- }
- if (Options.Tx > 0 || Options.SubAck > 0)
- Session.MessageAccept(range);
- range.Clear();
- if (Options.Tx > 0)
- {
- Session.TxSelect();
- Session.Sync();
- }
- DateTime end = DateTime.Now;
-
- // Report to publisher.
- message.DeliveryProperties.SetRoutingKey("sub_done");
- message.ClearData();
- message.AppendData(BitConverter.GetBytes(Options.SubQuota / end.Subtract(start).TotalMilliseconds ));
- Session.MessageTransfer("amq.direct", message);
- if (Options.Tx > 0)
- {
- Session.TxSelect();
- Session.Sync();
- }
- }
- Session.Close();
- }
- }
-
- public class SyncListener : IMessageListener
- {
- private readonly CircularBuffer<IMessage> _buffer;
-
- public SyncListener(CircularBuffer<IMessage> buffer)
- {
- _buffer = buffer;
- }
-
- public void MessageTransfer(IMessage m)
- {
- _buffer.Enqueue(m);
- }
- }
-
-
- public class PublishThread : PerfTestClient
- {
- private readonly string _exchange;
- private readonly string _key;
-
- public PublishThread(Options options, string key, string exchange)
- : base(options)
- {
- _key = key;
- _exchange = exchange;
- }
-
-
- public override void Start()
- {
- byte[] data = new byte[Options.Size];
- // randomly populate data
- Random r = new Random(34);
- r.NextBytes(data);
- IMessage message = new Message();
- message.AppendData(data);
-
- message.DeliveryProperties.SetRoutingKey(_key);
-
- if (Options.Durable)
- message.DeliveryProperties.SetDeliveryMode(MessageDeliveryMode.PERSISTENT);
-
- if (Options.Tx > 0)
- {
- Session.TxSelect();
- Session.Sync();
- }
-
- CircularBuffer<IMessage> buffer = new CircularBuffer<IMessage>(100);
- // Create a listener and subscribe it to the queue named "pub_start"
- IMessageListener listener = new SyncListener(buffer);
- string localQueue = "localQueue-" + UUID.RandomUuid().ToString();
- Session.QueueDeclare(localQueue, null, null, Option.AUTO_DELETE);
- Session.ExchangeBind(localQueue, "amq.direct", "pub_start");
- Session.AttachMessageListener(listener, localQueue);
- Session.MessageSubscribe(localQueue);
- if (Options.Tx > 0)
- {
- Session.TxCommit();
- Session.Sync();
- }
- buffer.Dequeue();
-
- for (int j = 0; j < Options.Iterations; ++j)
- {
- DateTime start = DateTime.Now;
- for (long i = 0; i < Options.Count; ++i)
- {
- Session.MessageTransfer(_exchange, message);
-
- if (Options.SyncPub)
- {
- Session.Sync();
- }
- if (Options.Tx > 0 && (i + 1)%Options.Tx == 0)
- {
- Session.TxSelect();
- Session.Sync();
- }
- if (Options.IntervalPub > 0)
- {
- Thread.Sleep((int) Options.IntervalSub*1000);
- }
- }
- Session.Sync();
- DateTime end = DateTime.Now;
-
- // Report to publisher.
- message.DeliveryProperties.SetRoutingKey("pub_done");
- message.ClearData();
- double time = end.Subtract(start).TotalMilliseconds;
- byte[] rate = BitConverter.GetBytes( Options.Count / time );
- message.AppendData(rate);
- Session.MessageTransfer("amq.direct", message);
- if (Options.Tx > 0)
- {
- Session.TxSelect();
- Session.Sync();
- }
- }
- Session.Close();
- }
- }
-
- public class Controller : PerfTestClient
- {
- public Controller(Options options)
- : base(options)
- {
- }
-
- private void process(int size, string queue)
- {
- CircularBuffer<IMessage> buffer = new CircularBuffer<IMessage>(100);
- IMessageListener listener = new SyncListener(buffer);
- string localQueue = "queue-" + UUID.RandomUuid();
- Session.QueueDeclare(localQueue, null, null, Option.AUTO_DELETE);
- Session.ExchangeBind(localQueue, "amq.direct", queue);
- Session.AttachMessageListener(listener, localQueue);
- Session.MessageSubscribe(localQueue);
- for (int i = 0; i < size; ++i)
- {
- buffer.Dequeue();
- }
- }
-
- private double processRate(int size, string queue)
- {
- CircularBuffer<IMessage> buffer = new CircularBuffer<IMessage>(100);
- IMessageListener listener = new SyncListener(buffer);
- string localQueue = "queue-" + UUID.RandomUuid();
- Session.QueueDeclare(localQueue, null, null, Option.AUTO_DELETE);
- Session.ExchangeBind(localQueue, "amq.direct", queue);
- Session.AttachMessageListener(listener, localQueue);
- Session.MessageSubscribe(localQueue);
- double rate = 0;
- RangeSet range = new RangeSet();
- for (int i = 0; i < size; ++i)
- {
- IMessage m = buffer.Dequeue();
- range.Add(m.Id);
- BinaryReader reader = new BinaryReader(m.Body, Encoding.UTF8);
- byte[] body = new byte[m.Body.Length - m.Body.Position];
- reader.Read(body, 0, body.Length);
- rate += BitConverter.ToDouble(body,0);
- }
- Session.MessageAccept(range);
- return rate;
- }
-
- private void send(int size, string queue, string data)
- {
- IMessage message = new Message();
- message.DeliveryProperties.SetRoutingKey(queue);
- message.AppendData(Encoding.UTF8.GetBytes(data));
- for (int i = 0; i < size; ++i)
- {
- Session.MessageTransfer("amq.direct", message);
- }
- }
-
- public override void Start()
- {
- process(Options.Subs, "sub_ready");
- for (int j = 0; j < Options.Iterations; ++j)
- {
- DateTime start = DateTime.Now;
- send(Options.Pubs, "pub_start", "start"); // Start publishers
- double pubrate = processRate(Options.Pubs, "pub_done");
- double subrate = processRate(Options.Subs, "sub_done");
- DateTime end = DateTime.Now;
-
- double transfers = (Options.Pubs*Options.Count) + (Options.Subs*Options.SubQuota);
- double time = end.Subtract(start).TotalSeconds;
- double txrate = transfers/time;
- double mbytes = (txrate*Options.Size) / (1024 * 1024) ;
-
- Console.WriteLine("Total: " + transfers + " transfers of " + Options.Size + " bytes in "
- + time + " seconds.\n" +
- "Publish transfers/sec: " + pubrate * 1000 + "\n" +
- "Subscribe transfers/sec: " + subrate * 1000 + "\n" +
- "Total transfers/sec: " + txrate + "\n" +
- "Total Mbytes/sec: " + mbytes);
- Console.WriteLine("done");
- }
-
- }
- }
-
-
- public class PerfTest
- {
- private static int Main(string[] args)
- {
- Options options = new Options();
- CommandLineParser parser = new CommandLineParser(options);
- parser.Parse();
- if (parser.HasErrors)
- {
- Console.WriteLine(parser.UsageInfo.GetErrorsAsString(78));
- return -1;
- }
- if (options.Help)
- {
- Console.WriteLine(parser.UsageInfo.GetOptionsAsString(78));
- return 0;
- }
- bool singleProcess =
- (!options.Setup && !options.Control && !options.Publish && !options.Subscribe);
- if (singleProcess)
- {
- options.Setup = options.Control = options.Publish = true;
- options.Subscribe = true;
- }
-
-
- string exchange = "amq.direct";
- switch (options.Mode)
- {
- case "shared":
- options.SubQuota = (options.Pubs*options.Count)/options.Subs;
- break;
- case "fanout":
- options.SubQuota = (options.Pubs*options.Count);
- exchange = "amq.fanout";
- break;
- case "topic":
- options.SubQuota = (options.Pubs*options.Count);
- exchange = "amq.topic";
- break;
- }
-
- if (options.Setup)
- {
- SetupTest setup = new SetupTest(options);
- setup.Start(); // Set up queues
- }
-
- Thread contT = null;
- if ( options.Control)
- {
- Controller c = new Controller(options);
- contT = new Thread(c.Start);
- contT.Start();
- }
-
- Thread[] publishers = null;
- Thread[] subscribers = null;
-
- // Start pubs/subs for each queue/topic.
- for (int i = 0; i < options.Queues; ++i)
- {
- string key = "perftest" + i; // Queue or topic name.
- if (options.Publish)
- {
- int n = singleProcess ? options.Pubs : 1;
- publishers = new Thread[n];
- for (int j = 0; j < n; ++j)
- {
- PublishThread pt = new PublishThread(options, key, exchange);
- publishers[i] = new Thread(pt.Start);
- publishers[i].Start();
- }
- }
- if ( options.Subscribe)
- {
- int n = singleProcess ? options.Subs : 1;
- subscribers = new Thread[n];
- for (int j = 0; j < n; ++j)
- {
- SubscribeThread st;
- if (options.Mode.Equals("shared"))
- st = new SubscribeThread(options, key);
- else
- st = new SubscribeThread(options, key, exchange);
- subscribers[i] = new Thread(st.Start);
- subscribers[i].Start();
- }
- }
- }
-
- if (options.Control)
- {
- contT.Join();
- }
-
-
- // Wait for started threads.
- if (options.Publish)
- {
- foreach (Thread t in publishers)
- {
- t.Join();
- }
- }
-
- if (options.Subscribe)
- {
- foreach (Thread t in subscribers)
- {
- t.Join();
- }
- }
-
-
- return 0;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/perftest/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/perftest/Properties/AssemblyInfo.cs
deleted file mode 100644
index 415ad1f1ae..0000000000
--- a/qpid/dotnet/client-010/perftest/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("perftest")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("perftest")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("11b542db-0d57-4a67-8b92-24ac1d4ed4cf")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/perftest/README.txt b/qpid/dotnet/client-010/perftest/README.txt
deleted file mode 100644
index 1c920a30b6..0000000000
--- a/qpid/dotnet/client-010/perftest/README.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-There are two ways to use perftest:
-- single process:
-If none of the -Setup, -Publish, -Subscribe or -Control options are given perftest will run a single-process test.
-- multi-process:
-For a multi-process test first run:
-Perftest.exe -Setup <other options>
-and wait for it to complete. The remaining process should run concurrently:
-Run -Pubs times: Perftest.exe -Publish <other options>
-Run -Subs times: Perftest.exe -Subscribe <other options>
-Run once: Perftest.exe -Control <other options>
-Note the <other options> must be identical for all processes.
-
-Options:
- -Broker Specifies the broler name
- -Confirm Publisher use confirm-mode.
- -Control Run test, print report.
- -Count Each publisher sends N messages.
- -Durable Publish messages as durable.
- -Help Displays this help text
- -IntervalPub >=0 delay between msg publish.
- -IntervalSub >=0 delay between msg consume
- -Iterations Desired number of iterations of the test.
- -Mode Test mode: [shared|fanout|topic]
- -Port Specifies the port name
- -Publish Publish messages.
- -Pubs Create N publishers.
- -QueueDurable Make queue durable (implied if durable set.
- -QueueMaxCount Queue policy: count to trigger 'flow to disk'
- -QueueMaxSize Queue policy: accumulated size to trigger 'flow to disk'
- -Queues Create N queues.
- -Setup Create shared queues.
- -Size Size of messages in bytes.
- -SubAck N>0: Subscriber acks batches of N. N==0: Subscriber uses unconfirmed mode
- -Subs Create N subscribers.
- -Subscribe Subscribe for messages.
- -SyncPub Wait for confirmation of each message before sending the next one.
- -Tx If non-zero, the transaction batch size.
- -UniqueData Make data for each message unique. \ No newline at end of file
diff --git a/qpid/dotnet/client-010/perftest/default.build b/qpid/dotnet/client-010/perftest/default.build
deleted file mode 100644
index 756f6c6493..0000000000
--- a/qpid/dotnet/client-010/perftest/default.build
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="perftest" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="exe"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.exe">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/qpid.client.dll" />
- <include name="${build.dir}/C5.dll" />
- <include name="${build.dir}/Plossum CommandLine.dll" />
- </references>
- </csc>
- </target>
-
-</project>
-
diff --git a/qpid/dotnet/client-010/perftest/perftest.csproj b/qpid/dotnet/client-010/perftest/perftest.csproj
deleted file mode 100644
index 90136f18bb..0000000000
--- a/qpid/dotnet/client-010/perftest/perftest.csproj
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{7F7E8DE7-FDF2-4A52-A4CE-D3756B05273C}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>perftest</RootNamespace>
- <AssemblyName>perftest</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="C5, Version=1.0.2.0, Culture=neutral, PublicKeyToken=06a1b38866503b69, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\lib\plossum\C5.dll</HintPath>
- </Reference>
- <Reference Include="Plossum CommandLine, Version=0.3.0.14, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\lib\plossum\Plossum CommandLine.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="PerfTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\App.config">
- <Link>App.config</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/qpid/dotnet/client-010/test/Helpers/ConfigHelpers.cs b/qpid/dotnet/client-010/test/Helpers/ConfigHelpers.cs
deleted file mode 100644
index 883e52c264..0000000000
--- a/qpid/dotnet/client-010/test/Helpers/ConfigHelpers.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-using System.Xml;
-using log4net.Config;
-
-namespace test.Helpers
-{
- class ConfigHelpers
- {
- public static Dictionary<string, string> LoadConfig()
- {
- Dictionary<string, string> properties = new Dictionary<string, string>();
-
- XmlConfigurator.Configure(new FileInfo("/log.xml"));
- // populate default properties
- properties.Add("Username", "guest");
- properties.Add("Password", "guest");
- properties.Add("Host", "localhost");
- properties.Add("Port", "5672");
- properties.Add("VirtualHost", "test");
- //Read the test config file
- XmlTextReader reader = new XmlTextReader(Environment.CurrentDirectory + "/Qpid Test.dll.config");
- while (reader.Read())
- {
- // if node type is an element
- if (reader.NodeType == XmlNodeType.Element && reader.Name.Equals("add"))
- {
- if (properties.ContainsKey(reader.GetAttribute("key")))
- {
- properties[reader.GetAttribute("key")] = reader.GetAttribute("value");
- }
- else
- {
- properties.Add(reader.GetAttribute("key"), reader.GetAttribute("value"));
- }
- }
- }
-
- return properties;
- }
- }
-}
diff --git a/qpid/dotnet/client-010/test/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/test/Properties/AssemblyInfo.cs
deleted file mode 100644
index 871d450240..0000000000
--- a/qpid/dotnet/client-010/test/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Qpid Test")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Qpid Test")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("3d62cb4f-4353-4eed-9669-3e1bc902081d")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Revision and Build Numbers
-// by using the '*' as shown below:
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/test/Qpid Test.dll.config b/qpid/dotnet/client-010/test/Qpid Test.dll.config
deleted file mode 100644
index 2a2fb72b61..0000000000
--- a/qpid/dotnet/client-010/test/Qpid Test.dll.config
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<configuration>
- <appSettings>
- <add key="UserMame" value="guest"/>
- <add key="Password" value="guest"/>
- <add key="Host" value="localhost"/>
- <add key="Port" value="5672"/>
- <add key="VirtualHost" value="test"/>
- </appSettings>
-</configuration>
diff --git a/qpid/dotnet/client-010/test/Test.csproj b/qpid/dotnet/client-010/test/Test.csproj
deleted file mode 100644
index a9cd7c18af..0000000000
--- a/qpid/dotnet/client-010/test/Test.csproj
+++ /dev/null
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{95CB4C90-7C53-44A9-B11C-96235F158ACA}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>test</RootNamespace>
- <AssemblyName>Qpid Test</AssemblyName>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\lib\log4net\log4net.dll</HintPath>
- </Reference>
- <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\lib\nunit\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="interop\ConnectionTests.cs" />
- <Compile Include="Helpers\ConfigHelpers.cs" />
- <Compile Include="interop\Admin.cs" />
- <Compile Include="interop\ApplicationHeaders.cs" />
- <Compile Include="interop\Message.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="interop\TestCase.cs" />
- <Compile Include="transport\util\ByteEncoderTest.cs" />
- <Compile Include="transport\util\CircularBufferTest.cs" />
- <Compile Include="transport\util\ResultFutureTest.cs" />
- <Compile Include="transport\util\SerialTest.cs" />
- <Compile Include="transport\util\UUIDTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\client\Client.csproj">
- <Project>{B911FFD7-754F-4735-A188-218D5065BE79}</Project>
- <Name>Client</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="..\App.config">
- <Link>App.config</Link>
- </None>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/qpid/dotnet/client-010/test/default.build b/qpid/dotnet/client-010/test/default.build
deleted file mode 100644
index f9dadb174b..0000000000
--- a/qpid/dotnet/client-010/test/default.build
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="qpid.client.tests" default="build">
- <!--
- Properties that come from master build file
- - build.dir: root directory for build
- - build.debug: true if building debug release
- - build.defines: variables to define during build
- -->
-
- <target name="build">
- <csc target="library"
- define="${build.defines}"
- debug="${build.debug}"
- output="${build.dir}/${project::get-name()}.dll">
-
- <sources>
- <include name="**/*.cs" />
- </sources>
- <references>
- <include name="${build.dir}/log4net.dll" />
- <include name="${build.dir}/nunit.framework.dll" />
- <include name="${build.dir}/qpid.client.dll" />
- </references>
- </csc>
- </target>
-
- <target name="test" depends="build">
- <nunit2>
- <formatter type="${nant.formatter}" usefile="false" />
- <test assemblyname="${build.dir}/qpid.client.tests.dll" />
- </nunit2>
- </target>
-</project>
-
diff --git a/qpid/dotnet/client-010/test/interop/Admin.cs b/qpid/dotnet/client-010/test/interop/Admin.cs
deleted file mode 100644
index 163e4cf49a..0000000000
--- a/qpid/dotnet/client-010/test/interop/Admin.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using NUnit.Framework;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.util;
-
-namespace test.interop
-{
- public class Admin : TestCase
- {
- private static readonly Logger _log = Logger.Get(typeof(Admin));
-
- [Test]
- public void createSession()
- {
- _log.Debug("Running: CreateSession");
- IClientSession ssn = Client.CreateSession(0);
- ssn.Close();
- // This test fails if an exception is thrown
- }
-
- [Test]
- public void queueLifecycle()
- {
- _log.Debug("Running: queueLifecycle");
- IClientSession ssn = Client.CreateSession(0);
- ssn.QueueDeclare("queue1", null, null);
- ssn.Sync();
- ssn.QueueDelete("queue1");
- ssn.Sync();
- try
- {
- ssn.ExchangeBind("queue1", "amq.direct", "queue1", null);
- ssn.Sync();
- }
- catch (SessionException)
- {
- // as expected
- }
- // This test fails if an exception is thrown
- }
-
- [Test]
- public void exchangeCheck()
- {
- _log.Debug("Running: exchangeCheck");
- IClientSession ssn = Client.CreateSession(0);
- ExchangeQueryResult query = (ExchangeQueryResult) ssn.ExchangeQuery("amq.direct").Result;
- Assert.IsFalse(query.GetNotFound());
- Assert.IsTrue(query.GetDurable());
- query = (ExchangeQueryResult)ssn.ExchangeQuery("amq.topic").Result;
- Assert.IsFalse(query.GetNotFound());
- Assert.IsTrue(query.GetDurable());
- query = (ExchangeQueryResult) ssn.ExchangeQuery("foo").Result;
- Assert.IsTrue(query.GetNotFound());
- }
-
- [Test]
- public void exchangeBind()
- {
- _log.Debug("Running: ExchangeBind");
- IClientSession ssn = Client.CreateSession(0);
- ssn.QueueDeclare("queue1", null, null);
- ssn.ExchangeBind("queue1", "amq.direct", "queue1", null);
- // This test fails if an exception is thrown
- }
-
-
- }
-}
diff --git a/qpid/dotnet/client-010/test/interop/ApplicationHeaders.cs b/qpid/dotnet/client-010/test/interop/ApplicationHeaders.cs
deleted file mode 100644
index d932057fd2..0000000000
--- a/qpid/dotnet/client-010/test/interop/ApplicationHeaders.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using common.org.apache.qpid.transport.util;
-using NUnit.Framework;
-using org.apache.qpid.client;
-using org.apache.qpid.transport.util;
-
-namespace test.interop
-{
- public class ApplicationHeaders:TestCase
- {
- private static readonly Logger _log = Logger.Get(typeof(ApplicationHeaders));
-
- [Test]
- public void setHeaders()
- {
- _log.Debug("Running: setHeaders");
- IClientSession ssn = Client.CreateSession(0);
- ssn.QueueDeclare("queue1");
- ssn.ExchangeBind("queue1", "amq.direct", "queue1");
- ssn.Sync();
- CircularBuffer<IMessage> buff = new CircularBuffer<IMessage>(10);
- SyncListener listener = new SyncListener(ssn, buff);
- ssn.AttachMessageListener(listener, "queue1");
- ssn.MessageSubscribe("queue1");
-
- IMessage message = new org.apache.qpid.client.Message();
- message.DeliveryProperties.SetRoutingKey("queue1");
- const long someLong = 14444444;
- message.ApplicationHeaders.Add("someLong", someLong);
- const int someInt = 14;
- message.ApplicationHeaders.Add("soneInt", someInt);
- const float someFloat = 14.001F;
- message.ApplicationHeaders.Add("soneFloat", someFloat);
- const double someDouble = 14.5555555;
- message.ApplicationHeaders.Add("someDouble", someDouble);
- const byte someByte = 2;
- message.ApplicationHeaders.Add("someByte", someByte);
- const string someString = "someString";
- message.ApplicationHeaders.Add("someString", someString);
- const char someChar = 'a';
- message.ApplicationHeaders.Add("someChar", someChar);
- const Boolean someBoolean = true;
- message.ApplicationHeaders.Add("someBoolean", someBoolean);
-
- // transfer the message
- ssn.MessageTransfer("amq.direct", message);
-
- // get the message and check the headers
- IMessage messageBack = buff.Dequeue();
- Assert.IsTrue(((string) messageBack.ApplicationHeaders["someString"]).Equals(someString));
- Assert.IsTrue(((char)messageBack.ApplicationHeaders["someChar"]).Equals(someChar));
- Assert.IsTrue((long)messageBack.ApplicationHeaders["someLong"] == someLong);
- Assert.IsTrue((int)messageBack.ApplicationHeaders["soneInt"] == someInt);
- Assert.IsTrue((double)messageBack.ApplicationHeaders["someDouble"] == someDouble);
- Assert.IsTrue((byte) messageBack.ApplicationHeaders["someByte"] == someByte);
- Assert.IsTrue((Boolean)messageBack.ApplicationHeaders["someBoolean"]);
- // c# has an conversion precision issue with decimal
- Assert.IsTrue((float) messageBack.ApplicationHeaders["soneFloat"] <= someFloat);
- float b = (float) messageBack.ApplicationHeaders["soneFloat"];
- Assert.IsTrue(Convert.ToInt32(b) == Convert.ToInt32(someFloat));
- }
- }
-}
diff --git a/qpid/dotnet/client-010/test/interop/ConnectionTests.cs b/qpid/dotnet/client-010/test/interop/ConnectionTests.cs
deleted file mode 100644
index 37fd0e7933..0000000000
--- a/qpid/dotnet/client-010/test/interop/ConnectionTests.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Net.Sockets;
-using NUnit.Framework;
-using org.apache.qpid.client;
-using test.Helpers;
-
-namespace test
-{
- [TestFixture]
- public class ConnectionTests
- {
- [SetUp]
- public void Setup()
- {
-
- }
-
- [Test]
- [ExpectedException(typeof(Exception))]
- public void should_raise_exception_in_calling_thread_on_authentification_failure()
- {
- var properties = ConfigHelpers.LoadConfig();
-
- var client = new Client();
- client.Connect(properties["Host"], Convert.ToInt16(properties["Port"]), properties["VirtualHost"],
- properties["Username"], "some silly password to make sure the authentification fail");
- }
-
- [Test]
- [ExpectedException(typeof(Exception))]
- public void should_raise_exception_in_calling_thread_on_authentification_failure_with_clodedListener()
- {
- var properties = ConfigHelpers.LoadConfig();
-
- var client = new Client();
- client.ClosedListener = new FakeListener();
- client.Connect(properties["Host"], Convert.ToInt16(properties["Port"]), properties["VirtualHost"],
- properties["Username"], "some silly password to make sure the authentification fail");
- }
-
- [Test]
- public void should_not_block_on_close()
- {
- var properties = ConfigHelpers.LoadConfig();
-
- var client = new Client();
- client.Connect(properties["Host"], Convert.ToInt16(properties["Port"]), properties["VirtualHost"],
- properties["Username"], properties["Password"]);
- client.Close();
- }
- }
-
- public class FakeListener : IClosedListener
- {
- public void OnClosed(ErrorCode errorCode, string reason, Exception t)
- {
- }
- }
-}
diff --git a/qpid/dotnet/client-010/test/interop/Message.cs b/qpid/dotnet/client-010/test/interop/Message.cs
deleted file mode 100644
index 107e69c287..0000000000
--- a/qpid/dotnet/client-010/test/interop/Message.cs
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.Text;
-using System.Threading;
-using NUnit.Framework;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.util;
-
-namespace test.interop
-{
- public class Message : TestCase
- {
- private static readonly Logger _log = Logger.Get(typeof (Message));
-
- [Test]
- public void sendAndPurge()
- {
- _log.Debug("Running: ExchangeBind");
- IClientSession ssn = Client.CreateSession(0);
- ssn.QueueDelete("queue1");
- QueueQueryResult result = (QueueQueryResult) ssn.QueueQuery("queue1").Result;
- Assert.IsNull(result.GetQueue());
- ssn.QueueDeclare("queue1", null, null);
- ssn.ExchangeBind("queue1", "amq.direct", "queue1", null);
-
- for (int i = 0; i < 10; i++)
- {
- ssn.MessageTransfer("amq.direct", MessageAcceptMode.NONE, MessageAcquireMode.PRE_ACQUIRED,
- new Header(new DeliveryProperties().SetRoutingKey("queue1"),
- new MessageProperties().SetMessageId(UUID.RandomUuid())),
- Encoding.UTF8.GetBytes("test: " + i));
- }
- ssn.Sync();
- result = (QueueQueryResult) ssn.QueueQuery("queue1").Result;
- Assert.IsTrue(result.GetMessageCount() == 10);
- ssn.QueuePurge("queue1");
- ssn.Sync();
- result = (QueueQueryResult) ssn.QueueQuery("queue1").Result;
- Assert.IsTrue(result.GetMessageCount() == 0);
- }
-
- [Test]
- public void sendAndReceiveSmallMessages()
- {
- _log.Debug("Running: sendAndReceiveSmallMessages");
- byte[] smallMessage = Encoding.UTF8.GetBytes("test");
- sendAndReceive(smallMessage, 100);
- }
-
- [Test]
- public void sendAndReceiveLargeMessages()
- {
- _log.Debug("Running: sendAndReceiveSmallMessages");
- byte[] largeMessage = new byte[100 * 1024];
- Random random = new Random();
- random.NextBytes(largeMessage);
- sendAndReceive(largeMessage, 10);
- }
-
- [Test]
- public void sendAndReceiveVeryLargeMessages()
- {
- _log.Debug("Running: sendAndReceiveSmallMessages");
- byte[] verylargeMessage = new byte[1000 * 1024];
- Random random = new Random();
- random.NextBytes(verylargeMessage);
- sendAndReceive(verylargeMessage, 2);
- }
-
- private void sendAndReceive(byte[] messageBody, int count)
- {
- IClientSession ssn = Client.CreateSession(0);
- ssn.Sync();
- ssn.QueueDeclare("queue1", null, null);
- ssn.QueueDelete("queue1");
- QueueQueryResult result = (QueueQueryResult) ssn.QueueQuery("queue1").Result;
- Assert.IsNull(result.GetQueue());
- ssn.QueueDeclare("queue1", null, null);
- ssn.ExchangeBind("queue1", "amq.direct", "queue1", null);
- Object myLock = new Object();
- MyListener myListener = new MyListener(myLock, count);
- ssn.AttachMessageListener(myListener, "myDest");
-
- ssn.MessageSubscribe("queue1", "myDest", MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED, null,
- 0, null);
-
-
- // issue credits
- ssn.MessageSetFlowMode("myDest", MessageFlowMode.WINDOW);
- ssn.MessageFlow("myDest", MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
- ssn.MessageFlow("myDest", MessageCreditUnit.MESSAGE, 10000);
- ssn.Sync();
-
- for (int i = 0; i < count; i++)
- {
- ssn.MessageTransfer("amq.direct", MessageAcceptMode.NONE, MessageAcquireMode.PRE_ACQUIRED,
- new Header(new DeliveryProperties().SetRoutingKey("queue1"),
- new MessageProperties().SetMessageId(UUID.RandomUuid())),
- messageBody);
- }
- ssn.Sync();
-
- lock (myLock)
- {
- if (myListener.Count != 0)
- {
- Monitor.Wait(myLock, 10000000);
- }
- }
- Assert.IsTrue(myListener.Count == 0);
- ssn.MessageAccept(myListener.UnAck);
- ssn.Sync();
- // the queue should be empty
- result = (QueueQueryResult)ssn.QueueQuery("queue1").Result;
- Assert.IsTrue(result.GetMessageCount() == 0);
- ssn.Close();
- }
-
-
-
- private class MyListener : IMessageListener
- {
- private static readonly Logger _log = Logger.Get(typeof (MyListener));
- private readonly Object _wl;
- private int _count;
- private RangeSet _rs = new RangeSet();
-
- public MyListener(Object wl, int count)
- {
- _wl = wl;
- _count = count;
- }
-
- public void MessageTransfer(IMessage m)
- {
- byte[] body = new byte[m.Body.Length - m.Body.Position];
- _log.Debug("Got a message of size: " + body.Length + " count = " + _count);
- _rs.Add(m.Id);
- lock (_wl)
- {
- _count--;
- if (_count == 0)
- {
- Monitor.PulseAll(_wl);
- }
- }
- }
-
- public int Count
- {
- get { return _count; }
- }
-
- public RangeSet UnAck
- {
- get { return _rs; }
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/test/interop/TestCase.cs b/qpid/dotnet/client-010/test/interop/TestCase.cs
deleted file mode 100644
index 867f082000..0000000000
--- a/qpid/dotnet/client-010/test/interop/TestCase.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Threading;
-using System.Xml;
-using common.org.apache.qpid.transport.util;
-using log4net.Config;
-using NUnit.Framework;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.util;
-using test.Helpers;
-
-namespace test.interop
-{
- [TestFixture]
-
- public class TestCase
- {
- private readonly Dictionary<string,string> _properties = new Dictionary<string, string>();
- private Client _client;
-
- [TestFixtureSetUp]
- public void Init()
- {
- var properties = ConfigHelpers.LoadConfig();
- // create a client and connect to the broker
- _client = new Client();
- _client.Connect(properties["Host"], Convert.ToInt16(properties["Port"]), properties["VirtualHost"],
- properties["Username"], properties["Password"]);
-
- }
-
- [TestFixtureTearDown]
- public void Cleanup()
- {
- // Note : breaks the Resharper nunit test runner. It blocks on the Monitor.WaitAll()
- // Certainly a problem with the threading context..
- //_client.Close();
- }
-
- public Client Client
- {
- get{ return _client;}
- }
-
- public Dictionary<string,string> Properties
- {
- get { return _properties; }
- }
-
-
- public class SyncListener : IMessageListener
- {
- private static readonly Logger _log = Logger.Get(typeof(SyncListener));
- private readonly CircularBuffer<IMessage> _buffer;
- private readonly RangeSet _range = new RangeSet();
- private readonly IClientSession _session;
-
- public SyncListener(IClientSession session, CircularBuffer<IMessage> buffer)
- {
- _buffer = buffer;
- _session = session;
- }
-
- public void MessageTransfer(IMessage m)
- {
- _range.Clear();
- _range.Add(m.Id);
- _session.MessageAccept(_range);
- _buffer.Enqueue(m);
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/test/transport/util/ByteEncoderTest.cs b/qpid/dotnet/client-010/test/transport/util/ByteEncoderTest.cs
deleted file mode 100644
index f3a05f1c3c..0000000000
--- a/qpid/dotnet/client-010/test/transport/util/ByteEncoderTest.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using NUnit.Framework;
-using org.apache.qpid.transport.util;
-
-
-namespace test.transport.util
-{
- [TestFixture]
-
- public class ByteEncoderTest
- {
- private static readonly Logger _log = Logger.Get(typeof(ByteEncoderTest));
-
- [Test]
- public void GetBigEndianInt32()
- {
- _log.Debug("Running: GetBigEndianInt32");
- const int anInt = -12345;
- Int32 aNewInt = ByteEncoder.GetBigEndian(anInt);
- Assert.IsTrue( anInt == ByteEncoder.GetBigEndian(aNewInt) );
- }
-
- [Test]
- public void GetBigEndianUInt16()
- {
- _log.Debug("Running: GetBigEndianUInt16");
- const UInt16 anInt = 123;
- UInt16 aNewInt = ByteEncoder.GetBigEndian(anInt);
- Assert.IsTrue(anInt == ByteEncoder.GetBigEndian(aNewInt));
- }
-
- [Test]
- public void GetBigEndianUInt32()
- {
- _log.Debug("Running: GetBigEndianUInt32");
- const UInt32 anInt = 12345;
- UInt32 aNewInt = ByteEncoder.GetBigEndian(anInt);
- Assert.IsTrue(anInt == ByteEncoder.GetBigEndian(aNewInt));
- }
-
- [Test]
- public void GetBigEndianlong()
- {
- _log.Debug("Running: GetBigEndianlong");
- const long anInt = 123456660700770;
- long aNewInt = ByteEncoder.GetBigEndian(anInt);
- Assert.IsTrue(anInt == ByteEncoder.GetBigEndian(aNewInt));
- }
-
- [Test]
- public void GetLittleEndianInt32()
- {
- _log.Debug("Running: GetBigEndianInt32");
- const int anInt = -12345;
- Int32 aNewInt = ByteEncoder.GetLittleEndian(anInt);
- Assert.IsTrue(anInt == ByteEncoder.GetLittleEndian(aNewInt));
- }
-
- [Test]
- public void GetLittleEndianUInt16()
- {
- _log.Debug("Running: GetLittleEndianUInt16");
- const UInt16 anInt = 123;
- UInt16 aNewInt = ByteEncoder.GetLittleEndian(anInt);
- Assert.IsTrue(anInt == ByteEncoder.GetLittleEndian(aNewInt));
- }
-
- [Test]
- public void GetLittleEndianUInt32()
- {
- _log.Debug("Running: GetLittleEndianUInt32");
- const UInt32 anInt = 12345;
- UInt32 aNewInt = ByteEncoder.GetLittleEndian(anInt);
- Assert.IsTrue(anInt == ByteEncoder.GetLittleEndian(aNewInt));
- }
-
- [Test]
- public void GetLittleEndianlong()
- {
- _log.Debug("Running: GetLittleEndianlong");
- const long anInt = 123456660700770;
- long aNewInt = ByteEncoder.GetLittleEndian(anInt);
- Assert.IsTrue(anInt == ByteEncoder.GetLittleEndian(aNewInt));
- }
- }
-}
diff --git a/qpid/dotnet/client-010/test/transport/util/CircularBufferTest.cs b/qpid/dotnet/client-010/test/transport/util/CircularBufferTest.cs
deleted file mode 100644
index 5e39569cf8..0000000000
--- a/qpid/dotnet/client-010/test/transport/util/CircularBufferTest.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Threading;
-using common.org.apache.qpid.transport.util;
-using NUnit.Framework;
-using org.apache.qpid.transport.util;
-
-namespace test.transport.util
-{
- [TestFixture]
-
- public class CircularBufferTest
- {
- private CircularBuffer<Object> _buf;
- private static readonly Logger _log = Logger.Get(typeof(CircularBufferTest));
-
- [Test]
- public void BlockingEnqueue()
- {
- _log.Debug("Running: BlockingEnqueue");
- const int size = 10;
- _buf = new CircularBuffer<Object>(size);
- // add size element anc check that the size +1 add blocks
- for (int i = 1; i < size; i++ )
- {
- _buf.Enqueue(new object());
- }
- // check tha the buffer is now full
- Thread t = new Thread(Go);
- t.Start();
- Thread.Sleep(100);
- // the trhead t should block until an element is dequeued
- Assert.IsTrue(t.ThreadState == ThreadState.WaitSleepJoin);
- _buf.Dequeue();
- // t should now be stopped
- Thread.Sleep(100);
- Assert.IsTrue(t.ThreadState == ThreadState.Stopped);
- }
-
- [Test]
- public void Close()
- {
- _log.Debug("Running: BlockingEnqueue");
- const int size = 10;
- _buf = new CircularBuffer<Object>(size);
- // add size element anc check that the size +1 add blocks
- for (int i = 1; i < size; i++)
- {
- _buf.Enqueue(new object());
- }
- // check tha the buffer is now full
- Thread t = new Thread(Go);
- t.Start();
- Thread.Sleep(1000);
- // the trhead t should block until the buffer is closed
- Assert.IsTrue(t.ThreadState == ThreadState.WaitSleepJoin);
- _buf.Close();
- Thread.Sleep(100);
- // t should now be stopped
- Assert.IsTrue(t.ThreadState == ThreadState.Stopped);
- }
-
- void Go()
- {
- _buf.Enqueue(new object());
- }
-
- }
-}
diff --git a/qpid/dotnet/client-010/test/transport/util/ResultFutureTest.cs b/qpid/dotnet/client-010/test/transport/util/ResultFutureTest.cs
deleted file mode 100644
index e8e011a1e9..0000000000
--- a/qpid/dotnet/client-010/test/transport/util/ResultFutureTest.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using common.org.apache.qpid.transport.util;
-using NUnit.Framework;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.codec;
-using org.apache.qpid.transport.util;
-
-
-namespace test.transport.util
-{
- [TestFixture]
- public class ResultFutureTest
- {
- private static readonly Logger _log = Logger.Get(typeof (ByteEncoderTest));
- private static ResultFuture _future;
-
- [Test]
- public void getFutureTimeout()
- {
- _log.Debug("Running: getFutureTimeout");
- _future = new ResultFuture();
- _future.Session = new Session(new byte[1]);
- DateTime start = DateTime.Now;
- Struct result = _future.Get(1000);
- Assert.IsTrue(DateTime.Now.Subtract(start).TotalMilliseconds >= 1000);
- Assert.IsNull(result);
- }
-
- [Test]
- public void getFuture()
- {
- _log.Debug("Running: getFuture");
- _future = new ResultFuture();
- _future.Session = new Session(new byte[1]);
- Thread t = new Thread(Go);
- t.Start();
- Struct result = _future.Get(2000);
- Assert.IsNotNull(result);
- }
-
-
- void Go()
- {
- Thread.Sleep(500);
- _future.Result = new myStruct();
- }
- }
-
- public class myStruct:Struct
- {
- public override int GetStructType()
- {
- throw new System.NotImplementedException();
- }
-
- public override int GetSizeWidth()
- {
- throw new System.NotImplementedException();
- }
-
- public override int GetPackWidth()
- {
- throw new System.NotImplementedException();
- }
-
- public override void Read(IDecoder dec)
- {
- throw new System.NotImplementedException();
- }
-
- public override void Write(IEncoder enc)
- {
- throw new System.NotImplementedException();
- }
-
- public override Dictionary<string, object> Fields
- {
- get { throw new System.NotImplementedException(); }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/test/transport/util/SerialTest.cs b/qpid/dotnet/client-010/test/transport/util/SerialTest.cs
deleted file mode 100644
index 772327c3b0..0000000000
--- a/qpid/dotnet/client-010/test/transport/util/SerialTest.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using NUnit.Framework;
-using org.apache.qpid.transport.util;
-
-namespace test.transport.util
-{
- [TestFixture]
- public class SerialTest
- {
- private static readonly Logger _log = Logger.Get(typeof (SerialTest));
-
- [Test]
- ///
- /// Test the key boundaries where wraparound occurs.
- ///
- public void testBoundaries()
- {
- Assert.IsTrue(Serial.Gt(1, 0));
- Assert.IsTrue(Serial.Lt(0, 1));
-
- Assert.IsTrue(Serial.Gt(int.MaxValue, int.MaxValue - 1));
- Assert.IsTrue(Serial.Lt(int.MaxValue - 1, int.MaxValue));
- }
-
- ///
- /// Test the first Corollary of RFC 1982
- /// For any sequence number s and any integer n such that addition of n
- /// to s is well defined, (s + n) >= s. Further (s + n) == s only when
- /// n == 0, in all other defined cases, (s + n) > s.
- ///
- public void testCorollary1()
- {
- int wrapcount = 0;
-
- int s = 0;
-
- for (int i = 0; i < 67108664; i++)
- {
- for (int n = 1; n < 4096; n += 512)
- {
- Assert.IsTrue(Serial.Gt(s + n, s));
- Assert.IsTrue(Serial.Lt(s, s + n));
- }
-
- s += 1024;
-
- if (s == 0)
- {
- wrapcount += 1;
- }
- }
-
- Assert.IsTrue(wrapcount > 0);
- }
- }
-}
diff --git a/qpid/dotnet/client-010/test/transport/util/UUIDTest.cs b/qpid/dotnet/client-010/test/transport/util/UUIDTest.cs
deleted file mode 100644
index 41104f8873..0000000000
--- a/qpid/dotnet/client-010/test/transport/util/UUIDTest.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System;
-using NUnit.Framework;
-using org.apache.qpid.transport.util;
-
-namespace test.transport.util
-{
- [TestFixture]
-
- public class UUIDTest
- {
-
-
- [Test]
- public void createUUID()
- {
- UUID uuid = UUID.RandomUuid();
- String uuidStr = uuid.ToString();
- Assert.IsNotNull(uuid);
- UUID uuid2 = UUID.RandomUuid();
- Assert.AreNotSame(uuid, uuid2);
- }
-
- [Test]
- public void ToString_should_override_and_not_hide_base()
- {
- UUID uuid = UUID.RandomUuid();
-
- string uuidStr = uuid.ToString();
- string uuidConcat = "Test." + uuid;
-
- Assert.AreEqual("Test." + uuidStr, uuidConcat);
- }
-
- [Test]
- public void two_uuid_with_same_value_should_have_same_hash_code()
- {
- UUID uuid = UUID.RandomUuid();
- UUID uuid2 = new UUID(uuid.MostSignificantBits, uuid.LeastSignificantBits);
-
- Assert.AreEqual(uuid, uuid2);
- Assert.AreEqual(uuid.GetHashCode(), uuid2.GetHashCode());
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/wcf/Properties/AssemblyInfo.cs
deleted file mode 100644
index 66f2bb1268..0000000000
--- a/qpid/dotnet/client-010/wcf/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Qpid WCF")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Qpid WCF")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("a39d56ec-7d81-48e1-9602-347a3ce6f638")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/wcf/demo/ConfigDemo.suo b/qpid/dotnet/client-010/wcf/demo/ConfigDemo.suo
deleted file mode 100644
index baa935693b..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/ConfigDemo.suo
+++ /dev/null
Binary files differ
diff --git a/qpid/dotnet/client-010/wcf/demo/Demo.suo b/qpid/dotnet/client-010/wcf/demo/Demo.suo
deleted file mode 100644
index ee4cb5d21e..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/Demo.suo
+++ /dev/null
Binary files differ
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Form1.Designer.cs b/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Form1.Designer.cs
deleted file mode 100644
index 9ec3a08359..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Form1.Designer.cs
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-namespace WindowsFormsBooking
-{
- partial class Form1
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.comboBox1 = new System.Windows.Forms.ComboBox();
- this.label1 = new System.Windows.Forms.Label();
- this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
- this.label2 = new System.Windows.Forms.Label();
- this.button1 = new System.Windows.Forms.Button();
- this.richTextBox1 = new System.Windows.Forms.RichTextBox();
- this.button2 = new System.Windows.Forms.Button();
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
- this.SuspendLayout();
- //
- // comboBox1
- //
- this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBox1.FormattingEnabled = true;
- this.comboBox1.Items.AddRange(new object[] {
- "Hotel",
- "Taxi",
- "Train",
- "Cinema",
- "Theater",
- "Restaurant"});
- this.comboBox1.Location = new System.Drawing.Point(60, 20);
- this.comboBox1.Name = "comboBox1";
- this.comboBox1.Size = new System.Drawing.Size(76, 21);
- this.comboBox1.TabIndex = 0;
- this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(23, 20);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(31, 13);
- this.label1.TabIndex = 1;
- this.label1.Text = "Type";
- //
- // numericUpDown1
- //
- this.numericUpDown1.Increment = new decimal(new int[] {
- 10,
- 0,
- 0,
- 0});
- this.numericUpDown1.Location = new System.Drawing.Point(60, 49);
- this.numericUpDown1.Maximum = new decimal(new int[] {
- 200,
- 0,
- 0,
- 0});
- this.numericUpDown1.Minimum = new decimal(new int[] {
- 30,
- 0,
- 0,
- 0});
- this.numericUpDown1.Name = "numericUpDown1";
- this.numericUpDown1.Size = new System.Drawing.Size(76, 20);
- this.numericUpDown1.TabIndex = 2;
- this.numericUpDown1.Value = new decimal(new int[] {
- 30,
- 0,
- 0,
- 0});
- this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);
- //
- // label2
- //
- this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(23, 56);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(31, 13);
- this.label2.TabIndex = 3;
- this.label2.Text = "Price";
- //
- // button1
- //
- this.button1.Location = new System.Drawing.Point(142, 20);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(40, 49);
- this.button1.TabIndex = 4;
- this.button1.Text = "Add";
- this.button1.UseVisualStyleBackColor = true;
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
- // richTextBox1
- //
- this.richTextBox1.ForeColor = System.Drawing.SystemColors.ControlText;
- this.richTextBox1.Location = new System.Drawing.Point(27, 113);
- this.richTextBox1.Name = "richTextBox1";
- this.richTextBox1.Size = new System.Drawing.Size(155, 83);
- this.richTextBox1.TabIndex = 5;
- this.richTextBox1.Text = "";
- //
- // button2
- //
- this.button2.Location = new System.Drawing.Point(27, 81);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(155, 29);
- this.button2.TabIndex = 6;
- this.button2.Text = "Receipt";
- this.button2.UseVisualStyleBackColor = true;
- this.button2.Click += new System.EventHandler(this.button2_Click);
- //
- // Form1
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(211, 211);
- this.Controls.Add(this.button2);
- this.Controls.Add(this.richTextBox1);
- this.Controls.Add(this.button1);
- this.Controls.Add(this.label2);
- this.Controls.Add(this.numericUpDown1);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.comboBox1);
- this.Name = "Form1";
- this.Text = "Booking Client";
- ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.ComboBox comboBox1;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.NumericUpDown numericUpDown1;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Button button1;
- private System.Windows.Forms.RichTextBox richTextBox1;
- private System.Windows.Forms.Button button2;
- }
-}
-
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Form1.cs b/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Form1.cs
deleted file mode 100644
index 89205bd6bd..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Form1.cs
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.ServiceModel;
-using System.Windows.Forms;
-using org.apache.qpid.wcf.demo;
-using org.apache.qpid.wcf.model;
-using org.apache.qpid.wcf.demo.bookingServer;
-
-namespace WindowsFormsBooking
-{
- public partial class Form1 : Form
- {
- private ChannelFactory<IBooking> _fac;
- private readonly Order _order = new Order();
- private IBooking _calc;
-
- public Form1()
- {
- InitializeComponent();
- _calc = StartClient(new QpidBinding("192.168.1.14", 5673));
- _order.Type = "Default";
- _order.Price = 0;
- }
-
- public IBooking StartClient(System.ServiceModel.Channels.Binding binding)
- {
- IBooking res = null;
- try
- {
- Console.WriteLine(" Starting Client...");
- _fac = new ChannelFactory<IBooking>(binding, "soap.amqp:///Booking");
- _fac.Open();
- res = _fac.CreateChannel();
- Console.WriteLine("[DONE]");
- }
- catch (Exception e)
- {
- Console.WriteLine(e);
- }
- return res;
- }
-
- public void StopClient(IBooking client)
- {
- Console.WriteLine(" Stopping Client...");
- ((System.ServiceModel.Channels.IChannel)client).Close();
- _fac.Close();
- Console.WriteLine("[DONE]");
- }
-
- private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- _order.Type = ((ComboBox) sender).SelectedItem.ToString();
- }
-
- private void numericUpDown1_ValueChanged(object sender, EventArgs e)
- {
- _order.Price = (double) ((NumericUpDown) sender).Value;
- }
-
- private void button1_Click(object sender, EventArgs e)
- {
- _calc.Add(_order);
- }
-
- private void button2_Click(object sender, EventArgs e)
- {
- Receipt r = _calc.Checkout();
- richTextBox1.Text = r.Summary + "\n" + "Total Price = " + r.Price;
- // reset
- _calc = StartClient(new QpidBinding("192.168.1.14", 5673));
- }
-
-
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Form1.resx b/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Form1.resx
deleted file mode 100644
index 7c6a1b6a50..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Form1.resx
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- <xsd:attribute ref="xml:space" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <metadata name="richTextBox1.Locked" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
- <value>True</value>
- </metadata>
-</root> \ No newline at end of file
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Program.cs b/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Program.cs
deleted file mode 100644
index 59189bf600..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Program.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System;
-using System.Collections.Generic;
-using System.Windows.Forms;
-
-namespace WindowsFormsBooking
-{
- static class Program
- {
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void Main()
- {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new Form1());
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/AssemblyInfo.cs
deleted file mode 100644
index be301395d3..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Booking Client")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Booking Client")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("fc8b1e0e-1ca9-46fe-9aae-b1ed046716b8")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Resources.Designer.cs b/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Resources.Designer.cs
deleted file mode 100644
index 42f9731a3d..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.1433
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace WindowsFormsBooking.Properties
-{
-
-
- /// <summary>
- /// A strongly-typed resource class, for looking up localized strings, etc.
- /// </summary>
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources
- {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources()
- {
- }
-
- /// <summary>
- /// Returns the cached ResourceManager instance used by this class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager
- {
- get
- {
- if ((resourceMan == null))
- {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WindowsFormsBooking.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- /// <summary>
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- /// </summary>
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture
- {
- get
- {
- return resourceCulture;
- }
- set
- {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Resources.resx b/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Resources.resx
deleted file mode 100644
index af03750170..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Resources.resx
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<root>
- <!--
- Microsoft ResX Schema
-
- Version 2.0
-
- The primary goals of this format is to allow a simple XML format
- that is mostly human readable. The generation and parsing of the
- various data types are done through the TypeConverter classes
- associated with the data types.
-
- Example:
-
- ... ado.net/XML headers & schema ...
- <resheader name="resmimetype">text/microsoft-resx</resheader>
- <resheader name="version">2.0</resheader>
- <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
- <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
- <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
- <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
- <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
- <value>[base64 mime encoded serialized .NET Framework object]</value>
- </data>
- <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
- <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
- <comment>This is a comment</comment>
- </data>
-
- There are any number of "resheader" rows that contain simple
- name/value pairs.
-
- Each data row contains a name, and value. The row also contains a
- type or mimetype. Type corresponds to a .NET class that support
- text/value conversion through the TypeConverter architecture.
- Classes that don't support this are serialized and stored with the
- mimetype set.
-
- The mimetype is used for serialized objects, and tells the
- ResXResourceReader how to depersist the object. This is currently not
- extensible. For a given mimetype the value must be set accordingly:
-
- Note - application/x-microsoft.net.object.binary.base64 is the format
- that the ResXResourceWriter will generate, however the reader can
- read any of the formats listed below.
-
- mimetype: application/x-microsoft.net.object.binary.base64
- value : The object must be serialized with
- : System.Serialization.Formatters.Binary.BinaryFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.soap.base64
- value : The object must be serialized with
- : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
- : and then encoded with base64 encoding.
-
- mimetype: application/x-microsoft.net.object.bytearray.base64
- value : The object must be serialized into a byte array
- : using a System.ComponentModel.TypeConverter
- : and then encoded with base64 encoding.
- -->
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="metadata">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" />
- <xsd:attribute name="type" type="xsd:string" />
- <xsd:attribute name="mimetype" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="assembly">
- <xsd:complexType>
- <xsd:attribute name="alias" type="xsd:string" />
- <xsd:attribute name="name" type="xsd:string" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
- <resheader name="resmimetype">
- <value>text/microsoft-resx</value>
- </resheader>
- <resheader name="version">
- <value>2.0</value>
- </resheader>
- <resheader name="reader">
- <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
- <resheader name="writer">
- <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
- </resheader>
-</root> \ No newline at end of file
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Settings.Designer.cs b/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Settings.Designer.cs
deleted file mode 100644
index 212fb91438..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-//------------------------------------------------------------------------------
-// <auto-generated>
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.1433
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace WindowsFormsBooking.Properties
-{
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
- {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default
- {
- get
- {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Settings.settings b/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Settings.settings
deleted file mode 100644
index 64cfd9241c..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/Properties/Settings.settings
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
- <Profiles>
- <Profile Name="(Default)" />
- </Profiles>
- <Settings />
-</SettingsFile>
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/wcBookingClient.csproj b/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/wcBookingClient.csproj
deleted file mode 100644
index 1449446ae2..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingClient/wcBookingClient.csproj
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{4086B3FE-F745-4DCC-952A-682CAE01F4C9}</ProjectGuid>
- <OutputType>WinExe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>WindowsFormsBooking</RootNamespace>
- <AssemblyName>Booking Client</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Xml.Linq">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data.DataSetExtensions">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Deployment" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Form1.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="Form1.Designer.cs">
- <DependentUpon>Form1.cs</DependentUpon>
- </Compile>
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <EmbeddedResource Include="Form1.resx">
- <DependentUpon>Form1.cs</DependentUpon>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="Properties\Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>Resources.Designer.cs</LastGenOutput>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <Compile Include="Properties\Resources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Resources.resx</DependentUpon>
- </Compile>
- <None Include="Properties\Settings.settings">
- <Generator>SettingsSingleFileGenerator</Generator>
- <LastGenOutput>Settings.Designer.cs</LastGenOutput>
- </None>
- <Compile Include="Properties\Settings.Designer.cs">
- <AutoGen>True</AutoGen>
- <DependentUpon>Settings.settings</DependentUpon>
- <DesignTimeSharedInput>True</DesignTimeSharedInput>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\wcf.csproj">
- <Project>{F1D80D9D-FE22-4213-A760-BFFDE7D131DD}</Project>
- <Name>wcf</Name>
- </ProjectReference>
- <ProjectReference Include="..\wcfBookingServer\wcfBookingServer.csproj">
- <Project>{B34E21C4-A742-4886-8569-1A89490E093E}</Project>
- <Name>wcfBookingServer</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Booking.cs b/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Booking.cs
deleted file mode 100644
index 7c0fbb39b4..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Booking.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Collections.Generic;
-using System.ServiceModel;
-
-
-namespace org.apache.qpid.wcf.demo.bookingServer
-{
- [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)]
- public class Booking : IBooking
- {
- private Guid _id;
- private List<Order> _orders;
-
- public Booking()
- {
- _id = Guid.NewGuid();
- _orders = new List<Order>();
- }
-
- public void Add(Order order)
- {
- _orders.Add(order);
- }
-
- public Receipt Checkout()
- {
- var r = new Receipt();
- foreach (Order order in _orders)
- {
- r.Price += order.Price;
- r.Summary = r.Summary + " \n " + order.Type + " Price: " + order.Price;
- }
- return r;
- }
-
- public Guid Id
- {
- get { return _id; }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/IBooking.cs b/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/IBooking.cs
deleted file mode 100644
index cead4d0471..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/IBooking.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.ServiceModel;
-
-namespace org.apache.qpid.wcf.demo.bookingServer
-{
- [ServiceContract(SessionMode=SessionMode.Required)]
- public interface IBooking
- {
- [OperationContract]
- void Add(Order order);
-
- [OperationContract]
- Receipt Checkout();
-
- Guid Id
- {
- [OperationContract]
- get;
- }
- }
-
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Order.cs b/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Order.cs
deleted file mode 100644
index aa52908692..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Order.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System.Runtime.Serialization;
-
-namespace org.apache.qpid.wcf.demo.bookingServer
-{
- [DataContract]
- public sealed class Order
- {
- private double _price;
- private string _type;
-
- [DataMember]
- public double Price
- {
- get { return _price; }
- set { _price = value; }
- }
-
- [DataMember]
- public string Type
- {
- get { return _type; }
- set { _type = value; }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Program.cs b/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Program.cs
deleted file mode 100644
index ebb75308cf..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Program.cs
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-using System.Threading;
-using org.apache.qpid.wcf.model;
-
-
-namespace org.apache.qpid.wcf.demo.bookingServer
-{
- internal class Program
- {
- private ServiceHost _service;
- private ChannelFactory<IBooking> fac;
-
- public void StartService(Binding binding)
- {
- try
- {
- Console.WriteLine(" Binding Service...");
- _service = new ServiceHost(typeof(Booking), new Uri("soap.amqp:///"));
- _service.AddServiceEndpoint(typeof(IBooking), binding, "Booking");
- _service.Open();
- Thread.Sleep(500);
- Console.WriteLine("[DONE]");
- }
- catch (Exception e)
- {
- Console.WriteLine(e);
- }
- }
-
- public void StopService()
- {
- Console.WriteLine(" Stopping Service...");
- _service.Close();
- Console.WriteLine("[DONE]");
- }
-
- public IBooking StartClient(Binding binding)
- {
- IBooking res = null;
- try
- {
- Console.WriteLine(" Starting Client...");
- fac = new ChannelFactory<IBooking>(binding, "soap.amqp:///Booking");
- fac.Open();
- res = fac.CreateChannel();
- Console.WriteLine("[DONE]");
- }
- catch (Exception e)
- {
- Console.WriteLine(e);
- }
- return res;
- }
-
- public void StopClient(IBooking client)
- {
- Console.WriteLine(" Stopping Client...");
- ((IChannel)client).Close();
- fac.Close();
- Console.WriteLine("[DONE]");
- }
-
- private static void Main(string[] args)
- {
- var p = new Program();
-
- Binding binding = new QpidBinding("192.168.1.14", 5673);
- p.StartService(binding);
-
- Console.ReadLine();
-
- p.StopService();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Properties/AssemblyInfo.cs
deleted file mode 100644
index cc0208c9ca..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Booking Server")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Booking Server")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("12ef158b-ac5f-43b3-99f6-e4a4c096d6f8")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Receipt.cs b/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Receipt.cs
deleted file mode 100644
index d5ab0f3eb3..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/Receipt.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System.Runtime.Serialization;
-
-namespace org.apache.qpid.wcf.demo.bookingServer
-{
- [DataContract]
- public sealed class Receipt
- {
- private double _price;
- private string _summary;
-
- [DataMember]
- public double Price
- {
- get { return _price; }
- set { _price = value; }
- }
-
- [DataMember]
- public string Summary
- {
- get { return _summary; }
- set { _summary = value; }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/wcfBookingServer.csproj b/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/wcfBookingServer.csproj
deleted file mode 100644
index 2f744f8b6b..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfBookingServer/wcfBookingServer.csproj
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{B34E21C4-A742-4886-8569-1A89490E093E}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>wcfSession</RootNamespace>
- <AssemblyName>Booking Server</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Drawing" />
- <Reference Include="System.Runtime.Serialization">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml.Linq">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data.DataSetExtensions">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Booking.cs" />
- <Compile Include="Receipt.cs" />
- <Compile Include="IBooking.cs" />
- <Compile Include="Order.cs" />
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\wcf.csproj">
- <Project>{F1D80D9D-FE22-4213-A760-BFFDE7D131DD}</Project>
- <Name>wcf</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/App.config b/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/App.config
deleted file mode 100644
index 1545d71d6f..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/App.config
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<configuration>
- <system.serviceModel>
-
- <client>
- <endpoint address="soap.amqp:///Hello"
- binding="customBinding"
- bindingConfiguration="QpidBinding"
- contract="org.apache.qpid.wcf.demo.helloClient.IHelloContract"
- name="HelloService" />
- </client>
-
-
- <bindings>
- <customBinding>
- <binding name="QpidBinding">
- <textMessageEncoding />
- <QpidTransport
- host="localhost"
- port="5672" />
- </binding>
- </customBinding>
- </bindings>
-
- <extensions>
- <bindingElementExtensions>
- <add
- name="QpidTransport"
- type="org.apache.qpid.wcf.model.QpidTransportElement, qpidWCFModel"/>
- </bindingElementExtensions>
- </extensions>
-
-
- </system.serviceModel>
-</configuration>
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/HelloClient.cs b/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/HelloClient.cs
deleted file mode 100644
index 31743c62cf..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/HelloClient.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System.ServiceModel;
-
-namespace org.apache.qpid.wcf.demo.helloClient
-{
- public class HelloClient : ClientBase<IHelloContract>, IHelloContract
- {
- public HelloClient(string configurationName)
- : base(configurationName) { }
-
- public void Hello(string name)
- {
- Channel.Hello(name);
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/IHelloService.cs b/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/IHelloService.cs
deleted file mode 100644
index d3b9a354ba..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/IHelloService.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System.ServiceModel;
-
-namespace org.apache.qpid.wcf.demo.helloClient
-{
- [ServiceContract]
- public interface IHelloContract
- {
- [OperationContract(IsOneWay=true)]
- void Hello(string name);
- }
-
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/Program.cs b/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/Program.cs
deleted file mode 100644
index fc68d2556a..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/Program.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-
-namespace org.apache.qpid.wcf.demo.helloClient
-{
- class Program
- {
- static void Main(string[] args)
- {
- Console.Title = "Hello Service Client";
- Console.ForegroundColor = ConsoleColor.White;
- Console.WriteLine("Hello Service Client");
- Console.ForegroundColor = ConsoleColor.Gray;
- Console.WriteLine();
- // create a client using the configuration file App.config
- var client = new HelloClient("HelloService");
- Console.WriteLine("Client Saying Hello to Qpid");
- client.Hello("Qpid");
- Console.WriteLine("Client Saying Hello to AMQP");
- client.Hello("AMQP");
- // closing the client service
- client.ChannelFactory.Close();
- Console.WriteLine();
- Console.Write("Press Enter to Exit...");
- Console.ReadLine();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/Properties/AssemblyInfo.cs
deleted file mode 100644
index 83dfbcd5f4..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Qpid WCF Hello Client")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Qpid WCF Hello Client")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("f7628695-280a-4689-ac6f-1186177f9a25")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/wcfHelloClient.csproj b/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/wcfHelloClient.csproj
deleted file mode 100644
index 2e518d0da0..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfHelloClient/wcfHelloClient.csproj
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{A24E27DB-A38D-40C9-9879-8390B68C2F06}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>wcfHelloClient</RootNamespace>
- <AssemblyName>Qpid WCF Hello Client</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="HelloClient.cs" />
- <Compile Include="IHelloService.cs" />
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\wcf.csproj">
- <Project>{F1D80D9D-FE22-4213-A760-BFFDE7D131DD}</Project>
- <Name>wcf</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/App.config b/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/App.config
deleted file mode 100644
index de71f890b5..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/App.config
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<configuration>
- <system.serviceModel>
-
-
- <services>
- <service name="org.apache.qpid.wcf.demo.HelloService">
- <host>
- <baseAddresses>
- <add baseAddress="soap.amqp:///" />
- </baseAddresses>
- </host>
- <endpoint
- address="Hello"
- binding="customBinding"
- bindingConfiguration="QpidBinding"
- contract="org.apache.qpid.wcf.demo.IHelloContract"/>
- </service>
- </services>
-
-
- <bindings>
- <customBinding>
- <binding name="QpidBinding">
- <textMessageEncoding />
- <QpidTransport
- host="192.168.1.14"
- port="5673" />
- </binding>
- </customBinding>
- </bindings>
-
- <extensions>
- <bindingElementExtensions>
- <add
- name="QpidTransport"
- type="org.apache.qpid.wcf.model.QpidTransportElement, qpidWCFModel"/>
- </bindingElementExtensions>
- </extensions>
-
-
- </system.serviceModel>
-</configuration>
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/HelloService.cs b/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/HelloService.cs
deleted file mode 100644
index 3b7df01ece..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/HelloService.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-
-namespace org.apache.qpid.wcf.demo.helloServer
-{
- public class HelloService : IHelloContract
- {
- public void Hello(string name)
- {
- Console.WriteLine("Hello {0}!", name);
-
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/IHelloService.cs b/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/IHelloService.cs
deleted file mode 100644
index 1609439b94..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/IHelloService.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System.ServiceModel;
-
-namespace org.apache.qpid.wcf.demo.helloServer
-{
- [ServiceContract]
- public interface IHelloContract
- {
- [OperationContract(IsOneWay=true)]
- void Hello(string name);
- }
-
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/Program.cs b/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/Program.cs
deleted file mode 100644
index 1b8b8947ee..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/Program.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.ServiceModel;
-
-namespace org.apache.qpid.wcf.demo.helloServer
-{
- class Program
- {
- static void Main(string[] args)
- {
- Console.Title = "Hello Service Server";
- Console.ForegroundColor = ConsoleColor.White;
- Console.WriteLine("Hello Service Server");
- Console.ForegroundColor = ConsoleColor.Gray;
- Console.WriteLine();
-
- var host = new ServiceHost(typeof(HelloService));
- host.Open();
-
- Console.WriteLine("Service Ready");
- Console.WriteLine("Press Enter to Exit...");
- Console.ReadLine();
-
- host.Close();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/Properties/AssemblyInfo.cs
deleted file mode 100644
index a32f32e864..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Qpid WCF Hello Server")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Qpid WCF Hello Server")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("afa87185-f224-4948-904c-b4f3cd19dadb")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/wcfHelloServer.csproj b/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/wcfHelloServer.csproj
deleted file mode 100644
index 3a672a87f4..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfHelloServer/wcfHelloServer.csproj
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{3EF848D7-5FAC-482C-922A-D4D45A4CCD2A}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>wcfHelloServer</RootNamespace>
- <AssemblyName>Qpid WCF Hello Server</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Xml.Linq">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data.DataSetExtensions">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="HelloService.cs" />
- <Compile Include="IHelloService.cs" />
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="App.config" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfRPC/IUpperCase.cs b/qpid/dotnet/client-010/wcf/demo/wcfRPC/IUpperCase.cs
deleted file mode 100644
index 668450948d..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfRPC/IUpperCase.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System.ServiceModel;
-
-namespace org.apache.qpid.wcf.demo.rpc
-{
- [ServiceContract]
- public interface IUpperCase
- {
- [OperationContract]
- string ToUpperCase(string message);
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfRPC/Program.cs b/qpid/dotnet/client-010/wcf/demo/wcfRPC/Program.cs
deleted file mode 100644
index e2b54a0f61..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfRPC/Program.cs
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-using System.Threading;
-using org.apache.qpid.wcf.model;
-
-
-namespace org.apache.qpid.wcf.demo.rpc
-{
- internal class Program
- {
- private ServiceHost _service;
- private ChannelFactory<IUpperCase> fac;
-
- public void StartService(Binding binding)
- {
- try
- {
- Console.WriteLine(" Binding Service...");
- _service = new ServiceHost(typeof (UpperCase), new Uri("soap.amqp:///"));
- _service.AddServiceEndpoint(typeof(IUpperCase), binding, "UpperCase");
- _service.Open();
- Thread.Sleep(500);
- Console.WriteLine("[DONE]");
- }
- catch (Exception e)
- {
- Console.WriteLine(e);
- }
- }
-
- public void StopService()
- {
- Console.WriteLine(" Stopping Service...");
- _service.Close();
- Console.WriteLine("[DONE]");
- }
-
- public IUpperCase StartClient(Binding binding)
- {
- IUpperCase res = null;
- try
- {
- Console.WriteLine(" Starting Client...");
- fac = new ChannelFactory<IUpperCase>(binding, "soap.amqp:///UpperCase");
- fac.Open();
- res = fac.CreateChannel();
- Console.WriteLine("[DONE]");
- }
- catch (Exception e)
- {
- Console.WriteLine(e);
- }
- return res;
- }
-
- public void StopClient(IUpperCase client)
- {
- Console.WriteLine(" Stopping Client...");
- ((IChannel) client).Close();
- fac.Close();
- Console.WriteLine("[DONE]");
- }
-
- private static void Main(string[] args)
- {
- var p = new Program();
-
- Binding binding = new QpidBinding("192.168.1.14", 5673);
- p.StartService(binding);
-
-
- IUpperCase calc = p.StartClient(new QpidBinding("192.168.1.14", 5673));
-
- string[] messages = {"Twas brillig, and the slithy toves",
- "Did gire and gymble in the wabe. ",
- "All mimsy were the borogroves, ",
- "And the mome raths outgrabe. "};
- foreach (string m in messages)
- {
- Console.Write(m + " --UperCase--> " );
- Console.Write(calc.ToUpperCase(m));
- Console.WriteLine();
- }
-
- Console.ReadLine();
-
- p.StopClient(calc);
- p.StopService();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfRPC/Properties/AssemblyInfo.cs b/qpid/dotnet/client-010/wcf/demo/wcfRPC/Properties/AssemblyInfo.cs
deleted file mode 100644
index 703fb9fcea..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfRPC/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Qpid WCF UpperCase")]
-[assembly: AssemblyDescription("Built from svn revision number: ")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Apache Software Foundation")]
-[assembly: AssemblyProduct("Qpid WCF UpperCase")]
-[assembly: AssemblyCopyright("Apache Software Foundation")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("14ba3707-3fcc-4033-8bbc-0db65c5424f3")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyVersion("0.5.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfRPC/QpidBindingConfigurationElement.cs b/qpid/dotnet/client-010/wcf/demo/wcfRPC/QpidBindingConfigurationElement.cs
deleted file mode 100644
index 1d12868497..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfRPC/QpidBindingConfigurationElement.cs
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Reflection;
-using System.ServiceModel.Channels;
-using System.ServiceModel.Configuration;
-using System.Configuration;
-
-namespace org.apache.qpid.wcf.model
-{
-
- /// <remarks>
- /// This configuration element should be imported into the client
- /// and server configuration files to provide declarative configuration
- /// of a AMQP bound service.
- /// </remarks>
- public sealed class QpidBindingConfigurationElement : StandardBindingElement
- {
- /// <summary>
- /// Creates a new instance of the QpidBindingConfigurationElement
- /// Class initialized with values from the specified configuration.
- /// </summary>
- /// <param name="configurationName"></param>
- public QpidBindingConfigurationElement(string configurationName)
- : base(configurationName)
- {
- }
-
- /// <summary>
- /// Creates a new instance of the RabbitMQBindingConfigurationElement Class.
- /// </summary>
- public QpidBindingConfigurationElement()
- : this(null)
- {
- }
-
-
- protected override void InitializeFrom(Binding binding)
- {
- base.InitializeFrom(binding);
- QpidBinding qpidbinding = binding as QpidBinding;
- if (qpidbinding != null)
- {
- Host = qpidbinding.Host;
- OneWayOnly = qpidbinding.OneWayOnly;
- TransactionFlowEnabled = qpidbinding.TransactionFlow;
- VirtualHost = qpidbinding.VirtualHost;
- PortNumber = qpidbinding.PortNumber;
- UserName = qpidbinding.UserName;
- Password = qpidbinding.Password;
- }
- }
-
- protected override void OnApplyConfiguration(Binding binding)
- {
- if (binding == null)
- throw new ArgumentNullException("binding");
-
- var qpidbinding = binding as QpidBinding;
- if (qpidbinding == null)
- {
- throw new ArgumentException(
- string.Format("Invalid type for binding. Expected {0}, Passed: {1}",
- typeof(QpidBinding).AssemblyQualifiedName,
- binding.GetType().AssemblyQualifiedName));
- }
-
- qpidbinding.Host = Host;
- qpidbinding.OneWayOnly = OneWayOnly;
- qpidbinding.TransactionFlow = TransactionFlowEnabled;
- qpidbinding.Password = Password;
- qpidbinding.UserName = UserName;
- qpidbinding.VirtualHost = VirtualHost;
- qpidbinding.PortNumber = PortNumber;
- }
-
-
- /// <summary>
- /// Specifies the host that the binding should connect to.
- /// </summary>
- [ConfigurationProperty("host", DefaultValue = "localhost")]
- public string Host
- {
- get { return ((string) base["host"]); }
- set { base["host"] = value; }
- }
-
- /// <summary>
- /// Specifies the broker port number that the binding should connect to.
- /// </summary>
- [ConfigurationProperty("port", DefaultValue = "5672")]
- public int PortNumber
- {
- get { return (Convert.ToInt16(base["port"])); }
- set { base["port"] = value; }
- }
-
-
- /// <summary>
- /// Specifies whether or not the CompositeDuplex and ReliableSession
- /// binding elements are added to the channel stack.
- /// </summary>
- [ConfigurationProperty("oneWay", DefaultValue = false)]
- public bool OneWayOnly
- {
- get { return ((bool)base["oneWay"]); }
- set { base["oneWay"] = value; }
- }
-
- /// <summary>
- /// Password to use when authenticating with the broker
- /// </summary>
- [ConfigurationProperty("password", DefaultValue = "guest")]
- public string Password
- {
- get { return ((string)base["password"]); }
- set { base["password"] = value; }
- }
-
- /// <summary>
- /// Specifies whether or not WS-AtomicTransactions are supported by the binding
- /// </summary>
- [ConfigurationProperty("transactionFlow", DefaultValue = false)]
- public bool TransactionFlowEnabled
- {
- get { return ((bool)base["transactionFlow"]); }
- set { base["transactionFlow"] = value; }
- }
-
- /// <summary>
- /// The username to use when authenticating with the broker
- /// </summary>
- [ConfigurationProperty("username", DefaultValue = "guest")]
- public string UserName
- {
- get { return ((string)base["username"]); }
- set { base["username"] = value; }
- }
-
-
-
-
- /// <summary>
- /// The virtual host to access.
- /// </summary>
- [ConfigurationProperty("virtualHost", DefaultValue = "test")]
- public string VirtualHost
- {
- get { return ((string)base["virtualHost"]); }
- set { base["virtualHost"] = value; }
- }
-
- ///<summary>The security realm to use when calling IModel.AccessRequest</summary>
- [ConfigurationProperty("realm", DefaultValue = "plain")]
- public string Realm
- {
- get { return ((string)base["realm"]); }
- set { base["realm"] = value; }
- }
-
- protected override Type BindingElementType
- {
- get { return typeof(QpidBinding); }
- }
-
- protected override ConfigurationPropertyCollection Properties
- {
- get
- {
- ConfigurationPropertyCollection configProperties = base.Properties;
- foreach (PropertyInfo prop in this.GetType().GetProperties(BindingFlags.DeclaredOnly
- | BindingFlags.Public
- | BindingFlags.Instance))
- {
- foreach (ConfigurationPropertyAttribute attr in prop.GetCustomAttributes(typeof(ConfigurationPropertyAttribute), false))
- {
- configProperties.Add(
- new ConfigurationProperty(attr.Name, prop.PropertyType, attr.DefaultValue));
- }
- }
-
- return configProperties;
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfRPC/UpperCase.cs b/qpid/dotnet/client-010/wcf/demo/wcfRPC/UpperCase.cs
deleted file mode 100644
index 3e10926be4..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfRPC/UpperCase.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-using System.ServiceModel;
-
-namespace org.apache.qpid.wcf.demo.rpc
-{
- [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
- public sealed class UpperCase : IUpperCase
- {
- public string ToUpperCase(string message)
- {
- return message.ToUpper();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/demo/wcfRPC/wcfRPC.csproj b/qpid/dotnet/client-010/wcf/demo/wcfRPC/wcfRPC.csproj
deleted file mode 100644
index e8f7fee8f5..0000000000
--- a/qpid/dotnet/client-010/wcf/demo/wcfRPC/wcfRPC.csproj
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{C988F456-1025-486F-9BCD-49C0F83B91DB}</ProjectGuid>
- <OutputType>Exe</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>wcfRPC</RootNamespace>
- <AssemblyName>Qpid WCF UpperCase</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Drawing" />
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml.Linq">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data.DataSetExtensions">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="IUpperCase.cs" />
- <Compile Include="Program.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="UpperCase.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\wcf.csproj">
- <Project>{F1D80D9D-FE22-4213-A760-BFFDE7D131DD}</Project>
- <Name>wcf</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/qpid/dotnet/client-010/wcf/model/CommunicationOperation.cs b/qpid/dotnet/client-010/wcf/model/CommunicationOperation.cs
deleted file mode 100644
index 3506d6729c..0000000000
--- a/qpid/dotnet/client-010/wcf/model/CommunicationOperation.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.ServiceModel.Channels;
-
-namespace org.apache.qpid.wcf.model
-{
- internal delegate void CommunicationOperation(TimeSpan timeout);
- internal delegate TResult CommunicationOperation<TResult>(TimeSpan timeout);
- internal delegate TResult CommunicationOperation<TResult, TArg>(TimeSpan timeout, out TArg arg0);
- internal delegate void SendOperation(Message message, TimeSpan timeout);
-}
diff --git a/qpid/dotnet/client-010/wcf/model/QpidBinding.cs b/qpid/dotnet/client-010/wcf/model/QpidBinding.cs
deleted file mode 100644
index 8f4684c1a1..0000000000
--- a/qpid/dotnet/client-010/wcf/model/QpidBinding.cs
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System.Configuration;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-
-namespace org.apache.qpid.wcf.model
-{
- public sealed class QpidBinding : Binding
- {
- private string _host;
- private int _port;
- private string _username;
- private string _password;
- private string _virtuaHost;
- private readonly CompositeDuplexBindingElement _compositeDuplex;
- private readonly MessageEncodingBindingElement _encoding;
- private bool _oneWayOnly;
- private readonly ReliableSessionBindingElement _session;
- private readonly TransactionFlowBindingElement _transactionFlow;
- private bool _transactionsEnabled;
- private readonly QpidTransportBindingElement _transport;
-
-
-
- public QpidBinding() : this("localhost", 5672, "guest", "guest", "test")
- {
- }
-
-
- public QpidBinding(string host, int port ) : this (host, port, "guest", "guest", "test")
- {
- }
-
- public QpidBinding(string host, int port, string username, string password, string virtualhost)
- {
- Host = host;
- PortNumber = port;
- UserName = username;
- Password = password;
- VirtualHost = virtualhost;
- _transport = new QpidTransportBindingElement();
- _transport.Host = host;
- _transport.PortNumber = port;
- _transport.Password = password;
- _transport.UserName = username;
- _transport.VirtualHost = virtualhost;
- _encoding = new TextMessageEncodingBindingElement();
- _session = new ReliableSessionBindingElement();
- _compositeDuplex = new CompositeDuplexBindingElement();
- _transactionFlow = new TransactionFlowBindingElement();
- }
-
- public override BindingElementCollection CreateBindingElements()
- {
- var elements = new BindingElementCollection();
-
- if (_transactionsEnabled)
- {
- elements.Add(_transactionFlow);
- }
- if (!OneWayOnly)
- {
- elements.Add(_session);
- elements.Add(_compositeDuplex);
- }
- elements.Add(_encoding);
- elements.Add(_transport);
-
- return elements;
- }
-
-
-
- /// <summary>
- /// Gets the scheme used by the binding, soap.amqp
- /// </summary>
- public override string Scheme
- {
- get { return "soap.amqp"; }
- }
-
- /// <summary>
- /// Specifies the broker host
- /// </summary>
- [ConfigurationProperty("host")]
- public string Host
- {
- get { return _host; }
- set { _host = value; }
- }
-
- /// <summary>
- /// Specifies the broker port
- /// </summary>
- public int PortNumber
- {
- get { return _port; }
- set { _port = value; }
- }
-
- /// <summary>
- /// Specifies the username
- /// </summary>
- public string UserName
- {
- get { return _username; }
- set { _username = value; }
- }
-
- /// <summary>
- /// Specifies the password
- /// </summary>
- public string Password
- {
- get { return _password; }
- set { _password = value; }
- }
-
- /// <summary>
- /// Specifies the virtualhost
- /// </summary>
- public string VirtualHost
- {
- get { return _virtuaHost; }
- set { _virtuaHost = value; }
- }
-
-
- /// <summary>
- /// Gets the AMQP _transport binding element
- /// </summary>
- public QpidTransportBindingElement Transport
- {
- get { return _transport; }
- }
-
- /// <summary>
- /// Gets the reliable _session parameters for this binding instance
- /// </summary>
- public ReliableSession ReliableSession
- {
- get { return new ReliableSession(_session); }
- }
-
- /// <summary>
- /// Determines whether or not the TransactionFlowBindingElement will
- /// be added to the channel stack
- /// </summary>
- public bool TransactionFlow
- {
- get { return _transactionsEnabled; }
- set { _transactionsEnabled = value; }
- }
-
- /// <summary>
- /// Specifies whether or not the CompositeDuplex and ReliableSession
- /// binding elements are added to the channel stack.
- /// </summary>
- public bool OneWayOnly
- {
- get { return _oneWayOnly; }
- set { _oneWayOnly = value; }
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/wcf/model/QpidChannelBase.cs b/qpid/dotnet/client-010/wcf/model/QpidChannelBase.cs
deleted file mode 100644
index 174c28e108..0000000000
--- a/qpid/dotnet/client-010/wcf/model/QpidChannelBase.cs
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-
-namespace org.apache.qpid.wcf.model
-{
- internal abstract class QpidChannelBase : IChannel
- {
- private readonly CommunicationOperation _closeMethod;
- private readonly BindingContext _context;
- private readonly CommunicationOperation _openMethod;
- private CommunicationState _state;
-
- private QpidChannelBase()
- {
- _state = CommunicationState.Created;
- _closeMethod = Close;
- _openMethod = Open;
- }
-
- protected QpidChannelBase(BindingContext context)
- : this()
- {
- _context = context;
- }
-
- public abstract void Close(TimeSpan timeout);
-
- public abstract void Open(TimeSpan timeout);
-
- public virtual void Abort()
- {
- Close();
- }
-
- public virtual void Close()
- {
- Close(_context.Binding.CloseTimeout);
- }
-
- public virtual T GetProperty<T>() where T : class
- {
- return default(T);
- }
-
- public virtual void Open()
- {
- Open(_context.Binding.OpenTimeout);
- }
-
- #region Async Methods
-
- public virtual IAsyncResult BeginClose(TimeSpan timeout, AsyncCallback callback, object state)
- {
- return _closeMethod.BeginInvoke(timeout, callback, state);
- }
-
- public virtual IAsyncResult BeginClose(AsyncCallback callback, object state)
- {
- return _closeMethod.BeginInvoke(_context.Binding.CloseTimeout, callback, state);
- }
-
- public virtual IAsyncResult BeginOpen(TimeSpan timeout, AsyncCallback callback, object state)
- {
- return _openMethod.BeginInvoke(timeout, callback, state);
- }
-
- public virtual IAsyncResult BeginOpen(AsyncCallback callback, object state)
- {
- return _openMethod.BeginInvoke(_context.Binding.OpenTimeout, callback, state);
- }
-
- public virtual void EndClose(IAsyncResult result)
- {
- _closeMethod.EndInvoke(result);
- }
-
- public virtual void EndOpen(IAsyncResult result)
- {
- _openMethod.EndInvoke(result);
- }
-
- #endregion
-
- #region Event Raising Methods
-
- protected void OnOpening()
- {
- _state = CommunicationState.Opening;
- if (Opening != null)
- Opening(this, null);
- }
-
- protected void OnOpened()
- {
- _state = CommunicationState.Opened;
- if (Opened != null)
- Opened(this, null);
- }
-
- protected void OnClosing()
- {
- _state = CommunicationState.Closing;
- if (Closing != null)
- Closing(this, null);
- }
-
- protected void OnClosed()
- {
- _state = CommunicationState.Closed;
- if (Closed != null)
- Closed(this, null);
- }
-
- protected void OnFaulted()
- {
- _state = CommunicationState.Faulted;
- if (Faulted != null)
- Faulted(this, null);
- }
-
- #endregion
-
-
- public CommunicationState State
- {
- get { return _state; }
- }
-
- protected BindingContext Context
- {
- get { return _context; }
- }
-
-
- public event EventHandler Closed;
-
- public event EventHandler Closing;
-
- public event EventHandler Faulted;
-
- public event EventHandler Opened;
-
- public event EventHandler Opening;
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/model/QpidChannelFactory.cs b/qpid/dotnet/client-010/wcf/model/QpidChannelFactory.cs
deleted file mode 100644
index 84518cb1c3..0000000000
--- a/qpid/dotnet/client-010/wcf/model/QpidChannelFactory.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-using org.apache.qpid.client;
-
-namespace org.apache.qpid.wcf.model
-{
- public class QpidChannelFactory : ChannelFactoryBase<IOutputChannel>
- {
- private readonly BindingContext _context;
- private readonly CommunicationOperation _openMethod;
- private readonly QpidTransportBindingElement _bindingElement;
- private ClientSession _session;
-
- public QpidChannelFactory(BindingContext context)
- {
- _context = context;
- _openMethod = Open;
- _bindingElement = context.Binding.Elements.Find<QpidTransportBindingElement>();
- }
-
- protected override IOutputChannel OnCreateChannel(EndpointAddress address, Uri via)
- {
- return new QpidOutputChannel(_context, _session, address);
- }
-
- protected override IAsyncResult OnBeginOpen(TimeSpan timeout, AsyncCallback callback, object state)
- {
- return _openMethod.BeginInvoke(timeout, callback, state);
- }
-
- protected override void OnEndOpen(IAsyncResult result)
- {
- _openMethod.EndInvoke(result);
- }
-
- protected override void OnOpen(TimeSpan timeout)
- {
- _session = _bindingElement.Open(timeout.Milliseconds);
- }
-
- protected override void OnClose(TimeSpan timeout)
- {
- _bindingElement.Close();
- }
-
- protected override void OnAbort()
- {
- base.OnAbort();
- OnClose(_context.Binding.CloseTimeout);
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/model/QpidChannelListener.cs b/qpid/dotnet/client-010/wcf/model/QpidChannelListener.cs
deleted file mode 100644
index f776fce9a5..0000000000
--- a/qpid/dotnet/client-010/wcf/model/QpidChannelListener.cs
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-using org.apache.qpid.client;
-
-namespace org.apache.qpid.wcf.model
-{
- public sealed class QpidChannelListener : QpidChannelListenerBase<IInputChannel>
- {
-
- private IInputChannel _channel;
- private ClientSession _session;
-
- public QpidChannelListener(BindingContext context)
- : base(context)
- {
- _channel = null;
- _session = null;
- }
-
- protected override IInputChannel OnAcceptChannel(TimeSpan timeout)
- {
- // Since only one connection to a broker is required (even for communication
- // with multiple exchanges
- if (_channel != null)
- return null;
-
- _channel = new QpidInputChannel(Context, _session, new EndpointAddress(Uri.ToString()));
- _channel.Closed += ListenChannelClosed;
- return _channel;
- }
-
- protected override bool OnWaitForChannel(TimeSpan timeout)
- {
- return false;
- }
-
- protected override void OnOpen(TimeSpan timeout)
- {
- _session = _bindingElement.Open(timeout.Milliseconds);
- }
-
- protected override void OnClose(TimeSpan timeout)
- {
- if (_channel != null)
- {
- _channel.Close();
- _channel = null;
- }
- _bindingElement.Close();
- }
-
- private void ListenChannelClosed(object sender, EventArgs args)
- {
- Close();
- }
-}
-}
diff --git a/qpid/dotnet/client-010/wcf/model/QpidChannelListenerBase.cs b/qpid/dotnet/client-010/wcf/model/QpidChannelListenerBase.cs
deleted file mode 100644
index bdecb38c9d..0000000000
--- a/qpid/dotnet/client-010/wcf/model/QpidChannelListenerBase.cs
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.ServiceModel.Channels;
-using System.ServiceModel.Description;
-
-namespace org.apache.qpid.wcf.model
-{
- public abstract class QpidChannelListenerBase<TChannel> : ChannelListenerBase<TChannel> where TChannel: class, IChannel
- {
- private readonly Uri _listenUri;
- private readonly BindingContext _context;
- protected QpidTransportBindingElement _bindingElement;
- private readonly CommunicationOperation _closeMethod;
- private readonly CommunicationOperation _openMethod;
- private readonly CommunicationOperation<TChannel> _acceptChannelMethod;
- private readonly CommunicationOperation<bool> _waitForChannelMethod;
-
- protected QpidChannelListenerBase(BindingContext context)
- {
- _context = context;
- _bindingElement = context.Binding.Elements.Find<QpidTransportBindingElement>();
- _closeMethod = OnClose;
- _openMethod = OnOpen;
- _waitForChannelMethod = OnWaitForChannel;
- _acceptChannelMethod = OnAcceptChannel;
- if (context.ListenUriMode == ListenUriMode.Explicit && context.ListenUriBaseAddress != null)
- {
- _listenUri = new Uri(context.ListenUriBaseAddress, context.ListenUriRelativeAddress);
- }
- else
- {
- _listenUri = new Uri(new Uri("soap.amqp:///"), Guid.NewGuid().ToString());
- }
- }
-
- protected override void OnAbort()
- {
- OnClose(_context.Binding.CloseTimeout);
- }
-
- protected override IAsyncResult OnBeginAcceptChannel(TimeSpan timeout, AsyncCallback callback, object state)
- {
- return _acceptChannelMethod.BeginInvoke(timeout, callback, state);
- }
-
- protected override TChannel OnEndAcceptChannel(IAsyncResult result)
- {
- return _acceptChannelMethod.EndInvoke(result);
- }
-
- protected override IAsyncResult OnBeginWaitForChannel(TimeSpan timeout, AsyncCallback callback, object state)
- {
- return _waitForChannelMethod.BeginInvoke(timeout, callback, state);
- }
-
- protected override bool OnEndWaitForChannel(IAsyncResult result)
- {
- return _waitForChannelMethod.EndInvoke(result);
- }
-
- protected override IAsyncResult OnBeginClose(TimeSpan timeout, AsyncCallback callback, object state)
- {
- return _closeMethod.BeginInvoke(timeout, callback, state);
- }
-
- protected override IAsyncResult OnBeginOpen(TimeSpan timeout, AsyncCallback callback, object state)
- {
- return _openMethod.BeginInvoke(timeout, callback, state);
- }
-
- protected override void OnEndClose(IAsyncResult result)
- {
- _closeMethod.EndInvoke(result);
- }
-
- protected override void OnEndOpen(IAsyncResult result)
- {
- _openMethod.EndInvoke(result);
- }
-
- public override Uri Uri
- {
- get { return _listenUri; }
- }
-
- protected BindingContext Context
- {
- get { return _context; }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/model/QpidInputChannel.cs b/qpid/dotnet/client-010/wcf/model/QpidInputChannel.cs
deleted file mode 100644
index 7a05153df9..0000000000
--- a/qpid/dotnet/client-010/wcf/model/QpidInputChannel.cs
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-using System.Text;
-using System.Threading;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.wcf.model
-{
- internal sealed class QpidInputChannel : QpidInputChannelBase
- {
- private static readonly Logger _log = Logger.get(typeof (QpidInputChannel));
-
- private readonly QpidTransportBindingElement _bindingElement;
- private readonly MessageEncoder _encoder;
- private readonly ClientSession _session;
- private readonly string _queueName;
- private BlockingQueue _queue;
- private bool _closed = false;
-
- public QpidInputChannel(BindingContext context, ClientSession session, EndpointAddress address)
- : base(context, address)
- {
- _bindingElement = context.Binding.Elements.Find<QpidTransportBindingElement>();
- var encoderElem = context.BindingParameters.Find<MessageEncodingBindingElement>();
- if (encoderElem != null)
- {
- _encoder = encoderElem.CreateMessageEncoderFactory().Encoder;
- }
- _session = session;
- _queueName = address.Uri.ToString();
- _queue = new BlockingQueue();
- }
-
-
- public override System.ServiceModel.Channels.Message Receive(TimeSpan timeout)
- {
- _session.messageFlow("myDest", MessageCreditUnit.MESSAGE, 1);
- _session.sync();
- IMessage m = _queue.Dequeue();
- System.ServiceModel.Channels.Message result = null;
- if (m != null)
- {
- var reader = new BinaryReader(m.Body, Encoding.UTF8);
- var body = new byte[m.Body.Length - m.Body.Position];
- reader.Read(body, 0, body.Length);
- try
- {
- result = _encoder.ReadMessage(new MemoryStream(body),
- (int) _bindingElement.MaxReceivedMessageSize);
- }
- catch(Exception e)
- {
- Console.WriteLine(e.StackTrace);
- }
- result.Headers.To = LocalAddress.Uri;
-
- var ack = new RangeSet();
- // ack this message
- ack.add(m.Id);
- _session.messageAccept(ack);
- _session.sync();
- }
- else
- {
- if(! _closed )
- {
- return Receive(timeout);
- }
- }
- return result;
- }
-
- public override bool TryReceive(TimeSpan timeout, out System.ServiceModel.Channels.Message message)
- {
- message = Receive(timeout);
- return message != null;
- }
-
- public override bool WaitForMessage(TimeSpan timeout)
- {
- throw new NotImplementedException();
- }
-
- public override void Close(TimeSpan timeout)
- {
- _closed = true;
- _queue = null;
- }
-
- public override void Open(TimeSpan timeout)
- {
- if (State != CommunicationState.Created && State != CommunicationState.Closed)
- throw new InvalidOperationException(string.Format("Cannot open the channel from the {0} state.", State));
-
- OnOpening();
-
- var qr = (QueueQueryResult) _session.queueQuery(_queueName).Result;
- if (qr.getQueue() == null)
- {
- // create the queue
- _session.queueDeclare(_queueName, null, null);
- }
- // bind the queue
- _session.exchangeBind(_queueName, "amq.direct", _queueName, null);
- var myListener = new WCFListener(_queue);
- _session.attachMessageListener(myListener, "myDest");
- _session.messageSubscribe(_queueName, "myDest", MessageAcceptMode.EXPLICIT, MessageAcquireMode.PRE_ACQUIRED,
- null,
- 0, null);
- // issue credits
- _session.messageSetFlowMode("myDest", MessageFlowMode.WINDOW);
- _session.messageFlow("myDest", MessageCreditUnit.BYTE, ClientSession.MESSAGE_FLOW_MAX_BYTES);
- _session.sync();
-
- OnOpened();
- }
- }
-
- internal class WCFListener : IMessageListener
- {
- private static readonly Logger _log = Logger.get(typeof (WCFListener));
- private readonly BlockingQueue _q;
-
- public WCFListener(BlockingQueue q)
- {
- _q = q;
- }
-
- public void messageTransfer(IMessage m)
- {
- _log.debug("message received by listener");
- _q.Enqueue(m);
- }
- }
-
- internal class BlockingQueue
- {
- private int _count;
- private readonly Queue<IMessage> _queue = new Queue<IMessage>();
-
- public IMessage Dequeue(TimeSpan timeout)
- {
- lock (_queue)
- {
- DateTime start = DateTime.Now;
- long elapsed = 0;
- while (_count <= 0 && elapsed < timeout.Milliseconds)
- {
- Monitor.Wait(_queue, new TimeSpan(timeout.Milliseconds - elapsed));
- elapsed = DateTime.Now.Subtract(start).Milliseconds;
- }
- if (_count > 0)
- {
- _count--;
- return _queue.Dequeue();
- }
- return null;
- }
- }
-
- public IMessage Dequeue()
- {
- lock (_queue)
- {
- while (_count <= 0)
- {
- Monitor.Wait(_queue);
- }
- if (_count > 0)
- {
- _count--;
- return _queue.Dequeue();
- }
- return null;
- }
- }
-
- public void Enqueue(IMessage data)
- {
- if (data != null)
- {
- lock (_queue)
- {
- _queue.Enqueue(data);
- _count++;
- Monitor.Pulse(_queue);
- }
- }
- }
- }
-}
-
diff --git a/qpid/dotnet/client-010/wcf/model/QpidInputChannelBase.cs b/qpid/dotnet/client-010/wcf/model/QpidInputChannelBase.cs
deleted file mode 100644
index 0bd9e85c0a..0000000000
--- a/qpid/dotnet/client-010/wcf/model/QpidInputChannelBase.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-
-namespace org.apache.qpid.wcf.model
-{
- internal abstract class QpidInputChannelBase : QpidChannelBase, IInputChannel
- {
- private readonly EndpointAddress _localAddress;
- private readonly CommunicationOperation<Message> _receiveMethod;
- private readonly CommunicationOperation<bool, Message> _tryReceiveMethod;
- private readonly CommunicationOperation<bool> _waitForMessage;
-
-
- protected QpidInputChannelBase(BindingContext context, EndpointAddress localAddress)
- :base(context)
- {
- _localAddress = localAddress;
- _receiveMethod = Receive;
- _tryReceiveMethod = TryReceive;
- _waitForMessage = WaitForMessage;
- }
-
-
- #region Async Methods
- public virtual IAsyncResult BeginReceive(TimeSpan timeout, AsyncCallback callback, object state)
- {
- return _receiveMethod.BeginInvoke(timeout, callback, state);
- }
-
- public virtual IAsyncResult BeginReceive(AsyncCallback callback, object state)
- {
- return _receiveMethod.BeginInvoke(Context.Binding.ReceiveTimeout, callback, state);
- }
-
- public virtual IAsyncResult BeginTryReceive(TimeSpan timeout, AsyncCallback callback, object state)
- {
- Message message;
- return _tryReceiveMethod.BeginInvoke(timeout, out message, callback, state);
- }
-
- public virtual IAsyncResult BeginWaitForMessage(TimeSpan timeout, AsyncCallback callback, object state)
- {
- return _waitForMessage.BeginInvoke(timeout, callback, state);
- }
-
- public virtual Message EndReceive(IAsyncResult result)
- {
- return _receiveMethod.EndInvoke(result);
- }
-
- public virtual bool EndTryReceive(IAsyncResult result, out Message message)
- {
- return _tryReceiveMethod.EndInvoke(out message, result);
- }
-
- public virtual bool EndWaitForMessage(IAsyncResult result)
- {
- return _waitForMessage.EndInvoke(result);
- }
- #endregion
-
- public abstract Message Receive(TimeSpan timeout);
-
- public abstract bool TryReceive(TimeSpan timeout, out Message message);
-
- public abstract bool WaitForMessage(TimeSpan timeout);
-
- public virtual Message Receive()
- {
- return Receive(Context.Binding.ReceiveTimeout);
- }
-
-
- public EndpointAddress LocalAddress
- {
- get { return _localAddress; }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/model/QpidOutputChannel.cs b/qpid/dotnet/client-010/wcf/model/QpidOutputChannel.cs
deleted file mode 100644
index f53ed9b9b8..0000000000
--- a/qpid/dotnet/client-010/wcf/model/QpidOutputChannel.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.IO;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-using org.apache.qpid.client;
-using org.apache.qpid.transport;
-using org.apache.qpid.transport.util;
-
-namespace org.apache.qpid.wcf.model
-{
- internal sealed class QpidOutputChannel : QpidOutputChannelBase
- {
- private readonly MessageEncoder _encoder;
- private readonly ClientSession _session;
- private readonly string _queueName;
-
- public QpidOutputChannel(BindingContext context, ClientSession session, EndpointAddress address)
- : base(context, address)
- {
- var encoderElement = context.Binding.Elements.Find<MessageEncodingBindingElement>();
- if (encoderElement != null)
- {
- _encoder = encoderElement.CreateMessageEncoderFactory().Encoder;
- }
- _queueName = address.Uri.ToString();
- _session = session;
- }
-
- public override void Send(System.ServiceModel.Channels.Message message, TimeSpan timeout)
- {
- if (message.State != MessageState.Closed)
- {
- byte[] body;
- using (var str = new MemoryStream())
- {
- _encoder.WriteMessage(message, str);
- body = str.ToArray();
- }
- _session.messageTransfer("amq.direct", MessageAcceptMode.NONE, MessageAcquireMode.PRE_ACQUIRED,
- new Header(new DeliveryProperties().setRoutingKey(_queueName),
- new transport.MessageProperties().setMessageId(UUID.randomUUID())),
- body);
- }
- }
-
- public override void Close(TimeSpan timeout)
- {
- if (State == CommunicationState.Closed || State == CommunicationState.Closing)
- return; // Ignore the call, we're already closing.
- OnClosing();
- OnClosed();
- }
-
- public override void Open(TimeSpan timeout)
- {
- if (State != CommunicationState.Created && State != CommunicationState.Closed)
- throw new InvalidOperationException(string.Format("Cannot open the channel from the {0} state.", State));
- OnOpening();
- var qr = (QueueQueryResult) _session.queueQuery(_queueName).Result;
- if (qr.getQueue() == null)
- {
- // create the queue
- _session.queueDeclare(_queueName, null, null);
- }
- OnOpened();
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/model/QpidOutputChannelBase.cs b/qpid/dotnet/client-010/wcf/model/QpidOutputChannelBase.cs
deleted file mode 100644
index a3cd9020ff..0000000000
--- a/qpid/dotnet/client-010/wcf/model/QpidOutputChannelBase.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.ServiceModel;
-using System.ServiceModel.Channels;
-
-namespace org.apache.qpid.wcf.model
-{
- internal abstract class QpidOutputChannelBase : QpidChannelBase, IOutputChannel
- {
-
- private readonly SendOperation _sendMethod;
- private readonly EndpointAddress _address;
-
- protected QpidOutputChannelBase(BindingContext context, EndpointAddress address)
- : base(context)
- {
- _address = address;
- _sendMethod = Send;
- }
-
- #region Async Methods
-
- public IAsyncResult BeginSend(Message message, TimeSpan timeout, AsyncCallback callback, object state)
- {
- return _sendMethod.BeginInvoke(message, timeout, callback, state);
- }
-
- public IAsyncResult BeginSend(Message message, AsyncCallback callback, object state)
- {
- return _sendMethod.BeginInvoke(message, Context.Binding.SendTimeout, callback, state);
- }
-
- public void EndSend(IAsyncResult result)
- {
- _sendMethod.EndInvoke(result);
- }
-
- #endregion
-
- public abstract void Send(Message message, TimeSpan timeout);
-
- public virtual void Send(Message message)
- {
- Send(message, Context.Binding.SendTimeout);
- }
-
- public EndpointAddress RemoteAddress
- {
- get { return _address; }
- }
-
- public Uri Via
- {
- get { throw new NotImplementedException(); }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/model/QpidTransportBindingElement.cs b/qpid/dotnet/client-010/wcf/model/QpidTransportBindingElement.cs
deleted file mode 100644
index 50cc80422a..0000000000
--- a/qpid/dotnet/client-010/wcf/model/QpidTransportBindingElement.cs
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Configuration;
-using System.ServiceModel.Channels;
-using org.apache.qpid.client;
-
-namespace org.apache.qpid.wcf.model
-{
- public sealed class QpidTransportBindingElement : TransportBindingElement
- {
- private Client _connection;
- private string _host;
- private int _port;
- private string _username;
- private string _password;
- private string _virtuaHost;
-
- /// <summary>
- /// Creates a new instance of the QpidTransportBindingElement Class
- /// </summary>
- public QpidTransportBindingElement()
- {
- _host = "localhost";
- _port = 5672;
- _username = "guest";
- _password = "guest";
- _virtuaHost = "test";
- }
-
- private QpidTransportBindingElement(QpidTransportBindingElement other)
- : this()
- {
- Connection = other.Connection;
- Host = other.Host;
- PortNumber = other.PortNumber;
- UserName = other.UserName;
- Password = other.Password;
- }
-
-
- public override IChannelFactory<TChannel> BuildChannelFactory<TChannel>(BindingContext context)
- {
- if (Host == null)
- throw new InvalidOperationException("No broker was specified.");
- return (IChannelFactory<TChannel>) new QpidChannelFactory(context);
- }
-
- public override IChannelListener<TChannel> BuildChannelListener<TChannel>(BindingContext context)
- {
- if (Host == null)
- throw new InvalidOperationException("No broker was specified.");
-
- return (IChannelListener<TChannel>) ((object) new QpidChannelListener(context));
- }
-
- public override bool CanBuildChannelFactory<TChannel>(BindingContext context)
- {
- return typeof (TChannel) == typeof (IOutputChannel);
- }
-
- public override bool CanBuildChannelListener<TChannel>(BindingContext context)
- {
- return typeof (TChannel) == typeof (IInputChannel);
- }
-
- public override BindingElement Clone()
- {
- return new QpidTransportBindingElement(this);
- }
-
- public override T GetProperty<T>(BindingContext context)
- {
- return context.GetInnerProperty<T>();
- }
-
- /// <summary>
- /// Gets the scheme used by the binding, this is 0.10 as default for now.
- /// </summary>
- public override string Scheme
- {
- get { return "soap.amqp"; }
- }
-
-
- /// <summary>
- /// Specifies the broker host
- /// </summary>
- [ConfigurationProperty("host")]
- public string Host
- {
- get { return _host; }
- set { _host = value; }
- }
-
- /// <summary>
- /// Specifies the broker port
- /// </summary>
- public int PortNumber
- {
- get { return _port; }
- set { _port = value; }
- }
-
- /// <summary>
- /// Specifies the username
- /// </summary>
- public string UserName
- {
- get { return _username; }
- set { _username = value; }
- }
-
- /// <summary>
- /// Specifies the password
- /// </summary>
- public string Password
- {
- get { return _password; }
- set { _password = value; }
- }
-
- /// <summary>
- /// Specifies the virtualhost
- /// </summary>
- public string VirtualHost
- {
- get { return _virtuaHost; }
- set { _virtuaHost = value; }
- }
-
- /// <summary>
- /// Specifies the connection
- /// </summary>
- public Client Connection
- {
- get { return _connection; }
- set { _connection = value; }
- }
-
-
- internal ClientSession Open(long timeout)
- {
- if (Connection == null)
- {
- Connection = new Client();
- }
- Connection.connect(Host, PortNumber, VirtualHost, UserName, Password);
- return Connection.createSession(timeout);
- }
-
- internal void Close()
- {
- if (Connection != null)
- {
- try
- {
- Connection.close();
- }
- catch (Exception e)
- {
- // todo log it
- }
- }
- }
- }
-}
diff --git a/qpid/dotnet/client-010/wcf/model/QpidTransportElement.cs b/qpid/dotnet/client-010/wcf/model/QpidTransportElement.cs
deleted file mode 100644
index f531186148..0000000000
--- a/qpid/dotnet/client-010/wcf/model/QpidTransportElement.cs
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-
-using System;
-using System.Configuration;
-using System.Reflection;
-using System.ServiceModel.Channels;
-using System.ServiceModel.Configuration;
-
-namespace org.apache.qpid.wcf.model
-{
- public sealed class QpidTransportElement : TransportElement
- {
-
- public override void ApplyConfiguration(BindingElement bindingElement)
- {
- base.ApplyConfiguration(bindingElement);
- if (bindingElement == null)
- throw new ArgumentNullException("bindingElement");
-
- var bindind = bindingElement as QpidTransportBindingElement;
- if (bindind == null)
- {
- throw new ArgumentException(
- string.Format("Invalid type for binding. Expected {0}, Passed: {1}",
- typeof(QpidTransportBindingElement).AssemblyQualifiedName,
- bindingElement.GetType().AssemblyQualifiedName));
- }
-
- bindind.Host = Host;
- bindind.Password = Password;
- bindind.UserName = UserName;
- bindind.VirtualHost = VirtualHost;
- bindind.PortNumber = PortNumber;
- }
-
- public override void CopyFrom(ServiceModelExtensionElement from)
- {
- base.CopyFrom(from);
- var element = from as QpidTransportElement;
- if (element != null)
- {
- Host = element.Host;
- PortNumber = element.PortNumber;
- Password = element.Password;
- UserName = element.UserName;
- VirtualHost = element.VirtualHost;
- }
- }
-
- protected override BindingElement CreateBindingElement()
- {
- TransportBindingElement element = CreateDefaultBindingElement();
- ApplyConfiguration(element);
- return element;
- }
-
- protected override TransportBindingElement CreateDefaultBindingElement()
- {
- return new QpidTransportBindingElement();
- }
-
- protected override void InitializeFrom(BindingElement bindingElement)
- {
- base.InitializeFrom(bindingElement);
-
- if (bindingElement == null)
- throw new ArgumentNullException("bindingElement");
-
- var binding = bindingElement as QpidTransportBindingElement;
- if (binding == null)
- {
- throw new ArgumentException(
- string.Format("Invalid type for binding. Expected {0}, Passed: {1}",
- typeof(QpidTransportBindingElement).AssemblyQualifiedName,
- bindingElement.GetType().AssemblyQualifiedName));
- }
-
- Host = binding.Host;
- PortNumber = binding.PortNumber;
- Password = binding.Password;
- UserName = binding.UserName;
- VirtualHost = binding.VirtualHost;
- }
-
- public override Type BindingElementType
- {
- get { return typeof(QpidTransportElement); }
- }
-
-
-
- /// <summary>
- /// Specifies the broker host name that the binding should connect to.
- /// </summary>
- [ConfigurationProperty("host", DefaultValue = "localhost")]
- public string Host
- {
- get { return ((string) base["host"]); }
- set { base["host"] = value; }
- }
-
- /// <summary>
- /// Specifies the broker port number that the binding should connect to.
- /// </summary>
- [ConfigurationProperty("port", DefaultValue = "5672")]
- public int PortNumber
- {
- get { return (Convert.ToInt16(base["port"])); }
- set { base["port"] = value; }
- }
-
- /// <summary>
- /// Password to use when authenticating with the broker
- /// </summary>
- [ConfigurationProperty("password", DefaultValue = "guest")]
- public string Password
- {
- get { return ((string)base["password"]); }
- set { base["password"] = value; }
- }
-
- /// <summary>
- /// The username to use when authenticating with the broker
- /// </summary>
- [ConfigurationProperty("username", DefaultValue = "guest")]
- public string UserName
- {
- get { return ((string)base["username"]); }
- set { base["username"] = value; }
- }
-
-
- /// <summary>
- /// The virtual host to access.
- /// </summary>
- [ConfigurationProperty("virtualHost", DefaultValue = "test")]
- public string VirtualHost
- {
- get { return ((string)base["virtualHost"]); }
- set { base["virtualHost"] = value; }
- }
-
-
- protected override ConfigurationPropertyCollection Properties
- {
- get
- {
- ConfigurationPropertyCollection configProperties = base.Properties;
- foreach (PropertyInfo prop in GetType().GetProperties(BindingFlags.DeclaredOnly
- | BindingFlags.Public
- | BindingFlags.Instance))
- {
- foreach (ConfigurationPropertyAttribute attr in prop.GetCustomAttributes(typeof(ConfigurationPropertyAttribute), false))
- {
- configProperties.Add(
- new ConfigurationProperty(attr.Name, prop.PropertyType, attr.DefaultValue));
- }
- }
-
- return configProperties;
- }
- }
- }
-} \ No newline at end of file
diff --git a/qpid/dotnet/client-010/wcf/wcf.csproj b/qpid/dotnet/client-010/wcf/wcf.csproj
deleted file mode 100644
index f07c5ab1fd..0000000000
--- a/qpid/dotnet/client-010/wcf/wcf.csproj
+++ /dev/null
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{F1D80D9D-FE22-4213-A760-BFFDE7D131DD}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>WCF</RootNamespace>
- <AssemblyName>qpidWCFModel</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Qpid Client, Version=0.10.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\client\bin\Debug\Qpid Client.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="model\*.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/qpid/dotnet/client-010/wcf/wcf.sln b/qpid/dotnet/client-010/wcf/wcf.sln
deleted file mode 100644
index 8120f44576..0000000000
--- a/qpid/dotnet/client-010/wcf/wcf.sln
+++ /dev/null
@@ -1,70 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wcfHelloClient", "demo\wcfHelloClient\wcfHelloClient.csproj", "{A24E27DB-A38D-40C9-9879-8390B68C2F06}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wcfHelloServer", "demo\wcfHelloServer\wcfHelloServer.csproj", "{3EF848D7-5FAC-482C-922A-D4D45A4CCD2A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wcfRPC", "demo\wcfRPC\wcfRPC.csproj", "{C988F456-1025-486F-9BCD-49C0F83B91DB}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wcBookingClient", "demo\wcfBookingClient\wcBookingClient.csproj", "{4086B3FE-F745-4DCC-952A-682CAE01F4C9}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wcfBookingServer", "demo\wcfBookingServer\wcfBookingServer.csproj", "{B34E21C4-A742-4886-8569-1A89490E093E}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wcf", "wcf.csproj", "{F1D80D9D-FE22-4213-A760-BFFDE7D131DD}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A24E27DB-A38D-40C9-9879-8390B68C2F06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A24E27DB-A38D-40C9-9879-8390B68C2F06}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A24E27DB-A38D-40C9-9879-8390B68C2F06}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A24E27DB-A38D-40C9-9879-8390B68C2F06}.Release|Any CPU.Build.0 = Release|Any CPU
- {3EF848D7-5FAC-482C-922A-D4D45A4CCD2A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3EF848D7-5FAC-482C-922A-D4D45A4CCD2A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3EF848D7-5FAC-482C-922A-D4D45A4CCD2A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3EF848D7-5FAC-482C-922A-D4D45A4CCD2A}.Release|Any CPU.Build.0 = Release|Any CPU
- {C988F456-1025-486F-9BCD-49C0F83B91DB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C988F456-1025-486F-9BCD-49C0F83B91DB}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C988F456-1025-486F-9BCD-49C0F83B91DB}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C988F456-1025-486F-9BCD-49C0F83B91DB}.Release|Any CPU.Build.0 = Release|Any CPU
- {4086B3FE-F745-4DCC-952A-682CAE01F4C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4086B3FE-F745-4DCC-952A-682CAE01F4C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4086B3FE-F745-4DCC-952A-682CAE01F4C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4086B3FE-F745-4DCC-952A-682CAE01F4C9}.Release|Any CPU.Build.0 = Release|Any CPU
- {B34E21C4-A742-4886-8569-1A89490E093E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {B34E21C4-A742-4886-8569-1A89490E093E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {B34E21C4-A742-4886-8569-1A89490E093E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {B34E21C4-A742-4886-8569-1A89490E093E}.Release|Any CPU.Build.0 = Release|Any CPU
- {F1D80D9D-FE22-4213-A760-BFFDE7D131DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F1D80D9D-FE22-4213-A760-BFFDE7D131DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F1D80D9D-FE22-4213-A760-BFFDE7D131DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F1D80D9D-FE22-4213-A760-BFFDE7D131DD}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/qpid/dotnet/client-010/wcf/wcf.suo b/qpid/dotnet/client-010/wcf/wcf.suo
deleted file mode 100644
index 60339d33e4..0000000000
--- a/qpid/dotnet/client-010/wcf/wcf.suo
+++ /dev/null
Binary files differ
diff --git a/qpid/dotnet/default.build b/qpid/dotnet/default.build
deleted file mode 100644
index b038307623..0000000000
--- a/qpid/dotnet/default.build
+++ /dev/null
@@ -1,255 +0,0 @@
-<?xml version="1.0"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<project name="Qpid.NET" default="build">
-
- <!-- Determines the formatter to use to format output of test results. -->
- <property name="nant.formatter" value="Plain" />
-
- <!-- Determines whether a 'debug' or 'release' build is to be done. Defaults to 'debug' -->
- <property name="build.config" value="debug" />
-
- <!-- Sets build properties consistently accross all assemblies in the project. -->
- <property name="build.version.major" value="0"/>
- <property name="build.version.minor" value="5"/>
- <property name="build.version.build" value="0"/>
- <property name="build.version.revision" value="0"/>
- <property name="build.company" value="Apache Software Foundation"/>
- <property name="build.copyright" value="Apache Software Foundation"/>
- <property name="build.description" value="Built from svn revision number: "/>
-
- <!-- Fileset with build files for each 'core' assembly. -->
- <fileset id="src.builds">
- <include name="Qpid.Buffer/default.build" />
- <include name="Qpid.Sasl/default.build" />
- <include name="Qpid.Messaging/default.build" />
- <include name="Qpid.Codec/default.build" />
- <include name="Qpid.Common/default.build" />
- <include name="Qpid.Client/default.build" />
- </fileset>
-
- <!-- Fileset with build files for 'pure unit' test assemblies. -->
- <fileset id="tests.pure.builds">
- <include name="Qpid.Buffer.Tests/default.build" />
- <include name="Qpid.Sasl.Tests/default.build" />
- <include name="Qpid.Common.Tests/default.build" />
- <include name="Qpid.Client.Tests/default.build" />
- </fileset>
-
- <!-- Fileset with build files for 'integration' test assemblies. -->
- <fileset id="tests.integration.builds">
- <include name="Qpid.Integration.Tests/default.build" />
- </fileset>
-
- <!-- Other test or utility assemblies. -->
- <fileset id='other.builds'>
- <include name="TestClient/default.build" />
- <!-- Examples -->
- <include name="TopicListener/default.build" />
- <include name="TopicPublisher/default.build" />
- <include name="Consumer/default.build" />
- <include name="Producer/default.build" />
- </fileset>
-
- <!-- Prepare environment for a debug build. -->
- <target name="debug">
- <property name="build.debug" value="true" />
- <property name="build.defines" value="DEBUG;TRACE"/>
- </target>
-
- <!-- Prepare environment for a release build. -->
- <target name="release">
- <property name="build.debug" value="false" />
- <property name="build.defines" value=""/>
- </target>
-
- <!-- Prepare environment for build. -->
- <target name="init">
- <property name="base.dir" value="${project::get-base-directory()}" />
- <property name="build.dir" value="${base.dir}/bin/${framework::get-target-framework()}/${build.config}" />
- <call target="${build.config}" />
- </target>
-
- <!-- Cleans up the build output directory. -->
- <target name="clean" depends="init">
- <delete dir="${build.dir}" failonerror="false" />
- </target>
-
- <!-- Runs 'svnversion' to get the repository revision into the build property 'build.svnversion'. -->
- <target name="svnversion" description="Runs svnversion to get the current repository version into a build script property.">
- <exec program="svnversion" output="svnversion_tmp.txt">
- <arg value="-n"/>
- </exec>
-
- <loadfile file="svnversion_tmp.txt" property="build.svnversion"/>
- <delete file="svnversion_tmp.txt"/>
-
- <!-- For some competely retarted reason the '-n' parameter to svnversion doesn't really work under windows...
- Here is some code to strip the unwanted newlines. -->
- <script language="C#">
- <code><![CDATA[
- public static void ScriptMain(Project project)
- {
- project.Properties["build.svnversion"] = project.Properties["build.svnversion"].Trim("\n\r".ToCharArray());
- }
- ]]>
- </code>
- </script>
-
- </target>
-
- <!-- Performs a regex find-and-replace on assembly info files, substituting fields defined as build properties. -->
- <target name="setversion" description="Stamp the version info onto assemblyinfo.cs files" depends="svnversion">
-
- <echo>build.svnversion = ${build.svnversion}</echo>
-
- <foreach item="File" property="filename">
- <in>
- <items basedir=".">
- <include name="**\AssemblyInfo.cs"></include>
- </items>
- </in>
- <do>
- <script language="C#">
- <code><![CDATA[
- public static void ScriptMain(Project project)
- {
- // Read in the entire file to perform the substitution in.
- StreamReader reader = new StreamReader(project.Properties["filename"]);
- string contents = reader.ReadToEnd();
- reader.Close();
-
- // Substitute the version numbers.
- string replacement = string.Format("[assembly: AssemblyVersion(\"{0}.{1}.{2}.{3}\")]",
- project.Properties["build.version.major"],
- project.Properties["build.version.minor"],
- project.Properties["build.version.build"],
- project.Properties["build.version.revision"]);
- contents = System.Text.RegularExpressions.Regex.Replace(contents, @"\[assembly: AssemblyVersion\("".*""\)\]", replacement);
-
- // Substitute the company name and copyright.
- replacement = string.Format("[assembly: AssemblyCompany(\"{0}\")]",
- project.Properties["build.company"]);
- contents = System.Text.RegularExpressions.Regex.Replace(contents, @"\[assembly: AssemblyCompany\("".*""\)\]", replacement);
-
- replacement = string.Format("[assembly: AssemblyCopyright(\"{0}\")]",
- project.Properties["build.copyright"]);
- contents = System.Text.RegularExpressions.Regex.Replace(contents, @"\[assembly: AssemblyCopyright\("".*""\)\]", replacement);
-
- // Update the description.
- //replacement = string.Format("[assembly: AssemblyDescription(\"{0} {1}\")]",
- // project.Properties["build.description"],
- // project.Properties["build.svnversion"]);
- replacement = string.Format("[assembly: AssemblyDescription(\"{0}\")]",
- project.Properties["build.description"]);
- contents = System.Text.RegularExpressions.Regex.Replace(contents, @"\[assembly: AssemblyDescription\("".*""\)\]", replacement);
-
- // Write out the file with the substituted version.
- StreamWriter writer = new StreamWriter(project.Properties["filename"], false);
- writer.Write(contents);
- writer.Close();
- }
- ]]>
- </code>
- </script>
- </do>
- </foreach>
- </target>
-
- <!-- Do the build. -->
- <target name="build" depends="init, setversion">
- <echo message="Building all modules including tests."/>
-
- <!-- Make sure output folder exists. -->
- <mkdir dir="${build.dir}" />
-
- <!-- copy reference assemblies over to the output dir -->
- <copy todir="${build.dir}" file="Qpid.Common/lib/seclib-1.0.0/Org.Mentalis.Security.dll"/>
- <copy todir="${build.dir}" file="Qpid.Common/lib/log4net/log4net.dll"/>
- <copy todir="${build.dir}" file="Qpid.Client.Tests/lib/nunit/nunit.framework.dll"/>
-
- <!-- Compile assemblies. -->
- <nant target="build">
- <buildfiles refid="src.builds" />
- </nant>
-
- <!-- Compile test assemblies. -->
- <nant target="build">
- <buildfiles refid="tests.pure.builds" />
- </nant>
- <nant target="build">
- <buildfiles refid="tests.integration.builds" />
- </nant>
-
- <!-- Compile test assemblies. -->
- <nant target="build">
- <buildfiles refid="other.builds" />
- </nant>
- </target>
-
- <!-- Runs all 'pure unit' tests. -->
- <target name="test" depends="build">
- <echo message="Running all pure unit tests."/>
- <nant target="test">
- <buildfiles refid="tests.pure.builds" />
- </nant>
- </target>
-
- <!-- Runs all 'integration' tests. -->
- <target name="integrationtest" depends="build">
- <echo message="Running all integration tests."/>
- <nant target="test">
- <buildfiles refid="tests.integration.builds" />
- </nant>
- </target>
-
- <!-- Creates a release package. -->
- <target name="release-pkg">
- <echo message="Building and packaging a release."/>
-
- <call target="clean"/>
- <call target="build"/>
-
- <property name="build.date" value="${datetime::now()}"/>
- <property name="build.timestamp" value="${framework::get-target-framework()}-${datetime::get-year(build.date)}${datetime::get-month(build.date)}${datetime::get-day(build.date)}"/>
-
- <zip zipfile="${build.dir}/Qpid.NET-${build.timestamp}.zip">
- <fileset basedir="${build.dir}" prefix="Qpid.NET-${build.timestamp}">
- <include name="**/*.*"/>
- <exclude name="**/*.Tests.*"/>
- <exclude name="**/nunit.framework.dll"/>
- <exclude name="**/*.exe"/>
- </fileset>
-
- <fileset basedir="${base.dir}" prefix="Qpid.NET-${build.timestamp}">
- <include name="LICENSE.txt"/>
- <include name="NOTICE.txt"/>
- <include name="README.txt"/>
- <include name="RELEASE_NOTES.txt"/>
- <include name="DISCLAIMER"/>
- </fileset>
- </zip>
- </target>
-
-</project>
-
-
diff --git a/qpid/extras/qmf/src/py/qmf/console.py b/qpid/extras/qmf/src/py/qmf/console.py
index 291b9bcc5f..a3d17b9af1 100644
--- a/qpid/extras/qmf/src/py/qmf/console.py
+++ b/qpid/extras/qmf/src/py/qmf/console.py
@@ -107,8 +107,8 @@ class Console:
# BrokerURL
#===================================================================================================
class BrokerURL(URL):
- def __init__(self, text):
- URL.__init__(self, text)
+ def __init__(self, *args, **kwargs):
+ URL.__init__(self, *args, **kwargs)
if self.port is None:
if self.scheme == URL.AMQPS:
self.port = 5671
@@ -122,7 +122,7 @@ class BrokerURL(URL):
self.authPass = str(self.password)
def name(self):
- return self.host + ":" + str(self.port)
+ return str(self)
def match(self, host, port):
return socket.getaddrinfo(self.host, self.port)[0][4] == socket.getaddrinfo(host, port)[0][4]
@@ -645,7 +645,10 @@ class Session:
Will raise an exception if the session is not managing the connection and
the connection setup to the broker fails.
"""
- url = BrokerURL(target)
+ if isinstance(target, BrokerURL):
+ url = target
+ else:
+ url = BrokerURL(target)
broker = Broker(self, url.host, url.port, mechanisms, url.authName, url.authPass,
ssl = url.scheme == URL.AMQPS, connTimeout=timeout)
@@ -2346,18 +2349,19 @@ class Broker(Thread):
def getUrl(self):
""" """
- return "%s:%d" % (self.host, self.port)
+ return BrokerURL(host=self.host, port=self.port)
def getFullUrl(self, noAuthIfGuestDefault=True):
""" """
- ssl = ""
if self.ssl:
- ssl = "s"
- auth = "%s/%s@" % (self.authUser, self.authPass)
+ scheme = "amqps"
+ else:
+ scheme = "amqp"
if self.authUser == "" or \
(noAuthIfGuestDefault and self.authUser == "guest" and self.authPass == "guest"):
- auth = ""
- return "amqp%s://%s%s:%d" % (ssl, auth, self.host, self.port or 5672)
+ return BrokerURL(scheme=scheme, host=self.host, port=(self.port or 5672))
+ else:
+ return BrokerURL(scheme=scheme, user=self.authUser, password=self.authPass, host=self.host, port=(self.port or 5672))
def __repr__(self):
if self.connected:
diff --git a/qpid/gentools/build.xml b/qpid/gentools/build.xml
index 5d0976f56d..f6760a215e 100644
--- a/qpid/gentools/build.xml
+++ b/qpid/gentools/build.xml
@@ -25,7 +25,7 @@
<property name="java.target" value="1.5"/>
<target name="compile">
- <javac srcdir="${src}" source="${java.source}" target="${java.target}" fork="true" debug="on">
+ <javac srcdir="${src}" source="${java.source}" target="${java.target}" fork="true" debug="on" includeantruntime="false">
<classpath>
<fileset dir="${src}/../lib">
<include name="**/*.jar"/>
diff --git a/qpid/java/broker-plugins/access-control/MANIFEST.MF b/qpid/java/broker-plugins/access-control/MANIFEST.MF
index 1cd285ba20..78072850e4 100644
--- a/qpid/java/broker-plugins/access-control/MANIFEST.MF
+++ b/qpid/java/broker-plugins/access-control/MANIFEST.MF
@@ -35,6 +35,7 @@ Import-Package: org.apache.qpid,
org.apache.log4j;version=1.0.0,
javax.management;version=1.0.0,
javax.management.openmbean;version=1.0.0,
+ javax.security.auth;version=1.0.0,
org.osgi.util.tracker;version=1.0.0,
org.osgi.framework;version=1.3
Private-Package: org.apache.qpid.server.security.access.config,
diff --git a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleSet.java b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleSet.java
index ebc73440ed..78355a7501 100644
--- a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleSet.java
+++ b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/config/RuleSet.java
@@ -18,20 +18,24 @@
*/
package org.apache.qpid.server.security.access.config;
+import java.security.Principal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.EnumMap;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.SortedMap;
import java.util.TreeMap;
import java.util.WeakHashMap;
+import javax.security.auth.Subject;
+
import org.apache.commons.lang.BooleanUtils;
import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
import org.apache.qpid.exchange.ExchangeDefaults;
import org.apache.qpid.server.logging.actors.CurrentActor;
import org.apache.qpid.server.security.Result;
@@ -45,147 +49,132 @@ import org.apache.qpid.server.security.access.logging.AccessControlMessages;
* Models the rule configuration for the access control plugin.
*
* The access control rule definitions are loaded from an external configuration file, passed in as the
- * target to the {@link load(ConfigurationFile)} method. The file specified
+ * target to the {@link load(ConfigurationFile)} method. The file specified
*/
public class RuleSet
{
- private static final Logger _logger = Logger.getLogger(RuleSet.class);
-
private static final String AT = "@";
- private static final String SLASH = "/";
+ private static final String SLASH = "/";
- public static final String DEFAULT_ALLOW = "defaultallow";
- public static final String DEFAULT_DENY = "defaultdeny";
- public static final String TRANSITIVE = "transitive";
- public static final String EXPAND = "expand";
+ public static final String DEFAULT_ALLOW = "defaultallow";
+ public static final String DEFAULT_DENY = "defaultdeny";
+ public static final String TRANSITIVE = "transitive";
+ public static final String EXPAND = "expand";
public static final String AUTONUMBER = "autonumber";
public static final String CONTROLLED = "controlled";
public static final String VALIDATE = "validate";
-
+
public static final List<String> CONFIG_PROPERTIES = Arrays.asList(
DEFAULT_ALLOW, DEFAULT_DENY, TRANSITIVE, EXPAND, AUTONUMBER, CONTROLLED
);
-
+
private static final Integer _increment = 10;
-
- private final Map<String, List<String>> _groups = new HashMap<String, List<String>>();
+
+ private final Map<String, List<String>> _aclGroups = new HashMap<String, List<String>>();
private final SortedMap<Integer, Rule> _rules = new TreeMap<Integer, Rule>();
- private final Map<String, Map<Operation, Map<ObjectType, List<Rule>>>> _cache =
- new WeakHashMap<String, Map<Operation, Map<ObjectType, List<Rule>>>>();
+ private final Map<Subject, Map<Operation, Map<ObjectType, List<Rule>>>> _cache =
+ new WeakHashMap<Subject, Map<Operation, Map<ObjectType, List<Rule>>>>();
private final Map<String, Boolean> _config = new HashMap<String, Boolean>();
-
+
public RuleSet()
{
// set some default configuration properties
configure(DEFAULT_DENY, Boolean.TRUE);
configure(TRANSITIVE, Boolean.TRUE);
}
-
+
/**
- * Clear the contents, invluding groups, rules and configuration.
+ * Clear the contents, including acl groups, rules and configuration.
*/
public void clear()
{
_rules.clear();
_cache.clear();
_config.clear();
- _groups.clear();
+ _aclGroups.clear();
}
-
+
public int getRuleCount()
{
return _rules.size();
}
-
- /**
- * Filtered rules list based on an identity and operation.
- *
- * Allows only enabled rules with identity equal to all, the same, or a group with identity as a member,
- * and operation is either all or the same operation.
- */
- public List<Rule> getRules(String identity, Operation operation, ObjectType objectType)
- {
- // Lookup identity in cache and create empty operation map if required
- Map<Operation, Map<ObjectType, List<Rule>>> operations = _cache.get(identity);
- if (operations == null)
- {
- operations = new EnumMap<Operation, Map<ObjectType, List<Rule>>>(Operation.class);
- _cache.put(identity, operations);
- }
-
- // Lookup operation and create empty object type map if required
- Map<ObjectType, List<Rule>> objects = operations.get(operation);
- if (objects == null)
- {
- objects = new EnumMap<ObjectType, List<Rule>>(ObjectType.class);
- operations.put(operation, objects);
- }
+
+ /**
+ * Filtered rules list based on a subject and operation.
+ *
+ * Allows only enabled rules with identity equal to all, the same, or a group with identity as a member,
+ * and operation is either all or the same operation.
+ */
+ public List<Rule> getRules(final Subject subject, final Operation operation, final ObjectType objectType)
+ {
+ final Map<ObjectType, List<Rule>> objects = getObjectToRuleCache(subject, operation);
// Lookup object type rules for the operation
if (!objects.containsKey(objectType))
{
+ final Set<Principal> principals = subject.getPrincipals();
boolean controlled = false;
List<Rule> filtered = new LinkedList<Rule>();
for (Rule rule : _rules.values())
{
+ final Action ruleAction = rule.getAction();
if (rule.isEnabled()
- && (rule.getAction().getOperation() == Operation.ALL || rule.getAction().getOperation() == operation)
- && (rule.getAction().getObjectType() == ObjectType.ALL || rule.getAction().getObjectType() == objectType))
+ && (ruleAction.getOperation() == Operation.ALL || ruleAction.getOperation() == operation)
+ && (ruleAction.getObjectType() == ObjectType.ALL || ruleAction.getObjectType() == objectType))
{
controlled = true;
- if (rule.getIdentity().equalsIgnoreCase(Rule.ALL)
- || rule.getIdentity().equalsIgnoreCase(identity)
- || (_groups.containsKey(rule.getIdentity()) && _groups.get(rule.getIdentity()).contains(identity)))
+ if (isRelevant(principals,rule))
{
filtered.add(rule);
}
}
}
-
+
// Return null if there are no rules at all for this operation and object type
if (filtered.isEmpty() && controlled == false)
{
filtered = null;
}
-
+
// Save the rules we selected
objects.put(objectType, filtered);
}
-
+
// Return the cached rules
- return objects.get(objectType);
- }
-
+ return objects.get(objectType);
+ }
+
+
public boolean isValidNumber(Integer number)
{
return !_rules.containsKey(number);
}
-
+
public void grant(Integer number, String identity, Permission permission, Operation operation)
{
Action action = new Action(operation);
addRule(number, identity, permission, action);
}
-
+
public void grant(Integer number, String identity, Permission permission, Operation operation, ObjectType object, ObjectProperties properties)
{
Action action = new Action(operation, object, properties);
addRule(number, identity, permission, action);
}
-
+
public boolean ruleExists(String identity, Action action)
{
- for (Rule rule : _rules.values())
- {
- if (rule.getIdentity().equals(identity) && rule.getAction().equals(action))
- {
- return true;
- }
- }
- return false;
+ for (Rule rule : _rules.values())
+ {
+ if (rule.getIdentity().equals(identity) && rule.getAction().equals(action))
+ {
+ return true;
+ }
+ }
+ return false;
}
-
+
private Permission noLog(Permission permission)
{
switch (permission)
@@ -203,15 +192,17 @@ public class RuleSet
// TODO make this work when group membership is not known at file parse time
public void addRule(Integer number, String identity, Permission permission, Action action)
{
- if (!action.isAllowed())
- {
- throw new IllegalArgumentException("Action is not allowd: " + action);
- }
+ _cache.clear();
+
+ if (!action.isAllowed())
+ {
+ throw new IllegalArgumentException("Action is not allowd: " + action);
+ }
if (ruleExists(identity, action))
{
return;
}
-
+
// expand actions - possibly multiply number by
if (isSet(EXPAND))
{
@@ -234,8 +225,8 @@ public class RuleSet
return;
}
}
-
- // transitive action dependencies
+
+ // transitive action dependencies
if (isSet(TRANSITIVE))
{
if (action.getOperation() == Operation.CREATE && action.getObjectType() == ObjectType.QUEUE)
@@ -244,10 +235,10 @@ public class RuleSet
exchProperties.setName(ExchangeDefaults.DEFAULT_EXCHANGE_NAME);
exchProperties.put(ObjectProperties.Property.ROUTING_KEY, action.getProperties().get(ObjectProperties.Property.NAME));
addRule(null, identity, noLog(permission), new Action(Operation.BIND, ObjectType.EXCHANGE, exchProperties));
- if (action.getProperties().isSet(ObjectProperties.Property.AUTO_DELETE))
- {
- addRule(null, identity, noLog(permission), new Action(Operation.DELETE, ObjectType.QUEUE, action.getProperties()));
- }
+ if (action.getProperties().isSet(ObjectProperties.Property.AUTO_DELETE))
+ {
+ addRule(null, identity, noLog(permission), new Action(Operation.DELETE, ObjectType.QUEUE, action.getProperties()));
+ }
}
else if (action.getOperation() == Operation.DELETE && action.getObjectType() == ObjectType.QUEUE)
{
@@ -261,9 +252,9 @@ public class RuleSet
addRule(null, identity, noLog(permission), new Action(Operation.ACCESS, ObjectType.VIRTUALHOST));
}
}
-
+
// set rule number if needed
- Rule rule = new Rule(number, identity, action, permission);
+ Rule rule = new Rule(number, identity, action, permission);
if (rule.getNumber() == null)
{
if (_rules.isEmpty())
@@ -275,34 +266,36 @@ public class RuleSet
rule.setNumber(_rules.lastKey() + _increment);
}
}
-
+
// save rule
_cache.remove(identity);
_rules.put(rule.getNumber(), rule);
- }
-
+ }
+
public void enableRule(int ruleNumber)
{
_rules.get(Integer.valueOf(ruleNumber)).enable();
}
-
+
public void disableRule(int ruleNumber)
{
_rules.get(Integer.valueOf(ruleNumber)).disable();
}
-
+
public boolean addGroup(String group, List<String> constituents)
{
- if (_groups.containsKey(group))
+ _cache.clear();
+
+ if (_aclGroups.containsKey(group))
{
// cannot redefine
return false;
}
else
{
- _groups.put(group, new ArrayList<String>());
+ _aclGroups.put(group, new ArrayList<String>());
}
-
+
for (String name : constituents)
{
if (name.equalsIgnoreCase(group))
@@ -310,17 +303,17 @@ public class RuleSet
// recursive definition
return false;
}
-
+
if (!checkName(name))
{
// invalid name
return false;
}
-
- if (_groups.containsKey(name))
+
+ if (_aclGroups.containsKey(name))
{
// is a group
- _groups.get(group).addAll(_groups.get(name));
+ _aclGroups.get(group).addAll(_aclGroups.get(name));
}
else
{
@@ -330,12 +323,12 @@ public class RuleSet
// invalid username
return false;
}
- _groups.get(group).add(name);
+ _aclGroups.get(group).add(name);
}
}
return true;
}
-
+
/** Return true if the name is well-formed (contains legal characters). */
protected boolean checkName(String name)
{
@@ -349,79 +342,79 @@ public class RuleSet
}
return true;
}
-
+
/** Returns true if a username has the name[@domain][/realm] format */
protected boolean isvalidUserName(String name)
- {
- // check for '@' and '/' in namne
- int atPos = name.indexOf(AT);
- int slashPos = name.indexOf(SLASH);
- boolean atFound = atPos != StringUtils.INDEX_NOT_FOUND && atPos == name.lastIndexOf(AT);
- boolean slashFound = slashPos != StringUtils.INDEX_NOT_FOUND && slashPos == name.lastIndexOf(SLASH);
-
- // must be at least one character after '@' or '/'
- if (atFound && atPos > name.length() - 2)
- {
- return false;
- }
- if (slashFound && slashPos > name.length() - 2)
- {
- return false;
- }
-
- // must be at least one character between '@' and '/'
- if (atFound && slashFound)
- {
- return (atPos < (slashPos - 1));
- }
-
- // otherwise all good
- return true;
+ {
+ // check for '@' and '/' in namne
+ int atPos = name.indexOf(AT);
+ int slashPos = name.indexOf(SLASH);
+ boolean atFound = atPos != StringUtils.INDEX_NOT_FOUND && atPos == name.lastIndexOf(AT);
+ boolean slashFound = slashPos != StringUtils.INDEX_NOT_FOUND && slashPos == name.lastIndexOf(SLASH);
+
+ // must be at least one character after '@' or '/'
+ if (atFound && atPos > name.length() - 2)
+ {
+ return false;
+ }
+ if (slashFound && slashPos > name.length() - 2)
+ {
+ return false;
+ }
+
+ // must be at least one character between '@' and '/'
+ if (atFound && slashFound)
+ {
+ return (atPos < (slashPos - 1));
+ }
+
+ // otherwise all good
+ return true;
}
- // C++ broker authorise function prototype
+ // C++ broker authorise function prototype
// virtual bool authorise(const std::string& id, const Action& action, const ObjectType& objType,
- // const std::string& name, std::map<Property, std::string>* params=0);
-
- // Possibly add a String name paramater?
+ // const std::string& name, std::map<Property, std::string>* params=0);
+
+ // Possibly add a String name paramater?
/**
* Check the authorisation granted to a particular identity for an operation on an object type with
* specific properties.
*
- * Looks up the entire ruleset, whcih may be cached, for the user and operation and goes through the rules
+ * Looks up the entire ruleset, which may be cached, for the user and operation and goes through the rules
* in order to find the first one that matches. Either defers if there are no rules, returns the result of
* the first match found, or denies access if there are no matching rules. Normally, it would be expected
* to have a default deny or allow rule at the end of an access configuration however.
*/
- public Result check(String identity, Operation operation, ObjectType objectType, ObjectProperties properties)
+ public Result check(Subject subject, Operation operation, ObjectType objectType, ObjectProperties properties)
{
// Create the action to check
Action action = new Action(operation, objectType, properties);
- // get the list of rules relevant for this request
- List<Rule> rules = getRules(identity, operation, objectType);
- if (rules == null)
- {
- if (isSet(CONTROLLED))
- {
- // Abstain if there are no rules for this operation
+ // get the list of rules relevant for this request
+ List<Rule> rules = getRules(subject, operation, objectType);
+ if (rules == null)
+ {
+ if (isSet(CONTROLLED))
+ {
+ // Abstain if there are no rules for this operation
return Result.ABSTAIN;
- }
- else
- {
- return getDefault();
- }
- }
-
- // Iterate through a filtered set of rules dealing with this identity and operation
+ }
+ else
+ {
+ return getDefault();
+ }
+ }
+
+ // Iterate through a filtered set of rules dealing with this identity and operation
for (Rule current : rules)
- {
- // Check if action matches
+ {
+ // Check if action matches
if (action.matches(current.getAction()))
{
Permission permission = current.getPermission();
-
+
switch (permission)
{
case ALLOW_LOG:
@@ -439,15 +432,15 @@ public class RuleSet
return Result.DENIED;
}
}
-
+
// Defer to the next plugin of this type, if it exists
- return Result.DEFER;
+ return Result.DEFER;
}
-
- /** Default deny. */
- public Result getDefault()
- {
- if (isSet(DEFAULT_ALLOW))
+
+ /** Default deny. */
+ public Result getDefault()
+ {
+ if (isSet(DEFAULT_ALLOW))
{
return Result.ALLOWED;
}
@@ -456,19 +449,19 @@ public class RuleSet
return Result.DENIED;
}
return Result.ABSTAIN;
- }
-
- /**
- * Check if a configuration property is set.
- */
- protected boolean isSet(String key)
- {
- return BooleanUtils.isTrue(_config.get(key));
- }
+ }
+
+ /**
+ * Check if a configuration property is set.
+ */
+ protected boolean isSet(String key)
+ {
+ return BooleanUtils.isTrue(_config.get(key));
+ }
/**
* Configure properties for the plugin instance.
- *
+ *
* @param properties
*/
public void configure(Map<String, Boolean> properties)
@@ -478,7 +471,7 @@ public class RuleSet
/**
* Configure a single property for the plugin instance.
- *
+ *
* @param key
* @param value
*/
@@ -486,4 +479,48 @@ public class RuleSet
{
_config.put(key, value);
}
+
+ private boolean isRelevant(final Set<Principal> principals, final Rule rule)
+ {
+ if (rule.getIdentity().equalsIgnoreCase(Rule.ALL))
+ {
+ return true;
+ }
+ else
+ {
+ for (Iterator<Principal> iterator = principals.iterator(); iterator.hasNext();)
+ {
+ final Principal principal = iterator.next();
+
+ if (rule.getIdentity().equalsIgnoreCase(principal.getName())
+ || (_aclGroups.containsKey(rule.getIdentity()) && _aclGroups.get(rule.getIdentity()).contains(principal.getName())))
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ private Map<ObjectType, List<Rule>> getObjectToRuleCache(final Subject subject, final Operation operation)
+ {
+ // Lookup identity in cache and create empty operation map if required
+ Map<Operation, Map<ObjectType, List<Rule>>> operations = _cache.get(subject);
+ if (operations == null)
+ {
+ operations = new EnumMap<Operation, Map<ObjectType, List<Rule>>>(Operation.class);
+ _cache.put(subject, operations);
+ }
+
+ // Lookup operation and create empty object type map if required
+ Map<ObjectType, List<Rule>> objects = operations.get(operation);
+ if (objects == null)
+ {
+ objects = new EnumMap<ObjectType, List<Rule>>(ObjectType.class);
+ operations.put(operation, objects);
+ }
+ return objects;
+ }
+
}
diff --git a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControl.java b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControl.java
index 69cfa173bd..a7b3059262 100644
--- a/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControl.java
+++ b/qpid/java/broker-plugins/access-control/src/main/java/org/apache/qpid/server/security/access/plugins/AccessControl.java
@@ -20,7 +20,7 @@
*/
package org.apache.qpid.server.security.access.plugins;
-import java.security.Principal;
+import javax.security.auth.Subject;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.log4j.Logger;
@@ -89,20 +89,19 @@ public class AccessControl extends AbstractPlugin
/**
* Check if an operation is authorised by asking the configuration object about the access
- * control rules granted to the current thread's {@link Principal}. If there is no current
+ * control rules granted to the current thread's {@link Subject}. If there is no current
* user the plugin will abstain.
*/
public Result authorise(Operation operation, ObjectType objectType, ObjectProperties properties)
{
- Principal principal = SecurityManager.getThreadPrincipal();
-
- // Abstain if there is no user associated with this thread
- if (principal == null)
+ final Subject subject = SecurityManager.getThreadSubject();
+ // Abstain if there is no subject/principal associated with this thread
+ if (subject == null || subject.getPrincipals().size() == 0)
{
return Result.ABSTAIN;
}
-
- return _ruleSet.check(principal.getName(), operation, objectType, properties);
+
+ return _ruleSet.check(subject, operation, objectType, properties);
}
public void configure(ConfigurationPlugin config)
diff --git a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/AccessControlTest.java b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/AccessControlTest.java
index 309a3aeb2c..09d26e5451 100644
--- a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/AccessControlTest.java
+++ b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/AccessControlTest.java
@@ -1,195 +1,172 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
*/
package org.apache.qpid.server.security.access.plugins;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileWriter;
-import java.io.PrintWriter;
+import java.util.Arrays;
import junit.framework.TestCase;
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.qpid.server.security.access.config.ConfigurationFile;
-import org.apache.qpid.server.security.access.config.PlainConfiguration;
+import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin;
+import org.apache.qpid.server.logging.UnitTestMessageLogger;
+import org.apache.qpid.server.logging.actors.CurrentActor;
+import org.apache.qpid.server.logging.actors.TestLogActor;
+import org.apache.qpid.server.security.Result;
+import org.apache.qpid.server.security.SecurityManager;
+import org.apache.qpid.server.security.access.ObjectProperties;
+import org.apache.qpid.server.security.access.ObjectType;
+import org.apache.qpid.server.security.access.Operation;
+import org.apache.qpid.server.security.access.Permission;
+import org.apache.qpid.server.security.access.config.Rule;
import org.apache.qpid.server.security.access.config.RuleSet;
+import org.apache.qpid.server.security.auth.sasl.TestPrincipalUtils;
/**
- * These tests check that the ACL file parsing works correctly.
+ * Unit test for ACL V2 plugin.
+ *
+ * This unit test tests the AccessControl class and it collaboration with {@link RuleSet},
+ * {@link SecurityManager} and {@link CurrentActor}. The ruleset is configured programmatically,
+ * rather than from an external file.
*
- * For each message that can be returned in a {@link ConfigurationException}, an ACL file is created that should trigger this
- * particular message.
+ * @see RuleSetTest
*/
public class AccessControlTest extends TestCase
{
- public void writeACLConfig(String...aclData) throws Exception
+ private AccessControl _plugin = null; // Class under test
+ private final UnitTestMessageLogger messageLogger = new UnitTestMessageLogger();
+
+ protected void setUp() throws Exception
{
- File acl = File.createTempFile(getClass().getName() + getName(), "acl");
- acl.deleteOnExit();
-
- // Write ACL file
- PrintWriter aclWriter = new PrintWriter(new FileWriter(acl));
- for (String line : aclData)
- {
- aclWriter.println(line);
- }
- aclWriter.close();
+ super.setUp();
- // Load ruleset
- ConfigurationFile configFile = new PlainConfiguration(acl);
- RuleSet ruleSet = configFile.load();
- }
+ final RuleSet rs = new RuleSet();
+ rs.addGroup("aclGroup1", Arrays.asList(new String[] {"member1", "member2"}));
- public void testMissingACLConfig() throws Exception
- {
- try
- {
- // Load ruleset
- ConfigurationFile configFile = new PlainConfiguration(new File("doesnotexist"));
- RuleSet ruleSet = configFile.load();
-
- fail("fail");
- }
- catch (ConfigurationException ce)
- {
- assertEquals(String.format(PlainConfiguration.CONFIG_NOT_FOUND_MSG, "doesnotexist"), ce.getMessage());
- assertTrue(ce.getCause() instanceof FileNotFoundException);
- assertEquals("doesnotexist (No such file or directory)", ce.getCause().getMessage());
- }
- }
+ // Rule expressed with username
+ rs.grant(0, "user1", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ // Rule expressed with a acl group
+ rs.grant(1, "aclGroup1", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ // Rule expressed with an external group
+ rs.grant(2, "extGroup1", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ // Catch all rule
+ rs.grant(3, Rule.ALL, Permission.DENY_LOG, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
- public void testACLFileSyntaxContinuation() throws Exception
- {
- try
- {
- writeACLConfig("ACL ALLOW ALL \\ ALL");
- fail("fail");
- }
- catch (ConfigurationException ce)
- {
- assertEquals(String.format(PlainConfiguration.PREMATURE_CONTINUATION_MSG, 1), ce.getMessage());
- }
- }
+ _plugin = (AccessControl) AccessControl.FACTORY.newInstance(createConfiguration(rs));
- public void testACLFileSyntaxTokens() throws Exception
- {
- try
- {
- writeACLConfig("ACL unparsed ALL ALL");
- fail("fail");
- }
- catch (ConfigurationException ce)
- {
- assertEquals(String.format(PlainConfiguration.PARSE_TOKEN_FAILED_MSG, 1), ce.getMessage());
- assertTrue(ce.getCause() instanceof IllegalArgumentException);
- assertEquals("Not a valid permission: unparsed", ce.getCause().getMessage());
- }
+ SecurityManager.setThreadSubject(null);
+
+ CurrentActor.set(new TestLogActor(messageLogger));
}
- public void testACLFileSyntaxNotEnoughGroup() throws Exception
+ protected void tearDown() throws Exception
{
- try
- {
- writeACLConfig("GROUP blah");
- fail("fail");
- }
- catch (ConfigurationException ce)
- {
- assertEquals(String.format(PlainConfiguration.NOT_ENOUGH_GROUP_MSG, 1), ce.getMessage());
- }
+ super.tearDown();
+ SecurityManager.setThreadSubject(null);
}
- public void testACLFileSyntaxNotEnoughACL() throws Exception
+ /**
+ * ACL plugin must always abstain if there is no subject attached to the thread.
+ */
+ public void testNoSubjectAlwaysAbstains()
{
- try
- {
- writeACLConfig("ACL ALLOW");
- fail("fail");
- }
- catch (ConfigurationException ce)
- {
- assertEquals(String.format(PlainConfiguration.NOT_ENOUGH_ACL_MSG, 1), ce.getMessage());
- }
+ SecurityManager.setThreadSubject(null);
+
+ final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ assertEquals(Result.ABSTAIN, result);
}
- public void testACLFileSyntaxNotEnoughConfig() throws Exception
+ /**
+ * Tests that an allow rule expressed with a username allows an operation performed by a thread running
+ * with the same username.
+ */
+ public void testUsernameAllowsOperation()
{
- try
- {
- writeACLConfig("CONFIG");
- fail("fail");
- }
- catch (ConfigurationException ce)
- {
- assertEquals(String.format(PlainConfiguration.NOT_ENOUGH_TOKENS_MSG, 1), ce.getMessage());
- }
+ SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("user1"));
+
+ final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ assertEquals(Result.ALLOWED, result);
}
- public void testACLFileSyntaxNotEnough() throws Exception
+ /**
+ * Tests that an allow rule expressed with an <b>ACL groupname</b> allows an operation performed by a thread running
+ * by a user who belongs to the same group..
+ */
+ public void testAclGroupMembershipAllowsOperation()
{
- try
- {
- writeACLConfig("INVALID");
- fail("fail");
- }
- catch (ConfigurationException ce)
- {
- assertEquals(String.format(PlainConfiguration.NOT_ENOUGH_TOKENS_MSG, 1), ce.getMessage());
- }
+ SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("member1"));
+
+ final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ assertEquals(Result.ALLOWED, result);
}
- public void testACLFileSyntaxPropertyKeyOnly() throws Exception
+ /**
+ * Tests that a deny rule expressed with an <b>External groupname</b> denies an operation performed by a thread running
+ * by a user who belongs to the same group.
+ */
+ public void testExternalGroupMembershipDeniesOperation()
{
- try
- {
- writeACLConfig("ACL ALLOW adk CREATE QUEUE name");
- fail("fail");
- }
- catch (ConfigurationException ce)
- {
- assertEquals(String.format(PlainConfiguration.PROPERTY_KEY_ONLY_MSG, 1), ce.getMessage());
- }
+ SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("user3", "extGroup1"));
+
+ final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ assertEquals(Result.DENIED, result);
}
- public void testACLFileSyntaxPropertyNoEquals() throws Exception
+ /**
+ * Tests that the catch all deny denies the operation and logs with the logging actor.
+ */
+ public void testCatchAllRuleDeniesUnrecognisedUsername()
{
- try
- {
- writeACLConfig("ACL ALLOW adk CREATE QUEUE name test");
- fail("fail");
- }
- catch (ConfigurationException ce)
- {
- assertEquals(String.format(PlainConfiguration.PROPERTY_NO_EQUALS_MSG, 1), ce.getMessage());
- }
+ SecurityManager.setThreadSubject(TestPrincipalUtils.createTestSubject("unknown", "unkgroup1", "unkgroup2"));
+
+ assertEquals("Expecting zero messages before test", 0, messageLogger.getLogMessages().size());
+ final Result result = _plugin.authorise(Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ assertEquals(Result.DENIED, result);
+
+ assertEquals("Expecting one message before test", 1, messageLogger.getLogMessages().size());
+ assertTrue("Logged message does not contain expected string", messageLogger.messageContains(0, "ACL-1002"));
}
-
- public void testACLFileSyntaxPropertyNoValue() throws Exception
+
+ /**
+ * Creates a configuration plugin for the {@link AccessControl} plugin.
+ */
+ private ConfigurationPlugin createConfiguration(final RuleSet rs)
{
- try
- {
- writeACLConfig("ACL ALLOW adk CREATE QUEUE name =");
- fail("fail");
- }
- catch (ConfigurationException ce)
- {
- assertEquals(String.format(PlainConfiguration.PROPERTY_NO_VALUE_MSG, 1), ce.getMessage());
- }
+ final ConfigurationPlugin cp = new ConfigurationPlugin()
+ {
+ public AccessControlConfiguration getConfiguration(final String plugin)
+ {
+ return new AccessControlConfiguration()
+ {
+ public RuleSet getRuleSet()
+ {
+ return rs;
+ }
+ };
+ }
+
+ public String[] getElementsProcessed()
+ {
+ throw new UnsupportedOperationException();
+ }
+ };
+
+ return cp;
}
}
diff --git a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/PlainConfigurationTest.java b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/PlainConfigurationTest.java
new file mode 100644
index 0000000000..e16f9943ba
--- /dev/null
+++ b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/PlainConfigurationTest.java
@@ -0,0 +1,194 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.qpid.server.security.access.plugins;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.qpid.server.security.access.config.ConfigurationFile;
+import org.apache.qpid.server.security.access.config.PlainConfiguration;
+
+/**
+ * These tests check that the ACL file parsing works correctly.
+ *
+ * For each message that can be returned in a {@link ConfigurationException}, an ACL file is created that should trigger this
+ * particular message.
+ */
+public class PlainConfigurationTest extends TestCase
+{
+ public void writeACLConfig(String...aclData) throws Exception
+ {
+ File acl = File.createTempFile(getClass().getName() + getName(), "acl");
+ acl.deleteOnExit();
+
+ // Write ACL file
+ PrintWriter aclWriter = new PrintWriter(new FileWriter(acl));
+ for (String line : aclData)
+ {
+ aclWriter.println(line);
+ }
+ aclWriter.close();
+
+ // Load ruleset
+ ConfigurationFile configFile = new PlainConfiguration(acl);
+ configFile.load();
+ }
+
+ public void testMissingACLConfig() throws Exception
+ {
+ try
+ {
+ // Load ruleset
+ ConfigurationFile configFile = new PlainConfiguration(new File("doesnotexist"));
+ configFile.load();
+
+ fail("fail");
+ }
+ catch (ConfigurationException ce)
+ {
+ assertEquals(String.format(PlainConfiguration.CONFIG_NOT_FOUND_MSG, "doesnotexist"), ce.getMessage());
+ assertTrue(ce.getCause() instanceof FileNotFoundException);
+ assertEquals("doesnotexist (No such file or directory)", ce.getCause().getMessage());
+ }
+ }
+
+ public void testACLFileSyntaxContinuation() throws Exception
+ {
+ try
+ {
+ writeACLConfig("ACL ALLOW ALL \\ ALL");
+ fail("fail");
+ }
+ catch (ConfigurationException ce)
+ {
+ assertEquals(String.format(PlainConfiguration.PREMATURE_CONTINUATION_MSG, 1), ce.getMessage());
+ }
+ }
+
+ public void testACLFileSyntaxTokens() throws Exception
+ {
+ try
+ {
+ writeACLConfig("ACL unparsed ALL ALL");
+ fail("fail");
+ }
+ catch (ConfigurationException ce)
+ {
+ assertEquals(String.format(PlainConfiguration.PARSE_TOKEN_FAILED_MSG, 1), ce.getMessage());
+ assertTrue(ce.getCause() instanceof IllegalArgumentException);
+ assertEquals("Not a valid permission: unparsed", ce.getCause().getMessage());
+ }
+ }
+
+ public void testACLFileSyntaxNotEnoughGroup() throws Exception
+ {
+ try
+ {
+ writeACLConfig("GROUP blah");
+ fail("fail");
+ }
+ catch (ConfigurationException ce)
+ {
+ assertEquals(String.format(PlainConfiguration.NOT_ENOUGH_GROUP_MSG, 1), ce.getMessage());
+ }
+ }
+
+ public void testACLFileSyntaxNotEnoughACL() throws Exception
+ {
+ try
+ {
+ writeACLConfig("ACL ALLOW");
+ fail("fail");
+ }
+ catch (ConfigurationException ce)
+ {
+ assertEquals(String.format(PlainConfiguration.NOT_ENOUGH_ACL_MSG, 1), ce.getMessage());
+ }
+ }
+
+ public void testACLFileSyntaxNotEnoughConfig() throws Exception
+ {
+ try
+ {
+ writeACLConfig("CONFIG");
+ fail("fail");
+ }
+ catch (ConfigurationException ce)
+ {
+ assertEquals(String.format(PlainConfiguration.NOT_ENOUGH_TOKENS_MSG, 1), ce.getMessage());
+ }
+ }
+
+ public void testACLFileSyntaxNotEnough() throws Exception
+ {
+ try
+ {
+ writeACLConfig("INVALID");
+ fail("fail");
+ }
+ catch (ConfigurationException ce)
+ {
+ assertEquals(String.format(PlainConfiguration.NOT_ENOUGH_TOKENS_MSG, 1), ce.getMessage());
+ }
+ }
+
+ public void testACLFileSyntaxPropertyKeyOnly() throws Exception
+ {
+ try
+ {
+ writeACLConfig("ACL ALLOW adk CREATE QUEUE name");
+ fail("fail");
+ }
+ catch (ConfigurationException ce)
+ {
+ assertEquals(String.format(PlainConfiguration.PROPERTY_KEY_ONLY_MSG, 1), ce.getMessage());
+ }
+ }
+
+ public void testACLFileSyntaxPropertyNoEquals() throws Exception
+ {
+ try
+ {
+ writeACLConfig("ACL ALLOW adk CREATE QUEUE name test");
+ fail("fail");
+ }
+ catch (ConfigurationException ce)
+ {
+ assertEquals(String.format(PlainConfiguration.PROPERTY_NO_EQUALS_MSG, 1), ce.getMessage());
+ }
+ }
+
+ public void testACLFileSyntaxPropertyNoValue() throws Exception
+ {
+ try
+ {
+ writeACLConfig("ACL ALLOW adk CREATE QUEUE name =");
+ fail("fail");
+ }
+ catch (ConfigurationException ce)
+ {
+ assertEquals(String.format(PlainConfiguration.PROPERTY_NO_VALUE_MSG, 1), ce.getMessage());
+ }
+ }
+}
diff --git a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java
index aad7290557..bd9deac153 100644
--- a/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java
+++ b/qpid/java/broker-plugins/access-control/src/test/java/org/apache/qpid/server/security/access/plugins/RuleSetTest.java
@@ -21,13 +21,21 @@
package org.apache.qpid.server.security.access.plugins;
+import java.security.Principal;
+import java.util.Arrays;
+
+import javax.security.auth.Subject;
+
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.server.security.Result;
import org.apache.qpid.server.security.access.ObjectProperties;
import org.apache.qpid.server.security.access.ObjectType;
import org.apache.qpid.server.security.access.Operation;
import org.apache.qpid.server.security.access.Permission;
+import org.apache.qpid.server.security.access.config.Rule;
import org.apache.qpid.server.security.access.config.RuleSet;
+import org.apache.qpid.server.security.auth.sasl.TestPrincipalUtils;
+import org.apache.qpid.server.security.auth.sasl.UsernamePrincipal;
import org.apache.qpid.test.utils.QpidTestCase;
/**
@@ -36,16 +44,24 @@ import org.apache.qpid.test.utils.QpidTestCase;
* The ruleset is configured directly rather than using an external file by adding rules individually, calling the
* {@link RuleSet#grant(Integer, String, Permission, Operation, ObjectType, ObjectProperties)} method. Then, the
* access control mechanism is validated by checking whether operations would be authorised by calling the
- * {@link RuleSet#check(String, Operation, ObjectType, ObjectProperties)} method.
+ * {@link RuleSet#check(Principal, Operation, ObjectType, ObjectProperties)} method.
+ *
+ * It ensure that permissions can be granted correctly on users directly, ACL groups (that is those
+ * groups declared directly in the ACL itself), and External groups (that is a group from an External
+ * Authentication Provider, such as an LDAP).
+
*/
public class RuleSetTest extends QpidTestCase
{
- private RuleSet _ruleSet;
+ private RuleSet _ruleSet; // Object under test
+
+ private static final String TEST_USER = "user";
// Common things that are passed to frame constructors
private AMQShortString _queueName = new AMQShortString(this.getClass().getName() + "queue");
private AMQShortString _exchangeName = new AMQShortString("amq.direct");
private AMQShortString _exchangeType = new AMQShortString("direct");
+ private Subject _testSubject = TestPrincipalUtils.createTestSubject(TEST_USER);
@Override
public void setUp() throws Exception
@@ -63,34 +79,36 @@ public class RuleSetTest extends QpidTestCase
super.tearDown();
}
- public void assertDenyGrantAllow(String identity, Operation operation, ObjectType objectType)
+ public void assertDenyGrantAllow(Subject subject, Operation operation, ObjectType objectType)
{
- assertDenyGrantAllow(identity, operation, objectType, ObjectProperties.EMPTY);
+ assertDenyGrantAllow(subject, operation, objectType, ObjectProperties.EMPTY);
}
- public void assertDenyGrantAllow(String identity, Operation operation, ObjectType objectType, ObjectProperties properties)
+ public void assertDenyGrantAllow(Subject subject, Operation operation, ObjectType objectType, ObjectProperties properties)
{
- assertEquals(Result.DENIED, _ruleSet.check(identity, operation, objectType, properties));
- _ruleSet.grant(0, identity, Permission.ALLOW, operation, objectType, properties);
+ final Principal identity = UsernamePrincipal.getUsernamePrincipalFromSubject(subject);
+
+ assertEquals(Result.DENIED, _ruleSet.check(subject, operation, objectType, properties));
+ _ruleSet.grant(0, identity.getName(), Permission.ALLOW, operation, objectType, properties);
assertEquals(1, _ruleSet.getRuleCount());
- assertEquals(Result.ALLOWED, _ruleSet.check(identity, operation, objectType, properties));
+ assertEquals(Result.ALLOWED, _ruleSet.check(subject, operation, objectType, properties));
}
public void testEmptyRuleSet()
{
assertNotNull(_ruleSet);
assertEquals(_ruleSet.getRuleCount(), 0);
- assertEquals(_ruleSet.getDefault(), _ruleSet.check("user", Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));
+ assertEquals(_ruleSet.getDefault(), _ruleSet.check(_testSubject, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));
}
public void testVirtualHostAccess() throws Exception
{
- assertDenyGrantAllow("user", Operation.ACCESS, ObjectType.VIRTUALHOST);
+ assertDenyGrantAllow(_testSubject, Operation.ACCESS, ObjectType.VIRTUALHOST);
}
public void testQueueCreateNamed() throws Exception
{
- assertDenyGrantAllow("user", Operation.CREATE, ObjectType.QUEUE, new ObjectProperties(_queueName));
+ assertDenyGrantAllow(_testSubject, Operation.CREATE, ObjectType.QUEUE, new ObjectProperties(_queueName));
}
public void testQueueCreatenamedNullRoutingKey()
@@ -98,7 +116,7 @@ public class RuleSetTest extends QpidTestCase
ObjectProperties properties = new ObjectProperties(_queueName);
properties.put(ObjectProperties.Property.ROUTING_KEY, (String) null);
- assertDenyGrantAllow("user", Operation.CREATE, ObjectType.QUEUE, properties);
+ assertDenyGrantAllow(_testSubject, Operation.CREATE, ObjectType.QUEUE, properties);
}
public void testExchangeCreate()
@@ -106,17 +124,17 @@ public class RuleSetTest extends QpidTestCase
ObjectProperties properties = new ObjectProperties(_exchangeName);
properties.put(ObjectProperties.Property.TYPE, _exchangeType.asString());
- assertDenyGrantAllow("user", Operation.CREATE, ObjectType.EXCHANGE, properties);
+ assertDenyGrantAllow(_testSubject, Operation.CREATE, ObjectType.EXCHANGE, properties);
}
public void testConsume()
{
- assertDenyGrantAllow("user", Operation.CONSUME, ObjectType.QUEUE);
+ assertDenyGrantAllow(_testSubject, Operation.CONSUME, ObjectType.QUEUE);
}
public void testPublish()
{
- assertDenyGrantAllow("user", Operation.PUBLISH, ObjectType.EXCHANGE);
+ assertDenyGrantAllow(_testSubject, Operation.PUBLISH, ObjectType.EXCHANGE);
}
/**
@@ -131,13 +149,13 @@ public class RuleSetTest extends QpidTestCase
ObjectProperties normal = new ObjectProperties();
normal.put(ObjectProperties.Property.AUTO_DELETE, Boolean.FALSE);
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CONSUME, ObjectType.QUEUE, temporary));
- _ruleSet.grant(0, "user", Permission.ALLOW, Operation.CONSUME, ObjectType.QUEUE, temporary);
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CONSUME, ObjectType.QUEUE, temporary));
+ _ruleSet.grant(0, TEST_USER, Permission.ALLOW, Operation.CONSUME, ObjectType.QUEUE, temporary);
assertEquals(1, _ruleSet.getRuleCount());
- assertEquals(Result.ALLOWED, _ruleSet.check("user", Operation.CONSUME, ObjectType.QUEUE, temporary));
+ assertEquals(Result.ALLOWED, _ruleSet.check(_testSubject, Operation.CONSUME, ObjectType.QUEUE, temporary));
// defer to global if exists, otherwise default answer - this is handled by the security manager
- assertEquals(Result.DEFER, _ruleSet.check("user", Operation.CONSUME, ObjectType.QUEUE, normal));
+ assertEquals(Result.DEFER, _ruleSet.check(_testSubject, Operation.CONSUME, ObjectType.QUEUE, normal));
}
/**
@@ -151,15 +169,15 @@ public class RuleSetTest extends QpidTestCase
ObjectProperties normal = new ObjectProperties(_queueName);
normal.put(ObjectProperties.Property.AUTO_DELETE, Boolean.FALSE);
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CONSUME, ObjectType.QUEUE, temporary));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CONSUME, ObjectType.QUEUE, temporary));
// should not matter if the temporary permission is processed first or last
- _ruleSet.grant(1, "user", Permission.ALLOW, Operation.CONSUME, ObjectType.QUEUE, normal);
- _ruleSet.grant(2, "user", Permission.ALLOW, Operation.CONSUME, ObjectType.QUEUE, temporary);
+ _ruleSet.grant(1, TEST_USER, Permission.ALLOW, Operation.CONSUME, ObjectType.QUEUE, normal);
+ _ruleSet.grant(2, TEST_USER, Permission.ALLOW, Operation.CONSUME, ObjectType.QUEUE, temporary);
assertEquals(2, _ruleSet.getRuleCount());
- assertEquals(Result.ALLOWED, _ruleSet.check("user", Operation.CONSUME, ObjectType.QUEUE, normal));
- assertEquals(Result.ALLOWED, _ruleSet.check("user", Operation.CONSUME, ObjectType.QUEUE, temporary));
+ assertEquals(Result.ALLOWED, _ruleSet.check(_testSubject, Operation.CONSUME, ObjectType.QUEUE, normal));
+ assertEquals(Result.ALLOWED, _ruleSet.check(_testSubject, Operation.CONSUME, ObjectType.QUEUE, temporary));
}
/**
@@ -173,15 +191,15 @@ public class RuleSetTest extends QpidTestCase
ObjectProperties normal = new ObjectProperties(_queueName);
normal.put(ObjectProperties.Property.AUTO_DELETE, Boolean.FALSE);
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CONSUME, ObjectType.QUEUE, temporary));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CONSUME, ObjectType.QUEUE, temporary));
// should not matter if the temporary permission is processed first or last
- _ruleSet.grant(1, "user", Permission.ALLOW, Operation.CONSUME, ObjectType.QUEUE, temporary);
- _ruleSet.grant(2, "user", Permission.ALLOW, Operation.CONSUME, ObjectType.QUEUE, normal);
+ _ruleSet.grant(1, TEST_USER, Permission.ALLOW, Operation.CONSUME, ObjectType.QUEUE, temporary);
+ _ruleSet.grant(2, TEST_USER, Permission.ALLOW, Operation.CONSUME, ObjectType.QUEUE, normal);
assertEquals(2, _ruleSet.getRuleCount());
- assertEquals(Result.ALLOWED, _ruleSet.check("user", Operation.CONSUME, ObjectType.QUEUE, normal));
- assertEquals(Result.ALLOWED, _ruleSet.check("user", Operation.CONSUME, ObjectType.QUEUE, temporary));
+ assertEquals(Result.ALLOWED, _ruleSet.check(_testSubject, Operation.CONSUME, ObjectType.QUEUE, normal));
+ assertEquals(Result.ALLOWED, _ruleSet.check(_testSubject, Operation.CONSUME, ObjectType.QUEUE, temporary));
}
/*
@@ -197,15 +215,15 @@ public class RuleSetTest extends QpidTestCase
ObjectProperties namedTemporary = new ObjectProperties(_queueName);
namedTemporary.put(ObjectProperties.Property.AUTO_DELETE, Boolean.TRUE);
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, named));
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, namedTemporary));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, named));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, namedTemporary));
- _ruleSet.grant(1, "user", Permission.ALLOW, Operation.CREATE, ObjectType.QUEUE, named);
- _ruleSet.grant(2, "user", Permission.DENY, Operation.CREATE, ObjectType.QUEUE, namedTemporary);
+ _ruleSet.grant(1, TEST_USER, Permission.ALLOW, Operation.CREATE, ObjectType.QUEUE, named);
+ _ruleSet.grant(2, TEST_USER, Permission.DENY, Operation.CREATE, ObjectType.QUEUE, namedTemporary);
assertEquals(2, _ruleSet.getRuleCount());
- assertEquals(Result.ALLOWED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, named));
- assertEquals(Result.ALLOWED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, namedTemporary));
+ assertEquals(Result.ALLOWED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, named));
+ assertEquals(Result.ALLOWED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, namedTemporary));
}
/**
@@ -217,15 +235,15 @@ public class RuleSetTest extends QpidTestCase
ObjectProperties namedTemporary = new ObjectProperties(_queueName);
namedTemporary.put(ObjectProperties.Property.AUTO_DELETE, Boolean.TRUE);
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, named));
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, namedTemporary));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, named));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, namedTemporary));
- _ruleSet.grant(1, "user", Permission.DENY, Operation.CREATE, ObjectType.QUEUE, namedTemporary);
- _ruleSet.grant(2, "user", Permission.ALLOW, Operation.CREATE, ObjectType.QUEUE, named);
+ _ruleSet.grant(1, TEST_USER, Permission.DENY, Operation.CREATE, ObjectType.QUEUE, namedTemporary);
+ _ruleSet.grant(2, TEST_USER, Permission.ALLOW, Operation.CREATE, ObjectType.QUEUE, named);
assertEquals(2, _ruleSet.getRuleCount());
- assertEquals(Result.ALLOWED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, named));
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, namedTemporary));
+ assertEquals(Result.ALLOWED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, named));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, namedTemporary));
}
/**
@@ -239,18 +257,18 @@ public class RuleSetTest extends QpidTestCase
ObjectProperties namedDurable = new ObjectProperties(_queueName);
namedDurable.put(ObjectProperties.Property.DURABLE, Boolean.TRUE);
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, named));
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, namedTemporary));
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, namedDurable));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, named));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, namedTemporary));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, namedDurable));
- _ruleSet.grant(1, "user", Permission.DENY, Operation.CREATE, ObjectType.QUEUE, namedTemporary);
- _ruleSet.grant(2, "user", Permission.DENY, Operation.CREATE, ObjectType.QUEUE, namedDurable);
- _ruleSet.grant(3, "user", Permission.ALLOW, Operation.CREATE, ObjectType.QUEUE, named);
+ _ruleSet.grant(1, TEST_USER, Permission.DENY, Operation.CREATE, ObjectType.QUEUE, namedTemporary);
+ _ruleSet.grant(2, TEST_USER, Permission.DENY, Operation.CREATE, ObjectType.QUEUE, namedDurable);
+ _ruleSet.grant(3, TEST_USER, Permission.ALLOW, Operation.CREATE, ObjectType.QUEUE, named);
assertEquals(3, _ruleSet.getRuleCount());
- assertEquals(Result.ALLOWED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, named));
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, namedTemporary));
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, namedDurable));
+ assertEquals(Result.ALLOWED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, named));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, namedTemporary));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, namedDurable));
}
public void testNamedTemporaryQueueAllowed()
@@ -259,15 +277,15 @@ public class RuleSetTest extends QpidTestCase
ObjectProperties namedTemporary = new ObjectProperties(_queueName);
namedTemporary.put(ObjectProperties.Property.AUTO_DELETE, Boolean.TRUE);
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, named));
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, namedTemporary));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, named));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, namedTemporary));
- _ruleSet.grant(1, "user", Permission.ALLOW, Operation.CREATE, ObjectType.QUEUE, namedTemporary);
- _ruleSet.grant(2, "user", Permission.ALLOW, Operation.CREATE, ObjectType.QUEUE, named);
+ _ruleSet.grant(1, TEST_USER, Permission.ALLOW, Operation.CREATE, ObjectType.QUEUE, namedTemporary);
+ _ruleSet.grant(2, TEST_USER, Permission.ALLOW, Operation.CREATE, ObjectType.QUEUE, named);
assertEquals(2, _ruleSet.getRuleCount());
- assertEquals(Result.ALLOWED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, named));
- assertEquals(Result.ALLOWED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, namedTemporary));
+ assertEquals(Result.ALLOWED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, named));
+ assertEquals(Result.ALLOWED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, namedTemporary));
}
public void testNamedTemporaryQueueDeniedAllowed()
@@ -276,14 +294,101 @@ public class RuleSetTest extends QpidTestCase
ObjectProperties namedTemporary = new ObjectProperties(_queueName);
namedTemporary.put(ObjectProperties.Property.AUTO_DELETE, Boolean.TRUE);
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, named));
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, namedTemporary));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, named));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, namedTemporary));
- _ruleSet.grant(1, "user", Permission.ALLOW, Operation.CREATE, ObjectType.QUEUE, namedTemporary);
- _ruleSet.grant(2, "user", Permission.DENY, Operation.CREATE, ObjectType.QUEUE, named);
+ _ruleSet.grant(1, TEST_USER, Permission.ALLOW, Operation.CREATE, ObjectType.QUEUE, namedTemporary);
+ _ruleSet.grant(2, TEST_USER, Permission.DENY, Operation.CREATE, ObjectType.QUEUE, named);
assertEquals(2, _ruleSet.getRuleCount());
- assertEquals(Result.DENIED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, named));
- assertEquals(Result.ALLOWED, _ruleSet.check("user", Operation.CREATE, ObjectType.QUEUE, namedTemporary));
+ assertEquals(Result.DENIED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, named));
+ assertEquals(Result.ALLOWED, _ruleSet.check(_testSubject, Operation.CREATE, ObjectType.QUEUE, namedTemporary));
+ }
+
+ /**
+ * Tests support for the {@link Rule#ALL} keyword.
+ */
+ public void testAllowToAll()
+ {
+ _ruleSet.grant(1, Rule.ALL, Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ assertEquals(1, _ruleSet.getRuleCount());
+
+ assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject("usera"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));
+ assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject("userb"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));
+ }
+
+ /**
+ * Tests support for ACL groups (i.e. inline groups declared in the ACL file itself).
+ */
+ public void testAclGroupsSupported()
+ {
+ assertTrue(_ruleSet.addGroup("aclgroup", Arrays.asList(new String[] {"usera", "userb"})));
+
+ _ruleSet.grant(1, "aclgroup", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ assertEquals(1, _ruleSet.getRuleCount());
+
+ assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject("usera"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));
+ assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject("userb"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));
+ assertEquals(Result.DEFER, _ruleSet.check(TestPrincipalUtils.createTestSubject("userc"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));
+ }
+
+ /**
+ * Tests support for nested ACL groups.
+ */
+ public void testNestedAclGroupsSupported()
+ {
+ assertTrue(_ruleSet.addGroup("aclgroup1", Arrays.asList(new String[] {"userb"})));
+ assertTrue(_ruleSet.addGroup("aclgroup2", Arrays.asList(new String[] {"usera", "aclgroup1"})));
+
+ _ruleSet.grant(1, "aclgroup2", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ assertEquals(1, _ruleSet.getRuleCount());
+
+ assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject("usera"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));
+ assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject("userb"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));
+ }
+
+ /**
+ * Tests support for nested External groups (i.e. those groups coming from an external source such as an LDAP).
+ */
+ public void testExternalGroupsSupported()
+ {
+ _ruleSet.grant(1, "extgroup1", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ _ruleSet.grant(2, "extgroup2", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ assertEquals(2, _ruleSet.getRuleCount());
+
+ assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject("usera", "extgroup1"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));
+ assertEquals(Result.DENIED, _ruleSet.check(TestPrincipalUtils.createTestSubject("userb", "extgroup2"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));
+ }
+
+ /**
+ * Rule order in the ACL determines the outcome of the check. This test ensures that a user who is
+ * granted explicit permission on an object, is granted that access even although late a group
+ * to which the user belongs is later denied the permission.
+ */
+ public void testAllowDeterminedByRuleOrder()
+ {
+ assertTrue(_ruleSet.addGroup("aclgroup", Arrays.asList(new String[] {"usera"})));
+
+ _ruleSet.grant(1, "usera", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ _ruleSet.grant(2, "aclgroup", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ assertEquals(2, _ruleSet.getRuleCount());
+
+ assertEquals(Result.ALLOWED, _ruleSet.check(TestPrincipalUtils.createTestSubject("usera"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));
+ }
+
+ /**
+ * Rule order in the ACL determines the outcome of the check. This tests ensures that a user who is denied
+ * access by group, is denied access, despite there being a later rule granting permission to that user.
+ */
+ public void testDenyDeterminedByRuleOrder()
+ {
+ assertTrue(_ruleSet.addGroup("aclgroup", Arrays.asList(new String[] {"usera"})));
+
+ _ruleSet.grant(1, "aclgroup", Permission.DENY, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+ _ruleSet.grant(2, "usera", Permission.ALLOW, Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY);
+
+ assertEquals(2, _ruleSet.getRuleCount());
+
+ assertEquals(Result.DENIED, _ruleSet.check(TestPrincipalUtils.createTestSubject("usera"),Operation.ACCESS, ObjectType.VIRTUALHOST, ObjectProperties.EMPTY));
}
}
diff --git a/qpid/java/broker-plugins/experimental/info/src/main/java/org/apache/qpid/info/AppInfo.java b/qpid/java/broker-plugins/experimental/info/src/main/java/org/apache/qpid/info/AppInfo.java
index 9bdd4b9d17..bf3ef61ea1 100644
--- a/qpid/java/broker-plugins/experimental/info/src/main/java/org/apache/qpid/info/AppInfo.java
+++ b/qpid/java/broker-plugins/experimental/info/src/main/java/org/apache/qpid/info/AppInfo.java
@@ -70,7 +70,7 @@ public class AppInfo
sc = ApplicationRegistry.getInstance().getConfiguration();
if (null != sc)
{
- appInfoMap.put("jmxport", sc.getJMXManagementPort() + "");
+ appInfoMap.put("jmxport", sc.getJMXPortRegistryServer() + "");
appInfoMap.put("port", sc.getPorts().toString());
appInfoMap.put("version", QpidProperties.getReleaseVersion());
appInfoMap.put("vhosts", "standalone");
diff --git a/qpid/java/broker-plugins/extras/src/test/java/org/apache/qpid/server/plugins/ExtrasTest.java b/qpid/java/broker-plugins/extras/src/test/java/org/apache/qpid/server/plugins/ExtrasTest.java
index 57b6e19b5d..db3ebfd4e1 100644
--- a/qpid/java/broker-plugins/extras/src/test/java/org/apache/qpid/server/plugins/ExtrasTest.java
+++ b/qpid/java/broker-plugins/extras/src/test/java/org/apache/qpid/server/plugins/ExtrasTest.java
@@ -67,7 +67,7 @@ public class ExtrasTest extends TestCase
public void testNoExchanges() throws Exception
{
- PluginManager manager = new PluginManager("/path/to/nowhere", "/tmp");
+ PluginManager manager = new PluginManager("/path/to/nowhere", "/tmp", null);
Map<String, ExchangeType<?>> exchanges = manager.getExchanges();
assertTrue("Exchanges found", exchanges.isEmpty());
}
diff --git a/qpid/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallConfigurationTest.java b/qpid/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallConfigurationTest.java
index 24b8bbe36c..e078675efc 100644
--- a/qpid/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallConfigurationTest.java
+++ b/qpid/java/broker-plugins/firewall/src/test/java/org/apache/qpid/server/security/access/FirewallConfigurationTest.java
@@ -80,9 +80,8 @@ public class FirewallConfigurationTest extends QpidTestCase
out.write("\t<cache-directory>${QPID_WORK}/cache</cache-directory>\n");
out.write("\t<management><enabled>false</enabled></management>\n");
out.write("\t<security>\n");
- out.write("\t\t<principal-databases>\n");
+ out.write("\t\t<pd-auth-manager>\n");
out.write("\t\t\t<principal-database>\n");
- out.write("\t\t\t\t<name>passwordfile</name>\n");
out.write("\t\t\t\t<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>\n");
out.write("\t\t\t\t<attributes>\n");
out.write("\t\t\t\t\t<attribute>\n");
@@ -91,7 +90,7 @@ public class FirewallConfigurationTest extends QpidTestCase
out.write("\t\t\t\t\t</attribute>\n");
out.write("\t\t\t\t</attributes>\n");
out.write("\t\t\t</principal-database>\n");
- out.write("\t\t</principal-databases>\n");
+ out.write("\t\t</pd-auth-manager>\n");
out.write("\t\t<firewall>\n");
out.write("\t\t\t<xml fileName=\"" + fileB.getAbsolutePath() + "\"/>");
out.write("\t\t</firewall>\n");
@@ -163,9 +162,8 @@ public class FirewallConfigurationTest extends QpidTestCase
out.write("\t<plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory>\n");
out.write("\t<management><enabled>false</enabled></management>\n");
out.write("\t<security>\n");
- out.write("\t\t<principal-databases>\n");
+ out.write("\t\t<pd-auth-manager>\n");
out.write("\t\t\t<principal-database>\n");
- out.write("\t\t\t\t<name>passwordfile</name>\n");
out.write("\t\t\t\t<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>\n");
out.write("\t\t\t\t<attributes>\n");
out.write("\t\t\t\t\t<attribute>\n");
@@ -174,7 +172,7 @@ public class FirewallConfigurationTest extends QpidTestCase
out.write("\t\t\t\t\t</attribute>\n");
out.write("\t\t\t\t</attributes>\n");
out.write("\t\t\t</principal-database>\n");
- out.write("\t\t</principal-databases>\n");
+ out.write("\t\t</pd-auth-manager>\n");
out.write("\t\t<firewall>\n");
out.write("\t\t\t<xml fileName=\"" + fileB.getAbsolutePath() + "\"/>");
out.write("\t\t</firewall>\n");
@@ -262,9 +260,8 @@ public class FirewallConfigurationTest extends QpidTestCase
out.write("\t<plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory>\n");
out.write("\t<management><enabled>false</enabled></management>\n");
out.write("\t<security>\n");
- out.write("\t\t<principal-databases>\n");
+ out.write("\t\t<pd-auth-manager>\n");
out.write("\t\t\t<principal-database>\n");
- out.write("\t\t\t\t<name>passwordfile</name>\n");
out.write("\t\t\t\t<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>\n");
out.write("\t\t\t\t<attributes>\n");
out.write("\t\t\t\t\t<attribute>\n");
@@ -273,7 +270,7 @@ public class FirewallConfigurationTest extends QpidTestCase
out.write("\t\t\t\t\t</attribute>\n");
out.write("\t\t\t\t</attributes>\n");
out.write("\t\t\t</principal-database>\n");
- out.write("\t\t</principal-databases>\n");
+ out.write("\t\t</pd-auth-manager>\n");
out.write("\t\t<firewall>\n");
out.write("\t\t\t<rule access=\""+ ((allow) ? "allow" : "deny") +"\" network=\"127.0.0.1\"/>");
out.write("\t\t</firewall>\n");
diff --git a/qpid/java/broker/etc/config.xml b/qpid/java/broker/etc/config.xml
index f4758d77a8..2752274155 100644
--- a/qpid/java/broker/etc/config.xml
+++ b/qpid/java/broker/etc/config.xml
@@ -30,21 +30,27 @@
<connector>
<!-- To enable SSL edit the keystorePath and keystorePassword
and set enabled to true.
- To disasble Non-SSL port set sslOnly to true -->
+ To disable Non-SSL port set sslOnly to true -->
<ssl>
<enabled>false</enabled>
+ <port>5671</port>
<sslOnly>false</sslOnly>
<keystorePath>/path/to/keystore.ks</keystorePath>
<keystorePassword>keystorepass</keystorePassword>
</ssl>
<port>5672</port>
- <sslport>8672</sslport>
<socketReceiveBuffer>262144</socketReceiveBuffer>
<socketSendBuffer>262144</socketSendBuffer>
</connector>
<management>
<enabled>true</enabled>
- <jmxport>8999</jmxport>
+ <jmxport>
+ <registryServer>8999</registryServer>
+ <!--
+ If unspecified, connectorServer defaults to 100 + registryServer port.
+ <connectorServer>9099</connectionServer>
+ -->
+ </jmxport>
<ssl>
<enabled>false</enabled>
<!-- Update below path to your keystore location, or run the bin/create-example-ssl-stores(.sh|.bat)
@@ -62,10 +68,8 @@
</advanced>
<security>
- <principal-databases>
- <!-- Example use of Base64 encoded MD5 hashes for authentication via CRAM-MD5-Hashed -->
+ <pd-auth-manager>
<principal-database>
- <name>passwordfile</name>
<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>
<attributes>
<attribute>
@@ -74,7 +78,7 @@
</attribute>
</attributes>
</principal-database>
- </principal-databases>
+ </pd-auth-manager>
<allow-all />
diff --git a/qpid/java/broker/etc/qpid-server.conf.jpp b/qpid/java/broker/etc/qpid-server.conf.jpp
index 3ed2431ef3..0378c82fd9 100644
--- a/qpid/java/broker/etc/qpid-server.conf.jpp
+++ b/qpid/java/broker/etc/qpid-server.conf.jpp
@@ -17,8 +17,7 @@
# under the License.
#
-QPID_LIBS=$(build-classpath backport-util-concurrent \
- commons-beanutils \
+QPID_LIBS=$(build-classpath commons-beanutils \
commons-beanutils-core \
commons-cli \
commons-codec \
diff --git a/qpid/java/broker/etc/virtualhosts.xml b/qpid/java/broker/etc/virtualhosts.xml
index 5860bfe2cb..33a48a1349 100644
--- a/qpid/java/broker/etc/virtualhosts.xml
+++ b/qpid/java/broker/etc/virtualhosts.xml
@@ -31,7 +31,7 @@
<housekeeping>
<threadCount>2</threadCount>
- <expiredMessageCheckPeriod>20000</expiredMessageCheckPeriod>
+ <checkPeriod>20000</checkPeriod>
</housekeeping>
<exchanges>
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java b/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java
index f0f7678cd9..9c77032d4c 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/qmf/QMFService.java
@@ -1317,6 +1317,17 @@ public class QMFService implements ConfigStore.ConfigEventListener, Closeable
// TODO
return false;
}
+
+ public String getSaslMechanism()
+ {
+ // TODO
+ return null;
+ }
+ public Integer getSaslSsf()
+ {
+ // TODO
+ return 0;
+ }
}
private class SessionDelegate implements BrokerSchema.SessionDelegate
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java
index 08eb05680c..34bc57a826 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/AMQChannel.java
@@ -50,6 +50,7 @@ import org.apache.qpid.server.logging.LogSubject;
import org.apache.qpid.server.logging.actors.AMQPChannelActor;
import org.apache.qpid.server.logging.actors.CurrentActor;
import org.apache.qpid.server.logging.messages.ChannelMessages;
+import org.apache.qpid.server.logging.messages.ExchangeMessages;
import org.apache.qpid.server.logging.subjects.ChannelLogSubject;
import org.apache.qpid.server.message.AMQMessage;
import org.apache.qpid.server.message.MessageMetaData;
@@ -75,6 +76,7 @@ import org.apache.qpid.server.txn.AutoCommitTransaction;
import org.apache.qpid.server.txn.LocalTransaction;
import org.apache.qpid.server.txn.ServerTransaction;
import org.apache.qpid.server.virtualhost.VirtualHost;
+import org.apache.qpid.transport.TransportException;
import java.util.ArrayList;
import java.util.Collection;
@@ -137,7 +139,7 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
private final AtomicBoolean _suspended = new AtomicBoolean(false);
private ServerTransaction _transaction;
-
+
private final AtomicLong _txnStarts = new AtomicLong(0);
private final AtomicLong _txnCommits = new AtomicLong(0);
private final AtomicLong _txnRejects = new AtomicLong(0);
@@ -201,12 +203,12 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
// theory
return !(_transaction instanceof AutoCommitTransaction);
}
-
+
public boolean inTransaction()
{
return isTransactional() && _txnUpdateTime.get() > 0 && _transaction.getTransactionStartTime() > 0;
}
-
+
private void incrementOutstandingTxnsIfNecessary()
{
if(isTransactional())
@@ -216,7 +218,7 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
_txnCount.compareAndSet(0,1);
}
}
-
+
private void decrementOutstandingTxnsIfNecessary()
{
if(isTransactional())
@@ -314,7 +316,6 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
try
{
_currentMessage.getStoredMessage().flushToStore();
-
final ArrayList<? extends BaseQueue> destinationQueues = _currentMessage.getDestinationQueues();
if(!checkMessageUserId(_currentMessage.getContentHeader()))
@@ -323,7 +324,7 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
}
else
{
- if(destinationQueues == null || _currentMessage.getDestinationQueues().isEmpty())
+ if(destinationQueues == null || destinationQueues.isEmpty())
{
if (_currentMessage.isMandatory() || _currentMessage.isImmediate())
{
@@ -331,7 +332,7 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
}
else
{
- _logger.warn("MESSAGE DISCARDED: No routes for message - " + createAMQMessage(_currentMessage));
+ _actor.message(ExchangeMessages.DISCARDMSG(_currentMessage.getExchange().asString(), _currentMessage.getRoutingKey()));
}
}
@@ -385,6 +386,13 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
_currentMessage = null;
throw e;
}
+ catch (RuntimeException e)
+ {
+ // we want to make sure we don't keep a reference to the message in the
+ // event of an error
+ _currentMessage = null;
+ throw e;
+ }
}
protected void routeCurrentMessage() throws AMQException
@@ -435,7 +443,7 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
{
throw new AMQException("Consumer already exists with same tag: " + tag);
}
-
+
Subscription subscription =
SubscriptionFactoryImpl.INSTANCE.createSubscription(_channelId, _session, tag, acks, filters, noLocal, _creditManager);
@@ -456,6 +464,11 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
_tag2SubscriptionMap.remove(tag);
throw e;
}
+ catch (RuntimeException e)
+ {
+ _tag2SubscriptionMap.remove(tag);
+ throw e;
+ }
return tag;
}
@@ -513,7 +526,11 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
}
catch (AMQException e)
{
- _logger.error("Caught AMQException whilst attempting to reque:" + e);
+ _logger.error("Caught AMQException whilst attempting to requeue:" + e);
+ }
+ catch (TransportException e)
+ {
+ _logger.error("Caught TransportException whilst attempting to requeue:" + e);
}
getConfigStore().removeConfiguredObject(this);
@@ -944,7 +961,7 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
finally
{
_rollingBack = false;
-
+
_txnRejects.incrementAndGet();
_txnStarts.incrementAndGet();
decrementOutstandingTxnsIfNecessary();
@@ -1038,9 +1055,9 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
public void deliverToClient(final Subscription sub, final QueueEntry entry, final long deliveryTag)
throws AMQException
{
+ _session.registerMessageDelivered(entry.getMessage().getSize());
getProtocolSession().getProtocolOutputConverter().writeDeliver(entry, getChannelId(),
deliveryTag, sub.getConsumerTag());
- _session.registerMessageDelivered(entry.getMessage().getSize());
}
};
@@ -1083,7 +1100,7 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
? ((BasicContentHeaderProperties) header.getProperties()).getUserId()
: null;
- return (!MSG_AUTH || _session.getPrincipal().getName().equals(userID == null? "" : userID.toString()));
+ return (!MSG_AUTH || _session.getAuthorizedPrincipal().getName().equals(userID == null? "" : userID.toString()));
}
@@ -1425,12 +1442,12 @@ public class AMQChannel implements SessionConfig, AMQSessionModel
{
return _createTime;
}
-
+
public void mgmtClose() throws AMQException
{
_session.mgmtCloseChannel(_channelId);
}
-
+
public void checkTransactionStatus(long openWarn, long openClose, long idleWarn, long idleClose) throws AMQException
{
if (inTransaction())
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java
index 78217c36ac..5dfd841434 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/Broker.java
@@ -33,6 +33,8 @@ import java.util.List;
import java.util.Properties;
import java.util.Set;
+import javax.net.ssl.SSLContext;
+
import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.xml.QpidLog4JConfigurator;
import org.apache.qpid.server.configuration.ServerConfiguration;
@@ -45,9 +47,8 @@ import org.apache.qpid.server.logging.actors.CurrentActor;
import org.apache.qpid.server.logging.actors.GenericActor;
import org.apache.qpid.server.logging.management.LoggingManagementMBean;
import org.apache.qpid.server.logging.messages.BrokerMessages;
-import org.apache.qpid.server.protocol.AMQProtocolEngineFactory;
-import org.apache.qpid.server.protocol.MultiVersionProtocolEngineFactory;
import org.apache.qpid.server.protocol.AmqpProtocolVersion;
+import org.apache.qpid.server.protocol.MultiVersionProtocolEngineFactory;
import org.apache.qpid.server.registry.ApplicationRegistry;
import org.apache.qpid.server.registry.ConfigurationFileApplicationRegistry;
import org.apache.qpid.server.transport.QpidAcceptor;
@@ -55,7 +56,6 @@ import org.apache.qpid.ssl.SSLContextFactory;
import org.apache.qpid.transport.NetworkTransportConfiguration;
import org.apache.qpid.transport.network.IncomingNetworkTransport;
import org.apache.qpid.transport.network.Transport;
-import org.apache.qpid.transport.network.mina.MinaNetworkTransport;
public class Broker
{
@@ -82,7 +82,7 @@ public class Broker
startup(new BrokerOptions());
}
- public void startup(BrokerOptions options) throws Exception
+ public void startup(final BrokerOptions options) throws Exception
{
try
{
@@ -108,9 +108,9 @@ public class Broker
configureLogging(logConfigFile, options.getLogWatchFrequency());
- ConfigurationFileApplicationRegistry config = new ConfigurationFileApplicationRegistry(configFile);
+ ConfigurationFileApplicationRegistry config = new ConfigurationFileApplicationRegistry(configFile, options.getBundleContext());
ServerConfiguration serverConfig = config.getConfiguration();
- updateManagementPort(serverConfig, options.getJmxPort());
+ updateManagementPorts(serverConfig, options.getJmxPortRegistryServer(), options.getJmxPortConnectorServer());
ApplicationRegistry.initialise(config);
@@ -192,57 +192,41 @@ public class Broker
{
for(int port : ports)
{
- Set<AmqpProtocolVersion> supported = EnumSet.allOf(AmqpProtocolVersion.class);
-
- if(exclude_0_10.contains(port))
- {
- supported.remove(AmqpProtocolVersion.v0_10);
- }
-
- if(exclude_0_9_1.contains(port))
- {
- supported.remove(AmqpProtocolVersion.v0_9_1);
- }
- if(exclude_0_9.contains(port))
- {
- supported.remove(AmqpProtocolVersion.v0_9);
- }
- if(exclude_0_8.contains(port))
- {
- supported.remove(AmqpProtocolVersion.v0_8);
- }
-
- NetworkTransportConfiguration settings =
- new ServerNetworkTransportConfiguration(serverConfig, port, bindAddress.getHostName(), Transport.TCP);
-
- IncomingNetworkTransport transport = new MinaNetworkTransport();
- MultiVersionProtocolEngineFactory protocolEngineFactory =
- new MultiVersionProtocolEngineFactory(hostName, supported);
+ final Set<AmqpProtocolVersion> supported =
+ getSupportedVersions(port, exclude_0_10, exclude_0_9_1, exclude_0_9, exclude_0_8);
+ final NetworkTransportConfiguration settings =
+ new ServerNetworkTransportConfiguration(serverConfig, port, bindAddress.getHostName(), Transport.TCP);
+
+ final IncomingNetworkTransport transport = Transport.getIncomingTransportInstance();
+ final MultiVersionProtocolEngineFactory protocolEngineFactory =
+ new MultiVersionProtocolEngineFactory(hostName, supported);
transport.accept(settings, protocolEngineFactory, null);
ApplicationRegistry.getInstance().addAcceptor(new InetSocketAddress(bindAddress, port),
- new QpidAcceptor(transport,"TCP"));
+ new QpidAcceptor(transport,"TCP"));
CurrentActor.get().message(BrokerMessages.LISTENING("TCP", port));
}
}
if (serverConfig.getEnableSSL())
{
- String keystorePath = serverConfig.getKeystorePath();
- String keystorePassword = serverConfig.getKeystorePassword();
- String certType = serverConfig.getCertType();
- SSLContextFactory sslFactory =
- new SSLContextFactory(keystorePath, keystorePassword, certType);
+ final String keystorePath = serverConfig.getKeystorePath();
+ final String keystorePassword = serverConfig.getKeystorePassword();
+ final String certType = serverConfig.getCertType();
+ final SSLContext sslContext = SSLContextFactory.buildServerContext(keystorePath, keystorePassword, certType);
for(int sslPort : sslPorts)
{
- NetworkTransportConfiguration settings =
+ final Set<AmqpProtocolVersion> supported =
+ getSupportedVersions(sslPort, exclude_0_10, exclude_0_9_1, exclude_0_9, exclude_0_8);
+ final NetworkTransportConfiguration settings =
new ServerNetworkTransportConfiguration(serverConfig, sslPort, bindAddress.getHostName(), Transport.TCP);
- IncomingNetworkTransport transport = new MinaNetworkTransport();
-
- transport.accept(settings, new AMQProtocolEngineFactory(), sslFactory);
+ final IncomingNetworkTransport transport = Transport.getIncomingTransportInstance();
+ final MultiVersionProtocolEngineFactory protocolEngineFactory =
+ new MultiVersionProtocolEngineFactory(hostName, supported);
+ transport.accept(settings, protocolEngineFactory, sslContext);
ApplicationRegistry.getInstance().addAcceptor(new InetSocketAddress(bindAddress, sslPort),
new QpidAcceptor(transport,"TCP"));
CurrentActor.get().message(BrokerMessages.LISTENING("TCP/SSL", sslPort));
@@ -258,6 +242,32 @@ public class Broker
}
}
+ private static Set<AmqpProtocolVersion> getSupportedVersions(final int port, final Set<Integer> exclude_0_10,
+ final Set<Integer> exclude_0_9_1, final Set<Integer> exclude_0_9,
+ final Set<Integer> exclude_0_8)
+ {
+ final EnumSet<AmqpProtocolVersion> supported = EnumSet.allOf(AmqpProtocolVersion.class);
+
+ if(exclude_0_10.contains(port))
+ {
+ supported.remove(AmqpProtocolVersion.v0_10);
+ }
+ if(exclude_0_9_1.contains(port))
+ {
+ supported.remove(AmqpProtocolVersion.v0_9_1);
+ }
+ if(exclude_0_9.contains(port))
+ {
+ supported.remove(AmqpProtocolVersion.v0_9);
+ }
+ if(exclude_0_8.contains(port))
+ {
+ supported.remove(AmqpProtocolVersion.v0_8);
+ }
+
+ return supported;
+ }
+
private File getConfigFile(final String fileName,
final String defaultFileName,
final String qpidHome, boolean throwOnFileNotFound) throws InitException
@@ -308,19 +318,30 @@ public class Broker
/**
* Update the configuration data with the management port.
* @param configuration
- * @param managementPort The string from the command line
+ * @param registryServerPort The string from the command line
*/
- private void updateManagementPort(ServerConfiguration configuration, Integer managementPort)
+ private void updateManagementPorts(ServerConfiguration configuration, Integer registryServerPort, Integer connectorServerPort)
{
- if (managementPort != null)
+ if (registryServerPort != null)
+ {
+ try
+ {
+ configuration.setJMXPortRegistryServer(registryServerPort);
+ }
+ catch (NumberFormatException e)
+ {
+ throw new InitException("Invalid management (registry server) port: " + registryServerPort, null);
+ }
+ }
+ if (connectorServerPort != null)
{
try
{
- configuration.setJMXManagementPort(managementPort);
+ configuration.setJMXPortConnectorServer(connectorServerPort);
}
catch (NumberFormatException e)
{
- throw new InitException("Invalid management port: " + managementPort, null);
+ throw new InitException("Invalid management (connector server) port: " + connectorServerPort, null);
}
}
}
@@ -366,7 +387,7 @@ public class Broker
// log4j expects the watch interval in milliseconds
try
{
- QpidLog4JConfigurator.configureAndWatch(logConfigFile.getPath(), logWatchTime);
+ QpidLog4JConfigurator.configureAndWatch(logConfigFile.getPath(), logWatchTime * 1000);
}
catch (Exception e)
{
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java
index 5bea33e5f3..3defd8260c 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/BrokerOptions.java
@@ -26,6 +26,8 @@ import java.util.HashSet;
import java.util.Map;
import java.util.Set;
+import org.osgi.framework.BundleContext;
+
public class BrokerOptions
{
/** serialVersionUID */
@@ -35,14 +37,6 @@ public class BrokerOptions
public static final String DEFAULT_LOG_CONFIG_FILE = "etc/log4j.xml";
public static final String QPID_HOME = "QPID_HOME";
- public static final String PORTS = "p";
- public static final String SSL_PORTS = "s";
- public static final String BIND = "b";
- public static final String MANAGEMENT = "m";
- public static final String LOG_CONFIG = "l";
- public static final String WATCH = "w";
- public static final String CONFIG = "c";
-
private final Set<Integer> _ports = new HashSet<Integer>();
private final Set<Integer> _sslPorts = new HashSet<Integer>();
private final Map<ProtocolExclusion,Set<Integer>> _exclusionMap = new HashMap<ProtocolExclusion, Set<Integer>>();
@@ -50,10 +44,13 @@ public class BrokerOptions
private String _configFile;
private String _logConfigFile;
private String _bind;
- private Integer _jmxPort;
+ private Integer _jmxPortRegistryServer;
+ private Integer _jmxPortConnectorServer;
+ private BundleContext _bundleContext;
private Integer _logWatchFrequency = 0;
+
public void addPort(final int port)
{
_ports.add(port);
@@ -94,14 +91,24 @@ public class BrokerOptions
_logConfigFile = logConfigFile;
}
- public Integer getJmxPort()
+ public Integer getJmxPortRegistryServer()
+ {
+ return _jmxPortRegistryServer;
+ }
+
+ public void setJmxPortRegistryServer(final int jmxPortRegistryServer)
+ {
+ _jmxPortRegistryServer = jmxPortRegistryServer;
+ }
+
+ public Integer getJmxPortConnectorServer()
{
- return _jmxPort;
+ return _jmxPortConnectorServer;
}
- public void setJmxPort(final int jmxPort)
+ public void setJmxPortConnectorServer(final int jmxPortConnectorServer)
{
- _jmxPort = jmxPort;
+ _jmxPortConnectorServer = jmxPortConnectorServer;
}
public String getQpidHome()
@@ -141,8 +148,23 @@ public class BrokerOptions
return _logWatchFrequency;
}
+ /**
+ * Set the frequency with which the log config file will be checked for updates.
+ * @param logWatchFrequency frequency in seconds
+ */
public void setLogWatchFrequency(final int logWatchFrequency)
{
_logWatchFrequency = logWatchFrequency;
}
+
+ public BundleContext getBundleContext()
+ {
+ return _bundleContext ;
+ }
+
+ public void setBundleContext(final BundleContext bundleContext)
+ {
+ _bundleContext = bundleContext;
+ }
+
} \ No newline at end of file
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java
index b9a1106b44..0c038c7800 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/Main.java
@@ -27,7 +27,6 @@ import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
-import org.apache.log4j.Logger;
import org.apache.qpid.server.Broker.InitException;
import org.apache.qpid.server.registry.ApplicationRegistry;
@@ -38,10 +37,93 @@ import org.apache.qpid.server.registry.ApplicationRegistry;
*/
public class Main
{
- private static Logger _logger;
- protected final static Options options = new Options();
- protected static CommandLine commandLine;
+ private static final Option OPTION_HELP = new Option("h", "help", false, "print this message");
+
+ private static final Option OPTION_VERSION = new Option("v", "version", false, "print the version information and exit");
+
+ private static final Option OPTION_CONFIG_FILE =
+ OptionBuilder.withArgName("file").hasArg().withDescription("use given configuration file").withLongOpt("config")
+ .create("c");
+
+ private static final Option OPTION_PORT =
+ OptionBuilder.withArgName("port").hasArg()
+ .withDescription("listen on the specified port. Overrides any value in the config file")
+ .withLongOpt("port").create("p");
+
+ private static final Option OPTION_SSLPORT =
+ OptionBuilder.withArgName("port").hasArg()
+ .withDescription("SSL port. Overrides any value in the config file")
+ .withLongOpt("sslport").create("s");
+
+ private static final Option OPTION_EXCLUDE_0_10 =
+ OptionBuilder.withArgName("port").hasArg()
+ .withDescription("when listening on the specified port do not accept AMQP0-10 connections. The specified port must be one specified on the command line")
+ .withLongOpt("exclude-0-10").create();
+
+ private static final Option OPTION_EXCLUDE_0_9_1 =
+ OptionBuilder.withArgName("port").hasArg()
+ .withDescription("when listening on the specified port do not accept AMQP0-9-1 connections. The specified port must be one specified on the command line")
+ .withLongOpt("exclude-0-9-1").create();
+
+ private static final Option OPTION_EXCLUDE_0_9 =
+ OptionBuilder.withArgName("port").hasArg()
+ .withDescription("when listening on the specified port do not accept AMQP0-9 connections. The specified port must be one specified on the command line")
+ .withLongOpt("exclude-0-9").create();
+
+ private static final Option OPTION_EXCLUDE_0_8 =
+ OptionBuilder.withArgName("port").hasArg()
+ .withDescription("when listening on the specified port do not accept AMQP0-8 connections. The specified port must be one specified on the command line")
+ .withLongOpt("exclude-0-8").create();
+
+ private static final Option OPTION_JMX_PORT_REGISTRY_SERVER =
+ OptionBuilder.withArgName("port").hasArg()
+ .withDescription("listen on the specified management (registry server) port. Overrides any value in the config file")
+ .withLongOpt("jmxregistryport").create("m");
+
+ private static final Option OPTION_JMX_PORT_CONNECTOR_SERVER =
+ OptionBuilder.withArgName("port").hasArg()
+ .withDescription("listen on the specified management (connector server) port. Overrides any value in the config file")
+ .withLongOpt("jmxconnectorport").create();
+
+ private static final Option OPTION_BIND =
+ OptionBuilder.withArgName("address").hasArg()
+ .withDescription("bind to the specified address. Overrides any value in the config file")
+ .withLongOpt("bind").create("b");
+
+ private static final Option OPTION_LOG_CONFIG_FILE =
+ OptionBuilder.withArgName("file").hasArg()
+ .withDescription("use the specified log4j xml configuration file. By "
+ + "default looks for a file named " + BrokerOptions.DEFAULT_LOG_CONFIG_FILE
+ + " in the same directory as the configuration file").withLongOpt("logconfig").create("l");
+
+ private static final Option OPTION_LOG_WATCH =
+ OptionBuilder.withArgName("period").hasArg()
+ .withDescription("monitor the log file configuration file for changes. Units are seconds. "
+ + "Zero means do not check for changes.").withLongOpt("logwatch").create("w");
+
+ private static final Options OPTIONS = new Options();
+
+ static
+ {
+ OPTIONS.addOption(OPTION_HELP);
+ OPTIONS.addOption(OPTION_VERSION);
+ OPTIONS.addOption(OPTION_CONFIG_FILE);
+ OPTIONS.addOption(OPTION_LOG_CONFIG_FILE);
+ OPTIONS.addOption(OPTION_LOG_WATCH);
+ OPTIONS.addOption(OPTION_PORT);
+ OPTIONS.addOption(OPTION_SSLPORT);
+ OPTIONS.addOption(OPTION_EXCLUDE_0_10);
+ OPTIONS.addOption(OPTION_EXCLUDE_0_9_1);
+ OPTIONS.addOption(OPTION_EXCLUDE_0_9);
+ OPTIONS.addOption(OPTION_EXCLUDE_0_8);
+ OPTIONS.addOption(OPTION_BIND);
+
+ OPTIONS.addOption(OPTION_JMX_PORT_REGISTRY_SERVER);
+ OPTIONS.addOption(OPTION_JMX_PORT_CONNECTOR_SERVER);
+ }
+
+ private CommandLine commandLine;
public static void main(String[] args)
{
@@ -53,16 +135,18 @@ public class Main
System.setProperty("log4j.defaultInitOverride", "true");
}
- //now that the override status is know, we can instantiate the Loggers
- _logger = Logger.getLogger(Main.class);
- setOptions(options);
+ new Main(args);
+ }
+
+ public Main(final String[] args)
+ {
if (parseCommandline(args))
{
try
{
execute();
}
- catch(Exception e)
+ catch(Throwable e)
{
System.err.println("Exception during startup: " + e);
e.printStackTrace();
@@ -71,11 +155,11 @@ public class Main
}
}
- protected static boolean parseCommandline(String[] args)
+ protected boolean parseCommandline(final String[] args)
{
try
{
- commandLine = new PosixParser().parse(options, args);
+ commandLine = new PosixParser().parse(OPTIONS, args);
return true;
}
@@ -83,121 +167,52 @@ public class Main
{
System.err.println("Error: " + e.getMessage());
HelpFormatter formatter = new HelpFormatter();
- formatter.printHelp("Qpid", options, true);
+ formatter.printHelp("Qpid", OPTIONS, true);
return false;
}
}
- protected static void setOptions(Options options)
- {
- Option help = new Option("h", "help", false, "print this message");
- Option version = new Option("v", "version", false, "print the version information and exit");
- Option configFile =
- OptionBuilder.withArgName("file").hasArg().withDescription("use given configuration file").withLongOpt("config")
- .create("c");
- Option port =
- OptionBuilder.withArgName("port").hasArg()
- .withDescription("listen on the specified port. Overrides any value in the config file")
- .withLongOpt("port").create("p");
-
- Option exclude0_10 =
- OptionBuilder.withArgName("exclude-0-10").hasArg()
- .withDescription("when listening on the specified port do not accept AMQP0-10 connections. The specified port must be one specified on the command line")
- .withLongOpt("exclude-0-10").create();
-
- Option exclude0_9_1 =
- OptionBuilder.withArgName("exclude-0-9-1").hasArg()
- .withDescription("when listening on the specified port do not accept AMQP0-9-1 connections. The specified port must be one specified on the command line")
- .withLongOpt("exclude-0-9-1").create();
-
-
- Option exclude0_9 =
- OptionBuilder.withArgName("exclude-0-9").hasArg()
- .withDescription("when listening on the specified port do not accept AMQP0-9 connections. The specified port must be one specified on the command line")
- .withLongOpt("exclude-0-9").create();
-
-
- Option exclude0_8 =
- OptionBuilder.withArgName("exclude-0-8").hasArg()
- .withDescription("when listening on the specified port do not accept AMQP0-8 connections. The specified port must be one specified on the command line")
- .withLongOpt("exclude-0-8").create();
-
-
- Option mport =
- OptionBuilder.withArgName("mport").hasArg()
- .withDescription("listen on the specified management port. Overrides any value in the config file")
- .withLongOpt("mport").create("m");
-
-
- Option bind =
- OptionBuilder.withArgName("bind").hasArg()
- .withDescription("bind to the specified address. Overrides any value in the config file")
- .withLongOpt("bind").create(BrokerOptions.BIND);
- Option logconfig =
- OptionBuilder.withArgName("logconfig").hasArg()
- .withDescription("use the specified log4j xml configuration file. By "
- + "default looks for a file named " + BrokerOptions.DEFAULT_LOG_CONFIG_FILE
- + " in the same directory as the configuration file").withLongOpt("logconfig").create(BrokerOptions.LOG_CONFIG);
- Option logwatchconfig =
- OptionBuilder.withArgName("logwatch").hasArg()
- .withDescription("monitor the log file configuration file for changes. Units are seconds. "
- + "Zero means do not check for changes.").withLongOpt("logwatch").create(BrokerOptions.WATCH);
-
- Option sslport =
- OptionBuilder.withArgName("sslport").hasArg()
- .withDescription("SSL port. Overrides any value in the config file")
- .withLongOpt("sslport").create(BrokerOptions.SSL_PORTS);
-
- options.addOption(help);
- options.addOption(version);
- options.addOption(configFile);
- options.addOption(logconfig);
- options.addOption(logwatchconfig);
- options.addOption(port);
- options.addOption(exclude0_10);
- options.addOption(exclude0_9_1);
- options.addOption(exclude0_9);
- options.addOption(exclude0_8);
- options.addOption(mport);
- options.addOption(bind);
- options.addOption(sslport);
- }
-
- protected static void execute() throws Exception
+ protected void execute() throws Exception
{
BrokerOptions options = new BrokerOptions();
- String configFile = commandLine.getOptionValue(BrokerOptions.CONFIG);
+ String configFile = commandLine.getOptionValue(OPTION_CONFIG_FILE.getOpt());
if(configFile != null)
{
options.setConfigFile(configFile);
}
- String logWatchConfig = commandLine.getOptionValue(BrokerOptions.WATCH);
+ String logWatchConfig = commandLine.getOptionValue(OPTION_LOG_WATCH.getOpt());
if(logWatchConfig != null)
{
- options.setLogWatchFrequency(Integer.parseInt(logWatchConfig) * 1000);
+ options.setLogWatchFrequency(Integer.parseInt(logWatchConfig));
}
- String logConfig = commandLine.getOptionValue(BrokerOptions.LOG_CONFIG);
+ String logConfig = commandLine.getOptionValue(OPTION_LOG_CONFIG_FILE.getOpt());
if(logConfig != null)
{
options.setLogConfigFile(logConfig);
}
- String jmxPort = commandLine.getOptionValue(BrokerOptions.MANAGEMENT);
- if(jmxPort != null)
+ String jmxPortRegistryServer = commandLine.getOptionValue(OPTION_JMX_PORT_REGISTRY_SERVER.getOpt());
+ if(jmxPortRegistryServer != null)
+ {
+ options.setJmxPortRegistryServer(Integer.parseInt(jmxPortRegistryServer));
+ }
+
+ String jmxPortConnectorServer = commandLine.getOptionValue(OPTION_JMX_PORT_CONNECTOR_SERVER.getLongOpt());
+ if(jmxPortConnectorServer != null)
{
- options.setJmxPort(Integer.parseInt(jmxPort));
+ options.setJmxPortConnectorServer(Integer.parseInt(jmxPortConnectorServer));
}
- String bindAddr = commandLine.getOptionValue(BrokerOptions.BIND);
+ String bindAddr = commandLine.getOptionValue(OPTION_BIND.getOpt());
if (bindAddr != null)
{
options.setBind(bindAddr);
}
- String[] portStr = commandLine.getOptionValues(BrokerOptions.PORTS);
+ String[] portStr = commandLine.getOptionValues(OPTION_PORT.getOpt());
if(portStr != null)
{
parsePortArray(options, portStr, false);
@@ -207,7 +222,7 @@ public class Main
}
}
- String[] sslPortStr = commandLine.getOptionValues(BrokerOptions.SSL_PORTS);
+ String[] sslPortStr = commandLine.getOptionValues(OPTION_SSLPORT.getOpt());
if(sslPortStr != null)
{
parsePortArray(options, sslPortStr, true);
@@ -217,17 +232,23 @@ public class Main
}
}
+ startBroker(options);
+ }
+
+ protected void startBroker(final BrokerOptions options) throws Exception
+ {
Broker broker = new Broker();
broker.startup(options);
}
- protected static void shutdown(int status)
+ protected void shutdown(final int status)
{
ApplicationRegistry.remove();
System.exit(status);
}
- private static void parsePortArray(BrokerOptions options, Object[] ports, boolean ssl) throws InitException
+ private static void parsePortArray(final BrokerOptions options,final Object[] ports,
+ final boolean ssl) throws InitException
{
if(ports != null)
{
@@ -252,7 +273,8 @@ public class Main
}
}
- private static void parsePortArray(BrokerOptions options, Object[] ports, ProtocolExclusion excludedProtocol) throws InitException
+ private static void parsePortArray(final BrokerOptions options, final Object[] ports,
+ final ProtocolExclusion excludedProtocol) throws InitException
{
if(ports != null)
{
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
index 14de7c1723..9ca916a633 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/ServerConfiguration.java
@@ -39,17 +39,13 @@ import org.apache.commons.configuration.HierarchicalConfiguration;
import org.apache.commons.configuration.SystemConfiguration;
import org.apache.commons.configuration.XMLConfiguration;
import org.apache.log4j.Logger;
-import org.apache.qpid.server.configuration.management.ConfigurationManagementMBean;
import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin;
import org.apache.qpid.server.registry.ApplicationRegistry;
+import org.apache.qpid.server.signal.SignalHandlerTask;
import org.apache.qpid.server.virtualhost.VirtualHost;
import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
-import org.apache.qpid.transport.NetworkTransportConfiguration;
-import sun.misc.Signal;
-import sun.misc.SignalHandler;
-
-public class ServerConfiguration extends ConfigurationPlugin implements SignalHandler
+public class ServerConfiguration extends ConfigurationPlugin
{
protected static final Logger _logger = Logger.getLogger(ServerConfiguration.class);
@@ -60,9 +56,10 @@ public class ServerConfiguration extends ConfigurationPlugin implements SignalHa
public static final int DEFAULT_FRAME_SIZE = 65536;
public static final int DEFAULT_PORT = 5672;
- public static final int DEFAULT_SSL_PORT = 8672;
+ public static final int DEFAULT_SSL_PORT = 5671;
public static final long DEFAULT_HOUSEKEEPING_PERIOD = 30000L;
- public static final int DEFAULT_JMXPORT = 8999;
+ public static final int DEFAULT_JMXPORT_REGISTRYSERVER = 8999;
+ public static final int JMXPORT_CONNECTORSERVER_OFFSET = 100;
public static final String QPID_HOME = "QPID_HOME";
public static final String QPID_WORK = "QPID_WORK";
@@ -75,16 +72,14 @@ public class ServerConfiguration extends ConfigurationPlugin implements SignalHa
private File _configFile;
private File _vhostsFile;
- private Logger _log = Logger.getLogger(this.getClass());
-
- private ConfigurationManagementMBean _mbean;
-
// Map of environment variables to config items
private static final Map<String, String> envVarMap = new HashMap<String, String>();
// Configuration values to be read from the configuration file
//todo Move all properties to static values to ensure system testing can be performed.
public static final String MGMT_CUSTOM_REGISTRY_SOCKET = "management.custom-registry-socket";
+ public static final String MGMT_JMXPORT_REGISTRYSERVER = "management.jmxport.registryServer";
+ public static final String MGMT_JMXPORT_CONNECTORSERVER = "management.jmxport.connectorServer";
public static final String STATUS_UPDATES = "status-updates";
public static final String ADVANCED_LOCALE = "advanced.locale";
@@ -93,7 +88,8 @@ public class ServerConfiguration extends ConfigurationPlugin implements SignalHa
envVarMap.put("QPID_ENABLEDIRECTBUFFERS", "advanced.enableDirectBuffers");
envVarMap.put("QPID_SSLPORT", "connector.ssl.port");
envVarMap.put("QPID_WRITEBIASED", "advanced.useWriteBiasedPool");
- envVarMap.put("QPID_JMXPORT", "management.jmxport");
+ envVarMap.put("QPID_JMXPORT_REGISTRYSERVER", MGMT_JMXPORT_REGISTRYSERVER);
+ envVarMap.put("QPID_JMXPORT_CONNECTORSERVER", MGMT_JMXPORT_CONNECTORSERVER);
envVarMap.put("QPID_FRAMESIZE", "advanced.framesize");
envVarMap.put("QPID_MSGAUTH", "security.msg-auth");
envVarMap.put("QPID_AUTOREGISTER", "auto_register");
@@ -137,15 +133,26 @@ public class ServerConfiguration extends ConfigurationPlugin implements SignalHa
{
this(parseConfig(configurationURL));
_configFile = configurationURL;
- try
+
+ SignalHandlerTask hupReparseTask = new SignalHandlerTask()
{
- Signal sig = new sun.misc.Signal("HUP");
- sun.misc.Signal.handle(sig, this);
- }
- catch (Exception e)
+ public void handle()
+ {
+ try
+ {
+ reparseConfigFileSecuritySections();
+ }
+ catch (ConfigurationException e)
+ {
+ _logger.error("Could not reload configuration file security sections", e);
+ }
+ }
+ };
+
+ if(!hupReparseTask.register("HUP"))
{
- _logger.info("Signal HUP not supported for OS: " + System.getProperty("os.name"));
- // We're on something that doesn't handle SIGHUP, how sad, Windows.
+ _logger.info("Unable to register Signal HUP handler to reload security configuration.");
+ _logger.info("Signal HUP not supported for this OS / JVM combination - " + SignalHandlerTask.getPlatformDescription());
}
}
@@ -217,6 +224,21 @@ public class ServerConfiguration extends ConfigurationPlugin implements SignalHa
+ (_configFile == null ? "" : " Configuration file : " + _configFile);
throw new ConfigurationException(message);
}
+
+ if (getListValue("security.principal-databases.principal-database(0).class").size() > 0)
+ {
+ String message = "Validation error : security/principal-databases is no longer supported within the configuration xml."
+ + (_configFile == null ? "" : " Configuration file : " + _configFile);
+ throw new ConfigurationException(message);
+ }
+
+ // QPID-3266. Tidy up housekeeping configuration option for scheduling frequency
+ if (contains("housekeeping.expiredMessageCheckPeriod"))
+ {
+ String message = "Validation error : housekeeping/expiredMessageCheckPeriod must be replaced by housekeeping/checkPeriod."
+ + (_configFile == null ? "" : " Configuration file : " + _configFile);
+ throw new ConfigurationException(message);
+ }
}
/*
@@ -409,18 +431,6 @@ public class ServerConfiguration extends ConfigurationPlugin implements SignalHa
return _configFile == null ? "" : _configFile.getAbsolutePath();
}
- public void handle(Signal arg0)
- {
- try
- {
- reparseConfigFileSecuritySections();
- }
- catch (ConfigurationException e)
- {
- _logger.error("Could not reload configuration file security sections", e);
- }
- }
-
public void reparseConfigFileSecuritySections() throws ConfigurationException
{
if (_configFile != null)
@@ -464,14 +474,24 @@ public class ServerConfiguration extends ConfigurationPlugin implements SignalHa
return System.getProperty(QPID_HOME);
}
- public void setJMXManagementPort(int mport)
+ public void setJMXPortRegistryServer(int registryServerPort)
+ {
+ getConfig().setProperty(MGMT_JMXPORT_REGISTRYSERVER, registryServerPort);
+ }
+
+ public int getJMXPortRegistryServer()
+ {
+ return getIntValue(MGMT_JMXPORT_REGISTRYSERVER, DEFAULT_JMXPORT_REGISTRYSERVER);
+ }
+
+ public void setJMXPortConnectorServer(int connectorServerPort)
{
- getConfig().setProperty("management.jmxport", mport);
+ getConfig().setProperty(MGMT_JMXPORT_CONNECTORSERVER, connectorServerPort);
}
- public int getJMXManagementPort()
+ public int getJMXConnectorServerPort()
{
- return getIntValue("management.jmxport", DEFAULT_JMXPORT);
+ return getIntValue(MGMT_JMXPORT_CONNECTORSERVER, getJMXPortRegistryServer() + JMXPORT_CONNECTORSERVER_OFFSET);
}
public boolean getUseCustomRMISocketFactory()
@@ -514,28 +534,6 @@ public class ServerConfiguration extends ConfigurationPlugin implements SignalHa
_virtualHosts.put(config.getName(), config);
}
- public List<String> getPrincipalDatabaseNames()
- {
- return getListValue("security.principal-databases.principal-database.name");
- }
-
- public List<String> getPrincipalDatabaseClass()
- {
- return getListValue("security.principal-databases.principal-database.class");
- }
-
- public List<String> getPrincipalDatabaseAttributeNames(int index)
- {
- String name = "security.principal-databases.principal-database(" + index + ")." + "attributes.attribute.name";
- return getListValue(name);
- }
-
- public List<String> getPrincipalDatabaseAttributeValues(int index)
- {
- String name = "security.principal-databases.principal-database(" + index + ")." + "attributes.attribute.value";
- return getListValue(name);
- }
-
public int getFrameSize()
{
return getIntValue("advanced.framesize", DEFAULT_FRAME_SIZE);
@@ -703,12 +701,12 @@ public class ServerConfiguration extends ConfigurationPlugin implements SignalHa
public String getKeystorePath()
{
- return getStringValue("connector.ssl.keystorePath", "none");
+ return getStringValue("connector.ssl.keystorePath");
}
public String getKeystorePassword()
{
- return getStringValue("connector.ssl.keystorePassword", "none");
+ return getStringValue("connector.ssl.keystorePassword");
}
public String getCertType()
@@ -731,16 +729,14 @@ public class ServerConfiguration extends ConfigurationPlugin implements SignalHa
getConfig().setProperty("virtualhosts.default", vhost);
}
- public void setHousekeepingExpiredMessageCheckPeriod(long value)
+ public void setHousekeepingCheckPeriod(long value)
{
- getConfig().setProperty("housekeeping.expiredMessageCheckPeriod", value);
+ getConfig().setProperty("housekeeping.checkPeriod", value);
}
public long getHousekeepingCheckPeriod()
{
- return getLongValue("housekeeping.checkPeriod",
- getLongValue("housekeeping.expiredMessageCheckPeriod",
- DEFAULT_HOUSEKEEPING_PERIOD));
+ return getLongValue("housekeeping.checkPeriod", DEFAULT_HOUSEKEEPING_PERIOD);
}
public long getStatisticsSamplePeriod()
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java
index a710230616..6729a5ce0f 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/configuration/VirtualHostConfiguration.java
@@ -86,9 +86,9 @@ public class VirtualHostConfiguration extends ConfigurationPlugin
return _name;
}
- public long getHousekeepingExpiredMessageCheckPeriod()
+ public long getHousekeepingCheckPeriod()
{
- return getLongValue("housekeeping.expiredMessageCheckPeriod", ApplicationRegistry.getInstance().getConfiguration().getHousekeepingCheckPeriod());
+ return getLongValue("housekeeping.checkPeriod", ApplicationRegistry.getInstance().getConfiguration().getHousekeepingCheckPeriod());
}
public String getAuthenticationDatabase()
@@ -313,6 +313,14 @@ public class VirtualHostConfiguration extends ConfigurationPlugin
+ " It appears in virtual host definition : " + _name;
throw new ConfigurationException(message);
}
+
+ // QPID-3266. Tidy up housekeeping configuration option for scheduling frequency
+ if (contains("housekeeping.expiredMessageCheckPeriod"))
+ {
+ String message = "Validation error : housekeeping/expiredMessageCheckPeriod must be replaced by housekeeping/checkPeriod."
+ + " It appears in virtual host definition : " + _name;
+ throw new ConfigurationException(message);
+ }
}
public int getHouseKeepingThreadCount()
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java
index 3786c2020c..1c01ce465d 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/connection/ConnectionRegistry.java
@@ -29,6 +29,8 @@ import org.apache.qpid.AMQException;
import org.apache.qpid.common.Closeable;
import org.apache.qpid.protocol.AMQConstant;
import org.apache.qpid.server.protocol.AMQConnectionModel;
+import org.apache.qpid.server.protocol.AMQProtocolEngine;
+import org.apache.qpid.transport.TransportException;
public class ConnectionRegistry implements IConnectionRegistry, Closeable
{
@@ -44,19 +46,24 @@ public class ConnectionRegistry implements IConnectionRegistry, Closeable
/** Close all of the currently open connections. */
public void close()
{
+ _logger.debug("Closing connection registry :" + _registry.size() + " connections.");
while (!_registry.isEmpty())
{
AMQConnectionModel connection = _registry.get(0);
- closeConnection(connection, AMQConstant.INTERNAL_ERROR, "Broker is shutting down");
+ closeConnection(connection, AMQConstant.CONNECTION_FORCED, "Broker is shutting down");
}
}
-
+
public void closeConnection(AMQConnectionModel connection, AMQConstant cause, String message)
{
try
{
connection.close(cause, message);
}
+ catch (TransportException e)
+ {
+ _logger.warn("Error closing connection:" + e.getMessage());
+ }
catch (AMQException e)
{
_logger.warn("Error closing connection:" + e.getMessage());
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
index d0231e4d80..d693c6962b 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/AbstractExchange.java
@@ -356,7 +356,7 @@ public abstract class AbstractExchange implements Exchange, Managable
_receivedMessageCount.incrementAndGet();
_receivedMessageSize.addAndGet(message.getSize());
final ArrayList<? extends BaseQueue> queues = doRoute(message);
- if(queues != null && !queues.isEmpty())
+ if(!queues.isEmpty())
{
_routedMessageCount.incrementAndGet();
_routedMessageSize.addAndGet(message.getSize());
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/Exchange.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/Exchange.java
index 356a7f89b9..29a3611709 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/Exchange.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/Exchange.java
@@ -30,15 +30,12 @@ import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.queue.BaseQueue;
import org.apache.qpid.server.virtualhost.VirtualHost;
import org.apache.qpid.server.message.InboundMessage;
-import org.apache.qpid.server.binding.BindingFactory;
import org.apache.qpid.server.binding.Binding;
import org.apache.qpid.server.configuration.ExchangeConfig;
import javax.management.JMException;
import java.util.ArrayList;
-import java.util.List;
import java.util.Collection;
-import java.util.concurrent.CopyOnWriteArrayList;
public interface Exchange extends ExchangeReferrer, ExchangeConfig
{
@@ -67,7 +64,12 @@ public interface Exchange extends ExchangeReferrer, ExchangeConfig
void close() throws AMQException;
-
+ /**
+ * Returns a list of queues to which to route this message. If there are
+ * no queues the empty list must be returned.
+ *
+ * @return list of queues to which to route the message.
+ */
ArrayList<? extends BaseQueue> route(InboundMessage message);
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/headers/HeadersParser.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/headers/HeadersParser.java
index 0e3a3894fe..d76b163fa1 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/headers/HeadersParser.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/exchange/headers/HeadersParser.java
@@ -274,132 +274,6 @@ public class HeadersParser
}
- public static void main(String[] args) throws AMQFrameDecodingException
- {
-
- FieldTable bindingTable = new FieldTable();
-
- bindingTable.setString(new AMQShortString("x-match"),"all");
- bindingTable.setInteger("a",1);
- bindingTable.setVoid(new AMQShortString("b"));
- bindingTable.setString("c","");
- bindingTable.setInteger("d",4);
- bindingTable.setInteger("e",1);
-
-
-
- FieldTable bindingTable2 = new FieldTable();
- bindingTable2.setString(new AMQShortString("x-match"),"all");
- bindingTable2.setInteger("a",1);
- bindingTable2.setVoid(new AMQShortString("b"));
- bindingTable2.setString("c","");
- bindingTable2.setInteger("d",4);
- bindingTable2.setInteger("e",1);
- bindingTable2.setInteger("f",1);
-
-
- FieldTable table = new FieldTable();
- table.setInteger("a",1);
- table.setInteger("b",2);
- table.setString("c","");
- table.setInteger("d",4);
- table.setInteger("e",1);
- table.setInteger("f",1);
- table.setInteger("h",1);
- table.setInteger("i",1);
- table.setInteger("j",1);
- table.setInteger("k",1);
- table.setInteger("l",1);
-
- org.apache.mina.common.ByteBuffer buffer = org.apache.mina.common.ByteBuffer.allocate( (int) table.getEncodedSize());
- EncodingUtils.writeFieldTableBytes(buffer, table);
- buffer.flip();
-
- FieldTable table2 = EncodingUtils.readFieldTable(buffer);
-
-
-
- FieldTable bindingTable3 = new FieldTable();
- bindingTable3.setString(new AMQShortString("x-match"),"any");
- bindingTable3.setInteger("a",1);
- bindingTable3.setInteger("b",3);
-
-
- FieldTable bindingTable4 = new FieldTable();
- bindingTable4.setString(new AMQShortString("x-match"),"any");
- bindingTable4.setVoid(new AMQShortString("a"));
-
-
- FieldTable bindingTable5 = new FieldTable();
- bindingTable5.setString(new AMQShortString("x-match"),"all");
- bindingTable5.setString(new AMQShortString("h"),"hello");
-
- for(int i = 0; i < 100; i++)
- {
- printMatches(new FieldTable[] {bindingTable5} , table2);
- }
-
-
-
- }
-
-
-
- private static void printMatches(final FieldTable[] bindingKeys, final FieldTable routingKey)
- {
- HeadersMatcherDFAState sm = null;
- Map<HeaderMatcherResult, String> resultMap = new HashMap<HeaderMatcherResult, String>();
-
- HeadersParser parser = new HeadersParser();
-
- for(int i = 0; i < bindingKeys.length; i++)
- {
- HeaderMatcherResult r = new HeaderMatcherResult();
- resultMap.put(r, bindingKeys[i].toString());
-
-
- if(i==0)
- {
- sm = parser.createStateMachine(bindingKeys[i], r);
- }
- else
- {
- sm = sm.mergeStateMachines(parser.createStateMachine(bindingKeys[i], r));
- }
- }
-
- Collection<HeaderMatcherResult> results = null;
- long beforeTime = System.currentTimeMillis();
- for(int i = 0; i < 1000000; i++)
- {
- routingKey.size();
-
- assert sm != null;
- results = sm.match(routingKey);
-
- }
- long elapsed = System.currentTimeMillis() - beforeTime;
- System.out.println("1000000 Iterations took: " + elapsed);
- Collection<String> resultStrings = new ArrayList<String>();
-
- assert results != null;
- for(HeaderMatcherResult result : results)
- {
- resultStrings.add(resultMap.get(result));
- }
-
- final ArrayList<String> nonMatches = new ArrayList<String>();
- for(FieldTable key : bindingKeys)
- {
- nonMatches.add(key.toString());
- }
- nonMatches.removeAll(resultStrings);
- System.out.println("\""+routingKey+"\" matched with " + resultStrings + " DID NOT MATCH with " + nonMatches);
-
-
- }
-
-
public final static class KeyValuePair
{
public final HeaderKey _key;
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/Bridge.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/Bridge.java
index fbc5387daf..2dff45c326 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/Bridge.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/Bridge.java
@@ -38,6 +38,7 @@ import org.apache.qpid.server.queue.BaseQueue;
import org.apache.qpid.server.queue.QueueRegistry;
import org.apache.qpid.server.store.MessageStore;
import org.apache.qpid.server.store.StoredMessage;
+import org.apache.qpid.server.subscription.SubscriptionFactoryImpl;
import org.apache.qpid.server.subscription.Subscription_0_10;
import org.apache.qpid.server.transport.ServerSession;
import org.apache.qpid.server.txn.AutoCommitTransaction;
@@ -696,7 +697,7 @@ public class Bridge implements BridgeConfig
//TODO Handle the passing of non-null Filters and Arguments here
- Subscription_0_10 sub = new Subscription_0_10((ServerSession)session,
+ Subscription_0_10 sub = SubscriptionFactoryImpl.INSTANCE.createSubscription((ServerSession)session,
_destination,
MessageAcceptMode.NONE,
MessageAcquireMode.PRE_ACQUIRED,
@@ -768,7 +769,7 @@ public class Bridge implements BridgeConfig
//TODO Handle the passing of non-null Filters and Arguments here
- Subscription_0_10 sub = new Subscription_0_10((ServerSession)session,
+ Subscription_0_10 sub = SubscriptionFactoryImpl.INSTANCE.createSubscription((ServerSession)session,
_destination,
MessageAcceptMode.NONE,
MessageAcquireMode.PRE_ACQUIRED,
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/BrokerLink.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/BrokerLink.java
index fa2fb9ead1..f21158cd0c 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/BrokerLink.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/federation/BrokerLink.java
@@ -258,7 +258,6 @@ public class BrokerLink implements LinkConfig, ConnectionListener
_remoteFederationTag = UUID.fromString(_transport+":"+_host+":"+_port).toString();
}
_qpidConnection.setSessionFactory(new SessionFactory());
- _qpidConnection.setAuthorizationID(_username == null ? "" : _username);
updateState(State.ESTABLISHING, State.OPERATIONAL);
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java
index 790027f293..14ce85530e 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/BasicGetMethodHandler.java
@@ -162,14 +162,7 @@ public class BasicGetMethodHandler implements StateAwareMethodListener<BasicGetB
}
else
{
- sub = new GetNoAckSubscription(channel,
- session,
- null,
- null,
- false,
- singleMessageCredit,
- getDeliveryMethod,
- getRecordMethod);
+ sub = SubscriptionFactoryImpl.INSTANCE.createBasicGetNoAckSubscription(channel, session, null, null, false, singleMessageCredit, getDeliveryMethod, getRecordMethod);
}
queue.registerSubscription(sub,false);
@@ -180,27 +173,5 @@ public class BasicGetMethodHandler implements StateAwareMethodListener<BasicGetB
}
- public static final class GetNoAckSubscription extends SubscriptionImpl.NoAckSubscription
- {
- public GetNoAckSubscription(AMQChannel channel, AMQProtocolSession protocolSession,
- AMQShortString consumerTag, FieldTable filters,
- boolean noLocal, FlowCreditManager creditManager,
- ClientDeliveryMethod deliveryMethod,
- RecordDeliveryMethod recordMethod)
- throws AMQException
- {
- super(channel, protocolSession, consumerTag, filters, noLocal, creditManager, deliveryMethod, recordMethod);
- }
- public boolean isTransient()
- {
- return true;
- }
-
- public boolean wouldSuspend(QueueEntry msg)
- {
- return !getCreditManager().useCreditForMessage(msg.getMessage());
- }
-
- }
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionCloseMethodHandler.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionCloseMethodHandler.java
index dade5d5f54..f8e4eab0b6 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionCloseMethodHandler.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionCloseMethodHandler.java
@@ -68,5 +68,7 @@ public class ConnectionCloseMethodHandler implements StateAwareMethodListener<Co
ConnectionCloseOkBody responseBody = methodRegistry.createConnectionCloseOkBody();
session.writeFrame(responseBody.generateFrame(channelId));
+ session.closeProtocolSession();
+
}
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionSecureOkMethodHandler.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionSecureOkMethodHandler.java
index 79de0678f0..09f35da41d 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionSecureOkMethodHandler.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionSecureOkMethodHandler.java
@@ -23,7 +23,6 @@ package org.apache.qpid.server.handler;
import javax.security.sasl.SaslException;
import javax.security.sasl.SaslServer;
-
import org.apache.log4j.Logger;
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.ConnectionCloseBody;
@@ -89,7 +88,10 @@ public class ConnectionSecureOkMethodHandler implements StateAwareMethodListener
disposeSaslServer(session);
break;
case SUCCESS:
- _logger.info("Connected as: " + ss.getAuthorizationID());
+ if (_logger.isInfoEnabled())
+ {
+ _logger.info("Connected as: " + UsernamePrincipal.getUsernamePrincipalFromSubject(authResult.getSubject()));
+ }
stateManager.changeState(AMQState.CONNECTION_NOT_TUNED);
ConnectionTuneBody tuneBody =
@@ -97,8 +99,7 @@ public class ConnectionSecureOkMethodHandler implements StateAwareMethodListener
ConnectionStartOkMethodHandler.getConfiguredFrameSize(),
ApplicationRegistry.getInstance().getConfiguration().getHeartBeatDelay());
session.writeFrame(tuneBody.generateFrame(0));
- final UsernamePrincipal principal = UsernamePrincipal.getUsernamePrincipalFromSubject(authResult.getSubject());
- session.setAuthorizedID(principal);
+ session.setAuthorizedSubject(authResult.getSubject());
disposeSaslServer(session);
break;
case CONTINUE:
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java
index 544bd62ed8..2dd9a63540 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/ConnectionStartOkMethodHandler.java
@@ -65,7 +65,6 @@ public class ConnectionStartOkMethodHandler implements StateAwareMethodListener<
_logger.info("Locale selected: " + body.getLocale());
AuthenticationManager authMgr = ApplicationRegistry.getInstance().getAuthenticationManager();
-
SaslServer ss = null;
try
{
@@ -78,8 +77,7 @@ public class ConnectionStartOkMethodHandler implements StateAwareMethodListener<
session.setSaslServer(ss);
- AuthenticationResult authResult = authMgr.authenticate(ss, body.getResponse());
-
+ final AuthenticationResult authResult = authMgr.authenticate(ss, body.getResponse());
//save clientProperties
if (session.getClientProperties() == null)
{
@@ -108,8 +106,11 @@ public class ConnectionStartOkMethodHandler implements StateAwareMethodListener<
break;
case SUCCESS:
- _logger.info("Connected as: " + ss.getAuthorizationID());
- session.setAuthorizedID(new UsernamePrincipal(ss.getAuthorizationID()));
+ if (_logger.isInfoEnabled())
+ {
+ _logger.info("Connected as: " + UsernamePrincipal.getUsernamePrincipalFromSubject(authResult.getSubject()));
+ }
+ session.setAuthorizedSubject(authResult.getSubject());
stateManager.changeState(AMQState.CONNECTION_NOT_TUNED);
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java
index 8939cfa334..0cfed77f2e 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/handler/QueueDeclareHandler.java
@@ -106,7 +106,7 @@ public class QueueDeclareHandler implements StateAwareMethodListener<QueueDeclar
else
{
queue = createQueue(queueName, body, virtualHost, protocolConnection);
- queue.setPrincipalHolder(protocolConnection);
+ queue.setAuthorizationHolder(protocolConnection);
if (queue.isDurable() && !queue.isAutoDelete())
{
store.createQueue(queue, body.getArguments());
@@ -119,7 +119,7 @@ public class QueueDeclareHandler implements StateAwareMethodListener<QueueDeclar
if (body.getExclusive())
{
queue.setExclusiveOwningSession(protocolConnection.getChannel(channelId));
- queue.setPrincipalHolder(protocolConnection);
+ queue.setAuthorizationHolder(protocolConnection);
if(!body.getDurable())
{
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/ManagementActor.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/ManagementActor.java
index 2825fa1b75..286fc78719 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/ManagementActor.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/actors/ManagementActor.java
@@ -20,11 +20,15 @@
*/
package org.apache.qpid.server.logging.actors;
-import org.apache.qpid.server.logging.LogMessage;
-import org.apache.qpid.server.logging.LogSubject;
import org.apache.qpid.server.logging.RootMessageLogger;
+import java.security.AccessController;
+import java.security.Principal;
import java.text.MessageFormat;
+import java.util.Set;
+
+import javax.management.remote.JMXPrincipal;
+import javax.security.auth.Subject;
/**
* NOTE: This actor is not thread safe.
@@ -40,16 +44,23 @@ import java.text.MessageFormat;
*/
public class ManagementActor extends AbstractActor
{
+ /**
+ * Holds the principal name to display when principal subject is not available.
+ * <p>
+ * This is useful for cases when users invoke JMX operation over JConsole
+ * attached to the local JVM.
+ */
+ private static final String UNKNOWN_PRINCIPAL = "N/A";
+
String _lastThreadName = null;
/**
* LOG FORMAT for the ManagementActor,
- * Uses a MessageFormat call to insert the requried values according to
- * these indicies:
+ * Uses a MessageFormat call to insert the required values according to
+ * these indices:
*
- * 0 - Connection ID
- * 1 - User ID
- * 2 - IP
+ * 0 - User ID
+ * 1 - IP
*/
public static final String MANAGEMENT_FORMAT = "mng:{0}({1})";
@@ -75,19 +86,20 @@ public class ManagementActor extends AbstractActor
_lastThreadName = currentName;
// Management Thread names have this format.
- //RMI TCP Connection(2)-169.24.29.116
+ // RMI TCP Connection(2)-169.24.29.116
// This is true for both LocalAPI and JMX Connections
// However to be defensive lets test.
String[] split = currentName.split("\\(");
if (split.length == 2)
{
- String connectionID = split[1].split("\\)")[0];
String ip = currentName.split("-")[1];
-
- actor = MessageFormat.format(MANAGEMENT_FORMAT,
- connectionID,
- ip);
+ String principalName = getPrincipalName();
+ if (principalName == null)
+ {
+ principalName = UNKNOWN_PRINCIPAL;
+ }
+ actor = MessageFormat.format(MANAGEMENT_FORMAT, principalName, ip);
}
else
{
@@ -105,6 +117,30 @@ public class ManagementActor extends AbstractActor
}
}
+ /**
+ * Returns current JMX principal name.
+ *
+ * @return principal name or null if principal can not be found
+ */
+ protected String getPrincipalName()
+ {
+ String identity = null;
+
+ // retrieve Subject from current AccessControlContext
+ final Subject subject = Subject.getSubject(AccessController.getContext());
+ if (subject != null)
+ {
+ // retrieve JMXPrincipal from Subject
+ final Set<JMXPrincipal> principals = subject.getPrincipals(JMXPrincipal.class);
+ if (principals != null && !principals.isEmpty())
+ {
+ final Principal principal = principals.iterator().next();
+ identity = principal.getName();
+ }
+ }
+ return identity;
+ }
+
public String getLogMessage()
{
updateLogString();
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Exchange_logmessages.properties b/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Exchange_logmessages.properties
index b9890d9f27..b25a6a7301 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Exchange_logmessages.properties
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/Exchange_logmessages.properties
@@ -21,4 +21,5 @@
# 0 - type
# 1 - name
CREATED = EXH-1001 : Create :[ Durable] Type: {0} Name: {1}
-DELETED = EXH-1002 : Deleted \ No newline at end of file
+DELETED = EXH-1002 : Deleted
+DISCARDMSG = EXH-1003 : Discarded Message : Name: {0} Routing Key: {1}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/ManagementConsole_logmessages.properties b/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/ManagementConsole_logmessages.properties
index ab77476da2..ac77f674f2 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/ManagementConsole_logmessages.properties
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/messages/ManagementConsole_logmessages.properties
@@ -30,4 +30,4 @@ STOPPED = MNG-1005 : Stopped
# 0 - Path
SSL_KEYSTORE = MNG-1006 : Using SSL Keystore : {0}
OPEN = MNG-1007 : Open : User {0}
-CLOSE = MNG-1008 : Close \ No newline at end of file
+CLOSE = MNG-1008 : Close : User {0} \ No newline at end of file
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/subjects/ChannelLogSubject.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/subjects/ChannelLogSubject.java
index f28873940b..9b357403a8 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/subjects/ChannelLogSubject.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/subjects/ChannelLogSubject.java
@@ -47,7 +47,7 @@ public class ChannelLogSubject extends AbstractLogSubject
*/
setLogStringWithFormat(CHANNEL_FORMAT,
session.getSessionID(),
- session.getPrincipal().getName(),
+ session.getAuthorizedPrincipal().getName(),
session.getRemoteAddress(),
session.getVirtualHost().getName(),
channel.getChannelId());
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/subjects/ConnectionLogSubject.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/subjects/ConnectionLogSubject.java
index a697029d24..c1c836f9b4 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/subjects/ConnectionLogSubject.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/logging/subjects/ConnectionLogSubject.java
@@ -56,7 +56,7 @@ public class ConnectionLogSubject extends AbstractLogSubject
{
if (!_upToDate)
{
- if (_session.getPrincipal() != null)
+ if (_session.getAuthorizedPrincipal() != null)
{
if (_session.getVirtualHost() != null)
{
@@ -72,7 +72,7 @@ public class ConnectionLogSubject extends AbstractLogSubject
*/
_logString = "[" + MessageFormat.format(CONNECTION_FORMAT,
_session.getSessionID(),
- _session.getPrincipal().getName(),
+ _session.getAuthorizedPrincipal().getName(),
_session.getRemoteAddress(),
_session.getVirtualHost().getName())
+ "] ";
@@ -83,7 +83,7 @@ public class ConnectionLogSubject extends AbstractLogSubject
{
_logString = "[" + MessageFormat.format(USER_FORMAT,
_session.getSessionID(),
- _session.getPrincipal().getName(),
+ _session.getAuthorizedPrincipal().getName(),
_session.getRemoteAddress())
+ "] ";
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java
index 6a34ff4a26..b44964f176 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/management/JMXManagedObjectRegistry.java
@@ -72,15 +72,14 @@ public class JMXManagedObjectRegistry implements ManagedObjectRegistry
{
private static final Logger _log = Logger.getLogger(JMXManagedObjectRegistry.class);
- public static final String MANAGEMENT_PORT_CONFIG_PATH = "management.jmxport";
- public static final int MANAGEMENT_PORT_DEFAULT = 8999;
- public static final int PORT_EXPORT_OFFSET = 100;
-
private final MBeanServer _mbeanServer;
private JMXConnectorServer _cs;
private Registry _rmiRegistry;
private boolean _useCustomSocketFactory;
+ private final int _jmxPortRegistryServer;
+ private final int _jmxPortConnectorServer;
+
public JMXManagedObjectRegistry() throws AMQException
{
_log.info("Initialising managed object registry using platform MBean server");
@@ -93,8 +92,11 @@ public class JMXManagedObjectRegistry implements ManagedObjectRegistry
_mbeanServer =
platformServer ? ManagementFactory.getPlatformMBeanServer()
: MBeanServerFactory.createMBeanServer(ManagedObject.DOMAIN);
- }
+ _jmxPortRegistryServer = appRegistry.getConfiguration().getJMXPortRegistryServer();
+ _jmxPortConnectorServer = appRegistry.getConfiguration().getJMXConnectorServerPort();
+
+ }
public void start() throws IOException, ConfigurationException
{
@@ -109,7 +111,6 @@ public class JMXManagedObjectRegistry implements ManagedObjectRegistry
}
IApplicationRegistry appRegistry = ApplicationRegistry.getInstance();
- int port = appRegistry.getConfiguration().getJMXManagementPort();
//Socket factories for the RMIConnectorServer, either default or SLL depending on configuration
@@ -204,14 +205,14 @@ public class JMXManagedObjectRegistry implements ManagedObjectRegistry
System.setProperty("java.rmi.server.randomIDs", "true");
if(_useCustomSocketFactory)
{
- _rmiRegistry = LocateRegistry.createRegistry(port, null, new CustomRMIServerSocketFactory());
+ _rmiRegistry = LocateRegistry.createRegistry(_jmxPortRegistryServer, null, new CustomRMIServerSocketFactory());
}
else
{
- _rmiRegistry = LocateRegistry.createRegistry(port, null, null);
+ _rmiRegistry = LocateRegistry.createRegistry(_jmxPortRegistryServer, null, null);
}
- CurrentActor.get().message(ManagementConsoleMessages.LISTENING("RMI Registry", port));
+ CurrentActor.get().message(ManagementConsoleMessages.LISTENING("RMI Registry", _jmxPortRegistryServer));
/*
* We must now create the RMI ConnectorServer manually, as the JMX Factory methods use RMI calls
@@ -222,7 +223,7 @@ public class JMXManagedObjectRegistry implements ManagedObjectRegistry
* The registry is exported on the defined management port 'port'. We will export the RMIConnectorServer
* on 'port +1'. Use of these two well-defined ports will ease any navigation through firewall's.
*/
- final RMIServerImpl rmiConnectorServerStub = new RMIJRMPServerImpl(port+PORT_EXPORT_OFFSET, csf, ssf, env);
+ final RMIServerImpl rmiConnectorServerStub = new RMIJRMPServerImpl(_jmxPortConnectorServer, csf, ssf, env);
String localHost;
try
{
@@ -234,9 +235,9 @@ public class JMXManagedObjectRegistry implements ManagedObjectRegistry
}
final String hostname = localHost;
final JMXServiceURL externalUrl = new JMXServiceURL(
- "service:jmx:rmi://"+hostname+":"+(port+PORT_EXPORT_OFFSET)+"/jndi/rmi://"+hostname+":"+port+"/jmxrmi");
+ "service:jmx:rmi://"+hostname+":"+(_jmxPortConnectorServer)+"/jndi/rmi://"+hostname+":"+_jmxPortRegistryServer+"/jmxrmi");
- final JMXServiceURL internalUrl = new JMXServiceURL("rmi", hostname, port+PORT_EXPORT_OFFSET);
+ final JMXServiceURL internalUrl = new JMXServiceURL("rmi", hostname, _jmxPortConnectorServer);
_cs = new RMIConnectorServer(internalUrl, env, rmiConnectorServerStub, _mbeanServer)
{
@Override
@@ -305,7 +306,7 @@ public class JMXManagedObjectRegistry implements ManagedObjectRegistry
_cs.start();
String connectorServer = (sslEnabled ? "SSL " : "") + "JMX RMIConnectorServer";
- CurrentActor.get().message(ManagementConsoleMessages.LISTENING(connectorServer, port + PORT_EXPORT_OFFSET));
+ CurrentActor.get().message(ManagementConsoleMessages.LISTENING(connectorServer, _jmxPortConnectorServer));
CurrentActor.get().message(ManagementConsoleMessages.READY(false));
}
@@ -400,7 +401,7 @@ public class JMXManagedObjectRegistry implements ManagedObjectRegistry
if (_rmiRegistry != null)
{
// Stopping the RMI registry
- CurrentActor.get().message(ManagementConsoleMessages.SHUTTING_DOWN("RMI Registry", _cs.getAddress().getPort() - PORT_EXPORT_OFFSET));
+ CurrentActor.get().message(ManagementConsoleMessages.SHUTTING_DOWN("RMI Registry", _jmxPortRegistryServer));
try
{
UnicastRemoteObject.unexportObject(_rmiRegistry, false);
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java
index ce6bd3ee33..169195304c 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/management/MBeanInvocationHandlerImpl.java
@@ -26,7 +26,6 @@ import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.security.AccessControlContext;
import java.security.AccessController;
-import java.security.Principal;
import java.util.Set;
import javax.management.Attribute;
@@ -43,7 +42,6 @@ import javax.management.remote.MBeanServerForwarder;
import javax.security.auth.Subject;
import org.apache.log4j.Logger;
-import org.apache.qpid.server.logging.actors.CurrentActor;
import org.apache.qpid.server.logging.actors.ManagementActor;
import org.apache.qpid.server.logging.messages.ManagementConsoleMessages;
import org.apache.qpid.server.registry.ApplicationRegistry;
@@ -51,17 +49,13 @@ import org.apache.qpid.server.security.SecurityManager;
import org.apache.qpid.server.security.access.Operation;
/**
- * This class can be used by the JMXConnectorServer as an InvocationHandler for the mbean operations. This implements
- * the logic for allowing the users to invoke MBean operations and implements the restrictions for readOnly, readWrite
- * and admin users.
+ * This class can be used by the JMXConnectorServer as an InvocationHandler for the mbean operations. It delegates
+ * JMX access decisions to the SecurityPlugin.
*/
public class MBeanInvocationHandlerImpl implements InvocationHandler, NotificationListener
{
private static final Logger _logger = Logger.getLogger(MBeanInvocationHandlerImpl.class);
- public final static String ADMIN = "admin";
- public final static String READWRITE = "readwrite";
- public final static String READONLY = "readonly";
private final static String DELEGATE = "JMImplementation:type=MBeanServerDelegate";
private MBeanServer _mbs;
private static ManagementActor _logActor;
@@ -135,14 +129,13 @@ public class MBeanInvocationHandlerImpl implements InvocationHandler, Notificati
Set<JMXPrincipal> principals = subject.getPrincipals(JMXPrincipal.class);
if (principals == null || principals.isEmpty())
{
- throw new SecurityException("Access denied: no principal");
+ throw new SecurityException("Access denied: no JMX principal");
}
-
- // Save the principal
- Principal principal = principals.iterator().next();
- SecurityManager.setThreadPrincipal(principal);
-
- // Get the component, type and impact, which may be null
+
+ // Save the subject
+ SecurityManager.setThreadSubject(subject);
+
+ // Get the component, type and impact, which may be null
String type = getType(method, args);
String vhost = getVirtualHost(method, args);
int impact = getImpact(method, args);
@@ -284,7 +277,7 @@ public class MBeanInvocationHandlerImpl implements InvocationHandler, Notificati
}
catch (JMException ex)
{
- ex.printStackTrace();
+ _logger.error("Unable to determine mbean impact for method : " + mbeanMethod, ex);
}
}
@@ -320,7 +313,7 @@ public class MBeanInvocationHandlerImpl implements InvocationHandler, Notificati
else if (notification.getType().equals(JMXConnectionNotification.CLOSED) ||
notification.getType().equals(JMXConnectionNotification.FAILED))
{
- _logActor.message(ManagementConsoleMessages.CLOSE());
+ _logActor.message(ManagementConsoleMessages.CLOSE(user));
}
}
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData.java
index 66cb7ed83b..5992e42fb7 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData.java
@@ -29,7 +29,10 @@ import org.apache.qpid.framing.abstraction.MessagePublishInfo;
import org.apache.qpid.server.store.StorableMessageMetaData;
import org.apache.qpid.server.store.MessageMetaDataType;
import org.apache.qpid.AMQException;
+import org.apache.qpid.server.util.ByteBufferInputStream;
+import org.apache.qpid.server.util.ByteBufferOutputStream;
+import java.io.*;
import java.nio.ByteBuffer;
import java.util.Set;
@@ -120,38 +123,38 @@ public class MessageMetaData implements StorableMessageMetaData
return size;
}
+
public int writeToBuffer(int offset, ByteBuffer dest)
{
- ByteBuffer src = ByteBuffer.allocate((int)getStorableSize());
-
- org.apache.mina.common.ByteBuffer minaSrc = org.apache.mina.common.ByteBuffer.wrap(src);
- EncodingUtils.writeInteger(minaSrc, _contentHeaderBody.getSize());
- _contentHeaderBody.writePayload(minaSrc);
- EncodingUtils.writeShortStringBytes(minaSrc, _messagePublishInfo.getExchange());
- EncodingUtils.writeShortStringBytes(minaSrc, _messagePublishInfo.getRoutingKey());
- byte flags = 0;
- if(_messagePublishInfo.isMandatory())
- {
- flags |= MANDATORY_FLAG;
- }
- if(_messagePublishInfo.isImmediate())
+ int oldPosition = dest.position();
+ try
{
- flags |= IMMEDIATE_FLAG;
+
+ DataOutputStream dataOutputStream = new DataOutputStream(new ByteBufferOutputStream(dest));
+ EncodingUtils.writeInteger(dataOutputStream, _contentHeaderBody.getSize());
+ _contentHeaderBody.writePayload(dataOutputStream);
+ EncodingUtils.writeShortStringBytes(dataOutputStream, _messagePublishInfo.getExchange());
+ EncodingUtils.writeShortStringBytes(dataOutputStream, _messagePublishInfo.getRoutingKey());
+ byte flags = 0;
+ if(_messagePublishInfo.isMandatory())
+ {
+ flags |= MANDATORY_FLAG;
+ }
+ if(_messagePublishInfo.isImmediate())
+ {
+ flags |= IMMEDIATE_FLAG;
+ }
+ dest.put(flags);
+ dest.putLong(_arrivalTime);
+
}
- EncodingUtils.writeByte(minaSrc, flags);
- EncodingUtils.writeLong(minaSrc,_arrivalTime);
- src.position(minaSrc.position());
- src.flip();
- src.position(offset);
- src = src.slice();
- if(dest.remaining() < src.limit())
+ catch (IOException e)
{
- src.limit(dest.remaining());
+ // This shouldn't happen as we are not actually using anything that can throw an IO Exception
+ throw new RuntimeException(e);
}
- dest.put(src);
-
- return src.limit();
+ return dest.position()-oldPosition;
}
public int getContentSize()
@@ -173,14 +176,15 @@ public class MessageMetaData implements StorableMessageMetaData
{
try
{
- org.apache.mina.common.ByteBuffer minaSrc = org.apache.mina.common.ByteBuffer.wrap(buf);
- int size = EncodingUtils.readInteger(minaSrc);
- ContentHeaderBody chb = ContentHeaderBody.createFromBuffer(minaSrc, size);
- final AMQShortString exchange = EncodingUtils.readAMQShortString(minaSrc);
- final AMQShortString routingKey = EncodingUtils.readAMQShortString(minaSrc);
+ ByteBufferInputStream bbis = new ByteBufferInputStream(buf);
+ DataInputStream dais = new DataInputStream(bbis);
+ int size = EncodingUtils.readInteger(dais);
+ ContentHeaderBody chb = ContentHeaderBody.createFromBuffer(dais, size);
+ final AMQShortString exchange = EncodingUtils.readAMQShortString(dais);
+ final AMQShortString routingKey = EncodingUtils.readAMQShortString(dais);
- final byte flags = EncodingUtils.readByte(minaSrc);
- long arrivalTime = EncodingUtils.readLong(minaSrc);
+ final byte flags = EncodingUtils.readByte(dais);
+ long arrivalTime = EncodingUtils.readLong(dais);
MessagePublishInfo publishBody =
new MessagePublishInfo()
@@ -216,6 +220,10 @@ public class MessageMetaData implements StorableMessageMetaData
{
throw new RuntimeException(e);
}
+ catch (IOException e)
+ {
+ throw new RuntimeException(e);
+ }
}
};
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_0_10.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_0_10.java
index cf8ae2166c..2297e4200d 100755
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_0_10.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/message/MessageMetaData_0_10.java
@@ -34,7 +34,7 @@ import org.apache.qpid.transport.codec.BBDecoder;
import java.nio.ByteBuffer;
import java.lang.ref.SoftReference;
-public class MessageMetaData_0_10 implements StorableMessageMetaData
+public class MessageMetaData_0_10 implements StorableMessageMetaData, InboundMessage
{
private Header _header;
private DeliveryProperties _deliveryProps;
@@ -194,6 +194,12 @@ public class MessageMetaData_0_10 implements StorableMessageMetaData
return _deliveryProps == null ? 0L : _deliveryProps.getExpiration();
}
+ public boolean isRedelivered()
+ {
+ // The *Message* is never redelivered, only queue entries are...
+ return false;
+ }
+
public long getArrivalTime()
{
return _arrivalTime;
@@ -239,4 +245,6 @@ public class MessageMetaData_0_10 implements StorableMessageMetaData
}
}
+
+
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_8/ProtocolOutputConverterImpl.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_8/ProtocolOutputConverterImpl.java
index 2cebec373e..3970e5a2d4 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_8/ProtocolOutputConverterImpl.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_8/ProtocolOutputConverterImpl.java
@@ -26,6 +26,7 @@
*/
package org.apache.qpid.server.output.amqp0_8;
+import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
import org.apache.qpid.server.protocol.AMQProtocolSession;
import org.apache.qpid.server.message.AMQMessage;
import org.apache.qpid.server.queue.QueueEntry;
@@ -34,22 +35,18 @@ import org.apache.qpid.server.output.HeaderPropertiesConverter;
import org.apache.qpid.server.message.MessageContentSource;
import org.apache.qpid.server.message.MessageTransferMessage;
import org.apache.qpid.framing.*;
-import org.apache.qpid.framing.amqp_8_0.BasicGetBodyImpl;
import org.apache.qpid.framing.abstraction.MessagePublishInfo;
-import org.apache.qpid.framing.abstraction.ProtocolVersionMethodConverter;
import org.apache.qpid.AMQException;
import org.apache.qpid.transport.DeliveryProperties;
-import java.nio.ByteBuffer;
+import java.io.DataOutputStream;
+import java.io.IOException;
public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
{
private static final MethodRegistry METHOD_REGISTRY = MethodRegistry.getMethodRegistry(ProtocolVersion.v8_0);
- private static final ProtocolVersionMethodConverter PROTOCOL_CONVERTER =
- METHOD_REGISTRY.getProtocolVersionMethodConverter();
-
public static Factory getInstanceFactory()
{
return new Factory()
@@ -62,6 +59,7 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
};
}
+
private final AMQProtocolSession _protocolSession;
private ProtocolOutputConverterImpl(AMQProtocolSession session)
@@ -78,10 +76,11 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
public void writeDeliver(QueueEntry entry, int channelId, long deliveryTag, AMQShortString consumerTag)
throws AMQException
{
- AMQDataBlock deliver = createEncodedDeliverFrame(entry, channelId, deliveryTag, consumerTag);
- writeMessageDelivery(entry.getMessage(), getContentHeaderBody(entry), channelId, deliver);
+ AMQBody deliverBody = createEncodedDeliverBody(entry, deliveryTag, consumerTag);
+ writeMessageDelivery(entry, channelId, deliverBody);
}
+
private ContentHeaderBody getContentHeaderBody(QueueEntry entry)
throws AMQException
{
@@ -93,65 +92,120 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
{
final MessageTransferMessage message = (MessageTransferMessage) entry.getMessage();
BasicContentHeaderProperties props = HeaderPropertiesConverter.convert(message);
- ContentHeaderBody chb = new ContentHeaderBody(props, BasicGetBodyImpl.CLASS_ID);
- chb.bodySize = message.getSize();
+ ContentHeaderBody chb = new ContentHeaderBody(props, org.apache.qpid.framing.amqp_8_0.BasicGetBodyImpl.CLASS_ID);
+ chb.bodySize = message.getSize();
return chb;
}
}
- public void writeGetOk(QueueEntry entry, int channelId, long deliveryTag, int queueSize) throws AMQException
+ private void writeMessageDelivery(QueueEntry entry, int channelId, AMQBody deliverBody)
+ throws AMQException
{
- AMQDataBlock deliver = createEncodedGetOkFrame(entry, channelId, deliveryTag, queueSize);
- writeMessageDelivery(entry.getMessage(), getContentHeaderBody(entry), channelId, deliver);
+ writeMessageDelivery(entry.getMessage(), getContentHeaderBody(entry), channelId, deliverBody);
}
- private void writeMessageDelivery(MessageContentSource message, ContentHeaderBody chb, int channelId, AMQDataBlock deliver)
+ private void writeMessageDelivery(MessageContentSource message, ContentHeaderBody contentHeaderBody, int channelId, AMQBody deliverBody)
throws AMQException
{
- AMQDataBlock contentHeader = ContentHeaderBody.createAMQFrame(channelId, chb);
-
+ int bodySize = (int) message.getSize();
- final int bodySize = (int) message.getSize();
if(bodySize == 0)
{
- SmallCompositeAMQDataBlock compositeBlock = new SmallCompositeAMQDataBlock(deliver,
- contentHeader);
+ SmallCompositeAMQBodyBlock compositeBlock = new SmallCompositeAMQBodyBlock(channelId, deliverBody,
+ contentHeaderBody);
+
writeFrame(compositeBlock);
}
else
{
int maxBodySize = (int) getProtocolSession().getMaxFrameSize() - AMQFrame.getFrameOverhead();
- final int capacity = bodySize > maxBodySize ? maxBodySize : bodySize;
- ByteBuffer buf = ByteBuffer.allocate(capacity);
- int writtenSize = 0;
+ int capacity = bodySize > maxBodySize ? maxBodySize : bodySize;
+
+ int writtenSize = capacity;
+
+ AMQBody firstContentBody = new MessageContentSourceBody(message,0,capacity);
- writtenSize += message.getContent(buf, writtenSize);
- buf.flip();
- AMQDataBlock firstContentBody = new AMQFrame(channelId, PROTOCOL_CONVERTER.convertToBody(buf));
- AMQDataBlock[] blocks = new AMQDataBlock[]{deliver, contentHeader, firstContentBody};
- CompositeAMQDataBlock compositeBlock = new CompositeAMQDataBlock(blocks);
+ CompositeAMQBodyBlock
+ compositeBlock = new CompositeAMQBodyBlock(channelId, deliverBody, contentHeaderBody, firstContentBody);
writeFrame(compositeBlock);
while(writtenSize < bodySize)
{
- buf = java.nio.ByteBuffer.allocate(capacity);
- writtenSize += message.getContent(buf, writtenSize);
- buf.flip();
- writeFrame(new AMQFrame(channelId, PROTOCOL_CONVERTER.convertToBody(buf)));
+ capacity = bodySize - writtenSize > maxBodySize ? maxBodySize : bodySize - writtenSize;
+ MessageContentSourceBody body = new MessageContentSourceBody(message, writtenSize, capacity);
+ writtenSize += capacity;
+
+ writeFrame(new AMQFrame(channelId, body));
}
+ }
+ }
+ private class MessageContentSourceBody implements AMQBody
+ {
+ public static final byte TYPE = 3;
+ private int _length;
+ private MessageContentSource _message;
+ private int _offset;
+
+ public MessageContentSourceBody(MessageContentSource message, int offset, int length)
+ {
+ _message = message;
+ _offset = offset;
+ _length = length;
+ }
+
+ public byte getFrameType()
+ {
+ return TYPE;
}
+
+ public int getSize()
+ {
+ return _length;
+ }
+
+ public void writePayload(DataOutputStream buffer) throws IOException
+ {
+ byte[] data = new byte[_length];
+
+ _message.getContent(java.nio.ByteBuffer.wrap(data), _offset);
+
+ buffer.write(data);
+ }
+
+ public void handle(int channelId, AMQVersionAwareProtocolSession amqProtocolSession) throws AMQException
+ {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+ private AMQDataBlock createContentHeaderBlock(final int channelId, final ContentHeaderBody contentHeaderBody)
+ {
+
+ AMQDataBlock contentHeader = ContentHeaderBody.createAMQFrame(channelId,
+ contentHeaderBody);
+ return contentHeader;
}
- private AMQDataBlock createEncodedDeliverFrame(QueueEntry entry, int channelId, long deliveryTag, AMQShortString consumerTag)
+ public void writeGetOk(QueueEntry entry, int channelId, long deliveryTag, int queueSize) throws AMQException
+ {
+ AMQBody deliver = createEncodedGetOkBody(entry, deliveryTag, queueSize);
+ writeMessageDelivery(entry, channelId, deliver);
+ }
+
+
+ private AMQBody createEncodedDeliverBody(QueueEntry entry,
+ final long deliveryTag,
+ final AMQShortString consumerTag)
throws AMQException
{
+
final AMQShortString exchangeName;
final AMQShortString routingKey;
@@ -172,21 +226,58 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
final boolean isRedelivered = entry.isRedelivered();
+ final AMQBody returnBlock = new AMQBody()
+ {
+
+ public AMQBody _underlyingBody;
- BasicDeliverBody deliverBody =
- METHOD_REGISTRY.createBasicDeliverBody(consumerTag,
- deliveryTag,
- isRedelivered,
- exchangeName,
- routingKey);
+ public AMQBody createAMQBody()
+ {
+ return METHOD_REGISTRY.createBasicDeliverBody(consumerTag,
+ deliveryTag,
+ isRedelivered,
+ exchangeName,
+ routingKey);
- AMQFrame deliverFrame = deliverBody.generateFrame(channelId);
- return deliverFrame;
+
+
+ }
+
+ public byte getFrameType()
+ {
+ return AMQMethodBody.TYPE;
+ }
+
+ public int getSize()
+ {
+ if(_underlyingBody == null)
+ {
+ _underlyingBody = createAMQBody();
+ }
+ return _underlyingBody.getSize();
+ }
+
+ public void writePayload(DataOutputStream buffer) throws IOException
+ {
+ if(_underlyingBody == null)
+ {
+ _underlyingBody = createAMQBody();
+ }
+ _underlyingBody.writePayload(buffer);
+ }
+
+ public void handle(final int channelId, final AMQVersionAwareProtocolSession amqMinaProtocolSession)
+ throws AMQException
+ {
+ throw new AMQException("This block should never be dispatched!");
+ }
+ };
+ return returnBlock;
}
- private AMQDataBlock createEncodedGetOkFrame(QueueEntry entry, int channelId, long deliveryTag, int queueSize)
+ private AMQBody createEncodedGetOkBody(QueueEntry entry, long deliveryTag, int queueSize)
throws AMQException
{
final AMQShortString exchangeName;
@@ -215,9 +306,8 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
exchangeName,
routingKey,
queueSize);
- AMQFrame getOkFrame = getOkBody.generateFrame(channelId);
- return getOkFrame;
+ return getOkBody;
}
public byte getProtocolMinorVersion()
@@ -230,31 +320,28 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
return getProtocolSession().getProtocolMajorVersion();
}
- private AMQDataBlock createEncodedReturnFrame(MessagePublishInfo messagePublishInfo, int channelId, int replyCode, AMQShortString replyText) throws AMQException
+ private AMQBody createEncodedReturnFrame(MessagePublishInfo messagePublishInfo,
+ int replyCode,
+ AMQShortString replyText) throws AMQException
{
+
BasicReturnBody basicReturnBody =
METHOD_REGISTRY.createBasicReturnBody(replyCode,
- replyText,
- messagePublishInfo.getExchange(),
- messagePublishInfo.getRoutingKey());
- AMQFrame returnFrame = basicReturnBody.generateFrame(channelId);
+ replyText,
+ messagePublishInfo.getExchange(),
+ messagePublishInfo.getRoutingKey());
- return returnFrame;
+
+ return basicReturnBody;
}
- public void writeReturn(MessagePublishInfo messagePublishInfo,
- ContentHeaderBody header,
- MessageContentSource content,
- int channelId,
- int replyCode,
- AMQShortString replyText)
+ public void writeReturn(MessagePublishInfo messagePublishInfo, ContentHeaderBody header, MessageContentSource message, int channelId, int replyCode, AMQShortString replyText)
throws AMQException
{
- AMQDataBlock returnFrame = createEncodedReturnFrame(messagePublishInfo, channelId, replyCode, replyText);
-
- writeMessageDelivery(content, header, channelId, returnFrame);
+ AMQBody returnFrame = createEncodedReturnFrame(messagePublishInfo, replyCode, replyText);
+ writeMessageDelivery(message, header, channelId, returnFrame);
}
@@ -266,8 +353,68 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
public void confirmConsumerAutoClose(int channelId, AMQShortString consumerTag)
{
+
BasicCancelOkBody basicCancelOkBody = METHOD_REGISTRY.createBasicCancelOkBody(consumerTag);
writeFrame(basicCancelOkBody.generateFrame(channelId));
}
+
+
+ public static final class CompositeAMQBodyBlock extends AMQDataBlock
+ {
+ public static final int OVERHEAD = 3 * AMQFrame.getFrameOverhead();
+
+ private final AMQBody _methodBody;
+ private final AMQBody _headerBody;
+ private final AMQBody _contentBody;
+ private final int _channel;
+
+
+ public CompositeAMQBodyBlock(int channel, AMQBody methodBody, AMQBody headerBody, AMQBody contentBody)
+ {
+ _channel = channel;
+ _methodBody = methodBody;
+ _headerBody = headerBody;
+ _contentBody = contentBody;
+
+ }
+
+ public long getSize()
+ {
+ return OVERHEAD + _methodBody.getSize() + _headerBody.getSize() + _contentBody.getSize();
+ }
+
+ public void writePayload(DataOutputStream buffer) throws IOException
+ {
+ AMQFrame.writeFrames(buffer, _channel, _methodBody, _headerBody, _contentBody);
+ }
+ }
+
+ public static final class SmallCompositeAMQBodyBlock extends AMQDataBlock
+ {
+ public static final int OVERHEAD = 2 * AMQFrame.getFrameOverhead();
+
+ private final AMQBody _methodBody;
+ private final AMQBody _headerBody;
+ private final int _channel;
+
+
+ public SmallCompositeAMQBodyBlock(int channel, AMQBody methodBody, AMQBody headerBody)
+ {
+ _channel = channel;
+ _methodBody = methodBody;
+ _headerBody = headerBody;
+
+ }
+
+ public long getSize()
+ {
+ return OVERHEAD + _methodBody.getSize() + _headerBody.getSize() ;
+ }
+
+ public void writePayload(DataOutputStream buffer) throws IOException
+ {
+ AMQFrame.writeFrames(buffer, _channel, _methodBody, _headerBody);
+ }
+ }
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_9/ProtocolOutputConverterImpl.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_9/ProtocolOutputConverterImpl.java
index 319b5cc7bd..aef3483282 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_9/ProtocolOutputConverterImpl.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_9/ProtocolOutputConverterImpl.java
@@ -20,9 +20,6 @@ package org.apache.qpid.server.output.amqp0_9;
*
*/
-
-import org.apache.mina.common.ByteBuffer;
-
import org.apache.qpid.server.output.ProtocolOutputConverter;
import org.apache.qpid.server.output.HeaderPropertiesConverter;
import org.apache.qpid.server.protocol.AMQProtocolSession;
@@ -38,11 +35,13 @@ import org.apache.qpid.AMQException;
import org.apache.qpid.transport.DeliveryProperties;
import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+
public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
{
private static final MethodRegistry METHOD_REGISTRY = MethodRegistry.getMethodRegistry(ProtocolVersion.v0_9);
- private static final ProtocolVersionMethodConverter
- PROTOCOL_CONVERTER = METHOD_REGISTRY.getProtocolVersionMethodConverter();
public static Factory getInstanceFactory()
@@ -121,15 +120,12 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
int maxBodySize = (int) getProtocolSession().getMaxFrameSize() - AMQFrame.getFrameOverhead();
- final int capacity = bodySize > maxBodySize ? maxBodySize : bodySize;
- java.nio.ByteBuffer buf = java.nio.ByteBuffer.allocate(capacity);
+ int capacity = bodySize > maxBodySize ? maxBodySize : bodySize;
- int writtenSize = 0;
+ int writtenSize = capacity;
+ AMQBody firstContentBody = new MessageContentSourceBody(message,0,capacity);
- writtenSize += message.getContent(buf, writtenSize);
- buf.flip();
- AMQBody firstContentBody = PROTOCOL_CONVERTER.convertToBody(buf);
CompositeAMQBodyBlock
compositeBlock = new CompositeAMQBodyBlock(channelId, deliverBody, contentHeaderBody, firstContentBody);
@@ -137,15 +133,55 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
while(writtenSize < bodySize)
{
- buf = java.nio.ByteBuffer.allocate(capacity);
+ capacity = bodySize - writtenSize > maxBodySize ? maxBodySize : bodySize - writtenSize;
+ MessageContentSourceBody body = new MessageContentSourceBody(message, writtenSize, capacity);
+ writtenSize += capacity;
- writtenSize += message.getContent(buf, writtenSize);
- buf.flip();
- writeFrame(new AMQFrame(channelId, PROTOCOL_CONVERTER.convertToBody(buf)));
+ writeFrame(new AMQFrame(channelId, body));
}
}
}
+ private class MessageContentSourceBody implements AMQBody
+ {
+ public static final byte TYPE = 3;
+ private int _length;
+ private MessageContentSource _message;
+ private int _offset;
+
+ public MessageContentSourceBody(MessageContentSource message, int offset, int length)
+ {
+ _message = message;
+ _offset = offset;
+ _length = length;
+ }
+
+ public byte getFrameType()
+ {
+ return TYPE;
+ }
+
+ public int getSize()
+ {
+ return _length;
+ }
+
+ public void writePayload(DataOutputStream buffer) throws IOException
+ {
+ byte[] data = new byte[_length];
+
+ _message.getContent(ByteBuffer.wrap(data), _offset);
+
+ buffer.write(data);
+ }
+
+ public void handle(int channelId, AMQVersionAwareProtocolSession amqProtocolSession) throws AMQException
+ {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+
private AMQDataBlock createContentHeaderBlock(final int channelId, final ContentHeaderBody contentHeaderBody)
{
@@ -221,7 +257,7 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
return _underlyingBody.getSize();
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer) throws IOException
{
if(_underlyingBody == null)
{
@@ -346,7 +382,7 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
return OVERHEAD + _methodBody.getSize() + _headerBody.getSize() + _contentBody.getSize();
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer) throws IOException
{
AMQFrame.writeFrames(buffer, _channel, _methodBody, _headerBody, _contentBody);
}
@@ -374,7 +410,7 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
return OVERHEAD + _methodBody.getSize() + _headerBody.getSize() ;
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer) throws IOException
{
AMQFrame.writeFrames(buffer, _channel, _methodBody, _headerBody);
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_9_1/ProtocolOutputConverterImpl.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_9_1/ProtocolOutputConverterImpl.java
index cffbe445ee..10748298bc 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_9_1/ProtocolOutputConverterImpl.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/output/amqp0_9_1/ProtocolOutputConverterImpl.java
@@ -20,9 +20,6 @@ package org.apache.qpid.server.output.amqp0_9_1;
*
*/
-
-import org.apache.mina.common.ByteBuffer;
-
import org.apache.qpid.server.output.ProtocolOutputConverter;
import org.apache.qpid.server.output.HeaderPropertiesConverter;
import org.apache.qpid.server.protocol.AMQProtocolSession;
@@ -33,17 +30,16 @@ import org.apache.qpid.server.message.MessageTransferMessage;
import org.apache.qpid.framing.*;
import org.apache.qpid.framing.amqp_0_91.BasicGetBodyImpl;
import org.apache.qpid.framing.abstraction.MessagePublishInfo;
-import org.apache.qpid.framing.abstraction.ProtocolVersionMethodConverter;
import org.apache.qpid.AMQException;
import org.apache.qpid.transport.DeliveryProperties;
import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
{
private static final MethodRegistry METHOD_REGISTRY = MethodRegistry.getMethodRegistry(ProtocolVersion.v0_91);
- private static final ProtocolVersionMethodConverter
- PROTOCOL_CONVERTER = METHOD_REGISTRY.getProtocolVersionMethodConverter();
-
public static Factory getInstanceFactory()
{
@@ -121,15 +117,11 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
int maxBodySize = (int) getProtocolSession().getMaxFrameSize() - AMQFrame.getFrameOverhead();
- final int capacity = bodySize > maxBodySize ? maxBodySize : bodySize;
- java.nio.ByteBuffer buf = java.nio.ByteBuffer.allocate(capacity);
+ int capacity = bodySize > maxBodySize ? maxBodySize : bodySize;
- int writtenSize = 0;
+ int writtenSize = capacity;
-
- writtenSize += message.getContent(buf, writtenSize);
- buf.flip();
- AMQBody firstContentBody = PROTOCOL_CONVERTER.convertToBody(buf);
+ AMQBody firstContentBody = new MessageContentSourceBody(message,0,capacity);
CompositeAMQBodyBlock
compositeBlock = new CompositeAMQBodyBlock(channelId, deliverBody, contentHeaderBody, firstContentBody);
@@ -137,15 +129,54 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
while(writtenSize < bodySize)
{
- buf = java.nio.ByteBuffer.allocate(capacity);
+ capacity = bodySize - writtenSize > maxBodySize ? maxBodySize : bodySize - writtenSize;
+ MessageContentSourceBody body = new MessageContentSourceBody(message, writtenSize, capacity);
+ writtenSize += capacity;
- writtenSize += message.getContent(buf, writtenSize);
- buf.flip();
- writeFrame(new AMQFrame(channelId, PROTOCOL_CONVERTER.convertToBody(buf)));
+ writeFrame(new AMQFrame(channelId, body));
}
}
}
+ private class MessageContentSourceBody implements AMQBody
+ {
+ public static final byte TYPE = 3;
+ private int _length;
+ private MessageContentSource _message;
+ private int _offset;
+
+ public MessageContentSourceBody(MessageContentSource message, int offset, int length)
+ {
+ _message = message;
+ _offset = offset;
+ _length = length;
+ }
+
+ public byte getFrameType()
+ {
+ return TYPE;
+ }
+
+ public int getSize()
+ {
+ return _length;
+ }
+
+ public void writePayload(DataOutputStream buffer) throws IOException
+ {
+ byte[] data = new byte[_length];
+
+ _message.getContent(java.nio.ByteBuffer.wrap(data), _offset);
+
+ buffer.write(data);
+ }
+
+ public void handle(int channelId, AMQVersionAwareProtocolSession amqProtocolSession) throws AMQException
+ {
+ throw new UnsupportedOperationException();
+ }
+ }
+
private AMQDataBlock createContentHeaderBlock(final int channelId, final ContentHeaderBody contentHeaderBody)
{
@@ -221,7 +252,7 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
return _underlyingBody.getSize();
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer) throws IOException
{
if(_underlyingBody == null)
{
@@ -346,7 +377,7 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
return OVERHEAD + _methodBody.getSize() + _headerBody.getSize() + _contentBody.getSize();
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer) throws IOException
{
AMQFrame.writeFrames(buffer, _channel, _methodBody, _headerBody, _contentBody);
}
@@ -374,7 +405,7 @@ public class ProtocolOutputConverterImpl implements ProtocolOutputConverter
return OVERHEAD + _methodBody.getSize() + _headerBody.getSize() ;
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer) throws IOException
{
AMQFrame.writeFrames(buffer, _channel, _methodBody, _headerBody);
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/OsgiSystemPackageUtil.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/OsgiSystemPackageUtil.java
new file mode 100644
index 0000000000..644f714c8c
--- /dev/null
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/OsgiSystemPackageUtil.java
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.qpid.server.plugins;
+
+import java.util.Iterator;
+import java.util.Map;
+
+import org.osgi.framework.Version;
+
+/**
+ * Utility class to convert a map of package name to version numbers into the string
+ * with the format expected of a OSGi system package declaration:
+ *
+ * <code>
+ * org.xyz; version=1.0.0, org.xyz.xyz; version=1.0.0,...
+ * </code>
+ *
+ * Additionally, if the caller has provided a qpidPackageReleaseNumber and the package
+ * begins org.apache.qpid, this release number will be used, in preference to the one
+ * found in the Map.
+ *
+ * @see org.osgi.framework.Constants#FRAMEWORK_SYSTEMPACKAGES
+ *
+ */
+public class OsgiSystemPackageUtil
+{
+ private static final String APACHE_QPID_PKG_PREFIX = "org.apache.qpid";
+
+ private final Map<String, String> _packageNameVersionMap;
+ private final Version _qpidPackageReleaseNumber;
+
+ public OsgiSystemPackageUtil(final Version qpidPackageReleaseNumber, final Map<String, String> packageNameVersionMap)
+ {
+ _qpidPackageReleaseNumber = qpidPackageReleaseNumber;
+ _packageNameVersionMap = packageNameVersionMap;
+ }
+
+ public String getFormattedSystemPackageString()
+ {
+ if (_packageNameVersionMap == null || _packageNameVersionMap.size() == 0)
+ {
+ return null;
+ }
+
+ final StringBuilder packages = new StringBuilder();
+
+ for(Iterator<String> itr = _packageNameVersionMap.keySet().iterator(); itr.hasNext();)
+ {
+ final String packageName = itr.next();
+ final String packageVersion;
+
+ if (_qpidPackageReleaseNumber != null && packageName.startsWith(APACHE_QPID_PKG_PREFIX))
+ {
+ packageVersion = _qpidPackageReleaseNumber.toString();
+ }
+ else
+ {
+ packageVersion = _packageNameVersionMap.get(packageName);
+ }
+
+ packages.append(packageName);
+ packages.append("; ");
+ packages.append("version=");
+ packages.append(packageVersion);
+
+ if (itr.hasNext())
+ {
+ packages.append(", ");
+ }
+ }
+
+ return packages.toString();
+ }
+
+}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/OsgiSystemPackages.properties b/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/OsgiSystemPackages.properties
new file mode 100644
index 0000000000..aaab4f76cc
--- /dev/null
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/OsgiSystemPackages.properties
@@ -0,0 +1,93 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one#
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# OSGi framework system package list
+#
+# PluginManager uses these properties to construct the FRAMEWORK_SYSTEMPACKAGES list
+#
+
+# Format is:
+# <package>=<version>
+# and PluginManager will convert this into:
+# <package>; version=<version>
+# e.g. org.osgi.framework; version=1.3.0
+
+javax.management.openmbean=1.0.0
+javax.management=1.0.0
+
+javax.security.auth=1.0.0
+javax.security.auth.callback=1.0.0
+javax.security.sasl=1.0.0
+javax.security=1.0.0
+
+org.xml.sax=1.0.0
+org.xml.sax.helpers=1.0.0
+
+org.osgi.framework=1.3.0
+org.osgi.service.packageadmin=1.2.0
+org.osgi.service.startlevel=1.0.0
+org.osgi.service.url=1.0.0
+org.osgi.util.tracker=1.0.0
+
+org.apache.commons.configuration=1.0.0
+
+org.apache.commons.lang=1.0.0
+org.apache.commons.lang.builder=1.0.0
+org.apache.commons.logging=1.0.0
+
+org.apache.log4j=1.2.12
+
+org.slf4j=1.6.1
+
+# For Qpid packages (org.apache.qpid), the version number is automatically overridden by QpidPropertis#getReleaseVersion()
+
+org.apache.qpid.junit.extensions.util=0.0.0
+org.apache.qpid=0.0.0
+org.apache.qpid.common=0.0.0
+org.apache.qpid.exchange=0.0.0
+org.apache.qpid.framing=0.0.0
+org.apache.qpid.management.common.mbeans.annotations=0.0.0
+org.apache.qpid.protocol=0.0.0
+org.apache.qpid.transport=0.0.0
+org.apache.qpid.transport.codec=0.0.0
+org.apache.qpid.server.binding=0.0.0
+org.apache.qpid.server.configuration=0.0.0
+org.apache.qpid.server.configuration.plugins=0.0.0
+org.apache.qpid.server.configuration.management=0.0.0
+org.apache.qpid.server.exchange=0.0.0
+org.apache.qpid.server.logging=0.0.0
+org.apache.qpid.server.logging.actors=0.0.0
+org.apache.qpid.server.logging.subjects=0.0.0
+org.apache.qpid.server.management=0.0.0
+org.apache.qpid.server.persistent=0.0.0
+org.apache.qpid.server.plugins=0.0.0
+org.apache.qpid.server.protocol=0.0.0
+org.apache.qpid.server.queue=0.0.0
+org.apache.qpid.server.registry=0.0.0
+org.apache.qpid.server.security=0.0.0
+org.apache.qpid.server.security.access=0.0.0
+org.apache.qpid.server.security.access.plugins=0.0.0
+org.apache.qpid.server.security.auth=0.0.0
+org.apache.qpid.server.security.auth.sasl=0.0.0
+org.apache.qpid.server.security.auth.manager=0.0.0
+org.apache.qpid.server.virtualhost=0.0.0
+org.apache.qpid.server.virtualhost.plugins=0.0.0
+org.apache.qpid.util=0.0.0
+
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/Plugin.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/Plugin.java
index e7f9983fff..804a9d5027 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/Plugin.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/Plugin.java
@@ -27,5 +27,5 @@ public interface Plugin
/**
* Provide Configuration to this plugin
*/
- public void configure(ConfigurationPlugin config);
+ public void configure(ConfigurationPlugin config) throws ConfigurationException;
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java
index 3107185006..dab6c3b231 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/plugins/PluginManager.java
@@ -18,39 +18,56 @@
*/
package org.apache.qpid.server.plugins;
-import static org.apache.felix.framework.util.FelixConstants.*;
-import static org.apache.felix.main.AutoProcessor.*;
+import static org.apache.felix.framework.util.FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP;
+import static org.apache.felix.main.AutoProcessor.AUTO_DEPLOY_ACTION_PROPERY;
+import static org.apache.felix.main.AutoProcessor.AUTO_DEPLOY_DIR_PROPERY;
+import static org.apache.felix.main.AutoProcessor.AUTO_DEPLOY_INSTALL_VALUE;
+import static org.apache.felix.main.AutoProcessor.AUTO_DEPLOY_START_VALUE;
+import static org.apache.felix.main.AutoProcessor.process;
+import static org.osgi.framework.Constants.FRAMEWORK_STORAGE;
+import static org.osgi.framework.Constants.FRAMEWORK_STORAGE_CLEAN;
+import static org.osgi.framework.Constants.FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT;
+import static org.osgi.framework.Constants.FRAMEWORK_SYSTEMPACKAGES;
import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
+import java.util.Properties;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.felix.framework.Felix;
import org.apache.felix.framework.util.StringMap;
import org.apache.log4j.Logger;
import org.apache.qpid.common.Closeable;
+import org.apache.qpid.common.QpidProperties;
import org.apache.qpid.server.configuration.TopicConfiguration;
+import org.apache.qpid.server.configuration.plugins.ConfigurationPluginFactory;
import org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionConfiguration.SlowConsumerDetectionConfigurationFactory;
import org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionPolicyConfiguration.SlowConsumerDetectionPolicyConfigurationFactory;
import org.apache.qpid.server.configuration.plugins.SlowConsumerDetectionQueueConfiguration.SlowConsumerDetectionQueueConfigurationFactory;
-import org.apache.qpid.server.configuration.plugins.ConfigurationPluginFactory;
import org.apache.qpid.server.exchange.ExchangeType;
import org.apache.qpid.server.security.SecurityManager;
import org.apache.qpid.server.security.SecurityPluginFactory;
import org.apache.qpid.server.security.access.plugins.AllowAll;
import org.apache.qpid.server.security.access.plugins.DenyAll;
import org.apache.qpid.server.security.access.plugins.LegacyAccess;
-import org.apache.qpid.server.virtualhost.plugins.VirtualHostPluginFactory;
+import org.apache.qpid.server.security.auth.manager.AuthenticationManagerPluginFactory;
+import org.apache.qpid.server.security.auth.manager.PrincipalDatabaseAuthenticationManager;
import org.apache.qpid.server.virtualhost.plugins.SlowConsumerDetection;
+import org.apache.qpid.server.virtualhost.plugins.VirtualHostPluginFactory;
import org.apache.qpid.server.virtualhost.plugins.policies.TopicDeletePolicy;
import org.apache.qpid.slowconsumerdetection.policies.SlowConsumerPolicyPluginFactory;
+import org.apache.qpid.util.FileUtils;
import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
+import org.osgi.framework.Version;
import org.osgi.framework.launch.Framework;
import org.osgi.util.tracker.ServiceTracker;
@@ -63,7 +80,6 @@ public class PluginManager implements Closeable
private static final Logger _logger = Logger.getLogger(PluginManager.class);
private static final int FELIX_STOP_TIMEOUT = 30000;
- private static final String QPID_VER_SUFFIX = "version=0.13,";
private Framework _felix;
@@ -72,15 +88,61 @@ public class PluginManager implements Closeable
private ServiceTracker _configTracker = null;
private ServiceTracker _virtualHostTracker = null;
private ServiceTracker _policyTracker = null;
+ private ServiceTracker _authenticationManagerTracker = null;
private Activator _activator;
+ private final List<ServiceTracker> _trackers = new ArrayList<ServiceTracker>();
private Map<String, SecurityPluginFactory> _securityPlugins = new HashMap<String, SecurityPluginFactory>();
private Map<List<String>, ConfigurationPluginFactory> _configPlugins = new IdentityHashMap<List<String>, ConfigurationPluginFactory>();
private Map<String, VirtualHostPluginFactory> _vhostPlugins = new HashMap<String, VirtualHostPluginFactory>();
private Map<String, SlowConsumerPolicyPluginFactory> _policyPlugins = new HashMap<String, SlowConsumerPolicyPluginFactory>();
+ private Map<String, AuthenticationManagerPluginFactory<? extends Plugin>> _authenticationManagerPlugins = new HashMap<String, AuthenticationManagerPluginFactory<? extends Plugin>>();
- public PluginManager(String pluginPath, String cachePath) throws Exception
+ /** The default name of the OSGI system package list. */
+ private static final String DEFAULT_RESOURCE_NAME = "org/apache/qpid/server/plugins/OsgiSystemPackages.properties";
+
+ /** The name of the override system property that holds the name of the OSGI system package list. */
+ private static final String FILE_PROPERTY = "qpid.osgisystempackages.properties";
+
+ private static final String OSGI_SYSTEM_PACKAGES;
+
+ static
+ {
+ final String filename = System.getProperty(FILE_PROPERTY);
+ final InputStream is = FileUtils.openFileOrDefaultResource(filename, DEFAULT_RESOURCE_NAME,
+ PluginManager.class.getClassLoader());
+
+ try
+ {
+ Version qpidReleaseVersion;
+ try
+ {
+ qpidReleaseVersion = Version.parseVersion(QpidProperties.getReleaseVersion());
+ }
+ catch (IllegalArgumentException iae)
+ {
+ qpidReleaseVersion = null;
+ }
+
+ final Properties p = new Properties();
+ p.load(is);
+
+ final OsgiSystemPackageUtil osgiSystemPackageUtil = new OsgiSystemPackageUtil(qpidReleaseVersion, (Map)p);
+
+ OSGI_SYSTEM_PACKAGES = osgiSystemPackageUtil.getFormattedSystemPackageString();
+
+ _logger.debug("List of OSGi system packages to be added: " + OSGI_SYSTEM_PACKAGES);
+ }
+ catch (IOException e)
+ {
+ _logger.error("Error reading OSGI system package list", e);
+ throw new ExceptionInInitializerError(e);
+ }
+ }
+
+
+ public PluginManager(String pluginPath, String cachePath, BundleContext bundleContext) throws Exception
{
// Store all non-OSGi plugins
// A little gross that we have to add them here, but not all the plugins are OSGIfied
@@ -97,7 +159,8 @@ public class PluginManager implements Closeable
LegacyAccess.LegacyAccessConfiguration.FACTORY,
new SlowConsumerDetectionConfigurationFactory(),
new SlowConsumerDetectionPolicyConfigurationFactory(),
- new SlowConsumerDetectionQueueConfigurationFactory()))
+ new SlowConsumerDetectionQueueConfigurationFactory(),
+ PrincipalDatabaseAuthenticationManager.PrincipalDatabaseAuthenticationManagerConfiguration.FACTORY))
{
_configPlugins.put(configFactory.getParentPaths(), configFactory);
}
@@ -112,125 +175,109 @@ public class PluginManager implements Closeable
_vhostPlugins.put(pluginFactory.getClass().getName(), pluginFactory);
}
- // Check the plugin directory path is set and exist
- if (pluginPath == null)
+ for (AuthenticationManagerPluginFactory<? extends Plugin> pluginFactory : Arrays.asList(
+ PrincipalDatabaseAuthenticationManager.FACTORY))
{
- return;
+ _authenticationManagerPlugins.put(pluginFactory.getPluginName(), pluginFactory);
}
- File pluginDir = new File(pluginPath);
- if (!pluginDir.exists())
- {
- return;
- }
-
- // Setup OSGi configuration propery map
- StringMap configMap = new StringMap(false);
-
- // Add the bundle provided service interface package and the core OSGi
- // packages to be exported from the class path via the system bundle.
- configMap.put(FRAMEWORK_SYSTEMPACKAGES,
- "org.osgi.framework; version=1.3.0," +
- "org.osgi.service.packageadmin; version=1.2.0," +
- "org.osgi.service.startlevel; version=1.0.0," +
- "org.osgi.service.url; version=1.0.0," +
- "org.osgi.util.tracker; version=1.0.0," +
- "org.apache.qpid.junit.extensions.util; " + QPID_VER_SUFFIX +
- "org.apache.qpid; " + QPID_VER_SUFFIX +
- "org.apache.qpid.common; " + QPID_VER_SUFFIX +
- "org.apache.qpid.exchange; " + QPID_VER_SUFFIX +
- "org.apache.qpid.framing; " + QPID_VER_SUFFIX +
- "org.apache.qpid.management.common.mbeans.annotations; " + QPID_VER_SUFFIX +
- "org.apache.qpid.protocol; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.binding; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.configuration; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.configuration.plugins; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.configuration.management; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.exchange; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.logging; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.logging.actors; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.logging.subjects; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.management; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.persistent; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.plugins; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.protocol; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.queue; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.registry; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.security; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.security.access; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.security.access.plugins; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.virtualhost; " + QPID_VER_SUFFIX +
- "org.apache.qpid.server.virtualhost.plugins; " + QPID_VER_SUFFIX +
- "org.apache.qpid.util; " + QPID_VER_SUFFIX +
- "org.apache.commons.configuration; version=1.0.0," +
- "org.apache.commons.lang; version=1.0.0," +
- "org.apache.commons.lang.builder; version=1.0.0," +
- "org.apache.commons.logging; version=1.0.0," +
- "org.apache.log4j; version=1.2.12," +
- "javax.management.openmbean; version=1.0.0," +
- "javax.management; version=1.0.0"
- );
-
- // No automatic shutdown hook
- configMap.put("felix.shutdown.hook", "false");
-
- // Add system activator
- List<BundleActivator> activators = new ArrayList<BundleActivator>();
- _activator = new Activator();
- activators.add(_activator);
- configMap.put(SYSTEMBUNDLE_ACTIVATORS_PROP, activators);
- if (cachePath != null)
+ if(bundleContext == null)
{
- File cacheDir = new File(cachePath);
- if (!cacheDir.exists() && cacheDir.canWrite())
+ // Check the plugin directory path is set and exist
+ if (pluginPath == null)
{
- _logger.info("Creating plugin cache directory: " + cachePath);
- cacheDir.mkdir();
+ _logger.info("No plugin path specified, no plugins will be loaded.");
+ return;
}
-
- // Set plugin cache directory and empty it
- _logger.info("Cache bundles in directory " + cachePath);
- configMap.put(FRAMEWORK_STORAGE, cachePath);
- }
- configMap.put(FRAMEWORK_STORAGE_CLEAN, FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT);
-
- // Set directory with plugins to auto-deploy
- _logger.info("Auto deploying bundles from directory " + pluginPath);
- configMap.put(AUTO_DEPLOY_DIR_PROPERY, pluginPath);
- configMap.put(AUTO_DEPLOY_ACTION_PROPERY, AUTO_DEPLOY_INSTALL_VALUE + "," + AUTO_DEPLOY_START_VALUE);
-
- // Start plugin manager and trackers
- _felix = new Felix(configMap);
- try
- {
- _logger.info("Starting plugin manager...");
- _felix.init();
- process(configMap, _felix.getBundleContext());
- _felix.start();
- _logger.info("Started plugin manager");
+ File pluginDir = new File(pluginPath);
+ if (!pluginDir.exists())
+ {
+ _logger.warn("Plugin dir : " + pluginDir + " does not exist.");
+ return;
+ }
+
+ // Add the bundle provided service interface package and the core OSGi
+ // packages to be exported from the class path via the system bundle.
+
+ // Setup OSGi configuration property map
+ final StringMap configMap = new StringMap(false);
+ configMap.put(FRAMEWORK_SYSTEMPACKAGES, OSGI_SYSTEM_PACKAGES);
+
+ // No automatic shutdown hook
+ configMap.put("felix.shutdown.hook", "false");
+
+ // Add system activator
+ List<BundleActivator> activators = new ArrayList<BundleActivator>();
+ _activator = new Activator();
+ activators.add(_activator);
+ configMap.put(SYSTEMBUNDLE_ACTIVATORS_PROP, activators);
+
+ if (cachePath != null)
+ {
+ File cacheDir = new File(cachePath);
+ if (!cacheDir.exists() && cacheDir.canWrite())
+ {
+ _logger.info("Creating plugin cache directory: " + cachePath);
+ cacheDir.mkdir();
+ }
+
+ // Set plugin cache directory and empty it
+ _logger.info("Cache bundles in directory " + cachePath);
+ configMap.put(FRAMEWORK_STORAGE, cachePath);
+ }
+ configMap.put(FRAMEWORK_STORAGE_CLEAN, FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT);
+
+ // Set directory with plugins to auto-deploy
+ _logger.info("Auto deploying bundles from directory " + pluginPath);
+ configMap.put(AUTO_DEPLOY_DIR_PROPERY, pluginPath);
+ configMap.put(AUTO_DEPLOY_ACTION_PROPERY, AUTO_DEPLOY_INSTALL_VALUE + "," + AUTO_DEPLOY_START_VALUE);
+
+ // Start plugin manager
+ _felix = new Felix(configMap);
+ try
+ {
+ _logger.info("Starting plugin manager framework");
+ _felix.init();
+ process(configMap, _felix.getBundleContext());
+ _felix.start();
+ _logger.info("Started plugin manager framework");
+ }
+ catch (BundleException e)
+ {
+ throw new ConfigurationException("Could not start plugin manager: " + e.getMessage(), e);
+ }
+
+ bundleContext = _activator.getContext();
}
- catch (BundleException e)
+ else
{
- throw new ConfigurationException("Could not start plugin manager: " + e.getMessage(), e);
+ _logger.info("Using the specified external BundleContext");
}
-
- // TODO save trackers in a map, keyed by class name
-
- _exchangeTracker = new ServiceTracker(_activator.getContext(), ExchangeType.class.getName(), null);
+
+ _exchangeTracker = new ServiceTracker(bundleContext, ExchangeType.class.getName(), null);
_exchangeTracker.open();
+ _trackers.add(_exchangeTracker);
- _securityTracker = new ServiceTracker(_activator.getContext(), SecurityPluginFactory.class.getName(), null);
+ _securityTracker = new ServiceTracker(bundleContext, SecurityPluginFactory.class.getName(), null);
_securityTracker.open();
+ _trackers.add(_securityTracker);
- _configTracker = new ServiceTracker(_activator.getContext(), ConfigurationPluginFactory.class.getName(), null);
+ _configTracker = new ServiceTracker(bundleContext, ConfigurationPluginFactory.class.getName(), null);
_configTracker.open();
+ _trackers.add(_configTracker);
- _virtualHostTracker = new ServiceTracker(_activator.getContext(), VirtualHostPluginFactory.class.getName(), null);
+ _virtualHostTracker = new ServiceTracker(bundleContext, VirtualHostPluginFactory.class.getName(), null);
_virtualHostTracker.open();
+ _trackers.add(_virtualHostTracker);
- _policyTracker = new ServiceTracker(_activator.getContext(), SlowConsumerPolicyPluginFactory.class.getName(), null);
+ _policyTracker = new ServiceTracker(bundleContext, SlowConsumerPolicyPluginFactory.class.getName(), null);
_policyTracker.open();
-
+ _trackers.add(_policyTracker);
+
+ _authenticationManagerTracker = new ServiceTracker(bundleContext, AuthenticationManagerPluginFactory.class.getName(), null);
+ _authenticationManagerTracker.open();
+ _trackers.add(_authenticationManagerTracker);
+
_logger.info("Opened service trackers");
}
@@ -301,22 +348,26 @@ public class PluginManager implements Closeable
return getServices(_securityTracker, _securityPlugins);
}
+ public Map<String, AuthenticationManagerPluginFactory<? extends Plugin>> getAuthenticationManagerPlugins()
+ {
+ return getServices(_authenticationManagerTracker, _authenticationManagerPlugins);
+ }
+
public void close()
{
- if (_felix != null)
+ try
{
- try
+ // Close all bundle trackers
+ for(ServiceTracker tracker : _trackers)
{
- // Close all bundle trackers
- _exchangeTracker.close();
- _securityTracker.close();
- _configTracker.close();
- _virtualHostTracker.close();
- _policyTracker.close();
+ tracker.close();
}
- finally
+ }
+ finally
+ {
+ if (_felix != null)
{
- _logger.info("Stopping plugin manager");
+ _logger.info("Stopping plugin manager framework");
try
{
// FIXME should be stopAndWait() but hangs VM, need upgrade in felix
@@ -335,7 +386,12 @@ public class PluginManager implements Closeable
{
// Ignore
}
- _logger.info("Stopped plugin manager");
+ _logger.info("Stopped plugin manager framework");
+ }
+ else
+ {
+ _logger.info("Plugin manager was started with an external BundleContext, " +
+ "skipping remaining shutdown tasks");
}
}
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQConnectionModel.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQConnectionModel.java
index 061ebf50cd..b51e6aff1a 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQConnectionModel.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQConnectionModel.java
@@ -69,4 +69,8 @@ public interface AMQConnectionModel extends StatisticsGatherer
* Return a {@link LogSubject} for the connection.
*/
public LogSubject getLogSubject();
+
+ public String getUserName();
+
+ public boolean isSessionNameUnique(String name);
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java
index 08f276ae72..bff0a79de1 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngine.java
@@ -20,7 +20,9 @@
*/
package org.apache.qpid.server.protocol;
+import java.io.DataOutputStream;
import java.io.IOException;
+import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
@@ -34,9 +36,9 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
import javax.management.JMException;
+import javax.security.auth.Subject;
import javax.security.sasl.SaslServer;
import org.apache.log4j.Logger;
@@ -64,12 +66,10 @@ import org.apache.qpid.framing.MethodDispatcher;
import org.apache.qpid.framing.MethodRegistry;
import org.apache.qpid.framing.ProtocolInitiation;
import org.apache.qpid.framing.ProtocolVersion;
-import org.apache.qpid.pool.Job;
-import org.apache.qpid.pool.ReferenceCountingExecutorService;
import org.apache.qpid.protocol.AMQConstant;
import org.apache.qpid.protocol.AMQMethodEvent;
import org.apache.qpid.protocol.AMQMethodListener;
-import org.apache.qpid.protocol.ProtocolEngine;
+import org.apache.qpid.protocol.ServerProtocolEngine;
import org.apache.qpid.server.AMQChannel;
import org.apache.qpid.server.configuration.ConfigStore;
import org.apache.qpid.server.configuration.ConfiguredObject;
@@ -88,22 +88,22 @@ import org.apache.qpid.server.management.ManagedObject;
import org.apache.qpid.server.output.ProtocolOutputConverter;
import org.apache.qpid.server.output.ProtocolOutputConverterRegistry;
import org.apache.qpid.server.registry.ApplicationRegistry;
+import org.apache.qpid.server.security.auth.sasl.UsernamePrincipal;
import org.apache.qpid.server.state.AMQState;
import org.apache.qpid.server.state.AMQStateManager;
import org.apache.qpid.server.stats.StatisticsCounter;
import org.apache.qpid.server.virtualhost.VirtualHost;
import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
import org.apache.qpid.transport.Sender;
+import org.apache.qpid.transport.TransportException;
import org.apache.qpid.transport.network.NetworkConnection;
-public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocolSession, ConnectionConfig
+public class AMQProtocolEngine implements ServerProtocolEngine, Managable, AMQProtocolSession, ConnectionConfig
{
private static final Logger _logger = Logger.getLogger(AMQProtocolEngine.class);
private static final String CLIENT_PROPERTIES_INSTANCE = ClientProperties.instance.toString();
- private static final AtomicLong idGenerator = new AtomicLong(0);
-
// to save boxing the channelId and looking up in a map... cache in an array the low numbered
// channels. This value must be of the form 2^x - 1.
private static final int CHANNEL_CACHE_SIZE = 0xff;
@@ -133,7 +133,7 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
private Object _lastSent;
protected volatile boolean _closed;
-
+
// maximum number of channels this session should have
private long _maxNoOfChannels = ApplicationRegistry.getInstance().getConfiguration().getMaxChannelCount();
@@ -145,12 +145,11 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
private Map<Integer, Long> _closingChannelsList = new ConcurrentHashMap<Integer, Long>();
private ProtocolOutputConverter _protocolOutputConverter;
- private Principal _authorizedID;
+ private Subject _authorizedSubject;
private MethodDispatcher _dispatcher;
private ProtocolSessionIdentifier _sessionIdentifier;
- // Create a simple ID that increments for ever new Session
- private final long _sessionID = idGenerator.getAndIncrement();
+ private final long _sessionID;
private AMQPConnectionActor _actor;
private LogSubject _logSubject;
@@ -160,37 +159,32 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
private long _writtenBytes;
private long _readBytes;
- private Job _readJob;
- private Job _writeJob;
- private ReferenceCountingExecutorService _poolReference = ReferenceCountingExecutorService.getInstance();
private long _maxFrameSize;
private final AtomicBoolean _closing = new AtomicBoolean(false);
private final UUID _id;
private final ConfigStore _configStore;
private long _createTime = System.currentTimeMillis();
-
+
private ApplicationRegistry _registry;
private boolean _statisticsEnabled = false;
private StatisticsCounter _messagesDelivered, _dataDelivered, _messagesReceived, _dataReceived;
- private final NetworkConnection _network;
- private final Sender<ByteBuffer> _sender;
+ private NetworkConnection _network;
+ private Sender<ByteBuffer> _sender;
public ManagedObject getManagedObject()
{
return _managedObject;
}
- public AMQProtocolEngine(VirtualHostRegistry virtualHostRegistry, NetworkConnection network)
+ public AMQProtocolEngine(VirtualHostRegistry virtualHostRegistry, NetworkConnection network, final long connectionId)
{
_stateManager = new AMQStateManager(virtualHostRegistry, this);
_codecFactory = new AMQCodecFactory(true, this);
- _poolReference.acquireExecutorService();
- _readJob = new Job(_poolReference, Job.MAX_JOB_EVENTS, true);
- _writeJob = new Job(_poolReference, Job.MAX_JOB_EVENTS, false);
- _network = network;
- _sender = _network.getSender();
+
+ setNetworkConnection(network);
+ _sessionID = connectionId;
_actor = new AMQPConnectionActor(this, virtualHostRegistry.getApplicationRegistry().getRootMessageLogger());
@@ -205,6 +199,17 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
initialiseStatistics();
}
+ public void setNetworkConnection(NetworkConnection network)
+ {
+ setNetworkConnection(network, network.getSender());
+ }
+
+ public void setNetworkConnection(NetworkConnection network, Sender<ByteBuffer> sender)
+ {
+ _network = network;
+ _sender = sender;
+ }
+
private AMQProtocolSessionMBean createMBean() throws JMException
{
return new AMQProtocolSessionMBean(this);
@@ -241,26 +246,18 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
try
{
final ArrayList<AMQDataBlock> dataBlocks = _codecFactory.getDecoder().decodeBuffer(msg);
- Job.fireAsynchEvent(_poolReference.getPool(), _readJob, new Runnable()
+ for (AMQDataBlock dataBlock : dataBlocks)
{
- public void run()
+ try
{
- // Decode buffer
-
- for (AMQDataBlock dataBlock : dataBlocks)
- {
- try
- {
- dataBlockReceived(dataBlock);
- }
- catch (Exception e)
- {
- _logger.error("Unexpected exception when processing datablock", e);
- closeProtocolSession();
- }
- }
+ dataBlockReceived(dataBlock);
}
- });
+ catch (Exception e)
+ {
+ _logger.error("Unexpected exception when processing datablock", e);
+ closeProtocolSession();
+ }
+ }
}
catch (Exception e)
{
@@ -338,6 +335,11 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
closeChannel(channelId);
throw e;
}
+ catch (TransportException e)
+ {
+ closeChannel(channelId);
+ throw e;
+ }
}
finally
{
@@ -348,7 +350,7 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
private void protocolInitiationReceived(ProtocolInitiation pi)
{
// this ensures the codec never checks for a PI message again
- ((AMQDecoder) _codecFactory.getDecoder()).setExpectProtocolInitiation(false);
+ (_codecFactory.getDecoder()).setExpectProtocolInitiation(false);
try
{
// Log incomming protocol negotiation request
@@ -368,15 +370,49 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
null,
mechanisms.getBytes(),
locales.getBytes());
- _sender.send(responseBody.generateFrame(0).toNioByteBuffer());
+ _sender.send(asByteBuffer(responseBody.generateFrame(0)));
+ _sender.flush();
}
catch (AMQException e)
{
_logger.info("Received unsupported protocol initiation for protocol version: " + getProtocolVersion());
- _sender.send(new ProtocolInitiation(ProtocolVersion.getLatestSupportedVersion()).toNioByteBuffer());
+ _sender.send(asByteBuffer(new ProtocolInitiation(ProtocolVersion.getLatestSupportedVersion())));
+ _sender.flush();
+ }
+ }
+
+ private ByteBuffer asByteBuffer(AMQDataBlock block)
+ {
+ final ByteBuffer buf = ByteBuffer.allocate((int) block.getSize());
+
+ try
+ {
+ block.writePayload(new DataOutputStream(new OutputStream()
+ {
+
+
+ @Override
+ public void write(int b) throws IOException
+ {
+ buf.put((byte) b);
+ }
+
+ @Override
+ public void write(byte[] b, int off, int len) throws IOException
+ {
+ buf.put(b, off, len);
+ }
+ }));
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException(e);
}
+
+ buf.flip();
+ return buf;
}
public void methodFrameReceived(int channelId, AMQMethodBody methodBody)
@@ -431,19 +467,19 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
AMQConstant.CHANNEL_ERROR.getName().toString());
_logger.info(e.getMessage() + " whilst processing:" + methodBody);
- closeConnection(channelId, ce, false);
+ closeConnection(channelId, ce);
}
}
catch (AMQConnectionException e)
{
_logger.info(e.getMessage() + " whilst processing:" + methodBody);
- closeConnection(channelId, e, false);
+ closeConnection(channelId, e);
}
catch (AMQSecurityException e)
{
AMQConnectionException ce = evt.getMethod().getConnectionException(AMQConstant.ACCESS_REFUSED, e.getMessage());
_logger.info(e.getMessage() + " whilst processing:" + methodBody);
- closeConnection(channelId, ce, false);
+ closeConnection(channelId, ce);
}
}
catch (Exception e)
@@ -486,19 +522,14 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
*
* @param frame the frame to write
*/
- public void writeFrame(AMQDataBlock frame)
+ public synchronized void writeFrame(AMQDataBlock frame)
{
_lastSent = frame;
- final ByteBuffer buf = frame.toNioByteBuffer();
+ final ByteBuffer buf = asByteBuffer(frame);
_lastIoTime = System.currentTimeMillis();
_writtenBytes += buf.remaining();
- Job.fireAsynchEvent(_poolReference.getPool(), _writeJob, new Runnable()
- {
- public void run()
- {
- _sender.send(buf);
- }
- });
+ _sender.send(buf);
+ _sender.flush();
}
public AMQShortString getContextKey()
@@ -730,7 +761,7 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
}
closeAllChannels();
-
+
getConfigStore().removeConfiguredObject(this);
if (_managedObject != null)
@@ -750,7 +781,6 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
_closed = true;
notifyAll();
}
- _poolReference.releaseExecutorService();
CurrentActor.get().message(_logSubject, ConnectionMessages.CLOSE());
}
}
@@ -773,27 +803,32 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
}
}
- public void closeConnection(int channelId, AMQConnectionException e, boolean closeProtocolSession) throws AMQException
+ public void closeConnection(int channelId, AMQConnectionException e) throws AMQException
{
- if (_logger.isInfoEnabled())
+ try
{
- _logger.info("Closing connection due to: " + e);
- }
-
- markChannelAwaitingCloseOk(channelId);
- closeSession();
- _stateManager.changeState(AMQState.CONNECTION_CLOSING);
- writeFrame(e.getCloseFrame(channelId));
+ if (_logger.isInfoEnabled())
+ {
+ _logger.info("Closing connection due to: " + e);
+ }
- if (closeProtocolSession)
+ markChannelAwaitingCloseOk(channelId);
+ closeSession();
+ _stateManager.changeState(AMQState.CONNECTION_CLOSING);
+ writeFrame(e.getCloseFrame(channelId));
+ }
+ finally
{
closeProtocolSession();
}
+
+
}
public void closeProtocolSession()
{
- _sender.close();
+ _network.close();
+
try
{
_stateManager.changeState(AMQState.CONNECTION_CLOSED);
@@ -802,11 +837,15 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
{
_logger.info(e.getMessage());
}
+ catch (TransportException e)
+ {
+ _logger.info(e.getMessage());
+ }
}
public String toString()
{
- return getRemoteAddress() + "(" + (getAuthorizedID() == null ? "?" : getAuthorizedID().getName() + ")");
+ return getRemoteAddress() + "(" + (getAuthorizedPrincipal() == null ? "?" : getAuthorizedPrincipal().getName() + ")");
}
public String dump()
@@ -924,7 +963,7 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
_virtualHost = virtualHost;
_virtualHost.getConnectionRegistry().registerConnection(this);
-
+
_configStore.addConfiguredObject(this);
try
@@ -953,19 +992,23 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
return _protocolOutputConverter;
}
- public void setAuthorizedID(Principal authorizedID)
+ public void setAuthorizedSubject(final Subject authorizedSubject)
{
- _authorizedID = authorizedID;
+ if (authorizedSubject == null)
+ {
+ throw new IllegalArgumentException("authorizedSubject cannot be null");
+ }
+ _authorizedSubject = authorizedSubject;
}
- public Principal getAuthorizedID()
+ public Subject getAuthorizedSubject()
{
- return _authorizedID;
+ return _authorizedSubject;
}
- public Principal getPrincipal()
+ public Principal getAuthorizedPrincipal()
{
- return _authorizedID;
+ return _authorizedSubject == null ? null : UsernamePrincipal.getUsernamePrincipalFromSubject(_authorizedSubject);
}
public SocketAddress getRemoteAddress()
@@ -998,6 +1041,10 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
{
_logger.error("Could not close protocol engine", e);
}
+ catch (TransportException e)
+ {
+ _logger.error("Could not close protocol engine", e);
+ }
}
public void readerIdle()
@@ -1007,7 +1054,7 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
public void writerIdle()
{
- _sender.send(HeartbeatBody.FRAME.toNioByteBuffer());
+ _sender.send(asByteBuffer(HeartbeatBody.FRAME));
}
public void exception(Throwable throwable)
@@ -1089,7 +1136,7 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
public String getAuthId()
{
- return getAuthorizedID().getName();
+ return getAuthorizedPrincipal().getName();
}
public Integer getRemotePID()
@@ -1151,7 +1198,7 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
{
return false;
}
-
+
public void mgmtClose()
{
MethodRegistry methodRegistry = getMethodRegistry();
@@ -1253,7 +1300,7 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
new AMQShortString(message),
0,0);
- writeFrame(responseBody.generateFrame((Integer)session.getID()));
+ writeFrame(responseBody.generateFrame((Integer)session.getID()));
}
public void close(AMQConstant cause, String message) throws AMQException
@@ -1261,12 +1308,12 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
closeConnection(0, new AMQConnectionException(cause, message, 0, 0,
getProtocolOutputConverter().getProtocolMajorVersion(),
getProtocolOutputConverter().getProtocolMinorVersion(),
- (Throwable) null), true);
+ (Throwable) null));
}
public List<AMQSessionModel> getSessionModels()
{
- List<AMQSessionModel> sessions = new ArrayList<AMQSessionModel>();
+ List<AMQSessionModel> sessions = new ArrayList<AMQSessionModel>();
for (AMQChannel channel : getChannels())
{
sessions.add((AMQSessionModel) channel);
@@ -1298,27 +1345,27 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
}
_virtualHost.registerMessageReceived(messageSize, timestamp);
}
-
+
public StatisticsCounter getMessageReceiptStatistics()
{
return _messagesReceived;
}
-
+
public StatisticsCounter getDataReceiptStatistics()
{
return _dataReceived;
}
-
+
public StatisticsCounter getMessageDeliveryStatistics()
{
return _messagesDelivered;
}
-
+
public StatisticsCounter getDataDeliveryStatistics()
{
return _dataDelivered;
}
-
+
public void resetStatistics()
{
_messagesDelivered.reset();
@@ -1331,7 +1378,7 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
{
setStatisticsEnabled(!StatisticsCounter.DISABLE_STATISTICS &&
_registry.getConfiguration().isStatisticsGenerationConnectionsEnabled());
-
+
_messagesDelivered = new StatisticsCounter("messages-delivered-" + getSessionID());
_dataDelivered = new StatisticsCounter("data-delivered-" + getSessionID());
_messagesReceived = new StatisticsCounter("messages-received-" + getSessionID());
@@ -1347,4 +1394,16 @@ public class AMQProtocolEngine implements ProtocolEngine, Managable, AMQProtocol
{
_statisticsEnabled = enabled;
}
+
+ @Override
+ public boolean isSessionNameUnique(String name)
+ {
+ return true;
+ }
+
+ @Override
+ public String getUserName()
+ {
+ return getAuthorizedPrincipal().getName();
+ }
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngineFactory.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngineFactory.java
deleted file mode 100644
index 94870c98bd..0000000000
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolEngineFactory.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package org.apache.qpid.server.protocol;
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-
-import org.apache.qpid.protocol.ProtocolEngine;
-import org.apache.qpid.protocol.ProtocolEngineFactory;
-import org.apache.qpid.server.registry.ApplicationRegistry;
-import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
-import org.apache.qpid.transport.network.NetworkConnection;
-
-public class AMQProtocolEngineFactory implements ProtocolEngineFactory
-{
- private VirtualHostRegistry _vhosts;
-
- public AMQProtocolEngineFactory()
- {
- this(1);
- }
-
- public AMQProtocolEngineFactory(Integer port)
- {
- _vhosts = ApplicationRegistry.getInstance().getVirtualHostRegistry();
- }
-
-
- public ProtocolEngine newProtocolEngine(NetworkConnection network)
- {
- return new AMQProtocolEngine(_vhosts, network);
- }
-}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSession.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSession.java
index c64ed4ad5a..c1b5b02f8f 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSession.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSession.java
@@ -20,6 +20,7 @@
*/
package org.apache.qpid.server.protocol;
+import javax.security.auth.Subject;
import javax.security.sasl.SaslServer;
import org.apache.qpid.AMQException;
@@ -28,16 +29,15 @@ import org.apache.qpid.framing.*;
import org.apache.qpid.AMQConnectionException;
import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
import org.apache.qpid.server.AMQChannel;
-import org.apache.qpid.server.security.PrincipalHolder;
+import org.apache.qpid.server.security.AuthorizationHolder;
import org.apache.qpid.server.logging.LogActor;
import org.apache.qpid.server.output.ProtocolOutputConverter;
import org.apache.qpid.server.virtualhost.VirtualHost;
-import java.security.Principal;
import java.util.List;
-public interface AMQProtocolSession extends AMQVersionAwareProtocolSession, PrincipalHolder, AMQConnectionModel
+public interface AMQProtocolSession extends AMQVersionAwareProtocolSession, AuthorizationHolder, AMQConnectionModel
{
long getSessionID();
@@ -163,8 +163,10 @@ public interface AMQProtocolSession extends AMQVersionAwareProtocolSession, Prin
/** This must be called when the session is _closed in order to free up any resources managed by the session. */
void closeSession() throws AMQException;
+ void closeProtocolSession();
+
/** This must be called to close the session in order to free up any resources managed by the session. */
- void closeConnection(int channelId, AMQConnectionException e, boolean closeProtocolSession) throws AMQException;
+ void closeConnection(int channelId, AMQConnectionException e) throws AMQException;
/** @return a key that uniquely identifies this session */
@@ -205,7 +207,7 @@ public interface AMQProtocolSession extends AMQVersionAwareProtocolSession, Prin
public ProtocolOutputConverter getProtocolOutputConverter();
- void setAuthorizedID(Principal authorizedID);
+ void setAuthorizedSubject(Subject authorizedSubject);
public java.net.SocketAddress getRemoteAddress();
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
index fcac78fafa..16d99de492 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQProtocolSessionMBean.java
@@ -131,7 +131,7 @@ public class AMQProtocolSessionMBean extends AMQManagedObject implements Managed
public String getAuthorizedId()
{
- return (_protocolSession.getPrincipal() != null ) ? _protocolSession.getPrincipal().getName() : null;
+ return (_protocolSession.getAuthorizedPrincipal() != null ) ? _protocolSession.getAuthorizedPrincipal().getName() : null;
}
public String getVersion()
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java
index 01b12b44ce..7033bf755d 100755
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngine.java
@@ -22,7 +22,7 @@ package org.apache.qpid.server.protocol;
import org.apache.log4j.Logger;
-import org.apache.qpid.protocol.ProtocolEngine;
+import org.apache.qpid.protocol.ServerProtocolEngine;
import org.apache.qpid.server.registry.IApplicationRegistry;
import org.apache.qpid.server.transport.ServerConnection;
import org.apache.qpid.transport.ConnectionDelegate;
@@ -33,30 +33,43 @@ import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.util.Set;
-public class MultiVersionProtocolEngine implements ProtocolEngine
+public class MultiVersionProtocolEngine implements ServerProtocolEngine
{
private static final Logger _logger = Logger.getLogger(MultiVersionProtocolEngine.class);
+ private final long _id;
+
private Set<AmqpProtocolVersion> _supported;
private String _fqdn;
private IApplicationRegistry _appRegistry;
private NetworkConnection _network;
private Sender<ByteBuffer> _sender;
-
- private volatile ProtocolEngine _delegate = new SelfDelegateProtocolEngine();
+
+ private volatile ServerProtocolEngine _delegate = new SelfDelegateProtocolEngine();
+
+ public MultiVersionProtocolEngine(IApplicationRegistry appRegistry,
+ String fqdn,
+ Set<AmqpProtocolVersion> supported,
+ NetworkConnection network,
+ long id)
+ {
+ this(appRegistry,fqdn,supported,id);
+ setNetworkConnection(network);
+ }
public MultiVersionProtocolEngine(IApplicationRegistry appRegistry,
String fqdn,
Set<AmqpProtocolVersion> supported,
- NetworkConnection network)
+ long id)
{
+ _id = id;
_appRegistry = appRegistry;
_fqdn = fqdn;
_supported = supported;
- _network = network;
- _sender = _network.getSender();
+
}
+
public SocketAddress getRemoteAddress()
{
return _delegate.getRemoteAddress();
@@ -92,6 +105,7 @@ public class MultiVersionProtocolEngine implements ProtocolEngine
_delegate.readerIdle();
}
+
public void received(ByteBuffer msg)
{
_delegate.received(msg);
@@ -102,6 +116,11 @@ public class MultiVersionProtocolEngine implements ProtocolEngine
_delegate.exception(t);
}
+ public long getConnectionId()
+ {
+ return _delegate.getConnectionId();
+ }
+
private static final int MINIMUM_REQUIRED_HEADER_BYTES = 8;
private static final byte[] AMQP_0_8_HEADER =
@@ -126,7 +145,7 @@ public class MultiVersionProtocolEngine implements ProtocolEngine
(byte) 9
};
-private static final byte[] AMQP_0_9_1_HEADER =
+ private static final byte[] AMQP_0_9_1_HEADER =
new byte[] { (byte) 'A',
(byte) 'M',
(byte) 'Q',
@@ -149,11 +168,23 @@ private static final byte[] AMQP_0_9_1_HEADER =
(byte) 10
};
+ public void setNetworkConnection(NetworkConnection networkConnection)
+ {
+ setNetworkConnection(networkConnection, networkConnection.getSender());
+ }
+
+ public void setNetworkConnection(NetworkConnection network, Sender<ByteBuffer> sender)
+ {
+ _network = network;
+ _sender = sender;
+ }
+
+
private static interface DelegateCreator
{
AmqpProtocolVersion getVersion();
byte[] getHeaderIdentifier();
- ProtocolEngine getProtocolEngine();
+ ServerProtocolEngine getProtocolEngine();
}
private DelegateCreator creator_0_8 = new DelegateCreator()
@@ -169,9 +200,9 @@ private static final byte[] AMQP_0_9_1_HEADER =
return AMQP_0_8_HEADER;
}
- public ProtocolEngine getProtocolEngine()
+ public ServerProtocolEngine getProtocolEngine()
{
- return new AMQProtocolEngine(_appRegistry.getVirtualHostRegistry(), _network);
+ return new AMQProtocolEngine(_appRegistry.getVirtualHostRegistry(), _network, _id);
}
};
@@ -189,9 +220,9 @@ private static final byte[] AMQP_0_9_1_HEADER =
return AMQP_0_9_HEADER;
}
- public ProtocolEngine getProtocolEngine()
+ public ServerProtocolEngine getProtocolEngine()
{
- return new AMQProtocolEngine(_appRegistry.getVirtualHostRegistry(), _network);
+ return new AMQProtocolEngine(_appRegistry.getVirtualHostRegistry(), _network, _id);
}
};
@@ -209,9 +240,9 @@ private static final byte[] AMQP_0_9_1_HEADER =
return AMQP_0_9_1_HEADER;
}
- public ProtocolEngine getProtocolEngine()
+ public ServerProtocolEngine getProtocolEngine()
{
- return new AMQProtocolEngine(_appRegistry.getVirtualHostRegistry(), _network);
+ return new AMQProtocolEngine(_appRegistry.getVirtualHostRegistry(), _network, _id);
}
};
@@ -230,12 +261,12 @@ private static final byte[] AMQP_0_9_1_HEADER =
return AMQP_0_10_HEADER;
}
- public ProtocolEngine getProtocolEngine()
+ public ServerProtocolEngine getProtocolEngine()
{
final ConnectionDelegate connDelegate =
new org.apache.qpid.server.transport.ServerConnectionDelegate(_appRegistry, _fqdn);
- ServerConnection conn = new ServerConnection();
+ ServerConnection conn = new ServerConnection(_id);
conn.setConnectionDelegate(connDelegate);
return new ProtocolEngine_0_10( conn, _network, _appRegistry);
@@ -246,7 +277,7 @@ private static final byte[] AMQP_0_9_1_HEADER =
new DelegateCreator[] { creator_0_8, creator_0_9, creator_0_9_1, creator_0_10 };
- private class ClosedDelegateProtocolEngine implements ProtocolEngine
+ private class ClosedDelegateProtocolEngine implements ServerProtocolEngine
{
public SocketAddress getRemoteAddress()
{
@@ -292,9 +323,19 @@ private static final byte[] AMQP_0_9_1_HEADER =
{
}
+
+ public void setNetworkConnection(NetworkConnection network, Sender<ByteBuffer> sender)
+ {
+
+ }
+
+ public long getConnectionId()
+ {
+ return _id;
+ }
}
- private class SelfDelegateProtocolEngine implements ProtocolEngine
+ private class SelfDelegateProtocolEngine implements ServerProtocolEngine
{
private final ByteBuffer _header = ByteBuffer.allocate(MINIMUM_REQUIRED_HEADER_BYTES);
@@ -340,7 +381,7 @@ private static final byte[] AMQP_0_9_1_HEADER =
_header.get(headerBytes);
- ProtocolEngine newDelegate = null;
+ ServerProtocolEngine newDelegate = null;
byte[] newestSupported = null;
for(int i = 0; newDelegate == null && i < _creators.length; i++)
@@ -366,14 +407,19 @@ private static final byte[] AMQP_0_9_1_HEADER =
if(newDelegate == null)
{
_sender.send(ByteBuffer.wrap(newestSupported));
+ _sender.flush();
_delegate = new ClosedDelegateProtocolEngine();
+
+ _network.close();
+
}
else
{
_delegate = newDelegate;
_header.flip();
+ _delegate.setNetworkConnection(_network, _sender);
_delegate.received(_header);
if(msg.hasRemaining())
{
@@ -385,6 +431,11 @@ private static final byte[] AMQP_0_9_1_HEADER =
}
+ public long getConnectionId()
+ {
+ return _id;
+ }
+
public void exception(Throwable t)
{
_logger.error("Error establishing session", t);
@@ -404,5 +455,10 @@ private static final byte[] AMQP_0_9_1_HEADER =
{
}
+
+ public void setNetworkConnection(NetworkConnection network, Sender<ByteBuffer> sender)
+ {
+
+ }
}
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactory.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactory.java
index 96d46353c6..7e327b221f 100755
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactory.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactory.java
@@ -20,50 +20,38 @@
*/
package org.apache.qpid.server.protocol;
-import java.util.EnumSet;
import java.util.Set;
+import java.util.concurrent.atomic.AtomicLong;
-import org.apache.qpid.protocol.ProtocolEngine;
import org.apache.qpid.protocol.ProtocolEngineFactory;
+import org.apache.qpid.protocol.ServerProtocolEngine;
import org.apache.qpid.server.registry.ApplicationRegistry;
import org.apache.qpid.server.registry.IApplicationRegistry;
import org.apache.qpid.transport.network.NetworkConnection;
public class MultiVersionProtocolEngineFactory implements ProtocolEngineFactory
{
- private static final Set<AmqpProtocolVersion> ALL_VERSIONS = EnumSet.allOf(AmqpProtocolVersion.class);
+ private static final AtomicLong ID_GENERATOR = new AtomicLong(0);
private final IApplicationRegistry _appRegistry;
private final String _fqdn;
private final Set<AmqpProtocolVersion> _supported;
-
- public MultiVersionProtocolEngineFactory()
- {
- this(1, "localhost", ALL_VERSIONS);
- }
-
- public MultiVersionProtocolEngineFactory(String fqdn, Set<AmqpProtocolVersion> versions)
- {
- this(1, fqdn, versions);
- }
-
-
- public MultiVersionProtocolEngineFactory(String fqdn)
- {
- this(1, fqdn, ALL_VERSIONS);
- }
-
- public MultiVersionProtocolEngineFactory(int instance, String fqdn, Set<AmqpProtocolVersion> supportedVersions)
+ public MultiVersionProtocolEngineFactory(String fqdn, Set<AmqpProtocolVersion> supportedVersions)
{
_appRegistry = ApplicationRegistry.getInstance();
_fqdn = fqdn;
_supported = supportedVersions;
}
+ public ServerProtocolEngine newProtocolEngine(NetworkConnection network)
+ {
+ return new MultiVersionProtocolEngine(_appRegistry, _fqdn, _supported, network, ID_GENERATOR.getAndIncrement());
+ }
- public ProtocolEngine newProtocolEngine(NetworkConnection network)
+ public ServerProtocolEngine newProtocolEngine()
{
- return new MultiVersionProtocolEngine(_appRegistry, _fqdn, _supported, network);
+ return new MultiVersionProtocolEngine(_appRegistry, _fqdn, _supported, ID_GENERATOR.getAndIncrement());
}
+
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_0_10.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_0_10.java
index 42a604e3a5..48a8a1bf42 100755
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_0_10.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/ProtocolEngine_0_10.java
@@ -20,7 +20,8 @@
*/
package org.apache.qpid.server.protocol;
-import org.apache.qpid.protocol.ProtocolEngine;
+import org.apache.qpid.protocol.ServerProtocolEngine;
+import org.apache.qpid.transport.Sender;
import org.apache.qpid.transport.network.InputHandler;
import org.apache.qpid.transport.network.Assembler;
import org.apache.qpid.transport.network.Disassembler;
@@ -31,9 +32,10 @@ import org.apache.qpid.server.logging.messages.ConnectionMessages;
import org.apache.qpid.server.registry.IApplicationRegistry;
import java.net.SocketAddress;
+import java.nio.ByteBuffer;
import java.util.UUID;
-public class ProtocolEngine_0_10 extends InputHandler implements ProtocolEngine, ConnectionConfig
+public class ProtocolEngine_0_10 extends InputHandler implements ServerProtocolEngine, ConnectionConfig
{
public static final int MAX_FRAME_SIZE = 64 * 1024 - 1;
@@ -52,11 +54,16 @@ public class ProtocolEngine_0_10 extends InputHandler implements ProtocolEngine
super(new Assembler(conn));
_connection = conn;
_connection.setConnectionConfig(this);
- _network = network;
+
_id = appRegistry.getConfigStore().createId();
_appRegistry = appRegistry;
- _connection.setSender(new Disassembler(_network.getSender(), MAX_FRAME_SIZE));
+ if(network != null)
+ {
+ setNetworkConnection(network);
+ }
+
+
_connection.onOpen(new Runnable()
{
public void run()
@@ -65,6 +72,19 @@ public class ProtocolEngine_0_10 extends InputHandler implements ProtocolEngine
}
});
+ }
+
+ public void setNetworkConnection(NetworkConnection network)
+ {
+ setNetworkConnection(network, network.getSender());
+ }
+
+ public void setNetworkConnection(NetworkConnection network, Sender<ByteBuffer> sender)
+ {
+ _network = network;
+
+ _connection.setSender(new Disassembler(sender, MAX_FRAME_SIZE));
+
// FIXME Two log messages to maintain compatibility with earlier protocol versions
_connection.getLogActor().message(ConnectionMessages.OPEN(null, null, false, false));
_connection.getLogActor().message(ConnectionMessages.OPEN(null, "0-10", false, true));
@@ -127,7 +147,7 @@ public class ProtocolEngine_0_10 extends InputHandler implements ProtocolEngine
public String getAuthId()
{
- return _connection.getAuthorizationID();
+ return _connection.getAuthorizedPrincipal() == null ? null : _connection.getAuthorizedPrincipal().getName();
}
public String getRemoteProcessName()
@@ -186,9 +206,14 @@ public class ProtocolEngine_0_10 extends InputHandler implements ProtocolEngine
{
return false;
}
-
+
public void mgmtClose()
{
_connection.mgmtClose();
}
+
+ public long getConnectionId()
+ {
+ return _connection.getConnectionId();
+ }
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
index 9b9de8333b..9140a13625 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
@@ -32,7 +32,7 @@ import org.apache.qpid.server.exchange.Exchange;
import org.apache.qpid.server.exchange.ExchangeReferrer;
import org.apache.qpid.server.management.Managable;
import org.apache.qpid.server.management.ManagedObject;
-import org.apache.qpid.server.security.PrincipalHolder;
+import org.apache.qpid.server.security.AuthorizationHolder;
import org.apache.qpid.server.store.TransactionLogResource;
import org.apache.qpid.server.subscription.Subscription;
import org.apache.qpid.server.txn.ServerTransaction;
@@ -69,8 +69,8 @@ public interface AMQQueue extends Managable, Comparable<AMQQueue>, ExchangeRefer
boolean isAutoDelete();
AMQShortString getOwner();
- PrincipalHolder getPrincipalHolder();
- void setPrincipalHolder(PrincipalHolder principalHolder);
+ AuthorizationHolder getAuthorizationHolder();
+ void setAuthorizationHolder(AuthorizationHolder principalHolder);
void setExclusiveOwningSession(AMQSessionModel owner);
AMQSessionModel getExclusiveOwningSession();
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/IncomingMessage.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/IncomingMessage.java
index 3e3288404f..a56f5685b8 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/IncomingMessage.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/IncomingMessage.java
@@ -139,7 +139,7 @@ public class IncomingMessage implements Filterable, InboundMessage, EnqueableMes
public int addContentBodyFrame(final ContentChunk contentChunk)
throws AMQException
{
- _storedMessageHandle.addContent((int)_bodyLengthReceived, contentChunk.getData().buf());
+ _storedMessageHandle.addContent((int)_bodyLengthReceived, ByteBuffer.wrap(contentChunk.getData()));
_bodyLengthReceived += contentChunk.getSize();
_contentChunks.add(contentChunk);
@@ -263,7 +263,7 @@ public class IncomingMessage implements Filterable, InboundMessage, EnqueableMes
int written = 0;
for(ContentChunk cb : _contentChunks)
{
- ByteBuffer data = cb.getData().buf();
+ ByteBuffer data = ByteBuffer.wrap(cb.getData());
if(offset+written >= pos && offset < pos + data.limit())
{
ByteBuffer src = data.duplicate();
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntry.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntry.java
index 88349586c3..be29245901 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntry.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntry.java
@@ -202,9 +202,7 @@ public interface QueueEntry extends Comparable<QueueEntry>, Filterable
void reject();
- void reject(Subscription subscription);
-
- boolean isRejectedBy(Subscription subscription);
+ boolean isRejectedBy(long subscriptionId);
void dequeue();
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java
index e951b3dfd4..5b57e40a82 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/QueueEntryImpl.java
@@ -51,7 +51,7 @@ public class QueueEntryImpl implements QueueEntry
private MessageReference _message;
- private Set<Subscription> _rejectedBy = null;
+ private Set<Long> _rejectedBy = null;
private volatile EntryState _state = AVAILABLE_STATE;
@@ -325,19 +325,16 @@ public class QueueEntryImpl implements QueueEntry
public void reject()
{
- reject(getDeliveredSubscription());
- }
+ Subscription subscription = getDeliveredSubscription();
- public void reject(Subscription subscription)
- {
if (subscription != null)
{
if (_rejectedBy == null)
{
- _rejectedBy = new HashSet<Subscription>();
+ _rejectedBy = new HashSet<Long>();
}
- _rejectedBy.add(subscription);
+ _rejectedBy.add(subscription.getSubscriptionID());
}
else
{
@@ -345,12 +342,12 @@ public class QueueEntryImpl implements QueueEntry
}
}
- public boolean isRejectedBy(Subscription subscription)
+ public boolean isRejectedBy(long subscriptionId)
{
if (_rejectedBy != null) // We have subscriptions that rejected this message
{
- return _rejectedBy.contains(subscription);
+ return _rejectedBy.contains(subscriptionId);
}
else // This messasge hasn't been rejected yet.
{
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
index 274cb6714a..a095ef47ea 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
@@ -44,7 +44,7 @@ import org.apache.qpid.server.logging.subjects.QueueLogSubject;
import org.apache.qpid.server.management.ManagedObject;
import org.apache.qpid.server.message.ServerMessage;
import org.apache.qpid.server.registry.ApplicationRegistry;
-import org.apache.qpid.server.security.PrincipalHolder;
+import org.apache.qpid.server.security.AuthorizationHolder;
import org.apache.qpid.server.subscription.Subscription;
import org.apache.qpid.server.subscription.SubscriptionList;
import org.apache.qpid.server.txn.AutoCommitTransaction;
@@ -83,7 +83,7 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener
/** null means shared */
private final AMQShortString _owner;
- private PrincipalHolder _prinicpalHolder;
+ private AuthorizationHolder _authorizationHolder;
private boolean _exclusive = false;
private AMQSessionModel _exclusiveOwner;
@@ -102,9 +102,7 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener
protected final QueueEntryList _entries;
- protected final SubscriptionList _subscriptionList = new SubscriptionList(this);
-
- private final AtomicReference<SubscriptionList.SubscriptionNode> _lastSubscriptionNode = new AtomicReference<SubscriptionList.SubscriptionNode>(_subscriptionList.getHead());
+ protected final SubscriptionList _subscriptionList = new SubscriptionList();
private volatile Subscription _exclusiveSubscriber;
@@ -373,14 +371,14 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener
return _owner;
}
- public PrincipalHolder getPrincipalHolder()
+ public AuthorizationHolder getAuthorizationHolder()
{
- return _prinicpalHolder;
+ return _authorizationHolder;
}
- public void setPrincipalHolder(PrincipalHolder prinicpalHolder)
+ public void setAuthorizationHolder(final AuthorizationHolder authorizationHolder)
{
- _prinicpalHolder = prinicpalHolder;
+ _authorizationHolder = authorizationHolder;
}
@@ -602,25 +600,25 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener
iterate over subscriptions and if any is at the end of the queue and can deliver this message, then deliver the message
*/
- SubscriptionList.SubscriptionNode node = _lastSubscriptionNode.get();
- SubscriptionList.SubscriptionNode nextNode = node.getNext();
+ SubscriptionList.SubscriptionNode node = _subscriptionList.getMarkedNode();
+ SubscriptionList.SubscriptionNode nextNode = node.findNext();
if (nextNode == null)
{
- nextNode = _subscriptionList.getHead().getNext();
+ nextNode = _subscriptionList.getHead().findNext();
}
while (nextNode != null)
{
- if (_lastSubscriptionNode.compareAndSet(node, nextNode))
+ if (_subscriptionList.updateMarkedNode(node, nextNode))
{
break;
}
else
{
- node = _lastSubscriptionNode.get();
- nextNode = node.getNext();
+ node = _subscriptionList.getMarkedNode();
+ nextNode = node.findNext();
if (nextNode == null)
{
- nextNode = _subscriptionList.getHead().getNext();
+ nextNode = _subscriptionList.getHead().findNext();
}
}
}
@@ -642,7 +640,7 @@ public class SimpleAMQQueue implements AMQQueue, Subscription.StateListener
Subscription sub = nextNode.getSubscription();
deliverToSubscription(sub, entry);
}
- nextNode = nextNode.getNext();
+ nextNode = nextNode.findNext();
}
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java
index 3c6497d8be..c07074f69c 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java
@@ -21,7 +21,9 @@
package org.apache.qpid.server.registry;
import java.net.InetSocketAddress;
+import java.util.Collection;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
@@ -52,17 +54,18 @@ import org.apache.qpid.server.logging.messages.BrokerMessages;
import org.apache.qpid.server.logging.messages.VirtualHostMessages;
import org.apache.qpid.server.management.ManagedObjectRegistry;
import org.apache.qpid.server.management.NoopManagedObjectRegistry;
+import org.apache.qpid.server.plugins.Plugin;
import org.apache.qpid.server.plugins.PluginManager;
import org.apache.qpid.server.security.SecurityManager;
-import org.apache.qpid.server.security.auth.database.ConfigurationFilePrincipalDatabaseManager;
-import org.apache.qpid.server.security.auth.database.PrincipalDatabaseManager;
+import org.apache.qpid.server.security.SecurityManager.SecurityConfiguration;
import org.apache.qpid.server.security.auth.manager.AuthenticationManager;
-import org.apache.qpid.server.security.auth.manager.PrincipalDatabaseAuthenticationManager;
+import org.apache.qpid.server.security.auth.manager.AuthenticationManagerPluginFactory;
import org.apache.qpid.server.stats.StatisticsCounter;
import org.apache.qpid.server.transport.QpidAcceptor;
import org.apache.qpid.server.virtualhost.VirtualHost;
import org.apache.qpid.server.virtualhost.VirtualHostImpl;
import org.apache.qpid.server.virtualhost.VirtualHostRegistry;
+import org.osgi.framework.BundleContext;
/**
@@ -89,8 +92,6 @@ public abstract class ApplicationRegistry implements IApplicationRegistry
protected SecurityManager _securityManager;
- protected PrincipalDatabaseManager _databaseManager;
-
protected PluginManager _pluginManager;
protected ConfigurationManager _configurationManager;
@@ -111,6 +112,8 @@ public abstract class ApplicationRegistry implements IApplicationRegistry
private boolean _statisticsEnabled = false;
private StatisticsCounter _messagesDelivered, _dataDelivered, _messagesReceived, _dataReceived;
+ private BundleContext _bundleContext;
+
static
{
Runtime.getRuntime().addShutdownHook(new Thread(new ShutdownService()));
@@ -209,7 +212,13 @@ public abstract class ApplicationRegistry implements IApplicationRegistry
protected ApplicationRegistry(ServerConfiguration configuration)
{
+ this(configuration, null);
+ }
+
+ protected ApplicationRegistry(ServerConfiguration configuration, BundleContext bundleContext)
+ {
_configuration = configuration;
+ _bundleContext = bundleContext;
}
public void configure() throws ConfigurationException
@@ -218,7 +227,7 @@ public abstract class ApplicationRegistry implements IApplicationRegistry
try
{
- _pluginManager = new PluginManager(_configuration.getPluginDirectory(), _configuration.getCacheDirectory());
+ _pluginManager = new PluginManager(_configuration.getPluginDirectory(), _configuration.getCacheDirectory(), _bundleContext);
}
catch (Exception e)
{
@@ -253,11 +262,7 @@ public abstract class ApplicationRegistry implements IApplicationRegistry
_securityManager = new SecurityManager(_configuration, _pluginManager);
- createDatabaseManager(_configuration);
-
- _authenticationManager = new PrincipalDatabaseAuthenticationManager();
-
- _databaseManager.initialiseManagement(_configuration);
+ _authenticationManager = createAuthenticationManager();
_managedObjectRegistry.start();
}
@@ -280,9 +285,51 @@ public abstract class ApplicationRegistry implements IApplicationRegistry
}
}
- protected void createDatabaseManager(ServerConfiguration configuration) throws Exception
+ /**
+ * Iterates across all discovered authentication manager factories, offering the security configuration to each.
+ * Expects <b>exactly</b> one authentication manager to configure and initialise itself.
+ *
+ * It is an error to configure more than one authentication manager, or to configure none.
+ *
+ * @return authentication manager
+ * @throws ConfigurationException
+ */
+ protected AuthenticationManager createAuthenticationManager() throws ConfigurationException
{
- _databaseManager = new ConfigurationFilePrincipalDatabaseManager(_configuration);
+ final SecurityConfiguration securityConfiguration = _configuration.getConfiguration(SecurityConfiguration.class.getName());
+ final Collection<AuthenticationManagerPluginFactory<? extends Plugin>> factories = _pluginManager.getAuthenticationManagerPlugins().values();
+
+ if (factories.size() == 0)
+ {
+ throw new ConfigurationException("No authentication manager factory plugins found. Check the desired authentication" +
+ "manager plugin has been placed in the plugins directory.");
+ }
+
+ AuthenticationManager authMgr = null;
+
+ for (final Iterator<AuthenticationManagerPluginFactory<? extends Plugin>> iterator = factories.iterator(); iterator.hasNext();)
+ {
+ final AuthenticationManagerPluginFactory<? extends Plugin> factory = (AuthenticationManagerPluginFactory<? extends Plugin>) iterator.next();
+ final AuthenticationManager tmp = factory.newInstance(securityConfiguration);
+ if (tmp != null)
+ {
+ if (authMgr != null)
+ {
+ throw new ConfigurationException("Cannot configure more than one authentication manager."
+ + " Both " + tmp.getClass() + " and " + authMgr.getClass() + " are configured."
+ + " Remove configuration for one of the authentication manager, or remove the plugin JAR"
+ + " from the classpath.");
+ }
+ authMgr = tmp;
+ }
+ }
+
+ if (authMgr == null)
+ {
+ throw new ConfigurationException("No authentication managers configured within the configure file.");
+ }
+
+ return authMgr;
}
protected void initialiseVirtualHosts() throws Exception
@@ -422,10 +469,6 @@ public abstract class ApplicationRegistry implements IApplicationRegistry
//Shutdown virtualhosts
close(_virtualHostRegistry);
-// close(_accessManager);
-//
-// close(_databaseManager);
-
close(_authenticationManager);
close(_managedObjectRegistry);
@@ -487,11 +530,6 @@ public abstract class ApplicationRegistry implements IApplicationRegistry
return _managedObjectRegistry;
}
- public PrincipalDatabaseManager getDatabaseManager()
- {
- return _databaseManager;
- }
-
public AuthenticationManager getAuthenticationManager()
{
return _authenticationManager;
@@ -539,7 +577,7 @@ public abstract class ApplicationRegistry implements IApplicationRegistry
public VirtualHost createVirtualHost(final VirtualHostConfiguration vhostConfig) throws Exception
{
- VirtualHostImpl virtualHost = new VirtualHostImpl(this, vhostConfig);
+ VirtualHostImpl virtualHost = new VirtualHostImpl(this, vhostConfig, null);
_virtualHostRegistry.registerVirtualHost(virtualHost);
getBroker().addVirtualHost(virtualHost);
return virtualHost;
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ConfigurationFileApplicationRegistry.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ConfigurationFileApplicationRegistry.java
index ff2a8c959b..9121f8f927 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ConfigurationFileApplicationRegistry.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ConfigurationFileApplicationRegistry.java
@@ -29,12 +29,18 @@ import org.apache.qpid.server.logging.actors.BrokerActor;
import org.apache.qpid.server.logging.actors.CurrentActor;
import org.apache.qpid.server.management.JMXManagedObjectRegistry;
import org.apache.qpid.server.management.NoopManagedObjectRegistry;
+import org.osgi.framework.BundleContext;
public class ConfigurationFileApplicationRegistry extends ApplicationRegistry
{
public ConfigurationFileApplicationRegistry(File configurationURL) throws ConfigurationException
{
- super(new ServerConfiguration(configurationURL));
+ this(configurationURL, null);
+ }
+
+ public ConfigurationFileApplicationRegistry(File configurationURL, BundleContext bundleContext) throws ConfigurationException
+ {
+ super(new ServerConfiguration(configurationURL), bundleContext);
}
@Override
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java
index dbd3780c73..c27e0d19ec 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/IApplicationRegistry.java
@@ -33,7 +33,6 @@ import org.apache.qpid.server.logging.RootMessageLogger;
import org.apache.qpid.server.management.ManagedObjectRegistry;
import org.apache.qpid.server.plugins.PluginManager;
import org.apache.qpid.server.security.SecurityManager;
-import org.apache.qpid.server.security.auth.database.PrincipalDatabaseManager;
import org.apache.qpid.server.security.auth.manager.AuthenticationManager;
import org.apache.qpid.server.stats.StatisticsGatherer;
import org.apache.qpid.server.transport.QpidAcceptor;
@@ -63,8 +62,6 @@ public interface IApplicationRegistry extends StatisticsGatherer
ManagedObjectRegistry getManagedObjectRegistry();
- PrincipalDatabaseManager getDatabaseManager();
-
AuthenticationManager getAuthenticationManager();
VirtualHostRegistry getVirtualHostRegistry();
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/AuthorizationHolder.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/AuthorizationHolder.java
new file mode 100755
index 0000000000..3d8c77a86f
--- /dev/null
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/AuthorizationHolder.java
@@ -0,0 +1,53 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.security;
+
+import java.security.Principal;
+
+import javax.security.auth.Subject;
+
+import org.apache.qpid.server.security.auth.sasl.GroupPrincipal;
+import org.apache.qpid.server.security.auth.sasl.UsernamePrincipal;
+
+/**
+ * Represents the authorization of the logged on user.
+ *
+ */
+public interface AuthorizationHolder
+{
+ /**
+ * Returns the {@link Subject} of the authorized user. This is guaranteed to
+ * contain at least one {@link UsernamePrincipal}, representing the the identity
+ * used when the user logged on to the application, and zero or more {@link GroupPrincipal}
+ * representing the group(s) to which the user belongs.
+ *
+ * @return the Subject
+ */
+ Subject getAuthorizedSubject();
+
+ /**
+ * Returns the {@link Principal} representing the the identity
+ * used when the user logged on to the application.
+ *
+ * @return a Principal
+ */
+ Principal getAuthorizedPrincipal();
+}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java
index f18c327692..f582fed6a0 100755
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/SecurityManager.java
@@ -18,8 +18,19 @@
*/
package org.apache.qpid.server.security;
-import static org.apache.qpid.server.security.access.ObjectType.*;
-import static org.apache.qpid.server.security.access.Operation.*;
+import static org.apache.qpid.server.security.access.ObjectType.EXCHANGE;
+import static org.apache.qpid.server.security.access.ObjectType.METHOD;
+import static org.apache.qpid.server.security.access.ObjectType.OBJECT;
+import static org.apache.qpid.server.security.access.ObjectType.QUEUE;
+import static org.apache.qpid.server.security.access.ObjectType.VIRTUALHOST;
+import static org.apache.qpid.server.security.access.Operation.ACCESS;
+import static org.apache.qpid.server.security.access.Operation.BIND;
+import static org.apache.qpid.server.security.access.Operation.CONSUME;
+import static org.apache.qpid.server.security.access.Operation.CREATE;
+import static org.apache.qpid.server.security.access.Operation.DELETE;
+import static org.apache.qpid.server.security.access.Operation.PUBLISH;
+import static org.apache.qpid.server.security.access.Operation.PURGE;
+import static org.apache.qpid.server.security.access.Operation.UNBIND;
import java.net.SocketAddress;
import java.security.Principal;
@@ -29,6 +40,8 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
+import javax.security.auth.Subject;
+
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.log4j.Logger;
@@ -37,11 +50,9 @@ import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin;
import org.apache.qpid.server.configuration.plugins.ConfigurationPluginFactory;
import org.apache.qpid.server.exchange.Exchange;
import org.apache.qpid.server.plugins.PluginManager;
-import org.apache.qpid.server.protocol.AMQProtocolSession;
import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.security.access.ObjectProperties;
import org.apache.qpid.server.security.access.Operation;
-import org.apache.qpid.server.security.auth.sasl.UsernamePrincipal;
/**
* The security manager contains references to all loaded {@link SecurityPlugin}s and delegates security decisions to them based
@@ -55,7 +66,7 @@ public class SecurityManager
private static final Logger _logger = Logger.getLogger(SecurityManager.class);
/** Container for the {@link Principal} that is using to this thread. */
- private static final ThreadLocal<Principal> _principal = new ThreadLocal<Principal>();
+ private static final ThreadLocal<Subject> _subject = new ThreadLocal<Subject>();
private PluginManager _pluginManager;
private Map<String, SecurityPluginFactory> _pluginFactories = new HashMap<String, SecurityPluginFactory>();
@@ -126,19 +137,14 @@ public class SecurityManager
configureHostPlugins(configuration);
}
- public static Principal getThreadPrincipal()
- {
- return _principal.get();
- }
-
- public static void setThreadPrincipal(Principal principal)
+ public static Subject getThreadSubject()
{
- _principal.set(principal);
+ return _subject.get();
}
- public static void setThreadPrincipal(String authId)
+ public static void setThreadSubject(final Subject subject)
{
- setThreadPrincipal(new UsernamePrincipal(authId));
+ _subject.set(subject);
}
public void configureHostPlugins(ConfigurationPlugin hostConfig) throws ConfigurationException
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/ObjectProperties.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/ObjectProperties.java
index 70a9ea5356..e4bf8df340 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/ObjectProperties.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/access/ObjectProperties.java
@@ -149,9 +149,9 @@ public class ObjectProperties extends HashMap<ObjectProperties.Property, String>
{
put(Property.OWNER, queue.getOwner());
}
- else if (queue.getPrincipalHolder() != null)
+ else if (queue.getAuthorizationHolder() != null)
{
- put(Property.OWNER, queue.getPrincipalHolder().getPrincipal().getName());
+ put(Property.OWNER, queue.getAuthorizationHolder().getAuthorizedPrincipal().getName());
}
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/ConfigurationFilePrincipalDatabaseManager.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/ConfigurationFilePrincipalDatabaseManager.java
deleted file mode 100644
index a22c66c73d..0000000000
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/ConfigurationFilePrincipalDatabaseManager.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.server.security.auth.database;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.configuration.Configuration;
-import org.apache.commons.configuration.ConfigurationException;
-
-import org.apache.log4j.Logger;
-
-import org.apache.qpid.configuration.PropertyUtils;
-import org.apache.qpid.configuration.PropertyException;
-import org.apache.qpid.server.configuration.ServerConfiguration;
-import org.apache.qpid.server.registry.ApplicationRegistry;
-import org.apache.qpid.server.security.auth.database.PrincipalDatabase;
-import org.apache.qpid.server.security.auth.database.PrincipalDatabaseManager;
-import org.apache.qpid.server.security.auth.management.AMQUserManagementMBean;
-import org.apache.qpid.AMQException;
-
-import javax.management.JMException;
-
-public class ConfigurationFilePrincipalDatabaseManager implements PrincipalDatabaseManager
-{
- private static final Logger _logger = Logger.getLogger(ConfigurationFilePrincipalDatabaseManager.class);
-
- Map<String, PrincipalDatabase> _databases;
-
- public ConfigurationFilePrincipalDatabaseManager(ServerConfiguration _configuration) throws Exception
- {
- _logger.info("Initialising PrincipalDatabase authentication manager");
- _databases = initialisePrincipalDatabases(_configuration);
- }
-
- private Map<String, PrincipalDatabase> initialisePrincipalDatabases(ServerConfiguration _configuration) throws Exception
- {
- List<String> databaseNames = _configuration.getPrincipalDatabaseNames();
- List<String> databaseClasses = _configuration.getPrincipalDatabaseClass();
- Map<String, PrincipalDatabase> databases = new HashMap<String, PrincipalDatabase>();
-
- if (databaseNames.size() == 0)
- {
- _logger.warn("No Principal databases specified. Broker running with NO AUTHENTICATION");
- }
-
- for (int i = 0; i < databaseNames.size(); i++)
- {
- Object o;
- try
- {
- o = Class.forName(databaseClasses.get(i)).newInstance();
- }
- catch (Exception e)
- {
- throw new Exception("Error initialising principal database: " + e, e);
- }
-
- if (!(o instanceof PrincipalDatabase))
- {
- throw new Exception("Principal databases must implement the PrincipalDatabase interface");
- }
-
- initialisePrincipalDatabase((PrincipalDatabase) o, _configuration, i);
-
- String name = databaseNames.get(i);
- if ((name == null) || (name.length() == 0))
- {
- throw new Exception("Principal database names must have length greater than or equal to one character");
- }
-
- PrincipalDatabase pd = databases.get(name);
- if (pd != null)
- {
- throw new Exception("Duplicate principal database name not permitted");
- }
-
- _logger.info("Initialised principal database '" + name + "' successfully");
- databases.put(name, (PrincipalDatabase) o);
- }
-
- return databases;
- }
-
- private void initialisePrincipalDatabase(PrincipalDatabase principalDatabase, ServerConfiguration _configuration, int index)
- throws FileNotFoundException, ConfigurationException
- {
- List<String> argumentNames = _configuration.getPrincipalDatabaseAttributeNames(index);
- List<String> argumentValues = _configuration.getPrincipalDatabaseAttributeValues(index);
- for (int i = 0; i < argumentNames.size(); i++)
- {
- String argName = argumentNames.get(i);
- if ((argName == null) || (argName.length() == 0))
- {
- throw new ConfigurationException("Argument names must have length >= 1 character");
- }
-
- if (Character.isLowerCase(argName.charAt(0)))
- {
- argName = Character.toUpperCase(argName.charAt(0)) + argName.substring(1);
- }
-
- String methodName = "set" + argName;
- Method method = null;
- try
- {
- method = principalDatabase.getClass().getMethod(methodName, String.class);
- }
- catch (Exception e)
- {
- // do nothing.. as on error method will be null
- }
-
- if (method == null)
- {
- throw new ConfigurationException("No method " + methodName + " found in class "
- + principalDatabase.getClass()
- + " hence unable to configure principal database. The method must be public and "
- + "have a single String argument with a void return type");
- }
-
- try
- {
- method.invoke(principalDatabase, PropertyUtils.replaceProperties(argumentValues.get(i)));
- }
- catch (Exception ite)
- {
- if (ite instanceof ConfigurationException)
- {
- throw(ConfigurationException) ite;
- }
- else
- {
- throw new ConfigurationException(ite.getMessage(), ite);
- }
- }
- }
- }
-
- public Map<String, PrincipalDatabase> getDatabases()
- {
- return _databases;
- }
-
- public void initialiseManagement(ServerConfiguration config) throws ConfigurationException
- {
- try
- {
- AMQUserManagementMBean _mbean = new AMQUserManagementMBean();
-
-
- final Collection<PrincipalDatabase> dbs = getDatabases().values();
- if (dbs.size() == 0)
- {
- throw new ConfigurationException("Principal-database not found");
- }
- final PrincipalDatabase database = dbs.iterator().next();
-
- _mbean.setPrincipalDatabase(database);
- _mbean.register();
- }
- catch (JMException e)
- {
- _logger.warn("User management disabled as unable to create MBean:" + e);
- }
- }
-}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PrincipalDatabaseManager.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PrincipalDatabaseManager.java
deleted file mode 100644
index f9882f8810..0000000000
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PrincipalDatabaseManager.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *
- */
-package org.apache.qpid.server.security.auth.database;
-
-import org.apache.qpid.server.configuration.ServerConfiguration;
-import org.apache.qpid.server.security.auth.database.PrincipalDatabase;
-import org.apache.commons.configuration.Configuration;
-import org.apache.commons.configuration.ConfigurationException;
-
-import java.util.Map;
-
-public interface PrincipalDatabaseManager
-{
- public Map<String, PrincipalDatabase> getDatabases();
-
- public void initialiseManagement(ServerConfiguration _configuration) throws ConfigurationException;
-}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabaseManager.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabaseManager.java
deleted file mode 100644
index 8658101cd8..0000000000
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/database/PropertiesPrincipalDatabaseManager.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- *
- */
-package org.apache.qpid.server.security.auth.database;
-
-import org.apache.commons.configuration.ConfigurationException;
-import org.apache.qpid.server.configuration.ServerConfiguration;
-
-import java.util.Map;
-import java.util.Properties;
-import java.util.HashMap;
-
-public class PropertiesPrincipalDatabaseManager implements PrincipalDatabaseManager
-{
-
- Map<String, PrincipalDatabase> _databases = new HashMap<String, PrincipalDatabase>();
-
- public PropertiesPrincipalDatabaseManager(String name, Properties users)
- {
- _databases.put(name, new PropertiesPrincipalDatabase(users));
- }
-
- public Map<String, PrincipalDatabase> getDatabases()
- {
- return _databases;
- }
-
- public void initialiseManagement(ServerConfiguration _configuration) throws ConfigurationException
- {
- //todo
- }
-}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/management/AMQUserManagementMBean.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/management/AMQUserManagementMBean.java
index a839315bcc..208130379e 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/management/AMQUserManagementMBean.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/management/AMQUserManagementMBean.java
@@ -91,15 +91,10 @@ public class AMQUserManagementMBean extends AMQManagedObject implements UserMana
public boolean setPassword(String username, String password)
{
- return setPassword(username, password.toCharArray());
- }
-
- public boolean setPassword(String username, char[] password)
- {
try
{
//delegate password changes to the Principal Database
- return _principalDatabase.updatePassword(new UsernamePrincipal(username), password);
+ return _principalDatabase.updatePassword(new UsernamePrincipal(username), password.toCharArray());
}
catch (AccountNotFoundException e)
{
@@ -108,11 +103,6 @@ public class AMQUserManagementMBean extends AMQManagedObject implements UserMana
}
}
- public boolean setRights(String username, boolean read, boolean write, boolean admin)
- {
- throw new UnsupportedOperationException("Support for setting access rights no longer supported.");
- }
-
public boolean createUser(String username, String password)
{
if (_principalDatabase.createPrincipal(new UsernamePrincipal(username), password.toCharArray()))
@@ -122,20 +112,6 @@ public class AMQUserManagementMBean extends AMQManagedObject implements UserMana
return false;
}
-
- public boolean createUser(String username, String password, boolean read, boolean write, boolean admin)
- {
- if (read || write || admin)
- {
- throw new UnsupportedOperationException("Support for setting access rights to true no longer supported.");
- }
- return createUser(username, password);
- }
-
- public boolean createUser(String username, char[] password, boolean read, boolean write, boolean admin)
- {
- return createUser(username, new String(password), read, write, admin);
- }
public boolean deleteUser(String username)
{
@@ -181,7 +157,6 @@ public class AMQUserManagementMBean extends AMQManagedObject implements UserMana
for (Principal user : users)
{
// Create header attributes list
-
// Read,Write,Admin items are depcreated and we return always false.
Object[] itemData = {user.getName(), false, false, false};
CompositeData messageData = new CompositeDataSupport(_userDataType, COMPOSITE_ITEM_NAMES.toArray(new String[COMPOSITE_ITEM_NAMES.size()]), itemData);
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/AuthenticationManager.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/AuthenticationManager.java
index c1ef4c8ff5..4c59c25d84 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/AuthenticationManager.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/AuthenticationManager.java
@@ -20,18 +20,36 @@
*/
package org.apache.qpid.server.security.auth.manager;
+import javax.security.auth.Subject;
import javax.security.sasl.SaslException;
import javax.security.sasl.SaslServer;
import org.apache.qpid.common.Closeable;
+import org.apache.qpid.server.plugins.Plugin;
import org.apache.qpid.server.security.auth.AuthenticationResult;
/**
- * The AuthenticationManager class is the entity responsible for
- * determining the authenticity of user credentials.
+ * Implementations of the AuthenticationManager are responsible for determining
+ * the authenticity of a user's credentials.
+ *
+ * If the authentication is successful, the manager is responsible for producing a populated
+ * {@link Subject} containing the user's identity and zero or more principals representing
+ * groups to which the user belongs.
+ * <p>
+ * The {@link #initialise()} method is responsible for registering SASL mechanisms required by
+ * the manager. The {@link #close()} method must reverse this registration.
+ *
*/
-public interface AuthenticationManager extends Closeable
+public interface AuthenticationManager extends Closeable, Plugin
{
+ /** The name for the required SASL Server mechanisms */
+ public static final String PROVIDER_NAME= "AMQSASLProvider-Server";
+
+ /**
+ * Initialise the authentication plugin.
+ *
+ */
+ void initialise();
/**
* Gets the SASL mechanisms known to this manager.
diff --git a/qpid/dotnet/client-010/gentool/Constant.tpl b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/AuthenticationManagerPluginFactory.java
index 191a1dbd6e..a51f195761 100644
--- a/qpid/dotnet/client-010/gentool/Constant.tpl
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/AuthenticationManagerPluginFactory.java
@@ -18,20 +18,15 @@
* under the License.
*
*/
+package org.apache.qpid.server.security.auth.manager;
-namespace org.apache.qpid.transport
-{
-
-${from genutil import *}
+import org.apache.qpid.server.plugins.PluginFactory;
-public class Constant
+/**
+ * Factory producing authentication producing configured, initialised authentication
+ * managers.
+ */
+public interface AuthenticationManagerPluginFactory<S extends AuthenticationManager> extends PluginFactory<S>
{
-${
-constants = spec.query["amqp/constant"]
-for c in constants:
- name = scream(c["@name"])
- value = c["@value"]
- out(" public const int $name = $value;\n")
-}}
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java
index d36bbc4f46..1945c2e15f 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManager.java
@@ -20,32 +20,64 @@
*/
package org.apache.qpid.server.security.auth.manager;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.security.Security;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.TreeMap;
+
+import javax.security.auth.Subject;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.login.AccountNotFoundException;
+import javax.security.sasl.Sasl;
+import javax.security.sasl.SaslException;
+import javax.security.sasl.SaslServer;
+import javax.security.sasl.SaslServerFactory;
+
+import org.apache.commons.configuration.Configuration;
+import org.apache.commons.configuration.ConfigurationException;
import org.apache.log4j.Logger;
-import org.apache.qpid.server.registry.ApplicationRegistry;
-import org.apache.qpid.server.security.auth.manager.AuthenticationManager;
+import org.apache.qpid.configuration.PropertyException;
+import org.apache.qpid.configuration.PropertyUtils;
+import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin;
+import org.apache.qpid.server.configuration.plugins.ConfigurationPluginFactory;
+import org.apache.qpid.server.security.auth.AuthenticationResult;
import org.apache.qpid.server.security.auth.AuthenticationResult.AuthenticationStatus;
import org.apache.qpid.server.security.auth.database.PrincipalDatabase;
-import org.apache.qpid.server.security.auth.sasl.JCAProvider;
+import org.apache.qpid.server.security.auth.management.AMQUserManagementMBean;
import org.apache.qpid.server.security.auth.sasl.AuthenticationProviderInitialiser;
+import org.apache.qpid.server.security.auth.sasl.JCAProvider;
import org.apache.qpid.server.security.auth.sasl.UsernamePrincipal;
-import org.apache.qpid.server.security.auth.AuthenticationResult;
-import javax.security.auth.Subject;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.login.AccountNotFoundException;
-import javax.security.sasl.SaslServerFactory;
-import javax.security.sasl.SaslServer;
-import javax.security.sasl.SaslException;
-import javax.security.sasl.Sasl;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.TreeMap;
-import java.security.Security;
/**
* Concrete implementation of the AuthenticationManager that determines if supplied
- * user credentials match those appearing in a PrincipalDatabase.
+ * user credentials match those appearing in a PrincipalDatabase. The implementation
+ * of the PrincipalDatabase is determined from the configuration.
+ *
+ * This implementation also registers the JMX UserManagemement MBean.
+ *
+ * This plugin expects configuration such as:
*
+ * <pre>
+ * &lt;pd-auth-manager&gt;
+ * &lt;principal-database&gt;
+ * &lt;class&gt;org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase&lt;/class&gt;
+ * &lt;attributes&gt;
+ * &lt;attribute&gt;
+ * &lt;name>passwordFile&lt;/name&gt;
+ * &lt;value>${conf}/passwd&lt;/value&gt;
+ * &lt;/attribute&gt;
+ * &lt;/attributes&gt;
+ * &lt;/principal-database&gt;
+ * &lt;/pd-auth-manager&gt;
+ * </pre>
*/
public class PrincipalDatabaseAuthenticationManager implements AuthenticationManager
{
@@ -55,25 +87,109 @@ public class PrincipalDatabaseAuthenticationManager implements AuthenticationMan
private String _mechanisms;
/** Maps from the mechanism to the callback handler to use for handling those requests */
- private Map<String, CallbackHandler> _callbackHandlerMap = new HashMap<String, CallbackHandler>();
+ private final Map<String, CallbackHandler> _callbackHandlerMap = new HashMap<String, CallbackHandler>();
/**
* Maps from the mechanism to the properties used to initialise the server. See the method Sasl.createSaslServer for
* details of the use of these properties. This map is populated during initialisation of each provider.
*/
- private Map<String, Map<String, ?>> _serverCreationProperties = new HashMap<String, Map<String, ?>>();
+ private final Map<String, Map<String, ?>> _serverCreationProperties = new HashMap<String, Map<String, ?>>();
+
+ protected PrincipalDatabase _principalDatabase = null;
- /** The name for the required SASL Server mechanisms */
- public static final String PROVIDER_NAME= "AMQSASLProvider-Server";
+ protected AMQUserManagementMBean _mbean = null;
- public PrincipalDatabaseAuthenticationManager()
+ public static final AuthenticationManagerPluginFactory<PrincipalDatabaseAuthenticationManager> FACTORY = new AuthenticationManagerPluginFactory<PrincipalDatabaseAuthenticationManager>()
{
- _logger.info("Initialising PrincipalDatabase authentication manager.");
+ public PrincipalDatabaseAuthenticationManager newInstance(final ConfigurationPlugin config) throws ConfigurationException
+ {
+ final PrincipalDatabaseAuthenticationManagerConfiguration configuration = config.getConfiguration(PrincipalDatabaseAuthenticationManagerConfiguration.class.getName());
- Map<String, Class<? extends SaslServerFactory>> providerMap = new TreeMap<String, Class<? extends SaslServerFactory>>();
+ // If there is no configuration for this plugin then don't load it.
+ if (configuration == null)
+ {
+ _logger.info("No authentication-manager configuration found for PrincipalDatabaseAuthenticationManager");
+ return null;
+ }
+
+ final PrincipalDatabaseAuthenticationManager pdam = new PrincipalDatabaseAuthenticationManager();
+ pdam.configure(configuration);
+ pdam.initialise();
+ return pdam;
+ }
+ public Class<PrincipalDatabaseAuthenticationManager> getPluginClass()
+ {
+ return PrincipalDatabaseAuthenticationManager.class;
+ }
- initialiseAuthenticationMechanisms(providerMap, ApplicationRegistry.getInstance().getDatabaseManager().getDatabases());
+ public String getPluginName()
+ {
+ return PrincipalDatabaseAuthenticationManager.class.getName();
+ }
+ };
+
+ public static class PrincipalDatabaseAuthenticationManagerConfiguration extends ConfigurationPlugin {
+
+ public static final ConfigurationPluginFactory FACTORY = new ConfigurationPluginFactory()
+ {
+ public List<String> getParentPaths()
+ {
+ return Arrays.asList("security.pd-auth-manager");
+ }
+
+ public ConfigurationPlugin newInstance(final String path, final Configuration config) throws ConfigurationException
+ {
+ final ConfigurationPlugin instance = new PrincipalDatabaseAuthenticationManagerConfiguration();
+
+ instance.setConfiguration(path, config);
+ return instance;
+ }
+ };
+
+ public String[] getElementsProcessed()
+ {
+ return new String[] {"principal-database.class",
+ "principal-database.attributes.attribute.name",
+ "principal-database.attributes.attribute.value"};
+ }
+
+ public void validateConfiguration() throws ConfigurationException
+ {
+ }
+
+ public String getPrincipalDatabaseClass()
+ {
+ return _configuration.getString("principal-database.class");
+ }
+
+ public Map<String,String> getPdClassAttributeMap() throws ConfigurationException
+ {
+ final List<String> argumentNames = _configuration.getList("principal-database.attributes.attribute.name");
+ final List<String> argumentValues = _configuration.getList("principal-database.attributes.attribute.value");
+ final Map<String,String> attributes = new HashMap<String,String>(argumentNames.size());
+
+ for (int i = 0; i < argumentNames.size(); i++)
+ {
+ final String argName = argumentNames.get(i);
+ final String argValue = argumentValues.get(i);
+
+ attributes.put(argName, argValue);
+ }
+
+ return Collections.unmodifiableMap(attributes);
+ }
+ }
+
+ protected PrincipalDatabaseAuthenticationManager()
+ {
+ }
+
+ public void initialise()
+ {
+ final Map<String, Class<? extends SaslServerFactory>> providerMap = new TreeMap<String, Class<? extends SaslServerFactory>>();
+
+ initialiseAuthenticationMechanisms(providerMap, _principalDatabase);
if (providerMap.size() > 0)
{
@@ -86,28 +202,13 @@ public class PrincipalDatabaseAuthenticationManager implements AuthenticationMan
{
_logger.info("Additional SASL providers successfully registered.");
}
-
}
else
{
_logger.warn("No additional SASL providers registered.");
}
- }
-
- private void initialiseAuthenticationMechanisms(Map<String, Class<? extends SaslServerFactory>> providerMap, Map<String, PrincipalDatabase> databases)
- {
- if (databases.size() > 1)
- {
- _logger.warn("More than one principle database provided currently authentication mechanism will override each other.");
- }
- for (Map.Entry<String, PrincipalDatabase> entry : databases.entrySet())
- {
- // fixme As the database now provide the mechanisms they support, they will ...
- // overwrite each other in the map. There should only be one database per vhost.
- // But currently we must have authentication before vhost definition.
- initialiseAuthenticationMechanisms(providerMap, entry.getValue());
- }
+ registerManagement();
}
private void initialiseAuthenticationMechanisms(Map<String, Class<? extends SaslServerFactory>> providerMap, PrincipalDatabase database)
@@ -126,7 +227,6 @@ public class PrincipalDatabaseAuthenticationManager implements AuthenticationMan
private void initialiseAuthenticationMechanism(String mechanism, AuthenticationProviderInitialiser initialiser,
Map<String, Class<? extends SaslServerFactory>> providerMap)
-
{
if (_mechanisms == null)
{
@@ -147,6 +247,21 @@ public class PrincipalDatabaseAuthenticationManager implements AuthenticationMan
_logger.info("Initialised " + mechanism + " SASL provider successfully");
}
+ /**
+ * @see org.apache.qpid.server.plugins.Plugin#configure(org.apache.qpid.server.configuration.plugins.ConfigurationPlugin)
+ */
+ public void configure(final ConfigurationPlugin config) throws ConfigurationException
+ {
+ final PrincipalDatabaseAuthenticationManagerConfiguration pdamConfig = (PrincipalDatabaseAuthenticationManagerConfiguration) config;
+ final String pdClazz = pdamConfig.getPrincipalDatabaseClass();
+
+ _logger.info("PrincipalDatabase concrete implementation : " + pdClazz);
+
+ _principalDatabase = createPrincipalDatabaseImpl(pdClazz);
+
+ configPrincipalDatabase(_principalDatabase, pdamConfig);
+ }
+
public String getMechanisms()
{
return _mechanisms;
@@ -158,6 +273,9 @@ public class PrincipalDatabaseAuthenticationManager implements AuthenticationMan
_callbackHandlerMap.get(mechanism));
}
+ /**
+ * @see org.apache.qpid.server.security.auth.manager.AuthenticationManager#authenticate(SaslServer, byte[])
+ */
public AuthenticationResult authenticate(SaslServer server, byte[] response)
{
try
@@ -182,23 +300,14 @@ public class PrincipalDatabaseAuthenticationManager implements AuthenticationMan
}
}
- public void close()
- {
- _mechanisms = null;
- Security.removeProvider(PROVIDER_NAME);
- }
-
/**
* @see org.apache.qpid.server.security.auth.manager.AuthenticationManager#authenticate(String, String)
*/
- @Override
public AuthenticationResult authenticate(final String username, final String password)
{
- final PrincipalDatabase db = ApplicationRegistry.getInstance().getDatabaseManager().getDatabases().values().iterator().next();
-
try
{
- if (db.verifyPassword(username, password.toCharArray()))
+ if (_principalDatabase.verifyPassword(username, password.toCharArray()))
{
final Subject subject = new Subject();
subject.getPrincipals().add(new UsernamePrincipal(username));
@@ -214,4 +323,141 @@ public class PrincipalDatabaseAuthenticationManager implements AuthenticationMan
return new AuthenticationResult(AuthenticationStatus.CONTINUE);
}
}
+
+ public void close()
+ {
+ _mechanisms = null;
+ Security.removeProvider(PROVIDER_NAME);
+
+ unregisterManagement();
+ }
+
+ private PrincipalDatabase createPrincipalDatabaseImpl(final String pdClazz) throws ConfigurationException
+ {
+ try
+ {
+ return (PrincipalDatabase) Class.forName(pdClazz).newInstance();
+ }
+ catch (InstantiationException ie)
+ {
+ throw new ConfigurationException("Cannot instantiate " + pdClazz, ie);
+ }
+ catch (IllegalAccessException iae)
+ {
+ throw new ConfigurationException("Cannot access " + pdClazz, iae);
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ throw new ConfigurationException("Cannot load " + pdClazz + " implementation", cnfe);
+ }
+ catch (ClassCastException cce)
+ {
+ throw new ConfigurationException("Expecting a " + PrincipalDatabase.class + " implementation", cce);
+ }
+ }
+
+ private void configPrincipalDatabase(final PrincipalDatabase principalDatabase, final PrincipalDatabaseAuthenticationManagerConfiguration config)
+ throws ConfigurationException
+ {
+
+ final Map<String,String> attributes = config.getPdClassAttributeMap();
+
+ for (Iterator<Entry<String, String>> iterator = attributes.entrySet().iterator(); iterator.hasNext();)
+ {
+ final Entry<String, String> nameValuePair = iterator.next();
+ final String methodName = generateSetterName(nameValuePair.getKey());
+ final Method method;
+ try
+ {
+ method = principalDatabase.getClass().getMethod(methodName, String.class);
+ }
+ catch (Exception e)
+ {
+ throw new ConfigurationException("No method " + methodName + " found in class "
+ + principalDatabase.getClass()
+ + " hence unable to configure principal database. The method must be public and "
+ + "have a single String argument with a void return type", e);
+ }
+ try
+ {
+ method.invoke(principalDatabase, PropertyUtils.replaceProperties(nameValuePair.getValue()));
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw new ConfigurationException(e.getMessage(), e);
+ }
+ catch (PropertyException e)
+ {
+ throw new ConfigurationException(e.getMessage(), e);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new ConfigurationException(e.getMessage(), e);
+ }
+ catch (InvocationTargetException e)
+ {
+ // QPID-1347.. InvocationTargetException wraps the checked exception thrown from the reflective
+ // method call. Pull out the underlying message and cause to make these more apparent to the user.
+ throw new ConfigurationException(e.getCause().getMessage(), e.getCause());
+ }
+ }
+ }
+
+ private String generateSetterName(String argName) throws ConfigurationException
+ {
+ if ((argName == null) || (argName.length() == 0))
+ {
+ throw new ConfigurationException("Argument names must have length >= 1 character");
+ }
+
+ if (Character.isLowerCase(argName.charAt(0)))
+ {
+ argName = Character.toUpperCase(argName.charAt(0)) + argName.substring(1);
+ }
+
+ final String methodName = "set" + argName;
+ return methodName;
+ }
+
+ protected void setPrincipalDatabase(final PrincipalDatabase principalDatabase)
+ {
+ _principalDatabase = principalDatabase;
+ }
+
+ protected void registerManagement()
+ {
+ try
+ {
+ _logger.info("Registering UserManagementMBean");
+
+ _mbean = new AMQUserManagementMBean();
+ _mbean.setPrincipalDatabase(_principalDatabase);
+ _mbean.register();
+ }
+ catch (Exception e)
+ {
+ _logger.warn("User management disabled as unable to create MBean:", e);
+ _mbean = null;
+ }
+ }
+
+ protected void unregisterManagement()
+ {
+ try
+ {
+ if (_mbean != null)
+ {
+ _logger.info("Unregistering UserManagementMBean");
+ _mbean.unregister();
+ }
+ }
+ catch (Exception e)
+ {
+ _logger.warn("Failed to unregister User management MBean:", e);
+ }
+ finally
+ {
+ _mbean = null;
+ }
+ }
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/AuthenticationProviderInitialiser.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/AuthenticationProviderInitialiser.java
index 89e545d6f5..bc5d8a4f2b 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/AuthenticationProviderInitialiser.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/AuthenticationProviderInitialiser.java
@@ -25,9 +25,6 @@ import java.util.Map;
import javax.security.auth.callback.CallbackHandler;
import javax.security.sasl.SaslServerFactory;
-import org.apache.commons.configuration.Configuration;
-import org.apache.qpid.server.security.auth.database.PrincipalDatabase;
-
public interface AuthenticationProviderInitialiser
{
/**
@@ -37,24 +34,6 @@ public interface AuthenticationProviderInitialiser
String getMechanismName();
/**
- * Initialise the authentication provider.
- * @param baseConfigPath the path in the config file that points to any config options for this provider. Each
- * provider can have its own set of configuration options
- * @param configuration the Apache Commons Configuration instance used to configure this provider
- * @param principalDatabases the set of principal databases that are available
- * @throws Exception needs refined Exception is too broad.
- */
- void initialise(String baseConfigPath, Configuration configuration,
- Map<String, PrincipalDatabase> principalDatabases) throws Exception;
-
- /**
- * Initialise the authentication provider.
- * @param db The principal database to initialise with
- */
- void initialise(PrincipalDatabase db);
-
-
- /**
* @return the callback handler that should be used to process authentication requests for this mechanism. This will
* be called after initialise and will be stored by the authentication manager. The callback handler <b>must</b> be
* fully threadsafe.
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/GroupPrincipal.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/GroupPrincipal.java
new file mode 100644
index 0000000000..30a503c769
--- /dev/null
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/GroupPrincipal.java
@@ -0,0 +1,99 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.security.auth.sasl;
+
+import java.security.Principal;
+import java.security.acl.Group;
+import java.util.Enumeration;
+
+/**
+ * Immutable representation of a user group. In Qpid, groups do <b>not</b> know
+ * about their membership, and therefore the {@link #addMember(Principal)}
+ * methods etc throw {@link UnsupportedOperationException}.
+ *
+ */
+public class GroupPrincipal implements Group
+{
+ /** Name of the group */
+ private final String _groupName;
+
+ public GroupPrincipal(final String groupName)
+ {
+ _groupName = groupName;
+ }
+
+ public String getName()
+ {
+ return _groupName;
+ }
+
+ public boolean addMember(Principal user)
+ {
+ throw new UnsupportedOperationException("Not supported");
+ }
+
+ public boolean removeMember(Principal user)
+ {
+ throw new UnsupportedOperationException("Not supported");
+ }
+
+ public boolean isMember(Principal member)
+ {
+ throw new UnsupportedOperationException("Not supported");
+ }
+
+ public Enumeration<? extends Principal> members()
+ {
+ throw new UnsupportedOperationException("Not supported");
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode()
+ {
+ final int prime = 37;
+ return prime * _groupName.hashCode();
+ }
+
+ /**
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ else
+ {
+ if (obj instanceof GroupPrincipal)
+ {
+ GroupPrincipal other = (GroupPrincipal) obj;
+ return _groupName.equals(other._groupName);
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/JCAProvider.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/JCAProvider.java
index d6a09d8217..d6f6c714e2 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/JCAProvider.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/JCAProvider.java
@@ -21,12 +21,11 @@
package org.apache.qpid.server.security.auth.sasl;
import java.security.Provider;
-import java.security.Security;
import java.util.Map;
import javax.security.sasl.SaslServerFactory;
-public final class JCAProvider extends Provider
+public class JCAProvider extends Provider
{
public JCAProvider(String name, Map<String, Class<? extends SaslServerFactory>> providerMap)
{
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/amqplain/AmqPlainSaslServer.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/amqplain/AmqPlainSaslServer.java
index 9f56b8521a..dee40e7069 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/amqplain/AmqPlainSaslServer.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/amqplain/AmqPlainSaslServer.java
@@ -20,6 +20,8 @@
*/
package org.apache.qpid.server.security.auth.sasl.amqplain;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
import java.io.IOException;
import javax.security.auth.callback.Callback;
@@ -31,7 +33,6 @@ import javax.security.sasl.AuthorizeCallback;
import javax.security.sasl.SaslException;
import javax.security.sasl.SaslServer;
-import org.apache.mina.common.ByteBuffer;
import org.apache.qpid.framing.AMQFrameDecodingException;
import org.apache.qpid.framing.FieldTable;
import org.apache.qpid.framing.FieldTableFactory;
@@ -60,7 +61,7 @@ public class AmqPlainSaslServer implements SaslServer
{
try
{
- final FieldTable ft = FieldTableFactory.newFieldTable(ByteBuffer.wrap(response), response.length);
+ final FieldTable ft = FieldTableFactory.newFieldTable(new DataInputStream(new ByteArrayInputStream(response)), response.length);
String username = (String) ft.getString("LOGIN");
// we do not care about the prompt but it throws if null
NameCallback nameCb = new NameCallback("prompt", username);
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/anonymous/AnonymousSaslServer.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/anonymous/AnonymousSaslServer.java
index b4cce15d88..52d36023c2 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/anonymous/AnonymousSaslServer.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/security/auth/sasl/anonymous/AnonymousSaslServer.java
@@ -20,21 +20,9 @@
*/
package org.apache.qpid.server.security.auth.sasl.anonymous;
-import java.io.IOException;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.security.sasl.AuthorizeCallback;
import javax.security.sasl.SaslException;
import javax.security.sasl.SaslServer;
-import org.apache.mina.common.ByteBuffer;
-import org.apache.qpid.framing.AMQFrameDecodingException;
-import org.apache.qpid.framing.FieldTable;
-import org.apache.qpid.framing.FieldTableFactory;
public class AnonymousSaslServer implements SaslServer
{
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/signal/SignalHandlerTask.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/signal/SignalHandlerTask.java
new file mode 100644
index 0000000000..4e3fae1dbd
--- /dev/null
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/signal/SignalHandlerTask.java
@@ -0,0 +1,89 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.signal;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+
+import org.apache.log4j.Logger;
+
+public abstract class SignalHandlerTask
+{
+ private static final Logger LOGGER = Logger.getLogger(SignalHandlerTask.class);
+
+ private static final String HANDLE_METHOD = "handle";
+ private static final String SUN_MISC_SIGNAL_CLASS = "sun.misc.Signal";
+ private static final String SUN_MISC_SIGNAL_HANDLER_CLASS = "sun.misc.SignalHandler";
+
+ public boolean register(final String signalName)
+ {
+ try
+ {
+ //try to load the signal handling classes
+ Class<?> signalClazz = Class.forName(SUN_MISC_SIGNAL_CLASS);
+ Class<?> handlerClazz = Class.forName(SUN_MISC_SIGNAL_HANDLER_CLASS);
+
+ //create an InvocationHandler that just executes the SignalHandlerTask
+ InvocationHandler invoker = new InvocationHandler()
+ {
+ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
+ {
+ handle();
+
+ return null;
+ }
+ };
+
+ //create a dynamic proxy implementing SignalHandler
+ Object handler = Proxy.newProxyInstance(handlerClazz.getClassLoader(), new Class[]{handlerClazz}, invoker);
+
+ //create the Signal to handle
+ Constructor<?> signalConstructor = signalClazz.getConstructor(String.class);
+ Object signal = signalConstructor.newInstance(signalName);
+
+ //invoke the Signal.handle(signal, handler) method
+ Method handleMethod = signalClazz.getMethod(HANDLE_METHOD, signalClazz, handlerClazz);
+ handleMethod.invoke(null, signal, handler);
+ }
+ catch (Exception e)
+ {
+ LOGGER.debug("Unable to register handler for Signal " + signalName + " due to exception: " + e, e);
+ return false;
+ }
+
+ return true;
+ }
+
+ public abstract void handle();
+
+ public static String getPlatformDescription()
+ {
+ String name = System.getProperty("os.name");
+ String osVer = System.getProperty("os.version");
+ String jvmVendor = System.getProperty("java.vm.vendor");
+ String jvmName = System.getProperty("java.vm.name");
+ String javaRuntimeVer = System.getProperty("java.runtime.version");
+
+ return "OS: " + name + " " + osVer + ", JVM:" + jvmVendor + " " + jvmName + " " + javaRuntimeVer;
+ }
+}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/state/AMQStateManager.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/state/AMQStateManager.java
index 6cc5e7b019..33aebffcfb 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/state/AMQStateManager.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/state/AMQStateManager.java
@@ -259,7 +259,7 @@ public class AMQStateManager implements AMQMethodListener
public AMQProtocolSession getProtocolSession()
{
- SecurityManager.setThreadPrincipal(_protocolSession.getPrincipal());
+ SecurityManager.setThreadSubject(_protocolSession.getAuthorizedSubject());
return _protocolSession;
}
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java
index 2e694b24ea..8b099b62ce 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/store/DerbyMessageStore.java
@@ -21,6 +21,7 @@
package org.apache.qpid.server.store;
import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
import java.io.File;
import java.io.IOException;
import java.lang.ref.SoftReference;
@@ -479,9 +480,15 @@ public class DerbyMessageStore implements MessageStore
FieldTable arguments;
if(dataAsBytes.length > 0)
{
- org.apache.mina.common.ByteBuffer buffer = org.apache.mina.common.ByteBuffer.wrap(dataAsBytes);
- arguments = new FieldTable(buffer,buffer.limit());
+ try
+ {
+ arguments = new FieldTable(new DataInputStream(new ByteArrayInputStream(dataAsBytes)),dataAsBytes.length);
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("IO Exception should not be thrown",e);
+ }
}
else
{
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionFactory.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionFactory.java
index ce0362d73f..0fd7fdffe5 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionFactory.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionFactory.java
@@ -20,13 +20,21 @@
*/
package org.apache.qpid.server.subscription;
+import java.util.Map;
+
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.FieldTable;
import org.apache.qpid.server.protocol.AMQProtocolSession;
+import org.apache.qpid.server.filter.FilterManager;
import org.apache.qpid.server.flow.FlowCreditManager;
+import org.apache.qpid.server.flow.FlowCreditManager_0_10;
import org.apache.qpid.server.subscription.Subscription;
+import org.apache.qpid.server.transport.ServerSession;
import org.apache.qpid.server.AMQChannel;
+import org.apache.qpid.transport.MessageAcceptMode;
+import org.apache.qpid.transport.MessageAcquireMode;
+import org.apache.qpid.transport.MessageFlowMode;
/**
* Allows the customisation of the creation of a subscription. This is typically done within an AMQQueue. This factory
@@ -56,4 +64,23 @@ public interface SubscriptionFactory
RecordDeliveryMethod recordMethod
)
throws AMQException;
+
+
+ SubscriptionImpl.GetNoAckSubscription createBasicGetNoAckSubscription(AMQChannel channel,
+ AMQProtocolSession session,
+ AMQShortString consumerTag,
+ FieldTable filters,
+ boolean noLocal,
+ FlowCreditManager creditManager,
+ ClientDeliveryMethod deliveryMethod,
+ RecordDeliveryMethod recordMethod) throws AMQException;
+
+ Subscription_0_10 createSubscription(final ServerSession session,
+ final String destination,
+ final MessageAcceptMode acceptMode,
+ final MessageAcquireMode acquireMode,
+ final MessageFlowMode flowMode,
+ final FlowCreditManager_0_10 creditManager,
+ final FilterManager filterManager,
+ final Map<String,Object> arguments);
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionFactoryImpl.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionFactoryImpl.java
index 1bba2529c6..1622d63648 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionFactoryImpl.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionFactoryImpl.java
@@ -20,17 +20,28 @@
*/
package org.apache.qpid.server.subscription;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicLong;
+
import org.apache.qpid.AMQException;
import org.apache.qpid.common.AMQPFilterTypes;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.FieldTable;
import org.apache.qpid.protocol.AMQConstant;
import org.apache.qpid.server.AMQChannel;
+import org.apache.qpid.server.filter.FilterManager;
import org.apache.qpid.server.flow.FlowCreditManager;
+import org.apache.qpid.server.flow.FlowCreditManager_0_10;
import org.apache.qpid.server.protocol.AMQProtocolSession;
+import org.apache.qpid.server.transport.ServerSession;
+import org.apache.qpid.transport.MessageAcceptMode;
+import org.apache.qpid.transport.MessageAcquireMode;
+import org.apache.qpid.transport.MessageFlowMode;
public class SubscriptionFactoryImpl implements SubscriptionFactory
{
+ private static final AtomicLong SUB_ID_GENERATOR = new AtomicLong(0);
+
public Subscription createSubscription(int channelId, AMQProtocolSession protocolSession,
AMQShortString consumerTag, boolean acks, FieldTable filters,
boolean noLocal, FlowCreditManager creditManager) throws AMQException
@@ -78,18 +89,47 @@ public class SubscriptionFactoryImpl implements SubscriptionFactory
if(isBrowser)
{
- return new SubscriptionImpl.BrowserSubscription(channel, protocolSession, consumerTag, filters, noLocal, creditManager, clientMethod, recordMethod);
+ return new SubscriptionImpl.BrowserSubscription(channel, protocolSession, consumerTag, filters, noLocal, creditManager, clientMethod, recordMethod, getNextSubscriptionId());
}
else if(acks)
{
- return new SubscriptionImpl.AckSubscription(channel, protocolSession, consumerTag, filters, noLocal, creditManager, clientMethod, recordMethod);
+ return new SubscriptionImpl.AckSubscription(channel, protocolSession, consumerTag, filters, noLocal, creditManager, clientMethod, recordMethod, getNextSubscriptionId());
}
else
{
- return new SubscriptionImpl.NoAckSubscription(channel, protocolSession, consumerTag, filters, noLocal, creditManager, clientMethod, recordMethod);
+ return new SubscriptionImpl.NoAckSubscription(channel, protocolSession, consumerTag, filters, noLocal, creditManager, clientMethod, recordMethod, getNextSubscriptionId());
}
}
+ public SubscriptionImpl.GetNoAckSubscription createBasicGetNoAckSubscription(final AMQChannel channel,
+ final AMQProtocolSession session,
+ final AMQShortString consumerTag,
+ final FieldTable filters,
+ final boolean noLocal,
+ final FlowCreditManager creditManager,
+ final ClientDeliveryMethod deliveryMethod,
+ final RecordDeliveryMethod recordMethod) throws AMQException
+ {
+ return new SubscriptionImpl.GetNoAckSubscription(channel, session, null, null, false, creditManager, deliveryMethod, recordMethod, getNextSubscriptionId());
+ }
+
+ public Subscription_0_10 createSubscription(final ServerSession session,
+ final String destination,
+ final MessageAcceptMode acceptMode,
+ final MessageAcquireMode acquireMode,
+ final MessageFlowMode flowMode,
+ final FlowCreditManager_0_10 creditManager,
+ final FilterManager filterManager,
+ final Map<String,Object> arguments)
+ {
+ return new Subscription_0_10(session, destination, acceptMode, acquireMode,
+ flowMode, creditManager, filterManager, arguments, getNextSubscriptionId());
+ }
public static final SubscriptionFactoryImpl INSTANCE = new SubscriptionFactoryImpl();
+
+ private static long getNextSubscriptionId()
+ {
+ return SUB_ID_GENERATOR.getAndIncrement();
+ }
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionImpl.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionImpl.java
index d8f44c9f7f..d6a256e2e1 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionImpl.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionImpl.java
@@ -88,9 +88,7 @@ public abstract class SubscriptionImpl implements Subscription, FlowCreditManage
private final Lock _stateChangeLock;
- private static final AtomicLong idGenerator = new AtomicLong(0);
- // Create a simple ID that increments for ever new Subscription
- private final long _subscriptionID = idGenerator.getAndIncrement();
+ private final long _subscriptionID;
private LogSubject _logSubject;
private LogActor _logActor;
private UUID _id;
@@ -104,10 +102,11 @@ public abstract class SubscriptionImpl implements Subscription, FlowCreditManage
AMQShortString consumerTag, FieldTable filters,
boolean noLocal, FlowCreditManager creditManager,
ClientDeliveryMethod deliveryMethod,
- RecordDeliveryMethod recordMethod)
+ RecordDeliveryMethod recordMethod,
+ long subscriptionID)
throws AMQException
{
- super(channel, protocolSession, consumerTag, filters, noLocal, creditManager, deliveryMethod, recordMethod);
+ super(channel, protocolSession, consumerTag, filters, noLocal, creditManager, deliveryMethod, recordMethod, subscriptionID);
}
@@ -151,10 +150,11 @@ public abstract class SubscriptionImpl implements Subscription, FlowCreditManage
AMQShortString consumerTag, FieldTable filters,
boolean noLocal, FlowCreditManager creditManager,
ClientDeliveryMethod deliveryMethod,
- RecordDeliveryMethod recordMethod)
+ RecordDeliveryMethod recordMethod,
+ long subscriptionID)
throws AMQException
{
- super(channel, protocolSession, consumerTag, filters, noLocal, creditManager, deliveryMethod, recordMethod);
+ super(channel, protocolSession, consumerTag, filters, noLocal, creditManager, deliveryMethod, recordMethod, subscriptionID);
}
@@ -211,16 +211,45 @@ public abstract class SubscriptionImpl implements Subscription, FlowCreditManage
}
+ /**
+ * NoAck Subscription for use with BasicGet method.
+ */
+ public static final class GetNoAckSubscription extends SubscriptionImpl.NoAckSubscription
+ {
+ public GetNoAckSubscription(AMQChannel channel, AMQProtocolSession protocolSession,
+ AMQShortString consumerTag, FieldTable filters,
+ boolean noLocal, FlowCreditManager creditManager,
+ ClientDeliveryMethod deliveryMethod,
+ RecordDeliveryMethod recordMethod,
+ long subscriptionID)
+ throws AMQException
+ {
+ super(channel, protocolSession, consumerTag, filters, noLocal, creditManager, deliveryMethod, recordMethod, subscriptionID);
+ }
+
+ public boolean isTransient()
+ {
+ return true;
+ }
+
+ public boolean wouldSuspend(QueueEntry msg)
+ {
+ return !getCreditManager().useCreditForMessage(msg.getMessage());
+ }
+
+ }
+
static final class AckSubscription extends SubscriptionImpl
{
public AckSubscription(AMQChannel channel, AMQProtocolSession protocolSession,
AMQShortString consumerTag, FieldTable filters,
boolean noLocal, FlowCreditManager creditManager,
ClientDeliveryMethod deliveryMethod,
- RecordDeliveryMethod recordMethod)
+ RecordDeliveryMethod recordMethod,
+ long subscriptionID)
throws AMQException
{
- super(channel, protocolSession, consumerTag, filters, noLocal, creditManager, deliveryMethod, recordMethod);
+ super(channel, protocolSession, consumerTag, filters, noLocal, creditManager, deliveryMethod, recordMethod, subscriptionID);
}
@@ -296,10 +325,11 @@ public abstract class SubscriptionImpl implements Subscription, FlowCreditManage
AMQShortString consumerTag, FieldTable arguments,
boolean noLocal, FlowCreditManager creditManager,
ClientDeliveryMethod deliveryMethod,
- RecordDeliveryMethod recordMethod)
+ RecordDeliveryMethod recordMethod,
+ long subscriptionID)
throws AMQException
{
-
+ _subscriptionID = subscriptionID;
_channel = channel;
_consumerTag = consumerTag;
@@ -445,7 +475,7 @@ public abstract class SubscriptionImpl implements Subscription, FlowCreditManage
//check that the message hasn't been rejected
- if (entry.isRejectedBy(this))
+ if (entry.isRejectedBy(getSubscriptionID()))
{
if (_logger.isDebugEnabled())
{
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionList.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionList.java
index 9ea81660c6..3e6299cb8a 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionList.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/SubscriptionList.java
@@ -20,121 +20,108 @@
*/
package org.apache.qpid.server.subscription;
-import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.subscription.Subscription;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
-import java.nio.ByteBuffer;
public class SubscriptionList
{
-
private final SubscriptionNode _head = new SubscriptionNode();
- private AtomicReference<SubscriptionNode> _tail = new AtomicReference<SubscriptionNode>(_head);
- private AtomicInteger _size = new AtomicInteger();
-
+ private final AtomicReference<SubscriptionNode> _tail = new AtomicReference<SubscriptionNode>(_head);
+ private final AtomicReference<SubscriptionNode> _subNodeMarker = new AtomicReference<SubscriptionNode>(_head);
+ private final AtomicInteger _size = new AtomicInteger();
- public final class SubscriptionNode
+ public static final class SubscriptionNode
{
private final AtomicBoolean _deleted = new AtomicBoolean();
private final AtomicReference<SubscriptionNode> _next = new AtomicReference<SubscriptionNode>();
private final Subscription _sub;
-
public SubscriptionNode()
{
-
+ //used for sentinel head and dummy node construction
_sub = null;
_deleted.set(true);
}
public SubscriptionNode(final Subscription sub)
{
+ //used for regular node construction
_sub = sub;
}
-
- public SubscriptionNode getNext()
+ /**
+ * Retrieves the first non-deleted node following the current node.
+ * Any deleted non-tail nodes encountered during the search are unlinked.
+ *
+ * @return the next non-deleted node, or null if none was found.
+ */
+ public SubscriptionNode findNext()
{
-
SubscriptionNode next = nextNode();
while(next != null && next.isDeleted())
{
-
final SubscriptionNode newNext = next.nextNode();
if(newNext != null)
{
+ //try to move our _next reference forward to the 'newNext'
+ //node to unlink the deleted node
_next.compareAndSet(next, newNext);
next = nextNode();
}
else
{
+ //'newNext' is null, meaning 'next' is the current tail. Can't unlink
+ //the tail node for thread safety reasons, just use the null.
next = null;
}
-
}
+
return next;
}
- private SubscriptionNode nextNode()
+ /**
+ * Gets the immediately next referenced node in the structure.
+ *
+ * @return the immediately next node in the structure, or null if at the tail.
+ */
+ protected SubscriptionNode nextNode()
{
return _next.get();
}
+ /**
+ * Used to initialise the 'next' reference. Will only succeed if the reference was not previously set.
+ *
+ * @param node the SubscriptionNode to set as 'next'
+ * @return whether the operation succeeded
+ */
+ private boolean setNext(final SubscriptionNode node)
+ {
+ return _next.compareAndSet(null, node);
+ }
+
public boolean isDeleted()
{
return _deleted.get();
}
-
public boolean delete()
{
- if(_deleted.compareAndSet(false,true))
- {
- _size.decrementAndGet();
- advanceHead();
- return true;
- }
- else
- {
- return false;
- }
+ return _deleted.compareAndSet(false,true);
}
-
public Subscription getSubscription()
{
return _sub;
}
}
-
- public SubscriptionList(AMQQueue queue)
- {
- }
-
- private void advanceHead()
- {
- SubscriptionNode head = _head.nextNode();
- while(head._next.get() != null && head.isDeleted())
- {
-
- final SubscriptionNode newhead = head.nextNode();
- if(newhead != null)
- {
- _head._next.compareAndSet(head, newhead);
- }
- head = _head.nextNode();
- }
- }
-
-
- public SubscriptionNode add(Subscription sub)
+ private void insert(final SubscriptionNode node, final boolean count)
{
- SubscriptionNode node = new SubscriptionNode(sub);
for (;;)
{
SubscriptionNode tail = _tail.get();
@@ -143,11 +130,14 @@ public class SubscriptionList
{
if (next == null)
{
- if (tail._next.compareAndSet(null, node))
+ if (tail.setNext(node))
{
_tail.compareAndSet(tail, node);
- _size.incrementAndGet();
- return node;
+ if(count)
+ {
+ _size.incrementAndGet();
+ }
+ return;
}
}
else
@@ -156,27 +146,101 @@ public class SubscriptionList
}
}
}
+ }
+ public void add(final Subscription sub)
+ {
+ SubscriptionNode node = new SubscriptionNode(sub);
+ insert(node, true);
}
- public boolean remove(Subscription sub)
+ public boolean remove(final Subscription sub)
{
- SubscriptionNode node = _head.getNext();
+ SubscriptionNode prevNode = _head;
+ SubscriptionNode node = _head.nextNode();
+
while(node != null)
{
- if(sub.equals(node._sub) && node.delete())
+ if(sub.equals(node.getSubscription()) && node.delete())
{
+ _size.decrementAndGet();
+
+ SubscriptionNode tail = _tail.get();
+ if(node == tail)
+ {
+ //we cant remove the last node from the structure for
+ //correctness reasons, however we have just 'deleted'
+ //the tail. Inserting an empty dummy node after it will
+ //let us scavenge the node containing the Subscription.
+ insert(new SubscriptionNode(), false);
+ }
+
+ //advance the next node reference in the 'prevNode' to scavange
+ //the newly 'deleted' node for the Subscription.
+ prevNode.findNext();
+
+ nodeMarkerCleanup(node);
+
return true;
}
- node = node.getNext();
+
+ prevNode = node;
+ node = node.findNext();
}
+
return false;
}
+ private void nodeMarkerCleanup(final SubscriptionNode node)
+ {
+ SubscriptionNode markedNode = _subNodeMarker.get();
+ if(node == markedNode)
+ {
+ //if the marked node is the one we are removing, then
+ //replace it with a dummy pointing at the next node.
+ //this is OK as the marked node is only used to index
+ //into the list and find the next node to use.
+ //Because we inserted a dummy if node was the
+ //tail, markedNode.nextNode() can never be null.
+ SubscriptionNode dummy = new SubscriptionNode();
+ dummy.setNext(markedNode.nextNode());
+
+ //if the CAS fails the marked node has changed, thus
+ //we don't care about the dummy and just forget it
+ _subNodeMarker.compareAndSet(markedNode, dummy);
+ }
+ else if(markedNode != null)
+ {
+ //if the marked node was already deleted then it could
+ //hold subsequently removed nodes after it in the list
+ //in memory. Scavenge it to ensure their actual removal.
+ if(markedNode != _head && markedNode.isDeleted())
+ {
+ markedNode.findNext();
+ }
+ }
+ }
- public static class SubscriptionNodeIterator
+ public boolean updateMarkedNode(final SubscriptionNode expected, final SubscriptionNode nextNode)
+ {
+ return _subNodeMarker.compareAndSet(expected, nextNode);
+ }
+
+ /**
+ * Get the current marked SubscriptionNode. This should only be used only to index into the list and find the next node
+ * after the mark, since if the previously marked node was subsequently deleted the item returned may be a dummy node
+ * with reference to the next node.
+ *
+ * @return the previously marked node (or a dummy if it was subsequently deleted)
+ */
+ public SubscriptionNode getMarkedNode()
{
+ return _subNodeMarker.get();
+ }
+
+ public static class SubscriptionNodeIterator
+ {
private SubscriptionNode _lastNode;
SubscriptionNodeIterator(SubscriptionNode startNode)
@@ -184,49 +248,25 @@ public class SubscriptionList
_lastNode = startNode;
}
-
- public boolean atTail()
- {
- return _lastNode.nextNode() == null;
- }
-
public SubscriptionNode getNode()
{
-
return _lastNode;
-
}
public boolean advance()
{
+ SubscriptionNode nextNode = _lastNode.findNext();
+ _lastNode = nextNode;
- if(!atTail())
- {
- SubscriptionNode nextNode = _lastNode.nextNode();
- while(nextNode.isDeleted() && nextNode.nextNode() != null)
- {
- nextNode = nextNode.nextNode();
- }
- _lastNode = nextNode;
- return true;
-
- }
- else
- {
- return false;
- }
-
+ return _lastNode != null;
}
-
}
-
public SubscriptionNodeIterator iterator()
{
return new SubscriptionNodeIterator(_head);
}
-
public SubscriptionNode getHead()
{
return _head;
@@ -236,9 +276,6 @@ public class SubscriptionList
{
return _size.get();
}
-
-
-
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/Subscription_0_10.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/Subscription_0_10.java
index 68e47fd86a..c5d6bc203c 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/Subscription_0_10.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/subscription/Subscription_0_10.java
@@ -40,7 +40,6 @@ import org.apache.qpid.server.logging.actors.GenericActor;
import org.apache.qpid.server.logging.messages.SubscriptionMessages;
import org.apache.qpid.server.logging.LogActor;
import org.apache.qpid.server.logging.LogSubject;
-import org.apache.qpid.server.logging.actors.SubscriptionActor;
import org.apache.qpid.server.message.ServerMessage;
import org.apache.qpid.server.message.MessageTransferMessage;
import org.apache.qpid.server.message.AMQMessage;
@@ -80,10 +79,7 @@ import java.nio.ByteBuffer;
public class Subscription_0_10 implements Subscription, FlowCreditManager.FlowCreditManagerListener, SubscriptionConfig, LogSubject
{
-
- private static final AtomicLong idGenerator = new AtomicLong(0);
- // Create a simple ID that increments for ever new Subscription
- private final long _subscriptionID = idGenerator.getAndIncrement();
+ private final long _subscriptionID;
private final QueueEntry.SubscriptionAcquiredState _owningState = new QueueEntry.SubscriptionAcquiredState(this);
private final QueueEntry.SubscriptionAssignedState _assignedState = new QueueEntry.SubscriptionAssignedState(this);
@@ -113,16 +109,15 @@ public class Subscription_0_10 implements Subscription, FlowCreditManager.FlowCr
private final MessageAcquireMode _acquireMode;
private MessageFlowMode _flowMode;
private final ServerSession _session;
- private AtomicBoolean _stopped = new AtomicBoolean(true);
- private ConcurrentHashMap<Integer, QueueEntry> _sentMap = new ConcurrentHashMap<Integer, QueueEntry>();
+ private final AtomicBoolean _stopped = new AtomicBoolean(true);
private static final Struct[] EMPTY_STRUCT_ARRAY = new Struct[0];
private LogActor _logActor;
- private Map<String, Object> _properties = new ConcurrentHashMap<String, Object>();
+ private final Map<String, Object> _properties = new ConcurrentHashMap<String, Object>();
private UUID _id;
private String _traceExclude;
private String _trace;
- private long _createTime = System.currentTimeMillis();
+ private final long _createTime = System.currentTimeMillis();
private final AtomicLong _deliveredCount = new AtomicLong(0);
private final Map<String, Object> _arguments;
@@ -131,8 +126,9 @@ public class Subscription_0_10 implements Subscription, FlowCreditManager.FlowCr
MessageAcquireMode acquireMode,
MessageFlowMode flowMode,
FlowCreditManager_0_10 creditManager,
- FilterManager filters,Map<String, Object> arguments)
+ FilterManager filters,Map<String, Object> arguments, long subscriptionId)
{
+ _subscriptionID = subscriptionId;
_session = session;
_destination = destination;
_acceptMode = acceptMode;
@@ -198,7 +194,7 @@ public class Subscription_0_10 implements Subscription, FlowCreditManager.FlowCr
public boolean isSuspended()
{
- return !isActive() || _deleted.get(); // TODO check for Session suspension
+ return !isActive() || _deleted.get() || _session.isClosing(); // TODO check for Session suspension
}
public boolean hasInterest(QueueEntry entry)
@@ -207,7 +203,7 @@ public class Subscription_0_10 implements Subscription, FlowCreditManager.FlowCr
//check that the message hasn't been rejected
- if (entry.isRejectedBy(this))
+ if (entry.isRejectedBy(getSubscriptionID()))
{
return false;
@@ -731,13 +727,22 @@ public class Subscription_0_10 implements Subscription, FlowCreditManager.FlowCr
public void stop()
{
- if(_state.compareAndSet(State.ACTIVE, State.SUSPENDED))
+ try
{
- _stateListener.stateChange(this, State.ACTIVE, State.SUSPENDED);
+ getSendLock();
+
+ if(_state.compareAndSet(State.ACTIVE, State.SUSPENDED))
+ {
+ _stateListener.stateChange(this, State.ACTIVE, State.SUSPENDED);
+ }
+ _stopped.set(true);
+ FlowCreditManager_0_10 creditManager = getCreditManager();
+ creditManager.clearCredit();
+ }
+ finally
+ {
+ releaseSendLock();
}
- _stopped.set(true);
- FlowCreditManager_0_10 creditManager = getCreditManager();
- creditManager.clearCredit();
}
public void addCredit(MessageCreditUnit unit, long value)
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnection.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnection.java
index 2113494cc5..d83013afba 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnection.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnection.java
@@ -20,13 +20,18 @@
*/
package org.apache.qpid.server.transport;
-import static org.apache.qpid.server.logging.subjects.LogSubjectFormat.*;
+import static org.apache.qpid.server.logging.subjects.LogSubjectFormat.CONNECTION_FORMAT;
+import static org.apache.qpid.server.logging.subjects.LogSubjectFormat.SOCKET_FORMAT;
+import static org.apache.qpid.server.logging.subjects.LogSubjectFormat.USER_FORMAT;
+import java.security.Principal;
import java.text.MessageFormat;
-import java.util.concurrent.atomic.AtomicBoolean;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import javax.security.auth.Subject;
import org.apache.qpid.AMQException;
import org.apache.qpid.protocol.AMQConstant;
@@ -38,7 +43,8 @@ import org.apache.qpid.server.logging.actors.GenericActor;
import org.apache.qpid.server.logging.messages.ConnectionMessages;
import org.apache.qpid.server.protocol.AMQConnectionModel;
import org.apache.qpid.server.protocol.AMQSessionModel;
-import org.apache.qpid.server.registry.ApplicationRegistry;
+import org.apache.qpid.server.security.AuthorizationHolder;
+import org.apache.qpid.server.security.auth.sasl.UsernamePrincipal;
import org.apache.qpid.server.stats.StatisticsCounter;
import org.apache.qpid.server.virtualhost.VirtualHost;
import org.apache.qpid.transport.Connection;
@@ -49,20 +55,22 @@ import org.apache.qpid.transport.Method;
import org.apache.qpid.transport.ProtocolEvent;
import org.apache.qpid.transport.Session;
-public class ServerConnection extends Connection implements AMQConnectionModel, LogSubject
+public class ServerConnection extends Connection implements AMQConnectionModel, LogSubject, AuthorizationHolder
{
private ConnectionConfig _config;
private Runnable _onOpenTask;
private AtomicBoolean _logClosed = new AtomicBoolean(false);
private LogActor _actor = GenericActor.getInstance(this);
- private ApplicationRegistry _registry;
+ private Subject _authorizedSubject = null;
+ private Principal _authorizedPrincipal = null;
private boolean _statisticsEnabled = false;
private StatisticsCounter _messagesDelivered, _dataDelivered, _messagesReceived, _dataReceived;
+ private final long _connectionId;
- public ServerConnection()
+ public ServerConnection(final long connectionId)
{
-
+ _connectionId = connectionId;
}
public UUID getId()
@@ -212,9 +220,9 @@ public class ServerConnection extends Connection implements AMQConnectionModel,
public String toLogString()
{
boolean hasVirtualHost = (null != this.getVirtualHost());
- boolean hasPrincipal = (null != getAuthorizationID());
+ boolean hasClientId = (null != getClientId());
- if (hasPrincipal && hasVirtualHost)
+ if (hasClientId && hasVirtualHost)
{
return "[" +
MessageFormat.format(CONNECTION_FORMAT,
@@ -224,7 +232,7 @@ public class ServerConnection extends Connection implements AMQConnectionModel,
getVirtualHost().getName())
+ "] ";
}
- else if (hasPrincipal)
+ else if (hasClientId)
{
return "[" +
MessageFormat.format(USER_FORMAT,
@@ -341,4 +349,54 @@ public class ServerConnection extends Connection implements AMQConnectionModel,
{
_statisticsEnabled = enabled;
}
+
+ /**
+ * @return authorizedSubject
+ */
+ public Subject getAuthorizedSubject()
+ {
+ return _authorizedSubject;
+ }
+
+ /**
+ * Sets the authorized subject. It also extracts the UsernamePrincipal from the subject
+ * and caches it for optimisation purposes.
+ *
+ * @param authorizedSubject
+ */
+ public void setAuthorizedSubject(final Subject authorizedSubject)
+ {
+ if (authorizedSubject == null)
+ {
+ _authorizedSubject = null;
+ _authorizedPrincipal = null;
+ }
+ else
+ {
+ _authorizedSubject = authorizedSubject;
+ _authorizedPrincipal = UsernamePrincipal.getUsernamePrincipalFromSubject(_authorizedSubject);
+ }
+ }
+
+ public Principal getAuthorizedPrincipal()
+ {
+ return _authorizedPrincipal;
+ }
+
+ public long getConnectionId()
+ {
+ return _connectionId;
+ }
+
+ @Override
+ public boolean isSessionNameUnique(String name)
+ {
+ return !super.hasSessionWithName(name);
+ }
+
+ @Override
+ public String getUserName()
+ {
+ return _authorizedPrincipal.getName();
+ }
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnectionDelegate.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnectionDelegate.java
index 174dcbfa69..2de8a0425e 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnectionDelegate.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerConnectionDelegate.java
@@ -21,8 +21,10 @@
package org.apache.qpid.server.transport;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
@@ -31,11 +33,28 @@ import javax.security.sasl.SaslException;
import javax.security.sasl.SaslServer;
import org.apache.qpid.protocol.ProtocolEngine;
+import org.apache.qpid.server.protocol.AMQConnectionModel;
import org.apache.qpid.server.registry.ApplicationRegistry;
import org.apache.qpid.server.registry.IApplicationRegistry;
import org.apache.qpid.server.security.SecurityManager;
+import org.apache.qpid.server.security.auth.AuthenticationResult;
+import org.apache.qpid.server.security.auth.AuthenticationResult.AuthenticationStatus;
+import org.apache.qpid.server.subscription.Subscription_0_10;
import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.transport.*;
+import org.apache.qpid.transport.Binary;
+import org.apache.qpid.transport.Connection;
+import org.apache.qpid.transport.ConnectionClose;
+import org.apache.qpid.transport.ConnectionCloseCode;
+import org.apache.qpid.transport.ConnectionOpen;
+import org.apache.qpid.transport.ConnectionOpenOk;
+import org.apache.qpid.transport.ConnectionTuneOk;
+import org.apache.qpid.transport.ServerDelegate;
+import org.apache.qpid.transport.Session;
+import org.apache.qpid.transport.SessionAttach;
+import org.apache.qpid.transport.SessionDelegate;
+import org.apache.qpid.transport.SessionDetach;
+import org.apache.qpid.transport.SessionDetachCode;
+import org.apache.qpid.transport.SessionDetached;
public class ServerConnectionDelegate extends ServerDelegate
{
@@ -70,24 +89,42 @@ public class ServerConnectionDelegate extends ServerDelegate
return list;
}
- @Override
public ServerSession getSession(Connection conn, SessionAttach atc)
{
- SessionDelegate serverSessionDelegate = new ServerSessionDelegate(_appRegistry);
+ SessionDelegate serverSessionDelegate = new ServerSessionDelegate();
ServerSession ssn = new ServerSession(conn, serverSessionDelegate, new Binary(atc.getName()), 0);
return ssn;
}
- @Override
protected SaslServer createSaslServer(String mechanism) throws SaslException
{
return _appRegistry.getAuthenticationManager().createSaslServer(mechanism, _localFQDN);
}
- @Override
+ protected void secure(final SaslServer ss, final Connection conn, final byte[] response)
+ {
+ final AuthenticationResult authResult = _appRegistry.getAuthenticationManager().authenticate(ss, response);
+ final ServerConnection sconn = (ServerConnection) conn;
+
+
+ if (AuthenticationStatus.SUCCESS.equals(authResult.getStatus()))
+ {
+ tuneAuthorizedConnection(sconn);
+ sconn.setAuthorizedSubject(authResult.getSubject());
+ }
+ else if (AuthenticationStatus.CONTINUE.equals(authResult.getStatus()))
+ {
+ connectionAuthContinue(sconn, authResult.getChallenge());
+ }
+ else
+ {
+ connectionAuthFailed(sconn, authResult.getCause());
+ }
+ }
+
public void connectionClose(Connection conn, ConnectionClose close)
{
try
@@ -101,10 +138,9 @@ public class ServerConnectionDelegate extends ServerDelegate
}
- @Override
public void connectionOpen(Connection conn, ConnectionOpen open)
{
- ServerConnection sconn = (ServerConnection) conn;
+ final ServerConnection sconn = (ServerConnection) conn;
VirtualHost vhost;
String vhostName;
@@ -118,7 +154,7 @@ public class ServerConnectionDelegate extends ServerDelegate
}
vhost = _appRegistry.getVirtualHostRegistry().getVirtualHost(vhostName);
- SecurityManager.setThreadPrincipal(conn.getAuthorizationID());
+ SecurityManager.setThreadSubject(sconn.getAuthorizedSubject());
if(vhost != null)
{
@@ -142,6 +178,26 @@ public class ServerConnectionDelegate extends ServerDelegate
}
}
+
+ @Override
+ public void connectionTuneOk(final Connection conn, final ConnectionTuneOk ok)
+ {
+ ServerConnection sconn = (ServerConnection) conn;
+ int okChannelMax = ok.getChannelMax();
+
+ if (okChannelMax > getChannelMax())
+ {
+ _logger.error("Connection '" + sconn.getConnectionId() + "' being severed, " +
+ "client connectionTuneOk returned a channelMax (" + okChannelMax +
+ ") above the servers offered limit (" + getChannelMax() +")");
+
+ //Due to the error we must forcefully close the connection without negotiation
+ sconn.getSender().close();
+ return;
+ }
+
+ setConnectionTuneOkChannelMax(sconn, okChannelMax);
+ }
@Override
protected int getHeartbeatMax()
@@ -155,4 +211,59 @@ public class ServerConnectionDelegate extends ServerDelegate
{
return ApplicationRegistry.getInstance().getConfiguration().getMaxChannelCount();
}
+
+ @Override public void sessionDetach(Connection conn, SessionDetach dtc)
+ {
+ // To ensure a clean detach, we unregister any remaining subscriptions. Unregister ensures
+ // that any in-progress delivery (SubFlushRunner/QueueRunner) is completed before the unregister
+ // completes.
+ unregisterAllSubscriptions(conn, dtc);
+ super.sessionDetach(conn, dtc);
+ }
+
+ private void unregisterAllSubscriptions(Connection conn, SessionDetach dtc)
+ {
+ final ServerSession ssn = (ServerSession) conn.getSession(dtc.getChannel());
+ final Collection<Subscription_0_10> subs = ssn.getSubscriptions();
+ for (Subscription_0_10 subscription_0_10 : subs)
+ {
+ ssn.unregister(subscription_0_10);
+ }
+ }
+
+ @Override
+ public void sessionAttach(final Connection conn, final SessionAttach atc)
+ {
+ final String clientId = new String(atc.getName());
+ final Session ssn = getSession(conn, atc);
+
+ if(isSessionNameUnique(clientId,conn))
+ {
+ conn.registerSession(ssn);
+ super.sessionAttach(conn, atc);
+ }
+ else
+ {
+ ssn.invoke(new SessionDetached(atc.getName(), SessionDetachCode.SESSION_BUSY));
+ ssn.closed();
+ }
+ }
+
+ private boolean isSessionNameUnique(final String name, final Connection conn)
+ {
+ final ServerConnection sconn = (ServerConnection) conn;
+ final String userId = sconn.getUserName();
+
+ final Iterator<AMQConnectionModel> connections =
+ ((ServerConnection)conn).getVirtualHost().getConnectionRegistry().getConnections().iterator();
+ while(connections.hasNext())
+ {
+ final AMQConnectionModel amqConnectionModel = (AMQConnectionModel) connections.next();
+ if (userId.equals(amqConnectionModel.getUserName()) && !amqConnectionModel.isSessionNameUnique(name))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java
index 5c6206c53c..028f6d85be 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSession.java
@@ -20,8 +20,8 @@
*/
package org.apache.qpid.server.transport;
-import static org.apache.qpid.server.logging.subjects.LogSubjectFormat.*;
-import static org.apache.qpid.util.Serial.*;
+import static org.apache.qpid.server.logging.subjects.LogSubjectFormat.CHANNEL_FORMAT;
+import static org.apache.qpid.util.Serial.gt;
import java.lang.ref.WeakReference;
import java.security.Principal;
@@ -38,6 +38,8 @@ import java.util.concurrent.ConcurrentSkipListMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicLong;
+import javax.security.auth.Subject;
+
import org.apache.qpid.AMQException;
import org.apache.qpid.protocol.AMQConstant;
import org.apache.qpid.protocol.ProtocolEngine;
@@ -57,7 +59,7 @@ import org.apache.qpid.server.protocol.AMQSessionModel;
import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.queue.BaseQueue;
import org.apache.qpid.server.queue.QueueEntry;
-import org.apache.qpid.server.security.PrincipalHolder;
+import org.apache.qpid.server.security.AuthorizationHolder;
import org.apache.qpid.server.store.MessageStore;
import org.apache.qpid.server.subscription.Subscription_0_10;
import org.apache.qpid.server.txn.AutoCommitTransaction;
@@ -75,9 +77,7 @@ import org.apache.qpid.transport.SessionDelegate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.sun.security.auth.UserPrincipal;
-
-public class ServerSession extends Session implements PrincipalHolder, SessionConfig, AMQSessionModel, LogSubject
+public class ServerSession extends Session implements AuthorizationHolder, SessionConfig, AMQSessionModel, LogSubject
{
private static final Logger _logger = LoggerFactory.getLogger(ServerSession.class);
@@ -118,8 +118,6 @@ public class ServerSession extends Session implements PrincipalHolder, SessionCo
private final AtomicLong _txnCount = new AtomicLong(0);
private final AtomicLong _txnUpdateTime = new AtomicLong(0);
- private Principal _principal;
-
private Map<String, Subscription_0_10> _subscriptions = new ConcurrentHashMap<String, Subscription_0_10>();
private final List<Task> _taskList = new CopyOnWriteArrayList<Task>();
@@ -131,27 +129,27 @@ public class ServerSession extends Session implements PrincipalHolder, SessionCo
this(connection, delegate, name, expiry, ((ServerConnection)connection).getConfig());
}
- protected void setState(State state)
- {
- super.setState(state);
-
- if (state == State.OPEN)
- {
- _actor.message(ChannelMessages.CREATE());
- }
- }
-
public ServerSession(Connection connection, SessionDelegate delegate, Binary name, long expiry, ConnectionConfig connConfig)
{
super(connection, delegate, name, expiry);
_connectionConfig = connConfig;
_transaction = new AutoCommitTransaction(this.getMessageStore());
- _principal = new UserPrincipal(connection.getAuthorizationID());
+
_reference = new WeakReference<Session>(this);
_id = getConfigStore().createId();
getConfigStore().addConfiguredObject(this);
}
+ protected void setState(State state)
+ {
+ super.setState(state);
+
+ if (state == State.OPEN)
+ {
+ _actor.message(ChannelMessages.CREATE());
+ }
+ }
+
private ConfigStore getConfigStore()
{
return getConnectionConfig().getConfigStore();
@@ -202,8 +200,8 @@ public class ServerSession extends Session implements PrincipalHolder, SessionCo
public void sendMessage(MessageTransfer xfr,
Runnable postIdSettingAction)
{
- invoke(xfr, postIdSettingAction);
getConnectionModel().registerMessageDelivered(xfr.getBodySize());
+ invoke(xfr, postIdSettingAction);
}
public void onMessageDispositionChange(MessageTransfer xfr, MessageDispositionChangeListener acceptListener)
@@ -419,7 +417,7 @@ public class ServerSession extends Session implements PrincipalHolder, SessionCo
catch (AMQException e)
{
// TODO
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ _logger.error("Failed to unregister subscription", e);
}
finally
{
@@ -516,9 +514,14 @@ public class ServerSession extends Session implements PrincipalHolder, SessionCo
return _txnCount.get();
}
- public Principal getPrincipal()
+ public Principal getAuthorizedPrincipal()
{
- return _principal;
+ return ((ServerConnection) getConnection()).getAuthorizedPrincipal();
+ }
+
+ public Subject getAuthorizedSubject()
+ {
+ return ((ServerConnection) getConnection()).getAuthorizedSubject();
}
public void addSessionCloseTask(Task task)
@@ -667,11 +670,25 @@ public class ServerSession extends Session implements PrincipalHolder, SessionCo
{
return "[" +
MessageFormat.format(CHANNEL_FORMAT,
- getConnection().getConnectionId(),
+ ((ServerConnection) getConnection()).getConnectionId(),
getClientID(),
((ProtocolEngine) _connectionConfig).getRemoteAddress().toString(),
getVirtualHost().getName(),
getChannel())
+ "] ";
}
+
+ @Override
+ public void close()
+ {
+ // unregister subscriptions in order to prevent sending of new messages
+ // to subscriptions with closing session
+ final Collection<Subscription_0_10> subscriptions = getSubscriptions();
+ for (Subscription_0_10 subscription_0_10 : subscriptions)
+ {
+ unregister(subscription_0_10);
+ }
+
+ super.close();
+ }
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java
index be659c87ae..22760318b5 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java
@@ -25,31 +25,34 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
+import org.apache.log4j.Logger;
import org.apache.qpid.AMQException;
import org.apache.qpid.AMQUnknownExchangeType;
-import org.apache.qpid.common.AMQPFilterTypes;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.FieldTable;
-import org.apache.qpid.server.exchange.*;
+import org.apache.qpid.server.exchange.Exchange;
+import org.apache.qpid.server.exchange.ExchangeFactory;
+import org.apache.qpid.server.exchange.ExchangeInUseException;
+import org.apache.qpid.server.exchange.ExchangeRegistry;
+import org.apache.qpid.server.exchange.ExchangeType;
+import org.apache.qpid.server.exchange.HeadersExchange;
import org.apache.qpid.server.filter.FilterManager;
import org.apache.qpid.server.filter.FilterManagerFactory;
import org.apache.qpid.server.flow.FlowCreditManager_0_10;
import org.apache.qpid.server.flow.WindowCreditManager;
-import org.apache.qpid.server.logging.actors.CurrentActor;
-import org.apache.qpid.server.logging.actors.GenericActor;
+import org.apache.qpid.server.logging.messages.ExchangeMessages;
import org.apache.qpid.server.message.MessageMetaData_0_10;
import org.apache.qpid.server.message.MessageTransferMessage;
-import org.apache.qpid.server.protocol.AMQSessionModel;
import org.apache.qpid.server.queue.AMQQueue;
import org.apache.qpid.server.queue.AMQQueueFactory;
import org.apache.qpid.server.queue.BaseQueue;
import org.apache.qpid.server.queue.QueueRegistry;
import org.apache.qpid.server.registry.ApplicationRegistry;
-import org.apache.qpid.server.registry.IApplicationRegistry;
import org.apache.qpid.server.security.SecurityManager;
import org.apache.qpid.server.store.DurableConfigurationStore;
import org.apache.qpid.server.store.MessageStore;
import org.apache.qpid.server.store.StoredMessage;
+import org.apache.qpid.server.subscription.SubscriptionFactoryImpl;
import org.apache.qpid.server.subscription.Subscription_0_10;
import org.apache.qpid.server.virtualhost.VirtualHost;
import org.apache.qpid.transport.Acquired;
@@ -95,26 +98,34 @@ import org.apache.qpid.transport.TxSelect;
public class ServerSessionDelegate extends SessionDelegate
{
- private final IApplicationRegistry _appRegistry;
+ private static final Logger LOGGER = Logger.getLogger(ServerSessionDelegate.class);
- public ServerSessionDelegate(IApplicationRegistry appRegistry)
+ public ServerSessionDelegate()
{
- _appRegistry = appRegistry;
+
}
@Override
public void command(Session session, Method method)
{
- SecurityManager.setThreadPrincipal(session.getConnection().getAuthorizationID());
-
- if(!session.isClosing())
+ try
{
- super.command(session, method);
- if (method.isSync())
+ setThreadSubject(session);
+
+ if(!session.isClosing())
{
- session.flushProcessed();
+ super.command(session, method);
+ if (method.isSync())
+ {
+ session.flushProcessed();
+ }
}
}
+ catch(RuntimeException e)
+ {
+ LOGGER.error("Exception processing command", e);
+ exception(session, method, ExecutionErrorCode.INTERNAL_ERROR, "Exception processing command: " + e);
+ }
}
@Override
@@ -123,8 +134,6 @@ public class ServerSessionDelegate extends SessionDelegate
((ServerSession)session).accept(method.getTransfers());
}
-
-
@Override
public void messageReject(Session session, MessageReject method)
{
@@ -159,7 +168,6 @@ public class ServerSessionDelegate extends SessionDelegate
@Override
public void messageSubscribe(Session session, MessageSubscribe method)
{
-
//TODO - work around broken Python tests
if(!method.hasAcceptMode())
{
@@ -203,7 +211,7 @@ public class ServerSessionDelegate extends SessionDelegate
{
exception(session,method,ExecutionErrorCode.NOT_FOUND, "Queue: " + queueName + " not found");
}
- else if(queue.getPrincipalHolder() != null && queue.getPrincipalHolder() != session)
+ else if(queue.getAuthorizationHolder() != null && queue.getAuthorizationHolder() != session)
{
exception(session,method,ExecutionErrorCode.RESOURCE_LOCKED, "Exclusive Queue: " + queueName + " owned exclusively by another session");
}
@@ -213,17 +221,17 @@ public class ServerSessionDelegate extends SessionDelegate
{
ServerSession s = (ServerSession) session;
queue.setExclusiveOwningSession(s);
- if(queue.getPrincipalHolder() == null)
+ if(queue.getAuthorizationHolder() == null)
{
- queue.setPrincipalHolder(s);
+ queue.setAuthorizationHolder(s);
queue.setExclusiveOwningSession(s);
((ServerSession) session).addSessionCloseTask(new ServerSession.Task()
{
public void doTask(ServerSession session)
{
- if(queue.getPrincipalHolder() == session)
+ if(queue.getAuthorizationHolder() == session)
{
- queue.setPrincipalHolder(null);
+ queue.setAuthorizationHolder(null);
queue.setExclusiveOwningSession(null);
}
}
@@ -245,7 +253,7 @@ public class ServerSessionDelegate extends SessionDelegate
return;
}
- Subscription_0_10 sub = new Subscription_0_10((ServerSession)session,
+ Subscription_0_10 sub = SubscriptionFactoryImpl.INSTANCE.createSubscription((ServerSession)session,
destination,
method.getAcceptMode(),
method.getAcquireMode(),
@@ -276,25 +284,10 @@ public class ServerSessionDelegate extends SessionDelegate
}
}
-
@Override
public void messageTransfer(Session ssn, MessageTransfer xfr)
{
- ExchangeRegistry exchangeRegistry = getExchangeRegistry(ssn);
- Exchange exchange;
- if(xfr.hasDestination())
- {
- exchange = exchangeRegistry.getExchange(xfr.getDestination());
- if(exchange == null)
- {
- exchange = exchangeRegistry.getDefaultExchange();
- }
- }
- else
- {
- exchange = exchangeRegistry.getDefaultExchange();
- }
-
+ final Exchange exchange = getExchangeForMessage(ssn, xfr);
DeliveryProperties delvProps = null;
if(xfr.getHeader() != null && (delvProps = xfr.getHeader().get(DeliveryProperties.class)) != null && delvProps.hasTtl() && !delvProps.hasExpiration())
@@ -302,7 +295,7 @@ public class ServerSessionDelegate extends SessionDelegate
delvProps.setExpiration(System.currentTimeMillis() + delvProps.getTtl());
}
- MessageMetaData_0_10 messageMetaData = new MessageMetaData_0_10(xfr);
+ final MessageMetaData_0_10 messageMetaData = new MessageMetaData_0_10(xfr);
if (!getVirtualHost(ssn).getSecurityManager().authorisePublish(messageMetaData.isImmediate(), messageMetaData.getRoutingKey(), exchange.getName()))
{
@@ -312,66 +305,65 @@ public class ServerSessionDelegate extends SessionDelegate
return;
}
-
- final MessageStore store = getVirtualHost(ssn).getMessageStore();
- StoredMessage<MessageMetaData_0_10> storeMessage = store.addMessage(messageMetaData);
- ByteBuffer body = xfr.getBody();
- if(body != null)
+
+ final Exchange exchangeInUse;
+ ArrayList<? extends BaseQueue> queues = exchange.route(messageMetaData);
+ if(queues.isEmpty() && exchange.getAlternateExchange() != null)
{
- storeMessage.addContent(0, body);
+ final Exchange alternateExchange = exchange.getAlternateExchange();
+ queues = alternateExchange.route(messageMetaData);
+ if (!queues.isEmpty())
+ {
+ exchangeInUse = alternateExchange;
+ }
+ else
+ {
+ exchangeInUse = exchange;
+ }
+ }
+ else
+ {
+ exchangeInUse = exchange;
}
- storeMessage.flushToStore();
- MessageTransferMessage message = new MessageTransferMessage(storeMessage, ((ServerSession)ssn).getReference());
-
- ArrayList<? extends BaseQueue> queues = exchange.route(message);
-
-
- if(queues != null && queues.size() != 0)
+ if(!queues.isEmpty())
{
+ final MessageStore store = getVirtualHost(ssn).getMessageStore();
+ final StoredMessage<MessageMetaData_0_10> storeMessage = createAndFlushStoreMessage(xfr, messageMetaData, store);
+ MessageTransferMessage message = new MessageTransferMessage(storeMessage, ((ServerSession)ssn).getReference());
((ServerSession) ssn).enqueue(message, queues);
}
else
{
- if(delvProps == null || !delvProps.hasDiscardUnroutable() || !delvProps.getDiscardUnroutable())
+ if((delvProps == null || !delvProps.getDiscardUnroutable()) && xfr.getAcceptMode() == MessageAcceptMode.EXPLICIT)
{
- if(xfr.getAcceptMode() == MessageAcceptMode.EXPLICIT)
- {
- RangeSet rejects = new RangeSet();
- rejects.add(xfr.getId());
- MessageReject reject = new MessageReject(rejects, MessageRejectCode.UNROUTABLE, "Unroutable");
- ssn.invoke(reject);
- }
- else
- {
- Exchange alternate = exchange.getAlternateExchange();
- if(alternate != null)
- {
- queues = alternate.route(message);
- if(queues != null && queues.size() != 0)
- {
- ((ServerSession) ssn).enqueue(message, queues);
- }
- else
- {
- //TODO - log the message discard
- }
- }
- else
- {
- //TODO - log the message discard
- }
-
-
- }
+ RangeSet rejects = new RangeSet();
+ rejects.add(xfr.getId());
+ MessageReject reject = new MessageReject(rejects, MessageRejectCode.UNROUTABLE, "Unroutable");
+ ssn.invoke(reject);
+ }
+ else
+ {
+ ((ServerSession) ssn).getLogActor().message(ExchangeMessages.DISCARDMSG(exchangeInUse.getName(), messageMetaData.getRoutingKey()));
}
-
-
}
ssn.processed(xfr);
}
+ private StoredMessage<MessageMetaData_0_10> createAndFlushStoreMessage(final MessageTransfer xfr,
+ final MessageMetaData_0_10 messageMetaData, final MessageStore store)
+ {
+ final StoredMessage<MessageMetaData_0_10> storeMessage = store.addMessage(messageMetaData);
+ ByteBuffer body = xfr.getBody();
+ if(body != null)
+ {
+ storeMessage.addContent(0, body);
+ }
+ storeMessage.flushToStore();
+ return storeMessage;
+ }
+
@Override
public void messageCancel(Session session, MessageCancel method)
{
@@ -389,7 +381,7 @@ public class ServerSessionDelegate extends SessionDelegate
((ServerSession)session).unregister(sub);
if(!queue.isDeleted() && queue.isExclusive() && queue.getConsumerCount() == 0)
{
- queue.setPrincipalHolder(null);
+ queue.setAuthorizationHolder(null);
}
}
}
@@ -448,6 +440,19 @@ public class ServerSessionDelegate extends SessionDelegate
VirtualHost virtualHost = getVirtualHost(session);
Exchange exchange = getExchange(session, exchangeName);
+ //we must check for any unsupported arguments present and throw not-implemented
+ if(method.hasArguments())
+ {
+ Map<String,Object> args = method.getArguments();
+
+ //QPID-3392: currently we don't support any!
+ if(!args.isEmpty())
+ {
+ exception(session, method, ExecutionErrorCode.NOT_IMPLEMENTED, "Unsupported exchange argument(s) found " + args.keySet().toString());
+ return;
+ }
+ }
+
if(method.getPassive())
{
if(exchange == null)
@@ -457,7 +462,6 @@ public class ServerSessionDelegate extends SessionDelegate
}
else
{
- // TODO - check exchange has same properties
if(!exchange.getTypeShortString().toString().equals(method.getType()))
{
exception(session, method, ExecutionErrorCode.NOT_ALLOWED, "Cannot redeclare with a different exchange type");
@@ -562,6 +566,25 @@ public class ServerSessionDelegate extends SessionDelegate
}
+ private Exchange getExchangeForMessage(Session ssn, MessageTransfer xfr)
+ {
+ final ExchangeRegistry exchangeRegistry = getExchangeRegistry(ssn);
+ Exchange exchange;
+ if(xfr.hasDestination())
+ {
+ exchange = exchangeRegistry.getExchange(xfr.getDestination());
+ if(exchange == null)
+ {
+ exchange = exchangeRegistry.getDefaultExchange();
+ }
+ }
+ else
+ {
+ exchange = exchangeRegistry.getDefaultExchange();
+ }
+ return exchange;
+ }
+
private VirtualHost getVirtualHost(Session session)
{
ServerConnection conn = getServerConnection(session);
@@ -1007,7 +1030,7 @@ public class ServerSessionDelegate extends SessionDelegate
{
public void doTask(ServerSession session)
{
- q.setPrincipalHolder(null);
+ q.setAuthorizationHolder(null);
q.setExclusiveOwningSession(null);
}
};
@@ -1077,7 +1100,7 @@ public class ServerSessionDelegate extends SessionDelegate
}
else
{
- if(queue.getPrincipalHolder() != null && queue.getPrincipalHolder() != session)
+ if(queue.getAuthorizationHolder() != null && queue.getAuthorizationHolder() != session)
{
exception(session,method,ExecutionErrorCode.RESOURCE_LOCKED, "Exclusive Queue: " + queueName + " owned exclusively by another session");
}
@@ -1223,6 +1246,8 @@ public class ServerSessionDelegate extends SessionDelegate
@Override
public void closed(Session session)
{
+ setThreadSubject(session);
+
for(Subscription_0_10 sub : getSubscriptions(session))
{
((ServerSession)session).unregister(sub);
@@ -1241,4 +1266,9 @@ public class ServerSessionDelegate extends SessionDelegate
return ((ServerSession)session).getSubscriptions();
}
+ private void setThreadSubject(Session session)
+ {
+ final ServerConnection scon = (ServerConnection) session.getConnection();
+ SecurityManager.setThreadSubject(scon.getAuthorizedSubject());
+ }
}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/util/ByteBufferInputStream.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/util/ByteBufferInputStream.java
new file mode 100644
index 0000000000..898a667736
--- /dev/null
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/util/ByteBufferInputStream.java
@@ -0,0 +1,87 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.ByteBuffer;
+
+public class ByteBufferInputStream extends InputStream
+{
+ private final ByteBuffer _buffer;
+
+ public ByteBufferInputStream(ByteBuffer buffer)
+ {
+ _buffer = buffer;
+ }
+
+ @Override
+ public int read() throws IOException
+ {
+ return _buffer.get() & 0xFF;
+ }
+
+
+ @Override
+ public int read(byte[] b, int off, int len) throws IOException
+ {
+ if(_buffer.remaining() < len)
+ {
+ len = _buffer.remaining();
+ }
+ _buffer.get(b, off, len);
+
+ return len;
+ }
+
+ @Override
+ public void mark(int readlimit)
+ {
+ _buffer.mark();
+ }
+
+ @Override
+ public void reset() throws IOException
+ {
+ _buffer.reset();
+ }
+
+ @Override
+ public boolean markSupported()
+ {
+ return true;
+ }
+
+ @Override
+ public long skip(long n) throws IOException
+ {
+
+ _buffer.position(_buffer.position()+(int)n);
+
+ return n;
+ }
+
+ @Override
+ public int available() throws IOException
+ {
+ return _buffer.remaining();
+ }
+}
diff --git a/qpid/dotnet/Qpid.Buffer/BufferUnderflowException.cs b/qpid/java/broker/src/main/java/org/apache/qpid/server/util/ByteBufferOutputStream.java
index 13939b77a8..ca9a41bc32 100644
--- a/qpid/dotnet/Qpid.Buffer/BufferUnderflowException.cs
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/util/ByteBufferOutputStream.java
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,25 +18,29 @@
* under the License.
*
*/
-using System;
-using System.Runtime.Serialization;
+package org.apache.qpid.server.util;
+
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
-namespace Apache.Qpid.Buffer
+public class ByteBufferOutputStream extends OutputStream
{
- [Serializable]
- public class BufferUnderflowException : Exception
- {
- public BufferUnderflowException(string message)
- : base(message)
- {
- }
+ private final ByteBuffer _buffer;
- protected BufferUnderflowException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
+ public ByteBufferOutputStream(ByteBuffer buffer)
+ {
+ _buffer = buffer;
}
-}
-
+ @Override
+ public void write(int b)
+ {
+ _buffer.put((byte)b);
+ }
+ @Override
+ public void write(byte[] b, int off, int len)
+ {
+ _buffer.put(b, off, len);
+ }
+}
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostConfigRecoveryHandler.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostConfigRecoveryHandler.java
index 96a9ac729e..0fd31973b2 100755
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostConfigRecoveryHandler.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostConfigRecoveryHandler.java
@@ -43,7 +43,10 @@ import org.apache.qpid.framing.FieldTable;
import org.apache.qpid.AMQException;
import org.apache.log4j.Logger;
+import org.apache.qpid.server.util.ByteBufferInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.List;
@@ -236,7 +239,14 @@ public class VirtualHostConfigRecoveryHandler implements ConfigurationRecoveryHa
FieldTable argumentsFT = null;
if(buf != null)
{
- argumentsFT = new FieldTable(org.apache.mina.common.ByteBuffer.wrap(buf),buf.limit());
+ try
+ {
+ argumentsFT = new FieldTable(new DataInputStream(new ByteBufferInputStream(buf)),buf.limit());
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("IOException should not be thrown here", e);
+ }
}
BindingFactory bf = _virtualHost.getBindingFactory();
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java
index 33c713c62a..17c65003e9 100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java
+++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/virtualhost/VirtualHostImpl.java
@@ -20,7 +20,6 @@
*/
package org.apache.qpid.server.virtualhost;
-import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -72,7 +71,6 @@ import org.apache.qpid.server.registry.ApplicationRegistry;
import org.apache.qpid.server.registry.IApplicationRegistry;
import org.apache.qpid.server.security.SecurityManager;
import org.apache.qpid.server.security.auth.manager.AuthenticationManager;
-import org.apache.qpid.server.security.auth.manager.PrincipalDatabaseAuthenticationManager;
import org.apache.qpid.server.stats.StatisticsCounter;
import org.apache.qpid.server.store.ConfigurationRecoveryHandler;
import org.apache.qpid.server.store.DurableConfigurationStore;
@@ -179,22 +177,11 @@ public class VirtualHostImpl implements VirtualHost
}
}
- public VirtualHostImpl(IApplicationRegistry appRegistry, VirtualHostConfiguration hostConfig) throws Exception
- {
- this(appRegistry, hostConfig, null);
- }
-
-
- public VirtualHostImpl(VirtualHostConfiguration hostConfig, MessageStore store) throws Exception
- {
- this(ApplicationRegistry.getInstance(),hostConfig,store);
- }
-
- private VirtualHostImpl(IApplicationRegistry appRegistry, VirtualHostConfiguration hostConfig, MessageStore store) throws Exception
+ public VirtualHostImpl(IApplicationRegistry appRegistry, VirtualHostConfiguration hostConfig, MessageStore store) throws Exception
{
if (hostConfig == null)
{
- throw new IllegalAccessException("HostConfig and MessageStore cannot be null");
+ throw new IllegalArgumentException("HostConfig cannot be null");
}
_appRegistry = appRegistry;
@@ -252,19 +239,24 @@ public class VirtualHostImpl implements VirtualHost
_brokerMBean = new AMQBrokerManagerMBean(_virtualHostMBean);
_brokerMBean.register();
- initialiseHouseKeeping(hostConfig.getHousekeepingExpiredMessageCheckPeriod());
+ initialiseHouseKeeping(hostConfig.getHousekeepingCheckPeriod());
initialiseStatistics();
}
+ /**
+ * Initialise a housekeeping task to iterate over queues cleaning expired messages with no consumers
+ * and checking for idle or open transactions that have exceeded the permitted thresholds.
+ *
+ * @param period
+ */
private void initialiseHouseKeeping(long period)
{
- /* add a timer task to iterate over queues, cleaning expired messages from queues with no consumers */
if (period != 0L)
{
- class ExpiredMessagesTask extends HouseKeepingTask
+ class VirtualHostHouseKeepingTask extends HouseKeepingTask
{
- public ExpiredMessagesTask(VirtualHost vhost)
+ public VirtualHostHouseKeepingTask(VirtualHost vhost)
{
super(vhost);
}
@@ -309,7 +301,7 @@ public class VirtualHostImpl implements VirtualHost
}
}
- scheduleHouseKeepingTask(period, new ExpiredMessagesTask(this));
+ scheduleHouseKeepingTask(period, new VirtualHostHouseKeepingTask(this));
Map<String, VirtualHostPluginFactory> plugins =
ApplicationRegistry.getInstance().getPluginManager().getVirtualHostPlugins();
@@ -463,46 +455,57 @@ public class VirtualHostImpl implements VirtualHost
private void configureQueue(QueueConfiguration queueConfiguration) throws AMQException, ConfigurationException
{
AMQQueue queue = AMQQueueFactory.createAMQQueueImpl(queueConfiguration, this);
+ String queueName = queue.getName();
if (queue.isDurable())
{
getDurableConfigurationStore().createQueue(queue);
}
+ //get the exchange name (returns default exchange name if none was specified)
String exchangeName = queueConfiguration.getExchange();
- Exchange exchange = _exchangeRegistry.getExchange(exchangeName == null ? null : new AMQShortString(exchangeName));
-
- if (exchange == null)
- {
- exchange = _exchangeRegistry.getDefaultExchange();
- }
-
+ Exchange exchange = _exchangeRegistry.getExchange(exchangeName);
if (exchange == null)
{
- throw new ConfigurationException("Attempt to bind queue to unknown exchange:" + exchangeName);
+ throw new ConfigurationException("Attempt to bind queue '" + queueName + "' to unknown exchange:" + exchangeName);
}
- List routingKeys = queueConfiguration.getRoutingKeys();
- if (routingKeys == null || routingKeys.isEmpty())
- {
- routingKeys = Collections.singletonList(queue.getNameShortString());
- }
+ Exchange defaultExchange = _exchangeRegistry.getDefaultExchange();
+
+ //get routing keys in configuration (returns empty list if none are defined)
+ List<?> routingKeys = queueConfiguration.getRoutingKeys();
for (Object routingKeyNameObj : routingKeys)
{
- AMQShortString routingKey = new AMQShortString(String.valueOf(routingKeyNameObj));
- if (_logger.isInfoEnabled())
+ String routingKey = String.valueOf(routingKeyNameObj);
+
+ if (exchange.equals(defaultExchange) && !queueName.equals(routingKey))
{
- _logger.info("Binding queue:" + queue + " with routing key '" + routingKey + "' to exchange:" + this);
+ throw new ConfigurationException("Illegal attempt to bind queue '" + queueName +
+ "' to the default exchange with a key other than the queue name: " + routingKey);
}
- _bindingFactory.addBinding(routingKey.toString(), queue, exchange, null);
+
+ configureBinding(queue, exchange, routingKey);
}
- if (exchange != _exchangeRegistry.getDefaultExchange())
+ if (!exchange.equals(defaultExchange))
+ {
+ //bind the queue to the named exchange using its name
+ configureBinding(queue, exchange, queueName);
+ }
+
+ //ensure the queue is bound to the default exchange using its name
+ configureBinding(queue, defaultExchange, queueName);
+ }
+
+ private void configureBinding(AMQQueue queue, Exchange exchange, String routingKey) throws AMQException
+ {
+ if (_logger.isInfoEnabled())
{
- _bindingFactory.addBinding(queue.getNameShortString().toString(), queue, exchange, null);
+ _logger.info("Binding queue:" + queue + " with routing key '" + routingKey + "' to exchange:" + exchange.getName());
}
+ _bindingFactory.addBinding(routingKey, queue, exchange, null);
}
public String getName()
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/BrokerOptionsTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/BrokerOptionsTest.java
index 63423cbaa7..131f316330 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/BrokerOptionsTest.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/BrokerOptionsTest.java
@@ -20,16 +20,11 @@
*/
package org.apache.qpid.server;
-import static org.apache.qpid.transport.ConnectionSettings.WILDCARD_ADDRESS;
-import static org.apache.qpid.server.configuration.ServerConfiguration.DEFAULT_PORT;
-import static org.apache.qpid.server.configuration.ServerConfiguration.DEFAULT_JMXPORT;
-
-import java.util.Collections;
import java.util.Arrays;
+import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
-
import org.apache.qpid.test.utils.QpidTestCase;
@@ -126,15 +121,26 @@ public class BrokerOptionsTest extends QpidTestCase
assertEquals(testLogConfigFile, _options.getLogConfigFile());
}
- public void testDefaultJmxPort()
+ public void testDefaultJmxPortRegistryServer()
+ {
+ assertNull(_options.getJmxPortRegistryServer());
+ }
+
+ public void testJmxPortRegistryServer()
+ {
+ _options.setJmxPortRegistryServer(TEST_PORT1);
+ assertEquals(Integer.valueOf(TEST_PORT1), _options.getJmxPortRegistryServer());
+ }
+
+ public void testDefaultJmxPortConnectorServer()
{
- assertNull(_options.getJmxPort());
+ assertNull(_options.getJmxPortConnectorServer());
}
- public void testJmxPort()
+ public void testJmxPortConnectorServer()
{
- _options.setJmxPort(TEST_PORT1);
- assertEquals(Integer.valueOf(TEST_PORT1), _options.getJmxPort());
+ _options.setJmxPortConnectorServer(TEST_PORT1);
+ assertEquals(Integer.valueOf(TEST_PORT1), _options.getJmxPortConnectorServer());
}
public void testQpidHomeExposesSysProperty()
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java
new file mode 100644
index 0000000000..9b0ae82b84
--- /dev/null
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/MainTest.java
@@ -0,0 +1,153 @@
+package org.apache.qpid.server;
+
+import java.util.EnumSet;
+
+import org.apache.qpid.test.utils.QpidTestCase;
+
+/**
+ * Test to verify the command line parsing within the Main class, by
+ * providing it a series of command line arguments and verifying the
+ * BrokerOptions emerging for use in starting the Broker instance.
+ */
+public class MainTest extends QpidTestCase
+{
+ public void testNoOptionsSpecified()
+ {
+ BrokerOptions options = startDummyMain("");
+
+ assertTrue(options.getPorts().isEmpty());
+ assertTrue(options.getSSLPorts().isEmpty());
+ assertEquals(null, options.getJmxPortRegistryServer());
+ assertEquals(null, options.getConfigFile());
+ assertEquals(null, options.getLogConfigFile());
+ assertEquals(null, options.getBind());
+
+ for(ProtocolExclusion pe : EnumSet.allOf(ProtocolExclusion.class))
+ {
+ assertEquals(0, options.getExcludedPorts(pe).size());
+ }
+ }
+
+ public void testPortOverriddenSingle()
+ {
+ BrokerOptions options = startDummyMain("-p 1234");
+
+ assertTrue(options.getPorts().contains(1234));
+ assertEquals(1, options.getPorts().size());
+ assertTrue(options.getSSLPorts().isEmpty());
+ }
+
+ public void testPortOverriddenMultiple()
+ {
+ BrokerOptions options = startDummyMain("-p 1234 -p 4321");
+
+ assertTrue(options.getPorts().contains(1234));
+ assertTrue(options.getPorts().contains(4321));
+ assertEquals(2, options.getPorts().size());
+ assertTrue(options.getSSLPorts().isEmpty());
+ }
+
+ public void testSSLPortOverriddenSingle()
+ {
+ BrokerOptions options = startDummyMain("-s 5678");
+
+ assertTrue(options.getSSLPorts().contains(5678));
+ assertEquals(1, options.getSSLPorts().size());
+ assertTrue(options.getPorts().isEmpty());
+ }
+
+ public void testSSLPortOverriddenMultiple()
+ {
+ BrokerOptions options = startDummyMain("-s 5678 -s 8765");
+
+ assertTrue(options.getSSLPorts().contains(5678));
+ assertTrue(options.getSSLPorts().contains(8765));
+ assertEquals(2, options.getSSLPorts().size());
+ assertTrue(options.getPorts().isEmpty());
+ }
+
+ public void testNonSSLandSSLPortsOverridden()
+ {
+ BrokerOptions options = startDummyMain("-p 5678 -s 8765");
+
+ assertTrue(options.getPorts().contains(5678));
+ assertTrue(options.getSSLPorts().contains(8765));
+ assertEquals(1, options.getPorts().size());
+ assertEquals(1, options.getSSLPorts().size());
+ }
+
+ public void testJmxPortRegistryServerOverridden()
+ {
+ BrokerOptions options = startDummyMain("--jmxregistryport 3456");
+
+ assertEquals(Integer.valueOf(3456), options.getJmxPortRegistryServer());
+
+ options = startDummyMain("-m 3457");
+ assertEquals(Integer.valueOf(3457), options.getJmxPortRegistryServer());
+ }
+
+ public void testJmxPortConnectorServerOverridden()
+ {
+ BrokerOptions options = startDummyMain("--jmxconnectorport 3456");
+
+ assertEquals(Integer.valueOf(3456), options.getJmxPortConnectorServer());
+ }
+
+ public void testExclude0_10()
+ {
+ BrokerOptions options = startDummyMain("-p 3456 --exclude-0-10 3456");
+
+ assertTrue(options.getPorts().contains(3456));
+ assertEquals(1, options.getPorts().size());
+ assertTrue(options.getExcludedPorts(ProtocolExclusion.v0_10).contains(3456));
+ assertEquals(1, options.getExcludedPorts(ProtocolExclusion.v0_10).size());
+ assertEquals(0, options.getExcludedPorts(ProtocolExclusion.v0_9_1).size());
+ }
+
+ public void testConfig()
+ {
+ BrokerOptions options = startDummyMain("-c abcd/config.xml");
+
+ assertEquals("abcd/config.xml", options.getConfigFile());
+ }
+
+ public void testLogConfig()
+ {
+ BrokerOptions options = startDummyMain("-l wxyz/log4j.xml");
+
+ assertEquals("wxyz/log4j.xml", options.getLogConfigFile());
+ }
+
+ public void testLogWatch()
+ {
+ BrokerOptions options = startDummyMain("-w 9");
+
+ assertEquals(9, options.getLogWatchFrequency());
+ }
+
+ private BrokerOptions startDummyMain(String commandLine)
+ {
+ return (new TestMain(commandLine.split("\\s"))).getOptions();
+ }
+
+ private class TestMain extends Main
+ {
+ private BrokerOptions _options;
+
+ public TestMain(String[] args)
+ {
+ super(args);
+ }
+
+ @Override
+ protected void startBroker(BrokerOptions options)
+ {
+ _options = options;
+ }
+
+ public BrokerOptions getOptions()
+ {
+ return _options;
+ }
+ }
+}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java
index c8a35e4405..d368a2d1ee 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/ServerConfigurationTest.java
@@ -25,7 +25,6 @@ import static org.apache.qpid.transport.ConnectionSettings.WILDCARD_ADDRESS;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
-import java.util.List;
import java.util.Locale;
import org.apache.commons.configuration.ConfigurationException;
@@ -59,128 +58,85 @@ public class ServerConfigurationTest extends QpidTestCase
ApplicationRegistry.remove();
}
- public void testSetJMXManagementPort() throws ConfigurationException
+ public void testSetJMXPortRegistryServer() throws ConfigurationException
{
_serverConfig.initialise();
- _serverConfig.setJMXManagementPort(23);
- assertEquals(23, _serverConfig.getJMXManagementPort());
+ _serverConfig.setJMXPortRegistryServer(23);
+ assertEquals(23, _serverConfig.getJMXPortRegistryServer());
}
- public void testGetJMXManagementPort() throws ConfigurationException
+ public void testGetJMXPortRegistryServer() throws ConfigurationException
{
- _config.setProperty("management.jmxport", 42);
+ _config.setProperty(ServerConfiguration.MGMT_JMXPORT_REGISTRYSERVER, 42);
_serverConfig.initialise();
- assertEquals(42, _serverConfig.getJMXManagementPort());
+ assertEquals(42, _serverConfig.getJMXPortRegistryServer());
}
- public void testGetPlatformMbeanserver() throws ConfigurationException
+ public void testDefaultJMXPortRegistryServer() throws ConfigurationException
{
_serverConfig.initialise();
- assertEquals(true, _serverConfig.getPlatformMbeanserver());
-
- // Check value we set
- _config.setProperty("management.platform-mbeanserver", false);
- _serverConfig = new ServerConfiguration(_config);
- _serverConfig.initialise();
- assertEquals(false, _serverConfig.getPlatformMbeanserver());
+ assertEquals(8999, _serverConfig.getJMXPortRegistryServer());
}
- public void testGetPluginDirectory() throws ConfigurationException
+ public void testSetJMXPortConnectorServer() throws ConfigurationException
{
- // Check default
- _serverConfig.initialise();
- assertEquals(null, _serverConfig.getPluginDirectory());
-
- // Check value we set
- _config.setProperty("plugin-directory", "/path/to/plugins");
- _serverConfig = new ServerConfiguration(_config);
- _serverConfig.initialise();
- assertEquals("/path/to/plugins", _serverConfig.getPluginDirectory());
+ ServerConfiguration serverConfig = new ServerConfiguration(_config);
+ serverConfig.setJMXPortConnectorServer(67);
+ assertEquals(67, serverConfig.getJMXConnectorServerPort());
}
- public void testGetCacheDirectory() throws ConfigurationException
+ public void testGetJMXPortConnectorServer() throws ConfigurationException
{
- // Check default
- _serverConfig.initialise();
- assertEquals(null, _serverConfig.getCacheDirectory());
-
- // Check value we set
- _config.setProperty("cache-directory", "/path/to/cache");
- _serverConfig = new ServerConfiguration(_config);
- _serverConfig.initialise();
- assertEquals("/path/to/cache", _serverConfig.getCacheDirectory());
+ _config.setProperty(ServerConfiguration.MGMT_JMXPORT_CONNECTORSERVER, 67);
+ ServerConfiguration serverConfig = new ServerConfiguration(_config);
+ assertEquals(67, serverConfig.getJMXConnectorServerPort());
}
- public void testGetPrincipalDatabaseNames() throws ConfigurationException
+ public void testDefaultJMXPortConnectorServer() throws ConfigurationException
{
- // Check default
- _serverConfig.initialise();
- assertEquals(0, _serverConfig.getPrincipalDatabaseNames().size());
-
- // Check value we set
- _config.setProperty("security.principal-databases.principal-database(0).name", "a");
- _config.setProperty("security.principal-databases.principal-database(1).name", "b");
- _serverConfig = new ServerConfiguration(_config);
- _serverConfig.initialise();
- List<String> dbs = _serverConfig.getPrincipalDatabaseNames();
- assertEquals(2, dbs.size());
- assertEquals("a", dbs.get(0));
- assertEquals("b", dbs.get(1));
+ ServerConfiguration serverConfig = new ServerConfiguration(_config);
+ assertEquals(ServerConfiguration.DEFAULT_JMXPORT_REGISTRYSERVER + ServerConfiguration.JMXPORT_CONNECTORSERVER_OFFSET,
+ serverConfig.getJMXConnectorServerPort());
}
- public void testGetPrincipalDatabaseClass() throws ConfigurationException
+ public void testGetPlatformMbeanserver() throws ConfigurationException
{
- // Check default
_serverConfig.initialise();
- assertEquals(0, _serverConfig.getPrincipalDatabaseClass().size());
+ assertEquals(true, _serverConfig.getPlatformMbeanserver());
// Check value we set
- _config.setProperty("security.principal-databases.principal-database(0).class", "a");
- _config.setProperty("security.principal-databases.principal-database(1).class", "b");
+ _config.setProperty("management.platform-mbeanserver", false);
_serverConfig = new ServerConfiguration(_config);
_serverConfig.initialise();
- List<String> dbs = _serverConfig.getPrincipalDatabaseClass();
- assertEquals(2, dbs.size());
- assertEquals("a", dbs.get(0));
- assertEquals("b", dbs.get(1));
+ assertEquals(false, _serverConfig.getPlatformMbeanserver());
}
- public void testGetPrincipalDatabaseAttributeNames() throws ConfigurationException
+ public void testGetPluginDirectory() throws ConfigurationException
{
// Check default
_serverConfig.initialise();
- assertEquals(0, _serverConfig.getPrincipalDatabaseAttributeNames(1).size());
+ assertEquals(null, _serverConfig.getPluginDirectory());
// Check value we set
- _config.setProperty("security.principal-databases.principal-database(0).attributes(0).attribute.name", "a");
- _config.setProperty("security.principal-databases.principal-database(0).attributes(1).attribute.name", "b");
+ _config.setProperty("plugin-directory", "/path/to/plugins");
_serverConfig = new ServerConfiguration(_config);
_serverConfig.initialise();
- List<String> dbs = _serverConfig.getPrincipalDatabaseAttributeNames(0);
- assertEquals(2, dbs.size());
- assertEquals("a", dbs.get(0));
- assertEquals("b", dbs.get(1));
+ assertEquals("/path/to/plugins", _serverConfig.getPluginDirectory());
}
- public void testGetPrincipalDatabaseAttributeValues() throws ConfigurationException
+ public void testGetCacheDirectory() throws ConfigurationException
{
// Check default
_serverConfig.initialise();
- assertEquals(0, _serverConfig.getPrincipalDatabaseAttributeValues(1).size());
+ assertEquals(null, _serverConfig.getCacheDirectory());
// Check value we set
- _config.setProperty("security.principal-databases.principal-database(0).attributes(0).attribute.value", "a");
- _config.setProperty("security.principal-databases.principal-database(0).attributes(1).attribute.value", "b");
+ _config.setProperty("cache-directory", "/path/to/cache");
_serverConfig = new ServerConfiguration(_config);
_serverConfig.initialise();
- List<String> dbs = _serverConfig.getPrincipalDatabaseAttributeValues(0);
- assertEquals(2, dbs.size());
- assertEquals("a", dbs.get(0));
- assertEquals("b", dbs.get(1));
+ assertEquals("/path/to/cache", _serverConfig.getCacheDirectory());
}
-
-
public void testGetFrameSize() throws ConfigurationException
{
// Check default
@@ -582,7 +538,7 @@ public class ServerConfigurationTest extends QpidTestCase
{
// Check default
_serverConfig.initialise();
- assertEquals("none", _serverConfig.getKeystorePath());
+ assertNull(_serverConfig.getKeystorePath());
// Check value we set
_config.setProperty("connector.ssl.keystorePath", "a");
@@ -595,7 +551,7 @@ public class ServerConfigurationTest extends QpidTestCase
{
// Check default
_serverConfig.initialise();
- assertEquals("none", _serverConfig.getKeystorePassword());
+ assertNull(_serverConfig.getKeystorePassword());
// Check value we set
_config.setProperty("connector.ssl.keystorePassword", "a");
@@ -630,18 +586,17 @@ public class ServerConfigurationTest extends QpidTestCase
assertEquals(true, _serverConfig.getUseBiasedWrites());
}
- public void testGetHousekeepingExpiredMessageCheckPeriod() throws ConfigurationException
+ public void testGetHousekeepingCheckPeriod() throws ConfigurationException
{
// Check default
_serverConfig.initialise();
assertEquals(30000, _serverConfig.getHousekeepingCheckPeriod());
// Check value we set
- _config.setProperty("housekeeping.expiredMessageCheckPeriod", 23L);
+ _config.setProperty("housekeeping.checkPeriod", 23L);
_serverConfig = new ServerConfiguration(_config);
_serverConfig.initialise();
- assertEquals(23, _serverConfig.getHousekeepingCheckPeriod());
- _serverConfig.setHousekeepingExpiredMessageCheckPeriod(42L);
+ _serverConfig.setHousekeepingCheckPeriod(42L);
assertEquals(42, _serverConfig.getHousekeepingCheckPeriod());
}
@@ -720,9 +675,8 @@ public class ServerConfigurationTest extends QpidTestCase
out.write("<broker>\n");
out.write("\t<management><enabled>false</enabled></management>\n");
out.write("\t<security>\n");
- out.write("\t\t<principal-databases>\n");
+ out.write("\t\t<pd-auth-manager>\n");
out.write("\t\t\t<principal-database>\n");
- out.write("\t\t\t\t<name>passwordfile</name>\n");
out.write("\t\t\t\t<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>\n");
out.write("\t\t\t\t<attributes>\n");
out.write("\t\t\t\t\t<attribute>\n");
@@ -731,7 +685,7 @@ public class ServerConfigurationTest extends QpidTestCase
out.write("\t\t\t\t\t</attribute>\n");
out.write("\t\t\t\t</attributes>\n");
out.write("\t\t\t</principal-database>\n");
- out.write("\t\t</principal-databases>\n");
+ out.write("\t\t</pd-auth-manager>\n");
out.write("\t\t<firewall>\n");
out.write("\t\t\t<rule access=\""+ ((allow) ? "allow" : "deny") +"\" network=\"127.0.0.1\"/>");
out.write("\t\t</firewall>\n");
@@ -767,9 +721,8 @@ public class ServerConfigurationTest extends QpidTestCase
out.write("<broker>\n");
out.write("\t<management><enabled>false</enabled></management>\n");
out.write("\t<security>\n");
- out.write("\t\t<principal-databases>\n");
+ out.write("\t\t<pd-auth-manager>\n");
out.write("\t\t\t<principal-database>\n");
- out.write("\t\t\t\t<name>passwordfile</name>\n");
out.write("\t\t\t\t<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>\n");
out.write("\t\t\t\t<attributes>\n");
out.write("\t\t\t\t\t<attribute>\n");
@@ -778,7 +731,7 @@ public class ServerConfigurationTest extends QpidTestCase
out.write("\t\t\t\t\t</attribute>\n");
out.write("\t\t\t\t</attributes>\n");
out.write("\t\t\t</principal-database>\n");
- out.write("\t\t</principal-databases>\n");
+ out.write("\t\t</pd-auth-manager>\n");
out.write("\t\t<firewall>\n");
out.write("\t\t\t<rule access=\"allow\" network=\"127.0.0.1\"/>");
out.write("\t\t</firewall>\n");
@@ -869,9 +822,8 @@ public class ServerConfigurationTest extends QpidTestCase
out.write("<broker>\n");
out.write("\t<management><enabled>false</enabled></management>\n");
out.write("\t<security>\n");
- out.write("\t\t<principal-databases>\n");
+ out.write("\t\t<pd-auth-manager>\n");
out.write("\t\t\t<principal-database>\n");
- out.write("\t\t\t\t<name>passwordfile</name>\n");
out.write("\t\t\t\t<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>\n");
out.write("\t\t\t\t<attributes>\n");
out.write("\t\t\t\t\t<attribute>\n");
@@ -880,7 +832,7 @@ public class ServerConfigurationTest extends QpidTestCase
out.write("\t\t\t\t\t</attribute>\n");
out.write("\t\t\t\t</attributes>\n");
out.write("\t\t\t</principal-database>\n");
- out.write("\t\t</principal-databases>\n");
+ out.write("\t\t</pd-auth-manager>\n");
out.write("\t\t<firewall>\n");
out.write("\t\t\t<rule access=\"allow\" network=\"127.0.0.1\"/>");
out.write("\t\t</firewall>\n");
@@ -1387,7 +1339,7 @@ public class ServerConfigurationTest extends QpidTestCase
}
/*
- * Tests that the old element security.jmx.principal-databases (that used to define the
+ * Tests that the old element security.jmx.principal-database (that used to define the
* principal database used for JMX authentication) is rejected.
*/
public void testManagementPrincipalDatabaseRejected() throws ConfigurationException
@@ -1411,4 +1363,54 @@ public class ServerConfigurationTest extends QpidTestCase
ce.getMessage());
}
}
+
+ /*
+ * Tests that the old element security.principal-databases. ... (that used to define
+ * principal databases) is rejected.
+ */
+ public void testPrincipalDatabasesRejected() throws ConfigurationException
+ {
+ _serverConfig.initialise();
+
+ // Check value we set
+ _config.setProperty("security.principal-databases.principal-database.class", "myclass");
+ _serverConfig = new ServerConfiguration(_config);
+
+ try
+ {
+ _serverConfig.initialise();
+ fail("Exception not thrown");
+ }
+ catch (ConfigurationException ce)
+ {
+ assertEquals("Incorrect error message",
+ "Validation error : security/principal-databases is no longer supported within the configuration xml.",
+ ce.getMessage());
+ }
+ }
+
+ /*
+ * Tests that the old element housekeeping.expiredMessageCheckPeriod. ... (that was
+ * replaced by housekeeping.checkPeriod) is rejected.
+ */
+ public void testExpiredMessageCheckPeriodRejected() throws ConfigurationException
+ {
+ _serverConfig.initialise();
+
+ // Check value we set
+ _config.setProperty("housekeeping.expiredMessageCheckPeriod", 23L);
+ _serverConfig = new ServerConfiguration(_config);
+
+ try
+ {
+ _serverConfig.initialise();
+ fail("Exception not thrown");
+ }
+ catch (ConfigurationException ce)
+ {
+ assertEquals("Incorrect error message",
+ "Validation error : housekeeping/expiredMessageCheckPeriod must be replaced by housekeeping/checkPeriod.",
+ ce.getMessage());
+ }
+ }
}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/VirtualHostConfigurationTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/VirtualHostConfigurationTest.java
index 593119041d..b133d53ac5 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/VirtualHostConfigurationTest.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/VirtualHostConfigurationTest.java
@@ -229,5 +229,26 @@ public class VirtualHostConfigurationTest extends InternalBrokerBaseCase
}
}
+ /*
+ * Tests that the old element housekeeping.expiredMessageCheckPeriod. ... (that was
+ * replaced by housekeeping.checkPeriod) is rejected.
+ */
+ public void testExpiredMessageCheckPeriodRejected() throws Exception
+ {
+ getConfigXml().addProperty("virtualhosts.virtualhost.testExpiredMessageCheckPeriodRejected.housekeeping.expiredMessageCheckPeriod",
+ 5);
+ try
+ {
+ super.createBroker();
+ fail("Exception not thrown");
+ }
+ catch (ConfigurationException ce)
+ {
+ assertEquals("Incorrect error message",
+ "Validation error : housekeeping/expiredMessageCheckPeriod must be replaced by housekeeping/checkPeriod." +
+ " It appears in virtual host definition : " + getName(),
+ ce.getMessage());
+ }
+ }
}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java
index 44da761353..3b7f5f3a51 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/exchange/AbstractHeadersExchangeTestBase.java
@@ -52,6 +52,7 @@ import org.apache.qpid.server.store.StoredMessage;
import org.apache.qpid.server.subscription.Subscription;
import org.apache.qpid.server.util.InternalBrokerBaseCase;
+import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -428,21 +429,11 @@ public class AbstractHeadersExchangeTestBase extends InternalBrokerBaseCase
//To change body of implemented methods use File | Settings | File Templates.
}
- public void reject(Subscription subscription)
- {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public boolean isRejectedBy(Subscription subscription)
+ public boolean isRejectedBy(long subscriptionId)
{
return false; //To change body of implemented methods use File | Settings | File Templates.
}
- public void requeue(Subscription subscription)
- {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
public void dequeue()
{
//To change body of implemented methods use File | Settings | File Templates.
@@ -575,8 +566,8 @@ public class AbstractHeadersExchangeTestBase extends InternalBrokerBaseCase
int pos = 0;
for(ContentBody body : bodies)
{
- storedMessage.addContent(pos, body.payload.duplicate().buf());
- pos += body.payload.limit();
+ storedMessage.addContent(pos, ByteBuffer.wrap(body._payload));
+ pos += body._payload.length;
}
_incoming = new TestIncomingMessage(getMessageId(),publish, protocolsession);
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/UnitTestMessageLogger.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/UnitTestMessageLogger.java
index 3752dcb37e..e8defd0e58 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/UnitTestMessageLogger.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/UnitTestMessageLogger.java
@@ -28,11 +28,7 @@ import org.apache.qpid.server.logging.AbstractRootMessageLogger;
public class UnitTestMessageLogger extends AbstractRootMessageLogger
{
- List<Object> _log;
-
- {
- _log = new LinkedList<Object>();
- }
+ private final List<Object> _log = new LinkedList<Object>();
public UnitTestMessageLogger()
{
@@ -69,4 +65,14 @@ public class UnitTestMessageLogger extends AbstractRootMessageLogger
{
_log.clear();
}
+
+ public boolean messageContains(final int index, final String contains)
+ {
+ if (index + 1 > _log.size())
+ {
+ throw new IllegalArgumentException("Message with index " + index + " has not been logged");
+ }
+ final String message = _log.get(index).toString();
+ return message.contains(contains);
+ }
}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/actors/ManagementActorTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/actors/ManagementActorTest.java
index 033ae3b4b3..d6b790db01 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/actors/ManagementActorTest.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/actors/ManagementActorTest.java
@@ -20,13 +20,13 @@
*/
package org.apache.qpid.server.logging.actors;
-import org.apache.qpid.server.configuration.ServerConfiguration;
-import org.apache.qpid.server.logging.LogMessage;
-import org.apache.qpid.server.logging.LogSubject;
-import org.apache.qpid.AMQException;
-
+import java.security.PrivilegedAction;
+import java.util.Collections;
import java.util.List;
+import javax.management.remote.JMXPrincipal;
+import javax.security.auth.Subject;
+
/**
* Test : AMQPManagementActorTest
* Validate the AMQPManagementActor class.
@@ -96,8 +96,40 @@ public class ManagementActorTest extends BaseActorTestCase
// Verify that the message has the right values
assertTrue("Message contains the [mng: prefix",
- logs.get(0).toString().contains("[mng:" + CONNECTION_ID + "(" + IP + ")"));
+ logs.get(0).toString().contains("[mng:N/A(" + IP + ")"));
+ }
+
+ /**
+ * Tests appearance of principal name in log message
+ */
+ public void testSubjectPrincipalNameAppearance()
+ {
+ Subject subject = new Subject(true, Collections.singleton(new JMXPrincipal("guest")), Collections.EMPTY_SET,
+ Collections.EMPTY_SET);
+
+ final String message = Subject.doAs(subject, new PrivilegedAction<String>()
+ {
+ public String run()
+ {
+ return sendTestLogMessage(_amqpActor);
+ }
+ });
+
+ // Verify that the log message was created
+ assertNotNull("Test log message is not created!", message);
+
+ List<Object> logs = _rawLogger.getLogMessages();
+
+ // Verify that at least one log message was added to log
+ assertEquals("Message log size not as expected.", 1, logs.size());
+
+ String logMessage = logs.get(0).toString();
+
+ // Verify that the logged message is present in the output
+ assertTrue("Message was not found in log message", logMessage.contains(message));
+ // Verify that the message has the right principal value
+ assertTrue("Message contains the [mng: prefix", logMessage.contains("[mng:guest(" + IP + ")"));
}
}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/messages/ExchangeMessagesTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/messages/ExchangeMessagesTest.java
index 728a98e009..4364376000 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/messages/ExchangeMessagesTest.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/logging/messages/ExchangeMessagesTest.java
@@ -66,7 +66,6 @@ public class ExchangeMessagesTest extends AbstractTestMessages
validateLogMessage(log, "EXH-1001", expected);
}
-
public void testExchangeDeleted()
{
_logMessage = ExchangeMessages.DELETED();
@@ -77,4 +76,21 @@ public class ExchangeMessagesTest extends AbstractTestMessages
validateLogMessage(log, "EXH-1002", expected);
}
+ public void testExchangeDiscardedMessage()
+ {
+ // Get the Default Exchange on the Test Vhost for testing
+ final Exchange exchange = ApplicationRegistry.getInstance().
+ getVirtualHostRegistry().getVirtualHost("test").
+ getExchangeRegistry().getDefaultExchange();
+
+ final String name = exchange.getNameShortString().toString();
+ final String routingKey = "routingKey";
+
+ _logMessage = ExchangeMessages.DISCARDMSG(name, routingKey);
+ List<Object> log = performLog();
+
+ String[] expected = {"Discarded Message :","Name:", name, "Routing Key:", routingKey};
+
+ validateLogMessage(log, "EXH-1003", expected);
+ }
}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/management/AMQUserManagementMBeanTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/management/AMQUserManagementMBeanTest.java
index 21f79e4b69..f3ee2707b0 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/management/AMQUserManagementMBeanTest.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/management/AMQUserManagementMBeanTest.java
@@ -102,13 +102,6 @@ public class AMQUserManagementMBeanTest extends InternalBrokerBaseCase
assertEquals("Unexpected number of users before test", 1,_amqumMBean.viewUsers().size());
}
- public void testFiveArgCreateUserWithNegativeRightsRemainsSupported()
- {
- assertEquals("Unexpected number of users before test", 1,_amqumMBean.viewUsers().size());
- assertTrue("Create should return true to flag successful create", _amqumMBean.createUser("newuser", "mypass".toCharArray(), false, false, false));
- assertEquals("Unexpected number of users before test", 2,_amqumMBean.viewUsers().size());
- }
-
public void testSetPassword()
{
assertTrue("Set password should return true to flag successful change", _amqumMBean.setPassword(TEST_USERNAME, "newpassword"));
@@ -137,33 +130,6 @@ public class AMQUserManagementMBeanTest extends InternalBrokerBaseCase
assertEquals(false, userRec.get(UserManagement.RIGHTS_ADMIN));
}
- // TEST DEPRECATED METHODS
- public void testFiveArgCreateUserWithPositiveRightsThrowsUnsupportedOperation()
- {
- try
- {
- _amqumMBean.createUser(TEST_USERNAME, "mypass", true, false, false);
- fail("Exception not thrown");
- }
- catch (UnsupportedOperationException uoe)
- {
- // PASS
- }
- }
-
- public void testSetRightsThrowsUnsupportedOperation()
- {
- try
- {
- _amqumMBean.setRights("", false, false, false);
- fail("Exception not thrown");
- }
- catch(UnsupportedOperationException nie)
- {
- // PASS
- }
- }
-
// ============================ Utility methods =========================
private void loadFreshTestPasswordFile()
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/MockPluginManager.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/MockPluginManager.java
deleted file mode 100644
index a64ec5d3b1..0000000000
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/MockPluginManager.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.qpid.server.plugins;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.qpid.server.configuration.plugins.ConfigurationPluginFactory;
-import org.apache.qpid.server.exchange.ExchangeType;
-import org.apache.qpid.server.security.SecurityPluginFactory;
-
-public class MockPluginManager extends PluginManager
-{
- private Map<String, SecurityPluginFactory> _securityPlugins = new HashMap<String, SecurityPluginFactory>();
- private Map<List<String>, ConfigurationPluginFactory> _configPlugins = new HashMap<List<String>, ConfigurationPluginFactory>();
-
- public MockPluginManager(String pluginPath, String cachePath) throws Exception
- {
- super(pluginPath, cachePath);
- }
-
- @Override
- public Map<String, ExchangeType<?>> getExchanges()
- {
- return null;
- }
-
- @Override
- public Map<String, SecurityPluginFactory> getSecurityPlugins()
- {
- return _securityPlugins;
- }
-
- @Override
- public Map<List<String>, ConfigurationPluginFactory> getConfigurationPlugins()
- {
- return _configPlugins;
- }
-}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/OsgiSystemPackageUtilTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/OsgiSystemPackageUtilTest.java
new file mode 100644
index 0000000000..4a03445357
--- /dev/null
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/OsgiSystemPackageUtilTest.java
@@ -0,0 +1,93 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.plugins;
+
+import java.util.Map;
+import java.util.TreeMap;
+
+import org.apache.qpid.test.utils.QpidTestCase;
+import org.osgi.framework.Version;
+
+/**
+ *
+ */
+public class OsgiSystemPackageUtilTest extends QpidTestCase
+{
+ private OsgiSystemPackageUtil _util = null; // Object under test
+
+ private Map<String, String> _map = new TreeMap<String, String>(); // Use a TreeMap for unit test in order for determinstic results.
+
+ public void testWithOnePackage() throws Exception
+ {
+ _map.put("org.xyz", "1.0.0");
+
+ _util = new OsgiSystemPackageUtil(null, _map);
+
+ final String systemPackageString = _util.getFormattedSystemPackageString();
+
+ assertEquals("org.xyz; version=1.0.0", systemPackageString);
+ }
+
+ public void testWithTwoPackages() throws Exception
+ {
+ _map.put("org.xyz", "1.0.0");
+ _map.put("org.abc", "1.2.3");
+
+ _util = new OsgiSystemPackageUtil(null, _map);
+
+ final String systemPackageString = _util.getFormattedSystemPackageString();
+
+ assertEquals("org.abc; version=1.2.3, org.xyz; version=1.0.0", systemPackageString);
+ }
+
+ public void testWithNoPackages() throws Exception
+ {
+ _util = new OsgiSystemPackageUtil(null, _map);
+
+ final String systemPackageString = _util.getFormattedSystemPackageString();
+
+ assertNull(systemPackageString);
+ }
+
+ public void testWithQpidPackageWithQpidReleaseNumberSet() throws Exception
+ {
+ _map.put("org.apache.qpid.xyz", "1.0.0");
+ _map.put("org.abc", "1.2.3");
+
+ _util = new OsgiSystemPackageUtil(new Version("0.13"), _map);
+
+ final String systemPackageString = _util.getFormattedSystemPackageString();
+
+ assertEquals("org.abc; version=1.2.3, org.apache.qpid.xyz; version=0.13.0", systemPackageString);
+ }
+
+ public void testWithQpidPackageWithoutQpidReleaseNumberSet() throws Exception
+ {
+ _map.put("org.apache.qpid.xyz", "1.0.0");
+ _map.put("org.abc", "1.2.3");
+
+ _util = new OsgiSystemPackageUtil(null, _map);
+
+ final String systemPackageString = _util.getFormattedSystemPackageString();
+
+ assertEquals("org.abc; version=1.2.3, org.apache.qpid.xyz; version=1.0.0", systemPackageString);
+ }
+}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/PluginTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/PluginTest.java
index 8c18ab85b0..8c945aabfb 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/PluginTest.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/plugins/PluginTest.java
@@ -49,7 +49,7 @@ public class PluginTest extends InternalBrokerBaseCase
public void testNoExchanges() throws Exception
{
- PluginManager manager = new PluginManager("/path/to/nowhere", "/tmp");
+ PluginManager manager = new PluginManager("/path/to/nowhere", "/tmp", null);
Map<String, ExchangeType<?>> exchanges = manager.getExchanges();
assertTrue("Exchanges found", exchanges.isEmpty());
}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/InternalTestProtocolSession.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/InternalTestProtocolSession.java
index 2b724af2b1..5a411c6807 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/InternalTestProtocolSession.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/InternalTestProtocolSession.java
@@ -20,13 +20,16 @@
*/
package org.apache.qpid.server.protocol;
-import java.security.Principal;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+
+import javax.security.auth.Subject;
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.AMQShortString;
@@ -39,6 +42,7 @@ import org.apache.qpid.server.message.MessageContentSource;
import org.apache.qpid.server.output.ProtocolOutputConverter;
import org.apache.qpid.server.queue.QueueEntry;
import org.apache.qpid.server.registry.ApplicationRegistry;
+import org.apache.qpid.server.security.auth.sasl.UsernamePrincipal;
import org.apache.qpid.server.virtualhost.VirtualHost;
import org.apache.qpid.transport.TestNetworkConnection;
@@ -47,21 +51,17 @@ public class InternalTestProtocolSession extends AMQProtocolEngine implements Pr
// ChannelID(LIST) -> LinkedList<Pair>
final Map<Integer, Map<AMQShortString, LinkedList<DeliveryPair>>> _channelDelivers;
private AtomicInteger _deliveryCount = new AtomicInteger(0);
+ private static final AtomicLong ID_GENERATOR = new AtomicLong(0);
public InternalTestProtocolSession(VirtualHost virtualHost) throws AMQException
{
- super(ApplicationRegistry.getInstance().getVirtualHostRegistry(), new TestNetworkConnection());
+ super(ApplicationRegistry.getInstance().getVirtualHostRegistry(), new TestNetworkConnection(), ID_GENERATOR.getAndIncrement());
_channelDelivers = new HashMap<Integer, Map<AMQShortString, LinkedList<DeliveryPair>>>();
// Need to authenticate session for it to be representative testing.
- setAuthorizedID(new Principal()
- {
- public String getName()
- {
- return "InternalTestProtocolSession";
- }
- });
+ setAuthorizedSubject(new Subject(true, Collections.singleton(new UsernamePrincipal("InternalTestProtocolSession")),
+ Collections.EMPTY_SET, Collections.EMPTY_SET));
setVirtualHost(virtualHost);
}
@@ -196,7 +196,7 @@ public class InternalTestProtocolSession extends AMQProtocolEngine implements Pr
return _closed;
}
- public void closeProtocolSession(boolean waitLast)
+ public void closeProtocolSession()
{
// Override as we don't have a real IOSession to close.
// The alternative is to fully implement the TestIOSession to return a CloseFuture from close();
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactoryTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactoryTest.java
new file mode 100644
index 0000000000..9d76d5efca
--- /dev/null
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/protocol/MultiVersionProtocolEngineFactoryTest.java
@@ -0,0 +1,146 @@
+/*
+*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*
+*/
+package org.apache.qpid.server.protocol;
+
+import java.nio.ByteBuffer;
+import java.util.EnumSet;
+import java.util.Set;
+
+import org.apache.commons.configuration.XMLConfiguration;
+import org.apache.qpid.protocol.ServerProtocolEngine;
+import org.apache.qpid.server.configuration.ServerConfiguration;
+import org.apache.qpid.server.registry.ApplicationRegistry;
+import org.apache.qpid.server.util.TestApplicationRegistry;
+import org.apache.qpid.test.utils.QpidTestCase;
+import org.apache.qpid.transport.TestNetworkConnection;
+
+public class MultiVersionProtocolEngineFactoryTest extends QpidTestCase
+{
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+
+ //the factory needs a registry instance
+ ApplicationRegistry.initialise(new TestApplicationRegistry(new ServerConfiguration(new XMLConfiguration())));
+ }
+
+ protected void tearDown()
+ {
+ //the factory opens a registry instance
+ ApplicationRegistry.remove();
+ }
+
+ private static final byte[] AMQP_0_8_HEADER =
+ new byte[] { (byte) 'A',
+ (byte) 'M',
+ (byte) 'Q',
+ (byte) 'P',
+ (byte) 1,
+ (byte) 1,
+ (byte) 8,
+ (byte) 0
+ };
+
+ private static final byte[] AMQP_0_9_HEADER =
+ new byte[] { (byte) 'A',
+ (byte) 'M',
+ (byte) 'Q',
+ (byte) 'P',
+ (byte) 1,
+ (byte) 1,
+ (byte) 0,
+ (byte) 9
+ };
+
+ private static final byte[] AMQP_0_9_1_HEADER =
+ new byte[] { (byte) 'A',
+ (byte) 'M',
+ (byte) 'Q',
+ (byte) 'P',
+ (byte) 0,
+ (byte) 0,
+ (byte) 9,
+ (byte) 1
+ };
+
+
+ private static final byte[] AMQP_0_10_HEADER =
+ new byte[] { (byte) 'A',
+ (byte) 'M',
+ (byte) 'Q',
+ (byte) 'P',
+ (byte) 1,
+ (byte) 1,
+ (byte) 0,
+ (byte) 10
+ };
+
+ private byte[] getAmqpHeader(final AmqpProtocolVersion version)
+ {
+ switch(version)
+ {
+ case v0_8:
+ return AMQP_0_8_HEADER;
+ case v0_9:
+ return AMQP_0_9_HEADER;
+ case v0_9_1:
+ return AMQP_0_9_1_HEADER;
+ case v0_10:
+ return AMQP_0_10_HEADER;
+ default:
+ fail("unknown AMQP version, appropriate header must be added for new protocol version");
+ return null;
+ }
+ }
+
+ /**
+ * Test to verify that connections established using a MultiVersionProtocolEngine are assigned
+ * IDs from a common sequence, independent of the protocol version under use.
+ */
+ public void testDifferentProtocolVersionsShareCommonIDNumberingSequence()
+ {
+ Set<AmqpProtocolVersion> versions = EnumSet.allOf(AmqpProtocolVersion.class);
+
+ MultiVersionProtocolEngineFactory factory =
+ new MultiVersionProtocolEngineFactory("localhost", versions);
+
+ //create a dummy to retrieve the 'current' ID number
+ long previousId = factory.newProtocolEngine(new TestNetworkConnection()).getConnectionId();
+
+ //create a protocol engine and send the AMQP header for all supported AMQP verisons,
+ //ensuring the ID assigned increases as expected
+ for(AmqpProtocolVersion version : versions)
+ {
+ long expectedID = previousId + 1;
+ byte[] header = getAmqpHeader(version);
+ assertNotNull("protocol header should not be null", header);
+
+ ServerProtocolEngine engine = factory.newProtocolEngine(new TestNetworkConnection());
+ assertEquals("ID did not increment as expected", expectedID, engine.getConnectionId());
+
+ //actually feed in the AMQP header for this protocol version, and ensure the ID remains consistent
+ engine.received(ByteBuffer.wrap(header));
+ assertEquals("ID was not as expected following receipt of the AMQP version header", expectedID, engine.getConnectionId());
+
+ previousId = expectedID;
+ }
+ }
+}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java
index a8bddcf6bf..47b8b7eb18 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java
@@ -20,7 +20,6 @@
*/
package org.apache.qpid.server.queue;
-import org.apache.mina.common.ByteBuffer;
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.ContentHeaderBody;
@@ -289,7 +288,7 @@ public class AMQQueueAlertTest extends InternalBrokerBaseCase
protected void configure()
{
// Increase Alert Check period
- getConfiguration().setHousekeepingExpiredMessageCheckPeriod(200);
+ getConfiguration().setHousekeepingCheckPeriod(200);
}
private void sendMessages(AMQChannel channel, long messageCount, final long size) throws AMQException
@@ -312,18 +311,14 @@ public class AMQQueueAlertTest extends InternalBrokerBaseCase
{
messages[i].addContentBodyFrame(new ContentChunk(){
- ByteBuffer _data = ByteBuffer.allocate((int)size);
-
- {
- _data.limit((int)size);
- }
+ byte[] _data = new byte[(int)size];
public int getSize()
{
return (int) size;
}
- public ByteBuffer getData()
+ public byte[] getData()
{
return _data;
}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
index 365353e734..070d105805 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
@@ -37,7 +37,6 @@ import org.apache.qpid.server.subscription.SubscriptionFactoryImpl;
import org.apache.qpid.server.protocol.InternalTestProtocolSession;
import org.apache.qpid.server.registry.ApplicationRegistry;
import org.apache.qpid.server.store.TestableMemoryMessageStore;
-import org.apache.mina.common.ByteBuffer;
import javax.management.JMException;
@@ -275,18 +274,14 @@ public class AMQQueueMBeanTest extends InternalBrokerBaseCase
msg.addContentBodyFrame(new ContentChunk()
{
- ByteBuffer _data = ByteBuffer.allocate((int)MESSAGE_SIZE);
-
- {
- _data.limit((int)MESSAGE_SIZE);
- }
+ byte[] _data = new byte[((int)MESSAGE_SIZE)];
public int getSize()
{
return (int) MESSAGE_SIZE;
}
- public ByteBuffer getData()
+ public byte[] getData()
{
return _data;
}
@@ -441,8 +436,7 @@ public class AMQQueueMBeanTest extends InternalBrokerBaseCase
getSession().getMethodRegistry()
.getProtocolVersionMethodConverter()
.convertToContentChunk(
- new ContentBody(ByteBuffer.allocate((int) MESSAGE_SIZE),
- MESSAGE_SIZE)));
+ new ContentBody(new byte[(int) MESSAGE_SIZE])));
AMQMessage m = new AMQMessage(currentMessage.getStoredMessage());
for(BaseQueue q : currentMessage.getDestinationQueues())
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java
index 888a16053c..4c31092983 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java
@@ -29,7 +29,7 @@ import org.apache.qpid.server.subscription.Subscription;
import org.apache.qpid.server.virtualhost.VirtualHost;
import org.apache.qpid.server.management.ManagedObject;
import org.apache.qpid.server.message.ServerMessage;
-import org.apache.qpid.server.security.PrincipalHolder;
+import org.apache.qpid.server.security.AuthorizationHolder;
import org.apache.qpid.server.AMQChannel;
import org.apache.qpid.server.protocol.AMQSessionModel;
import org.apache.qpid.server.binding.Binding;
@@ -48,7 +48,7 @@ public class MockAMQQueue implements AMQQueue
private AMQShortString _name;
private VirtualHost _virtualhost;
- private PrincipalHolder _principalHolder;
+ private AuthorizationHolder _authorizationHolder;
private AMQSessionModel _exclusiveOwner;
private AMQShortString _owner;
@@ -536,14 +536,14 @@ public class MockAMQQueue implements AMQQueue
return null; //To change body of implemented methods use File | Settings | File Templates.
}
- public PrincipalHolder getPrincipalHolder()
+ public AuthorizationHolder getAuthorizationHolder()
{
- return _principalHolder;
+ return _authorizationHolder;
}
- public void setPrincipalHolder(PrincipalHolder principalHolder)
+ public void setAuthorizationHolder(final AuthorizationHolder authorizationHolder)
{
- _principalHolder = principalHolder;
+ _authorizationHolder = authorizationHolder;
}
public AMQSessionModel getExclusiveOwningSession()
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockQueueEntry.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockQueueEntry.java
index a3f8f4c0d3..ab8850c18c 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockQueueEntry.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockQueueEntry.java
@@ -139,7 +139,7 @@ public class MockQueueEntry implements QueueEntry
}
- public boolean isRejectedBy(Subscription subscription)
+ public boolean isRejectedBy(long subscriptionId)
{
return false;
@@ -153,13 +153,6 @@ public class MockQueueEntry implements QueueEntry
}
- public void reject(Subscription subscription)
- {
-
-
- }
-
-
public void release()
{
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/QueueEntryImplTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/QueueEntryImplTest.java
index 0899f25cc5..d8afd8d829 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/QueueEntryImplTest.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/QueueEntryImplTest.java
@@ -26,6 +26,7 @@ import org.apache.qpid.AMQException;
import org.apache.qpid.server.message.AMQMessage;
import org.apache.qpid.server.queue.QueueEntry.EntryState;
import org.apache.qpid.server.subscription.MockSubscription;
+import org.apache.qpid.server.subscription.Subscription;
/**
* Tests for {@link QueueEntryImpl}
@@ -210,4 +211,37 @@ public class QueueEntryImplTest extends TestCase
}
return state;
}
+
+ /**
+ * Tests rejecting a queue entry records the Subscription ID
+ * for later verification by isRejectedBy(subscriptionId).
+ */
+ public void testRejectAndRejectedBy()
+ {
+ Subscription sub = new MockSubscription();
+ long subId = sub.getSubscriptionID();
+
+ assertFalse("Queue entry should not yet have been rejected by the subscription", _queueEntry.isRejectedBy(subId));
+ assertFalse("Queue entry should not yet have been acquired by a subscription", _queueEntry.isAcquired());
+
+ //acquire, reject, and release the message using the subscription
+ assertTrue("Queue entry should have been able to be acquired", _queueEntry.acquire(sub));
+ _queueEntry.reject();
+ _queueEntry.release();
+
+ //verify the rejection is recorded
+ assertTrue("Queue entry should have been rejected by the subscription", _queueEntry.isRejectedBy(subId));
+
+ //repeat rejection using a second subscription
+ Subscription sub2 = new MockSubscription();
+ long sub2Id = sub2.getSubscriptionID();
+
+ assertFalse("Queue entry should not yet have been rejected by the subscription", _queueEntry.isRejectedBy(sub2Id));
+ assertTrue("Queue entry should have been able to be acquired", _queueEntry.acquire(sub2));
+ _queueEntry.reject();
+
+ //verify it still records being rejected by both subscriptions
+ assertTrue("Queue entry should have been rejected by the subscription", _queueEntry.isRejectedBy(subId));
+ assertTrue("Queue entry should have been rejected by the subscription", _queueEntry.isRejectedBy(sub2Id));
+ }
}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java
index 0e136c523f..f4cdbbe02c 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java
@@ -107,7 +107,7 @@ public class SimpleAMQQueueTest extends InternalBrokerBaseCase
ApplicationRegistry applicationRegistry = (ApplicationRegistry)ApplicationRegistry.getInstance();
PropertiesConfiguration env = new PropertiesConfiguration();
- _virtualHost = new VirtualHostImpl(new VirtualHostConfiguration(getClass().getName(), env), _store);
+ _virtualHost = new VirtualHostImpl(ApplicationRegistry.getInstance(), new VirtualHostConfiguration(getClass().getName(), env), _store);
applicationRegistry.getVirtualHostRegistry().registerVirtualHost(_virtualHost);
_queue = (SimpleAMQQueue) AMQQueueFactory.createAMQQueueImpl(_qname, false, _owner, false, false, _virtualHost, _arguments);
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManagerTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManagerTest.java
index ade27ed62b..b10442d7db 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManagerTest.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/manager/PrincipalDatabaseAuthenticationManagerTest.java
@@ -20,6 +20,10 @@
*/
package org.apache.qpid.server.security.auth.manager;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
import java.security.Provider;
import java.security.Security;
@@ -27,8 +31,13 @@ import javax.security.auth.Subject;
import javax.security.sasl.SaslException;
import javax.security.sasl.SaslServer;
+import org.apache.commons.configuration.CompositeConfiguration;
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.commons.configuration.XMLConfiguration;
+import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin;
import org.apache.qpid.server.security.auth.AuthenticationResult;
import org.apache.qpid.server.security.auth.AuthenticationResult.AuthenticationStatus;
+import org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase;
import org.apache.qpid.server.security.auth.sasl.UsernamePrincipal;
import org.apache.qpid.server.util.InternalBrokerBaseCase;
@@ -39,8 +48,10 @@ import org.apache.qpid.server.util.InternalBrokerBaseCase;
*/
public class PrincipalDatabaseAuthenticationManagerTest extends InternalBrokerBaseCase
{
- private PrincipalDatabaseAuthenticationManager _manager = null;
-
+ private AuthenticationManager _manager = null; // Class under test
+ private String TEST_USERNAME = "guest";
+ private String TEST_PASSWORD = "guest";
+
/**
* @see org.apache.qpid.server.util.InternalBrokerBaseCase#tearDown()
*/
@@ -62,7 +73,79 @@ public class PrincipalDatabaseAuthenticationManagerTest extends InternalBrokerBa
{
super.setUp();
- _manager = new PrincipalDatabaseAuthenticationManager();
+ final String passwdFilename = createPasswordFile().getCanonicalPath();
+ final ConfigurationPlugin config = getConfig(PlainPasswordFilePrincipalDatabase.class.getName(),
+ "passwordFile", passwdFilename);
+
+ _manager = PrincipalDatabaseAuthenticationManager.FACTORY.newInstance(config);
+ }
+
+ /**
+ * Tests where the case where the config specifies a PD implementation
+ * that is not found.
+ */
+ public void testPrincipalDatabaseImplementationNotFound() throws Exception
+ {
+ try
+ {
+ _manager = PrincipalDatabaseAuthenticationManager.FACTORY.newInstance(getConfig("not.Found", null, null));
+ fail("Exception not thrown");
+ }
+ catch (ConfigurationException ce)
+ {
+ // PASS
+ }
+ }
+
+ /**
+ * Tests where the case where the config specifies a PD implementation
+ * of the wrong type.
+ */
+ public void testPrincipalDatabaseImplementationWrongType() throws Exception
+ {
+ try
+ {
+ _manager = PrincipalDatabaseAuthenticationManager.FACTORY.newInstance(getConfig(String.class.getName(), null, null)); // Not a PrincipalDatabase implementation
+ fail("Exception not thrown");
+ }
+ catch (ConfigurationException ce)
+ {
+ // PASS
+ }
+ }
+
+ /**
+ * Tests the case where a setter with the desired name cannot be found.
+ */
+ public void testPrincipalDatabaseSetterNotFound() throws Exception
+ {
+ try
+ {
+ _manager = PrincipalDatabaseAuthenticationManager.FACTORY.newInstance(getConfig(PlainPasswordFilePrincipalDatabase.class.getName(), "noMethod", "test"));
+ fail("Exception not thrown");
+ }
+ catch (ConfigurationException ce)
+ {
+ // PASS
+ }
+ }
+
+ /**
+ * QPID-1347. Make sure the exception message and stack trace is reasonable for an absent password file.
+ */
+ public void testPrincipalDatabaseThrowsSetterFileNotFound() throws Exception
+ {
+ try
+ {
+ _manager = PrincipalDatabaseAuthenticationManager.FACTORY.newInstance(getConfig(PlainPasswordFilePrincipalDatabase.class.getName(), "passwordFile", "/not/found"));
+ fail("Exception not thrown");
+ }
+ catch (ConfigurationException ce)
+ {
+ // PASS
+ assertNotNull("Expected an underlying cause", ce.getCause());
+ assertEquals(FileNotFoundException.class, ce.getCause().getClass());
+ }
}
/**
@@ -72,8 +155,8 @@ public class PrincipalDatabaseAuthenticationManagerTest extends InternalBrokerBa
{
assertNotNull(_manager.getMechanisms());
// relies on those mechanisms attached to PropertiesPrincipalDatabaseManager
- assertEquals("PLAIN CRAM-MD5", _manager.getMechanisms());
-
+ assertEquals("AMQPLAIN PLAIN CRAM-MD5", _manager.getMechanisms());
+
Provider qpidProvider = Security.getProvider(PrincipalDatabaseAuthenticationManager.PROVIDER_NAME);
assertNotNull(qpidProvider);
}
@@ -166,11 +249,11 @@ public class PrincipalDatabaseAuthenticationManagerTest extends InternalBrokerBa
*/
public void testClose() throws Exception
{
- assertEquals("PLAIN CRAM-MD5", _manager.getMechanisms());
+ assertEquals("AMQPLAIN PLAIN CRAM-MD5", _manager.getMechanisms());
assertNotNull(Security.getProvider(PrincipalDatabaseAuthenticationManager.PROVIDER_NAME));
-
+
_manager.close();
-
+
// Check provider has been removed.
assertNull(_manager.getMechanisms());
assertNull(Security.getProvider(PrincipalDatabaseAuthenticationManager.PROVIDER_NAME));
@@ -228,4 +311,48 @@ public class PrincipalDatabaseAuthenticationManagerTest extends InternalBrokerBa
}
};
}
+
+ private ConfigurationPlugin getConfig(final String clazz, final String argName, final String argValue) throws Exception
+ {
+ final ConfigurationPlugin config = new PrincipalDatabaseAuthenticationManager.PrincipalDatabaseAuthenticationManagerConfiguration();
+
+ XMLConfiguration xmlconfig = new XMLConfiguration();
+ xmlconfig.addProperty("pd-auth-manager.principal-database.class", clazz);
+
+ if (argName != null)
+ {
+ xmlconfig.addProperty("pd-auth-manager.principal-database.attributes.attribute.name", argName);
+ xmlconfig.addProperty("pd-auth-manager.principal-database.attributes.attribute.value", argValue);
+ }
+
+ // Create a CompositeConfiguration as this is what the broker uses
+ CompositeConfiguration composite = new CompositeConfiguration();
+ composite.addConfiguration(xmlconfig);
+ config.setConfiguration("security", xmlconfig);
+ return config;
+ }
+
+ private File createPasswordFile() throws Exception
+ {
+ BufferedWriter writer = null;
+ try
+ {
+ File testFile = File.createTempFile(this.getClass().getName(),"tmp");
+ testFile.deleteOnExit();
+
+ writer = new BufferedWriter(new FileWriter(testFile));
+ writer.write(TEST_USERNAME + ":" + TEST_PASSWORD);
+ writer.newLine();
+
+ return testFile;
+
+ }
+ finally
+ {
+ if (writer != null)
+ {
+ writer.close();
+ }
+ }
+ }
}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/rmi/RMIPasswordAuthenticatorTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/rmi/RMIPasswordAuthenticatorTest.java
index 0403796a46..6dc7b19d3d 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/rmi/RMIPasswordAuthenticatorTest.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/rmi/RMIPasswordAuthenticatorTest.java
@@ -29,6 +29,7 @@ import javax.security.sasl.SaslServer;
import junit.framework.TestCase;
+import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin;
import org.apache.qpid.server.security.auth.AuthenticationResult;
import org.apache.qpid.server.security.auth.AuthenticationResult.AuthenticationStatus;
import org.apache.qpid.server.security.auth.manager.AuthenticationManager;
@@ -210,6 +211,16 @@ public class RMIPasswordAuthenticatorTest extends TestCase
{
return new AuthenticationManager()
{
+ public void configure(ConfigurationPlugin config)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void initialise()
+ {
+ throw new UnsupportedOperationException();
+ }
+
public void close()
{
throw new UnsupportedOperationException();
@@ -246,5 +257,4 @@ public class RMIPasswordAuthenticatorTest extends TestCase
}
};
}
-
}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/sasl/GroupPrincipalTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/sasl/GroupPrincipalTest.java
new file mode 100644
index 0000000000..076b7c9248
--- /dev/null
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/sasl/GroupPrincipalTest.java
@@ -0,0 +1,86 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.security.auth.sasl;
+
+import junit.framework.TestCase;
+
+public class GroupPrincipalTest extends TestCase
+{
+ public void testGetName()
+ {
+ final GroupPrincipal principal = new GroupPrincipal("group");
+ assertEquals("group", principal.getName());
+ }
+
+ public void testAddRejected()
+ {
+ final GroupPrincipal principal = new GroupPrincipal("group");
+ final UsernamePrincipal user = new UsernamePrincipal("name");
+
+ try
+ {
+ principal.addMember(user);
+ fail("Exception not thrown");
+ }
+ catch (UnsupportedOperationException uso)
+ {
+ // PASS
+ }
+ }
+
+ public void testEqualitySameName()
+ {
+ final String string = "string";
+ final GroupPrincipal principal1 = new GroupPrincipal(string);
+ final GroupPrincipal principal2 = new GroupPrincipal(string);
+ assertTrue(principal1.equals(principal2));
+ }
+
+ public void testEqualityEqualName()
+ {
+ final GroupPrincipal principal1 = new GroupPrincipal(new String("string"));
+ final GroupPrincipal principal2 = new GroupPrincipal(new String("string"));
+ assertTrue(principal1.equals(principal2));
+ }
+
+ public void testInequalityDifferentGroupPrincipals()
+ {
+ GroupPrincipal principal1 = new GroupPrincipal("string1");
+ GroupPrincipal principal2 = new GroupPrincipal("string2");
+ assertFalse(principal1.equals(principal2));
+ }
+
+ public void testInequalityNonGroupPrincipal()
+ {
+ GroupPrincipal principal = new GroupPrincipal("string");
+ assertFalse(principal.equals(new UsernamePrincipal("string")));
+ }
+
+ public void testInequalityNull()
+ {
+ GroupPrincipal principal = new GroupPrincipal("string");
+ assertFalse(principal.equals(null));
+ }
+
+
+
+
+}
diff --git a/qpid/dotnet/Qpid.Codec/ProtocolCodecException.cs b/qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/sasl/TestPrincipalUtils.java
index 49678d2c11..8b9b2df5a3 100644
--- a/qpid/dotnet/Qpid.Codec/ProtocolCodecException.cs
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/security/auth/sasl/TestPrincipalUtils.java
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,32 +18,32 @@
* under the License.
*
*/
-using System;
-using System.Runtime.Serialization;
+package org.apache.qpid.server.security.auth.sasl;
+
+import java.security.Principal;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.security.auth.Subject;
-namespace Apache.Qpid.Codec
+public class TestPrincipalUtils
{
- [Serializable]
- public class ProtocolCodecException : Exception
- {
- public ProtocolCodecException() : base()
- {
- }
-
- public ProtocolCodecException(string message) : base(message)
- {
- }
-
- public ProtocolCodecException(Exception cause) : base("Codec Exception", cause)
- {
- }
- protected ProtocolCodecException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
+ /**
+ * Creates a test subject, with exactly one UsernamePrincipal and zero or more GroupPrincipals.
+ */
+ public static Subject createTestSubject(final String username, final String... groups)
+ {
+ final Set<Principal> principals = new HashSet<Principal>(1 + groups.length);
+ principals.add(new UsernamePrincipal(username));
+ for (String group : groups)
{
+ principals.add(new GroupPrincipal(group));
}
+
+ final Subject subject = new Subject(true, principals, Collections.EMPTY_SET, Collections.EMPTY_SET);
+ return subject;
}
-}
-
-
+}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/signal/SignalHandlerTaskTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/signal/SignalHandlerTaskTest.java
new file mode 100644
index 0000000000..886cb080aa
--- /dev/null
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/signal/SignalHandlerTaskTest.java
@@ -0,0 +1,118 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.signal;
+
+import java.lang.management.ManagementFactory;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.log4j.Logger;
+import org.apache.qpid.test.utils.QpidTestCase;
+
+public class SignalHandlerTaskTest extends QpidTestCase
+{
+ private static final Logger LOGGER = Logger.getLogger(SignalHandlerTaskTest.class);
+ private static final String SUN_MISC_SIGNAL_CLASS = "sun.misc.Signal";
+ private static final String SUN_MISC_SIGNAL_HANDLER_CLASS = "sun.misc.SignalHandler";
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ }
+
+ public void testSignalHandlerTask() throws Exception
+ {
+ final boolean expectedResult = classifyExpectedRegistrationResult();
+ final int pid = getPID();
+ final CountDownLatch latch = new CountDownLatch(1);
+
+ SignalHandlerTask hupReparseTask = new SignalHandlerTask()
+ {
+ public void handle()
+ {
+ latch.countDown();
+ LOGGER.info("Signal handled, latch decremented");
+ }
+ };
+
+ assertEquals("Unexpected result trying to register Signal handler",
+ expectedResult, hupReparseTask.register("HUP"));
+ LOGGER.info("Signal handler was registered");
+
+ assertEquals("unexpected count for the latch", 1, latch.getCount());
+
+ if(expectedResult)
+ {
+ //registration succeeded as expected, so now
+ //send SIGHUP and verify the handler was run
+ String cmd = "/bin/kill -SIGHUP " + pid;
+
+ LOGGER.info("Sending SIGHUP");
+ Runtime.getRuntime().exec(cmd);
+
+ assertTrue("HUP Signal was not handled in the allowed timeframe",
+ latch.await(5, TimeUnit.SECONDS));
+ }
+ }
+
+ public void testGetPlatformDescription() throws Exception
+ {
+ assertNotNull(SignalHandlerTask.getPlatformDescription());
+ }
+
+ private boolean classifyExpectedRegistrationResult()
+ {
+ String os = System.getProperty("os.name");
+ if(String.valueOf(os).toLowerCase().contains("windows"))
+ {
+ //Windows does not support SIGHUP so registration will fail
+ LOGGER.info("Running on windows, so we expect SIGHUP handler registration to fail");
+ return false;
+ }
+
+ //otherwise, if the signal handler classes are present we would expect
+ //registration to succeed
+ boolean classesPresent = true;
+ try
+ {
+ Class.forName(SUN_MISC_SIGNAL_CLASS);
+ Class.forName(SUN_MISC_SIGNAL_HANDLER_CLASS);
+ LOGGER.info("Signal handling classes were present so we expect SIGHUP handler registration to succeed");
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ classesPresent = false;
+ }
+
+ return classesPresent;
+ }
+
+ private int getPID()
+ {
+ String processName = ManagementFactory.getRuntimeMXBean().getName();
+
+ int pid = Integer.parseInt(processName.substring(0,processName.indexOf('@')));
+ LOGGER.info("PID was determined to be " + pid);
+
+ return pid;
+ }
+
+}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/subscription/SubscriptionFactoryImplTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/subscription/SubscriptionFactoryImplTest.java
new file mode 100644
index 0000000000..29f45bf7f4
--- /dev/null
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/subscription/SubscriptionFactoryImplTest.java
@@ -0,0 +1,84 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.subscription;
+
+import org.apache.qpid.common.AMQPFilterTypes;
+import org.apache.qpid.framing.AMQShortString;
+import org.apache.qpid.framing.FieldTable;
+import org.apache.qpid.server.flow.WindowCreditManager;
+import org.apache.qpid.server.protocol.ProtocolEngine_0_10;
+import org.apache.qpid.server.transport.ServerConnection;
+import org.apache.qpid.server.transport.ServerSession;
+import org.apache.qpid.server.transport.ServerSessionDelegate;
+import org.apache.qpid.server.util.InternalBrokerBaseCase;
+import org.apache.qpid.transport.Binary;
+import org.apache.qpid.transport.MessageAcceptMode;
+import org.apache.qpid.transport.MessageAcquireMode;
+import org.apache.qpid.transport.MessageFlowMode;
+import org.apache.qpid.transport.TestNetworkConnection;
+
+public class SubscriptionFactoryImplTest extends InternalBrokerBaseCase
+{
+ /**
+ * Tests that while creating Subscriptions of various types, the
+ * ID numbers assigned are allocated from a common sequence
+ * (in increasing order).
+ */
+ public void testDifferingSubscriptionTypesShareCommonIdNumberingSequence() throws Exception
+ {
+ //create a No-Ack subscription, get the first Subscription ID
+ long previousId = 0;
+ Subscription noAckSub = SubscriptionFactoryImpl.INSTANCE.createSubscription(1, getSession(), new AMQShortString("1"), false, null, false, getChannel().getCreditManager());
+ previousId = noAckSub.getSubscriptionID();
+
+ //create an ack subscription, verify the next Subscription ID is used
+ Subscription ackSub = SubscriptionFactoryImpl.INSTANCE.createSubscription(1, getSession(), new AMQShortString("1"), true, null, false, getChannel().getCreditManager());
+ assertEquals("Unexpected Subscription ID allocated", previousId + 1, ackSub.getSubscriptionID());
+ previousId = ackSub.getSubscriptionID();
+
+ //create a browser subscription
+ FieldTable filters = new FieldTable();
+ filters.put(AMQPFilterTypes.NO_CONSUME.getValue(), true);
+ Subscription browerSub = SubscriptionFactoryImpl.INSTANCE.createSubscription(1, getSession(), new AMQShortString("1"), true, null, false, getChannel().getCreditManager());
+ assertEquals("Unexpected Subscription ID allocated", previousId + 1, browerSub.getSubscriptionID());
+ previousId = browerSub.getSubscriptionID();
+
+ //create an BasicGet NoAck subscription
+ Subscription getNoAckSub = SubscriptionFactoryImpl.INSTANCE.createBasicGetNoAckSubscription(getChannel(), getSession(), new AMQShortString("1"), null, false,
+ getChannel().getCreditManager(),getChannel().getClientDeliveryMethod(), getChannel().getRecordDeliveryMethod());
+ assertEquals("Unexpected Subscription ID allocated", previousId + 1, getNoAckSub.getSubscriptionID());
+ previousId = getNoAckSub.getSubscriptionID();
+
+ //create a 0-10 subscription
+ ServerConnection conn = new ServerConnection(1);
+ ProtocolEngine_0_10 engine = new ProtocolEngine_0_10(conn, new TestNetworkConnection(), getRegistry());
+ conn.setVirtualHost(getVirtualHost());
+ conn.setConnectionConfig(engine);
+ ServerSessionDelegate sesDel = new ServerSessionDelegate();
+ Binary name = new Binary(new byte[]{new Byte("1")});
+ ServerSession session = new ServerSession(conn, sesDel, name, 0, engine);
+
+ Subscription sub_0_10 = SubscriptionFactoryImpl.INSTANCE.createSubscription(session, "1", MessageAcceptMode.EXPLICIT,
+ MessageAcquireMode.PRE_ACQUIRED, MessageFlowMode.WINDOW, new WindowCreditManager(), null, null);
+ assertEquals("Unexpected Subscription ID allocated", previousId + 1, sub_0_10.getSubscriptionID());
+ }
+
+}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/subscription/SubscriptionListTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/subscription/SubscriptionListTest.java
new file mode 100644
index 0000000000..c4d1a1e614
--- /dev/null
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/subscription/SubscriptionListTest.java
@@ -0,0 +1,429 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.subscription;
+
+import org.apache.qpid.server.subscription.SubscriptionList.SubscriptionNode;
+import org.apache.qpid.server.subscription.SubscriptionList.SubscriptionNodeIterator;
+import org.apache.qpid.test.utils.QpidTestCase;
+
+public class SubscriptionListTest extends QpidTestCase
+{
+ private SubscriptionList _subList;
+ private MockSubscription _sub1;
+ private MockSubscription _sub2;
+ private MockSubscription _sub3;
+ private SubscriptionNode _node;
+
+ protected void setUp()
+ {
+ _subList = new SubscriptionList();
+
+ _sub1 = new MockSubscription();
+ _sub2 = new MockSubscription();
+ _sub3 = new MockSubscription();
+
+ _subList.add(_sub1);
+ _subList.add(_sub2);
+ _subList.add(_sub3);
+
+ _node = _subList.getHead();
+ }
+
+ /**
+ * Test that if the first (non-head) node in the list is deleted (but is still present),
+ * it is not returned when searching through the list for the next viable node, and the
+ * subsequent viable node is returned instead.
+ */
+ public void testFindNextSkipsFirstDeletedNode()
+ {
+ assertTrue("Deleting subscription node should have succeeded",
+ getNodeForSubscription(_subList, _sub1).delete());
+
+ assertNotNull("Returned node should not be null", _node = _node.findNext());
+ assertEquals("Should have returned node for 2nd subscription", _sub2, _node.getSubscription());
+
+ assertNotNull("Returned node should not be null", _node = _node.findNext());
+ assertEquals("Should have returned node for 3rd subscription", _sub3, _node.getSubscription());
+ }
+
+ /**
+ * Test that if a central node in the list is deleted (but is still present),
+ * it is not returned when searching through the list for the next viable node,
+ * and the subsequent viable node is returned instead.
+ */
+ public void testFindNextSkipsCentralDeletedNode()
+ {
+ assertNotNull("Returned node should not be null", _node = _node.findNext());
+
+ assertTrue("Deleting subscription node should have succeeded",
+ getNodeForSubscription(_subList, _sub2).delete());
+
+ assertNotNull("Returned node should not be null", _node = _node.findNext());
+ assertEquals("Should have returned node for 3rd subscription", _sub3, _node.getSubscription());
+ }
+
+ /**
+ * Test that if the last node in the list is deleted (but is still present),
+ * it is not returned when searching through the list for the next viable node,
+ * and null is returned instead.
+ */
+ public void testFindNextSkipsLastDeletedNode()
+ {
+ assertNotNull("Returned node should not be null", _node = _node.findNext());
+ assertEquals("Should have returned node for 1st subscription", _sub1, _node.getSubscription());
+
+ assertNotNull("Returned node should not be null", _node = _node.findNext());
+ assertEquals("Should have returned node for 2nd subscription", _sub2, _node.getSubscription());
+
+ assertTrue("Deleting subscription node should have succeeded",
+ getNodeForSubscription(_subList, _sub3).delete());
+
+ assertNull("Returned node should be null", _node = _node.findNext());
+ }
+
+ /**
+ * Test that if multiple nodes in the list are deleted (but still present), they
+ * are not returned when searching through the list for the next viable node,
+ * and the subsequent viable node is returned instead.
+ */
+ public void testFindNextSkipsMultipleDeletedNode()
+ {
+ assertTrue("Deleting subscription node should have succeeded",
+ getNodeForSubscription(_subList, _sub1).delete());
+ assertTrue("Deleting subscription node should have succeeded",
+ getNodeForSubscription(_subList, _sub2).delete());
+
+ assertNotNull("Returned node should not be null", _node = _node.findNext());
+ assertEquals("Should have returned node for 3rd subscription", _sub3, _node.getSubscription());
+ }
+
+ /**
+ * Test that if a node in the list is marked 'deleted' it is still present in the list
+ * until actually removed. counter-test to verify above testing of getNext() method.
+ */
+ public void testDeletedNodeStillPresent()
+ {
+ assertTrue("Deleting subscription node should have succeeded",
+ getNodeForSubscription(_subList, _sub1).delete());
+
+ assertNotNull("Node marked deleted should still be present", getNodeForSubscription(_subList, _sub1));
+ assertEquals("All 3 nodes are still expected to be present", 3, countNodes(_subList));
+ }
+
+ /**
+ * Traverses the list nodes in a non-mutating fashion, returning the first node which matches the given
+ * Subscription, or null if none is found.
+ */
+ private SubscriptionNode getNodeForSubscription(final SubscriptionList list, final Subscription sub)
+ {
+ SubscriptionNode node = list.getHead();
+ while (node != null && node.getSubscription() != sub)
+ {
+ node = node.nextNode();
+ }
+
+ return node;
+ }
+
+ /**
+ * Counts the number of (non-head) nodes in the list.
+ */
+ private int countNodes(final SubscriptionList list)
+ {
+ SubscriptionNode node = list.getHead();
+ int count;
+ for(count = -1; node != null; count++)
+ {
+ node = node.nextNode();
+ }
+
+ return count;
+ }
+
+ /**
+ * Tests that the head is returned as expected, and isn't the node for the first subscription.
+ */
+ public void testGetHead()
+ {
+ assertNotNull("List head should be non null", _node);
+ assertNotSame("Head should not be node for first subscription",
+ _node, getNodeForSubscription(_subList, _sub1));
+ }
+
+ /**
+ * Tests that the size is returned correctly in the face of additions and removals.
+ */
+ public void testGetSize()
+ {
+ SubscriptionList subList = new SubscriptionList();
+
+ assertEquals("Unexpected size result", 0, subList.size());
+
+ Subscription sub1 = new MockSubscription();
+ Subscription sub2 = new MockSubscription();
+ Subscription sub3 = new MockSubscription();
+
+ subList.add(sub1);
+ assertEquals("Unexpected size result", 1, subList.size());
+
+ subList.add(sub2);
+ assertEquals("Unexpected size result", 2, subList.size());
+
+ subList.add(sub3);
+ assertEquals("Unexpected size result", 3, subList.size());
+
+ assertTrue("Removing subscription from list should have succeeded", subList.remove(sub1));
+ assertEquals("Unexpected size result", 2, subList.size());
+
+ assertTrue("Removing subscription from list should have succeeded", subList.remove(sub2));
+ assertEquals("Unexpected size result", 1, subList.size());
+
+ assertTrue("Removing subscription from list should have succeeded", subList.remove(sub3));
+ assertEquals("Unexpected size result", 0, subList.size());
+ }
+
+ /**
+ * Test that if the first (non-head) node in the list is removed it is no longer
+ * present in the node structure of the list at all.
+ */
+ public void testRemoveFirstNode()
+ {
+ assertNotNull("Should have been a node present for the subscription", getNodeForSubscription(_subList, _sub1));
+ assertTrue("Removing subscription node should have succeeded", _subList.remove(_sub1));
+ assertNull("Should not have been a node present for the removed subscription", getNodeForSubscription(_subList, _sub1));
+ assertEquals("Unexpected number of nodes", 2, countNodes(_subList));
+ assertNotNull("Should have been a node present for the subscription", getNodeForSubscription(_subList, _sub2));
+ assertNotNull("Should have been a node present for the subscription", getNodeForSubscription(_subList, _sub3));
+ }
+
+ /**
+ * Test that if a central node in the list is removed it is no longer
+ * present in the node structure of the list at all.
+ */
+ public void testRemoveCentralNode()
+ {
+ assertNotNull("Should have been a node present for the subscription", getNodeForSubscription(_subList, _sub2));
+ assertTrue("Removing subscription node should have succeeded", _subList.remove(_sub2));
+ assertNull("Should not have been a node present for the removed subscription", getNodeForSubscription(_subList, _sub2));
+ assertEquals("Unexpected number of nodes", 2, countNodes(_subList));
+ assertNotNull("Should have been a node present for the subscription", getNodeForSubscription(_subList, _sub1));
+ assertNotNull("Should have been a node present for the subscription", getNodeForSubscription(_subList, _sub3));
+ }
+
+ /**
+ * Test that if the subscription contained in the last node of the list is removed
+ * it is no longer present in the node structure of the list at all. However,
+ * as the last node in the structure can't actually be removed a dummy will instead
+ * be present.
+ */
+ public void testRemoveLastNode()
+ {
+ assertNotNull("Should have been a node present for the subscription", getNodeForSubscription(_subList, _sub3));
+ assertTrue("Removing subscription node should have succeeded", _subList.remove(_sub3));
+ assertNull("Should not have been a node present for the removed subscription", getNodeForSubscription(_subList, _sub3));
+
+ //We actually expect 3 nodes to remain this time, because the last node cant be removed for thread safety reasons,
+ //however a dummy final node can be used as substitute to allow removal of the subscription node.
+ assertEquals("Unexpected number of nodes", 2 + 1, countNodes(_subList));
+ assertNotNull("Should have been a node present for the subscription", getNodeForSubscription(_subList, _sub1));
+ assertNotNull("Should have been a node present for the subscription", getNodeForSubscription(_subList, _sub2));
+ }
+
+ /**
+ * Test that if the subscription not contained in the list is requested to be removed
+ * that the removal fails
+ */
+ public void testRemoveNonExistantNode()
+ {
+ Subscription sub4 = new MockSubscription();
+ assertNull("Should not have been a node present for the subscription", getNodeForSubscription(_subList, sub4));
+ assertFalse("Removing subscription node should not have succeeded", _subList.remove(sub4));
+ assertEquals("Unexpected number of nodes", 3, countNodes(_subList));
+ }
+
+ /**
+ * Test that if a subscription node which occurs later in the main list than the marked node is
+ * removed from the list after the marked node is also removed, then the marker node doesn't
+ * serve to retain the subsequent nodes in the list structure (and thus memory) despite their
+ * removal.
+ */
+ public void testDeletedMarkedNodeDoesntLeakSubsequentlyDeletedNodes()
+ {
+ //get the nodes out the list for the 1st and 3rd subscriptions
+ SubscriptionNode sub1Node = getNodeForSubscription(_subList, _sub1);
+ assertNotNull("Should have been a node present for the subscription", sub1Node);
+ SubscriptionNode sub3Node = getNodeForSubscription(_subList, _sub3);
+ assertNotNull("Should have been a node present for the subscription", sub3Node);
+
+ //mark the first subscription node
+ assertTrue("should have succeeded in updating the marked node",
+ _subList.updateMarkedNode(_subList.getMarkedNode(), sub1Node));
+
+ //remove the 1st subscription from the list
+ assertTrue("Removing subscription node should have succeeded", _subList.remove(_sub1));
+ //verify the 1st subscription is no longer the marker node (replaced by a dummy), or in the main list structure
+ assertNotSame("Unexpected marker node", sub1Node, _subList.getMarkedNode());
+ assertNull("Should not have been a node present in the list structure for the marked-but-removed sub1 node",
+ getNodeForSubscription(_subList, _sub1));
+
+ //remove the 2nd subscription from the list
+ assertTrue("Removing subscription node should have succeeded", _subList.remove(_sub2));
+
+ //verify the marker node isn't leaking subsequently removed nodes, by ensuring the very next node
+ //in its list structure is now the 3rd subscription (since the 2nd was removed too)
+ assertEquals("Unexpected next node", sub3Node, _subList.getMarkedNode().nextNode());
+
+ //remove the 3rd and final/tail subscription
+ assertTrue("Removing subscription node should have succeeded", _subList.remove(_sub3));
+
+ //verify the marker node isn't leaking subsequently removed nodes, by ensuring the very next node
+ //in its list structure is now the dummy tail (since the 3rd subscription was removed, and a dummy
+ //tail was inserted) and NOT the 3rd sub node.
+ assertNotSame("Unexpected next node", sub3Node, _subList.getMarkedNode().nextNode());
+ assertTrue("Unexpected next node", _subList.getMarkedNode().nextNode().isDeleted());
+ assertNull("Next non-deleted node from the marker should now be the list end, i.e. null", _subList.getMarkedNode().findNext());
+ }
+
+ /**
+ * Test that the marked node 'findNext' behaviour is as expected after a subscription is added
+ * to the list following the tail subscription node being removed while it is the marked node.
+ * That is, that the new subscriptions node is returned by getMarkedNode().findNext().
+ */
+ public void testMarkedNodeFindsNewSubscriptionAfterRemovingTailWhilstMarked()
+ {
+ //get the node out the list for the 3rd subscription
+ SubscriptionNode sub3Node = getNodeForSubscription(_subList, _sub3);
+ assertNotNull("Should have been a node present for the subscription", sub3Node);
+
+ //mark the 3rd subscription node
+ assertTrue("should have succeeded in updating the marked node",
+ _subList.updateMarkedNode(_subList.getMarkedNode(), sub3Node));
+
+ //verify calling findNext on the marked node returns null, i.e. the end of the list has been reached
+ assertEquals("Unexpected node after marked node", null, _subList.getMarkedNode().findNext());
+
+ //remove the 3rd(marked) subscription from the list
+ assertTrue("Removing subscription node should have succeeded", _subList.remove(_sub3));
+
+ //add a new 4th subscription to the list
+ Subscription sub4 = new MockSubscription();
+ _subList.add(sub4);
+
+ //get the node out the list for the 4th subscription
+ SubscriptionNode sub4Node = getNodeForSubscription(_subList, sub4);
+ assertNotNull("Should have been a node present for the subscription", sub4Node);
+
+ //verify the marked node (which is now a dummy substitute for the 3rd subscription) returns
+ //the 4th subscriptions node as the next non-deleted node.
+ assertEquals("Unexpected next node", sub4Node, _subList.getMarkedNode().findNext());
+ }
+
+ /**
+ * Test that setting the marked node to null doesn't cause problems during remove operations
+ */
+ public void testRemoveWithNullMarkedNode()
+ {
+ //set the marker to null
+ assertTrue("should have succeeded in updating the marked node",
+ _subList.updateMarkedNode(_subList.getMarkedNode(), null));
+
+ //remove the 1st subscription from the main list
+ assertTrue("Removing subscription node should have succeeded", _subList.remove(_sub1));
+
+ //verify the 1st subscription is no longer in the main list structure
+ assertNull("Should not have been a node present in the main list structure for sub1",
+ getNodeForSubscription(_subList, _sub1));
+ assertEquals("Unexpected number of nodes", 2, countNodes(_subList));
+ }
+
+ /**
+ * Tests that after the first (non-head) node of the list is marked deleted but has not
+ * yet been removed, the iterator still skips it.
+ */
+ public void testIteratorSkipsFirstDeletedNode()
+ {
+ //'delete' but dont remove the node for the 1st subscription
+ assertTrue("Deleting subscription node should have succeeded",
+ getNodeForSubscription(_subList, _sub1).delete());
+ assertNotNull("Should still have been a node present for the deleted subscription",
+ getNodeForSubscription(_subList, _sub1));
+
+ SubscriptionNodeIterator iter = _subList.iterator();
+
+ //verify the iterator returns the 2nd subscriptions node
+ assertTrue("Iterator should have been able to advance", iter.advance());
+ assertEquals("Iterator returned unexpected SubscriptionNode", _sub2, iter.getNode().getSubscription());
+
+ //verify the iterator returns the 3rd subscriptions node and not the 2nd.
+ assertTrue("Iterator should have been able to advance", iter.advance());
+ assertEquals("Iterator returned unexpected SubscriptionNode", _sub3, iter.getNode().getSubscription());
+ }
+
+ /**
+ * Tests that after a central node of the list is marked deleted but has not yet been removed,
+ * the iterator still skips it.
+ */
+ public void testIteratorSkipsCentralDeletedNode()
+ {
+ //'delete' but dont remove the node for the 2nd subscription
+ assertTrue("Deleting subscription node should have succeeded",
+ getNodeForSubscription(_subList, _sub2).delete());
+ assertNotNull("Should still have been a node present for the deleted subscription",
+ getNodeForSubscription(_subList, _sub2));
+
+ SubscriptionNodeIterator iter = _subList.iterator();
+
+ //verify the iterator returns the 1st subscriptions node
+ assertTrue("Iterator should have been able to advance", iter.advance());
+ assertEquals("Iterator returned unexpected SubscriptionNode", _sub1, iter.getNode().getSubscription());
+
+ //verify the iterator returns the 3rd subscriptions node and not the 2nd.
+ assertTrue("Iterator should have been able to advance", iter.advance());
+ assertEquals("Iterator returned unexpected SubscriptionNode", _sub3, iter.getNode().getSubscription());
+ }
+
+ /**
+ * Tests that after the last node of the list is marked deleted but has not yet been removed,
+ * the iterator still skips it.
+ */
+ public void testIteratorSkipsDeletedFinalNode()
+ {
+ //'delete' but dont remove the node for the 3rd subscription
+ assertTrue("Deleting subscription node should have succeeded",
+ getNodeForSubscription(_subList, _sub3).delete());
+ assertNotNull("Should still have been a node present for the deleted 3rd subscription",
+ getNodeForSubscription(_subList, _sub3));
+
+ SubscriptionNodeIterator iter = _subList.iterator();
+
+ //verify the iterator returns the 1st subscriptions node
+ assertTrue("Iterator should have been able to advance", iter.advance());
+ assertEquals("Iterator returned unexpected SubscriptionNode", _sub1, iter.getNode().getSubscription());
+
+ //verify the iterator returns the 2nd subscriptions node
+ assertTrue("Iterator should have been able to advance", iter.advance());
+ assertEquals("Iterator returned unexpected SubscriptionNode", _sub2, iter.getNode().getSubscription());
+
+ //verify the iterator can no longer advance and does not return a subscription node
+ assertFalse("Iterator should not have been able to advance", iter.advance());
+ assertEquals("Iterator returned unexpected SubscriptionNode", null, iter.getNode());
+ }
+}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java
index ff94942457..a97134a58d 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java
@@ -44,14 +44,13 @@ import org.apache.qpid.server.store.MessageStore;
import org.apache.qpid.server.store.TestableMemoryMessageStore;
import org.apache.qpid.server.virtualhost.VirtualHost;
import org.apache.qpid.test.utils.QpidTestCase;
-import org.apache.qpid.util.MockChannel;
public class InternalBrokerBaseCase extends QpidTestCase
{
private IApplicationRegistry _registry;
private MessageStore _messageStore;
- private MockChannel _channel;
+ private AMQChannel _channel;
private InternalTestProtocolSession _session;
private VirtualHost _virtualHost;
private AMQQueue _queue;
@@ -111,7 +110,7 @@ public class InternalBrokerBaseCase extends QpidTestCase
_session = new InternalTestProtocolSession(_virtualHost);
CurrentActor.set(_session.getLogActor());
- _channel = new MockChannel(_session, 1, _messageStore);
+ _channel = new AMQChannel(_session, 1, _messageStore);
_session.addChannel(_channel);
}
@@ -283,12 +282,12 @@ public class InternalBrokerBaseCase extends QpidTestCase
_messageStore = messageStore;
}
- public MockChannel getChannel()
+ public AMQChannel getChannel()
{
return _channel;
}
- public void setChannel(MockChannel channel)
+ public void setChannel(AMQChannel channel)
{
_channel = channel;
}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/util/TestApplicationRegistry.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/util/TestApplicationRegistry.java
index 31b4c20042..3c6857e8a9 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/server/util/TestApplicationRegistry.java
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/util/TestApplicationRegistry.java
@@ -20,15 +20,19 @@
*/
package org.apache.qpid.server.util;
+import java.util.Properties;
+
import org.apache.commons.configuration.ConfigurationException;
import org.apache.qpid.server.configuration.ServerConfiguration;
import org.apache.qpid.server.logging.NullRootMessageLogger;
import org.apache.qpid.server.logging.actors.BrokerActor;
import org.apache.qpid.server.logging.actors.CurrentActor;
+import org.apache.qpid.server.logging.actors.GenericActor;
+import org.apache.qpid.server.configuration.plugins.ConfigurationPlugin;
import org.apache.qpid.server.registry.ApplicationRegistry;
-import org.apache.qpid.server.security.auth.database.PropertiesPrincipalDatabaseManager;
-
-import java.util.Properties;
+import org.apache.qpid.server.security.auth.database.PropertiesPrincipalDatabase;
+import org.apache.qpid.server.security.auth.manager.AuthenticationManager;
+import org.apache.qpid.server.security.auth.manager.PrincipalDatabaseAuthenticationManager;
public class TestApplicationRegistry extends ApplicationRegistry
{
@@ -42,15 +46,46 @@ public class TestApplicationRegistry extends ApplicationRegistry
public void initialise() throws Exception
{
CurrentActor.setDefault(new BrokerActor(new NullRootMessageLogger()));
+ GenericActor.setDefaultMessageLogger(new NullRootMessageLogger());
super.initialise();
}
- protected void createDatabaseManager(ServerConfiguration configuration) throws Exception
+ /**
+ * @see org.apache.qpid.server.registry.ApplicationRegistry#createAuthenticationManager()
+ */
+ @Override
+ protected AuthenticationManager createAuthenticationManager() throws ConfigurationException
{
- Properties users = new Properties();
+ final Properties users = new Properties();
users.put("guest","guest");
users.put("admin","admin");
- _databaseManager = new PropertiesPrincipalDatabaseManager("testPasswordFile", users);
+
+ final PropertiesPrincipalDatabase ppd = new PropertiesPrincipalDatabase(users);
+
+ AuthenticationManager pdam = new PrincipalDatabaseAuthenticationManager()
+ {
+
+ /**
+ * @see org.apache.qpid.server.security.auth.manager.PrincipalDatabaseAuthenticationManager#configure(org.apache.qpid.server.configuration.plugins.ConfigurationPlugin)
+ */
+ @Override
+ public void configure(ConfigurationPlugin config) throws ConfigurationException
+ {
+ // We don't pass configuration to this test instance.
+ }
+
+ @Override
+ public void initialise()
+ {
+ setPrincipalDatabase(ppd);
+
+ super.initialise();
+ }
+ };
+
+ pdam.initialise();
+
+ return pdam;
}
}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/virtualhost/VirtualHostImplTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/virtualhost/VirtualHostImplTest.java
new file mode 100644
index 0000000000..c87e5a1648
--- /dev/null
+++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/virtualhost/VirtualHostImplTest.java
@@ -0,0 +1,214 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.server.virtualhost;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.commons.configuration.XMLConfiguration;
+import org.apache.qpid.server.configuration.ServerConfiguration;
+import org.apache.qpid.server.exchange.Exchange;
+import org.apache.qpid.server.queue.AMQQueue;
+import org.apache.qpid.server.registry.ApplicationRegistry;
+import org.apache.qpid.server.store.TestableMemoryMessageStore;
+import org.apache.qpid.server.util.TestApplicationRegistry;
+import org.apache.qpid.test.utils.QpidTestCase;
+
+public class VirtualHostImplTest extends QpidTestCase
+{
+ private ServerConfiguration _configuration;
+ private ApplicationRegistry _registry;
+
+ @Override
+ public void tearDown() throws Exception
+ {
+ super.tearDown();
+
+ ApplicationRegistry.remove();
+ }
+
+ /**
+ * Tests that custom routing keys for the queue specified in the configuration
+ * file are correctly bound to the exchange (in addition to the queue name)
+ */
+ public void testSpecifyingCustomBindings() throws Exception
+ {
+ customBindingTestImpl(new String[]{"custom1","custom2"});
+ }
+
+ /**
+ * Tests that a queue specified in the configuration file to be bound to a
+ * specified(non-default) direct exchange is a correctly bound to the exchange
+ * and the default exchange using the queue name.
+ */
+ public void testQueueSpecifiedInConfigurationIsBoundToDefaultExchange() throws Exception
+ {
+ customBindingTestImpl(new String[0]);
+ }
+
+ private void customBindingTestImpl(final String[] routingKeys) throws Exception
+ {
+ String exchangeName = getName() +".direct";
+ String vhostName = getName();
+ String queueName = getName();
+
+ File config = writeConfigFile(vhostName, queueName, exchangeName, false, routingKeys);
+ VirtualHost vhost = createVirtualHost(vhostName, config);
+ assertNotNull("virtualhost should exist", vhost);
+
+ AMQQueue queue = vhost.getQueueRegistry().getQueue(queueName);
+ assertNotNull("queue should exist", queue);
+
+ Exchange defaultExch = vhost.getExchangeRegistry().getDefaultExchange();
+ assertTrue("queue should have been bound to default exchange with its name", defaultExch.isBound(queueName, queue));
+
+ Exchange exch = vhost.getExchangeRegistry().getExchange(exchangeName);
+ assertTrue("queue should have been bound to " + exchangeName + " with its name", exch.isBound(queueName, queue));
+
+ for(String key: routingKeys)
+ {
+ assertTrue("queue should have been bound to " + exchangeName + " with key " + key, exch.isBound(key, queue));
+ }
+ }
+
+ /**
+ * Tests that specifying custom routing keys for a queue in the configuration file results in failure
+ * to create the vhost (since this is illegal, only queue names are used with the default exchange)
+ */
+ public void testSpecifyingCustomBindingForDefaultExchangeThrowsException() throws Exception
+ {
+ File config = writeConfigFile(getName(), getName(), null, false, new String[]{"custom-binding"});
+
+ try
+ {
+ createVirtualHost(getName(), config);
+ fail("virtualhost creation should have failed due to illegal configuration");
+ }
+ catch (ConfigurationException e)
+ {
+ //expected
+ }
+ }
+
+ /**
+ * Tests that specifying an unknown exchange to bind the queue to results in failure to create the vhost
+ */
+ public void testSpecifyingUnknownExchangeThrowsException() throws Exception
+ {
+ File config = writeConfigFile(getName(), getName(), "made-up-exchange", true, new String[0]);
+
+ try
+ {
+ createVirtualHost(getName(), config);
+ fail("virtualhost creation should have failed due to illegal configuration");
+ }
+ catch (ConfigurationException e)
+ {
+ //expected
+ }
+ }
+
+ private VirtualHost createVirtualHost(String vhostName, File config) throws Exception
+ {
+ _configuration = new ServerConfiguration(new XMLConfiguration(config));
+
+ _registry = new TestApplicationRegistry(_configuration);
+ ApplicationRegistry.initialise(_registry);
+
+ return _registry.getVirtualHostRegistry().getVirtualHost(vhostName);
+ }
+
+ /**
+ * Create a configuration file for testing virtualhost creation
+ *
+ * @param vhostName name of the virtualhost
+ * @param queueName name of the queue
+ * @param exchangeName name of a direct exchange to declare (unless dontDeclare = true) and bind the queue to (null = none)
+ * @param dontDeclare if true then dont declare the exchange, even if its name is non-null
+ * @param routingKeys routingKeys to bind the queue with (empty array = none)
+ * @return
+ */
+ private File writeConfigFile(String vhostName, String queueName, String exchangeName, boolean dontDeclare, String[] routingKeys)
+ {
+ File tmpFile = null;
+ try
+ {
+ tmpFile = File.createTempFile(getName(), ".tmp");
+ tmpFile.deleteOnExit();
+
+ FileWriter fstream = new FileWriter(tmpFile);
+ BufferedWriter writer = new BufferedWriter(fstream);
+
+ //extra outer tag to please Commons Configuration
+ writer.write("<configuration>");
+
+ writer.write("<virtualhosts>");
+ writer.write(" <default>" + vhostName + "</default>");
+ writer.write(" <virtualhost>");
+ writer.write(" <store>");
+ writer.write(" <class>" + TestableMemoryMessageStore.class.getName() + "</class>");
+ writer.write(" </store>");
+ writer.write(" <name>" + vhostName + "</name>");
+ writer.write(" <" + vhostName + ">");
+ if(exchangeName != null && !dontDeclare)
+ {
+ writer.write(" <exchanges>");
+ writer.write(" <exchange>");
+ writer.write(" <type>direct</type>");
+ writer.write(" <name>" + exchangeName + "</name>");
+ writer.write(" </exchange>");
+ writer.write(" </exchanges>");
+ }
+ writer.write(" <queues>");
+ writer.write(" <queue>");
+ writer.write(" <name>" + queueName + "</name>");
+ writer.write(" <" + queueName + ">");
+ if(exchangeName != null)
+ {
+ writer.write(" <exchange>" + exchangeName + "</exchange>");
+ }
+ for(String routingKey: routingKeys)
+ {
+ writer.write(" <routingKey>" + routingKey + "</routingKey>");
+ }
+ writer.write(" </" + queueName + ">");
+ writer.write(" </queue>");
+ writer.write(" </queues>");
+ writer.write(" </" + vhostName + ">");
+ writer.write(" </virtualhost>");
+ writer.write("</virtualhosts>");
+
+ writer.write("</configuration>");
+
+ writer.flush();
+ writer.close();
+ }
+ catch (IOException e)
+ {
+ fail("Unable to create virtualhost configuration");
+ }
+
+ return tmpFile;
+ }
+}
diff --git a/qpid/java/build.deps b/qpid/java/build.deps
index 73c35940cb..2c56a4a911 100644
--- a/qpid/java/build.deps
+++ b/qpid/java/build.deps
@@ -17,8 +17,6 @@
# under the License.
#
-backport-util-concurrent=lib/backport-util-concurrent-2.2.jar
-
commons-beanutils-core=lib/commons-beanutils-core-1.8.0.jar
commons-cli=lib/commons-cli-1.0.jar
commons-codec=lib/commons-codec-1.3.jar
@@ -36,9 +34,6 @@ junit=lib/junit-3.8.1.jar
log4j=lib/log4j-1.2.12.jar
-mina-core=lib/mina-core-1.0.1.jar
-mina-filter-ssl=lib/mina-filter-ssl-1.0.1.jar
-
slf4j-api=lib/slf4j-api-1.6.1.jar
slf4j-log4j=lib/slf4j-log4j12-1.6.1.jar
@@ -57,7 +52,7 @@ felix.libs=${osgi-core} ${felix-framework}
commons-configuration.libs = ${commons-beanutils-core} ${commons-digester} \
${commons-codec} ${commons-lang} ${commons-collections} ${commons-configuration}
-common.libs=${slf4j-api} ${backport-util-concurrent} ${mina-core} ${mina-filter-ssl}
+common.libs=${slf4j-api}
client.libs=${geronimo-jms}
tools.libs=${commons-configuration.libs} ${log4j}
broker.libs=${commons-cli} ${commons-logging} ${log4j} ${slf4j-log4j} \
@@ -105,30 +100,27 @@ ecl-equinox-launcher-solaris-gtk-sparc=lib/org.eclipse.equinox.launcher.gtk.sola
management-common.libs=
+management-eclipse-plugin.core-libs=${ibm-icu} ${ecl-core-jface} ${ecl-core-jface-databinding} \
+ ${ecl-core-commands} ${ecl-core-contenttype} ${ecl-core-databinding} ${ecl-core-expressions} \
+ ${ecl-core-jobs} ${ecl-core-runtime} ${ecl-equinox-app} ${ecl-equinox-common} ${ecl-equinox-launcher} \
+ ${ecl-equinox-prefs} ${ecl-equinox-registry} ${ecl-help} ${ecl-osgi} ${ecl-swt} ${ecl-ui} ${ecl-ui-forms} \
+ ${ecl-ui-workbench} ${apache-commons-codec}
+
+management-eclipse-plugin.swt-libs=${ecl-swt-win32-win32-x86} ${ecl-swt-linux-gtk-x86} ${ecl-swt-macosx-carbon} \
+ ${ecl-swt-linux-gtk-x86_64} ${ecl-swt-solaris-gtk-sparc}
+
+management-eclipse-plugin.libs=${management-eclipse-plugin.core-libs} ${management-eclipse-plugin.swt-libs}
+
management-eclipse-plugin-win32-win32-x86.libs=${management-eclipse-plugin.core-libs} \
- ${ecl-swt-win32-win32-x86} ${ecl-equinox-launcher-win32-win32-x86}
+ ${ecl-swt-win32-win32-x86} ${ecl-equinox-launcher-win32-win32-x86} ${ecl-core-runtime-compat-registry}
management-eclipse-plugin-linux-gtk-x86.libs=${management-eclipse-plugin.core-libs} \
- ${ecl-swt-linux-gtk-x86} ${ecl-equinox-launcher-linux-gtk-x86}
+ ${ecl-swt-linux-gtk-x86} ${ecl-equinox-launcher-linux-gtk-x86} ${ecl-core-runtime-compat-registry}
management-eclipse-plugin-linux-gtk-x86_64.libs=${management-eclipse-plugin.core-libs} \
- ${ecl-swt-linux-gtk-x86_64} ${ecl-equinox-launcher-linux-gtk-x86_64}
+ ${ecl-swt-linux-gtk-x86_64} ${ecl-equinox-launcher-linux-gtk-x86_64} ${ecl-core-runtime-compat-registry}
management-eclipse-plugin-macosx.libs=${management-eclipse-plugin.core-libs} \
- ${ecl-swt-macosx-carbon} ${ecl-equinox-launcher-macosx-carbon}
+ ${ecl-swt-macosx-carbon} ${ecl-equinox-launcher-macosx-carbon} ${ecl-core-runtime-compat-registry}
management-eclipse-plugin-solaris-gtk-sparc.libs=${management-eclipse-plugin.core-libs} \
- ${ecl-swt-solaris-gtk-sparc} ${ecl-equinox-launcher-solaris-gtk-sparc}
-
-management-eclipse-plugin.core-libs=${ibm-icu} ${ecl-core-jface} ${ecl-core-jface-databinding} \
- ${ecl-core-commands} ${ecl-core-contenttype} ${ecl-core-databinding} ${ecl-core-expressions} \
- ${ecl-core-jobs} ${ecl-core-runtime} ${ecl-core-runtime-compat-registry} ${ecl-equinox-app} \
- ${ecl-equinox-common} ${ecl-equinox-launcher} ${ecl-equinox-prefs} ${ecl-equinox-registry} \
- ${ecl-help} ${ecl-osgi} ${ecl-swt} ${ecl-ui} ${ecl-ui-forms} ${ecl-ui-workbench} ${apache-commons-codec}
-
-management-eclipse-plugin.platform-libs=${ecl-equinox-launcher-win32-win32-x86} \
- ${ecl-equinox-launcher-linux-gtk-x86} ${ecl-equinox-launcher-macosx-carbon} \
- ${ecl-swt-win32-win32-x86} ${ecl-swt-linux-gtk-x86} ${ecl-swt-macosx-carbon} \
- ${ecl-swt-linux-gtk-x86_64} ${ecl-equinox-launcher-linux-gtk-x86_64} \
- ${ecl-swt-solaris-gtk-sparc} ${ecl-equinox-launcher-solaris-gtk-sparc}
-
-management-eclipse-plugin.libs=${management-eclipse-plugin.core-libs} ${management-eclipse-plugin.platform-libs}
+ ${ecl-swt-solaris-gtk-sparc} ${ecl-equinox-launcher-solaris-gtk-sparc} ${ecl-core-runtime-compat-registry}
common.test.libs=${test.libs}
broker.test.libs=${test.libs}
@@ -141,5 +133,5 @@ systests.libs=${test.libs}
broker-plugins.test.libs=${test.libs}
broker-plugins-experimental-info.test.libs=${test.libs} ${servlet-api} ${jetty} ${jetty-util} ${jetty-servlet-tester}
-management-eclipse-plugin.test.libs=${systests.libs}
+management-eclipse-plugin.test.libs=${test.libs}
management-common.test.libs=${test.libs}
diff --git a/qpid/java/build.xml b/qpid/java/build.xml
index 8651404cb7..84baa4237e 100644
--- a/qpid/java/build.xml
+++ b/qpid/java/build.xml
@@ -22,15 +22,15 @@
<import file="common.xml"/>
-
<findSubProjects name="broker-plugins" dir="broker-plugins"/>
+ <findSubProjects name="client-plugins" dir="client-plugins"/>
<findSubProjects name="management" dir="management" excludes="common,example"/>
<property name="modules.core" value="junit-toolkit common management/common broker client tools"/>
<property name="modules.examples" value="client/example management/example"/>
<property name="modules.tests" value="systests perftests integrationtests testkit"/>
<property name="modules.management" value="${management}"/>
- <property name="modules.plugin" value="${broker-plugins}"/>
+ <property name="modules.plugin" value="${broker-plugins} ${client-plugins}"/>
<property name="modules" value="${modules.core} ${modules.examples}
${modules.management} ${modules.tests} ${modules.plugin}"/>
@@ -77,7 +77,7 @@
<iterate target="compile-tests"/>
</target>
- <target name="test" description="execute tests">
+ <target name="test" description="execute tests" depends="manifest">
<delete file="${build.failed}"/>
diff --git a/qpid/java/client-plugins/.gitignore b/qpid/java/client-plugins/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/qpid/java/client-plugins/.gitignore
diff --git a/qpid/java/tools/bin/run_pub.sh b/qpid/java/client-plugins/README.txt
index 91b9287dea..64884f27a2 100644
--- a/qpid/java/tools/bin/run_pub.sh
+++ b/qpid/java/client-plugins/README.txt
@@ -1,4 +1,3 @@
-#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -18,7 +17,5 @@
# under the License.
#
-. $QPID_TEST_HOME/bin/setenv.sh
-
-echo "$@"
-$JAVA_HOME/bin/java -cp $CLASSPATH $@ org.apache.qpid.tools.PerfProducer
+Placeholder directory to allow for the building of client side optional modules such as transports or custom SASL modules etc. Analogous to
+broker-plugins.
diff --git a/qpid/java/client/README.txt b/qpid/java/client/README.txt
index 57a98cc978..b9cde71db3 100644
--- a/qpid/java/client/README.txt
+++ b/qpid/java/client/README.txt
@@ -24,7 +24,7 @@ run more easily.
E.g, in order to run the Hello example, you would add the client+example library
files to the java classpath and launch the example like follows:
-java -cp "lib/qpid-all.jar:example/lib/qpid-client-examples-<version>.jar" \
+java -cp "lib/qpid-all.jar:example/lib/qpid-client-example-<version>.jar" \
org.apache.qpid.example.Hello
NOTE: The client uses the SL4FJ API for its logging. You must supply a logging
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
index c8576bf00d..c0d4d8a893 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQBrokerDetails.java
@@ -26,7 +26,7 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.qpid.jms.BrokerDetails;
-import org.apache.qpid.jms.ConnectionURL;
+import org.apache.qpid.transport.ConnectionSettings;
import org.apache.qpid.url.URLHelper;
import org.apache.qpid.url.URLSyntaxException;
@@ -38,8 +38,6 @@ public class AMQBrokerDetails implements BrokerDetails
private Map<String, String> _options = new HashMap<String, String>();
- private SSLConfiguration _sslConfiguration;
-
public AMQBrokerDetails(){}
public AMQBrokerDetails(String url) throws URLSyntaxException
@@ -200,11 +198,10 @@ public class AMQBrokerDetails implements BrokerDetails
}
}
- public AMQBrokerDetails(String host, int port, SSLConfiguration sslConfiguration)
+ public AMQBrokerDetails(String host, int port)
{
_host = host;
_port = port;
- _sslConfiguration = sslConfiguration;
}
public String getHost()
@@ -280,16 +277,6 @@ public class AMQBrokerDetails implements BrokerDetails
setProperty(OPTIONS_CONNECT_TIMEOUT, Long.toString(timeout));
}
- public SSLConfiguration getSSLConfiguration()
- {
- return _sslConfiguration;
- }
-
- public void setSSLConfiguration(SSLConfiguration sslConfig)
- {
- _sslConfiguration = sslConfig;
- }
-
public String toString()
{
StringBuffer sb = new StringBuffer();
@@ -316,9 +303,8 @@ public class AMQBrokerDetails implements BrokerDetails
return _host.equalsIgnoreCase(bd.getHost()) &&
(_port == bd.getPort()) &&
- _transport.equalsIgnoreCase(bd.getTransport()) &&
- compareSSLConfigurations(bd.getSSLConfiguration());
- //todo do we need to compare all the options as well?
+ _transport.equalsIgnoreCase(bd.getTransport());
+ //TODO do we need to compare all the options as well?
}
@Override
@@ -359,24 +345,6 @@ public class AMQBrokerDetails implements BrokerDetails
return optionsURL.toString();
}
- // Do we need to do a more in-depth comparison?
- private boolean compareSSLConfigurations(SSLConfiguration other)
- {
- boolean retval = false;
- if (_sslConfiguration == null &&
- other == null)
- {
- retval = true;
- }
- else if (_sslConfiguration != null &&
- other != null)
- {
- retval = true;
- }
-
- return retval;
- }
-
public static String checkTransport(String broker)
{
if ((!broker.contains("://")))
@@ -398,4 +366,82 @@ public class AMQBrokerDetails implements BrokerDetails
{
_options = props;
}
+
+ public ConnectionSettings buildConnectionSettings()
+ {
+ ConnectionSettings conSettings = new ConnectionSettings();
+
+ conSettings.setHost(getHost());
+ conSettings.setPort(getPort());
+
+ // ------------ sasl options ---------------
+ if (getProperty(BrokerDetails.OPTIONS_SASL_MECHS) != null)
+ {
+ conSettings.setSaslMechs(
+ getProperty(BrokerDetails.OPTIONS_SASL_MECHS));
+ }
+
+ // Sun SASL Kerberos client uses the
+ // protocol + servername as the service key.
+
+ if (getProperty(BrokerDetails.OPTIONS_SASL_PROTOCOL_NAME) != null)
+ {
+ conSettings.setSaslProtocol(
+ getProperty(BrokerDetails.OPTIONS_SASL_PROTOCOL_NAME));
+ }
+
+
+ if (getProperty(BrokerDetails.OPTIONS_SASL_SERVER_NAME) != null)
+ {
+ conSettings.setSaslServerName(
+ getProperty(BrokerDetails.OPTIONS_SASL_SERVER_NAME));
+ }
+
+ conSettings.setUseSASLEncryption(
+ getBooleanProperty(BrokerDetails.OPTIONS_SASL_ENCRYPTION));
+
+ // ------------- ssl options ---------------------
+ conSettings.setUseSSL(getBooleanProperty(BrokerDetails.OPTIONS_SSL));
+
+ if (getProperty(BrokerDetails.OPTIONS_TRUST_STORE) != null)
+ {
+ conSettings.setTrustStorePath(
+ getProperty(BrokerDetails.OPTIONS_TRUST_STORE));
+ }
+
+ if (getProperty(BrokerDetails.OPTIONS_TRUST_STORE_PASSWORD) != null)
+ {
+ conSettings.setTrustStorePassword(
+ getProperty(BrokerDetails.OPTIONS_TRUST_STORE_PASSWORD));
+ }
+
+ if (getProperty(BrokerDetails.OPTIONS_KEY_STORE) != null)
+ {
+ conSettings.setKeyStorePath(
+ getProperty(BrokerDetails.OPTIONS_KEY_STORE));
+ }
+
+ if (getProperty(BrokerDetails.OPTIONS_KEY_STORE_PASSWORD) != null)
+ {
+ conSettings.setKeyStorePassword(
+ getProperty(BrokerDetails.OPTIONS_KEY_STORE_PASSWORD));
+ }
+
+ if (getProperty(BrokerDetails.OPTIONS_SSL_CERT_ALIAS) != null)
+ {
+ conSettings.setCertAlias(
+ getProperty(BrokerDetails.OPTIONS_SSL_CERT_ALIAS));
+ }
+ // ----------------------------
+
+ conSettings.setVerifyHostname(getBooleanProperty(BrokerDetails.OPTIONS_SSL_VERIFY_HOSTNAME));
+
+ if (getProperty(BrokerDetails.OPTIONS_TCP_NO_DELAY) != null)
+ {
+ conSettings.setTcpNodelay(
+ getBooleanProperty(BrokerDetails.OPTIONS_TCP_NO_DELAY));
+ }
+
+ return conSettings;
+ }
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
index 5b6a986997..f15af72407 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnection.java
@@ -147,9 +147,6 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
*/
private QpidConnectionMetaData _connectionMetaData;
- /** Configuration info for SSL */
- private SSLConfiguration _sslConfiguration;
-
private AMQShortString _defaultTopicExchangeName = ExchangeDefaults.TOPIC_EXCHANGE_NAME;
private AMQShortString _defaultQueueExchangeName = ExchangeDefaults.DIRECT_EXCHANGE_NAME;
private AMQShortString _temporaryTopicExchangeName = ExchangeDefaults.TOPIC_EXCHANGE_NAME;
@@ -173,8 +170,8 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
//Indicates the sync publish options (persistent|all)
//By default it's async publish
private String _syncPublish = "";
-
- // Indicates whether to use the old map message format or the
+
+ // Indicates whether to use the old map message format or the
// new amqp-0-10 encoded format.
private boolean _useLegacyMapMessageFormat;
@@ -194,74 +191,33 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
this(new AMQConnectionURL(
ConnectionURL.AMQ_PROTOCOL + "://" + username + ":" + password + "@"
+ ((clientName == null) ? "" : clientName) + "/" + virtualHost + "?brokerlist='"
- + AMQBrokerDetails.checkTransport(broker) + "'"), null);
- }
-
- /**
- * @param broker brokerdetails
- * @param username username
- * @param password password
- * @param clientName clientid
- * @param virtualHost virtualhost
- *
- * @throws AMQException
- * @throws URLSyntaxException
- */
- public AMQConnection(String broker, String username, String password, String clientName, String virtualHost,
- SSLConfiguration sslConfig) throws AMQException, URLSyntaxException
- {
- this(new AMQConnectionURL(
- ConnectionURL.AMQ_PROTOCOL + "://" + username + ":" + password + "@"
- + ((clientName == null) ? "" : clientName) + "/" + virtualHost + "?brokerlist='"
- + AMQBrokerDetails.checkTransport(broker) + "'"), sslConfig);
+ + AMQBrokerDetails.checkTransport(broker) + "'"));
}
public AMQConnection(String host, int port, String username, String password, String clientName, String virtualHost)
throws AMQException, URLSyntaxException
{
- this(host, port, false, username, password, clientName, virtualHost, null);
- }
-
- public AMQConnection(String host, int port, String username, String password, String clientName, String virtualHost,
- SSLConfiguration sslConfig) throws AMQException, URLSyntaxException
- {
- this(host, port, false, username, password, clientName, virtualHost, sslConfig);
- }
-
- public AMQConnection(String host, int port, boolean useSSL, String username, String password, String clientName,
- String virtualHost, SSLConfiguration sslConfig) throws AMQException, URLSyntaxException
- {
this(new AMQConnectionURL(
- useSSL
- ? (ConnectionURL.AMQ_PROTOCOL + "://" + username + ":" + password + "@"
- + ((clientName == null) ? "" : clientName) + virtualHost + "?brokerlist='tcp://" + host + ":" + port
- + "'" + "," + BrokerDetails.OPTIONS_SSL + "='true'")
- : (ConnectionURL.AMQ_PROTOCOL + "://" + username + ":" + password + "@"
- + ((clientName == null) ? "" : clientName) + virtualHost + "?brokerlist='tcp://" + host + ":" + port
- + "'" + "," + BrokerDetails.OPTIONS_SSL + "='false'")), sslConfig);
+ ConnectionURL.AMQ_PROTOCOL + "://" + username + ":" + password + "@"
+ + ((clientName == null) ? "" : clientName) + virtualHost + "?brokerlist='tcp://" + host + ":" + port + "'"));
}
public AMQConnection(String connection) throws AMQException, URLSyntaxException
{
- this(new AMQConnectionURL(connection), null);
- }
-
- public AMQConnection(String connection, SSLConfiguration sslConfig) throws AMQException, URLSyntaxException
- {
- this(new AMQConnectionURL(connection), sslConfig);
+ this(new AMQConnectionURL(connection));
}
/**
* @todo Some horrible stuff going on here with setting exceptions to be non-null to detect if an exception
* was thrown during the connection! Intention not clear. Use a flag anyway, not exceptions... Will fix soon.
*/
- public AMQConnection(ConnectionURL connectionURL, SSLConfiguration sslConfig) throws AMQException
+ public AMQConnection(ConnectionURL connectionURL) throws AMQException
{
if (connectionURL == null)
{
throw new IllegalArgumentException("Connection must be specified");
}
-
+
// set this connection maxPrefetch
if (connectionURL.getOption(ConnectionURL.OPTIONS_MAXPREFETCH) != null)
{
@@ -311,7 +267,7 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
// use the default value set for all connections
_syncPublish = System.getProperty((ClientProperties.SYNC_PUBLISH_PROP_NAME),_syncPublish);
}
-
+
if (connectionURL.getOption(ConnectionURL.OPTIONS_USE_LEGACY_MAP_MESSAGE_FORMAT) != null)
{
_useLegacyMapMessageFormat = Boolean.parseBoolean(
@@ -322,16 +278,16 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
// use the default value set for all connections
_useLegacyMapMessageFormat = Boolean.getBoolean(ClientProperties.USE_LEGACY_MAP_MESSAGE_FORMAT);
}
-
+
String amqpVersion = System.getProperty((ClientProperties.AMQP_VERSION), "0-10");
_logger.debug("AMQP version " + amqpVersion);
-
+
_failoverPolicy = new FailoverPolicy(connectionURL, this);
BrokerDetails brokerDetails = _failoverPolicy.getCurrentBrokerDetails();
- if ("0-8".equals(amqpVersion))
+ if ("0-8".equals(amqpVersion))
{
_delegate = new AMQConnectionDelegate_8_0(this);
- }
+ }
else if ("0-9".equals(amqpVersion))
{
_delegate = new AMQConnectionDelegate_0_9(this);
@@ -350,7 +306,6 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
_logger.info("Connection:" + connectionURL);
}
- _sslConfiguration = sslConfig;
_connectionURL = connectionURL;
_clientName = connectionURL.getClientName();
@@ -418,6 +373,7 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
brokerDetails = _failoverPolicy.getNextBrokerDetails();
}
}
+ verifyClientID();
if (_logger.isDebugEnabled())
{
@@ -504,7 +460,7 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
Class partypes[] = new Class[1];
partypes[0] = AMQConnection.class;
_delegate = (AMQConnectionDelegate) c.getConstructor(partypes).newInstance(this);
- //Update our session to use this new protocol version
+ //Update our session to use this new protocol version
_protocolHandler.getProtocolSession().setProtocolVersion(_delegate.getProtocolVersion());
}
@@ -547,7 +503,7 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
public boolean attemptReconnection(String host, int port)
{
- BrokerDetails bd = new AMQBrokerDetails(host, port, _sslConfiguration);
+ BrokerDetails bd = new AMQBrokerDetails(host, port);
_failoverPolicy.setBroker(bd);
@@ -1074,7 +1030,7 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
{
_username = id;
}
-
+
public String getPassword()
{
return _password;
@@ -1227,7 +1183,7 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
if (code != null)
{
- je = new JMSException(Integer.toString(code.getCode()), "Exception thrown against " + toString() + ": " + cause);
+ je = new JMSException("Exception thrown against " + toString() + ": " + cause, Integer.toString(code.getCode()));
}
else
{
@@ -1250,7 +1206,7 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
{
je.setLinkedException((Exception) cause);
}
-
+
je.initCause(cause);
}
@@ -1283,7 +1239,7 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
{
_logger.info("Not a hard-error connection not closing: " + cause);
}
-
+
// deliver the exception if there is a listener
if (_exceptionListener != null)
{
@@ -1293,7 +1249,7 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
{
_logger.error("Throwable Received but no listener set: " + cause);
}
-
+
// if we are closing the connection, close sessions first
if (closer)
{
@@ -1351,17 +1307,17 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
}
/**
- * Returns connection url.
+ * Returns connection url.
* @return connection url
*/
public ConnectionURL getConnectionURL()
{
return _connectionURL;
}
-
+
/**
* Returns stringified connection url. This url is suitable only for display
- * as {@link AMQConnectionURL#toString()} converts any password to asterisks.
+ * as {@link AMQConnectionURL#toString()} converts any password to asterisks.
* @return connection url
*/
public String toURL()
@@ -1375,11 +1331,6 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
AMQConnectionFactory.class.getName(), null); // factory location
}
- public SSLConfiguration getSSLConfiguration()
- {
- return _sslConfiguration;
- }
-
public AMQShortString getDefaultTopicExchangeName()
{
return _defaultTopicExchangeName;
@@ -1434,7 +1385,18 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
{
return _delegate.getProtocolVersion();
}
-
+
+ public String getBrokerUUID()
+ {
+ if(getProtocolVersion().equals(ProtocolVersion.v0_10))
+ {
+ return ((AMQConnectionDelegate_0_10)_delegate).getUUID();
+ }
+ else
+ {
+ return null;
+ }
+ }
public boolean isFailingOver()
{
return (_protocolHandler.getFailoverLatch() != null);
@@ -1477,9 +1439,27 @@ public class AMQConnection extends Closeable implements Connection, QueueConnect
{
return _sessions.getNextChannelId();
}
-
+
public boolean isUseLegacyMapMessageFormat()
{
return _useLegacyMapMessageFormat;
}
+
+ private void verifyClientID() throws AMQException
+ {
+ if (Boolean.getBoolean(ClientProperties.QPID_VERIFY_CLIENT_ID))
+ {
+ try
+ {
+ if (!_delegate.verifyClientID())
+ {
+ throw new AMQException(AMQConstant.ALREADY_EXISTS,"ClientID must be unique");
+ }
+ }
+ catch(JMSException e)
+ {
+ throw new AMQException(e.getMessage(),e);
+ }
+ }
+ }
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java
index 9560bd5c7c..8768f93c8c 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate.java
@@ -57,10 +57,12 @@ public interface AMQConnectionDelegate
void closeConnection(long timeout) throws JMSException, AMQException;
<T, E extends Exception> T executeRetrySupport(FailoverProtectedOperation<T,E> operation) throws E;
-
+
int getMaxChannelID();
int getMinChannelID();
ProtocolVersion getProtocolVersion();
+
+ boolean verifyClientID() throws JMSException, AMQException;
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
index d50c9e16fe..0ed3db6ecb 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_0_10.java
@@ -1,6 +1,6 @@
package org.apache.qpid.client;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,16 +8,16 @@ package org.apache.qpid.client;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
@@ -35,6 +35,7 @@ import javax.jms.XASession;
import org.apache.qpid.AMQException;
import org.apache.qpid.client.failover.FailoverException;
import org.apache.qpid.client.failover.FailoverProtectedOperation;
+import org.apache.qpid.client.transport.ClientConnectionDelegate;
import org.apache.qpid.configuration.ClientProperties;
import org.apache.qpid.framing.ProtocolVersion;
import org.apache.qpid.jms.BrokerDetails;
@@ -43,10 +44,13 @@ import org.apache.qpid.jms.Session;
import org.apache.qpid.protocol.AMQConstant;
import org.apache.qpid.transport.Connection;
import org.apache.qpid.transport.ConnectionClose;
+import org.apache.qpid.transport.ConnectionCloseCode;
import org.apache.qpid.transport.ConnectionException;
import org.apache.qpid.transport.ConnectionListener;
import org.apache.qpid.transport.ConnectionSettings;
import org.apache.qpid.transport.ProtocolVersionException;
+import org.apache.qpid.transport.SessionDetachCode;
+import org.apache.qpid.transport.SessionException;
import org.apache.qpid.transport.TransportException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -59,6 +63,10 @@ public class AMQConnectionDelegate_0_10 implements AMQConnectionDelegate, Connec
private static final Logger _logger = LoggerFactory.getLogger(AMQConnectionDelegate_0_10.class);
/**
+ * The name of the UUID property
+ */
+ private static final String UUID_NAME = "qpid.federation_tag";
+ /**
* The AMQ Connection.
*/
private AMQConnection _conn;
@@ -86,7 +94,14 @@ public class AMQConnectionDelegate_0_10 implements AMQConnectionDelegate, Connec
/**
* create a Session and start it if required.
*/
+
public Session createSession(boolean transacted, int acknowledgeMode, int prefetchHigh, int prefetchLow)
+ throws JMSException
+ {
+ return createSession(transacted,acknowledgeMode,prefetchHigh,prefetchLow,null);
+ }
+
+ public Session createSession(boolean transacted, int acknowledgeMode, int prefetchHigh, int prefetchLow, String name)
throws JMSException
{
_conn.checkNotClosed();
@@ -101,7 +116,7 @@ public class AMQConnectionDelegate_0_10 implements AMQConnectionDelegate, Connec
try
{
session = new AMQSession_0_10(_qpidConnection, _conn, channelId, transacted, acknowledgeMode, prefetchHigh,
- prefetchLow);
+ prefetchLow,name);
_conn.registerSession(channelId, session);
if (_conn._started)
{
@@ -179,8 +194,8 @@ public class AMQConnectionDelegate_0_10 implements AMQConnectionDelegate, Connec
+ _conn.getPassword());
}
- ConnectionSettings conSettings = new ConnectionSettings();
- retriveConnectionSettings(conSettings,brokerDetail);
+ ConnectionSettings conSettings = retriveConnectionSettings(brokerDetail);
+ _qpidConnection.setConnectionDelegate(new ClientConnectionDelegate(conSettings, _conn.getConnectionURL()));
_qpidConnection.connect(conSettings);
_conn._connected = true;
@@ -262,10 +277,10 @@ public class AMQConnectionDelegate_0_10 implements AMQConnectionDelegate, Connec
}
ConnectionClose close = exc.getClose();
- if (close == null)
+ if (close == null || close.getReplyCode() == ConnectionCloseCode.CONNECTION_FORCED)
{
_conn.getProtocolHandler().setFailoverLatch(new CountDownLatch(1));
-
+
try
{
if (_conn.firePreFailover(false) && _conn.attemptReconnection())
@@ -334,78 +349,20 @@ public class AMQConnectionDelegate_0_10 implements AMQConnectionDelegate, Connec
{
return ProtocolVersion.v0_10;
}
-
- private void retriveConnectionSettings(ConnectionSettings conSettings, BrokerDetails brokerDetail)
+
+ public String getUUID()
+ {
+ return (String)_qpidConnection.getServerProperties().get(UUID_NAME);
+ }
+
+ private ConnectionSettings retriveConnectionSettings(BrokerDetails brokerDetail)
{
+ ConnectionSettings conSettings = brokerDetail.buildConnectionSettings();
- conSettings.setHost(brokerDetail.getHost());
- conSettings.setPort(brokerDetail.getPort());
conSettings.setVhost(_conn.getVirtualHost());
conSettings.setUsername(_conn.getUsername());
conSettings.setPassword(_conn.getPassword());
-
- // ------------ sasl options ---------------
- if (brokerDetail.getProperty(BrokerDetails.OPTIONS_SASL_MECHS) != null)
- {
- conSettings.setSaslMechs(
- brokerDetail.getProperty(BrokerDetails.OPTIONS_SASL_MECHS));
- }
-
- // Sun SASL Kerberos client uses the
- // protocol + servername as the service key.
-
- if (brokerDetail.getProperty(BrokerDetails.OPTIONS_SASL_PROTOCOL_NAME) != null)
- {
- conSettings.setSaslProtocol(
- brokerDetail.getProperty(BrokerDetails.OPTIONS_SASL_PROTOCOL_NAME));
- }
-
-
- if (brokerDetail.getProperty(BrokerDetails.OPTIONS_SASL_SERVER_NAME) != null)
- {
- conSettings.setSaslServerName(
- brokerDetail.getProperty(BrokerDetails.OPTIONS_SASL_SERVER_NAME));
- }
-
- conSettings.setUseSASLEncryption(
- brokerDetail.getBooleanProperty(BrokerDetails.OPTIONS_SASL_ENCRYPTION));
-
- // ------------- ssl options ---------------------
- conSettings.setUseSSL(brokerDetail.getBooleanProperty(BrokerDetails.OPTIONS_SSL));
-
- if (brokerDetail.getProperty(BrokerDetails.OPTIONS_TRUST_STORE) != null)
- {
- conSettings.setTrustStorePath(
- brokerDetail.getProperty(BrokerDetails.OPTIONS_TRUST_STORE));
- }
-
- if (brokerDetail.getProperty(BrokerDetails.OPTIONS_TRUST_STORE_PASSWORD) != null)
- {
- conSettings.setTrustStorePassword(
- brokerDetail.getProperty(BrokerDetails.OPTIONS_TRUST_STORE_PASSWORD));
- }
-
- if (brokerDetail.getProperty(BrokerDetails.OPTIONS_KEY_STORE) != null)
- {
- conSettings.setKeyStorePath(
- brokerDetail.getProperty(BrokerDetails.OPTIONS_KEY_STORE));
- }
-
- if (brokerDetail.getProperty(BrokerDetails.OPTIONS_KEY_STORE_PASSWORD) != null)
- {
- conSettings.setKeyStorePassword(
- brokerDetail.getProperty(BrokerDetails.OPTIONS_KEY_STORE_PASSWORD));
- }
- if (brokerDetail.getProperty(BrokerDetails.OPTIONS_SSL_CERT_ALIAS) != null)
- {
- conSettings.setCertAlias(
- brokerDetail.getProperty(BrokerDetails.OPTIONS_SSL_CERT_ALIAS));
- }
- // ----------------------------
-
- conSettings.setVerifyHostname(brokerDetail.getBooleanProperty(BrokerDetails.OPTIONS_SSL_VERIFY_HOSTNAME));
-
// Pass client name from connection URL
Map<String, Object> clientProps = new HashMap<String, Object>();
try
@@ -417,16 +374,12 @@ public class AMQConnectionDelegate_0_10 implements AMQConnectionDelegate, Connec
{
// Ignore
}
-
- if (brokerDetail.getProperty(BrokerDetails.OPTIONS_TCP_NO_DELAY) != null)
- {
- conSettings.setTcpNodelay(
- brokerDetail.getBooleanProperty(BrokerDetails.OPTIONS_TCP_NO_DELAY));
- }
-
+
conSettings.setHeartbeatInterval(getHeartbeatInterval(brokerDetail));
+
+ return conSettings;
}
-
+
// The idle_timeout prop is in milisecs while
// the new heartbeat prop is in secs
private int getHeartbeatInterval(BrokerDetails brokerDetail)
@@ -441,7 +394,7 @@ public class AMQConnectionDelegate_0_10 implements AMQConnectionDelegate, Connec
{
heartbeat = Integer.parseInt(brokerDetail.getProperty(BrokerDetails.OPTIONS_HEARTBEAT));
}
- else if (Integer.getInteger(ClientProperties.IDLE_TIMEOUT_PROP_NAME) != null)
+ else if (Integer.getInteger(ClientProperties.IDLE_TIMEOUT_PROP_NAME) != null)
{
heartbeat = Integer.getInteger(ClientProperties.IDLE_TIMEOUT_PROP_NAME)/1000;
_logger.warn("JVM arg -Didle_timeout=<mili_secs> is deprecated, please use -Dqpid.heartbeat=<secs>");
@@ -449,12 +402,37 @@ public class AMQConnectionDelegate_0_10 implements AMQConnectionDelegate, Connec
else
{
heartbeat = Integer.getInteger(ClientProperties.HEARTBEAT,ClientProperties.HEARTBEAT_DEFAULT);
- }
+ }
return heartbeat;
}
-
+
protected org.apache.qpid.transport.Connection getQpidConnection()
{
return _qpidConnection;
}
+
+ public boolean verifyClientID() throws JMSException, AMQException
+ {
+ int prefetch = (int)_conn.getMaxPrefetch();
+ AMQSession_0_10 ssn = (AMQSession_0_10)createSession(false, 1,prefetch,prefetch,_conn.getClientID());
+ org.apache.qpid.transport.Session ssn_0_10 = ssn.getQpidSession();
+ try
+ {
+ ssn_0_10.awaitOpen();
+ }
+ catch(SessionException se)
+ {
+ //if due to non unique client id for user return false, otherwise wrap and re-throw.
+ if (ssn_0_10.getDetachCode() != null &&
+ ssn_0_10.getDetachCode() == SessionDetachCode.SESSION_BUSY)
+ {
+ return false;
+ }
+ else
+ {
+ throw new AMQException(AMQConstant.INTERNAL_ERROR, "Unexpected SessionException thrown while awaiting session opening", se);
+ }
+ }
+ return true;
+ }
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
index a837975304..92f9ebe07c 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
@@ -23,6 +23,8 @@ package org.apache.qpid.client;
import java.io.IOException;
import java.net.ConnectException;
import java.nio.channels.UnresolvedAddressException;
+import java.security.GeneralSecurityException;
+import java.security.Security;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.EnumSet;
@@ -31,6 +33,7 @@ import java.util.Set;
import javax.jms.JMSException;
import javax.jms.XASession;
+import javax.net.ssl.SSLContext;
import org.apache.qpid.AMQException;
import org.apache.qpid.client.failover.FailoverException;
@@ -52,7 +55,9 @@ import org.apache.qpid.ssl.SSLContextFactory;
import org.apache.qpid.transport.ConnectionSettings;
import org.apache.qpid.transport.network.NetworkConnection;
import org.apache.qpid.transport.network.OutgoingNetworkTransport;
-import org.apache.qpid.transport.network.mina.MinaNetworkTransport;
+import org.apache.qpid.transport.network.Transport;
+import org.apache.qpid.transport.network.security.SecurityLayer;
+import org.apache.qpid.transport.network.security.SecurityLayerFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -93,21 +98,34 @@ public class AMQConnectionDelegate_8_0 implements AMQConnectionDelegate
StateWaiter waiter = _conn._protocolHandler.createWaiter(openOrClosedStates);
- ConnectionSettings settings = new ConnectionSettings();
- settings.setHost(brokerDetail.getHost());
- settings.setPort(brokerDetail.getPort());
+ ConnectionSettings settings = brokerDetail.buildConnectionSettings();
settings.setProtocol(brokerDetail.getTransport());
- SSLConfiguration sslConfig = _conn.getSSLConfiguration();
- SSLContextFactory sslFactory = null;
- if (sslConfig != null)
+ SSLContext sslContext = null;
+ if (settings.isUseSSL())
{
- sslFactory = new SSLContextFactory(sslConfig.getKeystorePath(), sslConfig.getKeystorePassword(), sslConfig.getCertType());
+ try
+ {
+ sslContext = SSLContextFactory.buildClientContext(
+ settings.getTrustStorePath(),
+ settings.getTrustStorePassword(),
+ settings.getTrustStoreCertType(),
+ settings.getKeyStorePath(),
+ settings.getKeyStorePassword(),
+ settings.getKeyStoreCertType(),
+ settings.getCertAlias());
+ }
+ catch (GeneralSecurityException e)
+ {
+ throw new AMQException("Unable to create SSLContext: " + e.getMessage(), e);
+ }
}
- OutgoingNetworkTransport transport = new MinaNetworkTransport();
- NetworkConnection network = transport.connect(settings, _conn._protocolHandler, sslFactory);
- _conn._protocolHandler.setNetworkConnection(network);
+ SecurityLayer securityLayer = SecurityLayerFactory.newInstance(settings);
+
+ OutgoingNetworkTransport transport = Transport.getOutgoingTransportInstance(getProtocolVersion());
+ NetworkConnection network = transport.connect(settings, securityLayer.receiver(_conn._protocolHandler), sslContext);
+ _conn._protocolHandler.setNetworkConnection(network, securityLayer.sender(network.getSender()));
_conn._protocolHandler.getProtocolSession().init();
// this blocks until the connection has been set up or when an error
// has prevented the connection being set up
@@ -332,4 +350,9 @@ public class AMQConnectionDelegate_8_0 implements AMQConnectionDelegate
{
return ProtocolVersion.v8_0;
}
+
+ public boolean verifyClientID() throws JMSException
+ {
+ return true;
+ }
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
index ec4c668d7e..f0c003e02a 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionFactory.java
@@ -44,210 +44,34 @@ public class AMQConnectionFactory implements ConnectionFactory, QueueConnectionF
ObjectFactory, Referenceable, XATopicConnectionFactory,
XAQueueConnectionFactory, XAConnectionFactory
{
- private String _host;
- private int _port;
- private String _defaultUsername;
- private String _defaultPassword;
- private String _virtualPath;
+ private final ConnectionURL _connectionDetails;
- private ConnectionURL _connectionDetails;
- private SSLConfiguration _sslConfig;
-
- public AMQConnectionFactory()
- {
- }
-
- /**
- * This is the Only constructor used!
- * It is used form the context and from the JNDI objects.
- */
- public AMQConnectionFactory(String url) throws URLSyntaxException
- {
- _connectionDetails = new AMQConnectionURL(url);
- }
-
- /**
- * This constructor is never used!
- */
- public AMQConnectionFactory(ConnectionURL url)
+ public AMQConnectionFactory(final String url) throws URLSyntaxException
{
- _connectionDetails = url;
- }
-
- /**
- * This constructor is never used!
- */
- public AMQConnectionFactory(String broker, String username, String password, String clientName, String virtualHost)
- throws URLSyntaxException
- {
- this(new AMQConnectionURL(
- ConnectionURL.AMQ_PROTOCOL + "://" + username + ":" + password + "@" + clientName + "/" + virtualHost + "?brokerlist='" + broker + "'"));
- }
-
- /**
- * This constructor is never used!
- */
- public AMQConnectionFactory(String host, int port, String virtualPath)
- {
- this(host, port, "guest", "guest", virtualPath);
- }
-
- /**
- * This constructor is never used!
- */
- public AMQConnectionFactory(String host, int port, String defaultUsername, String defaultPassword,
- String virtualPath)
- {
- _host = host;
- _port = port;
- _defaultUsername = defaultUsername;
- _defaultPassword = defaultPassword;
- _virtualPath = virtualPath;
-
-//todo when setting Host/Port has been resolved then we can use this otherwise those methods won't work with the following line.
-// _connectionDetails = new AMQConnectionURL(
-// ConnectionURL.AMQ_PROTOCOL + "://" +
-// _defaultUsername + ":" + _defaultPassword + "@" +
-// virtualPath + "?brokerlist='tcp://" + host + ":" + port + "'");
- }
-
- /**
- * @return The _defaultPassword.
- */
- public final String getDefaultPassword(String password)
- {
- if (_connectionDetails != null)
+ if (url == null)
{
- return _connectionDetails.getPassword();
+ throw new IllegalArgumentException("url cannot be null");
}
- else
- {
- return _defaultPassword;
- }
- }
-
- /**
- * @param password The _defaultPassword to set.
- */
- public final void setDefaultPassword(String password)
- {
- if (_connectionDetails != null)
- {
- _connectionDetails.setPassword(password);
- }
- _defaultPassword = password;
- }
-
- /**
- * Getter for SSLConfiguration
- *
- * @return SSLConfiguration if set, otherwise null
- */
- public final SSLConfiguration getSSLConfiguration()
- {
- return _sslConfig;
- }
- /**
- * Setter for SSLConfiguration
- *
- * @param sslConfig config to store
- */
- public final void setSSLConfiguration(SSLConfiguration sslConfig)
- {
- _sslConfig = sslConfig;
- }
-
- /**
- * @return The _defaultPassword.
- */
- public final String getDefaultUsername(String password)
- {
- if (_connectionDetails != null)
- {
- return _connectionDetails.getUsername();
- }
- else
- {
- return _defaultUsername;
- }
+ _connectionDetails = new AMQConnectionURL(url);
}
- /**
- * @param username The _defaultUsername to set.
- */
- public final void setDefaultUsername(String username)
+ public AMQConnectionFactory(ConnectionURL url)
{
- if (_connectionDetails != null)
+ if (url == null)
{
- _connectionDetails.setUsername(username);
+ throw new IllegalArgumentException("url cannot be null");
}
- _defaultUsername = username;
- }
-
- /**
- * @return The _host .
- */
- public final String getHost()
- {
- //todo this doesn't make sense in a multi broker URL as we have no current as that is done by AMQConnection
- return _host;
- }
- /**
- * @param host The _host to set.
- */
- public final void setHost(String host)
- {
- //todo if _connectionDetails is set then run _connectionDetails.addBrokerDetails()
- // Should perhaps have this method changed to setBroker(host,port)
- _host = host;
- }
-
- /**
- * @return _port The _port to set.
- */
- public final int getPort()
- {
- //todo see getHost
- return _port;
- }
-
- /**
- * @param port The port to set.
- */
- public final void setPort(int port)
- {
- //todo see setHost
- _port = port;
+ _connectionDetails = url;
}
/**
- * @return he _virtualPath.
+ * @return the virtualPath of the connection details.
*/
public final String getVirtualPath()
{
- if (_connectionDetails != null)
- {
- return _connectionDetails.getVirtualHost();
- }
- else
- {
- return _virtualPath;
- }
- }
-
- /**
- * @param path The _virtualPath to set.
- */
- public final void setVirtualPath(String path)
- {
- if (_connectionDetails != null)
- {
- _connectionDetails.setVirtualHost(path);
- }
-
- _virtualPath = path;
+ return _connectionDetails.getVirtualHost();
}
public static String getUniqueClientID()
@@ -267,19 +91,11 @@ public class AMQConnectionFactory implements ConnectionFactory, QueueConnectionF
{
try
{
- if (_connectionDetails != null)
- {
- if (_connectionDetails.getClientName() == null || _connectionDetails.getClientName().equals(""))
- {
- _connectionDetails.setClientName(getUniqueClientID());
- }
- return new AMQConnection(_connectionDetails, _sslConfig);
- }
- else
+ if (_connectionDetails.getClientName() == null || _connectionDetails.getClientName().equals(""))
{
- return new AMQConnection(_host, _port, _defaultUsername, _defaultPassword, getUniqueClientID(),
- _virtualPath);
+ _connectionDetails.setClientName(getUniqueClientID());
}
+ return new AMQConnection(_connectionDetails);
}
catch (Exception e)
{
@@ -288,8 +104,6 @@ public class AMQConnectionFactory implements ConnectionFactory, QueueConnectionF
jmse.initCause(e);
throw jmse;
}
-
-
}
public Connection createConnection(String userName, String password) throws JMSException
@@ -299,34 +113,35 @@ public class AMQConnectionFactory implements ConnectionFactory, QueueConnectionF
public Connection createConnection(String userName, String password, String id) throws JMSException
{
- try
+ if (_connectionDetails != null)
{
- if (_connectionDetails != null)
+ try
{
- _connectionDetails.setUsername(userName);
- _connectionDetails.setPassword(password);
+ ConnectionURL connectionDetails = new AMQConnectionURL(_connectionDetails.toString());
+ connectionDetails.setUsername(userName);
+ connectionDetails.setPassword(password);
if (id != null && !id.equals(""))
{
- _connectionDetails.setClientName(id);
+ connectionDetails.setClientName(id);
}
- else if (_connectionDetails.getClientName() == null || _connectionDetails.getClientName().equals(""))
+ else if (connectionDetails.getClientName() == null || connectionDetails.getClientName().equals(""))
{
- _connectionDetails.setClientName(getUniqueClientID());
+ connectionDetails.setClientName(getUniqueClientID());
}
- return new AMQConnection(_connectionDetails, _sslConfig);
+ return new AMQConnection(connectionDetails);
}
- else
+ catch (Exception e)
{
- return new AMQConnection(_host, _port, userName, password, (id != null ? id : getUniqueClientID()), _virtualPath);
+ JMSException jmse = new JMSException("Error creating connection: " + e.getMessage());
+ jmse.setLinkedException(e);
+ jmse.initCause(e);
+ throw jmse;
}
}
- catch (Exception e)
+ else
{
- JMSException jmse = new JMSException("Error creating connection: " + e.getMessage());
- jmse.setLinkedException(e);
- jmse.initCause(e);
- throw jmse;
+ throw new JMSException("The connection factory wasn't created with a proper URL, the connection details are empty");
}
}
@@ -361,12 +176,6 @@ public class AMQConnectionFactory implements ConnectionFactory, QueueConnectionF
return _connectionDetails.toString();
}
-
- public final void setConnectionURLString(String url) throws URLSyntaxException
- {
- _connectionDetails = new AMQConnectionURL(url);
- }
-
/**
* JNDI interface to create objects from References.
*
@@ -457,7 +266,7 @@ public class AMQConnectionFactory implements ConnectionFactory, QueueConnectionF
{
try
{
- return new XAConnectionImpl(_connectionDetails, _sslConfig);
+ return new XAConnectionImpl(_connectionDetails);
}
catch (Exception e)
{
@@ -484,19 +293,30 @@ public class AMQConnectionFactory implements ConnectionFactory, QueueConnectionF
{
if (_connectionDetails != null)
{
- _connectionDetails.setUsername(username);
- _connectionDetails.setPassword(password);
-
- if (_connectionDetails.getClientName() == null || _connectionDetails.getClientName().equals(""))
+ try
{
- _connectionDetails.setClientName(getUniqueClientID());
+ ConnectionURL connectionDetails = new AMQConnectionURL(_connectionDetails.toString());
+ connectionDetails.setUsername(username);
+ connectionDetails.setPassword(password);
+
+ if (connectionDetails.getClientName() == null || connectionDetails.getClientName().equals(""))
+ {
+ connectionDetails.setClientName(getUniqueClientID());
+ }
+ return new XAConnectionImpl(connectionDetails);
+ }
+ catch (Exception e)
+ {
+ JMSException jmse = new JMSException("Error creating XA Connection: " + e.getMessage());
+ jmse.setLinkedException(e);
+ jmse.initCause(e);
+ throw jmse;
}
}
else
{
- throw new JMSException("A URL must be specified to access XA connections");
- }
- return createXAConnection();
+ throw new JMSException("The connection factory wasn't created with a proper URL, the connection details are empty");
+ }
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
index 25562cfff7..e0da1ef41f 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java
@@ -97,7 +97,10 @@ import org.apache.qpid.framing.FieldTable;
import org.apache.qpid.framing.FieldTableFactory;
import org.apache.qpid.framing.MethodRegistry;
import org.apache.qpid.jms.Session;
+import org.apache.qpid.protocol.AMQConstant;
import org.apache.qpid.thread.Threading;
+import org.apache.qpid.transport.SessionException;
+import org.apache.qpid.transport.TransportException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -606,8 +609,9 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
* Acknowledges all unacknowledged messages on the session, for all message consumers on the session.
*
* @throws IllegalStateException If the session is closed.
+ * @throws JMSException if there is a problem during acknowledge process.
*/
- public void acknowledge() throws IllegalStateException
+ public void acknowledge() throws IllegalStateException, JMSException
{
if (isClosed())
{
@@ -625,7 +629,15 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
{
break;
}
- acknowledgeMessage(tag, false);
+
+ try
+ {
+ acknowledgeMessage(tag, false);
+ }
+ catch (TransportException e)
+ {
+ throw toJMSException("Exception while acknowledging message(s):" + e.getMessage(), e);
+ }
}
}
@@ -763,6 +775,10 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
_logger.debug(
"Got FailoverException during channel close, ignored as channel already marked as closed.");
}
+ catch (TransportException e)
+ {
+ throw toJMSException("Error closing session:" + e.getMessage(), e);
+ }
finally
{
_connection.deregisterSession(_channelId);
@@ -874,6 +890,10 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
{
throw new JMSAMQException("Fail-over interrupted commit. Status of the commit is uncertain.", e);
}
+ catch(TransportException e)
+ {
+ throw toJMSException("Session exception occured while trying to commit: " + e.getMessage(), e);
+ }
}
public abstract void sendCommit() throws AMQException, FailoverException;
@@ -1071,6 +1091,10 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
ex.setLinkedException(e);
throw ex;
}
+ catch(TransportException e)
+ {
+ throw toJMSException("Error when verifying destination", e);
+ }
}
String messageSelector = ((selector == null) || (selector.trim().length() == 0)) ? null : selector;
@@ -1156,6 +1180,10 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
return subscriber;
}
+ catch (TransportException e)
+ {
+ throw toJMSException("Exception while creating durable subscriber:" + e.getMessage(), e);
+ }
finally
{
_subscriberDetails.unlock();
@@ -1405,7 +1433,6 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
{
checkNotClosed();
- // return (QueueSender) createProducer(queue);
return new QueueSenderAdapter(createProducer(queue), queue);
}
@@ -1442,7 +1469,6 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
checkNotClosed();
Topic dest = checkValidTopic(topic);
- // AMQTopic dest = new AMQTopic(topic.getTopicName());
return new TopicSubscriberAdaptor(dest, (C) createExclusiveConsumer(dest));
}
@@ -1727,13 +1753,14 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
// Ensure that the session is not transacted.
checkNotTransacted();
- // flush any acks we are holding in the buffer.
- flushAcknowledgments();
-
- // this is set only here, and the before the consumer's onMessage is called it is set to false
- _inRecovery = true;
+
try
{
+ // flush any acks we are holding in the buffer.
+ flushAcknowledgments();
+
+ // this is set only here, and the before the consumer's onMessage is called it is set to false
+ _inRecovery = true;
boolean isSuspended = isSuspended();
@@ -1769,7 +1796,10 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
{
throw new JMSAMQException("Recovery was interrupted by fail-over. Recovery status is not known.", e);
}
-
+ catch(TransportException e)
+ {
+ throw toJMSException("Recover failed: " + e.getMessage(), e);
+ }
}
protected abstract void sendRecover() throws AMQException, FailoverException;
@@ -1854,6 +1884,10 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
{
throw new JMSAMQException("Fail-over interrupted rollback. Status of the rollback is uncertain.", e);
}
+ catch (TransportException e)
+ {
+ throw toJMSException("Failure to rollback:" + e.getMessage(), e);
+ }
}
}
@@ -1900,7 +1934,14 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
*/
public void unsubscribe(String name) throws JMSException
{
- unsubscribe(name, false);
+ try
+ {
+ unsubscribe(name, false);
+ }
+ catch (TransportException e)
+ {
+ throw toJMSException("Exception while unsubscribing:" + e.getMessage(), e);
+ }
}
/**
@@ -2021,8 +2062,16 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
// argument, as specifying null for the arguments when querying means they should not be checked at all
ft.put(AMQPFilterTypes.JMS_SELECTOR.getValue(), messageSelector == null ? "" : messageSelector);
- C consumer = createMessageConsumer(amqd, prefetchHigh, prefetchLow,
- noLocal, exclusive, messageSelector, ft, noConsume, autoClose);
+ C consumer;
+ try
+ {
+ consumer = createMessageConsumer(amqd, prefetchHigh, prefetchLow,
+ noLocal, exclusive, messageSelector, ft, noConsume, autoClose);
+ }
+ catch(TransportException e)
+ {
+ throw toJMSException("Exception while creating consumer: " + e.getMessage(), e);
+ }
if (_messageListener != null)
{
@@ -2059,7 +2108,10 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
ex.initCause(e);
throw ex;
}
-
+ catch (TransportException e)
+ {
+ throw toJMSException("Exception while registering consumer:" + e.getMessage(), e);
+ }
return consumer;
}
}, _connection).execute();
@@ -2601,8 +2653,18 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
{
checkNotClosed();
long producerId = getNextProducerId();
- P producer = createMessageProducer(destination, mandatory,
- immediate, waitUntilSent, producerId);
+
+ P producer;
+ try
+ {
+ producer = createMessageProducer(destination, mandatory,
+ immediate, waitUntilSent, producerId);
+ }
+ catch (TransportException e)
+ {
+ throw toJMSException("Exception while creating producer:" + e.getMessage(), e);
+ }
+
registerProducer(producerId, producer);
return producer;
@@ -3009,6 +3071,10 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
{
throw new AMQException(null, "Fail-over interrupted suspend/unsuspend channel.", e);
}
+ catch (TransportException e)
+ {
+ throw new AMQException(AMQConstant.getConstant(getErrorCode(e)), e.getMessage(), e);
+ }
}
}
@@ -3486,4 +3552,27 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic
{
return DECLARE_EXCHANGES;
}
+
+ JMSException toJMSException(String message, TransportException e)
+ {
+ int code = getErrorCode(e);
+ JMSException jmse = new JMSException(message, Integer.toString(code));
+ jmse.setLinkedException(e);
+ jmse.initCause(e);
+ return jmse;
+ }
+
+ private int getErrorCode(TransportException e)
+ {
+ int code = AMQConstant.INTERNAL_ERROR.getCode();
+ if (e instanceof SessionException)
+ {
+ SessionException se = (SessionException) e;
+ if(se.getException() != null && se.getException().getErrorCode() != null)
+ {
+ code = se.getException().getErrorCode().getValue();
+ }
+ }
+ return code;
+ }
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
index 1ea92c67f7..bfbb9f7148 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java
@@ -72,6 +72,7 @@ import org.apache.qpid.transport.RangeSet;
import org.apache.qpid.transport.Session;
import org.apache.qpid.transport.SessionException;
import org.apache.qpid.transport.SessionListener;
+import org.apache.qpid.transport.TransportException;
import org.apache.qpid.util.Serial;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -159,13 +160,20 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic
*/
AMQSession_0_10(org.apache.qpid.transport.Connection qpidConnection, AMQConnection con, int channelId,
boolean transacted, int acknowledgeMode, MessageFactoryRegistry messageFactoryRegistry,
- int defaultPrefetchHighMark, int defaultPrefetchLowMark)
+ int defaultPrefetchHighMark, int defaultPrefetchLowMark,String name)
{
super(con, channelId, transacted, acknowledgeMode, messageFactoryRegistry, defaultPrefetchHighMark,
defaultPrefetchLowMark);
_qpidConnection = qpidConnection;
- _qpidSession = _qpidConnection.createSession(1);
+ if (name == null)
+ {
+ _qpidSession = _qpidConnection.createSession(1);
+ }
+ else
+ {
+ _qpidSession = _qpidConnection.createSession(name,1);
+ }
_qpidSession.setSessionListener(this);
if (_transacted)
{
@@ -192,11 +200,12 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic
* @param qpidConnection The connection
*/
AMQSession_0_10(org.apache.qpid.transport.Connection qpidConnection, AMQConnection con, int channelId,
- boolean transacted, int acknowledgeMode, int defaultPrefetchHigh, int defaultPrefetchLow)
+ boolean transacted, int acknowledgeMode, int defaultPrefetchHigh, int defaultPrefetchLow,
+ String name)
{
this(qpidConnection, con, channelId, transacted, acknowledgeMode, MessageFactoryRegistry.newDefaultRegistry(),
- defaultPrefetchHigh, defaultPrefetchLow);
+ defaultPrefetchHigh, defaultPrefetchLow,name);
}
private void addUnacked(int id)
@@ -540,7 +549,6 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic
}
public boolean isQueueBound(final String exchangeName, final String queueName, final String bindingKey,Map<String,Object> args)
- throws JMSException
{
boolean res;
ExchangeBoundResult bindingQueryResult =
@@ -684,6 +692,10 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic
throw ex;
}
+ catch(TransportException e)
+ {
+ throw toJMSException("Exception while creating message producer:" + e.getMessage(), e);
+ }
}
@@ -986,7 +998,8 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic
}
}
- @Override public void commit() throws JMSException
+ @Override
+ public void commit() throws JMSException
{
checkTransacted();
try
@@ -999,6 +1012,10 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic
}
sendCommit();
}
+ catch(TransportException e)
+ {
+ throw toJMSException("Session exception occured while trying to commit: " + e.getMessage(), e);
+ }
catch (AMQException e)
{
throw new JMSAMQException("Failed to commit: " + e.getMessage(), e);
@@ -1368,5 +1385,5 @@ public class AMQSession_0_10 extends AMQSession<BasicMessageConsumer_0_10, Basic
sb.append(">");
return sb.toString();
}
-
+
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
index 5d32863f2f..754055ad98 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer.java
@@ -27,6 +27,7 @@ import org.apache.qpid.client.protocol.AMQProtocolHandler;
import org.apache.qpid.framing.*;
import org.apache.qpid.jms.MessageConsumer;
import org.apache.qpid.jms.Session;
+import org.apache.qpid.transport.TransportException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -419,6 +420,10 @@ public abstract class BasicMessageConsumer<U> extends Closeable implements Messa
return null;
}
+ catch(TransportException e)
+ {
+ throw _session.toJMSException("Exception while receiving:" + e.getMessage(), e);
+ }
finally
{
releaseReceiving();
@@ -489,6 +494,10 @@ public abstract class BasicMessageConsumer<U> extends Closeable implements Messa
return null;
}
+ catch(TransportException e)
+ {
+ throw _session.toJMSException("Exception while receiving:" + e.getMessage(), e);
+ }
finally
{
releaseReceiving();
@@ -582,6 +591,10 @@ public abstract class BasicMessageConsumer<U> extends Closeable implements Messa
{
throw new JMSAMQException("FailoverException interrupted basic cancel.", e);
}
+ catch (TransportException e)
+ {
+ throw _session.toJMSException("Exception while closing consumer: " + e.getMessage(), e);
+ }
}
}
else
@@ -775,7 +788,7 @@ public abstract class BasicMessageConsumer<U> extends Closeable implements Messa
}
- void postDeliver(AbstractJMSMessage msg) throws JMSException
+ void postDeliver(AbstractJMSMessage msg)
{
switch (_acknowledgeMode)
{
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
index 964c238946..47da59724c 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java
@@ -23,9 +23,7 @@ import org.apache.qpid.client.AMQDestination.AddressOption;
import org.apache.qpid.client.AMQDestination.DestSyntax;
import org.apache.qpid.client.failover.FailoverException;
import org.apache.qpid.client.message.*;
-import org.apache.qpid.client.messaging.address.Node.QueueNode;
import org.apache.qpid.client.protocol.AMQProtocolHandler;
-import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.FieldTable;
import org.apache.qpid.AMQException;
import org.apache.qpid.AMQInternalException;
@@ -365,21 +363,28 @@ public class BasicMessageConsumer_0_10 extends BasicMessageConsumer<UnprocessedM
public void setMessageListener(final MessageListener messageListener) throws JMSException
{
super.setMessageListener(messageListener);
- if (messageListener != null && capacity == 0)
- {
- _0_10session.getQpidSession().messageFlow(getConsumerTagString(),
- MessageCreditUnit.MESSAGE, 1,
- Option.UNRELIABLE);
- }
- if (messageListener != null && !_synchronousQueue.isEmpty())
+ try
{
- Iterator messages=_synchronousQueue.iterator();
- while (messages.hasNext())
+ if (messageListener != null && capacity == 0)
{
- AbstractJMSMessage message=(AbstractJMSMessage) messages.next();
- messages.remove();
- _session.rejectMessage(message, true);
+ _0_10session.getQpidSession().messageFlow(getConsumerTagString(),
+ MessageCreditUnit.MESSAGE, 1,
+ Option.UNRELIABLE);
}
+ if (messageListener != null && !_synchronousQueue.isEmpty())
+ {
+ Iterator messages=_synchronousQueue.iterator();
+ while (messages.hasNext())
+ {
+ AbstractJMSMessage message=(AbstractJMSMessage) messages.next();
+ messages.remove();
+ _session.rejectMessage(message, true);
+ }
+ }
+ }
+ catch(TransportException e)
+ {
+ throw _session.toJMSException("Exception while setting message listener:"+ e.getMessage(), e);
}
}
@@ -443,7 +448,7 @@ public class BasicMessageConsumer_0_10 extends BasicMessageConsumer<UnprocessedM
return o;
}
- void postDeliver(AbstractJMSMessage msg) throws JMSException
+ void postDeliver(AbstractJMSMessage msg)
{
super.postDeliver(msg);
if (_acknowledgeMode == org.apache.qpid.jms.Session.NO_ACKNOWLEDGE && !_session.isInRecovery())
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
index 8756ac4d05..2bfca025b2 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer.java
@@ -39,6 +39,7 @@ import org.apache.qpid.client.message.AbstractJMSMessage;
import org.apache.qpid.client.message.MessageConverter;
import org.apache.qpid.client.protocol.AMQProtocolHandler;
import org.apache.qpid.framing.ContentBody;
+import org.apache.qpid.transport.TransportException;
import org.apache.qpid.util.UUIDGen;
import org.apache.qpid.util.UUIDs;
import org.slf4j.Logger;
@@ -266,7 +267,7 @@ public abstract class BasicMessageProducer extends Closeable implements org.apac
return _destination;
}
- public void close()
+ public void close() throws JMSException
{
_closed.set(true);
_session.deregisterProducer(_producerId);
@@ -498,7 +499,14 @@ public abstract class BasicMessageProducer extends Closeable implements org.apac
message.setJMSMessageID(messageId);
}
- sendMessage(destination, origMessage, message, messageId, deliveryMode, priority, timeToLive, mandatory, immediate, wait);
+ try
+ {
+ sendMessage(destination, origMessage, message, messageId, deliveryMode, priority, timeToLive, mandatory, immediate, wait);
+ }
+ catch (TransportException e)
+ {
+ throw getSession().toJMSException("Exception whilst sending:" + e.getMessage(), e);
+ }
if (message != origMessage)
{
@@ -596,6 +604,13 @@ public abstract class BasicMessageProducer extends Closeable implements org.apac
public boolean isBound(AMQDestination destination) throws JMSException
{
- return _session.isQueueBound(destination.getExchangeName(), null, destination.getRoutingKey());
+ try
+ {
+ return _session.isQueueBound(destination.getExchangeName(), null, destination.getRoutingKey());
+ }
+ catch (TransportException e)
+ {
+ throw getSession().toJMSException("Exception whilst checking destination binding:" + e.getMessage(), e);
+ }
}
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
index 62d1d1698c..1fa5c1003f 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java
@@ -35,8 +35,8 @@ import org.apache.qpid.client.AMQDestination.AddressOption;
import org.apache.qpid.client.AMQDestination.DestSyntax;
import org.apache.qpid.client.message.AMQMessageDelegate_0_10;
import org.apache.qpid.client.message.AbstractJMSMessage;
+import org.apache.qpid.client.message.QpidMessageProperties;
import org.apache.qpid.client.messaging.address.Link.Reliability;
-import org.apache.qpid.client.messaging.address.Node.QueueNode;
import org.apache.qpid.client.protocol.AMQProtocolHandler;
import org.apache.qpid.transport.DeliveryProperties;
import org.apache.qpid.transport.Header;
@@ -46,6 +46,7 @@ import org.apache.qpid.transport.MessageDeliveryMode;
import org.apache.qpid.transport.MessageDeliveryPriority;
import org.apache.qpid.transport.MessageProperties;
import org.apache.qpid.transport.Option;
+import org.apache.qpid.transport.TransportException;
import org.apache.qpid.util.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -178,7 +179,7 @@ public class BasicMessageProducer_0_10 extends BasicMessageProducer
if (destination.getDestSyntax() == AMQDestination.DestSyntax.ADDR &&
(destination.getSubject() != null ||
- (messageProps.getApplicationHeaders() != null && messageProps.getApplicationHeaders().get("qpid.subject") != null))
+ (messageProps.getApplicationHeaders() != null && messageProps.getApplicationHeaders().get(QpidMessageProperties.QPID_SUBJECT) != null))
)
{
Map<String,Object> appProps = messageProps.getApplicationHeaders();
@@ -188,20 +189,21 @@ public class BasicMessageProducer_0_10 extends BasicMessageProducer
messageProps.setApplicationHeaders(appProps);
}
- if (appProps.get("qpid.subject") == null)
+ if (appProps.get(QpidMessageProperties.QPID_SUBJECT) == null)
{
// use default subject in address string
- appProps.put("qpid.subject",destination.getSubject());
+ appProps.put(QpidMessageProperties.QPID_SUBJECT,destination.getSubject());
}
- if (destination.getTargetNode().getType() == AMQDestination.TOPIC_TYPE)
+ if (destination.getAddressType() == AMQDestination.TOPIC_TYPE)
{
deliveryProp.setRoutingKey((String)
- messageProps.getApplicationHeaders().get("qpid.subject"));
+ messageProps.getApplicationHeaders().get(QpidMessageProperties.QPID_SUBJECT));
}
}
-
- messageProps.setContentLength(message.getContentLength());
+
+ ByteBuffer data = message.getData();
+ messageProps.setContentLength(data.remaining());
// send the message
try
@@ -220,8 +222,8 @@ public class BasicMessageProducer_0_10 extends BasicMessageProducer
boolean unreliable = (destination.getDestSyntax() == DestSyntax.ADDR) &&
(destination.getLink().getReliability() == Reliability.UNRELIABLE);
- org.apache.mina.common.ByteBuffer data = message.getData();
- ByteBuffer buffer = data == null ? ByteBuffer.allocate(0) : data.buf().slice();
+
+ ByteBuffer buffer = data == null ? ByteBuffer.allocate(0) : data.slice();
ssn.messageTransfer(destination.getExchangeName() == null ? "" : destination.getExchangeName().toString(),
MessageAcceptMode.NONE,
@@ -244,14 +246,14 @@ public class BasicMessageProducer_0_10 extends BasicMessageProducer
}
}
-
+ @Override
public boolean isBound(AMQDestination destination) throws JMSException
{
return _session.isQueueBound(destination);
}
@Override
- public void close()
+ public void close() throws JMSException
{
super.close();
AMQDestination dest = _destination;
@@ -260,10 +262,18 @@ public class BasicMessageProducer_0_10 extends BasicMessageProducer
if (dest.getDelete() == AddressOption.ALWAYS ||
dest.getDelete() == AddressOption.SENDER )
{
- ((AMQSession_0_10) getSession()).getQpidSession().queueDelete(
+ try
+ {
+ ((AMQSession_0_10) getSession()).getQpidSession().queueDelete(
_destination.getQueueName());
+ }
+ catch(TransportException e)
+ {
+ throw getSession().toJMSException("Exception while closing producer:" + e.getMessage(), e);
+ }
}
}
}
+
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java
index 27f7486890..26e9814e33 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_8.java
@@ -27,14 +27,13 @@ import javax.jms.Message;
import javax.jms.Topic;
import javax.jms.Queue;
-import org.apache.mina.common.ByteBuffer;
+import java.nio.ByteBuffer;
+
import org.apache.qpid.AMQException;
import org.apache.qpid.client.message.AbstractJMSMessage;
-import org.apache.qpid.client.message.AMQMessageDelegate;
import org.apache.qpid.client.message.AMQMessageDelegate_0_8;
import org.apache.qpid.client.protocol.AMQProtocolHandler;
import org.apache.qpid.framing.AMQFrame;
-import org.apache.qpid.framing.BasicConsumeBody;
import org.apache.qpid.framing.BasicContentHeaderProperties;
import org.apache.qpid.framing.BasicPublishBody;
import org.apache.qpid.framing.CompositeAMQDataBlock;
@@ -186,7 +185,9 @@ public class BasicMessageProducer_0_8 extends BasicMessageProducer
if (frames.length == (offset + 1))
{
- frames[offset] = ContentBody.createAMQFrame(channelId, new ContentBody(payload));
+ byte[] data = new byte[payload.remaining()];
+ payload.get(data);
+ frames[offset] = ContentBody.createAMQFrame(channelId, new ContentBody(data));
}
else
{
@@ -198,7 +199,10 @@ public class BasicMessageProducer_0_8 extends BasicMessageProducer
payload.position((int) framePayloadMax * (i - offset));
int length = (remaining >= framePayloadMax) ? (int) framePayloadMax : (int) remaining;
payload.limit(payload.position() + length);
- frames[i] = ContentBody.createAMQFrame(channelId, new ContentBody(payload.slice()));
+ byte[] data = new byte[payload.remaining()];
+ payload.get(data);
+
+ frames[i] = ContentBody.createAMQFrame(channelId, new ContentBody(data));
remaining -= length;
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/SSLConfiguration.java b/qpid/java/client/src/main/java/org/apache/qpid/client/SSLConfiguration.java
deleted file mode 100644
index 2280cc9870..0000000000
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/SSLConfiguration.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.qpid.client;
-
-public class SSLConfiguration {
-
- private String _keystorePath;
-
- private String _keystorePassword;
-
- private String _certType = "SunX509";
-
- public void setKeystorePath(String path)
- {
- _keystorePath = path;
- }
-
- public String getKeystorePath()
- {
- return _keystorePath;
- }
-
- public void setKeystorePassword(String password)
- {
- _keystorePassword = password;
- }
-
- public String getKeystorePassword()
- {
- return _keystorePassword;
- }
-
- public void setCertType(String type)
- {
- _certType = type;
- }
-
- public String getCertType()
- {
- return _certType;
- }
-}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/XAConnectionImpl.java b/qpid/java/client/src/main/java/org/apache/qpid/client/XAConnectionImpl.java
index 43025bd724..97048f39f4 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/XAConnectionImpl.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/XAConnectionImpl.java
@@ -31,9 +31,9 @@ public class XAConnectionImpl extends AMQConnection implements XAConnection, XAQ
/**
* Create a XAConnection from a connectionURL
*/
- public XAConnectionImpl(ConnectionURL connectionURL, SSLConfiguration sslConfig) throws AMQException
+ public XAConnectionImpl(ConnectionURL connectionURL) throws AMQException
{
- super(connectionURL, sslConfig);
+ super(connectionURL);
}
//-- interface XAConnection
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/XAResourceImpl.java b/qpid/java/client/src/main/java/org/apache/qpid/client/XAResourceImpl.java
index 8a75082202..5b94b342eb 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/XAResourceImpl.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/XAResourceImpl.java
@@ -21,10 +21,14 @@ import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid;
-import org.apache.qpid.AMQInvalidArgumentException;
import org.apache.qpid.dtx.XidImpl;
-import org.apache.qpid.transport.*;
-
+import org.apache.qpid.transport.DtxXaStatus;
+import org.apache.qpid.transport.ExecutionErrorCode;
+import org.apache.qpid.transport.Future;
+import org.apache.qpid.transport.Option;
+import org.apache.qpid.transport.RecoverResult;
+import org.apache.qpid.transport.SessionException;
+import org.apache.qpid.transport.XaResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -211,9 +215,28 @@ public class XAResourceImpl implements XAResource
* @throws XAException An error has occurred. Possible exception values are XAER_RMERR, XAER_RMFAIL.
*/
public boolean isSameRM(XAResource xaResource) throws XAException
- {
- // TODO : get the server identity of xaResource and compare it with our own one
- return false;
+ {
+ if(this == xaResource)
+ {
+ return true;
+ }
+ if(!(xaResource instanceof XAResourceImpl))
+ {
+ return false;
+ }
+
+ XAResourceImpl other = (XAResourceImpl)xaResource;
+
+ String myUUID = ((AMQSession_0_10)_xaSession).getAMQConnection().getBrokerUUID();
+ String otherUUID = ((AMQSession_0_10)other._xaSession).getAMQConnection().getBrokerUUID();
+
+ if(_logger.isDebugEnabled())
+ {
+ _logger.debug("Comparing my UUID " + myUUID + " with other UUID " + otherUUID);
+ }
+
+ return (myUUID != null && otherUUID != null && myUUID.equals(otherUUID));
+
}
/**
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/XASessionImpl.java b/qpid/java/client/src/main/java/org/apache/qpid/client/XASessionImpl.java
index 354b67cd35..6b9121811d 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/XASessionImpl.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/XASessionImpl.java
@@ -52,7 +52,7 @@ public class XASessionImpl extends AMQSession_0_10 implements XASession, XATopic
{
super(qpidConnection, con, channelId, false, // this is not a transacted session
Session.AUTO_ACKNOWLEDGE, // the ack mode is transacted
- MessageFactoryRegistry.newDefaultRegistry(), defaultPrefetchHigh, defaultPrefetchLow);
+ MessageFactoryRegistry.newDefaultRegistry(), defaultPrefetchHigh, defaultPrefetchLow,null);
createSession();
_xaResource = new XAResourceImpl(this);
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/failover/FailoverRetrySupport.java b/qpid/java/client/src/main/java/org/apache/qpid/client/failover/FailoverRetrySupport.java
index e9e52cc97c..28d19ce817 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/failover/FailoverRetrySupport.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/failover/FailoverRetrySupport.java
@@ -59,8 +59,8 @@ import org.slf4j.LoggerFactory;
* <tr><td> Automatically retry the continuation accross fail-overs until it succeeds, or raises an exception.
* </table>
*
- * @todo Another continuation. Could use an interface Continuation (as described in other todos, for example, see
- * {@link org.apache.qpid.pool.Job}). Then have a wrapping continuation (this), which blocks on an arbitrary
+ * @todo Another continuation. Could use an interface Continuation (as described in other todos)
+ * Then have a wrapping continuation (this), which blocks on an arbitrary
* Condition or Latch (specified in constructor call), that this blocks on before calling the wrapped Continuation.
* Must work on Java 1.4, so check retrotranslator works on Lock/Condition or latch first. Argument and return type
* to match wrapped condition as type parameters. Rename to AsyncConditionalContinuation or something like that.
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java b/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java
index 2b49bb8f81..939bd181a3 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/handler/ConnectionStartMethodHandler.java
@@ -20,6 +20,13 @@
*/
package org.apache.qpid.client.handler;
+import java.io.UnsupportedEncodingException;
+import java.util.StringTokenizer;
+
+import javax.security.sasl.Sasl;
+import javax.security.sasl.SaslClient;
+import javax.security.sasl.SaslException;
+
import org.apache.qpid.AMQException;
import org.apache.qpid.client.protocol.AMQProtocolSession;
import org.apache.qpid.client.security.AMQCallbackHandler;
@@ -34,18 +41,9 @@ import org.apache.qpid.framing.ConnectionStartOkBody;
import org.apache.qpid.framing.FieldTable;
import org.apache.qpid.framing.FieldTableFactory;
import org.apache.qpid.framing.ProtocolVersion;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.security.sasl.Sasl;
-import javax.security.sasl.SaslClient;
-import javax.security.sasl.SaslException;
-
-import java.io.UnsupportedEncodingException;
-import java.util.HashSet;
-import java.util.StringTokenizer;
-
public class ConnectionStartMethodHandler implements StateAwareMethodListener<ConnectionStartBody>
{
private static final Logger _log = LoggerFactory.getLogger(ConnectionStartMethodHandler.class);
@@ -197,40 +195,20 @@ public class ConnectionStartMethodHandler implements StateAwareMethodListener<Co
private String chooseMechanism(byte[] availableMechanisms) throws UnsupportedEncodingException
{
final String mechanisms = new String(availableMechanisms, "utf8");
- StringTokenizer tokenizer = new StringTokenizer(mechanisms, " ");
- HashSet mechanismSet = new HashSet();
- while (tokenizer.hasMoreTokens())
- {
- mechanismSet.add(tokenizer.nextToken());
- }
-
- String preferredMechanisms = CallbackHandlerRegistry.getInstance().getMechanisms();
- StringTokenizer prefTokenizer = new StringTokenizer(preferredMechanisms, " ");
- while (prefTokenizer.hasMoreTokens())
- {
- String mech = prefTokenizer.nextToken();
- if (mechanismSet.contains(mech))
- {
- return mech;
- }
- }
-
- return null;
+ return CallbackHandlerRegistry.getInstance().selectMechanism(mechanisms);
}
private AMQCallbackHandler createCallbackHandler(String mechanism, AMQProtocolSession protocolSession)
throws AMQException
{
- Class mechanismClass = CallbackHandlerRegistry.getInstance().getCallbackHandlerClass(mechanism);
try
{
- Object instance = mechanismClass.newInstance();
- AMQCallbackHandler cbh = (AMQCallbackHandler) instance;
- cbh.initialise(protocolSession.getAMQConnection().getConnectionURL());
+ AMQCallbackHandler instance = CallbackHandlerRegistry.getInstance().createCallbackHandler(mechanism);
+ instance.initialise(protocolSession.getAMQConnection().getConnectionURL());
- return cbh;
+ return instance;
}
- catch (Exception e)
+ catch (IllegalArgumentException e)
{
throw new AMQException(null, "Unable to create callback handler: " + e, e);
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegateFactory.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegateFactory.java
index 8c3f2fd08f..e5b95f54f4 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegateFactory.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegateFactory.java
@@ -21,11 +21,6 @@
package org.apache.qpid.client.message;
-import org.apache.mina.common.ByteBuffer;
-import org.apache.qpid.framing.BasicContentHeaderProperties;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.AMQException;
-
public interface AMQMessageDelegateFactory<D extends AMQMessageDelegate>
{
public static AMQMessageDelegateFactory DEFAULT_FACTORY = null;
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java
index c9a42638b5..43b3b85641 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_10.java
@@ -55,6 +55,9 @@ import org.apache.qpid.transport.MessageDeliveryMode;
import org.apache.qpid.transport.MessageDeliveryPriority;
import org.apache.qpid.transport.MessageProperties;
import org.apache.qpid.transport.ReplyTo;
+import org.apache.qpid.transport.TransportException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* This extends AbstractAMQMessageDelegate which contains common code between
@@ -63,6 +66,7 @@ import org.apache.qpid.transport.ReplyTo;
*/
public class AMQMessageDelegate_0_10 extends AbstractAMQMessageDelegate
{
+ private static final Logger _logger = LoggerFactory.getLogger(AMQMessageDelegate_0_10.class);
private static final Map<ReplyTo, SoftReference<Destination>> _destinationCache = Collections.synchronizedMap(new HashMap<ReplyTo, SoftReference<Destination>>());
public static final String JMS_TYPE = "x-jms-type";
@@ -95,8 +99,22 @@ public class AMQMessageDelegate_0_10 extends AbstractAMQMessageDelegate
AMQDestination dest;
- dest = generateDestination(new AMQShortString(_deliveryProps.getExchange()),
+ if (AMQDestination.getDefaultDestSyntax() == AMQDestination.DestSyntax.BURL)
+ {
+ dest = generateDestination(new AMQShortString(_deliveryProps.getExchange()),
new AMQShortString(_deliveryProps.getRoutingKey()));
+ }
+ else
+ {
+ String subject = null;
+ if (messageProps != null && messageProps.getApplicationHeaders() != null)
+ {
+ subject = (String)messageProps.getApplicationHeaders().get(QpidMessageProperties.QPID_SUBJECT);
+ }
+ dest = (AMQDestination) convertToAddressBasedDestination(_deliveryProps.getExchange(),
+ _deliveryProps.getRoutingKey(), subject);
+ }
+
setJMSDestination(dest);
}
@@ -242,13 +260,50 @@ public class AMQMessageDelegate_0_10 extends AbstractAMQMessageDelegate
String exchange = replyTo.getExchange();
String routingKey = replyTo.getRoutingKey();
- dest = generateDestination(new AMQShortString(exchange), new AMQShortString(routingKey));
+ if (AMQDestination.getDefaultDestSyntax() == AMQDestination.DestSyntax.BURL)
+ {
+
+ dest = generateDestination(new AMQShortString(exchange), new AMQShortString(routingKey));
+ }
+ else
+ {
+ dest = convertToAddressBasedDestination(exchange,routingKey,null);
+ }
_destinationCache.put(replyTo, new SoftReference<Destination>(dest));
}
return dest;
}
}
+
+ private Destination convertToAddressBasedDestination(String exchange, String routingKey, String subject)
+ {
+ String addr;
+ if ("".equals(exchange)) // type Queue
+ {
+ subject = (subject == null) ? "" : "/" + subject;
+ addr = routingKey + subject;
+ }
+ else
+ {
+ addr = exchange + "/" + routingKey;
+ }
+
+ try
+ {
+ return AMQDestination.createDestination("ADDR:" + addr.toString());
+ }
+ catch(Exception e)
+ {
+ // An exception is only thrown here if the address syntax is invalid.
+ // Logging the exception, but not throwing as this is only important to Qpid developers.
+ // An exception here means a bug in the code.
+ _logger.error("Exception when constructing an address string from the ReplyTo struct");
+
+ // falling back to the old way of doing it to ensure the application continues.
+ return generateDestination(new AMQShortString(exchange), new AMQShortString(routingKey));
+ }
+ }
public void setJMSReplyTo(Destination destination) throws JMSException
{
@@ -287,6 +342,14 @@ public class AMQMessageDelegate_0_10 extends AbstractAMQMessageDelegate
e.setLinkedException(ex);
throw e;
}
+ catch (TransportException e)
+ {
+ JMSException jmse = new JMSException("Exception occured while figuring out the node type:" + e.getMessage());
+ jmse.initCause(e);
+ jmse.setLinkedException(e);
+ throw jmse;
+ }
+
}
final ReplyTo replyTo = new ReplyTo(amqd.getExchangeName().toString(), amqd.getRoutingKey().toString());
@@ -337,7 +400,7 @@ public class AMQMessageDelegate_0_10 extends AbstractAMQMessageDelegate
Destination replyTo = getJMSReplyTo();
if(replyTo != null)
{
- return ((AMQDestination)replyTo).toURL();
+ return ((AMQDestination)replyTo).toString();
}
else
{
@@ -634,11 +697,16 @@ public class AMQMessageDelegate_0_10 extends AbstractAMQMessageDelegate
{
return new String(_messageProps.getUserId());
}
- else if ("x-amqp-0-10.app-id".equals(propertyName) &&
+ else if (QpidMessageProperties.AMQP_0_10_APP_ID.equals(propertyName) &&
_messageProps.getAppId() != null)
{
return new String(_messageProps.getAppId());
}
+ else if (QpidMessageProperties.AMQP_0_10_ROUTING_KEY.equals(propertyName) &&
+ _deliveryProps.getRoutingKey() != null)
+ {
+ return _deliveryProps.getRoutingKey();
+ }
else
{
checkPropertyName(propertyName);
@@ -745,7 +813,7 @@ public class AMQMessageDelegate_0_10 extends AbstractAMQMessageDelegate
{
checkPropertyName(propertyName);
checkWritableProperties();
- if ("x-amqp-0-10.app-id".equals(propertyName))
+ if (QpidMessageProperties.AMQP_0_10_APP_ID.equals(propertyName))
{
_messageProps.setAppId(value.getBytes());
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_8.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_8.java
index cec4268a7b..b9ba946a20 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_8.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQMessageDelegate_0_8.java
@@ -499,7 +499,6 @@ public class AMQMessageDelegate_0_8 extends AbstractAMQMessageDelegate
{
throw new MessageNotWriteableException("You need to call clearProperties() to make the message writable");
}
- _contentHeaderProperties.updated();
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedMapMessage.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedMapMessage.java
index 58f108f1a4..be71c8c657 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedMapMessage.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedMapMessage.java
@@ -24,11 +24,11 @@ package org.apache.qpid.client.message;
import java.util.List;
import java.util.Map;
import java.util.UUID;
+import java.nio.ByteBuffer;
import javax.jms.JMSException;
import javax.jms.MessageFormatException;
-import org.apache.mina.common.ByteBuffer;
import org.apache.qpid.AMQException;
import org.apache.qpid.transport.codec.BBDecoder;
import org.apache.qpid.transport.codec.BBEncoder;
@@ -81,18 +81,19 @@ public class AMQPEncodedMapMessage extends JMSMapMessage
@ Override
public ByteBuffer getData()
{
- writeMapToData();
- return _data;
+ BBEncoder encoder = new BBEncoder(1024);
+ encoder.writeMap(_map);
+ return encoder.segment();
}
@ Override
- protected void populateMapFromData() throws JMSException
+ protected void populateMapFromData(ByteBuffer data) throws JMSException
{
- if (_data != null)
+ if (data != null)
{
- _data.rewind();
+ data.rewind();
BBDecoder decoder = new BBDecoder();
- decoder.init(_data.buf());
+ decoder.init(data);
_map = decoder.readMap();
}
else
@@ -101,16 +102,8 @@ public class AMQPEncodedMapMessage extends JMSMapMessage
}
}
- @ Override
- protected void writeMapToData()
- {
- BBEncoder encoder = new BBEncoder(1024);
- encoder.writeMap(_map);
- _data = ByteBuffer.wrap(encoder.segment());
- }
-
// for testing
- Map<String,Object> getMap()
+ public Map<String,Object> getMap()
{
return _map;
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedMapMessageFactory.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedMapMessageFactory.java
index 4978d1ce85..2c38f153cb 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedMapMessageFactory.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AMQPEncodedMapMessageFactory.java
@@ -1,6 +1,6 @@
package org.apache.qpid.client.message;
/*
- *
+ *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -8,22 +8,23 @@ package org.apache.qpid.client.message;
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
- *
+ *
*/
import javax.jms.JMSException;
-import org.apache.mina.common.ByteBuffer;
+import java.nio.ByteBuffer;
+
import org.apache.qpid.AMQException;
public class AMQPEncodedMapMessageFactory extends AbstractJMSMessageFactory
@@ -36,7 +37,7 @@ public class AMQPEncodedMapMessageFactory extends AbstractJMSMessageFactory
return new AMQPEncodedMapMessage(delegate,data);
}
- @Override
+
public AbstractJMSMessage createMessage(
AMQMessageDelegateFactory delegateFactory) throws JMSException
{
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractBytesMessage.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractBytesMessage.java
deleted file mode 100644
index 3846ee043d..0000000000
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractBytesMessage.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.client.message;
-
-import java.io.IOException;
-import java.nio.charset.Charset;
-
-import javax.jms.JMSException;
-import javax.jms.MessageEOFException;
-
-import org.apache.mina.common.ByteBuffer;
-
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.BasicContentHeaderProperties;
-import org.apache.qpid.transport.util.Functions;
-
-/**
- * @author Apache Software Foundation
- */
-public abstract class AbstractBytesMessage extends AbstractJMSMessage
-{
-
- /**
- * The default initial size of the buffer. The buffer expands automatically.
- */
- private static final int DEFAULT_BUFFER_INITIAL_SIZE = 1024;
-
- AbstractBytesMessage(AMQMessageDelegateFactory delegateFactory)
- {
- this(delegateFactory, null);
- }
-
- /**
- * Construct a bytes message with existing data.
- *
- * @param delegateFactory
- * @param data the data that comprises this message. If data is null, you get a 1024 byte buffer that is
- */
- AbstractBytesMessage(AMQMessageDelegateFactory delegateFactory, ByteBuffer data)
- {
- super(delegateFactory, data); // this instanties a content header
- setContentType(getMimeType());
-
- if (_data == null)
- {
- allocateInitialBuffer();
- }
- }
-
- protected void allocateInitialBuffer()
- {
- _data = ByteBuffer.allocate(DEFAULT_BUFFER_INITIAL_SIZE);
- _data.setAutoExpand(true);
- }
-
- AbstractBytesMessage(AMQMessageDelegate delegate, ByteBuffer data) throws AMQException
- {
- super(delegate, data);
- setContentType(getMimeType());
- }
-
-
- public void clearBodyImpl() throws JMSException
- {
- allocateInitialBuffer();
- }
-
- public String toBodyString() throws JMSException
- {
- try
- {
- if (_data != null)
- {
- return Functions.str(_data.buf(), 100,0);
- }
- else
- {
- return "";
- }
-
- }
- catch (Exception e)
- {
- JMSException jmse = new JMSException(e.toString());
- jmse.setLinkedException(e);
- jmse.initCause(e);
- throw jmse;
- }
-
- }
-
- /**
- * Check that there is at least a certain number of bytes available to read
- *
- * @param len the number of bytes
- * @throws javax.jms.MessageEOFException if there are less than len bytes available to read
- */
- protected void checkAvailable(int len) throws MessageEOFException
- {
- if (_data.remaining() < len)
- {
- throw new MessageEOFException("Unable to read " + len + " bytes");
- }
- }
-}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractBytesTypedMessage.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractBytesTypedMessage.java
index 85818dcd2b..ddeb62fbf6 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractBytesTypedMessage.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractBytesTypedMessage.java
@@ -21,784 +21,96 @@
package org.apache.qpid.client.message;
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
+import java.nio.ByteBuffer;
import javax.jms.JMSException;
-import javax.jms.MessageEOFException;
-import javax.jms.MessageFormatException;
import javax.jms.MessageNotReadableException;
import javax.jms.MessageNotWriteableException;
-import org.apache.mina.common.ByteBuffer;
import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.BasicContentHeaderProperties;
+import org.apache.qpid.transport.util.Functions;
/**
* @author Apache Software Foundation
*/
-public abstract class AbstractBytesTypedMessage extends AbstractBytesMessage
+public abstract class AbstractBytesTypedMessage extends AbstractJMSMessage
{
+ protected boolean _readableMessage = false;
- protected static final byte BOOLEAN_TYPE = (byte) 1;
-
- protected static final byte BYTE_TYPE = (byte) 2;
-
- protected static final byte BYTEARRAY_TYPE = (byte) 3;
-
- protected static final byte SHORT_TYPE = (byte) 4;
-
- protected static final byte CHAR_TYPE = (byte) 5;
-
- protected static final byte INT_TYPE = (byte) 6;
-
- protected static final byte LONG_TYPE = (byte) 7;
-
- protected static final byte FLOAT_TYPE = (byte) 8;
-
- protected static final byte DOUBLE_TYPE = (byte) 9;
-
- protected static final byte STRING_TYPE = (byte) 10;
-
- protected static final byte NULL_STRING_TYPE = (byte) 11;
-
- /**
- * This is set when reading a byte array. The readBytes(byte[]) method supports multiple calls to read
- * a byte array in multiple chunks, hence this is used to track how much is left to be read
- */
- private int _byteArrayRemaining = -1;
-
- AbstractBytesTypedMessage(AMQMessageDelegateFactory delegateFactory)
- {
-
- this(delegateFactory, null);
- }
-
- /**
- * Construct a stream message with existing data.
- *
- * @param delegateFactory
- * @param data the data that comprises this message. If data is null, you get a 1024 byte buffer that is
- */
- AbstractBytesTypedMessage(AMQMessageDelegateFactory delegateFactory, ByteBuffer data)
+ AbstractBytesTypedMessage(AMQMessageDelegateFactory delegateFactory, boolean fromReceivedMessage)
{
- super(delegateFactory, data); // this instanties a content header
+ super(delegateFactory, fromReceivedMessage); // this instanties a content header
+ _readableMessage = fromReceivedMessage;
}
- AbstractBytesTypedMessage(AMQMessageDelegate delegate, ByteBuffer data) throws AMQException
+ AbstractBytesTypedMessage(AMQMessageDelegate delegate, boolean fromReceivedMessage) throws AMQException
{
- super(delegate, data);
- }
+ super(delegate, fromReceivedMessage);
+ _readableMessage = fromReceivedMessage;
-
- protected byte readWireType() throws MessageFormatException, MessageEOFException,
- MessageNotReadableException
- {
- checkReadable();
- checkAvailable(1);
- return _data.get();
}
- protected void writeTypeDiscriminator(byte type) throws MessageNotWriteableException
+ protected void checkReadable() throws MessageNotReadableException
{
- checkWritable();
- _data.put(type);
- _changedData = true;
- }
-
- protected boolean readBoolean() throws JMSException
- {
- int position = _data.position();
- byte wireType = readWireType();
- boolean result;
- try
+ if (!_readableMessage)
{
- switch (wireType)
- {
- case BOOLEAN_TYPE:
- checkAvailable(1);
- result = readBooleanImpl();
- break;
- case STRING_TYPE:
- checkAvailable(1);
- result = Boolean.parseBoolean(readStringImpl());
- break;
- default:
- _data.position(position);
- throw new MessageFormatException("Unable to convert " + wireType + " to a boolean");
- }
- return result;
- }
- catch (RuntimeException e)
- {
- _data.position(position);
- throw e;
+ throw new MessageNotReadableException("You need to call reset() to make the message readable");
}
}
- private boolean readBooleanImpl()
+ @Override
+ protected void checkWritable() throws MessageNotWriteableException
{
- return _data.get() != 0;
- }
-
- protected byte readByte() throws JMSException
- {
- int position = _data.position();
- byte wireType = readWireType();
- byte result;
- try
+ super.checkWritable();
+ if(_readableMessage)
{
- switch (wireType)
- {
- case BYTE_TYPE:
- checkAvailable(1);
- result = readByteImpl();
- break;
- case STRING_TYPE:
- checkAvailable(1);
- result = Byte.parseByte(readStringImpl());
- break;
- default:
- _data.position(position);
- throw new MessageFormatException("Unable to convert " + wireType + " to a byte");
- }
+ throw new MessageNotWriteableException("You need to call clearBody() to make the message writable");
}
- catch (RuntimeException e)
- {
- _data.position(position);
- throw e;
- }
- return result;
}
- private byte readByteImpl()
+ public void clearBody() throws JMSException
{
- return _data.get();
+ super.clearBody();
+ _readableMessage = false;
}
- protected short readShort() throws JMSException
- {
- int position = _data.position();
- byte wireType = readWireType();
- short result;
- try
- {
- switch (wireType)
- {
- case SHORT_TYPE:
- checkAvailable(2);
- result = readShortImpl();
- break;
- case STRING_TYPE:
- checkAvailable(1);
- result = Short.parseShort(readStringImpl());
- break;
- case BYTE_TYPE:
- checkAvailable(1);
- result = readByteImpl();
- break;
- default:
- _data.position(position);
- throw new MessageFormatException("Unable to convert " + wireType + " to a short");
- }
- }
- catch (RuntimeException e)
- {
- _data.position(position);
- throw e;
- }
- return result;
- }
- private short readShortImpl()
+ public String toBodyString() throws JMSException
{
- return _data.getShort();
- }
-
- /**
- * Note that this method reads a unicode character as two bytes from the stream
- *
- * @return the character read from the stream
- * @throws javax.jms.JMSException
- */
- protected char readChar() throws JMSException
- {
- int position = _data.position();
- byte wireType = readWireType();
try
{
- if(wireType == NULL_STRING_TYPE){
- throw new NullPointerException();
+ ByteBuffer data = getData();
+ if (data != null)
+ {
+ return Functions.str(data, 100, 0);
+ }
+ else
+ {
+ return "";
}
- if (wireType != CHAR_TYPE)
- {
- _data.position(position);
- throw new MessageFormatException("Unable to convert " + wireType + " to a char");
- }
- else
- {
- checkAvailable(2);
- return readCharImpl();
- }
- }
- catch (RuntimeException e)
- {
- _data.position(position);
- throw e;
- }
- }
-
- private char readCharImpl()
- {
- return _data.getChar();
- }
-
- protected int readInt() throws JMSException
- {
- int position = _data.position();
- byte wireType = readWireType();
- int result;
- try
- {
- switch (wireType)
- {
- case INT_TYPE:
- checkAvailable(4);
- result = readIntImpl();
- break;
- case SHORT_TYPE:
- checkAvailable(2);
- result = readShortImpl();
- break;
- case STRING_TYPE:
- checkAvailable(1);
- result = Integer.parseInt(readStringImpl());
- break;
- case BYTE_TYPE:
- checkAvailable(1);
- result = readByteImpl();
- break;
- default:
- _data.position(position);
- throw new MessageFormatException("Unable to convert " + wireType + " to an int");
- }
- return result;
- }
- catch (RuntimeException e)
- {
- _data.position(position);
- throw e;
- }
- }
-
- protected int readIntImpl()
- {
- return _data.getInt();
- }
-
- protected long readLong() throws JMSException
- {
- int position = _data.position();
- byte wireType = readWireType();
- long result;
- try
- {
- switch (wireType)
- {
- case LONG_TYPE:
- checkAvailable(8);
- result = readLongImpl();
- break;
- case INT_TYPE:
- checkAvailable(4);
- result = readIntImpl();
- break;
- case SHORT_TYPE:
- checkAvailable(2);
- result = readShortImpl();
- break;
- case STRING_TYPE:
- checkAvailable(1);
- result = Long.parseLong(readStringImpl());
- break;
- case BYTE_TYPE:
- checkAvailable(1);
- result = readByteImpl();
- break;
- default:
- _data.position(position);
- throw new MessageFormatException("Unable to convert " + wireType + " to a long");
- }
- return result;
- }
- catch (RuntimeException e)
- {
- _data.position(position);
- throw e;
- }
- }
-
- private long readLongImpl()
- {
- return _data.getLong();
- }
-
- protected float readFloat() throws JMSException
- {
- int position = _data.position();
- byte wireType = readWireType();
- float result;
- try
- {
- switch (wireType)
- {
- case FLOAT_TYPE:
- checkAvailable(4);
- result = readFloatImpl();
- break;
- case STRING_TYPE:
- checkAvailable(1);
- result = Float.parseFloat(readStringImpl());
- break;
- default:
- _data.position(position);
- throw new MessageFormatException("Unable to convert " + wireType + " to a float");
- }
- return result;
- }
- catch (RuntimeException e)
- {
- _data.position(position);
- throw e;
- }
- }
-
- private float readFloatImpl()
- {
- return _data.getFloat();
- }
-
- protected double readDouble() throws JMSException
- {
- int position = _data.position();
- byte wireType = readWireType();
- double result;
- try
- {
- switch (wireType)
- {
- case DOUBLE_TYPE:
- checkAvailable(8);
- result = readDoubleImpl();
- break;
- case FLOAT_TYPE:
- checkAvailable(4);
- result = readFloatImpl();
- break;
- case STRING_TYPE:
- checkAvailable(1);
- result = Double.parseDouble(readStringImpl());
- break;
- default:
- _data.position(position);
- throw new MessageFormatException("Unable to convert " + wireType + " to a double");
- }
- return result;
- }
- catch (RuntimeException e)
- {
- _data.position(position);
- throw e;
- }
- }
-
- private double readDoubleImpl()
- {
- return _data.getDouble();
- }
-
- protected String readString() throws JMSException
- {
- int position = _data.position();
- byte wireType = readWireType();
- String result;
- try
- {
- switch (wireType)
- {
- case STRING_TYPE:
- checkAvailable(1);
- result = readStringImpl();
- break;
- case NULL_STRING_TYPE:
- result = null;
- throw new NullPointerException("data is null");
- case BOOLEAN_TYPE:
- checkAvailable(1);
- result = String.valueOf(readBooleanImpl());
- break;
- case LONG_TYPE:
- checkAvailable(8);
- result = String.valueOf(readLongImpl());
- break;
- case INT_TYPE:
- checkAvailable(4);
- result = String.valueOf(readIntImpl());
- break;
- case SHORT_TYPE:
- checkAvailable(2);
- result = String.valueOf(readShortImpl());
- break;
- case BYTE_TYPE:
- checkAvailable(1);
- result = String.valueOf(readByteImpl());
- break;
- case FLOAT_TYPE:
- checkAvailable(4);
- result = String.valueOf(readFloatImpl());
- break;
- case DOUBLE_TYPE:
- checkAvailable(8);
- result = String.valueOf(readDoubleImpl());
- break;
- case CHAR_TYPE:
- checkAvailable(2);
- result = String.valueOf(readCharImpl());
- break;
- default:
- _data.position(position);
- throw new MessageFormatException("Unable to convert " + wireType + " to a String");
- }
- return result;
- }
- catch (RuntimeException e)
- {
- _data.position(position);
- throw e;
- }
- }
-
- protected String readStringImpl() throws JMSException
- {
- try
- {
- return _data.getString(Charset.forName("UTF-8").newDecoder());
}
- catch (CharacterCodingException e)
+ catch (Exception e)
{
- JMSException jmse = new JMSException("Error decoding byte stream as a UTF8 string: " + e);
+ JMSException jmse = new JMSException(e.toString());
jmse.setLinkedException(e);
jmse.initCause(e);
throw jmse;
}
- }
-
- protected int readBytes(byte[] bytes) throws JMSException
- {
- if (bytes == null)
- {
- throw new IllegalArgumentException("byte array must not be null");
- }
- checkReadable();
- // first call
- if (_byteArrayRemaining == -1)
- {
- // type discriminator checked separately so you get a MessageFormatException rather than
- // an EOF even in the case where both would be applicable
- checkAvailable(1);
- byte wireType = readWireType();
- if (wireType != BYTEARRAY_TYPE)
- {
- throw new MessageFormatException("Unable to convert " + wireType + " to a byte array");
- }
- checkAvailable(4);
- int size = _data.getInt();
- // length of -1 indicates null
- if (size == -1)
- {
- return -1;
- }
- else
- {
- if (size > _data.remaining())
- {
- throw new MessageEOFException("Byte array has stated length " + size + " but message only contains " +
- _data.remaining() + " bytes");
- }
- else
- {
- _byteArrayRemaining = size;
- }
- }
- }
- else if (_byteArrayRemaining == 0)
- {
- _byteArrayRemaining = -1;
- return -1;
- }
-
- int returnedSize = readBytesImpl(bytes);
- if (returnedSize < bytes.length)
- {
- _byteArrayRemaining = -1;
- }
- return returnedSize;
- }
-
- private int readBytesImpl(byte[] bytes)
- {
- int count = (_byteArrayRemaining >= bytes.length ? bytes.length : _byteArrayRemaining);
- _byteArrayRemaining -= count;
-
- if (count == 0)
- {
- return 0;
- }
- else
- {
- _data.get(bytes, 0, count);
- return count;
- }
- }
-
- protected Object readObject() throws JMSException
- {
- int position = _data.position();
- byte wireType = readWireType();
- Object result = null;
- try
- {
- switch (wireType)
- {
- case BOOLEAN_TYPE:
- checkAvailable(1);
- result = readBooleanImpl();
- break;
- case BYTE_TYPE:
- checkAvailable(1);
- result = readByteImpl();
- break;
- case BYTEARRAY_TYPE:
- checkAvailable(4);
- int size = _data.getInt();
- if (size == -1)
- {
- result = null;
- }
- else
- {
- _byteArrayRemaining = size;
- byte[] bytesResult = new byte[size];
- readBytesImpl(bytesResult);
- result = bytesResult;
- }
- break;
- case SHORT_TYPE:
- checkAvailable(2);
- result = readShortImpl();
- break;
- case CHAR_TYPE:
- checkAvailable(2);
- result = readCharImpl();
- break;
- case INT_TYPE:
- checkAvailable(4);
- result = readIntImpl();
- break;
- case LONG_TYPE:
- checkAvailable(8);
- result = readLongImpl();
- break;
- case FLOAT_TYPE:
- checkAvailable(4);
- result = readFloatImpl();
- break;
- case DOUBLE_TYPE:
- checkAvailable(8);
- result = readDoubleImpl();
- break;
- case NULL_STRING_TYPE:
- result = null;
- break;
- case STRING_TYPE:
- checkAvailable(1);
- result = readStringImpl();
- break;
- }
- return result;
- }
- catch (RuntimeException e)
- {
- _data.position(position);
- throw e;
- }
- }
-
- protected void writeBoolean(boolean b) throws JMSException
- {
- writeTypeDiscriminator(BOOLEAN_TYPE);
- _data.put(b ? (byte) 1 : (byte) 0);
- }
-
- protected void writeByte(byte b) throws JMSException
- {
- writeTypeDiscriminator(BYTE_TYPE);
- _data.put(b);
- }
-
- protected void writeShort(short i) throws JMSException
- {
- writeTypeDiscriminator(SHORT_TYPE);
- _data.putShort(i);
- }
-
- protected void writeChar(char c) throws JMSException
- {
- writeTypeDiscriminator(CHAR_TYPE);
- _data.putChar(c);
- }
-
- protected void writeInt(int i) throws JMSException
- {
- writeTypeDiscriminator(INT_TYPE);
- writeIntImpl(i);
- }
-
- protected void writeIntImpl(int i)
- {
- _data.putInt(i);
- }
-
- protected void writeLong(long l) throws JMSException
- {
- writeTypeDiscriminator(LONG_TYPE);
- _data.putLong(l);
- }
- protected void writeFloat(float v) throws JMSException
- {
- writeTypeDiscriminator(FLOAT_TYPE);
- _data.putFloat(v);
}
- protected void writeDouble(double v) throws JMSException
- {
- writeTypeDiscriminator(DOUBLE_TYPE);
- _data.putDouble(v);
- }
- protected void writeString(String string) throws JMSException
- {
- if (string == null)
- {
- writeTypeDiscriminator(NULL_STRING_TYPE);
- }
- else
- {
- writeTypeDiscriminator(STRING_TYPE);
- try
- {
- writeStringImpl(string);
- }
- catch (CharacterCodingException e)
- {
- JMSException jmse = new JMSException("Unable to encode string: " + e);
- jmse.setLinkedException(e);
- jmse.initCause(e);
- throw jmse;
- }
- }
- }
-
- protected void writeStringImpl(String string)
- throws CharacterCodingException
- {
- _data.putString(string, Charset.forName("UTF-8").newEncoder());
- // we must write the null terminator ourselves
- _data.put((byte) 0);
- }
+ abstract public void reset();
- protected void writeBytes(byte[] bytes) throws JMSException
- {
- writeBytes(bytes, 0, bytes == null ? 0 : bytes.length);
- }
- protected void writeBytes(byte[] bytes, int offset, int length) throws JMSException
- {
- writeTypeDiscriminator(BYTEARRAY_TYPE);
- if (bytes == null)
- {
- _data.putInt(-1);
- }
- else
- {
- _data.putInt(length);
- _data.put(bytes, offset, length);
- }
- }
- protected void writeObject(Object object) throws JMSException
- {
- checkWritable();
- Class clazz;
- if (object == null)
- {
- // string handles the output of null values
- clazz = String.class;
- }
- else
- {
- clazz = object.getClass();
- }
-
- if (clazz == Byte.class)
- {
- writeByte((Byte) object);
- }
- else if (clazz == Boolean.class)
- {
- writeBoolean((Boolean) object);
- }
- else if (clazz == byte[].class)
- {
- writeBytes((byte[]) object);
- }
- else if (clazz == Short.class)
- {
- writeShort((Short) object);
- }
- else if (clazz == Character.class)
- {
- writeChar((Character) object);
- }
- else if (clazz == Integer.class)
- {
- writeInt((Integer) object);
- }
- else if (clazz == Long.class)
- {
- writeLong((Long) object);
- }
- else if (clazz == Float.class)
- {
- writeFloat((Float) object);
- }
- else if (clazz == Double.class)
- {
- writeDouble((Double) object);
- }
- else if (clazz == String.class)
- {
- writeString((String) object);
- }
- else
- {
- throw new MessageFormatException("Only primitives plus byte arrays and String are valid types");
- }
- }
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessage.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessage.java
index 6ba55b207a..f713554bfb 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessage.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessage.java
@@ -20,66 +20,38 @@
*/
package org.apache.qpid.client.message;
-import java.io.IOException;
+import java.nio.ByteBuffer;
import java.util.Enumeration;
import java.util.UUID;
import javax.jms.Destination;
import javax.jms.JMSException;
-import javax.jms.MessageNotReadableException;
import javax.jms.MessageNotWriteableException;
-import org.apache.mina.common.ByteBuffer;
import org.apache.qpid.AMQException;
import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.BasicContentHeaderProperties;
public abstract class AbstractJMSMessage implements org.apache.qpid.jms.Message
{
-
- protected ByteBuffer _data;
- protected boolean _readableMessage = false;
- protected boolean _changedData = true;
-
/** If the acknowledge mode is CLIENT_ACKNOWLEDGE the session is required */
-
-
-
protected AMQMessageDelegate _delegate;
private boolean _redelivered;
+ private boolean _receivedFromServer;
- protected AbstractJMSMessage(AMQMessageDelegateFactory delegateFactory, ByteBuffer data)
+ protected AbstractJMSMessage(AMQMessageDelegateFactory delegateFactory, boolean fromReceivedData)
{
_delegate = delegateFactory.createDelegate();
- _data = data;
- if (_data != null)
- {
- _data.acquire();
- }
-
-
- _readableMessage = (data != null);
- _changedData = (data == null);
-
+ setContentType(getMimeType());
}
- protected AbstractJMSMessage(AMQMessageDelegate delegate, ByteBuffer data) throws AMQException
+ protected AbstractJMSMessage(AMQMessageDelegate delegate, boolean fromReceivedData) throws AMQException
{
_delegate = delegate;
-
- _data = data;
- if (_data != null)
- {
- _data.acquire();
- }
-
- _readableMessage = data != null;
-
+ setContentType(getMimeType());
}
public String getJMSMessageID() throws JMSException
@@ -329,12 +301,9 @@ public abstract class AbstractJMSMessage implements org.apache.qpid.jms.Message
public void clearBody() throws JMSException
{
- clearBodyImpl();
- _readableMessage = false;
-
+ _receivedFromServer = false;
}
-
public void acknowledgeThis() throws JMSException
{
_delegate.acknowledgeThis();
@@ -345,14 +314,7 @@ public abstract class AbstractJMSMessage implements org.apache.qpid.jms.Message
_delegate.acknowledge();
}
- /**
- * This forces concrete classes to implement clearBody()
- *
- * @throws JMSException
- */
- public abstract void clearBodyImpl() throws JMSException;
-
- /**
+ /*
* Get a String representation of the body of the message. Used in the toString() method which outputs this before
* message properties.
*/
@@ -413,63 +375,24 @@ public abstract class AbstractJMSMessage implements org.apache.qpid.jms.Message
return _delegate;
}
- public ByteBuffer getData()
- {
- // make sure we rewind the data just in case any method has moved the
- // position beyond the start
- if (_data != null)
- {
- reset();
- }
+ abstract public ByteBuffer getData() throws JMSException;
- return _data;
- }
-
- protected void checkReadable() throws MessageNotReadableException
- {
- if (!_readableMessage)
- {
- throw new MessageNotReadableException("You need to call reset() to make the message readable");
- }
- }
protected void checkWritable() throws MessageNotWriteableException
{
- if (_readableMessage)
+ if (_receivedFromServer)
{
throw new MessageNotWriteableException("You need to call clearBody() to make the message writable");
}
}
- public void reset()
- {
- if (!_changedData)
- {
- _data.rewind();
- }
- else
- {
- _data.flip();
- _changedData = false;
- }
- }
- public int getContentLength()
+ public void setReceivedFromServer()
{
- if(_data != null)
- {
- return _data.remaining();
- }
- else
- {
- return 0;
- }
+ _receivedFromServer = true;
}
- public void receivedFromServer()
- {
- _changedData = false;
- }
+
/**
* The session is set when CLIENT_ACKNOWLEDGE mode is used so that the CHANNEL ACK can be sent when the user calls
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessageFactory.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessageFactory.java
index 40c1df0c5d..967a1fb49f 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessageFactory.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/AbstractJMSMessageFactory.java
@@ -20,8 +20,6 @@
*/
package org.apache.qpid.client.message;
-import org.apache.mina.common.ByteBuffer;
-
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.ContentBody;
@@ -38,6 +36,8 @@ import javax.jms.JMSException;
import java.util.Iterator;
import java.util.List;
+import java.nio.ByteBuffer;
+
public abstract class AbstractJMSMessageFactory implements MessageFactory
{
private static final Logger _logger = LoggerFactory.getLogger(AbstractJMSMessageFactory.class);
@@ -57,7 +57,7 @@ public abstract class AbstractJMSMessageFactory implements MessageFactory
_logger.debug("Non-fragmented message body (bodySize=" + contentHeader.bodySize + ")");
}
- data = ((ContentBody) bodies.get(0)).payload;
+ data = ByteBuffer.wrap(((ContentBody) bodies.get(0))._payload);
}
else if (bodies != null)
{
@@ -72,7 +72,7 @@ public abstract class AbstractJMSMessageFactory implements MessageFactory
while (it.hasNext())
{
ContentBody cb = (ContentBody) it.next();
- final ByteBuffer payload = cb.payload;
+ final ByteBuffer payload = ByteBuffer.wrap(cb._payload);
if(payload.isDirect() || payload.isReadOnly())
{
data.put(payload);
@@ -82,7 +82,6 @@ public abstract class AbstractJMSMessageFactory implements MessageFactory
data.put(payload.array(), payload.arrayOffset(), payload.limit());
}
- payload.release();
}
data.flip();
@@ -109,7 +108,7 @@ public abstract class AbstractJMSMessageFactory implements MessageFactory
protected AbstractJMSMessage create010MessageWithBody(long messageNbr, MessageProperties msgProps,
- DeliveryProperties deliveryProps,
+ DeliveryProperties deliveryProps,
java.nio.ByteBuffer body) throws AMQException
{
ByteBuffer data;
@@ -118,7 +117,7 @@ public abstract class AbstractJMSMessageFactory implements MessageFactory
if (body != null)
{
- data = ByteBuffer.wrap(body);
+ data = body;
}
else // body == null
{
@@ -155,7 +154,7 @@ public abstract class AbstractJMSMessageFactory implements MessageFactory
{
final AbstractJMSMessage msg = create08MessageWithBody(messageNbr, contentHeader, exchange, routingKey, bodies);
msg.setJMSRedelivered(redelivered);
- msg.receivedFromServer();
+ msg.setReceivedFromServer();
return msg;
}
@@ -166,7 +165,7 @@ public abstract class AbstractJMSMessageFactory implements MessageFactory
final AbstractJMSMessage msg =
create010MessageWithBody(messageNbr,msgProps,deliveryProps, body);
msg.setJMSRedelivered(redelivered);
- msg.receivedFromServer();
+ msg.setReceivedFromServer();
return msg;
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSBytesMessage.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSBytesMessage.java
index b87275a9ce..e252bdb719 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSBytesMessage.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSBytesMessage.java
@@ -20,6 +20,7 @@
*/
package org.apache.qpid.client.message;
+import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
@@ -28,47 +29,56 @@ import java.nio.charset.CharsetEncoder;
import javax.jms.BytesMessage;
import javax.jms.JMSException;
+import javax.jms.MessageEOFException;
import javax.jms.MessageFormatException;
-import org.apache.mina.common.ByteBuffer;
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.BasicContentHeaderProperties;
-public class JMSBytesMessage extends AbstractBytesMessage implements BytesMessage
+public class JMSBytesMessage extends AbstractBytesTypedMessage implements BytesMessage
{
public static final String MIME_TYPE = "application/octet-stream";
+ private TypedBytesContentReader _typedBytesContentReader;
+ private TypedBytesContentWriter _typedBytesContentWriter;
- public JMSBytesMessage(AMQMessageDelegateFactory delegateFactory)
- {
- this(delegateFactory,null);
- }
-
- /**
- * Construct a bytes message with existing data.
- *
- * @param delegateFactory
- * @param data the data that comprises this message. If data is null, you get a 1024 byte buffer that is
- */
- JMSBytesMessage(AMQMessageDelegateFactory delegateFactory, ByteBuffer data)
+ public JMSBytesMessage(AMQMessageDelegateFactory delegateFactory)
{
-
- super(delegateFactory, data); // this instanties a content header
+ super(delegateFactory,false);
+ _typedBytesContentWriter = new TypedBytesContentWriter();
}
JMSBytesMessage(AMQMessageDelegate delegate, ByteBuffer data) throws AMQException
{
- super(delegate, data);
+ super(delegate, data!=null);
+ _typedBytesContentReader = new TypedBytesContentReader(data);
}
public void reset()
{
- super.reset();
_readableMessage = true;
+
+ if(_typedBytesContentReader != null)
+ {
+ _typedBytesContentReader.reset();
+ }
+ else if (_typedBytesContentWriter != null)
+ {
+ _typedBytesContentReader = new TypedBytesContentReader(_typedBytesContentWriter.getData());
+ }
+ }
+
+ @Override
+ public void clearBody() throws JMSException
+ {
+ super.clearBody();
+ _typedBytesContentReader = null;
+ _typedBytesContentWriter = new TypedBytesContentWriter();
+
}
protected String getMimeType()
@@ -76,45 +86,57 @@ public class JMSBytesMessage extends AbstractBytesMessage implements BytesMessag
return MIME_TYPE;
}
+ @Override
+ public java.nio.ByteBuffer getData() throws JMSException
+ {
+ return _typedBytesContentWriter == null ? _typedBytesContentReader.getData() : _typedBytesContentWriter.getData();
+ }
+
public long getBodyLength() throws JMSException
{
checkReadable();
- return _data.limit();
+ return _typedBytesContentReader.size();
}
public boolean readBoolean() throws JMSException
{
checkReadable();
checkAvailable(1);
- return _data.get() != 0;
+
+ return _typedBytesContentReader.readBooleanImpl();
+ }
+
+ private void checkAvailable(final int i) throws MessageEOFException
+ {
+ _typedBytesContentReader.checkAvailable(1);
}
public byte readByte() throws JMSException
{
checkReadable();
checkAvailable(1);
- return _data.get();
+ return _typedBytesContentReader.readByteImpl();
}
public int readUnsignedByte() throws JMSException
{
checkReadable();
checkAvailable(1);
- return _data.getUnsigned();
+ return _typedBytesContentReader.readByteImpl() & 0xFF;
}
public short readShort() throws JMSException
{
checkReadable();
checkAvailable(2);
- return _data.getShort();
+ return _typedBytesContentReader.readShortImpl();
}
public int readUnsignedShort() throws JMSException
{
checkReadable();
checkAvailable(2);
- return _data.getUnsignedShort();
+ return _typedBytesContentReader.readShortImpl() & 0xFFFF;
}
/**
@@ -127,35 +149,35 @@ public class JMSBytesMessage extends AbstractBytesMessage implements BytesMessag
{
checkReadable();
checkAvailable(2);
- return _data.getChar();
+ return _typedBytesContentReader.readCharImpl();
}
public int readInt() throws JMSException
{
checkReadable();
checkAvailable(4);
- return _data.getInt();
+ return _typedBytesContentReader.readIntImpl();
}
public long readLong() throws JMSException
{
checkReadable();
checkAvailable(8);
- return _data.getLong();
+ return _typedBytesContentReader.readLongImpl();
}
public float readFloat() throws JMSException
{
checkReadable();
checkAvailable(4);
- return _data.getFloat();
+ return _typedBytesContentReader.readFloatImpl();
}
public double readDouble() throws JMSException
{
checkReadable();
checkAvailable(8);
- return _data.getDouble();
+ return _typedBytesContentReader.readDoubleImpl();
}
public String readUTF() throws JMSException
@@ -164,34 +186,7 @@ public class JMSBytesMessage extends AbstractBytesMessage implements BytesMessag
// we check only for one byte since theoretically the string could be only a
// single byte when using UTF-8 encoding
- try
- {
- short length = readShort();
- if(length == 0)
- {
- return "";
- }
- else
- {
- CharsetDecoder decoder = Charset.forName("UTF-8").newDecoder();
- ByteBuffer encodedString = _data.slice();
- encodedString.limit(length);
- _data.position(_data.position()+length);
- CharBuffer string = decoder.decode(encodedString.buf());
-
- return string.toString();
- }
-
-
-
- }
- catch (CharacterCodingException e)
- {
- JMSException jmse = new JMSException("Error decoding byte stream as a UTF8 string: " + e);
- jmse.setLinkedException(e);
- jmse.initCause(e);
- throw jmse;
- }
+ return _typedBytesContentReader.readLengthPrefixedUTF();
}
public int readBytes(byte[] bytes) throws JMSException
@@ -201,14 +196,14 @@ public class JMSBytesMessage extends AbstractBytesMessage implements BytesMessag
throw new IllegalArgumentException("byte array must not be null");
}
checkReadable();
- int count = (_data.remaining() >= bytes.length ? bytes.length : _data.remaining());
+ int count = (_typedBytesContentReader.remaining() >= bytes.length ? bytes.length : _typedBytesContentReader.remaining());
if (count == 0)
{
return -1;
}
else
{
- _data.get(bytes, 0, count);
+ _typedBytesContentReader.readRawBytes(bytes, 0, count);
return count;
}
}
@@ -224,110 +219,82 @@ public class JMSBytesMessage extends AbstractBytesMessage implements BytesMessag
throw new IllegalArgumentException("maxLength must be <= bytes.length");
}
checkReadable();
- int count = (_data.remaining() >= maxLength ? maxLength : _data.remaining());
+ int count = (_typedBytesContentReader.remaining() >= maxLength ? maxLength : _typedBytesContentReader.remaining());
if (count == 0)
{
return -1;
}
else
{
- _data.get(bytes, 0, count);
+ _typedBytesContentReader.readRawBytes(bytes, 0, count);
return count;
}
}
+
public void writeBoolean(boolean b) throws JMSException
{
checkWritable();
- _changedData = true;
- _data.put(b ? (byte) 1 : (byte) 0);
+ _typedBytesContentWriter.writeBooleanImpl(b);
}
public void writeByte(byte b) throws JMSException
{
checkWritable();
- _changedData = true;
- _data.put(b);
+ _typedBytesContentWriter.writeByteImpl(b);
}
public void writeShort(short i) throws JMSException
{
checkWritable();
- _changedData = true;
- _data.putShort(i);
+ _typedBytesContentWriter.writeShortImpl(i);
}
public void writeChar(char c) throws JMSException
{
checkWritable();
- _changedData = true;
- _data.putChar(c);
+ _typedBytesContentWriter.writeCharImpl(c);
}
public void writeInt(int i) throws JMSException
{
checkWritable();
- _changedData = true;
- _data.putInt(i);
+ _typedBytesContentWriter.writeIntImpl(i);
}
public void writeLong(long l) throws JMSException
{
checkWritable();
- _changedData = true;
- _data.putLong(l);
+ _typedBytesContentWriter.writeLongImpl(l);
}
public void writeFloat(float v) throws JMSException
{
checkWritable();
- _changedData = true;
- _data.putFloat(v);
+ _typedBytesContentWriter.writeFloatImpl(v);
}
public void writeDouble(double v) throws JMSException
{
checkWritable();
- _changedData = true;
- _data.putDouble(v);
+ _typedBytesContentWriter.writeDoubleImpl(v);
}
public void writeUTF(String string) throws JMSException
{
checkWritable();
- try
- {
- CharsetEncoder encoder = Charset.forName("UTF-8").newEncoder();
- java.nio.ByteBuffer encodedString = encoder.encode(CharBuffer.wrap(string));
-
- _data.putShort((short)encodedString.limit());
- _data.put(encodedString);
- _changedData = true;
- //_data.putString(string, Charset.forName("UTF-8").newEncoder());
- // we must add the null terminator manually
- //_data.put((byte)0);
- }
- catch (CharacterCodingException e)
- {
- JMSException jmse = new JMSException("Unable to encode string: " + e);
- jmse.setLinkedException(e);
- jmse.initCause(e);
- throw jmse;
- }
+ _typedBytesContentWriter.writeLengthPrefixedUTF(string);
}
public void writeBytes(byte[] bytes) throws JMSException
{
- checkWritable();
- _data.put(bytes);
- _changedData = true;
+ writeBytes(bytes, 0, bytes.length);
}
public void writeBytes(byte[] bytes, int offset, int length) throws JMSException
{
checkWritable();
- _data.put(bytes, offset, length);
- _changedData = true;
+ _typedBytesContentWriter.writeBytesRaw(bytes, offset, length);
}
public void writeObject(Object object) throws JMSException
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSBytesMessageFactory.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSBytesMessageFactory.java
index cb04ebee1b..89561b88eb 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSBytesMessageFactory.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSBytesMessageFactory.java
@@ -22,11 +22,12 @@ package org.apache.qpid.client.message;
import javax.jms.JMSException;
-import org.apache.mina.common.ByteBuffer;
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.BasicContentHeaderProperties;
+import java.nio.ByteBuffer;
+
public class JMSBytesMessageFactory extends AbstractJMSMessageFactory
{
protected AbstractJMSMessage createMessage(AMQMessageDelegate delegate, ByteBuffer data) throws AMQException
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSHeaderAdapter.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSHeaderAdapter.java
index e295d4a2a0..52c0eb263b 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSHeaderAdapter.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSHeaderAdapter.java
@@ -20,12 +20,15 @@
*/
package org.apache.qpid.client.message;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
import java.util.Enumeration;
import javax.jms.JMSException;
import javax.jms.MessageFormatException;
-import org.apache.mina.common.ByteBuffer;
+import java.nio.ByteBuffer;
import org.apache.qpid.AMQPInvalidClassException;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.FieldTable;
@@ -282,7 +285,7 @@ public final class JMSHeaderAdapter
s = String.valueOf(o);
}
}
- }//else return s // null;
+ }//else return s // null;
}
return s;
@@ -458,9 +461,29 @@ public final class JMSHeaderAdapter
return getHeaders().isEmpty();
}
- public void writeToBuffer(ByteBuffer data)
+ public void writeToBuffer(final ByteBuffer data)
{
- getHeaders().writeToBuffer(data);
+ try
+ {
+ getHeaders().writeToBuffer(new DataOutputStream(new OutputStream()
+ {
+ @Override
+ public void write(final int b)
+ {
+ data.put((byte)b);
+ }
+
+ @Override
+ public void write(final byte[] b, final int off, final int len)
+ {
+ data.put(b, off, len);
+ }
+ }));
+ }
+ catch (IOException e)
+ {
+ throw new IllegalArgumentException("Unexpected IO Exception - should never happen", e);
+ }
}
public Enumeration getMapNames()
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSMapMessage.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSMapMessage.java
index 306ffeeadf..fad24a968e 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSMapMessage.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSMapMessage.java
@@ -20,11 +20,8 @@
*/
package org.apache.qpid.client.message;
-import org.apache.mina.common.ByteBuffer;
-
import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.BasicContentHeaderProperties;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,13 +29,14 @@ import org.slf4j.LoggerFactory;
import javax.jms.JMSException;
import javax.jms.MessageFormatException;
+import java.nio.ByteBuffer;
import java.nio.charset.CharacterCodingException;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
-public class JMSMapMessage extends AbstractBytesTypedMessage implements javax.jms.MapMessage
+public class JMSMapMessage extends AbstractJMSMessage implements javax.jms.MapMessage
{
private static final Logger _logger = LoggerFactory.getLogger(JMSMapMessage.class);
@@ -54,10 +52,10 @@ public class JMSMapMessage extends AbstractBytesTypedMessage implements javax.jm
JMSMapMessage(AMQMessageDelegateFactory delegateFactory, ByteBuffer data) throws JMSException
{
- super(delegateFactory, data); // this instantiates a content header
+ super(delegateFactory, data!=null); // this instantiates a content header
if(data != null)
{
- populateMapFromData();
+ populateMapFromData(data);
}
}
@@ -65,10 +63,10 @@ public class JMSMapMessage extends AbstractBytesTypedMessage implements javax.jm
JMSMapMessage(AMQMessageDelegate delegate, ByteBuffer data) throws AMQException
{
- super(delegate, data);
+ super(delegate, data != null);
try
{
- populateMapFromData();
+ populateMapFromData(data);
}
catch (JMSException je)
{
@@ -89,18 +87,10 @@ public class JMSMapMessage extends AbstractBytesTypedMessage implements javax.jm
return MIME_TYPE;
}
- public ByteBuffer getData()
- {
- // What if _data is null?
- writeMapToData();
-
- return super.getData();
- }
-
@Override
- public void clearBodyImpl() throws JMSException
+ public void clearBody() throws JMSException
{
- super.clearBodyImpl();
+ super.clearBody();
_map.clear();
}
@@ -458,17 +448,18 @@ public class JMSMapMessage extends AbstractBytesTypedMessage implements javax.jm
return _map.containsKey(propName);
}
- protected void populateMapFromData() throws JMSException
+ protected void populateMapFromData(ByteBuffer data) throws JMSException
{
- if (_data != null)
+ TypedBytesContentReader reader = new TypedBytesContentReader(data);
+ if (data != null)
{
- _data.rewind();
+ data.rewind();
- final int entries = readIntImpl();
+ final int entries = reader.readIntImpl();
for (int i = 0; i < entries; i++)
{
- String propName = readStringImpl();
- Object value = readObject();
+ String propName = reader.readStringImpl();
+ Object value = reader.readObject();
_map.put(propName, value);
}
}
@@ -478,35 +469,21 @@ public class JMSMapMessage extends AbstractBytesTypedMessage implements javax.jm
}
}
- protected void writeMapToData()
+ public ByteBuffer getData()
+ throws JMSException
{
- allocateInitialBuffer();
+ TypedBytesContentWriter writer = new TypedBytesContentWriter();
+
final int size = _map.size();
- writeIntImpl(size);
+ writer.writeIntImpl(size);
for (Map.Entry<String, Object> entry : _map.entrySet())
{
- try
- {
- writeStringImpl(entry.getKey());
- }
- catch (CharacterCodingException e)
- {
- throw new IllegalArgumentException("Cannot encode property key name " + entry.getKey(), e);
-
- }
+ writer.writeNullTerminatedStringImpl(entry.getKey());
- try
- {
- writeObject(entry.getValue());
- }
- catch (JMSException e)
- {
- Object value = entry.getValue();
- throw new IllegalArgumentException("Cannot encode property key name " + entry.getKey() + " value : " + value
- + " (type: " + value.getClass().getName() + ").", e);
- }
+ writer.writeObject(entry.getValue());
}
+ return writer.getData();
}
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSMapMessageFactory.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSMapMessageFactory.java
index eccb90560b..89408a5c3c 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSMapMessageFactory.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSMapMessageFactory.java
@@ -14,18 +14,16 @@
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
- * under the License.
+ * under the License.
+ *
*
- *
*/
package org.apache.qpid.client.message;
import javax.jms.JMSException;
-import org.apache.mina.common.ByteBuffer;
+import java.nio.ByteBuffer;
import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.BasicContentHeaderProperties;
public class JMSMapMessageFactory extends AbstractJMSMessageFactory
{
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessage.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessage.java
index 637d9dd692..c981c951c3 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessage.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessage.java
@@ -20,26 +20,28 @@
*/
package org.apache.qpid.client.message;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
+import java.io.*;
+import java.nio.ByteBuffer;
import javax.jms.JMSException;
import javax.jms.MessageFormatException;
import javax.jms.ObjectMessage;
-import org.apache.mina.common.ByteBuffer;
-
import org.apache.qpid.AMQException;
+import org.apache.qpid.client.util.ClassLoadingAwareObjectInputStream;
public class JMSObjectMessage extends AbstractJMSMessage implements ObjectMessage
{
public static final String MIME_TYPE = "application/java-object-stream";
+ private static final int DEFAULT_OUTPUT_BUFFER_SIZE = 256;
+
+ private Serializable _readData;
+ private ByteBuffer _data;
+ private Exception _exception;
+
+ private static final ByteBuffer EMPTY_BYTE_BUFFER = ByteBuffer.allocate(0);
- private static final int DEFAULT_BUFFER_SIZE = 1024;
/**
* Creates empty, writable message for use by producers
@@ -47,41 +49,57 @@ public class JMSObjectMessage extends AbstractJMSMessage implements ObjectMessag
*/
public JMSObjectMessage(AMQMessageDelegateFactory delegateFactory)
{
- this(delegateFactory, null);
- }
-
- private JMSObjectMessage(AMQMessageDelegateFactory delegateFactory, ByteBuffer data)
- {
- super(delegateFactory, data);
- if (data == null)
- {
- _data = ByteBuffer.allocate(DEFAULT_BUFFER_SIZE);
- _data.setAutoExpand(true);
- }
-
- setContentType(getMimeType());
+ super(delegateFactory, false);
}
/**
* Creates read only message for delivery to consumers
*/
- JMSObjectMessage(AMQMessageDelegate delegate, ByteBuffer data) throws AMQException
+ JMSObjectMessage(AMQMessageDelegate delegate, final ByteBuffer data) throws AMQException
{
- super(delegate, data);
+ super(delegate, data!=null);
+
+ try
+ {
+ ClassLoadingAwareObjectInputStream in = new ClassLoadingAwareObjectInputStream(new InputStream()
+ {
+
+
+ @Override
+ public int read() throws IOException
+ {
+ return data.get();
+ }
+
+ @Override
+ public int read(byte[] b, int off, int len) throws IOException
+ {
+ len = data.remaining() < len ? data.remaining() : len;
+ data.get(b, off, len);
+ return len;
+ }
+ });
+
+ _readData = (Serializable) in.readObject();
+ }
+ catch (IOException e)
+ {
+ _exception = e;
+ }
+ catch (ClassNotFoundException e)
+ {
+ _exception = e;
+ }
}
- public void clearBodyImpl() throws JMSException
+ public void clearBody() throws JMSException
{
- if (_data != null)
- {
- _data.release();
- _data = null;
- }
-
-
-
+ super.clearBody();
+ _exception = null;
+ _readData = null;
+ _data = null;
}
public String toBodyString() throws JMSException
@@ -94,83 +112,116 @@ public class JMSObjectMessage extends AbstractJMSMessage implements ObjectMessag
return MIME_TYPE;
}
- public void setObject(Serializable serializable) throws JMSException
+ @Override
+ public ByteBuffer getData() throws JMSException
{
- checkWritable();
-
- if (_data == null)
+ if(_exception != null)
+ {
+ final MessageFormatException messageFormatException =
+ new MessageFormatException("Unable to deserialize message");
+ messageFormatException.setLinkedException(_exception);
+ throw messageFormatException;
+ }
+ if(_readData == null)
{
- _data = ByteBuffer.allocate(DEFAULT_BUFFER_SIZE);
- _data.setAutoExpand(true);
+
+ return _data == null ? EMPTY_BYTE_BUFFER : _data.duplicate();
}
else
{
- _data.rewind();
+ try
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(DEFAULT_OUTPUT_BUFFER_SIZE);
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(_readData);
+ oos.flush();
+ return ByteBuffer.wrap(baos.toByteArray());
+ }
+ catch (IOException e)
+ {
+ final JMSException jmsException = new JMSException("Unable to encode object of type: " +
+ _readData.getClass().getName() + ", value " + _readData);
+ jmsException.setLinkedException(e);
+ throw jmsException;
+ }
}
+ }
+
+ public void setObject(Serializable serializable) throws JMSException
+ {
+ checkWritable();
+ clearBody();
try
{
- ObjectOutputStream out = new ObjectOutputStream(_data.asOutputStream());
- out.writeObject(serializable);
- out.flush();
- out.close();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream(DEFAULT_OUTPUT_BUFFER_SIZE);
+ ObjectOutputStream oos = new ObjectOutputStream(baos);
+ oos.writeObject(serializable);
+ oos.flush();
+ _data = ByteBuffer.wrap(baos.toByteArray());
}
catch (IOException e)
{
- MessageFormatException mfe = new MessageFormatException("Message not serializable: " + e);
- mfe.setLinkedException(e);
- mfe.initCause(e);
- throw mfe;
+ final JMSException jmsException = new JMSException("Unable to encode object of type: " +
+ serializable.getClass().getName() + ", value " + serializable);
+ jmsException.setLinkedException(e);
+ throw jmsException;
}
}
public Serializable getObject() throws JMSException
{
- ObjectInputStream in = null;
- if (_data == null)
+ if(_exception != null)
{
- return null;
+ final MessageFormatException messageFormatException = new MessageFormatException("Unable to deserialize message");
+ messageFormatException.setLinkedException(_exception);
+ throw messageFormatException;
}
-
- try
+ else if(_readData != null || _data == null)
{
- _data.rewind();
- in = new ObjectInputStream(_data.asInputStream());
-
- return (Serializable) in.readObject();
+ return _readData;
}
- catch (IOException e)
- {
- MessageFormatException mfe = new MessageFormatException("Could not deserialize message: " + e);
- mfe.setLinkedException(e);
- mfe.initCause(e);
- throw mfe;
- }
- catch (ClassNotFoundException e)
- {
- MessageFormatException mfe = new MessageFormatException("Could not deserialize message: " + e);
- mfe.setLinkedException(e);
- mfe.initCause(e);
- throw mfe;
- }
- finally
+ else
{
- // _data.rewind();
- close(in);
- }
- }
+ Exception exception = null;
- private static void close(InputStream in)
- {
- try
- {
- if (in != null)
+ final ByteBuffer data = _data.duplicate();
+ try
+ {
+ ClassLoadingAwareObjectInputStream in = new ClassLoadingAwareObjectInputStream(new InputStream()
+ {
+ @Override
+ public int read() throws IOException
+ {
+ return data.get();
+ }
+
+ @Override
+ public int read(byte[] b, int off, int len) throws IOException
+ {
+ len = data.remaining() < len ? data.remaining() : len;
+ data.get(b, off, len);
+ return len;
+ }
+ });
+
+ return (Serializable) in.readObject();
+ }
+ catch (ClassNotFoundException e)
+ {
+ exception = e;
+ }
+ catch (IOException e)
{
- in.close();
+ exception = e;
}
+
+ JMSException jmsException = new JMSException("Could not deserialize object");
+ jmsException.setLinkedException(exception);
+ throw jmsException;
}
- catch (IOException ignore)
- { }
+
}
+
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessageFactory.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessageFactory.java
index 03851dfa01..4660c91c1f 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessageFactory.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSObjectMessageFactory.java
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -22,10 +22,8 @@ package org.apache.qpid.client.message;
import javax.jms.JMSException;
-import org.apache.mina.common.ByteBuffer;
+import java.nio.ByteBuffer;
import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.BasicContentHeaderProperties;
public class JMSObjectMessageFactory extends AbstractJMSMessageFactory
{
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessage.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessage.java
index ad2620852b..5c93f6b6f0 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessage.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessage.java
@@ -23,7 +23,8 @@ package org.apache.qpid.client.message;
import javax.jms.JMSException;
import javax.jms.StreamMessage;
-import org.apache.mina.common.ByteBuffer;
+import java.nio.ByteBuffer;
+
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.BasicContentHeaderProperties;
@@ -36,65 +37,76 @@ public class JMSStreamMessage extends AbstractBytesTypedMessage implements Strea
public static final String MIME_TYPE="jms/stream-message";
-
- /**
- * This is set when reading a byte array. The readBytes(byte[]) method supports multiple calls to read
- * a byte array in multiple chunks, hence this is used to track how much is left to be read
- */
- private int _byteArrayRemaining = -1;
+ private TypedBytesContentReader _typedBytesContentReader;
+ private TypedBytesContentWriter _typedBytesContentWriter;
public JMSStreamMessage(AMQMessageDelegateFactory delegateFactory)
{
- this(delegateFactory,null);
+ super(delegateFactory,false);
+ _typedBytesContentWriter = new TypedBytesContentWriter();
}
- /**
- * Construct a stream message with existing data.
- *
- * @param delegateFactory
- * @param data the data that comprises this message. If data is null, you get a 1024 byte buffer that is
- */
- JMSStreamMessage(AMQMessageDelegateFactory delegateFactory, ByteBuffer data)
- {
- super(delegateFactory, data); // this instanties a content header
- }
JMSStreamMessage(AMQMessageDelegate delegate, ByteBuffer data) throws AMQException
{
-
- super(delegate, data);
+ super(delegate, data!=null);
+ _typedBytesContentReader = new TypedBytesContentReader(data);
}
-
public void reset()
{
- super.reset();
_readableMessage = true;
+
+ if(_typedBytesContentReader != null)
+ {
+ _typedBytesContentReader.reset();
+ }
+ else if (_typedBytesContentWriter != null)
+ {
+ _typedBytesContentReader = new TypedBytesContentReader(_typedBytesContentWriter.getData());
+ }
+ }
+
+ @Override
+ public void clearBody() throws JMSException
+ {
+ super.clearBody();
+ _typedBytesContentReader = null;
+ _typedBytesContentWriter = new TypedBytesContentWriter();
+
}
+
protected String getMimeType()
{
return MIME_TYPE;
}
-
+ @Override
+ public java.nio.ByteBuffer getData() throws JMSException
+ {
+ return _typedBytesContentWriter == null ? _typedBytesContentReader.getData() : _typedBytesContentWriter.getData();
+ }
public boolean readBoolean() throws JMSException
{
- return super.readBoolean();
+ checkReadable();
+ return _typedBytesContentReader.readBoolean();
}
public byte readByte() throws JMSException
{
- return super.readByte();
+ checkReadable();
+ return _typedBytesContentReader.readByte();
}
public short readShort() throws JMSException
{
- return super.readShort();
+ checkReadable();
+ return _typedBytesContentReader.readShort();
}
/**
@@ -105,102 +117,127 @@ public class JMSStreamMessage extends AbstractBytesTypedMessage implements Strea
*/
public char readChar() throws JMSException
{
- return super.readChar();
+ checkReadable();
+ return _typedBytesContentReader.readChar();
}
public int readInt() throws JMSException
{
- return super.readInt();
+ checkReadable();
+ return _typedBytesContentReader.readInt();
}
public long readLong() throws JMSException
{
- return super.readLong();
+ checkReadable();
+ return _typedBytesContentReader.readLong();
}
public float readFloat() throws JMSException
{
- return super.readFloat();
+ checkReadable();
+ return _typedBytesContentReader.readFloat();
}
public double readDouble() throws JMSException
{
- return super.readDouble();
+ checkReadable();
+ return _typedBytesContentReader.readDouble();
}
public String readString() throws JMSException
{
- return super.readString();
+ checkReadable();
+ return _typedBytesContentReader.readString();
}
public int readBytes(byte[] bytes) throws JMSException
{
- return super.readBytes(bytes);
+ if(bytes == null)
+ {
+ throw new IllegalArgumentException("Must provide non-null array to read into");
+ }
+
+ checkReadable();
+ return _typedBytesContentReader.readBytes(bytes);
}
public Object readObject() throws JMSException
{
- return super.readObject();
+ checkReadable();
+ return _typedBytesContentReader.readObject();
}
public void writeBoolean(boolean b) throws JMSException
{
- super.writeBoolean(b);
+ checkWritable();
+ _typedBytesContentWriter.writeBoolean(b);
}
public void writeByte(byte b) throws JMSException
{
- super.writeByte(b);
+ checkWritable();
+ _typedBytesContentWriter.writeByte(b);
}
public void writeShort(short i) throws JMSException
{
- super.writeShort(i);
+ checkWritable();
+ _typedBytesContentWriter.writeShort(i);
}
public void writeChar(char c) throws JMSException
{
- super.writeChar(c);
+ checkWritable();
+ _typedBytesContentWriter.writeChar(c);
}
public void writeInt(int i) throws JMSException
{
- super.writeInt(i);
+ checkWritable();
+ _typedBytesContentWriter.writeInt(i);
}
public void writeLong(long l) throws JMSException
{
- super.writeLong(l);
+ checkWritable();
+ _typedBytesContentWriter.writeLong(l);
}
public void writeFloat(float v) throws JMSException
{
- super.writeFloat(v);
+ checkWritable();
+ _typedBytesContentWriter.writeFloat(v);
}
public void writeDouble(double v) throws JMSException
{
- super.writeDouble(v);
+ checkWritable();
+ _typedBytesContentWriter.writeDouble(v);
}
public void writeString(String string) throws JMSException
{
- super.writeString(string);
+ checkWritable();
+ _typedBytesContentWriter.writeString(string);
}
public void writeBytes(byte[] bytes) throws JMSException
{
- super.writeBytes(bytes);
+ checkWritable();
+ _typedBytesContentWriter.writeBytes(bytes);
}
public void writeBytes(byte[] bytes, int offset, int length) throws JMSException
{
- super.writeBytes(bytes,offset,length);
+ checkWritable();
+ _typedBytesContentWriter.writeBytes(bytes, offset, length);
}
public void writeObject(Object object) throws JMSException
{
- super.writeObject(object);
+ checkWritable();
+ _typedBytesContentWriter.writeObject(object);
}
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessageFactory.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessageFactory.java
index 5e25db9ae0..359f5157f3 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessageFactory.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSStreamMessageFactory.java
@@ -22,10 +22,9 @@ package org.apache.qpid.client.message;
import javax.jms.JMSException;
-import org.apache.mina.common.ByteBuffer;
+import java.nio.ByteBuffer;
+
import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.framing.BasicContentHeaderProperties;
public class JMSStreamMessageFactory extends AbstractJMSMessageFactory
{
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSTextMessage.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSTextMessage.java
index fc2006a119..acf3a0ca14 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSTextMessage.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSTextMessage.java
@@ -20,15 +20,21 @@
*/
package org.apache.qpid.client.message;
+import java.io.DataInputStream;
import java.io.UnsupportedEncodingException;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CharsetEncoder;
import javax.jms.JMSException;
+import javax.jms.MessageFormatException;
-import org.apache.mina.common.ByteBuffer;
import org.apache.qpid.AMQException;
import org.apache.qpid.client.CustomJMSXProperty;
+import org.apache.qpid.framing.AMQFrameDecodingException;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.BasicContentHeaderProperties;
import org.apache.qpid.util.Strings;
@@ -37,6 +43,7 @@ public class JMSTextMessage extends AbstractJMSMessage implements javax.jms.Text
{
private static final String MIME_TYPE = "text/plain";
+ private Exception _exception;
private String _decodedValue;
/**
@@ -45,36 +52,41 @@ public class JMSTextMessage extends AbstractJMSMessage implements javax.jms.Text
private static final String PAYLOAD_NULL_PROPERTY = CustomJMSXProperty.JMS_AMQP_NULL.toString();
private static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
- public JMSTextMessage(AMQMessageDelegateFactory delegateFactory) throws JMSException
- {
- this(delegateFactory, null, null);
- }
+ private CharsetDecoder _decoder = DEFAULT_CHARSET.newDecoder();
+ private CharsetEncoder _encoder = DEFAULT_CHARSET.newEncoder();
+
+ private static final ByteBuffer EMPTY_BYTE_BUFFER = ByteBuffer.allocate(0);
- JMSTextMessage(AMQMessageDelegateFactory delegateFactory, ByteBuffer data, String encoding) throws JMSException
+ public JMSTextMessage(AMQMessageDelegateFactory delegateFactory) throws JMSException
{
- super(delegateFactory, data); // this instantiates a content header
- setContentType(getMimeType());
- setEncoding(encoding);
+ super(delegateFactory, false); // this instantiates a content header
}
JMSTextMessage(AMQMessageDelegate delegate, ByteBuffer data)
throws AMQException
{
- super(delegate, data);
- setContentType(getMimeType());
- _data = data;
- }
+ super(delegate, data!=null);
-
- public void clearBodyImpl() throws JMSException
- {
- if (_data != null)
+ try
{
- _data.release();
- _data = null;
+ if(propertyExists(PAYLOAD_NULL_PROPERTY))
+ {
+ _decodedValue = null;
+ }
+ else
+ {
+ _decodedValue = _decoder.decode(data).toString();
+ }
+ }
+ catch (CharacterCodingException e)
+ {
+ _exception = e;
+ }
+ catch (JMSException e)
+ {
+ _exception = e;
}
- _decodedValue = null;
}
public String toBodyString() throws JMSException
@@ -87,95 +99,62 @@ public class JMSTextMessage extends AbstractJMSMessage implements javax.jms.Text
return MIME_TYPE;
}
- public void setText(String text) throws JMSException
+ @Override
+ public ByteBuffer getData() throws JMSException
{
- checkWritable();
-
- clearBody();
+ _encoder.reset();
try
{
- if (text != null)
+ if(_exception != null)
+ {
+ final MessageFormatException messageFormatException = new MessageFormatException("Cannot decode original message");
+ messageFormatException.setLinkedException(_exception);
+ throw messageFormatException;
+ }
+ else if(_decodedValue == null)
+ {
+ return EMPTY_BYTE_BUFFER;
+ }
+ else
{
- final String encoding = getEncoding();
- if (encoding == null || encoding.equalsIgnoreCase("UTF-8"))
- {
- _data = ByteBuffer.wrap(Strings.toUTF8(text));
- setEncoding("UTF-8");
- }
- else
- {
- _data = ByteBuffer.wrap(text.getBytes(encoding));
- }
- _data.position(_data.limit());
- _changedData=true;
+ return _encoder.encode(CharBuffer.wrap(_decodedValue));
}
- _decodedValue = text;
}
- catch (UnsupportedEncodingException e)
+ catch (CharacterCodingException e)
{
- // should never occur
- JMSException jmse = new JMSException("Unable to decode text data");
- jmse.setLinkedException(e);
- jmse.initCause(e);
- throw jmse;
+ final JMSException jmsException = new JMSException("Cannot encode string in UFT-8: " + _decodedValue);
+ jmsException.setLinkedException(e);
+ throw jmsException;
}
}
- public String getText() throws JMSException
+ @Override
+ public void clearBody() throws JMSException
{
- if (_data == null && _decodedValue == null)
- {
- return null;
- }
- else if (_decodedValue != null)
- {
- return _decodedValue;
- }
- else
- {
- _data.rewind();
+ super.clearBody();
+ _decodedValue = null;
+ _exception = null;
+ }
- if (propertyExists(PAYLOAD_NULL_PROPERTY) && getBooleanProperty(PAYLOAD_NULL_PROPERTY))
- {
- return null;
- }
- if (getEncoding() != null)
- {
- try
- {
- _decodedValue = _data.getString(Charset.forName(getEncoding()).newDecoder());
- }
- catch (CharacterCodingException e)
- {
- JMSException jmse = new JMSException("Could not decode string data: " + e);
- jmse.setLinkedException(e);
- jmse.initCause(e);
- throw jmse;
- }
- }
- else
- {
- try
- {
- _decodedValue = _data.getString(DEFAULT_CHARSET.newDecoder());
- }
- catch (CharacterCodingException e)
- {
- JMSException jmse = new JMSException("Could not decode string data: " + e);
- jmse.setLinkedException(e);
- jmse.initCause(e);
- throw jmse;
- }
- }
- return _decodedValue;
- }
+ public void setText(String text) throws JMSException
+ {
+ checkWritable();
+
+ clearBody();
+ _decodedValue = text;
+
+ }
+
+ public String getText() throws JMSException
+ {
+ return _decodedValue;
}
@Override
public void prepareForSending() throws JMSException
{
super.prepareForSending();
- if (_data == null)
+ if (_decodedValue == null)
{
setBooleanProperty(PAYLOAD_NULL_PROPERTY, true);
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSTextMessageFactory.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSTextMessageFactory.java
index 1f4d64c78f..d1af32c10a 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSTextMessageFactory.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/JMSTextMessageFactory.java
@@ -22,7 +22,7 @@ package org.apache.qpid.client.message;
import javax.jms.JMSException;
-import org.apache.mina.common.ByteBuffer;
+import java.nio.ByteBuffer;
import org.apache.qpid.AMQException;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.BasicContentHeaderProperties;
diff --git a/qpid/dotnet/client-010/gentool/MethodDelegate.tpl b/qpid/java/client/src/main/java/org/apache/qpid/client/message/QpidMessageProperties.java
index 788d2e29e6..b30afafa35 100644
--- a/qpid/dotnet/client-010/gentool/MethodDelegate.tpl
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/QpidMessageProperties.java
@@ -18,18 +18,17 @@
* under the License.
*
*/
+package org.apache.qpid.client.message;
-namespace org.apache.qpid.transport
+/**
+ * Place holder for Qpid specific message properties
+ */
+public class QpidMessageProperties
{
-public abstract class MethodDelegate<C> {
-
-${
-from genutil import *
-
-for c in composites:
- name = cname(c)
- out(" public virtual void $(name)(C context, $name mystruct) {}\n")
-}
-}
+ public static final String QPID_SUBJECT = "qpid.subject";
+
+ // AMQP 0-10 related properties
+ public static final String AMQP_0_10_APP_ID = "x-amqp-0-10.app-id";
+ public static final String AMQP_0_10_ROUTING_KEY = "x-amqp-0-10.routing-key";
}
diff --git a/qpid/dotnet/client-010/gentool/Option.tpl b/qpid/java/client/src/main/java/org/apache/qpid/client/message/TypedBytesCodes.java
index d6e1a44870..26a0b41cdc 100644
--- a/qpid/dotnet/client-010/gentool/Option.tpl
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/TypedBytesCodes.java
@@ -18,25 +18,29 @@
* under the License.
*
*/
+package org.apache.qpid.client.message;
-namespace org.apache.qpid.transport
+public interface TypedBytesCodes
{
-public enum Option {
-
-${
-from genutil import *
-
-options = {}
-
-for c in composites:
- for f in c.query["field"]:
- t = resolve_type(f)
- if t["@name"] == "bit":
- option = scream(f["@name"])
- if not options.has_key(option):
- options[option] = None
- out(" $option,\n")}
- BATCH,
- NONE
-}
+ static final byte BOOLEAN_TYPE = (byte) 1;
+
+ static final byte BYTE_TYPE = (byte) 2;
+
+ static final byte BYTEARRAY_TYPE = (byte) 3;
+
+ static final byte SHORT_TYPE = (byte) 4;
+
+ static final byte CHAR_TYPE = (byte) 5;
+
+ static final byte INT_TYPE = (byte) 6;
+
+ static final byte LONG_TYPE = (byte) 7;
+
+ static final byte FLOAT_TYPE = (byte) 8;
+
+ static final byte DOUBLE_TYPE = (byte) 9;
+
+ static final byte STRING_TYPE = (byte) 10;
+
+ static final byte NULL_STRING_TYPE = (byte) 11;
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/TypedBytesContentReader.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/TypedBytesContentReader.java
new file mode 100644
index 0000000000..1ae25eb1ed
--- /dev/null
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/TypedBytesContentReader.java
@@ -0,0 +1,674 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.client.message;
+
+import javax.jms.JMSException;
+import javax.jms.MessageEOFException;
+import javax.jms.MessageFormatException;
+import javax.jms.MessageNotReadableException;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.CharacterCodingException;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+
+class TypedBytesContentReader implements TypedBytesCodes
+{
+
+ private final ByteBuffer _data;
+ private final int _position;
+ private final int _limit;
+
+
+ private static final Charset UTF8_CHARSET = Charset.forName("UTF-8");
+
+ private final CharsetDecoder _charsetDecoder = UTF8_CHARSET.newDecoder();
+
+ private int _byteArrayRemaining = -1;
+
+
+ public TypedBytesContentReader(final ByteBuffer data)
+ {
+ _data = data.duplicate();
+ _position = _data.position();
+ _limit = _data.limit();
+ }
+
+ /**
+ * Check that there is at least a certain number of bytes available to read
+ *
+ * @param len the number of bytes
+ * @throws javax.jms.MessageEOFException if there are less than len bytes available to read
+ */
+ protected void checkAvailable(int len) throws MessageEOFException
+ {
+ if (_data.remaining() < len)
+ {
+ throw new MessageEOFException("Unable to read " + len + " bytes");
+ }
+ }
+
+ protected byte readWireType() throws MessageFormatException, MessageEOFException,
+ MessageNotReadableException
+ {
+ checkAvailable(1);
+ return _data.get();
+ }
+
+ protected boolean readBoolean() throws JMSException
+ {
+ int position = _data.position();
+ byte wireType = readWireType();
+ boolean result;
+ try
+ {
+ switch (wireType)
+ {
+ case BOOLEAN_TYPE:
+ checkAvailable(1);
+ result = readBooleanImpl();
+ break;
+ case STRING_TYPE:
+ checkAvailable(1);
+ result = Boolean.parseBoolean(readStringImpl());
+ break;
+ default:
+ _data.position(position);
+ throw new MessageFormatException("Unable to convert " + wireType + " to a boolean");
+ }
+ return result;
+ }
+ catch (RuntimeException e)
+ {
+ _data.position(position);
+ throw e;
+ }
+ }
+
+ boolean readBooleanImpl()
+ {
+ return _data.get() != 0;
+ }
+
+ protected byte readByte() throws JMSException
+ {
+ int position = _data.position();
+ byte wireType = readWireType();
+ byte result;
+ try
+ {
+ switch (wireType)
+ {
+ case BYTE_TYPE:
+ checkAvailable(1);
+ result = readByteImpl();
+ break;
+ case STRING_TYPE:
+ checkAvailable(1);
+ result = Byte.parseByte(readStringImpl());
+ break;
+ default:
+ _data.position(position);
+ throw new MessageFormatException("Unable to convert " + wireType + " to a byte");
+ }
+ }
+ catch (RuntimeException e)
+ {
+ _data.position(position);
+ throw e;
+ }
+ return result;
+ }
+
+ byte readByteImpl()
+ {
+ return _data.get();
+ }
+
+ protected short readShort() throws JMSException
+ {
+ int position = _data.position();
+ byte wireType = readWireType();
+ short result;
+ try
+ {
+ switch (wireType)
+ {
+ case SHORT_TYPE:
+ checkAvailable(2);
+ result = readShortImpl();
+ break;
+ case STRING_TYPE:
+ checkAvailable(1);
+ result = Short.parseShort(readStringImpl());
+ break;
+ case BYTE_TYPE:
+ checkAvailable(1);
+ result = readByteImpl();
+ break;
+ default:
+ _data.position(position);
+ throw new MessageFormatException("Unable to convert " + wireType + " to a short");
+ }
+ }
+ catch (RuntimeException e)
+ {
+ _data.position(position);
+ throw e;
+ }
+ return result;
+ }
+
+ short readShortImpl()
+ {
+ return _data.getShort();
+ }
+
+ /**
+ * Note that this method reads a unicode character as two bytes from the stream
+ *
+ * @return the character read from the stream
+ * @throws javax.jms.JMSException
+ */
+ protected char readChar() throws JMSException
+ {
+ int position = _data.position();
+ byte wireType = readWireType();
+ try
+ {
+ if (wireType == NULL_STRING_TYPE)
+ {
+ throw new NullPointerException();
+ }
+
+ if (wireType != CHAR_TYPE)
+ {
+ _data.position(position);
+ throw new MessageFormatException("Unable to convert " + wireType + " to a char");
+ }
+ else
+ {
+ checkAvailable(2);
+ return readCharImpl();
+ }
+ }
+ catch (RuntimeException e)
+ {
+ _data.position(position);
+ throw e;
+ }
+ }
+
+ char readCharImpl()
+ {
+ return _data.getChar();
+ }
+
+ protected int readInt() throws JMSException
+ {
+ int position = _data.position();
+ byte wireType = readWireType();
+ int result;
+ try
+ {
+ switch (wireType)
+ {
+ case INT_TYPE:
+ checkAvailable(4);
+ result = readIntImpl();
+ break;
+ case SHORT_TYPE:
+ checkAvailable(2);
+ result = readShortImpl();
+ break;
+ case STRING_TYPE:
+ checkAvailable(1);
+ result = Integer.parseInt(readStringImpl());
+ break;
+ case BYTE_TYPE:
+ checkAvailable(1);
+ result = readByteImpl();
+ break;
+ default:
+ _data.position(position);
+ throw new MessageFormatException("Unable to convert " + wireType + " to an int");
+ }
+ return result;
+ }
+ catch (RuntimeException e)
+ {
+ _data.position(position);
+ throw e;
+ }
+ }
+
+ protected int readIntImpl()
+ {
+ return _data.getInt();
+ }
+
+ protected long readLong() throws JMSException
+ {
+ int position = _data.position();
+ byte wireType = readWireType();
+ long result;
+ try
+ {
+ switch (wireType)
+ {
+ case LONG_TYPE:
+ checkAvailable(8);
+ result = readLongImpl();
+ break;
+ case INT_TYPE:
+ checkAvailable(4);
+ result = readIntImpl();
+ break;
+ case SHORT_TYPE:
+ checkAvailable(2);
+ result = readShortImpl();
+ break;
+ case STRING_TYPE:
+ checkAvailable(1);
+ result = Long.parseLong(readStringImpl());
+ break;
+ case BYTE_TYPE:
+ checkAvailable(1);
+ result = readByteImpl();
+ break;
+ default:
+ _data.position(position);
+ throw new MessageFormatException("Unable to convert " + wireType + " to a long");
+ }
+ return result;
+ }
+ catch (RuntimeException e)
+ {
+ _data.position(position);
+ throw e;
+ }
+ }
+
+ long readLongImpl()
+ {
+ return _data.getLong();
+ }
+
+ protected float readFloat() throws JMSException
+ {
+ int position = _data.position();
+ byte wireType = readWireType();
+ float result;
+ try
+ {
+ switch (wireType)
+ {
+ case FLOAT_TYPE:
+ checkAvailable(4);
+ result = readFloatImpl();
+ break;
+ case STRING_TYPE:
+ checkAvailable(1);
+ result = Float.parseFloat(readStringImpl());
+ break;
+ default:
+ _data.position(position);
+ throw new MessageFormatException("Unable to convert " + wireType + " to a float");
+ }
+ return result;
+ }
+ catch (RuntimeException e)
+ {
+ _data.position(position);
+ throw e;
+ }
+ }
+
+ float readFloatImpl()
+ {
+ return _data.getFloat();
+ }
+
+ protected double readDouble() throws JMSException
+ {
+ int position = _data.position();
+ byte wireType = readWireType();
+ double result;
+ try
+ {
+ switch (wireType)
+ {
+ case DOUBLE_TYPE:
+ checkAvailable(8);
+ result = readDoubleImpl();
+ break;
+ case FLOAT_TYPE:
+ checkAvailable(4);
+ result = readFloatImpl();
+ break;
+ case STRING_TYPE:
+ checkAvailable(1);
+ result = Double.parseDouble(readStringImpl());
+ break;
+ default:
+ _data.position(position);
+ throw new MessageFormatException("Unable to convert " + wireType + " to a double");
+ }
+ return result;
+ }
+ catch (RuntimeException e)
+ {
+ _data.position(position);
+ throw e;
+ }
+ }
+
+ double readDoubleImpl()
+ {
+ return _data.getDouble();
+ }
+
+ protected String readString() throws JMSException
+ {
+ int position = _data.position();
+ byte wireType = readWireType();
+ String result;
+ try
+ {
+ switch (wireType)
+ {
+ case STRING_TYPE:
+ checkAvailable(1);
+ result = readStringImpl();
+ break;
+ case NULL_STRING_TYPE:
+ result = null;
+ throw new NullPointerException("data is null");
+ case BOOLEAN_TYPE:
+ checkAvailable(1);
+ result = String.valueOf(readBooleanImpl());
+ break;
+ case LONG_TYPE:
+ checkAvailable(8);
+ result = String.valueOf(readLongImpl());
+ break;
+ case INT_TYPE:
+ checkAvailable(4);
+ result = String.valueOf(readIntImpl());
+ break;
+ case SHORT_TYPE:
+ checkAvailable(2);
+ result = String.valueOf(readShortImpl());
+ break;
+ case BYTE_TYPE:
+ checkAvailable(1);
+ result = String.valueOf(readByteImpl());
+ break;
+ case FLOAT_TYPE:
+ checkAvailable(4);
+ result = String.valueOf(readFloatImpl());
+ break;
+ case DOUBLE_TYPE:
+ checkAvailable(8);
+ result = String.valueOf(readDoubleImpl());
+ break;
+ case CHAR_TYPE:
+ checkAvailable(2);
+ result = String.valueOf(readCharImpl());
+ break;
+ default:
+ _data.position(position);
+ throw new MessageFormatException("Unable to convert " + wireType + " to a String");
+ }
+ return result;
+ }
+ catch (RuntimeException e)
+ {
+ _data.position(position);
+ throw e;
+ }
+ }
+
+ protected String readStringImpl() throws JMSException
+ {
+ try
+ {
+ _charsetDecoder.reset();
+ ByteBuffer dup = _data.duplicate();
+ int pos = _data.position();
+ byte b;
+ while((b = _data.get()) != 0);
+ dup.limit(_data.position()-1);
+ return _charsetDecoder.decode(dup).toString();
+
+ }
+ catch (CharacterCodingException e)
+ {
+ JMSException jmse = new JMSException("Error decoding byte stream as a UTF8 string: " + e);
+ jmse.setLinkedException(e);
+ jmse.initCause(e);
+ throw jmse;
+ }
+ }
+
+ protected int readBytes(byte[] bytes) throws JMSException
+ {
+ if (bytes == null)
+ {
+ throw new IllegalArgumentException("byte array must not be null");
+ }
+ // first call
+ if (_byteArrayRemaining == -1)
+ {
+ // type discriminator checked separately so you get a MessageFormatException rather than
+ // an EOF even in the case where both would be applicable
+ checkAvailable(1);
+ byte wireType = readWireType();
+ if (wireType != BYTEARRAY_TYPE)
+ {
+ throw new MessageFormatException("Unable to convert " + wireType + " to a byte array");
+ }
+ checkAvailable(4);
+ int size = _data.getInt();
+ // length of -1 indicates null
+ if (size == -1)
+ {
+ return -1;
+ }
+ else
+ {
+ if (size > _data.remaining())
+ {
+ throw new MessageEOFException("Byte array has stated length "
+ + size
+ + " but message only contains "
+ +
+ _data.remaining()
+ + " bytes");
+ }
+ else
+ {
+ _byteArrayRemaining = size;
+ }
+ }
+ }
+ else if (_byteArrayRemaining == 0)
+ {
+ _byteArrayRemaining = -1;
+ return -1;
+ }
+
+ int returnedSize = readBytesImpl(bytes);
+ if (returnedSize < bytes.length)
+ {
+ _byteArrayRemaining = -1;
+ }
+ return returnedSize;
+ }
+
+ private int readBytesImpl(byte[] bytes)
+ {
+ int count = (_byteArrayRemaining >= bytes.length ? bytes.length : _byteArrayRemaining);
+ _byteArrayRemaining -= count;
+
+ if (count == 0)
+ {
+ return 0;
+ }
+ else
+ {
+ _data.get(bytes, 0, count);
+ return count;
+ }
+ }
+
+ protected Object readObject() throws JMSException
+ {
+ int position = _data.position();
+ byte wireType = readWireType();
+ Object result = null;
+ try
+ {
+ switch (wireType)
+ {
+ case BOOLEAN_TYPE:
+ checkAvailable(1);
+ result = readBooleanImpl();
+ break;
+ case BYTE_TYPE:
+ checkAvailable(1);
+ result = readByteImpl();
+ break;
+ case BYTEARRAY_TYPE:
+ checkAvailable(4);
+ int size = _data.getInt();
+ if (size == -1)
+ {
+ result = null;
+ }
+ else
+ {
+ _byteArrayRemaining = size;
+ byte[] bytesResult = new byte[size];
+ readBytesImpl(bytesResult);
+ result = bytesResult;
+ }
+ break;
+ case SHORT_TYPE:
+ checkAvailable(2);
+ result = readShortImpl();
+ break;
+ case CHAR_TYPE:
+ checkAvailable(2);
+ result = readCharImpl();
+ break;
+ case INT_TYPE:
+ checkAvailable(4);
+ result = readIntImpl();
+ break;
+ case LONG_TYPE:
+ checkAvailable(8);
+ result = readLongImpl();
+ break;
+ case FLOAT_TYPE:
+ checkAvailable(4);
+ result = readFloatImpl();
+ break;
+ case DOUBLE_TYPE:
+ checkAvailable(8);
+ result = readDoubleImpl();
+ break;
+ case NULL_STRING_TYPE:
+ result = null;
+ break;
+ case STRING_TYPE:
+ checkAvailable(1);
+ result = readStringImpl();
+ break;
+ }
+ return result;
+ }
+ catch (RuntimeException e)
+ {
+ _data.position(position);
+ throw e;
+ }
+ }
+
+ public void reset()
+ {
+ _byteArrayRemaining = -1;
+ _data.position(_position);
+ _data.limit(_limit);
+ }
+
+ public ByteBuffer getData()
+ {
+ ByteBuffer buf = _data.duplicate();
+ buf.position(_position);
+ buf.limit(_limit);
+ return buf;
+ }
+
+ public long size()
+ {
+ return _limit - _position;
+ }
+
+ public int remaining()
+ {
+ return _data.remaining();
+ }
+
+ public void readRawBytes(final byte[] bytes, final int offset, final int count)
+ {
+ _data.get(bytes, offset, count);
+ }
+
+ public String readLengthPrefixedUTF() throws JMSException
+ {
+ try
+ {
+ short length = readShortImpl();
+ if(length == 0)
+ {
+ return "";
+ }
+ else
+ {
+ _charsetDecoder.reset();
+ ByteBuffer encodedString = _data.slice();
+ encodedString.limit(length);
+ _data.position(_data.position()+length);
+ CharBuffer string = _charsetDecoder.decode(encodedString);
+
+ return string.toString();
+ }
+ }
+ catch(CharacterCodingException e)
+ {
+ JMSException jmse = new JMSException("Error decoding byte stream as a UTF8 string: " + e);
+ jmse.setLinkedException(e);
+ jmse.initCause(e);
+ throw jmse;
+ }
+ }
+}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/TypedBytesContentWriter.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/TypedBytesContentWriter.java
new file mode 100644
index 0000000000..7c91db3a32
--- /dev/null
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/TypedBytesContentWriter.java
@@ -0,0 +1,370 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.client.message;
+
+import javax.jms.JMSException;
+import javax.jms.MessageFormatException;
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.CharacterCodingException;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetEncoder;
+
+class TypedBytesContentWriter implements TypedBytesCodes
+{
+ private final ByteArrayOutputStream _baos = new ByteArrayOutputStream();
+ private final DataOutputStream _data = new DataOutputStream(_baos);
+ private static final Charset UTF8 = Charset.forName("UTF-8");
+
+ protected void writeTypeDiscriminator(byte type) throws JMSException
+ {
+ try
+ {
+ _data.writeByte(type);
+ }
+ catch (IOException e)
+ {
+ throw handle(e);
+ }
+ }
+
+ private JMSException handle(final IOException e)
+ {
+ JMSException jmsEx = new JMSException("Unable to write value: " + e.getMessage());
+ jmsEx.setLinkedException(e);
+ return jmsEx;
+ }
+
+
+ protected void writeBoolean(boolean b) throws JMSException
+ {
+ writeTypeDiscriminator(BOOLEAN_TYPE);
+ writeBooleanImpl(b);
+ }
+
+ public void writeBooleanImpl(final boolean b) throws JMSException
+ {
+ try
+ {
+ _data.writeByte(b ? (byte) 1 : (byte) 0);
+ }
+ catch (IOException e)
+ {
+ throw handle(e);
+ }
+ }
+
+ protected void writeByte(byte b) throws JMSException
+ {
+ writeTypeDiscriminator(BYTE_TYPE);
+ writeByteImpl(b);
+ }
+
+ public void writeByteImpl(final byte b) throws JMSException
+ {
+ try
+ {
+ _data.writeByte(b);
+ }
+ catch (IOException e)
+ {
+ throw handle(e);
+ }
+ }
+
+ protected void writeShort(short i) throws JMSException
+ {
+ writeTypeDiscriminator(SHORT_TYPE);
+ writeShortImpl(i);
+ }
+
+ public void writeShortImpl(final short i) throws JMSException
+ {
+ try
+ {
+ _data.writeShort(i);
+ }
+ catch (IOException e)
+ {
+ throw handle(e);
+ }
+ }
+
+ protected void writeChar(char c) throws JMSException
+ {
+ writeTypeDiscriminator(CHAR_TYPE);
+ writeCharImpl(c);
+ }
+
+ public void writeCharImpl(final char c) throws JMSException
+ {
+ try
+ {
+ _data.writeChar(c);
+ }
+ catch (IOException e)
+ {
+ throw handle(e);
+ }
+ }
+
+ protected void writeInt(int i) throws JMSException
+ {
+ writeTypeDiscriminator(INT_TYPE);
+ writeIntImpl(i);
+ }
+
+ protected void writeIntImpl(int i) throws JMSException
+ {
+ try
+ {
+ _data.writeInt(i);
+ }
+ catch (IOException e)
+ {
+ throw handle(e);
+ }
+ }
+
+ protected void writeLong(long l) throws JMSException
+ {
+ writeTypeDiscriminator(LONG_TYPE);
+ writeLongImpl(l);
+ }
+
+ public void writeLongImpl(final long l) throws JMSException
+ {
+ try
+ {
+ _data.writeLong(l);
+ }
+ catch (IOException e)
+ {
+ throw handle(e);
+ }
+ }
+
+ protected void writeFloat(float v) throws JMSException
+ {
+ writeTypeDiscriminator(FLOAT_TYPE);
+ writeFloatImpl(v);
+ }
+
+ public void writeFloatImpl(final float v) throws JMSException
+ {
+ try
+ {
+ _data.writeFloat(v);
+ }
+ catch (IOException e)
+ {
+ throw handle(e);
+ }
+ }
+
+ protected void writeDouble(double v) throws JMSException
+ {
+ writeTypeDiscriminator(DOUBLE_TYPE);
+ writeDoubleImpl(v);
+ }
+
+ public void writeDoubleImpl(final double v) throws JMSException
+ {
+ try
+ {
+ _data.writeDouble(v);
+ }
+ catch (IOException e)
+ {
+ throw handle(e);
+ }
+ }
+
+ protected void writeString(String string) throws JMSException
+ {
+ if (string == null)
+ {
+ writeTypeDiscriminator(NULL_STRING_TYPE);
+ }
+ else
+ {
+ writeTypeDiscriminator(STRING_TYPE);
+ writeNullTerminatedStringImpl(string);
+ }
+ }
+
+ protected void writeNullTerminatedStringImpl(String string)
+ throws JMSException
+ {
+ try
+ {
+ _data.write(string.getBytes(UTF8));
+ _data.writeByte((byte) 0);
+ }
+ catch (IOException e)
+ {
+ throw handle(e);
+ }
+
+ }
+
+ protected void writeBytes(byte[] bytes) throws JMSException
+ {
+ writeBytes(bytes, 0, bytes == null ? 0 : bytes.length);
+ }
+
+ protected void writeBytes(byte[] bytes, int offset, int length) throws JMSException
+ {
+ writeTypeDiscriminator(BYTEARRAY_TYPE);
+ writeBytesImpl(bytes, offset, length);
+ }
+
+ public void writeBytesImpl(final byte[] bytes, final int offset, final int length) throws JMSException
+ {
+ try
+ {
+ if (bytes == null)
+ {
+ _data.writeInt(-1);
+ }
+ else
+ {
+ _data.writeInt(length);
+ _data.write(bytes, offset, length);
+ }
+ }
+ catch (IOException e)
+ {
+ throw handle(e);
+ }
+ }
+
+ public void writeBytesRaw(final byte[] bytes, final int offset, final int length) throws JMSException
+ {
+ try
+ {
+ if (bytes != null)
+ {
+ _data.write(bytes, offset, length);
+ }
+ }
+ catch (IOException e)
+ {
+ throw handle(e);
+ }
+ }
+
+
+ protected void writeObject(Object object) throws JMSException
+ {
+ Class clazz;
+
+ if (object == null)
+ {
+ // string handles the output of null values
+ clazz = String.class;
+ }
+ else
+ {
+ clazz = object.getClass();
+ }
+
+ if (clazz == Byte.class)
+ {
+ writeByte((Byte) object);
+ }
+ else if (clazz == Boolean.class)
+ {
+ writeBoolean((Boolean) object);
+ }
+ else if (clazz == byte[].class)
+ {
+ writeBytes((byte[]) object);
+ }
+ else if (clazz == Short.class)
+ {
+ writeShort((Short) object);
+ }
+ else if (clazz == Character.class)
+ {
+ writeChar((Character) object);
+ }
+ else if (clazz == Integer.class)
+ {
+ writeInt((Integer) object);
+ }
+ else if (clazz == Long.class)
+ {
+ writeLong((Long) object);
+ }
+ else if (clazz == Float.class)
+ {
+ writeFloat((Float) object);
+ }
+ else if (clazz == Double.class)
+ {
+ writeDouble((Double) object);
+ }
+ else if (clazz == String.class)
+ {
+ writeString((String) object);
+ }
+ else
+ {
+ throw new MessageFormatException("Only primitives plus byte arrays and String are valid types");
+ }
+ }
+
+ public ByteBuffer getData()
+ {
+ return ByteBuffer.wrap(_baos.toByteArray());
+ }
+
+ public void writeLengthPrefixedUTF(final String string) throws JMSException
+ {
+ try
+ {
+ CharsetEncoder encoder = UTF8.newEncoder();
+ java.nio.ByteBuffer encodedString = encoder.encode(CharBuffer.wrap(string));
+
+ writeShortImpl((short) encodedString.limit());
+ while(encodedString.hasRemaining())
+ {
+ _data.writeByte(encodedString.get());
+ }
+ }
+ catch (CharacterCodingException e)
+ {
+ JMSException jmse = new JMSException("Unable to encode string: " + e);
+ jmse.setLinkedException(e);
+ jmse.initCause(e);
+ throw jmse;
+ }
+ catch (IOException e)
+ {
+ throw handle(e);
+ }
+
+ }
+}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/message/UnprocessedMessage_0_8.java b/qpid/java/client/src/main/java/org/apache/qpid/client/message/UnprocessedMessage_0_8.java
index 685e646d85..ce87a112c9 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/message/UnprocessedMessage_0_8.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/message/UnprocessedMessage_0_8.java
@@ -87,9 +87,9 @@ public class UnprocessedMessage_0_8 extends UnprocessedMessage
public void receiveBody(ContentBody body)
{
- if (body.payload != null)
+ if (body._payload != null)
{
- final long payloadSize = body.payload.remaining();
+ final long payloadSize = body._payload.length;
if (_bodies == null)
{
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java b/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
index 34c6468629..208496ec41 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java
@@ -20,7 +20,9 @@
*/
package org.apache.qpid.client.protocol;
+import java.io.DataOutputStream;
import java.io.IOException;
+import java.io.OutputStream;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.util.ArrayList;
@@ -31,7 +33,6 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
-import org.apache.mina.filter.codec.ProtocolCodecException;
import org.apache.qpid.AMQConnectionClosedException;
import org.apache.qpid.AMQDisconnectedException;
import org.apache.qpid.AMQException;
@@ -46,6 +47,7 @@ import org.apache.qpid.client.state.AMQStateManager;
import org.apache.qpid.client.state.StateWaiter;
import org.apache.qpid.client.state.listener.SpecificMethodFrameListener;
import org.apache.qpid.codec.AMQCodecFactory;
+import org.apache.qpid.configuration.ClientProperties;
import org.apache.qpid.framing.AMQBody;
import org.apache.qpid.framing.AMQDataBlock;
import org.apache.qpid.framing.AMQFrame;
@@ -57,8 +59,6 @@ import org.apache.qpid.framing.HeartbeatBody;
import org.apache.qpid.framing.MethodRegistry;
import org.apache.qpid.framing.ProtocolInitiation;
import org.apache.qpid.framing.ProtocolVersion;
-import org.apache.qpid.pool.Job;
-import org.apache.qpid.pool.ReferenceCountingExecutorService;
import org.apache.qpid.protocol.AMQConstant;
import org.apache.qpid.protocol.AMQMethodEvent;
import org.apache.qpid.protocol.AMQMethodListener;
@@ -164,19 +164,19 @@ public class AMQProtocolHandler implements ProtocolEngine
private FailoverException _lastFailoverException;
/** Defines the default timeout to use for synchronous protocol commands. */
- private final long DEFAULT_SYNC_TIMEOUT = Long.getLong("amqj.default_syncwrite_timeout", 1000 * 30);
+ private final long DEFAULT_SYNC_TIMEOUT = Long.getLong(ClientProperties.QPID_SYNC_OP_TIMEOUT,
+ Long.getLong(ClientProperties.AMQJ_DEFAULT_SYNCWRITE_TIMEOUT,
+ ClientProperties.DEFAULT_SYNC_OPERATION_TIMEOUT));
/** Object to lock on when changing the latch */
private Object _failoverLatchChange = new Object();
private AMQCodecFactory _codecFactory;
- private Job _readJob;
- private Job _writeJob;
- private ReferenceCountingExecutorService _poolReference = ReferenceCountingExecutorService.getInstance();
+
private ProtocolVersion _suggestedProtocolVersion;
private long _writtenBytes;
private long _readBytes;
- private NetworkTransport _transport;
+
private NetworkConnection _network;
private Sender<ByteBuffer> _sender;
@@ -191,24 +191,6 @@ public class AMQProtocolHandler implements ProtocolEngine
_protocolSession = new AMQProtocolSession(this, _connection);
_stateManager = new AMQStateManager(_protocolSession);
_codecFactory = new AMQCodecFactory(false, _protocolSession);
- _poolReference.setThreadFactory(new ThreadFactory()
- {
-
- public Thread newThread(final Runnable runnable)
- {
- try
- {
- return Threading.getThreadFactory().createThread(runnable);
- }
- catch (Exception e)
- {
- throw new RuntimeException("Failed to create thread", e);
- }
- }
- });
- _readJob = new Job(_poolReference, Job.MAX_JOB_EVENTS, true);
- _writeJob = new Job(_poolReference, Job.MAX_JOB_EVENTS, false);
- _poolReference.acquireExecutorService();
_failoverHandler = new FailoverHandler(this);
}
@@ -329,17 +311,7 @@ public class AMQProtocolHandler implements ProtocolEngine
}
else
{
-
- if (cause instanceof ProtocolCodecException)
- {
- _logger.info("Protocol Exception caught NOT going to attempt failover as " +
- "cause isn't AMQConnectionClosedException: " + cause, cause);
-
- AMQException amqe = new AMQException("Protocol handler error: " + cause, cause);
- propagateExceptionToAllWaiters(amqe);
- }
_connection.exceptionReceived(cause);
-
}
// FIXME Need to correctly handle other exceptions. Things like ...
@@ -433,76 +405,63 @@ public class AMQProtocolHandler implements ProtocolEngine
public void received(ByteBuffer msg)
{
+ _readBytes += msg.remaining();
try
{
- _readBytes += msg.remaining();
final ArrayList<AMQDataBlock> dataBlocks = _codecFactory.getDecoder().decodeBuffer(msg);
- Job.fireAsynchEvent(_poolReference.getPool(), _readJob, new Runnable()
+ // Decode buffer
+
+ for (AMQDataBlock message : dataBlocks)
{
- public void run()
- {
- // Decode buffer
+ if (PROTOCOL_DEBUG)
+ {
+ _protocolLogger.info(String.format("RECV: [%s] %s", this, message));
+ }
- for (AMQDataBlock message : dataBlocks)
+ if(message instanceof AMQFrame)
{
+ final boolean debug = _logger.isDebugEnabled();
+ final long msgNumber = ++_messageReceivedCount;
- try
- {
- if (PROTOCOL_DEBUG)
- {
- _protocolLogger.info(String.format("RECV: [%s] %s", this, message));
- }
-
- if(message instanceof AMQFrame)
- {
- final boolean debug = _logger.isDebugEnabled();
- final long msgNumber = ++_messageReceivedCount;
-
- if (debug && ((msgNumber % 1000) == 0))
- {
- _logger.debug("Received " + _messageReceivedCount + " protocol messages");
- }
-
- AMQFrame frame = (AMQFrame) message;
-
- final AMQBody bodyFrame = frame.getBodyFrame();
-
- HeartbeatDiagnostics.received(bodyFrame instanceof HeartbeatBody);
-
- bodyFrame.handle(frame.getChannel(), _protocolSession);
-
- _connection.bytesReceived(_readBytes);
- }
- else if (message instanceof ProtocolInitiation)
- {
- // We get here if the server sends a response to our initial protocol header
- // suggesting an alternate ProtocolVersion; the server will then close the
- // connection.
- ProtocolInitiation protocolInit = (ProtocolInitiation) message;
- _suggestedProtocolVersion = protocolInit.checkVersion();
- _logger.info("Broker suggested using protocol version:" + _suggestedProtocolVersion);
-
- // get round a bug in old versions of qpid whereby the connection is not closed
- _stateManager.changeState(AMQState.CONNECTION_CLOSED);
- }
- }
- catch (Exception e)
+ if (debug && ((msgNumber % 1000) == 0))
{
- _logger.error("Exception processing frame", e);
- propagateExceptionToFrameListeners(e);
- exception(e);
+ _logger.debug("Received " + _messageReceivedCount + " protocol messages");
}
+
+ AMQFrame frame = (AMQFrame) message;
+
+ final AMQBody bodyFrame = frame.getBodyFrame();
+
+ HeartbeatDiagnostics.received(bodyFrame instanceof HeartbeatBody);
+
+ bodyFrame.handle(frame.getChannel(), _protocolSession);
+
+ _connection.bytesReceived(_readBytes);
+ }
+ else if (message instanceof ProtocolInitiation)
+ {
+ // We get here if the server sends a response to our initial protocol header
+ // suggesting an alternate ProtocolVersion; the server will then close the
+ // connection.
+ ProtocolInitiation protocolInit = (ProtocolInitiation) message;
+ _suggestedProtocolVersion = protocolInit.checkVersion();
+ _logger.info("Broker suggested using protocol version:" + _suggestedProtocolVersion);
+
+ // get round a bug in old versions of qpid whereby the connection is not closed
+ _stateManager.changeState(AMQState.CONNECTION_CLOSED);
}
}
- });
}
catch (Exception e)
{
+ _logger.error("Exception processing frame", e);
propagateExceptionToFrameListeners(e);
exception(e);
}
+
+
}
public void methodBodyReceived(final int channelId, final AMQBody bodyFrame)
@@ -568,17 +527,13 @@ public class AMQProtocolHandler implements ProtocolEngine
writeFrame(frame, false);
}
- public void writeFrame(AMQDataBlock frame, boolean wait)
+ public synchronized void writeFrame(AMQDataBlock frame, boolean wait)
{
- final ByteBuffer buf = frame.toNioByteBuffer();
+ final ByteBuffer buf = asByteBuffer(frame);
_writtenBytes += buf.remaining();
- Job.fireAsynchEvent(_poolReference.getPool(), _writeJob, new Runnable()
- {
- public void run()
- {
- _sender.send(buf);
- }
- });
+ _sender.send(buf);
+ _sender.flush();
+
if (PROTOCOL_DEBUG)
{
_protocolLogger.debug(String.format("SEND: [%s] %s", this, frame));
@@ -595,12 +550,41 @@ public class AMQProtocolHandler implements ProtocolEngine
_connection.bytesSent(_writtenBytes);
- if (wait)
+ }
+
+ private ByteBuffer asByteBuffer(AMQDataBlock block)
+ {
+ final ByteBuffer buf = ByteBuffer.allocate((int) block.getSize());
+
+ try
{
- _sender.flush();
+ block.writePayload(new DataOutputStream(new OutputStream()
+ {
+
+
+ @Override
+ public void write(int b) throws IOException
+ {
+ buf.put((byte) b);
+ }
+
+ @Override
+ public void write(byte[] b, int off, int len) throws IOException
+ {
+ buf.put(b, off, len);
+ }
+ }));
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException(e);
}
+
+ buf.flip();
+ return buf;
}
+
/**
* Convenience method that writes a frame to the protocol session and waits for a particular response. Equivalent to
* calling getProtocolSession().write() then waiting for the response.
@@ -723,7 +707,7 @@ public class AMQProtocolHandler implements ProtocolEngine
_logger.debug("FailoverException interrupted connection close, ignoring as connection close anyway.");
}
}
- _poolReference.releaseExecutorService();
+
}
/** @return the number of bytes read from this protocol session */
@@ -841,8 +825,13 @@ public class AMQProtocolHandler implements ProtocolEngine
public void setNetworkConnection(NetworkConnection network)
{
+ setNetworkConnection(network, network.getSender());
+ }
+
+ public void setNetworkConnection(NetworkConnection network, Sender<ByteBuffer> sender)
+ {
_network = network;
- _sender = network.getSender();
+ _sender = sender;
}
/** @param delay delay in seconds (not ms) */
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/ProtocolBufferMonitorFilter.java b/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/ProtocolBufferMonitorFilter.java
deleted file mode 100644
index bbd0a7b144..0000000000
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/protocol/ProtocolBufferMonitorFilter.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.client.protocol;
-
-import org.apache.mina.common.IoFilterAdapter;
-import org.apache.mina.common.IoSession;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A MINA filter that monitors the numbers of messages pending to be sent by MINA. It outputs a message
- * when a threshold has been exceeded, and has a frequency configuration so that messages are not output
- * too often.
- *
- */
-public class ProtocolBufferMonitorFilter extends IoFilterAdapter
-{
- private static final Logger _logger = LoggerFactory.getLogger(ProtocolBufferMonitorFilter.class);
-
- public static final long DEFAULT_FREQUENCY = 5000;
-
- public static final int DEFAULT_THRESHOLD = 3000;
-
- private int _bufferedMessages = 0;
-
- private int _threshold;
-
- private long _lastMessageOutputTime;
-
- private long _outputFrequencyInMillis;
-
- public ProtocolBufferMonitorFilter()
- {
- _threshold = DEFAULT_THRESHOLD;
- _outputFrequencyInMillis = DEFAULT_FREQUENCY;
- }
-
- public ProtocolBufferMonitorFilter(int threshold, long frequency)
- {
- _threshold = threshold;
- _outputFrequencyInMillis = frequency;
- }
-
- public void messageReceived(NextFilter nextFilter, IoSession session, Object message) throws Exception
- {
- _bufferedMessages++;
- if (_bufferedMessages > _threshold)
- {
- long now = System.currentTimeMillis();
- if ((now - _lastMessageOutputTime) > _outputFrequencyInMillis)
- {
- _logger.warn("Protocol message buffer exceeded threshold of " + _threshold + ". Current backlog: "
- + _bufferedMessages);
- _lastMessageOutputTime = now;
- }
- }
-
- nextFilter.messageReceived(session, message);
- }
-
- public void messageSent(NextFilter nextFilter, IoSession session, Object message) throws Exception
- {
- _bufferedMessages--;
- nextFilter.messageSent(session, message);
- }
-
- public int getBufferedMessages()
- {
- return _bufferedMessages;
- }
-
- public int getThreshold()
- {
- return _threshold;
- }
-
- public void setThreshold(int threshold)
- {
- _threshold = threshold;
- }
-
- public long getOutputFrequencyInMillis()
- {
- return _outputFrequencyInMillis;
- }
-
- public void setOutputFrequencyInMillis(long outputFrequencyInMillis)
- {
- _outputFrequencyInMillis = outputFrequencyInMillis;
- }
-
- public long getLastMessageOutputTime()
- {
- return _lastMessageOutputTime;
- }
-}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/security/CallbackHandlerRegistry.java b/qpid/java/client/src/main/java/org/apache/qpid/client/security/CallbackHandlerRegistry.java
index 140cbdeb75..14bae68561 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/security/CallbackHandlerRegistry.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/security/CallbackHandlerRegistry.java
@@ -20,17 +20,22 @@
*/
package org.apache.qpid.client.security;
-import org.apache.qpid.util.FileUtils;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import java.io.IOException;
import java.io.InputStream;
+import java.util.Collection;
+import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Map;
import java.util.Properties;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
+
+import org.apache.qpid.util.FileUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* CallbackHandlerRegistry is a registry for call back handlers for user authentication and interaction during user
@@ -42,7 +47,7 @@ import java.util.Properties;
* "amp.callbackhandler.properties". The format of the properties file is:
*
* <p/><pre>
- * CallbackHanlder.mechanism=fully.qualified.class.name
+ * CallbackHanlder.n.mechanism=fully.qualified.class.name where n is an ordinal
* </pre>
*
* <p/>Where mechanism is an IANA-registered mechanism name and the fully qualified class name refers to a
@@ -66,51 +71,15 @@ public class CallbackHandlerRegistry
public static final String DEFAULT_RESOURCE_NAME = "org/apache/qpid/client/security/CallbackHandlerRegistry.properties";
/** A static reference to the singleton instance of this registry. */
- private static CallbackHandlerRegistry _instance = new CallbackHandlerRegistry();
+ private static final CallbackHandlerRegistry _instance;
/** Holds a map from SASL mechanism names to call back handlers. */
- private Map<String, Class> _mechanismToHandlerClassMap = new HashMap<String, Class>();
-
- /** Holds a space delimited list of mechanisms that callback handlers exist for. */
- private String _mechanisms;
-
- /**
- * Gets the singleton instance of this registry.
- *
- * @return The singleton instance of this registry.
- */
- public static CallbackHandlerRegistry getInstance()
- {
- return _instance;
- }
+ private Map<String, Class<AMQCallbackHandler>> _mechanismToHandlerClassMap = new HashMap<String, Class<AMQCallbackHandler>>();
- /**
- * Gets the callback handler class for a given SASL mechanism name.
- *
- * @param mechanism The SASL mechanism name.
- *
- * @return The callback handler class for the mechanism, or null if none is configured for that mechanism.
- */
- public Class getCallbackHandlerClass(String mechanism)
- {
- return (Class) _mechanismToHandlerClassMap.get(mechanism);
- }
+ /** Ordered collection of mechanisms for which callback handlers exist. */
+ private Collection<String> _mechanisms;
- /**
- * Gets a space delimited list of supported SASL mechanisms.
- *
- * @return A space delimited list of supported SASL mechanisms.
- */
- public String getMechanisms()
- {
- return _mechanisms;
- }
-
- /**
- * Creates the call back handler registry from its configuration resource or file. This also has the side effect
- * of configuring and registering the SASL client factory implementations using {@link DynamicSaslRegistrar}.
- */
- private CallbackHandlerRegistry()
+ static
{
// Register any configured SASL client factories.
DynamicSaslRegistrar.registerSaslProviders();
@@ -120,12 +89,12 @@ public class CallbackHandlerRegistry
FileUtils.openFileOrDefaultResource(filename, DEFAULT_RESOURCE_NAME,
CallbackHandlerRegistry.class.getClassLoader());
+ final Properties props = new Properties();
+
try
{
- Properties props = new Properties();
+
props.load(is);
- parseProperties(props);
- _logger.info("Callback handlers available for SASL mechanisms: " + _mechanisms);
}
catch (IOException e)
{
@@ -146,32 +115,68 @@ public class CallbackHandlerRegistry
}
}
}
+
+ _instance = new CallbackHandlerRegistry(props);
+ _logger.info("Callback handlers available for SASL mechanisms: " + _instance._mechanisms);
+
}
- /*private InputStream openPropertiesInputStream(String filename)
+ /**
+ * Gets the singleton instance of this registry.
+ *
+ * @return The singleton instance of this registry.
+ */
+ public static CallbackHandlerRegistry getInstance()
+ {
+ return _instance;
+ }
+
+ public AMQCallbackHandler createCallbackHandler(final String mechanism)
{
- boolean useDefault = true;
- InputStream is = null;
- if (filename != null)
+ final Class<AMQCallbackHandler> mechanismClass = _mechanismToHandlerClassMap.get(mechanism);
+
+ if (mechanismClass == null)
{
- try
- {
- is = new BufferedInputStream(new FileInputStream(new File(filename)));
- useDefault = false;
- }
- catch (FileNotFoundException e)
- {
- _logger.error("Unable to read from file " + filename + ": " + e, e);
- }
+ throw new IllegalArgumentException("Mechanism " + mechanism + " not known");
}
- if (useDefault)
+ try
+ {
+ return mechanismClass.newInstance();
+ }
+ catch (InstantiationException e)
+ {
+ throw new IllegalArgumentException("Unable to create an instance of mechanism " + mechanism, e);
+ }
+ catch (IllegalAccessException e)
{
- is = CallbackHandlerRegistry.class.getResourceAsStream(DEFAULT_RESOURCE_NAME);
+ throw new IllegalArgumentException("Unable to create an instance of mechanism " + mechanism, e);
}
+ }
- return is;
- }*/
+ /**
+ * Gets collections of supported SASL mechanism names, ordered by preference
+ *
+ * @return collection of SASL mechanism names.
+ */
+ public Collection<String> getMechanisms()
+ {
+ return Collections.unmodifiableCollection(_mechanisms);
+ }
+
+ /**
+ * Creates the call back handler registry from its configuration resource or file.
+ *
+ * This also has the side effect of configuring and registering the SASL client factory
+ * implementations using {@link DynamicSaslRegistrar}.
+ *
+ * This constructor is default protection to allow for effective unit testing. Clients must use
+ * {@link #getInstance()} to obtain the singleton instance.
+ */
+ CallbackHandlerRegistry(final Properties props)
+ {
+ parseProperties(props);
+ }
/**
* Scans the specified properties as a mapping from IANA registered SASL mechanism to call back handler
@@ -183,20 +188,20 @@ public class CallbackHandlerRegistry
*/
private void parseProperties(Properties props)
{
+
+ final Map<Integer, String> mechanisms = new TreeMap<Integer, String>();
+
Enumeration e = props.propertyNames();
while (e.hasMoreElements())
{
- String propertyName = (String) e.nextElement();
- int period = propertyName.indexOf(".");
- if (period < 0)
- {
- _logger.warn("Unable to parse property " + propertyName + " when configuring SASL providers");
+ final String propertyName = (String) e.nextElement();
+ final String[] parts = propertyName.split("\\.", 2);
- continue;
- }
+ checkPropertyNameFormat(propertyName, parts);
- String mechanism = propertyName.substring(period + 1);
- String className = props.getProperty(propertyName);
+ final String mechanism = parts[0];
+ final int ordinal = getPropertyOrdinal(propertyName, parts);
+ final String className = props.getProperty(propertyName);
Class clazz = null;
try
{
@@ -205,20 +210,11 @@ public class CallbackHandlerRegistry
{
_logger.warn("SASL provider " + clazz + " does not implement " + AMQCallbackHandler.class
+ ". Skipping");
-
continue;
}
-
_mechanismToHandlerClassMap.put(mechanism, clazz);
- if (_mechanisms == null)
- {
- _mechanisms = mechanism;
- }
- else
- {
- // one time cost
- _mechanisms = _mechanisms + " " + mechanism;
- }
+
+ mechanisms.put(ordinal, mechanism);
}
catch (ClassNotFoundException ex)
{
@@ -227,5 +223,91 @@ public class CallbackHandlerRegistry
continue;
}
}
+
+ _mechanisms = mechanisms.values(); // order guaranteed by keys of treemap (i.e. our ordinals)
+
+
+ }
+
+ private void checkPropertyNameFormat(final String propertyName, final String[] parts)
+ {
+ if (parts.length != 2)
+ {
+ throw new IllegalArgumentException("Unable to parse property " + propertyName + " when configuring SASL providers");
+ }
+ }
+
+ private int getPropertyOrdinal(final String propertyName, final String[] parts)
+ {
+ try
+ {
+ return Integer.parseInt(parts[1]);
+ }
+ catch(NumberFormatException nfe)
+ {
+ throw new IllegalArgumentException("Unable to parse property " + propertyName + " when configuring SASL providers", nfe);
+ }
+ }
+
+ /**
+ * Selects a SASL mechanism that is mutually available to both parties. If more than one
+ * mechanism is mutually available the one appearing first (by ordinal) will be returned.
+ *
+ * @param peerMechanismList space separated list of mechanisms
+ * @return selected mechanism, or null if none available
+ */
+ public String selectMechanism(final String peerMechanismList)
+ {
+ final Set<String> peerList = mechListToSet(peerMechanismList);
+
+ return selectMechInternal(peerList, Collections.<String>emptySet());
+ }
+
+ /**
+ * Selects a SASL mechanism that is mutually available to both parties.
+ *
+ * @param peerMechanismList space separated list of mechanisms
+ * @param restrictionList space separated list of mechanisms
+ * @return selected mechanism, or null if none available
+ */
+ public String selectMechanism(final String peerMechanismList, final String restrictionList)
+ {
+ final Set<String> peerList = mechListToSet(peerMechanismList);
+ final Set<String> restrictionSet = mechListToSet(restrictionList);
+
+ return selectMechInternal(peerList, restrictionSet);
+ }
+
+ private String selectMechInternal(final Set<String> peerSet, final Set<String> restrictionSet)
+ {
+ for (final String mech : _mechanisms)
+ {
+ if (peerSet.contains(mech))
+ {
+ if (restrictionSet.isEmpty() || restrictionSet.contains(mech))
+ {
+ return mech;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ private Set<String> mechListToSet(final String mechanismList)
+ {
+ if (mechanismList == null)
+ {
+ return Collections.emptySet();
+ }
+
+ final StringTokenizer tokenizer = new StringTokenizer(mechanismList, " ");
+ final Set<String> mechanismSet = new HashSet<String>(tokenizer.countTokens());
+ while (tokenizer.hasMoreTokens())
+ {
+ mechanismSet.add(tokenizer.nextToken());
+ }
+ return Collections.unmodifiableSet(mechanismSet);
}
+
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/security/CallbackHandlerRegistry.properties b/qpid/java/client/src/main/java/org/apache/qpid/client/security/CallbackHandlerRegistry.properties
index 1fcfde3579..b04a756e80 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/security/CallbackHandlerRegistry.properties
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/security/CallbackHandlerRegistry.properties
@@ -16,7 +16,17 @@
# specific language governing permissions and limitations
# under the License.
#
-CallbackHandler.CRAM-MD5-HASHED=org.apache.qpid.client.security.UsernameHashedPasswordCallbackHandler
-CallbackHandler.CRAM-MD5=org.apache.qpid.client.security.UsernamePasswordCallbackHandler
-CallbackHandler.AMQPLAIN=org.apache.qpid.client.security.UsernamePasswordCallbackHandler
-CallbackHandler.PLAIN=org.apache.qpid.client.security.UsernamePasswordCallbackHandler
+
+#
+# Format:
+# <mechanism name>.ordinal=<implementation>
+#
+# @see CallbackHandlerRegistry
+#
+
+EXTERNAL.1=org.apache.qpid.client.security.UsernamePasswordCallbackHandler
+GSSAPI.2=org.apache.qpid.client.security.UsernamePasswordCallbackHandler
+CRAM-MD5-HASHED.3=org.apache.qpid.client.security.UsernameHashedPasswordCallbackHandler
+CRAM-MD5.4=org.apache.qpid.client.security.UsernamePasswordCallbackHandler
+AMQPLAIN.5=org.apache.qpid.client.security.UsernamePasswordCallbackHandler
+PLAIN.6=org.apache.qpid.client.security.UsernamePasswordCallbackHandler
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java b/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java
new file mode 100644
index 0000000000..1b483f6948
--- /dev/null
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/transport/ClientConnectionDelegate.java
@@ -0,0 +1,168 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.client.transport;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.security.sasl.Sasl;
+import javax.security.sasl.SaslClient;
+import javax.security.sasl.SaslException;
+
+import org.apache.qpid.client.security.AMQCallbackHandler;
+import org.apache.qpid.client.security.CallbackHandlerRegistry;
+import org.apache.qpid.jms.ConnectionURL;
+import org.apache.qpid.transport.ClientDelegate;
+import org.apache.qpid.transport.Connection;
+import org.apache.qpid.transport.ConnectionException;
+import org.apache.qpid.transport.ConnectionOpenOk;
+import org.apache.qpid.transport.ConnectionSettings;
+import org.apache.qpid.transport.util.Logger;
+import org.apache.qpid.util.Strings;
+import org.ietf.jgss.GSSContext;
+import org.ietf.jgss.GSSException;
+import org.ietf.jgss.GSSManager;
+import org.ietf.jgss.GSSName;
+import org.ietf.jgss.Oid;
+
+/**
+ *
+ */
+public class ClientConnectionDelegate extends ClientDelegate
+{
+ private static final Logger LOGGER = Logger.get(ClientDelegate.class);
+
+ private static final String KRB5_OID_STR = "1.2.840.113554.1.2.2";
+ protected static final Oid KRB5_OID;
+
+ static
+ {
+ Oid oid;
+ try
+ {
+ oid = new Oid(KRB5_OID_STR);
+ }
+ catch (GSSException ignore)
+ {
+ oid = null;
+ }
+
+ KRB5_OID = oid;
+ }
+
+ private final ConnectionURL _connectionURL;
+
+ /**
+ * @param settings
+ * @param connectionURL
+ */
+ public ClientConnectionDelegate(ConnectionSettings settings, ConnectionURL connectionURL)
+ {
+ super(settings);
+ this._connectionURL = connectionURL;
+ }
+
+ @Override
+ protected SaslClient createSaslClient(List<Object> brokerMechs) throws ConnectionException, SaslException
+ {
+ final String brokerMechanisms = Strings.join(" ", brokerMechs);
+ final String restrictionList = _conSettings.getSaslMechs();
+ final String selectedMech = CallbackHandlerRegistry.getInstance().selectMechanism(brokerMechanisms, restrictionList);
+ if (selectedMech == null)
+ {
+ throw new ConnectionException("Client and broker have no SASL mechanisms in common." +
+ " Broker allows : " + brokerMechanisms +
+ " Client has : " + CallbackHandlerRegistry.getInstance().getMechanisms() +
+ " Client restricted itself to : " + (restrictionList != null ? restrictionList : "no restriction"));
+ }
+
+ Map<String,Object> saslProps = new HashMap<String,Object>();
+ if (_conSettings.isUseSASLEncryption())
+ {
+ saslProps.put(Sasl.QOP, "auth-conf");
+ }
+
+ final AMQCallbackHandler handler = CallbackHandlerRegistry.getInstance().createCallbackHandler(selectedMech);
+ handler.initialise(_connectionURL);
+ final SaslClient sc = Sasl.createSaslClient(new String[] {selectedMech}, null, _conSettings.getSaslProtocol(), _conSettings.getSaslServerName(), saslProps, handler);
+
+ return sc;
+ }
+
+ @Override
+ public void connectionOpenOk(Connection conn, ConnectionOpenOk ok)
+ {
+ SaslClient sc = conn.getSaslClient();
+ if (sc != null)
+ {
+ if (sc.getMechanismName().equals("GSSAPI"))
+ {
+ String id = getKerberosUser();
+ if (id != null)
+ {
+ conn.setUserID(id);
+ }
+ }
+ else if (sc.getMechanismName().equals("EXTERNAL"))
+ {
+ if (conn.getSecurityLayer() != null)
+ {
+ conn.setUserID(conn.getSecurityLayer().getUserID());
+ }
+ }
+ }
+
+ super.connectionOpenOk(conn, ok);
+ }
+
+ private String getKerberosUser()
+ {
+ LOGGER.debug("Obtaining userID from kerberos");
+ String service = _conSettings.getSaslProtocol() + "@" + _conSettings.getSaslServerName();
+ GSSManager manager = GSSManager.getInstance();
+
+ try
+ {
+ GSSName acceptorName = manager.createName(service,
+ GSSName.NT_HOSTBASED_SERVICE, KRB5_OID);
+
+ GSSContext secCtx = manager.createContext(acceptorName,
+ KRB5_OID,
+ null,
+ GSSContext.INDEFINITE_LIFETIME);
+
+ secCtx.initSecContext(new byte[0], 0, 1);
+
+ if (secCtx.getSrcName() != null)
+ {
+ return secCtx.getSrcName().toString();
+ }
+
+ }
+ catch (GSSException e)
+ {
+ LOGGER.warn("Unable to retrieve userID from Kerberos due to error",e);
+ }
+
+ return null;
+ }
+}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/util/ClassLoadingAwareObjectInputStream.java b/qpid/java/client/src/main/java/org/apache/qpid/client/util/ClassLoadingAwareObjectInputStream.java
new file mode 100644
index 0000000000..669a0f1abf
--- /dev/null
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/util/ClassLoadingAwareObjectInputStream.java
@@ -0,0 +1,134 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.client.util;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ObjectInputStream;
+import java.io.ObjectStreamClass;
+import java.lang.reflect.Proxy;
+import java.util.HashMap;
+
+
+/**
+ * <code>ClassLoadingAwareObjectInputStream</code> is an Extention of Object input stream to be used
+ * to de-serialize JMS Object Messages.
+ *
+ * <p>This was introduced to resolve the class loading issues which can happen when we use the client
+ * libraries in a complex class loading Environment.</p>
+ */
+public class ClassLoadingAwareObjectInputStream extends ObjectInputStream
+{
+ /** <p>Class loader instance which loaded this class.
+ * It will be used to load classes when we failed to load classes from dynamic class loading</p> */
+ private static final ClassLoader _ON_FAULT_CLASS_LOADER =
+ ClassLoadingAwareObjectInputStream.class.getClassLoader();
+
+ /** <p>Maps primitive type names to corresponding class objects.</p> */
+ private static final HashMap<String, Class> _primitives = new HashMap<String, Class>(8, 1.0F);
+
+
+ public ClassLoadingAwareObjectInputStream(InputStream in) throws IOException
+ {
+ super(in);
+ }
+
+ @Override
+ protected Class resolveClass(ObjectStreamClass classDesc)
+ throws IOException, ClassNotFoundException
+ {
+
+ // Here we use TTCL as our primary class loader to load the classes
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+
+ return load(classDesc.getName(), cl);
+ }
+
+ @Override
+ protected Class resolveProxyClass(String[] interfaces)
+ throws IOException, ClassNotFoundException
+ {
+ // Here we use TTCL as our primary class loader to load the classes
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+
+ Class[] cinterfaces = new Class[interfaces.length];
+ for (int i = 0; i < interfaces.length; i++)
+ {
+ cinterfaces[i] = load(interfaces[i], cl);
+ }
+
+ try
+ {
+ return Proxy.getProxyClass(cinterfaces[0].getClassLoader(), cinterfaces);
+ }
+ catch (IllegalArgumentException e)
+ {
+ throw new ClassNotFoundException(null, e);
+ }
+ }
+
+ /**
+ * <p>
+ * Method we used to load class that are needed to de-serialize the objects. </p>
+ * <p>
+ * Here we first look up for the objects from the given class loader and if its not there
+ * we will be using the class loader of this class.
+ * </p>
+ * @param className Class name to lookup
+ * @param cl primary class loader which we 1st use to lookup
+ * @return Class instance we are looking for
+ * @throws ClassNotFoundException if both primary and secondary lockup's failed.
+ */
+ private Class load(String className, ClassLoader cl)
+ throws ClassNotFoundException
+ {
+ try
+ {
+ return Class.forName(className, false, cl);
+ }
+ catch (ClassNotFoundException e)
+ {
+ final Class clazz = _primitives.get(className);
+
+ if (clazz != null)
+ {
+ return clazz;
+ }
+ else
+ {
+ return Class.forName(className, false, _ON_FAULT_CLASS_LOADER);
+ }
+ }
+ }
+
+ static
+ {
+ _primitives.put("boolean", boolean.class);
+ _primitives.put("byte", byte.class);
+ _primitives.put("char", char.class);
+ _primitives.put("short", short.class);
+ _primitives.put("int", int.class);
+ _primitives.put("long", long.class);
+ _primitives.put("float", float.class);
+ _primitives.put("double", double.class);
+ _primitives.put("void", void.class);
+ }
+}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java b/qpid/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java
index 4db6a11e4d..0c2f4ce57d 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/jms/BrokerDetails.java
@@ -22,7 +22,7 @@ package org.apache.qpid.jms;
import java.util.Map;
-import org.apache.qpid.client.SSLConfiguration;
+import org.apache.qpid.transport.ConnectionSettings;
public interface BrokerDetails
{
@@ -104,14 +104,12 @@ public interface BrokerDetails
long getTimeout();
void setTimeout(long timeout);
-
- SSLConfiguration getSSLConfiguration();
-
- void setSSLConfiguration(SSLConfiguration sslConfiguration);
boolean getBooleanProperty(String propName);
String toString();
boolean equals(Object o);
+
+ ConnectionSettings buildConnectionSettings();
}
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/jms/failover/FailoverExchangeMethod.java b/qpid/java/client/src/main/java/org/apache/qpid/jms/failover/FailoverExchangeMethod.java
index ef30f2adbc..cb3ab718e9 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/jms/failover/FailoverExchangeMethod.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/jms/failover/FailoverExchangeMethod.java
@@ -140,7 +140,6 @@ public class FailoverExchangeMethod implements FailoverMethod, MessageListener
broker.setHost(tokens[1]);
broker.setPort(Integer.parseInt(tokens[2]));
broker.setProperties(_originalBrokerDetail.getProperties());
- broker.setSSLConfiguration(_originalBrokerDetail.getSSLConfiguration());
brokerList.add(broker);
if (currentBrokerIP.equals(broker.getHost()) &&
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java b/qpid/java/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java
index fec5af55c1..b480f56c07 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java
@@ -36,6 +36,7 @@ import javax.jms.Queue;
import javax.jms.Topic;
import javax.naming.Context;
import javax.naming.NamingException;
+import javax.naming.ConfigurationException;
import javax.naming.spi.InitialContextFactory;
import org.apache.qpid.client.AMQConnectionFactory;
@@ -139,7 +140,7 @@ public class PropertiesFileInitialContextFactory implements InitialContextFactor
return new ReadOnlyContext(environment, data);
}
- protected void createConnectionFactories(Map data, Hashtable environment)
+ protected void createConnectionFactories(Map data, Hashtable environment) throws ConfigurationException
{
for (Iterator iter = environment.entrySet().iterator(); iter.hasNext();)
{
@@ -157,7 +158,7 @@ public class PropertiesFileInitialContextFactory implements InitialContextFactor
}
}
- protected void createDestinations(Map data, Hashtable environment)
+ protected void createDestinations(Map data, Hashtable environment) throws ConfigurationException
{
for (Iterator iter = environment.entrySet().iterator(); iter.hasNext();)
{
@@ -225,7 +226,7 @@ public class PropertiesFileInitialContextFactory implements InitialContextFactor
/**
* Factory method to create new Connection Factory instances
*/
- protected ConnectionFactory createFactory(String url)
+ protected ConnectionFactory createFactory(String url) throws ConfigurationException
{
try
{
@@ -233,16 +234,18 @@ public class PropertiesFileInitialContextFactory implements InitialContextFactor
}
catch (URLSyntaxException urlse)
{
- _logger.warn("Unable to createFactories:" + urlse);
- }
+ _logger.warn("Unable to create factory:" + urlse);
- return null;
+ ConfigurationException ex = new ConfigurationException("Failed to parse entry: " + urlse + " due to : " + urlse.getMessage());
+ ex.initCause(urlse);
+ throw ex;
+ }
}
/**
* Factory method to create new Destination instances from an AMQP BindingURL
*/
- protected Destination createDestination(String str)
+ protected Destination createDestination(String str) throws ConfigurationException
{
try
{
@@ -252,7 +255,9 @@ public class PropertiesFileInitialContextFactory implements InitialContextFactor
{
_logger.warn("Unable to create destination:" + e, e);
- return null;
+ ConfigurationException ex = new ConfigurationException("Failed to parse entry: " + str + " due to : " + e.getMessage());
+ ex.initCause(e);
+ throw ex;
}
}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/JNDIBindConnectionFactory.java b/qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/JNDIBindConnectionFactory.java
deleted file mode 100644
index 2c08f1e34a..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/JNDIBindConnectionFactory.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.IBMPerfTest;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.qpid.client.AMQConnectionFactory;
-import org.apache.qpid.url.URLSyntaxException;
-
-import javax.jms.ConnectionFactory;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.io.File;
-import java.util.Hashtable;
-
-public class JNDIBindConnectionFactory
-{
-
- public static final String CONNECTION_FACTORY_BINDING = "amq.ConnectionFactory";
- public static final String DEFAULT_PROVIDER_FILE_PATH = System.getProperty("java.io.tmpdir") + File.separator + "IBMPerfTestsJNDI";
- public static final String PROVIDER_URL = "file://" + DEFAULT_PROVIDER_FILE_PATH;
- public static final String FSCONTEXT_FACTORY = "com.sun.jndi.fscontext.RefFSContextFactory";
- public static final String DEFAULT_CONNECTION_URL = "amqp://guest:guest@clientid/testpath?brokerlist='tcp://localhost:5672'";
-
- private static void printUsage()
- {
- System.out.println("Using default values: Usage:java JNDIBindConnectionFactory <connection url> [<Connection Factory Binding>] [<Provider URL>] [<JNDI Context Factory>]");
-
- }
-
- public static void main(String[] args)
- {
- Logger.getRootLogger().setLevel(Level.OFF);
-
- String connectionFactoryBinding = CONNECTION_FACTORY_BINDING;
- String provider = PROVIDER_URL;
- String contextFactory = FSCONTEXT_FACTORY;
- if (args.length == 0)
- {
- printUsage();
- System.exit(1);
- }
-
- String connectionURL = args[0];
-
- System.out.println("Using Connection:" + connectionURL + "\n");
-
-
- if (args.length > 1)
- {
- connectionFactoryBinding = args[1];
-
- if (args.length > 2)
- {
- provider = args[2];
-
- if (args.length > 3)
- {
- contextFactory = args[3];
- }
- }
- else
- {
- System.out.println("Using default File System Context Factory");
- System.out.println("Using default Connection Factory Binding:" + connectionFactoryBinding);
- }
- }
- else
- {
- printUsage();
- }
-
-
- System.out.println("File System Context Factory\n" +
- "Connection:" + connectionURL + "\n" +
- "Connection Factory Binding:" + connectionFactoryBinding + "\n" +
- "JNDI Provider URL:" + provider);
-
- if (provider.startsWith("file"))
- {
- File file = new File(provider.substring(provider.indexOf("://") + 3));
-
- if (file.exists() && !file.isDirectory())
- {
- System.out.println("Couldn't make directory file already exists");
- System.exit(1);
- }
- else
- {
- if (!file.exists())
- {
- if (!file.mkdirs())
- {
- System.out.println("Couldn't make directory");
- System.exit(1);
- }
- }
- }
- }
-
- new JNDIBindConnectionFactory(provider, connectionFactoryBinding, contextFactory, connectionURL);
-
- }
-
- public JNDIBindConnectionFactory(String provider, String binding, String contextFactory, String CONNECTION_URL)
- {
- // Set up the environment for creating the initial context
- Hashtable env = new Hashtable(11);
- env.put(Context.INITIAL_CONTEXT_FACTORY, contextFactory);
-
- env.put(Context.PROVIDER_URL, provider);
-
- try
- {
- // Create the initial context
- Context ctx = new InitialContext(env);
-
- // Create the object to be bound
- ConnectionFactory factory = null;
-
- try
- {
- factory = new AMQConnectionFactory(CONNECTION_URL);
-
-
- try
- {
- Object obj = ctx.lookup(binding);
-
- if (obj != null)
- {
- System.out.println("Un-binding previous Connection Factory");
- ctx.unbind(binding);
- }
- }
- catch (NamingException e)
- {
- System.out.println("Operation failed: " + e);
- }
-
- // Perform the bind
- ctx.bind(binding, factory);
- System.out.println("Bound Connection Factory:" + binding);
-
- // Check that it is bound
- Object obj = ctx.lookup(binding);
- System.out.println("Connection URL:" + ((AMQConnectionFactory) obj).getConnectionURL());
-
- System.out.println("JNDI FS Context:" + provider);
- }
- catch (NamingException amqe)
- {
- System.out.println("Operation failed: " + amqe);
- }
- catch (URLSyntaxException e)
- {
- System.out.println("Operation failed: " + e);
- }
-
- }
- catch (NamingException e)
- {
- System.out.println("Operation failed: " + e);
- }
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/JNDIBindQueue.java b/qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/JNDIBindQueue.java
deleted file mode 100644
index 10e8b94311..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/JNDIBindQueue.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.IBMPerfTest;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQQueue;
-import org.apache.qpid.client.AMQSession;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.Session;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.io.File;
-import java.util.Hashtable;
-
-public class JNDIBindQueue
-{
- public static final String DEFAULT_PROVIDER_FILE_PATH = System.getProperty("java.io.tmpdir") + File.separator + "IBMPerfTestsJNDI";
- public static final String PROVIDER_URL = "file://" + DEFAULT_PROVIDER_FILE_PATH;
- public static final String FSCONTEXT_FACTORY = "com.sun.jndi.fscontext.RefFSContextFactory";
-
- Connection _connection = null;
- Context _ctx = null;
-
-
- public JNDIBindQueue(String queueBinding, String queueName, String provider, String contextFactory)
- {
- // Set up the environment for creating the initial context
- Hashtable env = new Hashtable(11);
- env.put(Context.INITIAL_CONTEXT_FACTORY, contextFactory);
-
- env.put(Context.PROVIDER_URL, provider);
-
- try
- {
- // Create the initial context
- _ctx = new InitialContext(env);
-
- // Create the object to be bound
-
- try
- {
- _connection = new AMQConnection("amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'");
- System.out.println("Connected");
- }
- catch (Exception amqe)
- {
- System.out.println("Unable to create AMQConnectionFactory:" + amqe);
- }
-
- if (_connection != null)
- {
- bindQueue(queueName, queueBinding);
- }
-
- // Check that it is bound
- Object obj = _ctx.lookup(queueBinding);
-
- System.out.println("Bound Queue:" + ((AMQQueue) obj).toURL());
-
- System.out.println("JNDI FS Context:" + provider);
-
- }
- catch (NamingException e)
- {
- System.out.println("Operation failed: " + e);
- }
- finally
- {
- try
- {
- if (_connection != null)
- {
- _connection.close();
- }
- }
- catch (JMSException closeE)
- {
- System.out.println("Connection closing failed: " + closeE);
- }
- }
-
-
- }
-
-
- private void bindQueue(String queueName, String queueBinding) throws NamingException
- {
-
- try
- {
- Object obj = _ctx.lookup(queueBinding);
-
- if (obj != null)
- {
- System.out.println("Un-binding exisiting object");
- _ctx.unbind(queueBinding);
- }
- }
- catch (NamingException e)
- {
-
- }
-
- Queue queue = null;
- try
- {
-
- Session session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- if (session != null)
- {
- queue = ((AMQSession) session).createQueue(queueName);
- }
- }
- catch (JMSException jmse)
- {
- System.out.println("Unable to create Queue:" + jmse);
- }
-
- // Perform the bind
- _ctx.bind(queueBinding, queue);
- }
-
-
- public static void main(String[] args)
- {
- Logger.getRootLogger().setLevel(Level.OFF);
-
- String provider = JNDIBindQueue.PROVIDER_URL;
- String contextFactory = JNDIBindQueue.FSCONTEXT_FACTORY;
-
- if (args.length > 1)
- {
- String binding = args[0];
- String queueName = args[1];
-
- if (args.length > 2)
- {
- provider = args[2];
-
- if (args.length > 3)
- {
- contextFactory = args[3];
- }
- }
- else
- {
- System.out.println("Using default File System Context Factory");
- }
-
- System.out.println("File System Context Factory\n" +
- "Binding Queue:'" + queueName + "' to '" + binding + "'\n" +
- "JNDI Provider URL:" + provider);
-
- if (provider.startsWith("file"))
- {
- File file = new File(provider.substring(provider.indexOf("://") + 3));
-
- if (file.exists() && !file.isDirectory())
- {
- System.out.println("Couldn't make directory file already exists");
- System.exit(1);
- }
- else
- {
- if (!file.exists())
- {
- if (!file.mkdirs())
- {
- System.out.println("Couldn't make directory");
- System.exit(1);
- }
- }
- }
- }
-
-
- new JNDIBindQueue(binding, queueName, provider, contextFactory);
-
- }
- else
- {
- System.out.println("Using Defaults: Usage:java JNDIBindQueue <Binding> <queue name> [<Provider URL> [<JNDI Context Factory>]]");
- }
-
- }
-
-
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/JNDIBindTopic.java b/qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/JNDIBindTopic.java
deleted file mode 100644
index ca071c1187..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/JNDIBindTopic.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.IBMPerfTest;
-
-import org.apache.log4j.Level;
-import org.apache.log4j.Logger;
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.client.AMQTopic;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Session;
-import javax.jms.Topic;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.io.File;
-import java.util.Hashtable;
-
-public class JNDIBindTopic
-{
- public static final String DEFAULT_PROVIDER_FILE_PATH = System.getProperty("java.io.tmpdir") + File.separator + "IBMPerfTestsJNDI";
- public static final String PROVIDER_URL = "file://" + DEFAULT_PROVIDER_FILE_PATH;
-
- public static final String FSCONTEXT_FACTORY = "com.sun.jndi.fscontext.RefFSContextFactory";
-
- Connection _connection = null;
- Context _ctx = null;
-
-
- public JNDIBindTopic(String topicBinding, String topicName, String provider, String contextFactory)
- {
- // Set up the environment for creating the initial context
- Hashtable env = new Hashtable(11);
- env.put(Context.INITIAL_CONTEXT_FACTORY, contextFactory);
-
- env.put(Context.PROVIDER_URL, provider);
-
- try
- {
- // Create the initial context
- _ctx = new InitialContext(env);
-
- // Create the object to be bound
-
- try
- {
- _connection = new AMQConnection("amqp://guest:guest@clientid/test?brokerlist='tcp://localhost:5672'");
- System.out.println("Connected");
- }
- catch (Exception amqe)
- {
- System.out.println("Unable to create AMQConnectionFactory:" + amqe);
- }
-
- if (_connection != null)
- {
- bindTopic(topicName, topicBinding);
- }
-
- // Check that it is bound
- Object obj = _ctx.lookup(topicBinding);
-
- System.out.println("Bound Queue:" + ((AMQTopic) obj).toURL());
-
- System.out.println("JNDI FS Context:" + provider);
-
- }
- catch (NamingException e)
- {
- System.out.println("Operation failed: " + e);
- }
- finally
- {
- try
- {
- if (_connection != null)
- {
- _connection.close();
- }
- }
- catch (JMSException closeE)
- {
- System.out.println("Operation failed: " + closeE);
- }
- }
- }
-
-
- private void bindTopic(String topicName, String topicBinding) throws NamingException
- {
-
- try
- {
- Object obj = _ctx.lookup(topicBinding);
-
- if (obj != null)
- {
- System.out.println("Un-binding exisiting object");
- _ctx.unbind(topicBinding);
- }
- }
- catch (NamingException e)
- {
-
- }
-
- Topic topic = null;
- try
- {
-
- Session session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- if (session != null)
- {
- topic = ((AMQSession) session).createTopic(topicName);
- }
- }
- catch (JMSException jmse)
- {
- System.out.println("Unable to create Topic:" + jmse);
- }
-
- // Perform the bind
- _ctx.bind(topicBinding, topic);
- }
-
-
- public static void main(String[] args)
- {
- Logger.getRootLogger().setLevel(Level.OFF);
-
- String provider = JNDIBindTopic.PROVIDER_URL;
- String contextFactory = JNDIBindTopic.FSCONTEXT_FACTORY;
-
- if (args.length > 1)
- {
- String binding = args[0];
- String queueName = args[1];
-
- if (args.length > 2)
- {
- provider = args[2];
-
- if (args.length > 3)
- {
- contextFactory = args[3];
- }
- }
- else
- {
- System.out.println("Using default File System Context Factory");
- }
-
- System.out.println("File System Context Factory\n" +
- "Binding Topic:'" + queueName + "' to '" + binding + "'\n" +
- "JNDI Provider URL:" + provider);
-
-
- if (provider.startsWith("file"))
- {
- File file = new File(provider.substring(provider.indexOf("://") + 3));
-
- if (file.exists() && !file.isDirectory())
- {
- System.out.println("Couldn't make directory file already exists");
- System.exit(1);
- }
- else
- {
- if (!file.exists())
- {
- if (!file.mkdirs())
- {
- System.out.println("Couldn't make directory");
- System.exit(1);
- }
- }
- }
- }
-
- new JNDIBindTopic(binding, queueName, provider, contextFactory);
-
- }
- else
- {
- System.out.println("Usage:java JNDIBindTopic <Binding> <topic name> [<Provider URL> [<JNDI Context Factory>]]");
- }
-
- }
-
-
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/README.txt b/qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/README.txt
deleted file mode 100644
index 95ee9f9c77..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/IBMPerfTest/README.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-These JNDI setup tools are mainly for use in conjunction with the IBM JMS Performance Harness available here:
-The jar should be placed in the client/test/lib/ directory.
-
-http://www.alphaworks.ibm.com/tech/perfharness
-
-
-These JNDI classes use the the SUN FileSystem context.
-There are two jar files that should be placed in your client/test/lib directory.
-
-http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=7110-jndi-1.2.1-oth-JPR&SiteId=JSC&TransactionId=noreg
-
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/cluster/Client.java b/qpid/java/client/src/old_test/java/org/apache/qpid/cluster/Client.java
deleted file mode 100644
index cf8059a143..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/cluster/Client.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.cluster;
-
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.client.AMQTopic;
-import org.apache.qpid.client.AMQQueue;
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.exchange.ExchangeDefaults;
-import org.apache.qpid.url.URLSyntaxException;
-
-import javax.jms.MessageListener;
-import javax.jms.Message;
-import javax.jms.Session;
-import javax.jms.JMSException;
-import javax.jms.MessageProducer;
-import javax.jms.TextMessage;
-import java.util.Random;
-
-public class Client
-{
- private final Random random = new Random();
- private final String name;
- private final Session session;
- private final MessageProducer topicProducer;
- private final MessageProducer queueProducer;
-
- Client(AMQConnection connection, String name) throws JMSException, InterruptedException
- {
- this.name = name;
- session = connection.createSession(false, AMQSession.NO_ACKNOWLEDGE);
-
- AMQTopic topic = new AMQTopic(((AMQSession)session).getDefaultTopicExchangeName(), new AMQShortString("cluster_test_topic"));
- AMQQueue queue = new AMQQueue(((AMQSession)session).getDefaultQueueExchangeName(), new AMQShortString("cluster_test_queue"));
-
- topicProducer = session.createProducer(topic);
- queueProducer = session.createProducer(queue);
-
- //subscribe to a known topic
- session.createConsumer(topic).setMessageListener(new TopicHandler());
- //subscribe to a known queue
- session.createConsumer(queue).setMessageListener(new QueueHandler());
-
- connection.start();
-
- while(true)
- {
- Thread.sleep(random.nextInt(60000));
- sendToQueue(name + ":" + randomString(5));
- }
- }
-
- private synchronized void sendToTopic(String message) throws JMSException
- {
- topicProducer.send(session.createTextMessage(message));
- }
-
- private synchronized void sendToQueue(String message) throws JMSException
- {
- queueProducer.send(session.createTextMessage(message));
- }
-
- private String randomString(int length){
- char[] c = new char[length];
- for(int i = 0; i < length; i++)
- {
- c[i] = (char) ('A' + random.nextInt(26));
- }
- return new String(c);
- }
-
- private class QueueHandler implements MessageListener
- {
- public void onMessage(Message message)
- {
- try
- {
- sendToTopic(((TextMessage) message).getText());
- }
- catch (JMSException e)
- {
- e.printStackTrace();
- }
- }
- }
-
- private class TopicHandler implements MessageListener
- {
- public void onMessage(Message message)
- {
- try
- {
- System.out.println(((TextMessage) message).getText());
- }
- catch (JMSException e)
- {
- e.printStackTrace();
- }
- }
- }
-
- public static void main(String[] argv) throws AMQException, JMSException, InterruptedException, URLSyntaxException
- {
- //assume args describe the set of brokers to try
-
- String clientName = argv.length > 1 ? argv[1] : "testClient";
- new Client(new AMQConnection(argv.length > 0 ? argv[0] : "vm://:1", "guest", "guest", clientName, "/test"), clientName);
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/codec/BasicDeliverTest.java b/qpid/java/client/src/old_test/java/org/apache/qpid/codec/BasicDeliverTest.java
deleted file mode 100644
index 1db7e200bd..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/codec/BasicDeliverTest.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.codec;
-
-import org.apache.qpid.framing.*;
-import org.apache.mina.common.*;
-import org.apache.mina.common.support.BaseIoSession;
-import org.apache.mina.filter.codec.ProtocolDecoderOutput;
-import org.apache.mina.filter.codec.ProtocolEncoderOutput;
-
-import java.net.SocketAddress;
-
-/**
- */
-public class BasicDeliverTest
-{
- public static void main(String[] argv) throws Exception
- {
- BasicDeliverTest test = new BasicDeliverTest();
-
- //warm up:
- test.encode(512, 100000);
-
- //real tests:
- test.encode(16, 10000, 15);
- test.encode(32, 10000, 15);
- test.encode(64, 10000, 15);
- test.encode(128, 10000, 15);
- test.encode(256, 10000, 15);
- test.encode(512, 10000, 15);
- test.encode(1024, 10000, 15);
- test.encode(2048, 10000, 15);
-
- test.decode(16, 10000, 15);
- test.decode(32, 10000, 15);
- test.decode(64, 10000, 15);
- test.decode(128, 10000, 15);
- test.decode(256, 10000, 15);
- test.decode(512, 10000, 15);
- test.decode(1024, 10000, 15);
- test.decode(2048, 10000, 15);
- }
-
- void decode(int size, int count, int iterations) throws Exception
- {
- long min = Long.MAX_VALUE;
- long max = 0;
- long total = 0;
- for (int i = 0; i < iterations; i++)
- {
- long time = decode(size, count);
- total += time;
- if (time < min)
- {
- min = time;
- }
- if (time > max)
- {
- max = time;
- }
- }
- System.out.println("Decoded " + count + " messages of " + size +
- " bytes: avg=" + (total / iterations) + ", min=" + min + ", max=" + max);
- }
-
-
- long decode(int size, int count) throws Exception
- {
- AMQDataBlock block = getDataBlock(size);
- ByteBuffer data = ByteBuffer.allocate((int) block.getSize()); // XXX: Is cast a problem?
- block.writePayload(data);
- data.flip();
- AMQDecoder decoder = new AMQDecoder(false);
- long start = System.currentTimeMillis();
- for (int i = 0; i < count; i++)
- {
- decoder.decode(session, data, decoderOutput);
- data.rewind();
- }
- return System.currentTimeMillis() - start;
- }
-
- void encode(int size, int count, int iterations) throws Exception
- {
- long min = Long.MAX_VALUE;
- long max = 0;
- long total = 0;
- for (int i = 0; i < iterations; i++)
- {
- long time = encode(size, count);
- total += time;
- if (time < min)
- {
- min = time;
- }
- if (time > max)
- {
- max = time;
- }
- }
- System.out.println("Encoded " + count + " messages of " + size +
- " bytes: avg=" + (total / iterations) + ", min=" + min + ", max=" + max);
- }
-
- long encode(int size, int count) throws Exception
- {
- IoSession session = null;
- AMQDataBlock block = getDataBlock(size);
- AMQEncoder encoder = new AMQEncoder();
- long start = System.currentTimeMillis();
- for (int i = 0; i < count; i++)
- {
- encoder.encode(session, block, encoderOutput);
- }
- return System.currentTimeMillis() - start;
- }
-
- private final ProtocolEncoderOutput encoderOutput = new ProtocolEncoderOutput()
- {
-
- public void write(ByteBuffer byteBuffer)
- {
- }
-
- public void mergeAll()
- {
- }
-
- public WriteFuture flush()
- {
- return null;
- }
- };
-
- private final ProtocolDecoderOutput decoderOutput = new ProtocolDecoderOutput()
- {
- public void write(Object object)
- {
- }
-
- public void flush()
- {
- }
- };
-
- private final IoSession session = new BaseIoSession()
- {
-
- protected void updateTrafficMask()
- {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public IoService getService()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public IoServiceConfig getServiceConfig()
- {
- return null;
- }
-
- public IoHandler getHandler()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public IoSessionConfig getConfig()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public IoFilterChain getFilterChain()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public TransportType getTransportType()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public SocketAddress getRemoteAddress()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public SocketAddress getLocalAddress()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public SocketAddress getServiceAddress()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public int getScheduledWriteRequests()
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public int getScheduledWriteBytes()
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
- };
-
- private static final char[] DATA = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
-
- static CompositeAMQDataBlock getDataBlock(int size)
- {
- //create a frame representing message delivery
- AMQFrame[] frames = new AMQFrame[3];
- frames[0] = wrapBody(createBasicDeliverBody());
- frames[1] = wrapBody(createContentHeaderBody());
- frames[2] = wrapBody(createContentBody(size));
-
- return new CompositeAMQDataBlock(frames);
- }
-
- static AMQFrame wrapBody(AMQBody body)
- {
- AMQFrame frame = new AMQFrame(1, body);
- return frame;
- }
-
- static ContentBody createContentBody(int size)
- {
- ContentBody body = new ContentBody();
- body.payload = ByteBuffer.allocate(size);
- for (int i = 0; i < size; i++)
- {
- body.payload.put((byte) DATA[i % DATA.length]);
- }
- return body;
- }
-
- static ContentHeaderBody createContentHeaderBody()
- {
- ContentHeaderBody body = new ContentHeaderBody();
- body.properties = new BasicContentHeaderProperties();
- body.weight = 1;
- body.classId = 6;
- return body;
- }
-
- static BasicDeliverBody createBasicDeliverBody()
- {
- BasicDeliverBody body = new BasicDeliverBody((byte) 8, (byte) 0,
- BasicDeliverBody.getClazz((byte) 8, (byte) 0),
- BasicDeliverBody.getMethod((byte) 8, (byte) 0),
- new AMQShortString("myConsumerTag"), 1,
- new AMQShortString("myExchange"), false,
- new AMQShortString("myRoutingKey"));
- return body;
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/codec/Client.java b/qpid/java/client/src/old_test/java/org/apache/qpid/codec/Client.java
deleted file mode 100644
index 3886021277..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/codec/Client.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.codec;
-
-import org.apache.mina.transport.socket.nio.SocketConnector;
-import org.apache.mina.common.ConnectFuture;
-import org.apache.mina.common.IoHandlerAdapter;
-import org.apache.mina.common.IoSession;
-import org.apache.mina.filter.codec.ProtocolCodecFilter;
-import org.apache.qpid.framing.AMQDataBlock;
-import org.apache.qpid.framing.AMQFrame;
-import org.apache.qpid.framing.BasicDeliverBody;
-import org.apache.qpid.framing.ContentBody;
-
-import java.net.InetSocketAddress;
-
-public class Client extends IoHandlerAdapter
-{
- //private static final int[] DEFAULT_SIZES = new int[]{1024, 512, 256, 128, 56};
- //private static final int[] DEFAULT_SIZES = new int[]{256, 256, 256, 256, 256, 512, 512, 512, 512, 512};
- private static final int[] DEFAULT_SIZES = new int[]{256, 512, 256, 512, 256, 512, 256, 512, 256, 512};
- //private static final int[] DEFAULT_SIZES = new int[]{1024, 1024, 1024, 1024, 1024};
-
- private final IoSession _session;
- private final long _start;
- private final int _size;
- private final int _count;
- private int _received;
- private boolean _closed;
-
- Client(String host, int port, int size, int count) throws Exception
- {
- _count = count;
- _size = size;
- AMQDataBlock block = BasicDeliverTest.getDataBlock(size);
-
- InetSocketAddress address = new InetSocketAddress(host, port);
- ConnectFuture future = new SocketConnector().connect(address, this);
- future.join();
- _session = future.getSession();
-
- _start = System.currentTimeMillis();
- for(int i = 0; i < count; i++)
- {
- _session.write(block);
- }
- }
-
- void close()
- {
- long time = System.currentTimeMillis() - _start;
- System.out.println("Received " + _received + " messages of " + _size
- + " bytes in " + time + "ms.");
- _session.close();
- synchronized(this)
- {
- _closed = true;
- notify();
- }
- }
-
- void waitForClose() throws InterruptedException
- {
- synchronized(this)
- {
- while(!_closed)
- {
- wait();
- }
- }
- }
-
- public void sessionCreated(IoSession session) throws Exception
- {
- session.getFilterChain().addLast("protocolFilter", new ProtocolCodecFilter(new AMQCodecFactory(false)));
- }
-
- public void messageReceived(IoSession session, Object object) throws Exception
- {
- if(isContent(object) && ++_received == _count) close();
- }
-
- public void exceptionCaught(IoSession session, Throwable throwable) throws Exception
- {
- throwable.printStackTrace();
- close();
- }
-
- private static boolean isDeliver(Object o)
- {
- return o instanceof AMQFrame && ((AMQFrame) o).getBodyFrame() instanceof BasicDeliverBody;
- }
-
- private static boolean isContent(Object o)
- {
- return o instanceof AMQFrame && ((AMQFrame) o).getBodyFrame() instanceof ContentBody;
- }
-
- public static void main(String[] argv) throws Exception
- {
- String host = argv.length > 0 ? argv[0] : "localhost";
- int port = argv.length > 1 ? Integer.parseInt(argv[1]) : 8888;
- int count = argv.length > 2 ? Integer.parseInt(argv[2]) : 10000;
- int[] sizes = argv.length > 3 ? new int[]{Integer.parseInt(argv[3])} : DEFAULT_SIZES;
-
- System.out.println("Connecting to " + host + ":" + port);
-
- for(int i = 0; i < sizes.length; i++)
- {
- new Client(host, port, sizes[i], count).waitForClose();
- Thread.sleep(1000);
- }
- }
-
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/codec/Server.java b/qpid/java/client/src/old_test/java/org/apache/qpid/codec/Server.java
deleted file mode 100644
index fa4295e0b2..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/codec/Server.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.codec;
-
-import org.apache.mina.common.IoHandlerAdapter;
-import org.apache.mina.common.IoSession;
-import org.apache.mina.transport.socket.nio.SocketAcceptor;
-import org.apache.mina.util.SessionUtil;
-import org.apache.mina.filter.codec.ProtocolCodecFilter;
-import org.apache.qpid.framing.AMQFrame;
-import org.apache.qpid.framing.CompositeAMQDataBlock;
-
-import java.net.InetSocketAddress;
-
-public class Server extends IoHandlerAdapter
-{
- Server(int port) throws Exception
- {
- new SocketAcceptor().bind(new InetSocketAddress(port), this);
- System.out.println("Listening on " + port);
- }
-
- public void sessionCreated(IoSession session) throws Exception
- {
- SessionUtil.initialize(session);
- session.getFilterChain().addLast("protocolFilter", new ProtocolCodecFilter(new AMQCodecFactory(false)));
- }
-
- public void messageReceived(IoSession session, Object object) throws Exception
- {
- getAccumulator(session).received(session, (AMQFrame) object);
- }
-
- public void sessionOpened(IoSession session) throws Exception
- {
- System.out.println("sessionOpened()");
- }
-
- public void sessionClosed(IoSession session) throws Exception
- {
- System.out.println("sessionClosed()");
- }
-
- public void exceptionCaught(IoSession session, Throwable t) throws Exception
- {
- System.out.println("exceptionCaught()");
- t.printStackTrace();
- session.close();
- }
-
- private Accumulator getAccumulator(IoSession session)
- {
- Accumulator a = (Accumulator) session.getAttribute(ACCUMULATOR);
- if(a == null)
- {
- a = new Accumulator();
- session.setAttribute(ACCUMULATOR, a);
- }
- return a;
- }
-
- private static final String ACCUMULATOR = Accumulator.class.getName();
-
- private static class Accumulator
- {
- private final AMQFrame[] frames = new AMQFrame[3];
- private int i;
-
- void received(IoSession session, AMQFrame frame)
- {
- frames[i++] = frame;
- if(i >= frames.length)
- {
- i = 0;
- session.write(new CompositeAMQDataBlock(frames));
- }
- }
- }
-
- public static void main(String[] argv) throws Exception
- {
- int port = argv.length > 0 ? Integer.parseInt(argv[0]) : 8888;
- new Server(port);
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/config/AMQConnectionFactoryInitialiser.java b/qpid/java/client/src/old_test/java/org/apache/qpid/config/AMQConnectionFactoryInitialiser.java
deleted file mode 100644
index cac0064785..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/config/AMQConnectionFactoryInitialiser.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.config;
-
-import org.apache.qpid.client.AMQConnectionFactory;
-import org.apache.qpid.config.ConnectionFactoryInitialiser;
-import org.apache.qpid.config.ConnectorConfig;
-
-import javax.jms.ConnectionFactory;
-
-class AMQConnectionFactoryInitialiser implements ConnectionFactoryInitialiser
-{
- public ConnectionFactory getFactory(ConnectorConfig config)
- {
- return new AMQConnectionFactory(config.getHost(), config.getPort(), "/test_path");
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/config/AbstractConfig.java b/qpid/java/client/src/old_test/java/org/apache/qpid/config/AbstractConfig.java
deleted file mode 100644
index 04381d66a0..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/config/AbstractConfig.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.config;
-
-public abstract class AbstractConfig
-{
- public boolean setOptions(String[] argv)
- {
- try
- {
- for(int i = 0; i < argv.length - 1; i += 2)
- {
- String key = argv[i];
- String value = argv[i+1];
- setOption(key, value);
- }
- return true;
- }
- catch(Exception e)
- {
- System.out.println(e.getMessage());
- }
- return false;
- }
-
- protected int parseInt(String msg, String i)
- {
- try
- {
- return Integer.parseInt(i);
- }
- catch(NumberFormatException e)
- {
- throw new RuntimeException(msg + ": " + i);
- }
- }
-
- protected long parseLong(String msg, String i)
- {
- try
- {
- return Long.parseLong(i);
- }
- catch(NumberFormatException e)
- {
- throw new RuntimeException(msg + ": " + i);
- }
- }
-
- public abstract void setOption(String key, String value);
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/config/ConnectionFactoryInitialiser.java b/qpid/java/client/src/old_test/java/org/apache/qpid/config/ConnectionFactoryInitialiser.java
deleted file mode 100644
index a9984eb09a..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/config/ConnectionFactoryInitialiser.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.config;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-
-public interface ConnectionFactoryInitialiser
-{
- public ConnectionFactory getFactory(ConnectorConfig config) throws JMSException;
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/config/Connector.java b/qpid/java/client/src/old_test/java/org/apache/qpid/config/Connector.java
deleted file mode 100644
index ff2377f087..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/config/Connector.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.config;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-
-public class Connector
-{
- public Connection createConnection(ConnectorConfig config) throws Exception
- {
- return getConnectionFactory(config).createConnection();
- }
-
- ConnectionFactory getConnectionFactory(ConnectorConfig config) throws Exception
- {
- String factory = config.getFactory();
- if(factory == null) factory = AMQConnectionFactoryInitialiser.class.getName();
- System.out.println("Using " + factory);
- return ((ConnectionFactoryInitialiser) Class.forName(factory).newInstance()).getFactory(config);
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/config/ConnectorConfig.java b/qpid/java/client/src/old_test/java/org/apache/qpid/config/ConnectorConfig.java
deleted file mode 100644
index b120ed3f12..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/config/ConnectorConfig.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.config;
-
-public interface ConnectorConfig
-{
- public String getHost();
- public int getPort();
- public String getFactory();
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/config/JBossConnectionFactoryInitialiser.java b/qpid/java/client/src/old_test/java/org/apache/qpid/config/JBossConnectionFactoryInitialiser.java
deleted file mode 100644
index 1c86aea56c..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/config/JBossConnectionFactoryInitialiser.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.config;
-
-import org.apache.qpid.config.ConnectionFactoryInitialiser;
-import org.apache.qpid.config.ConnectorConfig;
-
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.management.MBeanException;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.naming.NameNotFoundException;
-import java.util.Hashtable;
-
-public class JBossConnectionFactoryInitialiser implements ConnectionFactoryInitialiser
-{
- public ConnectionFactory getFactory(ConnectorConfig config) throws JMSException
- {
- ConnectionFactory cf = null;
- InitialContext ic = null;
- Hashtable ht = new Hashtable();
- ht.put(InitialContext.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
- String jbossHost = System.getProperty("jboss.host", "eqd-lxamq01");
- String jbossPort = System.getProperty("jboss.port", "1099");
- ht.put(InitialContext.PROVIDER_URL, "jnp://" + jbossHost + ":" + jbossPort);
- ht.put(InitialContext.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
-
- try
- {
- ic = new InitialContext(ht);
- if (!doesDestinationExist("topictest.messages", ic))
- {
- deployTopic("topictest.messages", ic);
- }
- if (!doesDestinationExist("topictest.control", ic))
- {
- deployTopic("topictest.control", ic);
- }
-
- cf = (ConnectionFactory) ic.lookup("/ConnectionFactory");
- return cf;
- }
- catch (NamingException e)
- {
- JMSException jmse = new JMSException("Unable to lookup object: " + e);
- jmse.setLinkedException(e);
- jmse.initCause(e);
- throw jmse;
- }
- catch (Exception e)
- {
- JMSException jmse = new JMSException("Error creating topic: " + e);
- jmse.setLinkedException(e);
- jmse.initCause(e);
- throw jmse;
- }
- }
-
- private boolean doesDestinationExist(String name, InitialContext ic) throws Exception
- {
- try
- {
- ic.lookup("/" + name);
- }
- catch (NameNotFoundException e)
- {
- return false;
- }
- return true;
- }
-
- private void deployTopic(String name, InitialContext ic) throws Exception
- {
- MBeanServerConnection mBeanServer = lookupMBeanServerProxy(ic);
-
- ObjectName serverObjectName = new ObjectName("jboss.messaging:service=ServerPeer");
-
- String jndiName = "/" + name;
- try
- {
- mBeanServer.invoke(serverObjectName, "createTopic",
- new Object[]{name, jndiName},
- new String[]{"java.lang.String", "java.lang.String"});
- }
- catch (MBeanException e)
- {
- System.err.println("Error: " + e);
- System.err.println("Cause: " + e.getCause());
- }
- }
-
- private MBeanServerConnection lookupMBeanServerProxy(InitialContext ic) throws NamingException
- {
- return (MBeanServerConnection) ic.lookup("jmx/invoker/RMIAdaptor");
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/flow/ChannelFlowTest.java b/qpid/java/client/src/old_test/java/org/apache/qpid/flow/ChannelFlowTest.java
deleted file mode 100644
index cb8adae18c..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/flow/ChannelFlowTest.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.flow;
-
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQDestination;
-import org.apache.qpid.client.AMQQueue;
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.exchange.ExchangeDefaults;
-import org.apache.qpid.framing.AMQShortString;
-
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-
-public class ChannelFlowTest implements MessageListener
-{
- private int sent;
- private int received;
-
- ChannelFlowTest(String broker) throws Exception
- {
- this(new AMQConnection(broker, "guest", "guest", randomize("Client"), "/test"));
- }
-
- ChannelFlowTest(AMQConnection connection) throws Exception
- {
- this(connection, new AMQQueue(connection.getDefaultQueueExchangeName(), new AMQShortString(randomize("ChannelFlowTest")), true));
- }
-
- ChannelFlowTest(AMQConnection connection, AMQDestination destination) throws Exception
- {
- AMQSession session = (AMQSession) connection.createSession(false, AMQSession.NO_ACKNOWLEDGE, 50,25);
-
- //set up a slow consumer
- session.createConsumer(destination).setMessageListener(this);
- connection.start();
-
- //create a publisher
- MessageProducer producer = session.createProducer(destination);
- Message msg = session.createTextMessage("Message");
-
- //publish in bursts that are fast enough to cause channel flow control
- for(int i = 0; i < 10; i++)
- {
- for(int j = 0; j < 100; j++)
- {
- producer.send(msg);
- sent++;
- }
- waitUntilReceived(sent - 40);
- }
-
- waitUntilReceived(sent);
-
- session.close();
- connection.close();
- }
-
-
- private synchronized void waitUntilReceived(int count) throws InterruptedException
- {
- while(received <count)
- {
- wait();
- }
- }
-
- public synchronized void onMessage(Message message)
- {
- try
- {
- Thread.sleep(50);
-
- received++;
- notify();
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- }
-
- private static String randomize(String in)
- {
- return in + System.currentTimeMillis();
- }
-
- public static void main(String[] argv) throws Exception
- {
- new ChannelFlowTest(argv.length == 0 ? "localhost:5672" : argv[0]);
- }
-
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/fragmentation/TestLargePublisher.java b/qpid/java/client/src/old_test/java/org/apache/qpid/fragmentation/TestLargePublisher.java
deleted file mode 100644
index 2fe01fc126..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/fragmentation/TestLargePublisher.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.fragmentation;
-
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.exchange.ExchangeDefaults;
-import org.apache.qpid.url.URLSyntaxException;
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQTopic;
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.jms.MessageProducer;
-import org.apache.qpid.jms.Session;
-import org.apache.log4j.Logger;
-
-import javax.jms.BytesMessage;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-/**
- * A client that behaves as follows:
- * <ul><li>Connects to a queue, whose name is specified as a cmd-line argument</li>
- * <li>Creates a temporary queue</li>
- * <li>Creates messages containing a property that is the name of the temporary queue</li>
- * <li>Fires off a message on the original queue and waits for a response on the temporary queue</li>
- * </ul>
- */
-public class TestLargePublisher
-{
- private static final Logger _log = Logger.getLogger(TestLargePublisher.class);
-
- private AMQConnection _connection;
-
- private AMQSession _session;
-
- private class CallbackHandler implements MessageListener
- {
- private int _expectedMessageCount;
-
- private int _actualMessageCount;
-
- private long _startTime;
-
- public CallbackHandler(int expectedMessageCount, long startTime)
- {
- _expectedMessageCount = expectedMessageCount;
- _startTime = startTime;
- }
-
- public void onMessage(Message m)
- {
- if (_log.isDebugEnabled())
- {
- _log.debug("Message received: " + m);
- }
- _actualMessageCount++;
- if (_actualMessageCount%1000 == 0)
- {
- _log.info("Received message count: " + _actualMessageCount);
- }
- /*if (!"henson".equals(m.toString()))
- {
- _log.error("AbstractJMSMessage response not correct: expected 'henson' but got " + m.toString());
- }
- else
- {
- if (_log.isDebugEnabled())
- {
- _log.debug("AbstractJMSMessage " + m + " received");
- }
- else
- {
- _log.info("AbstractJMSMessage received");
- }
- } */
-
- if (_actualMessageCount == _expectedMessageCount)
- {
- long timeTaken = System.currentTimeMillis() - _startTime;
- System.out.println("Total time taken to receive " + _expectedMessageCount+ " messages was " +
- timeTaken + "ms, equivalent to " +
- (_expectedMessageCount/(timeTaken/1000.0)) + " messages per second");
- }
- }
- }
-
- public TestLargePublisher(String host, int port, String clientID,
- final int messageCount) throws AMQException,URLSyntaxException
- {
- try
- {
- createConnection(host, port, clientID);
-
- _session = (AMQSession) _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- AMQTopic destination = new AMQTopic(_session.getDefaultTopicExchangeName(), new AMQShortString("large"));
- MessageProducer producer = (MessageProducer) _session.createProducer(destination);
-
- _connection.start();
- //TextMessage msg = _session.createTextMessage(tempDestination.getQueueName() + "/Presented to in conjunction with Mahnah Mahnah and the Snowths");
- final long startTime = System.currentTimeMillis();
-
- for (int i = 0; i < messageCount; i++)
- {
- BytesMessage msg = _session.createBytesMessage();
- populateMessage(msg);
- producer.send(msg);
- }
- _log.info("Finished sending " + messageCount + " messages");
- }
- catch (JMSException e)
- {
- e.printStackTrace();
- }
- }
-
- private void createConnection(String host, int port, String clientID) throws AMQException , URLSyntaxException
- {
- _connection = new AMQConnection(host, port, "guest", "guest",
- clientID, "/test");
- }
-
- private void populateMessage(BytesMessage msg) throws JMSException
- {
- int size = 1024 * 187; // 187k
- byte[] data = new byte[size];
- for (int i = 0; i < data.length; i++)
- {
- data[i] = (byte)(i%25);
- }
- msg.writeBytes(data);
- }
-
- /**
- *
- * @param args argument 1 if present specifies the name of the temporary queue to create. Leaving it blank
- * means the server will allocate a name.
- */
- public static void main(String[] args) throws URLSyntaxException
- {
- final String host;
- final int port;
- final int numMessages;
- if (args.length == 0)
- {
- host = "localhost";
- port = 5672;
- numMessages = 100;
-// System.err.println("Usage: TestLargePublisher <host> <port> <number of messages>");
- }
- else
- {
- host = args[0];
- port = Integer.parseInt(args[1]);
- numMessages = Integer.parseInt(args[2]);
- }
-
- try
- {
- InetAddress address = InetAddress.getLocalHost();
- String clientID = address.getHostName() + System.currentTimeMillis();
- TestLargePublisher client = new TestLargePublisher(host, port, clientID, numMessages);
- }
- catch (UnknownHostException e)
- {
- e.printStackTrace();
- }
- catch (AMQException e)
- {
- System.err.println("Error in client: " + e);
- e.printStackTrace();
- }
-
- //System.exit(0);
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/fragmentation/TestLargeSubscriber.java b/qpid/java/client/src/old_test/java/org/apache/qpid/fragmentation/TestLargeSubscriber.java
deleted file mode 100644
index b0cde22349..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/fragmentation/TestLargeSubscriber.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.fragmentation;
-
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQTopic;
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.jms.Session;
-import org.apache.qpid.exchange.ExchangeDefaults;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.log4j.Logger;
-
-import javax.jms.*;
-import java.net.InetAddress;
-
-public class TestLargeSubscriber
-{
- private static final Logger _logger = Logger.getLogger(TestLargeSubscriber.class);
-
- private static MessageProducer _destinationProducer;
-
- private static String _destinationName;
-
- public static void main(String[] args)
- {
- _logger.info("Starting...");
-
- final String host;
- final int port;
- final String username;
- final String password;
- final String virtualPath;
- final int numExpectedMessages;
- if (args.length == 0)
- {
- host = "localhost";
- port = 5672;
- username = "guest";
- password = "guest";
- virtualPath = "/test";
- numExpectedMessages = 100;
- }
- else if (args.length == 6)
- {
- host = args[0];
- port = Integer.parseInt(args[1]);
- username = args[2];
- password = args[3];
- virtualPath = args[4];
- numExpectedMessages = Integer.parseInt(args[5]);
- }
- else
- {
- System.out.println("Usage: host port username password virtual-path expectedMessageCount");
- System.exit(1);
- throw new RuntimeException("cannot be reached");
- }
-
- try
- {
- InetAddress address = InetAddress.getLocalHost();
- AMQConnection con = new AMQConnection(host, port, username, password,
- address.getHostName(), virtualPath);
- final AMQSession session = (AMQSession) con.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- final int expectedMessageCount = numExpectedMessages;
-
- MessageConsumer consumer = session.createConsumer(new AMQTopic(session.getDefaultTopicExchangeName(),
- new AMQShortString("large")),
- 100, true, false, null);
-
- consumer.setMessageListener(new MessageListener()
- {
- private int _messageCount;
-
- private long _startTime = 0;
-
- public void onMessage(Message message)
- {
- validateMessage(message);
- if (_messageCount++ == 0)
- {
- _startTime = System.currentTimeMillis();
- }
- if (_logger.isInfoEnabled())
- {
- _logger.info("Got message '" + message + "'");
- }
- if (_messageCount == expectedMessageCount)
- {
- long totalTime = System.currentTimeMillis() - _startTime;
- _logger.error("Total time to receive " + _messageCount + " messages was " +
- totalTime + "ms. Rate is " + (_messageCount/(totalTime/1000.0)));
- }
- }
-
- private void validateMessage(Message message)
- {
- if (!(message instanceof BytesMessage))
- {
- _logger.error("Message is not of correct type - should be BytesMessage and is " +
- message.getClass());
- }
- BytesMessage bm = (BytesMessage) message;
- final int expectedSize = 1024 * 187; // 187k
- try
- {
- if (bm.getBodyLength() != expectedSize)
- {
- _logger.error("Message is not correct length - should be " + expectedSize + " and is " +
- bm.getBodyLength());
- }
- }
- catch (JMSException e)
- {
- _logger.error("Failed to validate message: " + e, e);
- }
- try
- {
- byte[] data = new byte[(int)bm.getBodyLength()];
- bm.readBytes(data);
- for (int i = 0; i < data.length; i++)
- {
- if (data[i] != (byte)(i%25))
- {
- _logger.error("byte " + i + " of message is wrong - should be " + i%25 + " but is " +
- data[i]);
- }
- }
- _logger.info("***** Validated message successfully");
- }
- catch (JMSException e)
- {
- _logger.error("Failed to validate message: " + e, e);
- }
- }
- });
- con.start();
- }
- catch (Throwable t)
- {
- System.err.println("Fatal error: " + t);
- t.printStackTrace();
- }
-
- System.out.println("Waiting...");
- }
-}
-
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/headers/Listener.java b/qpid/java/client/src/old_test/java/org/apache/qpid/headers/Listener.java
deleted file mode 100644
index cb5caefc1e..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/headers/Listener.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.headers;
-
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.jms.Session;
-//import org.apache.qpid.testutil.Config;
-
-import javax.jms.MessageListener;
-import javax.jms.Message;
-import javax.jms.Destination;
-import javax.jms.MessageProducer;
-import javax.jms.JMSException;
-
-public class Listener //implements MessageListener
-{
-/* private final AMQConnection _connection;
- private final MessageProducer _controller;
- private final AMQSession _session;
- private final MessageFactory _factory;
- private int count;
- private long start;
-
- Listener(AMQConnection connection, Destination exchange) throws Exception
- {
- _connection = connection;
- _session = (AMQSession) connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- _factory = new MessageFactory(_session, 0, 19);
-
- //register for events
- _factory.createConsumer(exchange).setMessageListener(this);
- _connection.start();
-
- _controller = _session.createProducer(exchange);
- }
-
- private void shutdown()
- {
- try
- {
- _session.close();
- _connection.stop();
- _connection.close();
- }
- catch(Exception e)
- {
- e.printStackTrace(System.out);
- }
- }
-
- private void report()
- {
- try
- {
- String msg = getReport();
- _controller.send(_factory.createReportResponseMessage(msg));
- System.out.println("Sent report: " + msg);
- }
- catch(Exception e)
- {
- e.printStackTrace(System.out);
- }
- }
-
- private String getReport() throws JMSException
- {
- long time = (System.currentTimeMillis() - start);
- return "Received " + count + " in " + time + "ms";
- }
-
- public void onMessage(Message message)
- {
- if(count == 0) start = System.currentTimeMillis();
-
- if(_factory.isShutdown(message))
- {
- shutdown();
- }
- else if(_factory.isReport(message))
- {
- //send a report:
- report();
- }
- else if (++count % 100 == 0)
- {
- System.out.println("Received " + count + " messages.");
- }
- }
-
- public static void main(String[] argv) throws Exception
- {
- Config config = new Config();
- config.setType(Config.HEADERS);
- config.setName("test_headers_exchange");
- config.setOptions(argv);
- new Listener((AMQConnection) config.getConnection(), config.getDestination());
- }*/
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/headers/MessageFactory.java b/qpid/java/client/src/old_test/java/org/apache/qpid/headers/MessageFactory.java
deleted file mode 100644
index a2d575fdd4..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/headers/MessageFactory.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.headers;
-
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.framing.FieldTable;
-import org.apache.qpid.framing.FieldTableFactory;
-
-import javax.jms.BytesMessage;
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.TextMessage;
-
-/**
- */
-class MessageFactory
-{
- private static final char[] DATA = "abcdefghijklmnopqrstuvwxyz".toCharArray();
-
- private final AMQSession _session;
- private final byte[] _payload;
-
- private String[] _headerNames;
-
- MessageFactory(AMQSession session)
- {
- this(session, Integer.getInteger("amqj.test.message_size", 256).intValue(), 5);
- }
-
- MessageFactory(AMQSession session, int payloadSize, int headerCount)
- {
- if (headerCount < 1)
- {
- throw new IllegalArgumentException("Header count must be positive");
- }
- _session = session;
- _payload = new byte[payloadSize];
- for (int i = 0; i < _payload.length; i++)
- {
- _payload[i] = (byte) DATA[i % DATA.length];
- }
- _headerNames = new String[headerCount];
- // note that with the standard encoding the headers get prefixed with an S to indicate their type
- for (int i = 0; i < _headerNames.length; i++)
- {
- if (i < 10)
- {
- _headerNames[i] = "F000" + i;
- }
- else if (i >= 10 && i < 100)
- {
- _headerNames[i] = "F00" + i;
- }
- else
- {
- _headerNames[i] = "F0" + i;
- }
- }
- }
-
- Message createEventMessage() throws JMSException
- {
- BytesMessage msg = _session.createBytesMessage();
- if (_payload.length != 0)
- {
- msg.writeBytes(_payload);
- }
- return setHeaders(msg, _headerNames);
- }
-
- Message createShutdownMessage() throws JMSException
- {
- return setHeaders(_session.createMessage(), new String[]{"F0000", "SHUTDOWN"});
- }
-
- Message createReportRequestMessage() throws JMSException
- {
- return setHeaders(_session.createMessage(), new String[]{"F0000", "REPORT"});
- }
-
- Message createReportResponseMessage(String msg) throws JMSException
- {
- return setHeaders(_session.createTextMessage(msg), new String[]{"CONTROL", "REPORT"});
- }
-
- boolean isShutdown(Message m)
- {
- return checkPresent(m, "SHUTDOWN");
- }
-
- boolean isReport(Message m)
- {
- return checkPresent(m, "REPORT");
- }
-
- Object getReport(Message m)
- {
- try
- {
- return ((TextMessage) m).getText();
- }
- catch (JMSException e)
- {
- e.printStackTrace(System.out);
- return e.toString();
- }
- }
-
- FieldTable getConsumerBinding()
- {
- FieldTable binding = FieldTableFactory.newFieldTable();
- binding.setString("SF0000", "value");
- return binding;
- }
-
- FieldTable getControllerBinding()
- {
- FieldTable binding = FieldTableFactory.newFieldTable();
- binding.setString("SCONTROL", "value");
- return binding;
- }
-
- MessageConsumer createConsumer(Destination source) throws Exception
- {
- return _session.createConsumer(source, 0, false, true, null, getConsumerBinding());
- }
-
- MessageConsumer createController(Destination source) throws Exception
- {
- return _session.createConsumer(source, 0, false, true, null, getControllerBinding());
- }
-
- private static boolean checkPresent(Message m, String s)
- {
- try
- {
- return m.getStringProperty(s) != null;
- }
- catch (JMSException e)
- {
- e.printStackTrace(System.out);
- return false;
- }
- }
-
- private static Message setHeaders(Message m, String[] headers) throws JMSException
- {
- for (int i = 0; i < headers.length; i++)
- {
- // the value in GRM is 5 bytes
- m.setStringProperty(headers[i], "value");
- }
- return m;
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/headers/Publisher.java b/qpid/java/client/src/old_test/java/org/apache/qpid/headers/Publisher.java
deleted file mode 100644
index d9ef702c48..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/headers/Publisher.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.headers;
-
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQSession;
-//import org.apache.qpid.testutil.Config;
-
-import javax.jms.*;
-
-public class Publisher // implements MessageListener
-{
-/* private final Object _lock = new Object();
- private final AMQConnection _connection;
- private final AMQSession _session;
- private final Destination _exchange;
- private final MessageFactory _factory;
- private final MessageProducer _publisher;
- private int _count;
-
- Publisher(AMQConnection connection, Destination exchange) throws Exception
- {
- _connection = connection;
- _exchange = exchange;
- _session = (AMQSession) _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- _factory = new MessageFactory(_session, 0, 19);
- _publisher = _session.createProducer(_exchange);
- }
-
- Publisher(Config config) throws Exception
- {
- this((AMQConnection) config.getConnection(), config.getDestination());
- }
-
- private void test(int msgCount, int consumerCount) throws Exception
- {
- _count = consumerCount;
- _factory.createController(_exchange).setMessageListener(this);
- _connection.start();
- long start = System.currentTimeMillis();
- publish(msgCount);
- waitForCompletion(consumerCount);
- long end = System.currentTimeMillis();
-
- System.out.println("Completed in " + (end - start) + " ms.");
-
- //request shutdown
- _publisher.send(_factory.createShutdownMessage());
-
- _connection.stop();
- _connection.close();
- }
-
- private void publish(int count) throws Exception
- {
-
- //send events
- for (int i = 0; i < count; i++)
- {
- _publisher.send(_factory.createEventMessage());
- if ((i + 1) % 100 == 0)
- {
- System.out.println("Sent " + (i + 1) + " messages");
- }
- }
-
- //request report
- _publisher.send(_factory.createReportRequestMessage());
- }
-
- private void waitForCompletion(int consumers) throws Exception
- {
- System.out.println("Waiting for completion...");
- synchronized (_lock)
- {
- while (_count > 0)
- {
- _lock.wait();
- }
- }
- }
-
-
- public void onMessage(Message message)
- {
- System.out.println("Received report " + _factory.getReport(message) + " " + --_count + " remaining");
- if (_count == 0)
- {
- synchronized (_lock)
- {
- _lock.notify();
- }
- }
- }
-
-
- public static void main(String[] argv) throws Exception
- {
- if (argv.length >= 2)
- {
- int msgCount = Integer.parseInt(argv[argv.length - 2]);
- int consumerCount = Integer.parseInt(argv[argv.length - 1]);
-
- Config config = new Config();
- config.setType(Config.HEADERS);
- config.setName("test_headers_exchange");
- String[] options = new String[argv.length - 2];
- System.arraycopy(argv, 0, options, 0, options.length);
- config.setOptions(options);
-
- new Publisher(config).test(msgCount, consumerCount);
- }
-
- }*/
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/jndi/referenceable/Bind.java b/qpid/java/client/src/old_test/java/org/apache/qpid/jndi/referenceable/Bind.java
deleted file mode 100644
index ee6a12c233..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/jndi/referenceable/Bind.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.jndi.referenceable;
-
-import org.apache.qpid.client.*;
-import org.apache.qpid.AMQException;
-import org.apache.qpid.url.URLSyntaxException;
-
-import javax.jms.*;
-import javax.naming.*;
-
-import java.util.Properties;
-import java.io.InputStream;
-import java.io.FileInputStream;
-import java.io.IOException;
-
-/**
- * Binds a reference from a JNDI source.
- * Given a properties file with the JNDI information and a binding string.
- */
-public class Bind
-{
- private static final String USAGE="USAGE: java bind <JNDI Properties file> -cf <url> <binding> | -c <url> <binding> [-t <topic Name> <binding>] [-q <queue Name> <binding>]";
- public Bind(String propertiesFile, String bindingURL, Referenceable reference) throws NameAlreadyBoundException, NoInitialContextException
- {
- // Set up the environment for creating the initial context
- String qpid_home = System.getProperty("QPID_HOME");
-
- if (qpid_home == null || qpid_home.equals(""))
- {
- System.out.println("QPID_HOME is not set");
- System.exit(1);
- }
-
- if (qpid_home.charAt(qpid_home.length() - 1) != '/')
- {
- qpid_home += "/";
- }
-
- try
- {
- InputStream inputStream = new FileInputStream(qpid_home + propertiesFile);
- Properties properties = new Properties();
- properties.load(inputStream);
-
- // Create the initial context
- Context ctx = new InitialContext(properties);
-
- // Perform the binds
- ctx.bind(bindingURL, reference);
-
- // Close the context when we're done
- ctx.close();
- }
- catch (IOException ioe)
- {
- System.out.println("Unable to access properties file:" + propertiesFile + " Due to:" + ioe);
- }
- catch (NamingException e)
- {
- System.out.println("Operation failed: " + e);
- if (e instanceof NameAlreadyBoundException)
- {
- throw (NameAlreadyBoundException) e;
- }
-
- if (e instanceof NoInitialContextException)
- {
- throw (NoInitialContextException) e;
- }
- }
-
- }
-
- private static String parse(String[] args, int index, String what, String type)
- {
- try
- {
- return args[index];
- }
- catch (IndexOutOfBoundsException ioobe)
- {
- System.out.println("ERROR: No " + what + " specified for " + type + ".");
- System.out.println(USAGE);
- System.exit(1);
- }
-
- // The path is either return normally or exception.. which calls system exit so keep the compiler happy
- return "Never going to happen";
- }
-
-
- public static void main(String[] args) throws NameAlreadyBoundException, NoInitialContextException, URLSyntaxException, AMQException, JMSException
- {
-
-
- org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
-
-// org.apache.log4j.Logger _logger = org.apache.log4j.Logger.getLogger(AMQConnection.class);
-// _logger.setLevel(org.apache.log4j.Level.OFF);
-
- boolean exit = false;
-
- String qpid_home = System.getProperty("QPID_HOME");
-
- if (qpid_home == null || qpid_home.equals(""))
- {
- System.out.println("QPID_HOME is not set");
- exit = true;
- }
-
- if (args.length <= 2)
- {
- System.out.println("At least a connection or connection factory must be requested to be bound.");
- exit = true;
- }
- else
- {
- if ((args.length - 1) % 3 != 0)
- {
- System.out.println("Not all values have full details");
- exit = true;
- }
- }
- if (exit)
- {
- System.out.println(USAGE);
- System.exit(1);
- }
-
- if (qpid_home.charAt(qpid_home.length() - 1) != '/')
-
- {
- qpid_home += "/";
- }
-
- AMQConnectionFactory cf = null;
- AMQConnection c = null;
- AMQSession session = null;
- Referenceable reference = null;
-
- for (int index = 1; index < args.length; index ++)
- {
- String obj = args[index];
-
- String what = "Invalid";
- String binding;
-
- if (obj.startsWith("-c"))
- {
- boolean isFactory = obj.contains("f");
-
-
- if (isFactory)
- {
- what = "ConnectionFactory";
- }
- else
- {
- what = "Factory";
- }
-
- String url = parse(args, ++index, "url", what);
-
- if (isFactory)
- {
-
- cf = new AMQConnectionFactory(url);
- reference = cf;
- }
- else
- {
- c = new AMQConnection(url);
- reference = c;
- }
-
- }
-
- if (obj.equals("-t") || obj.equals("-q"))
- {
- if (c == null)
- {
- c = (AMQConnection) cf.createConnection();
- }
-
- if (session == null)
- {
- session = (AMQSession) c.createSession(false, Session.AUTO_ACKNOWLEDGE);
- }
-
- }
-
- if (obj.equals("-t"))
- {
-
- String topicName = parse(args, ++index, "Topic Name", "Topic");
- reference = (AMQTopic) session.createTopic(topicName);
- what = "Topic";
- }
- else
- {
- if (obj.equals("-q"))
- {
- String topicName = parse(args, ++index, "Queue Name", "Queue");
- reference = (AMQQueue) session.createQueue(topicName);
- what = "Queue";
- }
- }
-
- binding = parse(args, ++index, "binding", what);
- if (binding == null)
- {
- System.out.println(obj + " is not a known Object to bind.");
- System.exit(1);
- }
- else
- {
- System.out.print("Binding:" + reference + " to " + binding);
- try
- {
- new Bind(args[0], binding, reference);
- System.out.println(" ..Successful");
-
- }
- catch (NameAlreadyBoundException nabe)
- {
- System.out.println("");
- if (!obj.startsWith("-c") || index == args.length - 1)
- {
- throw nabe;
- }
- else
- {
- System.out.println("Continuing with other bindings using the same connection details");
- }
- }
- finally
- {
- if (!obj.startsWith("-c") || index == args.length - 1)
- {
- if (c != null)
- {
- c.close();
- }
- }
- }
- }
- }
-
- if (c != null)
- {
- c.close();
- }
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/jndi/referenceable/Lookup.java b/qpid/java/client/src/old_test/java/org/apache/qpid/jndi/referenceable/Lookup.java
deleted file mode 100644
index 1c9d8b0fd5..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/jndi/referenceable/Lookup.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.jndi.referenceable;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-
-/**
- * Looksup a reference from a JNDI source.
- * Given a properties file with the JNDI information and a binding string.
- */
-public class Lookup
-{
- private static final String USAGE = "USAGE: java lookup <JNDI Properties file> -b <binding>";
- private Properties _properties;
- private Object _object;
-
- public Lookup(String propertiesFile, String bindingValue) throws NamingException
- {
- // Set up the environment for creating the initial context
- String qpid_home = System.getProperty("QPID_HOME");
-
- if (qpid_home == null || qpid_home.equals(""))
- {
- System.out.println("QPID_HOME is not set");
- System.exit(1);
- }
-
- if (qpid_home.charAt(qpid_home.length() - 1) != '/')
- {
- qpid_home += "/";
- }
-
- try
- {
- InputStream inputStream = new FileInputStream(qpid_home + propertiesFile);
- Properties properties = new Properties();
- properties.load(inputStream);
-
- _properties = properties;
- lookup(bindingValue);
- }
- catch (IOException ioe)
- {
- System.out.println("Unable to access properties file:" + propertiesFile + " Due to:" + ioe);
- }
- }
-
- public Object lookup(String bindingValue) throws NamingException
- {
-
- // Create the initial context
- Context ctx = new InitialContext(_properties);
-
- // Perform the binds
- _object = ctx.lookup(bindingValue);
-
- // Close the context when we're done
- ctx.close();
-
- return getObject();
- }
-
- public Object getObject()
- {
- return _object;
- }
-
- private static String parse(String[] args, int index, String what)
- {
- try
- {
- return args[index];
- }
- catch (IndexOutOfBoundsException ioobe)
- {
- System.out.println("ERROR: No " + what + " specified.");
- System.out.println(USAGE);
- System.exit(1);
- }
-
- // The path is either return normally or exception.. which calls system exit so keep the compiler happy
- return "Never going to happen";
- }
-
-
- public static void main(String[] args) throws NamingException
- {
- boolean exit = false;
-
- String qpid_home = System.getProperty("QPID_HOME");
-
- if (qpid_home == null || qpid_home.equals(""))
- {
- System.out.println("QPID_HOME is not set");
- exit = true;
- }
-
- if (args.length <= 2)
- {
- System.out.println("At least a connection or connection factory must be requested to be bound.");
- exit = true;
- }
- else
- {
- if ((args.length - 1) % 2 != 0)
- {
- System.out.println("Not all values have full details");
- exit = true;
- }
- }
- if (exit)
- {
- System.out.println(USAGE);
- System.exit(1);
- }
-
- if (qpid_home.charAt(qpid_home.length() - 1) != '/')
-
- {
- qpid_home += "/";
- }
-
- for (int index = 1; index < args.length; index ++)
- {
- String obj = args[index];
-
-
- if (obj.equals("-b"))
- {
- String binding = parse(args, ++index, "binding");
-
- if (binding == null)
- {
- System.out.println("Binding not specified.");
- System.exit(1);
- }
- else
- {
- System.out.print("Looking up:" + binding);
- try
- {
- Lookup l = new Lookup(args[0], binding);
-
- Object object = l.getObject();
-
- if (object instanceof Connection)
- {
- try
- {
- ((Connection) object).close();
- }
- catch (JMSException jmse)
- {
- ;
- }
- }
- }
- catch (NamingException nabe)
- {
- System.out.println("Problem unbinding " + binding + " continuing with other values.");
- }
- }
- }// if -b
- else
- {
- System.out.println("Continuing with other bindings option not known:" + obj);
- }
- }//for
- }//main
-}//class
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/jndi/referenceable/Unbind.java b/qpid/java/client/src/old_test/java/org/apache/qpid/jndi/referenceable/Unbind.java
deleted file mode 100644
index 1acead674c..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/jndi/referenceable/Unbind.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.jndi.referenceable;
-
-import javax.naming.*;
-
-import java.util.Properties;
-import java.io.InputStream;
-import java.io.FileInputStream;
-import java.io.IOException;
-
-/**
- * Unbinds a reference from a JNDI source.
- * Given a properties file with the JNDI information and a binding string.
- */
-public class Unbind
-{
- private static final String USAGE = "USAGE: java unbind <JNDI Properties file> -b <binding>";
-
- public Unbind(String propertiesFile, String bindingValue) throws NamingException
- {
- // Set up the environment for creating the initial context
- String qpid_home = System.getProperty("QPID_HOME");
-
- if (qpid_home == null || qpid_home.equals(""))
- {
- System.out.println("QPID_HOME is not set");
- System.exit(1);
- }
-
- if (qpid_home.charAt(qpid_home.length() - 1) != '/')
- {
- qpid_home += "/";
- }
-
- try
- {
- InputStream inputStream = new FileInputStream(qpid_home + propertiesFile);
- Properties properties = new Properties();
- properties.load(inputStream);
-
- // Create the initial context
- Context ctx = new InitialContext(properties);
-
- // Perform the binds
- ctx.unbind(bindingValue);
-
- // Close the context when we're done
- ctx.close();
- }
- catch (IOException ioe)
- {
- System.out.println("Unable to access properties file:" + propertiesFile + " Due to:" + ioe);
- }
- }
-
- private static String parse(String[] args, int index, String what)
- {
- try
- {
- return args[index];
- }
- catch (IndexOutOfBoundsException ioobe)
- {
- System.out.println("ERROR: No " + what + " specified.");
- System.out.println(USAGE);
- System.exit(1);
- }
-
- // The path is either return normally or exception.. which calls system exit so keep the compiler happy
- return "Never going to happen";
- }
-
-
- public static void main(String[] args) throws NamingException
- {
- boolean exit = false;
-
- String qpid_home = System.getProperty("QPID_HOME");
-
- if (qpid_home == null || qpid_home.equals(""))
- {
- System.out.println("QPID_HOME is not set");
- exit = true;
- }
-
- if (args.length <= 2)
- {
- System.out.println("At least a connection or connection factory must be requested to be bound.");
- exit = true;
- }
- else
- {
- if ((args.length - 1) % 2 != 0)
- {
- System.out.println("Not all values have full details");
- exit = true;
- }
- }
- if (exit)
- {
- System.out.println(USAGE);
- System.exit(1);
- }
-
- if (qpid_home.charAt(qpid_home.length() - 1) != '/')
-
- {
- qpid_home += "/";
- }
-
- for (int index = 1; index < args.length; index ++)
- {
- String obj = args[index];
-
-
- if (obj.equals("-b"))
- {
- String binding = parse(args, ++index, "binding");
-
- if (binding == null)
- {
- System.out.println("Binding not specified.");
- System.exit(1);
- }
- else
- {
- System.out.print("UnBinding:" + binding);
- try
- {
- new Unbind(args[0], binding);
- System.out.println(" ..Successful");
- }
- catch (NamingException nabe)
- {
- System.out.println("");
-
- System.out.println("Problem unbinding " + binding + " continuing with other values.");
- }
- }
- }// if -b
- else
- {
- System.out.println("Continuing with other bindings option not known:" + obj);
- }
- }//for
- }//main
-}//class
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/latency/LatencyTest.java b/qpid/java/client/src/old_test/java/org/apache/qpid/latency/LatencyTest.java
deleted file mode 100644
index 4865a68dc4..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/latency/LatencyTest.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.latency;
-
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQQueue;
-import org.apache.qpid.client.AMQDestination;
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.exchange.ExchangeDefaults;
-import org.apache.qpid.framing.AMQShortString;
-
-import javax.jms.MessageProducer;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.JMSException;
-import javax.jms.TextMessage;
-import javax.jms.BytesMessage;
-
-public class LatencyTest implements MessageListener
-{
- private volatile boolean waiting;
- private int sent;
- private int received;
-
- private final byte[] data;
-
- private long min = Long.MAX_VALUE;
- private long max = 0;
- private long total = 0;
-
- LatencyTest(String broker, int count, int delay, int length) throws Exception
- {
- this(new AMQConnection(broker, "guest", "guest", randomize("Client"), "/test"), count, delay, length);
- }
-
- LatencyTest(AMQConnection connection, int count, int delay, int length) throws Exception
- {
- this(connection, new AMQQueue(connection.getDefaultQueueExchangeName(), new AMQShortString(randomize("LatencyTest")), true), count, delay, length);
- }
-
- LatencyTest(AMQConnection connection, AMQDestination destination, int count, int delay, int length) throws Exception
- {
- AMQSession session = (AMQSession) connection.createSession(false, AMQSession.NO_ACKNOWLEDGE);
-
- data = new byte[length];
- for(int i = 0; i < data.length; i++)
- {
- data[i] = (byte) (i % 100);
- }
-
- //set up a consumer
- session.createConsumer(destination).setMessageListener(this);
- connection.start();
-
- //create a publisher
- MessageProducer producer = session.createProducer(destination, false, false, true);
-
- //publish at a low volume
- for(int i = 0; i < count; i++)
- {
- BytesMessage msg = session.createBytesMessage();
- msg.writeBytes(data);
- msg.setStringProperty("sent-at", Long.toString(System.nanoTime()));
- producer.send(msg);
- Thread.sleep(delay);
- if(++sent % 100 == 0)
- {
- System.out.println("Sent " + sent + " of " + count);
- }
- }
-
- waitUntilReceived(sent);
-
- session.close();
- connection.close();
-
- System.out.println("Latency (in nanoseconds): avg=" + (total/sent) + ", min=" + min + ", max=" + max
- + ", avg(discarding min and max)=" + ((total - min - max) / (sent - 2)));
- }
-
-
- private synchronized void waitUntilReceived(int count) throws InterruptedException
- {
- waiting = true;
- while(received < count)
- {
- wait();
- }
- waiting = false;
- }
-
- public void onMessage(Message message)
- {
- received++;
- try
- {
- long sent = Long.parseLong(message.getStringProperty("sent-at"));
- long time = System.nanoTime() - sent;
- total += time;
- min = Math.min(min, time);
- max = Math.max(max, time);
- }
- catch (JMSException e)
- {
- e.printStackTrace();
- }
-
- if(waiting){
- synchronized(this)
- {
- notify();
- }
- }
- }
-
- private static String randomize(String in)
- {
- return in + System.currentTimeMillis();
- }
-
- public static void main(String[] argv) throws Exception
- {
- String host = argv.length > 0 ? argv[0] : "localhost:5672";
- if("-help".equals(host))
- {
- System.out.println("Usage: <broker> <message count> <delay between messages> <message size>");
- }
- int count = argv.length > 1 ? Integer.parseInt(argv[1]) : 1000;
- int delay = argv.length > 2 ? Integer.parseInt(argv[2]) : 1000;
- int size = argv.length > 3 ? Integer.parseInt(argv[3]) : 512;
- new LatencyTest(host, count, delay, size);
- }
-
-
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/mina/AcceptorTest.java b/qpid/java/client/src/old_test/java/org/apache/qpid/mina/AcceptorTest.java
deleted file mode 100644
index f0ac0e6902..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/mina/AcceptorTest.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.mina;
-
-import org.apache.log4j.Logger;
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoAcceptor;
-import org.apache.mina.common.IoHandlerAdapter;
-import org.apache.mina.common.IoSession;
-import org.apache.mina.transport.socket.nio.SocketAcceptor;
-import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
-import org.apache.mina.transport.socket.nio.SocketSessionConfig;
-import org.apache.qpid.pool.ReadWriteThreadModel;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-
-import junit.framework.TestCase;
-
-/**
- * Tests MINA socket performance. This acceptor simply reads data from the network and writes it back again.
- *
- */
-public class AcceptorTest extends TestCase
-{
- private static final Logger _logger = Logger.getLogger(AcceptorTest.class);
-
- public static int PORT = 9999;
-
- private static class TestHandler extends IoHandlerAdapter
- {
- private int _sentCount;
-
- private int _bytesSent;
-
- public void messageReceived(IoSession session, Object message) throws Exception
- {
- ((ByteBuffer) message).acquire();
- session.write(message);
- _logger.debug("Sent response " + ++_sentCount);
- _bytesSent += ((ByteBuffer)message).remaining();
- _logger.debug("Bytes sent: " + _bytesSent);
- }
-
- public void messageSent(IoSession session, Object message) throws Exception
- {
- //((ByteBuffer) message).release();
- }
-
- public void exceptionCaught(IoSession session, Throwable cause) throws Exception
- {
- _logger.error("Error: " + cause, cause);
- }
- }
-
- public void testStartAcceptor() throws IOException
- {
- IoAcceptor acceptor = null;
- acceptor = new SocketAcceptor();
-
- SocketAcceptorConfig config = (SocketAcceptorConfig) acceptor.getDefaultConfig();
- SocketSessionConfig sc = (SocketSessionConfig) config.getSessionConfig();
- sc.setTcpNoDelay(true);
- sc.setSendBufferSize(32768);
- sc.setReceiveBufferSize(32768);
-
- config.setThreadModel(ReadWriteThreadModel.getInstance());
-
- acceptor.bind(new InetSocketAddress(PORT),
- new TestHandler());
- _logger.info("Bound on port " + PORT);
- }
-
- public static void main(String[] args) throws IOException
- {
- AcceptorTest a = new AcceptorTest();
- a.testStartAcceptor();
- }
-
- public static junit.framework.Test suite()
- {
- return new junit.framework.TestSuite(AcceptorTest.class);
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/mina/BlockingAcceptorTest.java b/qpid/java/client/src/old_test/java/org/apache/qpid/mina/BlockingAcceptorTest.java
deleted file mode 100644
index bfe29c47e6..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/mina/BlockingAcceptorTest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.mina;
-
-import org.apache.log4j.Logger;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.ServerSocket;
-import java.net.Socket;
-
-import junit.framework.TestCase;
-
-public class BlockingAcceptorTest extends TestCase
-{
- private static final Logger _logger = Logger.getLogger(BlockingAcceptorTest.class);
-
- public static int PORT = 9999;
-
- public void testStartAcceptor() throws IOException
- {
-
- ServerSocket sock = new ServerSocket(PORT);
-
- sock.setReuseAddress(true);
- sock.setReceiveBufferSize(32768);
- _logger.info("Bound on port " + PORT);
-
- while (true)
- {
- final Socket s = sock.accept();
- _logger.info("Received connection from " + s.getRemoteSocketAddress());
- s.setReceiveBufferSize(32768);
- s.setSendBufferSize(32768);
- s.setTcpNoDelay(true);
- new Thread(new Runnable()
- {
- public void run()
- {
- byte[] chunk = new byte[32768];
- try
- {
- InputStream is = s.getInputStream();
- OutputStream os = s.getOutputStream();
-
- while (true)
- {
- int count = is.read(chunk, 0, chunk.length);
- if (count > 0)
- {
- os.write(chunk, 0, count);
- }
- }
- }
- catch (IOException e)
- {
- _logger.error("Error - closing connection: " + e, e);
- }
- }
- }, "SocketReaderWriter").start();
- }
- }
-
- public static void main(String[] args) throws IOException
- {
- BlockingAcceptorTest a = new BlockingAcceptorTest();
- a.testStartAcceptor();
- }
-
- public static junit.framework.Test suite()
- {
- return new junit.framework.TestSuite(AcceptorTest.class);
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/mina/WriterTest.java b/qpid/java/client/src/old_test/java/org/apache/qpid/mina/WriterTest.java
deleted file mode 100644
index 910345624f..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/mina/WriterTest.java
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.mina;
-
-import org.apache.log4j.Logger;
-import org.apache.mina.common.*;
-import org.apache.mina.transport.socket.nio.SocketConnector;
-import org.apache.mina.transport.socket.nio.SocketConnectorConfig;
-import org.apache.mina.transport.socket.nio.SocketSessionConfig;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.util.concurrent.CountDownLatch;
-
-import junit.framework.TestCase;
-
-public class WriterTest extends TestCase
-{
- private static final Logger _logger = Logger.getLogger(WriterTest.class);
-
- private static class RunnableWriterTest implements Runnable
- {
- private Logger _logger;
-
- private IoSession _session;
-
- private long _startTime;
-
- private long[] _chunkTimes;
-
- private int _chunkCount = 500000;
-
- private int _chunkSize = 1024;
-
- private CountDownLatch _notifier;
-
- public RunnableWriterTest(Logger logger)
- {
- _logger = logger;
- }
-
- public void run()
- {
- _startTime = System.currentTimeMillis();
- _notifier = new CountDownLatch(1);
- for (int i = 0; i < _chunkCount; i++)
- {
- ByteBuffer buf = ByteBuffer.allocate(_chunkSize, false);
- byte check = (byte) (i % 128);
- buf.put(check);
- buf.fill((byte)88, buf.remaining());
- buf.flip();
- _session.write(buf);
- }
-
- try
- {
- _logger.info("All buffers sent; waiting for receipt from server");
- _notifier.await();
- }
- catch (InterruptedException e)
- {
- }
- _logger.info("Completed");
- long totalTime = System.currentTimeMillis() - _startTime;
- _logger.info("Total time: " + totalTime);
- _logger.info("MB per second: " + (_chunkSize * _chunkCount)/totalTime);
- long lastChunkTime = _startTime;
- double average = 0;
- for (int i = 0; i < _chunkTimes.length; i++)
- {
- if (i == 0)
- {
- average = _chunkTimes[i] - _startTime;
- }
- else
- {
- long delta = _chunkTimes[i] - lastChunkTime;
- if (delta != 0)
- {
- average = (average + delta)/2;
- }
- }
- lastChunkTime = _chunkTimes[i];
- }
- _logger.info("Average chunk time: " + average + "ms");
- CloseFuture cf = _session.close();
- cf.join();
- }
-
- private class WriterHandler extends IoHandlerAdapter
- {
- private int _chunksReceived = 0;
-
- private int _partialBytesRead = 0;
-
- private byte _partialCheckNumber;
-
- private int _totalBytesReceived = 0;
-
- public void messageReceived(IoSession session, Object message) throws Exception
- {
- ByteBuffer result = (ByteBuffer) message;
- _totalBytesReceived += result.remaining();
- int size = result.remaining();
- long now = System.currentTimeMillis();
- if (_partialBytesRead > 0)
- {
- int offset = _chunkSize - _partialBytesRead;
- if (size >= offset)
- {
- _chunkTimes[_chunksReceived++] = now;
- result.position(offset);
- }
- else
- {
- // have not read even one chunk, including the previous partial bytes
- _partialBytesRead += size;
- return;
- }
- }
-
- int chunkCount = result.remaining()/_chunkSize;
-
- for (int i = 0; i < chunkCount; i++)
- {
- _chunkTimes[_chunksReceived++] = now;
- byte check = result.get();
- _logger.debug("Check number " + check + " read");
- if (check != (byte)((_chunksReceived - 1)%128))
- {
- _logger.error("Check number " + check + " read when expected " + (_chunksReceived%128));
- }
- _logger.debug("Chunk times recorded");
-
- try
- {
- result.skip(_chunkSize - 1);
- }
- catch (IllegalArgumentException e)
- {
- _logger.error("Position was: " + result.position());
- _logger.error("Tried to skip to: " + (_chunkSize * i));
- _logger.error("limit was; " + result.limit());
- }
- }
- _logger.debug("Chunks received now " + _chunksReceived);
- _logger.debug("Bytes received: " + _totalBytesReceived);
- _partialBytesRead = result.remaining();
-
- if (_partialBytesRead > 0)
- {
- _partialCheckNumber = result.get();
- }
-
- if (_chunksReceived >= _chunkCount)
- {
- _notifier.countDown();
- }
-
- }
-
- public void exceptionCaught(IoSession session, Throwable cause) throws Exception
- {
- _logger.error("Error: " + cause, cause);
- }
- }
-
- public void startWriter(int chunkSize) throws IOException, InterruptedException
- {
- _chunkSize = chunkSize;
-
- IoConnector ioConnector = null;
-
- ioConnector = new SocketConnector();
-
- SocketConnectorConfig cfg = (SocketConnectorConfig) ioConnector.getDefaultConfig();
- cfg.setThreadModel(ThreadModel.MANUAL);
- SocketSessionConfig scfg = (SocketSessionConfig) cfg.getSessionConfig();
- scfg.setTcpNoDelay(true);
- scfg.setSendBufferSize(32768);
- scfg.setReceiveBufferSize(32768);
-
- final InetSocketAddress address = new InetSocketAddress("localhost", AcceptorTest.PORT);
- _logger.info("Attempting connection to " + address);
- ConnectFuture future = ioConnector.connect(address, new WriterHandler());
- // wait for connection to complete
- future.join();
- _logger.info("Connection completed");
- // we call getSession which throws an IOException if there has been an error connecting
- _session = future.getSession();
- _chunkTimes = new long[_chunkCount];
- Thread t = new Thread(this);
- t.start();
- t.join();
- _logger.info("Test completed");
- }
- }
-
- private RunnableWriterTest _runnableWriterTest = new RunnableWriterTest(_logger);
-
- public void test1k() throws IOException, InterruptedException
- {
- _logger.info("Starting 1k test");
- _runnableWriterTest.startWriter(1024);
- }
-
- public void test2k() throws IOException, InterruptedException
- {
- _logger.info("Starting 2k test");
- _runnableWriterTest.startWriter(2048);
- }
-
- public void test4k() throws IOException, InterruptedException
- {
- _logger.info("Starting 4k test");
- _runnableWriterTest.startWriter(4096);
- }
-
- public void test8k() throws IOException, InterruptedException
- {
- _logger.info("Starting 8k test");
- _runnableWriterTest.startWriter(8192);
- }
-
- public void test16k() throws IOException, InterruptedException
- {
- _logger.info("Starting 16k test");
- _runnableWriterTest.startWriter(16384);
- }
-
- public void test32k() throws IOException, InterruptedException
- {
- _logger.info("Starting 32k test");
- _runnableWriterTest.startWriter(32768);
- }
-
- public static void main(String[] args) throws IOException, InterruptedException
- {
- WriterTest w = new WriterTest();
- //w.test1k();
- //w.test2k();
- //w.test4k();
- w.test8k();
- //w.test16k();
- //w.test32k();
- }
-
- public static junit.framework.Test suite()
- {
- return new junit.framework.TestSuite(WriterTest.class);
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/multiconsumer/AMQTest.java b/qpid/java/client/src/old_test/java/org/apache/qpid/multiconsumer/AMQTest.java
deleted file mode 100644
index db02b9954a..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/multiconsumer/AMQTest.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.multiconsumer;
-
-import java.io.ByteArrayOutputStream;
-import java.util.zip.Deflater;
-import java.util.zip.Inflater;
-
-import javax.jms.Connection;
-import javax.jms.ExceptionListener;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.TextMessage;
-import javax.jms.Topic;
-
-import junit.framework.TestCase;
-
-import org.apache.commons.codec.binary.Base64;
-import org.apache.qpid.client.AMQConnectionFactory;
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQTopic;
-import org.apache.qpid.exchange.ExchangeDefaults;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.jms.Session;
-
-/**
- * Test AMQ.
- */
-public class AMQTest extends TestCase implements ExceptionListener
-{
-
- private final static String COMPRESSION_PROPNAME = "_MSGAPI_COMP";
- private final static String UTF8 = "UTF-8";
- private static final String SUBJECT = "test.amq";
- private static final String DUMMYCONTENT = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- private static final String HUGECONTENT;
-
- private AMQConnection connect = null;
- private Session pubSession = null;
- private Session subSession = null;
- private Topic topic = null;
-
- static
- {
- StringBuilder sb = new StringBuilder(DUMMYCONTENT.length() * 115);
- for (int i = 0; i < 100; i++)
- {
- sb.append(DUMMYCONTENT);
- }
- HUGECONTENT = sb.toString();
- }
-
- private void setup() throws Exception
- {
- connect = new AMQConnection("localhost", 5672, "guest", "guest", "client1", "/");
- connect.setExceptionListener(this);
- pubSession = connect.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
- subSession = connect.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
- topic = new AMQTopic(pubSession.getDefaultTopicExchangeName(), new AMQShortString(SUBJECT));
-
- connect.start();
- }
-
- public void testMultipleListeners() throws Exception
- {
- setup();
- try
- {
- // Create 5 listeners
- MsgHandler[] listeners = new MsgHandler[5];
- for (int i = 0; i < listeners.length; i++)
- {
- listeners[i] = new MsgHandler();
- MessageConsumer subscriber = subSession.createConsumer(topic);
- subscriber.setMessageListener(listeners[i]);
- }
- MessageProducer publisher = pubSession.createProducer(topic);
- // Send a single message
- TextMessage msg = pubSession.createTextMessage();
- msg.setText(DUMMYCONTENT);
- publisher.send(msg);
- Thread.sleep(5000);
- // Check listeners to ensure they all got it
- for (int i = 0; i < listeners.length; i++)
- {
- if (listeners[i].isGotIt())
- {
- System.out.println("Got callback for listener " + i);
- }
- else
- {
- TestCase.fail("Listener " + i + " did not get callback");
- }
- }
- }
- catch (Throwable e)
- {
- System.err.println("Error: " + e);
- e.printStackTrace(System.err);
- }
- finally
- {
- close();
- }
- }
-
- public void testCompression() throws Exception
- {
- setup();
- String comp = this.compressString(HUGECONTENT);
- try
- {
- MsgHandler listener = new MsgHandler();
- MessageConsumer subscriber = subSession.createConsumer(topic);
- subscriber.setMessageListener(listener);
- MessageProducer publisher = pubSession.createProducer(topic);
-
- // Send a single message
- TextMessage msg = pubSession.createTextMessage();
- // Set the compressed text
- msg.setText(comp);
- msg.setBooleanProperty(COMPRESSION_PROPNAME, true);
- publisher.send(msg);
- Thread.sleep(1000);
- // Check listeners to ensure we got it
- if (listener.isGotIt())
- {
- System.out.println("Got callback for listener");
- }
- else
- {
- TestCase.fail("Listener did not get callback");
- }
- }
- finally
- {
- close();
- }
- }
-
- private void close() throws Exception
- {
- if (connect != null)
- {
- connect.close();
- }
- }
-
- private class MsgHandler implements MessageListener
- {
- private boolean gotIt = false;
-
- public void onMessage(Message msg)
- {
- try
- {
- TextMessage textMessage = (TextMessage) msg;
- String string = textMessage.getText();
- if (string != null && string.length() > 0)
- {
- gotIt = true;
- }
- if (textMessage.getBooleanProperty(COMPRESSION_PROPNAME))
- {
- string = inflateString(string);
- }
- System.out.println("Got callback of size " + (string==null?0:string.length()));
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
-
- public boolean isGotIt()
- {
- return this.gotIt;
- }
- }
-
- private String compressString(String string) throws Exception
- {
- long start = System.currentTimeMillis();
- byte[] input = string.getBytes();
- Deflater compressor = new Deflater(Deflater.BEST_COMPRESSION);
- compressor.setInput(input);
- compressor.finish();
-
- // Get byte array from output of compressor
- ByteArrayOutputStream baos = new ByteArrayOutputStream(input.length);
- byte[] buf = new byte[1024];
- while (!compressor.finished())
- {
- int cnt = compressor.deflate(buf);
- baos.write(buf, 0, cnt);
- }
- baos.close();
- byte[] output = baos.toByteArray();
-
- // Convert byte array into String
- byte[] base64 = Base64.encodeBase64(output);
- String sComp = new String(base64, UTF8);
-
- long diff = System.currentTimeMillis() - start;
- System.out.println("Compressed text from " + input.length + " to "
- + sComp.getBytes().length + " in " + diff + " ms");
- System.out.println("Compressed text = '" + sComp + "'");
-
- return sComp;
- }
-
- private String inflateString(String string) throws Exception
- {
- byte[] input = string.getBytes();
-
- // First convert Base64 string back to binary array
- byte[] bytes = Base64.decodeBase64(input);
-
- // Set string as input data for decompressor
- Inflater decompressor = new Inflater();
- decompressor.setInput(bytes);
-
- // Decompress the data
- ByteArrayOutputStream bos = new ByteArrayOutputStream(input.length);
- byte[] buf = new byte[1024];
- while (!decompressor.finished())
- {
- int count = decompressor.inflate(buf);
- bos.write(buf, 0, count);
- }
- bos.close();
- byte[] output = bos.toByteArray();
-
- // Get the decompressed data
- return new String(output, UTF8);
- }
-
- /**
- * @see javax.jms.ExceptionListener#onException(javax.jms.JMSException)
- */
- public void onException(JMSException e)
- {
- System.err.println(e.getMessage());
- e.printStackTrace(System.err);
- }
-
-
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/pubsub1/TestPublisher.java b/qpid/java/client/src/old_test/java/org/apache/qpid/pubsub1/TestPublisher.java
deleted file mode 100644
index 37b4ff1498..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/pubsub1/TestPublisher.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.pubsub1;
-
-import org.apache.log4j.Logger;
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.exchange.ExchangeDefaults;
-import org.apache.qpid.url.URLSyntaxException;
-import org.apache.qpid.client.AMQTopic;
-import org.apache.qpid.jms.MessageProducer;
-import org.apache.qpid.jms.Session;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.TextMessage;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-/**
- * A client that behaves as follows:
- * <ul><li>Connects to a queue, whose name is specified as a cmd-line argument</li>
- * <li>Creates a temporary queue</li>
- * <li>Creates messages containing a property that is the name of the temporary queue</li>
- * <li>Fires off a message on the original queue and waits for a response on the temporary queue</li>
- * </ul>
- *
- */
-public class TestPublisher
-{
- private static final Logger _log = Logger.getLogger(TestPublisher.class);
-
- private AMQConnection _connection;
-
- private Session _session;
-
- private class CallbackHandler implements MessageListener
- {
- private int _expectedMessageCount;
-
- private int _actualMessageCount;
-
- private long _startTime;
-
- public CallbackHandler(int expectedMessageCount, long startTime)
- {
- _expectedMessageCount = expectedMessageCount;
- _startTime = startTime;
- }
-
- public void onMessage(Message m)
- {
- if (_log.isDebugEnabled())
- {
- _log.debug("Message received: " + m);
- }
- _actualMessageCount++;
- if (_actualMessageCount%1000 == 0)
- {
- _log.info("Received message count: " + _actualMessageCount);
- }
- /*if (!"henson".equals(m.toString()))
- {
- _log.error("AbstractJMSMessage response not correct: expected 'henson' but got " + m.toString());
- }
- else
- {
- if (_log.isDebugEnabled())
- {
- _log.debug("AbstractJMSMessage " + m + " received");
- }
- else
- {
- _log.info("AbstractJMSMessage received");
- }
- } */
-
- if (_actualMessageCount == _expectedMessageCount)
- {
- long timeTaken = System.currentTimeMillis() - _startTime;
- System.out.println("Total time taken to receive " + _expectedMessageCount+ " messages was " +
- timeTaken + "ms, equivalent to " +
- (_expectedMessageCount/(timeTaken/1000.0)) + " messages per second");
- }
- }
- }
-
- public TestPublisher(String host, int port, String clientID, String commandQueueName,
- final int messageCount) throws AMQException, URLSyntaxException
- {
- try
- {
- createConnection(host, port, clientID);
-
- _session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- AMQTopic destination = new AMQTopic(_session.getDefaultTopicExchangeName(), new AMQShortString(commandQueueName));
- MessageProducer producer = (MessageProducer) _session.createProducer(destination);
-
- _connection.start();
- //TextMessage msg = _session.createTextMessage(tempDestination.getQueueName() + "/Presented to in conjunction with Mahnah Mahnah and the Snowths");
- final long startTime = System.currentTimeMillis();
-
- for (int i = 0; i < messageCount; i++)
- {
- TextMessage msg = _session.createTextMessage(destination.getTopicName() + "/Presented to in conjunction with Mahnah Mahnah and the Snowths: " + i);
-
- //msg.setIntProperty("a",i % 2);
- //msg.setIntProperty("b",i % 4);
-
- producer.send(msg);
- }
- _log.info("Finished sending " + messageCount + " messages");
- }
- catch (JMSException e)
- {
- e.printStackTrace();
- }
- }
-
- private void createConnection(String host, int port, String clientID) throws AMQException, URLSyntaxException
- {
- _connection = new AMQConnection(host, port, "guest", "guest",
- clientID, "/test");
- }
-
- /**
- *
- * @param args argument 1 if present specifies the name of the temporary queue to create. Leaving it blank
- * means the server will allocate a name.
- */
- public static void main(String[] args) throws URLSyntaxException
- {
- if (args.length == 0)
- {
- System.err.println("Usage: TestPublisher <host> <port> <command queue name> <number of messages>");
- }
- try
- {
- int port = Integer.parseInt(args[1]);
- InetAddress address = InetAddress.getLocalHost();
- String clientID = address.getHostName() + System.currentTimeMillis();
- TestPublisher client = new TestPublisher(args[0], port, clientID, args[2], Integer.parseInt(args[3]));
- }
- catch (UnknownHostException e)
- {
- e.printStackTrace();
- }
- catch (AMQException e)
- {
- System.err.println("Error in client: " + e);
- e.printStackTrace();
- }
-
- //System.exit(0);
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/pubsub1/TestSubscriber.java b/qpid/java/client/src/old_test/java/org/apache/qpid/pubsub1/TestSubscriber.java
deleted file mode 100644
index 450d9b3914..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/pubsub1/TestSubscriber.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.pubsub1;
-
-import org.apache.log4j.Logger;
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQTopic;
-import org.apache.qpid.jms.Session;
-import org.apache.qpid.exchange.ExchangeDefaults;
-import org.apache.qpid.framing.AMQShortString;
-
-import javax.jms.MessageConsumer;
-import javax.jms.MessageListener;
-import javax.jms.Topic;
-import java.net.InetAddress;
-
-public class TestSubscriber
-{
- private static final Logger _logger = Logger.getLogger(TestSubscriber.class);
-
- private static class TestMessageListener implements MessageListener
- {
- private String _name;
-
- private int _expectedMessageCount;
-
- private int _messageCount;
-
- private long _startTime = 0;
-
- public TestMessageListener(String name, int expectedMessageCount)
- {
- _name = name;
- _expectedMessageCount = expectedMessageCount;
- }
-
- public void onMessage(javax.jms.Message message)
- {
- if (_messageCount++ == 0)
- {
- _startTime = System.currentTimeMillis();
- }
- if (_logger.isInfoEnabled())
- {
- _logger.info(_name + " got message '" + message + "'");
- }
- if (_messageCount == _expectedMessageCount)
- {
- long totalTime = System.currentTimeMillis() - _startTime;
- _logger.error(_name + ": Total time to receive " + _messageCount + " messages was " +
- totalTime + "ms. Rate is " + (_messageCount/(totalTime/1000.0)));
- }
- if (_messageCount > _expectedMessageCount)
- {
- _logger.error("Oops! More messages received than expected (" + _messageCount + ")");
- }
- }
- }
-
- public static void main(String[] args)
- {
- _logger.info("Starting...");
-
- if (args.length != 7)
- {
- System.out.println("Usage: host port username password virtual-path expectedMessageCount selector");
- System.exit(1);
- }
- try
- {
- InetAddress address = InetAddress.getLocalHost();
- AMQConnection con1 = new AMQConnection(args[0], Integer.parseInt(args[1]), args[2], args[3],
- address.getHostName(), args[4]);
- final Session session1 = con1.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- AMQConnection con2 = new AMQConnection(args[0], Integer.parseInt(args[1]), args[2], args[3],
- address.getHostName(), args[4]);
- final Session session2 = con2.createSession(false, Session.AUTO_ACKNOWLEDGE);
- String selector = args[6];
-
- final int expectedMessageCount = Integer.parseInt(args[5]);
- _logger.info("Message selector is <" + selector + ">...");
-
- Topic t = new AMQTopic(session1.getDefaultTopicExchangeName(), new AMQShortString("cbr"));
- MessageConsumer consumer1 = session1.createConsumer(t,
- 100, false, false, selector);
- MessageConsumer consumer2 = session2.createConsumer(t,
- 100, false, false, selector);
-
- consumer1.setMessageListener(new TestMessageListener("ML 1", expectedMessageCount));
- consumer2.setMessageListener(new TestMessageListener("ML 2", expectedMessageCount));
- con1.start();
- con2.start();
- }
- catch (Throwable t)
- {
- System.err.println("Fatal error: " + t);
- t.printStackTrace();
- }
-
- System.out.println("Waiting...");
- }
-}
-
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/test/unit/client/connection/TestManyConnections.java b/qpid/java/client/src/old_test/java/org/apache/qpid/test/unit/client/connection/TestManyConnections.java
deleted file mode 100644
index f59b36166a..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/test/unit/client/connection/TestManyConnections.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.test.unit.client.connection;
-
-import org.apache.qpid.AMQException;
-import org.apache.qpid.url.URLSyntaxException;
-import org.apache.qpid.client.AMQConnection;
-import org.apache.log4j.Logger;
-
-import junit.framework.TestCase;
-
-public class TestManyConnections extends TestCase
-{
- private static final Logger _log = Logger.getLogger(TestManyConnections.class);
-
- private AMQConnection[] _connections;
-
- private void createConnection(int index, String brokerHosts, String clientID, String username, String password,
- String vpath) throws AMQException, URLSyntaxException
- {
- _connections[index] = new AMQConnection(brokerHosts, username, password,
- clientID, vpath);
- }
-
- private void createConnections(int count) throws AMQException, URLSyntaxException
- {
- _connections = new AMQConnection[count];
- long startTime = System.currentTimeMillis();
- for (int i = 0; i < count; i++)
- {
- createConnection(i, "vm://:1", "myClient" + i, "guest", "guest", "test");
- }
- long endTime = System.currentTimeMillis();
- _log.info("Time to create " + count + " connections: " + (endTime - startTime) +
- "ms");
- }
-
- public void testCreate10Connections() throws AMQException, URLSyntaxException
- {
- createConnections(10);
- }
-
- public void testCreate50Connections() throws AMQException, URLSyntaxException
- {
- createConnections(50);
- }
-
- public void testCreate100Connections() throws AMQException, URLSyntaxException
- {
- createConnections(100);
- }
-
- public void testCreate250Connections() throws AMQException, URLSyntaxException
- {
- createConnections(250);
- }
-
- public void testCreate500Connections() throws AMQException, URLSyntaxException
- {
- createConnections(500);
- }
-
- public void testCreate1000Connections() throws AMQException, URLSyntaxException
- {
- createConnections(1000);
- }
-
- public void testCreate5000Connections() throws AMQException, URLSyntaxException
- {
- createConnections(5000);
- }
-
- public static junit.framework.Test suite()
- {
- return new junit.framework.TestSuite(TestManyConnections.class);
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/test/unit/jndi/PropertiesFileInitialContextFactoryTest.java b/qpid/java/client/src/old_test/java/org/apache/qpid/test/unit/jndi/PropertiesFileInitialContextFactoryTest.java
deleted file mode 100644
index 5ab5722146..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/test/unit/jndi/PropertiesFileInitialContextFactoryTest.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.test.unit.jndi;
-
-import org.apache.qpid.client.AMQConnectionFactory;
-import org.apache.qpid.client.AMQQueue;
-import org.apache.qpid.client.AMQTopic;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.naming.spi.InitialContextFactory;
-import java.util.Properties;
-import java.io.InputStream;
-
-
-import junit.framework.TestCase;
-
-public class PropertiesFileInitialContextFactoryTest extends TestCase
-{
- InitialContextFactory contextFactory;
- Properties _properties;
- Properties _fileProperties;
-
- protected void setUp() throws Exception
- {
- super.setUp();
-
- //create simple set of hardcoded props
- _properties = new Properties();
- _properties.put("java.naming.factory.initial", "org.apache.qpid.jndi.PropertiesFileInitialContextFactory");
- _properties.put("connectionfactory.local", "amqp://guest:guest@clientid/testpath?brokerlist='vm://:1'");
- _properties.put("queue.MyQueue", "example.MyQueue");
- _properties.put("topic.ibmStocks", "stocks.nyse.ibm");
- _properties.put("destination.direct", "direct://amq.direct//directQueue");
-
- //create properties from file as a more realistic test
- _fileProperties = new Properties();
- ClassLoader cl = this.getClass().getClassLoader();
- InputStream is = cl.getResourceAsStream("org/apache/qpid/test/unit/jndi/example.properties");
- _fileProperties.load(is);
- }
-
- /**
- * Test using hardcoded properties
- */
- public void testWithoutFile()
- {
- Context ctx = null;
-
- try
- {
- ctx = new InitialContext(_properties);
- }
- catch (NamingException ne)
- {
- fail("Error loading context:" + ne);
- }
-
- checkPropertiesMatch(ctx, "Using hardcoded properties: ");
- }
-
- /**
- * Test using properties from example file
- */
- public void testWithFile()
- {
- Context ctx = null;
-
- try
- {
- ctx = new InitialContext(_fileProperties);
- }
- catch (Exception e)
- {
- fail("Error loading context:" + e);
- }
-
- checkPropertiesMatch(ctx, "Using properties from file: ");
- }
-
- public void tearDown()
- {
- _properties = null;
- _fileProperties = null;
- }
-
- public static junit.framework.Test suite()
- {
- return new junit.framework.TestSuite(PropertiesFileInitialContextFactoryTest.class);
- }
-
- private void checkPropertiesMatch(Context ctx, String errorInfo)
- {
- try
- {
- AMQConnectionFactory cf = (AMQConnectionFactory) ctx.lookup("local");
- assertEquals("amqp://guest:guest@clientid/testpath?brokerlist='vm://:1'", cf.getConnectionURL().toString());
- }
- catch (NamingException ne)
- {
- fail(errorInfo + "Unable to create Connection Factory:" + ne);
- }
-
- try
- {
- AMQQueue queue = (AMQQueue) ctx.lookup("MyQueue");
- assertEquals("example.MyQueue", queue.getRoutingKey().toString());
- }
- catch (NamingException ne)
- {
- fail(errorInfo + "Unable to create queue:" + ne);
- }
-
- try
- {
- AMQTopic topic = (AMQTopic) ctx.lookup("ibmStocks");
- assertEquals("stocks.nyse.ibm", topic.getTopicName().toString());
- }
- catch (Exception ne)
- {
- fail(errorInfo + "Unable to create topic:" + ne);
- }
-
- try
- {
- AMQQueue direct = (AMQQueue) ctx.lookup("direct");
- assertEquals("directQueue", direct.getRoutingKey().toString());
- }
- catch (NamingException ne)
- {
- fail(errorInfo + "Unable to create direct destination:" + ne);
- }
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/test/unit/jndi/example.properties b/qpid/java/client/src/old_test/java/org/apache/qpid/test/unit/jndi/example.properties
deleted file mode 100644
index ea9dc5ae0e..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/test/unit/jndi/example.properties
+++ /dev/null
@@ -1,38 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-java.naming.factory.initial = org.apache.qpid.jndi.PropertiesFileInitialContextFactory
-
-# use the following property to configure the default connector
-#java.naming.provider.url - ignored.
-
-# register some connection factories
-# connectionfactory.[jndiname] = [ConnectionURL]
-connectionfactory.local = amqp://guest:guest@clientid/testpath?brokerlist='vm://:1'
-
-# register some queues in JNDI using the form
-# queue.[jndiName] = [physicalName]
-queue.MyQueue = example.MyQueue
-
-# register some topics in JNDI using the form
-# topic.[jndiName] = [physicalName]
-topic.ibmStocks = stocks.nyse.ibm
-
-# Register an AMQP destination in JNDI
-# NOTE: Qpid currently only supports direct,topics and headers
-# destination.[jniName] = [BindingURL]
-destination.direct = direct://amq.direct//directQueue
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/topic/Config.java b/qpid/java/client/src/old_test/java/org/apache/qpid/topic/Config.java
deleted file mode 100644
index bb740f9094..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/topic/Config.java
+++ /dev/null
@@ -1,243 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.topic;
-
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.config.ConnectorConfig;
-import org.apache.qpid.config.ConnectionFactoryInitialiser;
-import org.apache.qpid.config.Connector;
-import org.apache.qpid.config.AbstractConfig;
-
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-
-class Config extends AbstractConfig implements ConnectorConfig
-{
-
- private String host = "localhost";
- private int port = 5672;
- private String factory = null;
-
- private int payload = 256;
- private int messages = 1000;
- private int clients = 1;
- private int batch = 1;
- private long delay = 1;
- private int warmup;
- private int ackMode= AMQSession.NO_ACKNOWLEDGE;
- private String clientId;
- private String subscriptionId;
- private boolean persistent;
-
- public Config()
- {
- }
-
- int getAckMode()
- {
- return ackMode;
- }
-
- void setPayload(int payload)
- {
- this.payload = payload;
- }
-
- int getPayload()
- {
- return payload;
- }
-
- void setClients(int clients)
- {
- this.clients = clients;
- }
-
- int getClients()
- {
- return clients;
- }
-
- void setMessages(int messages)
- {
- this.messages = messages;
- }
-
- int getMessages()
- {
- return messages;
- }
-
- public String getHost()
- {
- return host;
- }
-
- public void setHost(String host)
- {
- this.host = host;
- }
-
- public int getPort()
- {
- return port;
- }
-
- public String getFactory()
- {
- return factory;
- }
-
- public void setPort(int port)
- {
- this.port = port;
- }
-
- int getBatch()
- {
- return batch;
- }
-
- void setBatch(int batch)
- {
- this.batch = batch;
- }
-
- int getWarmup()
- {
- return warmup;
- }
-
- void setWarmup(int warmup)
- {
- this.warmup = warmup;
- }
-
- public long getDelay()
- {
- return delay;
- }
-
- public void setDelay(long delay)
- {
- this.delay = delay;
- }
-
- String getClientId()
- {
- return clientId;
- }
-
- String getSubscriptionId()
- {
- return subscriptionId;
- }
-
- boolean usePersistentMessages()
- {
- return persistent;
- }
-
- public void setOption(String key, String value)
- {
- if("-host".equalsIgnoreCase(key))
- {
- setHost(value);
- }
- else if("-port".equalsIgnoreCase(key))
- {
- try
- {
- setPort(Integer.parseInt(value));
- }
- catch(NumberFormatException e)
- {
- throw new RuntimeException("Bad port number: " + value);
- }
- }
- else if("-payload".equalsIgnoreCase(key))
- {
- setPayload(parseInt("Bad payload size", value));
- }
- else if("-messages".equalsIgnoreCase(key))
- {
- setMessages(parseInt("Bad message count", value));
- }
- else if("-clients".equalsIgnoreCase(key))
- {
- setClients(parseInt("Bad client count", value));
- }
- else if("-batch".equalsIgnoreCase(key))
- {
- setBatch(parseInt("Bad batch count", value));
- }
- else if("-delay".equalsIgnoreCase(key))
- {
- setDelay(parseLong("Bad batch delay", value));
- }
- else if("-warmup".equalsIgnoreCase(key))
- {
- setWarmup(parseInt("Bad warmup count", value));
- }
- else if("-ack".equalsIgnoreCase(key))
- {
- ackMode = parseInt("Bad ack mode", value);
- }
- else if("-factory".equalsIgnoreCase(key))
- {
- factory = value;
- }
- else if("-clientId".equalsIgnoreCase(key))
- {
- clientId = value;
- }
- else if("-subscriptionId".equalsIgnoreCase(key))
- {
- subscriptionId = value;
- }
- else if("-persistent".equalsIgnoreCase(key))
- {
- persistent = "true".equalsIgnoreCase(value);
- }
- else
- {
- System.out.println("Ignoring unrecognised option: " + key);
- }
- }
-
- static String getAckModeDescription(int ackMode)
- {
- switch(ackMode)
- {
- case AMQSession.NO_ACKNOWLEDGE: return "NO_ACKNOWLEDGE";
- case AMQSession.AUTO_ACKNOWLEDGE: return "AUTO_ACKNOWLEDGE";
- case AMQSession.CLIENT_ACKNOWLEDGE: return "CLIENT_ACKNOWLEDGE";
- case AMQSession.DUPS_OK_ACKNOWLEDGE: return "DUPS_OK_ACKNOWELDGE";
- case AMQSession.PRE_ACKNOWLEDGE: return "PRE_ACKNOWLEDGE";
- }
- return "AckMode=" + ackMode;
- }
-
- public Connection createConnection() throws Exception
- {
- return new Connector().createConnection(this);
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/topic/Listener.java b/qpid/java/client/src/old_test/java/org/apache/qpid/topic/Listener.java
deleted file mode 100644
index 47c608cfe4..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/topic/Listener.java
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.topic;
-
-import javax.jms.Connection;
-import javax.jms.Message;
-import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
-import javax.jms.Session;
-
-public class Listener implements MessageListener
-{
- private final Connection _connection;
- private final MessageProducer _controller;
- private final javax.jms.Session _session;
- private final MessageFactory _factory;
- private boolean init;
- private int count;
- private long start;
-
- Listener(Connection connection, int ackMode) throws Exception
- {
- this(connection, ackMode, null);
- }
-
- Listener(Connection connection, int ackMode, String name) throws Exception
- {
- _connection = connection;
- _session = connection.createSession(false, ackMode);
- _factory = new MessageFactory(_session);
-
- //register for events
- if(name == null)
- {
- _factory.createTopicConsumer().setMessageListener(this);
- }
- else
- {
- _factory.createDurableTopicConsumer(name).setMessageListener(this);
- }
-
- _connection.start();
-
- _controller = _factory.createControlPublisher();
- System.out.println("Waiting for messages " +
- Config.getAckModeDescription(ackMode)
- + (name == null ? "" : " (subscribed with name " + name + " and client id " + connection.getClientID() + ")")
- + "...");
-
- }
-
- private void shutdown()
- {
- try
- {
- _session.close();
- _connection.stop();
- _connection.close();
- }
- catch(Exception e)
- {
- e.printStackTrace(System.out);
- }
- }
-
- private void report()
- {
- try
- {
- String msg = getReport();
- _controller.send(_factory.createReportResponseMessage(msg));
- System.out.println("Sent report: " + msg);
- }
- catch(Exception e)
- {
- e.printStackTrace(System.out);
- }
- }
-
- private String getReport()
- {
- long time = (System.currentTimeMillis() - start);
- return "Received " + count + " in " + time + "ms";
- }
-
- public void onMessage(Message message)
- {
- if(!init)
- {
- start = System.currentTimeMillis();
- count = 0;
- init = true;
- }
-
- if(_factory.isShutdown(message))
- {
- shutdown();
- }
- else if(_factory.isReport(message))
- {
- //send a report:
- report();
- init = false;
- }
- else if (++count % 100 == 0)
- {
- System.out.println("Received " + count + " messages.");
- }
- }
-
- public static void main(String[] argv) throws Exception
- {
- Config config = new Config();
- config.setOptions(argv);
-
- Connection con = config.createConnection();
- if(config.getClientId() != null)
- {
- con.setClientID(config.getClientId());
- }
- new Listener(con, config.getAckMode(), config.getSubscriptionId());
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/topic/MessageFactory.java b/qpid/java/client/src/old_test/java/org/apache/qpid/topic/MessageFactory.java
deleted file mode 100644
index 39d64069d1..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/topic/MessageFactory.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.topic;
-
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.client.AMQTopic;
-import org.apache.qpid.exchange.ExchangeDefaults;
-import org.apache.qpid.framing.AMQShortString;
-
-import javax.jms.*;
-
-/**
- */
-class MessageFactory
-{
- private static final char[] DATA = "abcdefghijklmnopqrstuvwxyz".toCharArray();
-
- private final Session _session;
- private final Topic _topic;
- private final Topic _control;
- private final byte[] _payload;
-
-
- MessageFactory(Session session) throws JMSException
- {
- this(session, 256);
- }
-
- MessageFactory(Session session, int size) throws JMSException
- {
- _session = session;
- if(session instanceof AMQSession)
- {
- _topic = new AMQTopic(((AMQSession)session).getDefaultTopicExchangeName(),new AMQShortString("topictest.messages"));
- _control = new AMQTopic(((AMQSession)session).getDefaultTopicExchangeName(),new AMQShortString("topictest.control"));
- }
- else
- {
- _topic = session.createTopic("topictest.messages");
- _control = session.createTopic("topictest.control");
- }
- _payload = new byte[size];
-
- for(int i = 0; i < size; i++)
- {
- _payload[i] = (byte) DATA[i % DATA.length];
- }
- }
-
- Topic getTopic()
- {
- return _topic;
- }
-
- Message createEventMessage() throws JMSException
- {
- BytesMessage msg = _session.createBytesMessage();
- msg.writeBytes(_payload);
- return msg;
- }
-
- Message createShutdownMessage() throws JMSException
- {
- return _session.createTextMessage("SHUTDOWN");
- }
-
- Message createReportRequestMessage() throws JMSException
- {
- return _session.createTextMessage("REPORT");
- }
-
- Message createReportResponseMessage(String msg) throws JMSException
- {
- return _session.createTextMessage(msg);
- }
-
- boolean isShutdown(Message m)
- {
- return checkText(m, "SHUTDOWN");
- }
-
- boolean isReport(Message m)
- {
- return checkText(m, "REPORT");
- }
-
- Object getReport(Message m)
- {
- try
- {
- return ((TextMessage) m).getText();
- }
- catch (JMSException e)
- {
- e.printStackTrace(System.out);
- return e.toString();
- }
- }
-
- MessageConsumer createTopicConsumer() throws Exception
- {
- return _session.createConsumer(_topic);
- }
-
- MessageConsumer createDurableTopicConsumer(String name) throws Exception
- {
- return _session.createDurableSubscriber(_topic, name);
- }
-
- MessageConsumer createControlConsumer() throws Exception
- {
- return _session.createConsumer(_control);
- }
-
- MessageProducer createTopicPublisher() throws Exception
- {
- return _session.createProducer(_topic);
- }
-
- MessageProducer createControlPublisher() throws Exception
- {
- return _session.createProducer(_control);
- }
-
- private static boolean checkText(Message m, String s)
- {
- try
- {
- return m instanceof TextMessage && ((TextMessage) m).getText().equals(s);
- }
- catch (JMSException e)
- {
- e.printStackTrace(System.out);
- return false;
- }
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/topic/Publisher.java b/qpid/java/client/src/old_test/java/org/apache/qpid/topic/Publisher.java
deleted file mode 100644
index d788029ee9..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/topic/Publisher.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.topic;
-
-import javax.jms.*;
-
-public class Publisher implements MessageListener
-{
- private final Object _lock = new Object();
- private final Connection _connection;
- private final Session _session;
- private final MessageFactory _factory;
- private final MessageProducer _publisher;
- private int _count;
-
- Publisher(Connection connection, int size, int ackMode, boolean persistent) throws Exception
- {
- _connection = connection;
- _session = _connection.createSession(false, ackMode);
- _factory = new MessageFactory(_session, size);
- _publisher = _factory.createTopicPublisher();
- _publisher.setDeliveryMode(persistent ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT);
- System.out.println("Publishing " + (persistent ? "persistent" : "non-persistent") + " messages of " + size + " bytes, " + Config.getAckModeDescription(ackMode) + ".");
- }
-
- private void test(Config config) throws Exception
- {
- test(config.getBatch(), config.getDelay(), config.getMessages(), config.getClients(), config.getWarmup());
- }
-
- private void test(int batches, long delay, int msgCount, int consumerCount, int warmup) throws Exception
- {
- _factory.createControlConsumer().setMessageListener(this);
- _connection.start();
-
- if(warmup > 0)
- {
- System.out.println("Runing warmup (" + warmup + " msgs)");
- long time = batch(warmup, consumerCount);
- System.out.println("Warmup completed in " + time + "ms");
- }
-
- long[] times = new long[batches];
- for(int i = 0; i < batches; i++)
- {
- if(i > 0) Thread.sleep(delay*1000);
- times[i] = batch(msgCount, consumerCount);
- System.out.println("Batch " + (i+1) + " of " + batches + " completed in " + times[i] + " ms.");
- }
-
- long min = min(times);
- long max = max(times);
- System.out.println("min: " + min + ", max: " + max + " avg: " + avg(times, min, max));
-
- //request shutdown
- _publisher.send(_factory.createShutdownMessage());
-
- _connection.stop();
- _connection.close();
- }
-
- private long batch(int msgCount, int consumerCount) throws Exception
- {
- _count = consumerCount;
- long start = System.currentTimeMillis();
- publish(msgCount);
- waitForCompletion(consumerCount);
- return System.currentTimeMillis() - start;
- }
-
- private void publish(int count) throws Exception
- {
-
- //send events
- for (int i = 0; i < count; i++)
- {
- _publisher.send(_factory.createEventMessage());
- if ((i + 1) % 100 == 0)
- {
- System.out.println("Sent " + (i + 1) + " messages");
- }
- }
-
- //request report
- _publisher.send(_factory.createReportRequestMessage());
- }
-
- private void waitForCompletion(int consumers) throws Exception
- {
- System.out.println("Waiting for completion...");
- synchronized (_lock)
- {
- while (_count > 0)
- {
- _lock.wait();
- }
- }
- }
-
-
- public void onMessage(Message message)
- {
- System.out.println("Received report " + _factory.getReport(message) + " " + --_count + " remaining");
- if (_count == 0)
- {
- synchronized (_lock)
- {
- _lock.notify();
- }
- }
- }
-
- static long min(long[] times)
- {
- long min = times.length > 0 ? times[0] : 0;
- for(int i = 0; i < times.length; i++)
- {
- min = Math.min(min, times[i]);
- }
- return min;
- }
-
- static long max(long[] times)
- {
- long max = times.length > 0 ? times[0] : 0;
- for(int i = 0; i < times.length; i++)
- {
- max = Math.max(max, times[i]);
- }
- return max;
- }
-
- static long avg(long[] times, long min, long max)
- {
- long sum = 0;
- for(int i = 0; i < times.length; i++)
- {
- sum += times[i];
- }
- sum -= min;
- sum -= max;
-
- return (sum / (times.length - 2));
- }
-
- public static void main(String[] argv) throws Exception
- {
- Config config = new Config();
- config.setOptions(argv);
-
- Connection con = config.createConnection();
- int size = config.getPayload();
- int ackMode = config.getAckMode();
- boolean persistent = config.usePersistentMessages();
- new Publisher(con, size, ackMode, persistent).test(config);
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Config.java b/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Config.java
deleted file mode 100644
index bd104e5407..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Config.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.transacted;
-
-import org.apache.qpid.config.ConnectorConfig;
-import org.apache.qpid.config.AbstractConfig;
-import org.apache.qpid.config.Connector;
-
-import javax.jms.Connection;
-
-class Config extends AbstractConfig implements ConnectorConfig
-{
- private String host = "localhost";
- private int port = 5672;
- private String factory;
- private boolean echo;
- private int batch = 100;
- private boolean persistent = true;
-
- Config(String[] argv)
- {
- setOptions(argv);
- }
-
- Connection createConnection() throws Exception
- {
- return new Connector().createConnection(this);
- }
-
- public boolean isEchoOn()
- {
- return echo;
- }
-
- public boolean usePersistentMessages()
- {
- return persistent;
- }
-
- public int getBatchSize()
- {
- return batch;
- }
-
- public String getHost()
- {
- return host;
- }
-
- public int getPort()
- {
- return port;
- }
-
- public String getFactory()
- {
- return factory;
- }
-
- public void setOption(String key, String value)
- {
- if("-host".equalsIgnoreCase(key))
- {
- host = value;
- }
- else if("-port".equalsIgnoreCase(key))
- {
- port = parseInt("Bad port number", value);
- }
- else if("-factory".equalsIgnoreCase(key))
- {
- factory = value;
- }
- else if("-echo".equalsIgnoreCase(key))
- {
- echo = "true".equalsIgnoreCase(value);
- }
- else if("-persistent".equalsIgnoreCase(key))
- {
- persistent = "true".equalsIgnoreCase(value);
- }
- else if("-batch".equalsIgnoreCase(key))
- {
- batch = parseInt("Bad batch size", value);
- }
- else
- {
- System.out.println("Ignoring nrecognised option " + key);
- }
- }
-
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Ping.java b/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Ping.java
deleted file mode 100644
index 8f15bf089e..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Ping.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.transacted;
-
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.exchange.ExchangeDefaults;
-import org.apache.qpid.client.AMQQueue;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import java.util.Arrays;
-
-public class Ping
-{
- public static void main(String[] argv) throws Exception
- {
- Config config = new Config(argv);
- Connection con = config.createConnection();
- con.setClientID("ping");
- new Relay(new AMQQueue(ExchangeDefaults.DIRECT_EXCHANGE_NAME, new AMQShortString("ping")), new AMQQueue(ExchangeDefaults.DIRECT_EXCHANGE_NAME, new AMQShortString("pong")), con,
- config.isEchoOn(),
- config.getBatchSize(),
- config.usePersistentMessages()).start();
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Pong.java b/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Pong.java
deleted file mode 100644
index f4f4b20d7c..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Pong.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.transacted;
-
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.exchange.ExchangeDefaults;
-import org.apache.qpid.client.AMQQueue;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-
-public class Pong
-{
- public static void main(String[] argv) throws Exception
- {
- Config config = new Config(argv);
- Connection con = config.createConnection();
- con.setClientID("pong");
- new Relay(new AMQQueue(ExchangeDefaults.DIRECT_EXCHANGE_NAME, new AMQShortString("pong")), new AMQQueue(ExchangeDefaults.DIRECT_EXCHANGE_NAME, new AMQShortString("ping")), con,
- config.isEchoOn(),
- config.getBatchSize(),
- config.usePersistentMessages()).start();
-
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Relay.java b/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Relay.java
deleted file mode 100644
index cede95e5f0..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Relay.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.transacted;
-
-import org.apache.qpid.client.AMQSession;
-
-import javax.jms.MessageProducer;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.jms.Destination;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.TextMessage;
-import javax.jms.DeliveryMode;
-
-class Relay implements Runnable
-{
- private final Connection _con;
- private final Session _session;
- private final MessageConsumer _src;
- private final MessageProducer _dest;
- private final int _batch;
- private final boolean _echo;
- private int _counter;
- private long start;
- private boolean _running;
-
- Relay(Destination src, Destination dest, Connection con) throws JMSException
- {
- this(src, dest, con, false, 100, true);
- }
-
- Relay(Destination src, Destination dest, Connection con, boolean echo, int batch, boolean persistent) throws JMSException
- {
- _echo = echo;
- _batch = batch;
- _con = con;
- _session = con.createSession(true, AMQSession.NO_ACKNOWLEDGE);
- _src = _session.createConsumer(src);
- _dest = _session.createProducer(dest);
- _dest.setDeliveryMode(persistent ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT);
-
- }
-
- public void run()
- {
- start = System.currentTimeMillis();
- try{
- while(true) relay();
- }
- catch(JMSException e)
- {
- e.printStackTrace();
- }
- try
- {
- _session.close();
- }
- catch (JMSException e)
- {
- e.printStackTrace();
- }
- }
-
- void relay() throws JMSException
- {
- _dest.send(relay(_src.receive()));
- _session.commit();
- }
-
- Message relay(Message in) throws JMSException
- {
- if(!_running)
- {
- System.out.println(_con.getClientID() + " started.");
- _running = true;
- }
- if(++_counter % _batch == 0)
- {
- long time = System.currentTimeMillis() - start;
- System.out.println(_batch + " iterations performed in " + time + " ms");
- try
- {
- Thread.sleep(100);
- }
- catch (InterruptedException e)
- {
- e.printStackTrace();
- }
- start = System.currentTimeMillis();
- }
- if(_echo)
- {
- System.out.println("Received: " + ((TextMessage) in).getText());
- }
- return _session.createTextMessage(_con.getClientID() + _counter);
- }
-
- void start() throws InterruptedException, JMSException
- {
- Thread runner = new Thread(this);
- runner.start();
- _con.start();
- System.out.println(_con.getClientID() + " waiting...");
- runner.join();
- _con.close();
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Start.java b/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Start.java
deleted file mode 100644
index de718d828a..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/transacted/Start.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.transacted;
-
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
-import org.apache.qpid.exchange.ExchangeDefaults;
-import org.apache.qpid.client.AMQQueue;
-
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Session;
-
-public class Start
-{
- public static void main(String[] argv) throws Exception
- {
- Connection con = new Config(argv).createConnection();
- AMQQueue ping = new AMQQueue(ExchangeDefaults.DIRECT_EXCHANGE_NAME, new AMQShortString("ping"));
- Session session = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
- session.createProducer(ping).send(session.createTextMessage("start"));
- session.close();
- con.close();
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/weblogic/ServiceProvider.java b/qpid/java/client/src/old_test/java/org/apache/qpid/weblogic/ServiceProvider.java
deleted file mode 100644
index 71d806b338..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/weblogic/ServiceProvider.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.weblogic;
-
-import org.apache.log4j.Logger;
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQDestination;
-
-import javax.jms.*;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.naming.Context;
-import java.net.InetAddress;
-import java.util.Hashtable;
-
-public class ServiceProvider
-{
- private static final String JNDI_FACTORY = "weblogic.jndi.WLInitialContextFactory";
- private static final String JMS_FACTORY = "transientJMSConnectionFactory";
-
- private static final Logger _logger = Logger.getLogger(ServiceProvider.class);
-
- private static MessageProducer _destinationProducer;
-
- private static Queue _destinationQ;
-
- public static void main(String[] args)
- {
- _logger.info("Starting...");
-
- if (args.length != 2)
- {
- System.out.println("Usage: <WLS URI> <service queue>");
- System.exit(1);
- }
- try
- {
- String url = args[0];
- String receiveQueue = args[1];
-
- final InitialContext ctx = getInitialContext(url);
-
- QueueConnectionFactory qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
- QueueConnection qcon = qconFactory.createQueueConnection();
- final QueueSession qsession = qcon.createQueueSession(false, Session.CLIENT_ACKNOWLEDGE);
- Queue receiveQ = (Queue) ctx.lookup(receiveQueue);
-
- _logger.info("Service (queue) name is '" + receiveQ + "'...");
-
- String selector = (args.length > 2 && args[2] != null && args[2].length() > 1) ? args[2] : null;
-
- _logger.info("Message selector is <" + selector + ">...");
-
- MessageConsumer consumer = qsession.createConsumer(receiveQ, selector);
-
- consumer.setMessageListener(new MessageListener()
- {
- private int _messageCount;
-
- public void onMessage(javax.jms.Message message)
- {
- //_logger.info("Got message '" + message + "'");
-
- TextMessage tm = (TextMessage) message;
-
- try
- {
- Queue responseQueue = (Queue)tm.getJMSReplyTo();
- if (!responseQueue.equals(_destinationQ))
- {
- _destinationQ = responseQueue;
- _logger.info("Creating destination for " + responseQueue);
-
- try
- {
- _destinationProducer = qsession.createProducer(_destinationQ);
- _destinationProducer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
- }
- catch (JMSException e)
- {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- _messageCount++;
- if (_messageCount % 1000 == 0)
- {
- _logger.info("Received message total: " + _messageCount);
- _logger.info("Sending response to '" + responseQueue + "'");
- }
-
- String payload = "This is a response: sing together: 'Mahnah mahnah...'" + tm.getText();
- TextMessage msg = qsession.createTextMessage(payload);
- if (tm.propertyExists("timeSent"))
- {
- _logger.info("timeSent property set on message");
- final long timeSent = tm.getLongProperty("timeSent");
- msg.setLongProperty("timeSent", timeSent);
- _logger.info("time taken to go from service request to provider is: " + (System.currentTimeMillis() - timeSent));
- }
- _destinationProducer.send(msg);
- if (_messageCount % 1000 == 0)
- {
- tm.acknowledge();
- _logger.info("Sent response to '" + responseQueue + "'");
- }
- }
- catch (JMSException e)
- {
- _logger.error("Error sending message: " + e, e);
- }
- }
- });
- qcon.start();
- }
- catch (Throwable t)
- {
- System.err.println("Fatal error: " + t);
- t.printStackTrace();
- }
-
-
- System.out.println("Waiting...");
- }
-
- private static InitialContext getInitialContext(String url) throws NamingException
- {
- Hashtable env = new Hashtable();
- env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
- env.put(Context.PROVIDER_URL, url);
- return new InitialContext(env);
- }
-}
diff --git a/qpid/java/client/src/old_test/java/org/apache/qpid/weblogic/ServiceRequestingClient.java b/qpid/java/client/src/old_test/java/org/apache/qpid/weblogic/ServiceRequestingClient.java
deleted file mode 100644
index 2f64a1dde5..0000000000
--- a/qpid/java/client/src/old_test/java/org/apache/qpid/weblogic/ServiceRequestingClient.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.weblogic;
-
-import org.apache.log4j.Logger;
-
-import javax.jms.*;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import java.util.Hashtable;
-
-/**
- * Created by IntelliJ IDEA.
- * User: U806869
- * Date: 28-May-2005
- * Time: 21:54:51
- * To change this template use File | Settings | File Templates.
- */
-public class ServiceRequestingClient
-{
- private static final Logger _log = Logger.getLogger(ServiceRequestingClient.class);
- private static final String JNDI_FACTORY = "weblogic.jndi.WLInitialContextFactory";
- private static final String JMS_FACTORY = "transientJMSConnectionFactory";
-
- private static class CallbackHandler implements MessageListener
- {
- private int _expectedMessageCount;
-
- private int _actualMessageCount;
-
- private long _startTime;
-
- private long _averageLatency;
-
- public CallbackHandler(int expectedMessageCount, long startTime)
- {
- _expectedMessageCount = expectedMessageCount;
- _startTime = startTime;
- }
-
- public void onMessage(Message m)
- {
- if (_log.isDebugEnabled())
- {
- _log.debug("Message received: " + m);
- }
- try
- {
- if (m.propertyExists("timeSent"))
- {
- long timeSent = m.getLongProperty("timeSent");
- long now = System.currentTimeMillis();
- if (_averageLatency == 0)
- {
- _averageLatency = now - timeSent;
- _log.info("Latency " + _averageLatency);
- }
- else
- {
- _log.info("Individual latency: " + (now-timeSent));
- _averageLatency = (_averageLatency + (now - timeSent))/2;
- _log.info("Average latency now: " + _averageLatency);
- }
- }
- }
- catch (JMSException e)
- {
- _log.error("Could not calculate latency");
- }
-
- _actualMessageCount++;
- if (_actualMessageCount%1000 == 0)
- {
- try
- {
- m.acknowledge();
- }
- catch (JMSException e)
- {
- _log.error("Error acknowledging message");
- }
- _log.info("Received message count: " + _actualMessageCount);
- }
- /*if (!"henson".equals(m.toString()))
- {
- _log.error("Message response not correct: expected 'henson' but got " + m.toString());
- }
- else
- {
- if (_log.isDebugEnabled())
- {
- _log.debug("Message " + m + " received");
- }
- else
- {
- _log.info("Message received");
- }
- } */
-
- if (_actualMessageCount == _expectedMessageCount)
- {
- long timeTaken = System.currentTimeMillis() - _startTime;
- System.out.println("Total time taken to receive " + _expectedMessageCount+ " messages was " +
- timeTaken + "ms, equivalent to " +
- (_expectedMessageCount/(timeTaken/1000.0)) + " messages per second");
- System.out.println("Average latency is: " + _averageLatency);
- }
- }
- }
-
- public static void main(String[] args) throws Exception
- {
- if (args.length != 3)
- {
- System.out.println("Usage: IXPublisher <WLS URL> <sendQueue> <count> will publish count messages to ");
- System.out.println("queue sendQueue and waits for a response on a temp queue");
- System.exit(1);
- }
-
- String url = args[0];
- String sendQueue = args[1];
- int messageCount = Integer.parseInt(args[2]);
-
- InitialContext ctx = getInitialContext(url);
-
- QueueConnectionFactory qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
- QueueConnection qcon = qconFactory.createQueueConnection();
- QueueSession qsession = qcon.createQueueSession(false, Session.CLIENT_ACKNOWLEDGE);
- Queue sendQ = (Queue) ctx.lookup(sendQueue);
- Queue receiveQ = qsession.createTemporaryQueue();
- QueueSender qsender = qsession.createSender(sendQ);
- qsender.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
- _log.debug("Queue sender created for service queue " + sendQ);
-
- javax.jms.MessageConsumer messageConsumer = (javax.jms.MessageConsumer) qsession.createConsumer(receiveQ);
-
- //TextMessage msg = _session.createTextMessage(tempDestination.getQueueName() + "/Presented to in conjunction with Mahnah Mahnah and the Snowths");
- final long startTime = System.currentTimeMillis();
-
- messageConsumer.setMessageListener(new CallbackHandler(messageCount, startTime));
- qcon.start();
- for (int i = 0; i < messageCount; i++)
- {
- TextMessage msg = qsession.createTextMessage("/Presented to in conjunction with Mahnah Mahnah and the Snowths:" + i);
- msg.setJMSReplyTo(receiveQ);
- if (i%1000 == 0)
- {
- long timeNow = System.currentTimeMillis();
- msg.setLongProperty("timeSent", timeNow);
- }
- qsender.send(msg);
- }
-
- new Thread("foo").start();
- //qsession.close();
- //qcon.close();
- }
-
- private static InitialContext getInitialContext(String url) throws NamingException
- {
- Hashtable env = new Hashtable();
- env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
- env.put(Context.PROVIDER_URL, url);
- return new InitialContext(env);
- }
-}
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/client/AMQSession_0_10Test.java b/qpid/java/client/src/test/java/org/apache/qpid/client/AMQSession_0_10Test.java
new file mode 100644
index 0000000000..ea55419144
--- /dev/null
+++ b/qpid/java/client/src/test/java/org/apache/qpid/client/AMQSession_0_10Test.java
@@ -0,0 +1,765 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.qpid.client;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+
+import junit.framework.TestCase;
+
+import org.apache.qpid.framing.AMQShortString;
+import org.apache.qpid.framing.FieldTable;
+import org.apache.qpid.transport.Binary;
+import org.apache.qpid.transport.Connection;
+import org.apache.qpid.transport.Connection.SessionFactory;
+import org.apache.qpid.transport.Connection.State;
+import org.apache.qpid.transport.ExchangeBound;
+import org.apache.qpid.transport.ExchangeBoundResult;
+import org.apache.qpid.transport.ExchangeDeclare;
+import org.apache.qpid.transport.ExchangeDelete;
+import org.apache.qpid.transport.ExchangeQuery;
+import org.apache.qpid.transport.ExchangeQueryResult;
+import org.apache.qpid.transport.ExecutionErrorCode;
+import org.apache.qpid.transport.ExecutionException;
+import org.apache.qpid.transport.ExecutionResult;
+import org.apache.qpid.transport.ExecutionSync;
+import org.apache.qpid.transport.Future;
+import org.apache.qpid.transport.MessageCancel;
+import org.apache.qpid.transport.MessageFlow;
+import org.apache.qpid.transport.MessageRelease;
+import org.apache.qpid.transport.MessageSubscribe;
+import org.apache.qpid.transport.MessageTransfer;
+import org.apache.qpid.transport.Method;
+import org.apache.qpid.transport.Option;
+import org.apache.qpid.transport.ProtocolEvent;
+import org.apache.qpid.transport.QueueDelete;
+import org.apache.qpid.transport.QueueQuery;
+import org.apache.qpid.transport.QueueQueryResult;
+import org.apache.qpid.transport.Sender;
+import org.apache.qpid.transport.Session;
+import org.apache.qpid.transport.SessionAttach;
+import org.apache.qpid.transport.SessionDelegate;
+import org.apache.qpid.transport.SessionDetach;
+import org.apache.qpid.transport.SessionException;
+import org.apache.qpid.transport.SessionRequestTimeout;
+import org.apache.qpid.transport.TxCommit;
+import org.apache.qpid.transport.TxRollback;
+import org.apache.qpid.transport.TxSelect;
+
+/**
+ * Tests AMQSession_0_10 methods.
+ * <p>
+ * The main purpose of the tests in this test suite is to check that
+ * {@link SessionException} is not thrown from methods of
+ * {@link AMQSession_0_10}.
+ */
+public class AMQSession_0_10Test extends TestCase
+{
+
+ public void testExceptionOnCommit()
+ {
+ AMQSession_0_10 session = createThrowingExceptionAMQSession_0_10();
+ try
+ {
+ session.commit();
+ fail("JMSException should be thrown");
+ }
+ catch (Exception e)
+ {
+ assertTrue("JMSException is expected", e instanceof JMSException);
+ assertEquals("541 error code is expected", "541", ((JMSException) e).getErrorCode());
+ }
+ }
+
+ public void testExceptionOnCreateMessageProducer()
+ {
+ AMQSession_0_10 session = createThrowingExceptionAMQSession_0_10();
+ try
+ {
+ session.createMessageProducer(createDestination(), true, true, true, 1l);
+ fail("JMSException should be thrown");
+ }
+ catch (Exception e)
+ {
+ assertTrue("JMSException is expected but got:" + e, e instanceof JMSException);
+ assertEquals("541 error code is expected", "541", ((JMSException) e).getErrorCode());
+ }
+ }
+
+ public void testExceptionOnRollback()
+ {
+ AMQSession_0_10 session = createThrowingExceptionAMQSession_0_10();
+ try
+ {
+ session.rollback();
+ fail("JMSException should be thrown");
+ }
+ catch (Exception e)
+ {
+ assertTrue("JMSException is expected", e instanceof JMSException);
+ }
+ }
+
+ public void testExceptionOnRecover()
+ {
+ AMQSession_0_10 session = createThrowingExceptionAMQSession_0_10(javax.jms.Session.AUTO_ACKNOWLEDGE);
+ try
+ {
+ session.recover();
+ fail("JMSException should be thrown");
+ }
+ catch (Exception e)
+ {
+ assertTrue("JMSException is expected", e instanceof JMSException);
+ }
+ }
+
+ public void testExceptionOnCreateBrowser()
+ {
+ AMQSession_0_10 session = createThrowingExceptionAMQSession_0_10();
+ AMQQueue destination = createQueue();
+ try
+ {
+ session.createBrowser(destination);
+ fail("JMSException should be thrown");
+ }
+ catch (Exception e)
+ {
+ assertTrue("JMSException is expected", e instanceof JMSException);
+ assertEquals("541 error code is expected", "541", ((JMSException) e).getErrorCode());
+ }
+ }
+
+ public void testExceptionOnCreateConsumer()
+ {
+ AMQSession_0_10 session = createThrowingExceptionAMQSession_0_10();
+ AMQAnyDestination destination = createDestination();
+ try
+ {
+ session.createConsumer(destination);
+ fail("JMSException should be thrown");
+ }
+ catch (Exception e)
+ {
+ assertTrue("JMSException is expected", e instanceof JMSException);
+ assertEquals("541 error code is expected", "541", ((JMSException) e).getErrorCode());
+ }
+ }
+
+ public void testExceptionOnCreateSubscriber()
+ {
+ AMQSession_0_10 session = createThrowingExceptionAMQSession_0_10();
+ AMQAnyDestination destination = createDestination();
+ try
+ {
+ session.createSubscriber(destination);
+ fail("JMSException should be thrown");
+ }
+ catch (Exception e)
+ {
+ assertTrue("JMSException is expected", e instanceof JMSException);
+ assertEquals("541 error code is expected", "541", ((JMSException) e).getErrorCode());
+ }
+ }
+
+ public void testExceptionOnUnsubscribe()
+ {
+ AMQSession_0_10 session = createThrowingExceptionAMQSession_0_10();
+ try
+ {
+ session.unsubscribe("whatever");
+ fail("JMSExceptiuon should be thrown");
+ }
+ catch (Exception e)
+ {
+ assertTrue("JMSException is expected", e instanceof JMSException);
+ assertEquals("541 error code is expected", "541", ((JMSException) e).getErrorCode());
+ }
+ }
+
+ public void testCommit()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ session.commit();
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, TxCommit.class, false);
+ assertNotNull("TxCommit was not sent", event);
+ }
+
+ public void testRollback()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ session.rollback();
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, TxRollback.class, false);
+ assertNotNull("TxRollback was not sent", event);
+ }
+
+ public void testRecover()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10(javax.jms.Session.AUTO_ACKNOWLEDGE);
+ try
+ {
+ session.recover();
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, MessageRelease.class, false);
+ assertNotNull("MessageRelease was not sent", event);
+ }
+
+ public void testCreateProducer()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ session.createProducer(createQueue());
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, ExchangeDeclare.class, false);
+ assertNotNull("ExchangeDeclare was not sent", event);
+ }
+
+ public void testCreateConsumer()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ session.createConsumer(createQueue());
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, MessageSubscribe.class, false);
+ assertNotNull("MessageSubscribe was not sent", event);
+ }
+
+ public void testSync()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ session.sync();
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, ExecutionSync.class, false);
+ assertNotNull("ExecutionSync was not sent", event);
+ }
+
+ public void testRejectMessage()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ session.rejectMessage(1l, true);
+ ProtocolEvent event = findSentProtocolEventOfClass(session, MessageRelease.class, false);
+ assertNotNull("MessageRelease event was not sent", event);
+ }
+
+ public void testReleaseForRollback()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ session.releaseForRollback();
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, MessageRelease.class, false);
+ assertNotNull("MessageRelease event was not sent", event);
+ }
+
+ public void testSendQueueDelete()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ session.sendQueueDelete(new AMQShortString("test"));
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, QueueDelete.class, false);
+ assertNotNull("QueueDelete event was not sent", event);
+ QueueDelete exchangeDelete = (QueueDelete) event;
+ assertEquals("test", exchangeDelete.getQueue());
+ }
+
+ public void testSendConsume()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ BasicMessageConsumer_0_10 consumer = session.createMessageConsumer(createDestination(), 1, 1, true, false,
+ null, new FieldTable(), false, true);
+ session.sendConsume(consumer, new AMQShortString("test"), null, true, null, 1);
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, MessageSubscribe.class, false);
+ assertNotNull("MessageSubscribe event was not sent", event);
+ }
+
+ public void testCreateMessageProducer()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ session.createMessageProducer(createDestination(), true, true, true, 1l);
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, ExchangeDeclare.class, false);
+ assertNotNull("ExchangeDeclare event was not sent", event);
+ }
+
+ public void testSendExchangeDelete()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ session.sendExchangeDelete("test", true);
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, ExchangeDelete.class, false);
+ assertNotNull("ExchangeDelete event was not sent", event);
+ ExchangeDelete exchangeDelete = (ExchangeDelete) event;
+ assertEquals("test", exchangeDelete.getExchange());
+ }
+
+ public void testExceptionOnMessageConsumerReceive()
+ {
+ AMQSession_0_10 session = createThrowingExceptionAMQSession_0_10();
+ try
+ {
+ BasicMessageConsumer_0_10 consumer = session.createMessageConsumer(createDestination(), 1, 1, true, false,
+ null, new FieldTable(), false, true);
+ session.start();
+ consumer.receive(1);
+ fail("JMSException should be thrown");
+ }
+ catch (Exception e)
+ {
+ assertTrue("JMSException is expected", e instanceof JMSException);
+ assertEquals("541 error code is expected", "541", ((JMSException) e).getErrorCode());
+ }
+ }
+
+ public void testMessageConsumerReceive()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ BasicMessageConsumer_0_10 consumer = session.createMessageConsumer(createDestination(), 1, 1, true, false,
+ null, new FieldTable(), false, true);
+ session.start();
+ consumer.receive(1);
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, MessageFlow.class, false);
+ assertNotNull("MessageFlow event was not sent", event);
+ }
+
+ public void testExceptionOnMessageConsumerReceiveNoWait()
+ {
+ AMQSession_0_10 session = createThrowingExceptionAMQSession_0_10();
+ try
+ {
+ BasicMessageConsumer_0_10 consumer = session.createMessageConsumer(createDestination(), 1, 1, true, false,
+ null, new FieldTable(), false, true);
+ session.start();
+ consumer.receiveNoWait();
+ fail("JMSException should be thrown");
+ }
+ catch (Exception e)
+ {
+ assertTrue("JMSException is expected", e instanceof JMSException);
+ assertEquals("541 error code is expected", "541", ((JMSException) e).getErrorCode());
+ }
+ }
+
+ public void testExceptionOnMessageConsumerSetMessageListener()
+ {
+ AMQSession_0_10 session = createThrowingExceptionAMQSession_0_10();
+ try
+ {
+ BasicMessageConsumer_0_10 consumer = session.createMessageConsumer(createDestination(), 1, 1, true, false,
+ null, new FieldTable(), false, true);
+ consumer.setMessageListener(new MockMessageListener());
+ fail("JMSException should be thrown");
+ }
+ catch (Exception e)
+ {
+ assertTrue("JMSException is expected", e instanceof JMSException);
+ assertEquals("541 error code is expected", "541", ((JMSException) e).getErrorCode());
+ }
+ }
+
+ public void testMessageConsumerSetMessageListener()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ BasicMessageConsumer_0_10 consumer = session.createMessageConsumer(createDestination(), 1, 1, true, false,
+ null, new FieldTable(), false, true);
+ consumer.setMessageListener(new MockMessageListener());
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, MessageFlow.class, false);
+ assertNotNull("MessageFlow event was not sent", event);
+ }
+
+ public void testMessageConsumerClose()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ BasicMessageConsumer_0_10 consumer = session.createMessageConsumer(createDestination(), 1, 1, true, false,
+ null, new FieldTable(), false, true);
+ consumer.close();
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, MessageCancel.class, false);
+ assertNotNull("MessageCancel event was not sent", event);
+ }
+
+ public void testExceptionOnMessageConsumerClose()
+ {
+ AMQSession_0_10 session = createThrowingExceptionAMQSession_0_10();
+ try
+ {
+ BasicMessageConsumer_0_10 consumer = session.createMessageConsumer(createDestination(), 1, 1, true, false,
+ null, new FieldTable(), false, true);
+ consumer.close();
+ fail("JMSException should be thrown");
+ }
+ catch (Exception e)
+ {
+ assertTrue("JMSException is expected", e instanceof JMSException);
+ assertEquals("541 error code is expected", "541", ((JMSException) e).getErrorCode());
+ }
+ }
+
+ public void testMessageProducerSend()
+ {
+ AMQSession_0_10 session = createAMQSession_0_10();
+ try
+ {
+ MessageProducer producer = session.createProducer(createQueue());
+ producer.send(session.createTextMessage("Test"));
+ session.commit();
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception is cought:" + e.getMessage());
+ }
+ ProtocolEvent event = findSentProtocolEventOfClass(session, MessageTransfer.class, false);
+ assertNotNull("MessageTransfer event was not sent", event);
+ event = findSentProtocolEventOfClass(session, ExchangeDeclare.class, false);
+ assertNotNull("ExchangeDeclare event was not sent", event);
+ }
+
+ private AMQAnyDestination createDestination()
+ {
+ AMQAnyDestination destination = null;
+ try
+ {
+ destination = new AMQAnyDestination(new AMQShortString("amq.direct"), new AMQShortString("direct"),
+ new AMQShortString("test"), false, true, new AMQShortString("test"), true, null);
+ }
+ catch (Exception e)
+ {
+ fail("Failued to create destination:" + e.getMessage());
+ }
+ return destination;
+ }
+
+ private AMQQueue createQueue()
+ {
+ AMQQueue destination = null;
+ try
+ {
+ destination = new AMQQueue(new AMQShortString("amq.direct"), new AMQShortString("test"),
+ new AMQShortString("test"));
+ }
+ catch (Exception e)
+ {
+ fail("Failued to create destination:" + e.getMessage());
+ }
+ return destination;
+ }
+
+ private AMQSession_0_10 createThrowingExceptionAMQSession_0_10()
+ {
+ return createAMQSession_0_10(true, javax.jms.Session.SESSION_TRANSACTED);
+ }
+
+ private AMQSession_0_10 createThrowingExceptionAMQSession_0_10(int akcnowledgeMode)
+ {
+ return createAMQSession_0_10(true, akcnowledgeMode);
+ }
+
+ private ProtocolEvent findSentProtocolEventOfClass(AMQSession_0_10 session, Class<? extends ProtocolEvent> class1,
+ boolean isLast)
+ {
+ ProtocolEvent found = null;
+ List<ProtocolEvent> events = ((MockSession) session.getQpidSession()).getSender().getSendEvents();
+ assertNotNull("Events list should not be null", events);
+ assertFalse("Events list should not be empty", events.isEmpty());
+ if (isLast)
+ {
+ ProtocolEvent event = events.get(events.size() - 1);
+ if (event.getClass().isAssignableFrom(class1))
+ {
+ found = event;
+ }
+ }
+ else
+ {
+ for (ProtocolEvent protocolEvent : events)
+ {
+ if (protocolEvent.getClass().isAssignableFrom(class1))
+ {
+ found = protocolEvent;
+ break;
+ }
+ }
+
+ }
+ return found;
+ }
+
+ private AMQSession_0_10 createAMQSession_0_10()
+ {
+ return createAMQSession_0_10(false, javax.jms.Session.SESSION_TRANSACTED);
+ }
+
+ private AMQSession_0_10 createAMQSession_0_10(int acknowledgeMode)
+ {
+ return createAMQSession_0_10(false, acknowledgeMode);
+ }
+
+ private AMQSession_0_10 createAMQSession_0_10(boolean throwException, int acknowledgeMode)
+ {
+ AMQConnection amqConnection = null;
+ try
+ {
+ amqConnection = new MockAMQConnection(
+ "amqp://guest:guest@client/test?brokerlist='tcp://localhost:1'&maxprefetch='0'");
+ }
+ catch (Exception e)
+ {
+ fail("Failure to create a mock connection:" + e.getMessage());
+ }
+ boolean isTransacted = acknowledgeMode == javax.jms.Session.SESSION_TRANSACTED ? true : false;
+ AMQSession_0_10 session = new AMQSession_0_10(createConnection(throwException), amqConnection, 1, isTransacted, acknowledgeMode,
+ 1, 1, "test");
+ return session;
+ }
+
+ private Connection createConnection(final boolean throwException)
+ {
+ MockTransportConnection connection = new MockTransportConnection();
+ connection.setState(State.OPEN);
+ connection.setSender(new MockSender());
+ connection.setSessionFactory(new SessionFactory()
+ {
+
+ @Override
+ public Session newSession(Connection conn, Binary name, long expiry)
+ {
+ return new MockSession(conn, new SessionDelegate(), name, expiry, throwException);
+ }
+ });
+ return connection;
+ }
+
+ private final class MockMessageListener implements MessageListener
+ {
+ @Override
+ public void onMessage(Message arg0)
+ {
+ }
+ }
+
+ class MockSession extends Session
+ {
+ private final boolean _throwException;
+ private final Connection _connection;
+ private final SessionDelegate _delegate;
+
+ protected MockSession(Connection connection, SessionDelegate delegate, Binary name, long expiry,
+ boolean throwException)
+ {
+ super(connection, delegate, name, expiry);
+ _throwException = throwException;
+ setState(State.OPEN);
+ _connection = connection;
+ _delegate = delegate;
+ }
+
+ public void invoke(Method m, Runnable postIdSettingAction)
+ {
+ if (_throwException)
+ {
+ if (m instanceof SessionAttach || m instanceof SessionRequestTimeout || m instanceof TxSelect)
+ {
+ // do not throw exception for SessionAttach,
+ // SessionRequestTimeout and TxSelect
+ // session needs to be instantiated
+ return;
+ }
+ ExecutionException e = new ExecutionException();
+ e.setErrorCode(ExecutionErrorCode.INTERNAL_ERROR);
+ throw new SessionException(e);
+ }
+ else
+ {
+ super.invoke(m, postIdSettingAction);
+ if (m instanceof SessionDetach)
+ {
+ setState(State.CLOSED);
+ }
+ }
+ }
+
+ public void sync()
+ {
+ // to avoid recursive calls
+ setAutoSync(false);
+ // simply send sync command
+ super.executionSync(Option.SYNC);
+ }
+
+ protected <T> Future<T> invoke(Method m, Class<T> klass)
+ {
+ int commandId = getCommandsOut();
+ Future<T> future = super.invoke(m, klass);
+ ExecutionResult result = new ExecutionResult();
+ result.setCommandId(commandId);
+ if (m instanceof ExchangeBound)
+ {
+ ExchangeBoundResult struc = new ExchangeBoundResult();
+ struc.setQueueNotFound(true);
+ result.setValue(struc);
+ }
+ else if (m instanceof ExchangeQuery)
+ {
+ ExchangeQueryResult struc = new ExchangeQueryResult();
+ result.setValue(struc);
+ }
+ else if (m instanceof QueueQuery)
+ {
+ QueueQueryResult struc = new QueueQueryResult();
+ result.setValue(struc);
+ }
+ _delegate.executionResult(this, result);
+ return future;
+ }
+
+ public MockSender getSender()
+ {
+ return (MockSender) _connection.getSender();
+ }
+ }
+
+ class MockTransportConnection extends Connection
+ {
+ public void setState(State state)
+ {
+ super.setState(state);
+ }
+ }
+
+ class MockSender implements Sender<ProtocolEvent>
+ {
+ private List<ProtocolEvent> _sendEvents = new ArrayList<ProtocolEvent>();
+
+ @Override
+ public void setIdleTimeout(int i)
+ {
+ }
+
+ @Override
+ public void send(ProtocolEvent msg)
+ {
+ _sendEvents.add(msg);
+ }
+
+ @Override
+ public void flush()
+ {
+ }
+
+ @Override
+ public void close()
+ {
+ }
+
+ public List<ProtocolEvent> getSendEvents()
+ {
+ return _sendEvents;
+ }
+
+ }
+
+}
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/client/MockAMQConnection.java b/qpid/java/client/src/test/java/org/apache/qpid/client/MockAMQConnection.java
index 5972bf3fae..73e67469ae 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/client/MockAMQConnection.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/client/MockAMQConnection.java
@@ -23,7 +23,6 @@ package org.apache.qpid.client;
import org.apache.qpid.AMQException;
import org.apache.qpid.client.state.AMQState;
import org.apache.qpid.framing.ProtocolVersion;
-import org.apache.qpid.jms.ConnectionURL;
import org.apache.qpid.jms.BrokerDetails;
import org.apache.qpid.url.URLSyntaxException;
@@ -37,48 +36,18 @@ public class MockAMQConnection extends AMQConnection
super(broker, username, password, clientName, virtualHost);
}
- public MockAMQConnection(String broker, String username, String password, String clientName, String virtualHost, SSLConfiguration sslConfig)
- throws AMQException, URLSyntaxException
- {
- super(broker, username, password, clientName, virtualHost, sslConfig);
- }
-
public MockAMQConnection(String host, int port, String username, String password, String clientName, String virtualHost)
throws AMQException, URLSyntaxException
{
super(host, port, username, password, clientName, virtualHost);
}
- public MockAMQConnection(String host, int port, String username, String password, String clientName, String virtualHost, SSLConfiguration sslConfig)
- throws AMQException, URLSyntaxException
- {
- super(host, port, username, password, clientName, virtualHost, sslConfig);
- }
-
- public MockAMQConnection(String host, int port, boolean useSSL, String username, String password, String clientName, String virtualHost, SSLConfiguration sslConfig)
- throws AMQException, URLSyntaxException
- {
- super(host, port, useSSL, username, password, clientName, virtualHost, sslConfig);
- }
-
public MockAMQConnection(String connection)
throws AMQException, URLSyntaxException
{
super(connection);
}
- public MockAMQConnection(String connection, SSLConfiguration sslConfig)
- throws AMQException, URLSyntaxException
- {
- super(connection, sslConfig);
- }
-
- public MockAMQConnection(ConnectionURL connectionURL, SSLConfiguration sslConfig)
- throws AMQException
- {
- super(connectionURL, sslConfig);
- }
-
@Override
public ProtocolVersion makeBrokerConnection(BrokerDetails brokerDetail) throws IOException
{
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/client/message/TestMessageHelper.java b/qpid/java/client/src/test/java/org/apache/qpid/client/message/TestMessageHelper.java
index 7ee991b63c..b5c31e7c5e 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/client/message/TestMessageHelper.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/client/message/TestMessageHelper.java
@@ -43,4 +43,9 @@ public class TestMessageHelper
{
return new JMSStreamMessage(AMQMessageDelegateFactory.FACTORY_0_8);
}
+
+ public static JMSObjectMessage newJMSObjectMessage()
+ {
+ return new JMSObjectMessage(AMQMessageDelegateFactory.FACTORY_0_8);
+ }
}
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/client/protocol/MockIoSession.java b/qpid/java/client/src/test/java/org/apache/qpid/client/protocol/MockIoSession.java
deleted file mode 100644
index f0938a4bc0..0000000000
--- a/qpid/java/client/src/test/java/org/apache/qpid/client/protocol/MockIoSession.java
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.client.protocol;
-
-import org.apache.mina.common.*;
-import org.apache.mina.common.support.DefaultCloseFuture;
-import org.apache.mina.common.support.DefaultWriteFuture;
-import org.apache.mina.common.support.AbstractIoFilterChain;
-import org.apache.qpid.client.protocol.AMQProtocolSession;
-
-import java.net.SocketAddress;
-import java.net.InetSocketAddress;
-import java.util.Set;
-
-public class MockIoSession implements IoSession
-{
- private AMQProtocolSession _protocolSession;
-
- /**
- * Stores the last response written
- */
- private Object _lastWrittenObject;
-
- private boolean _closing;
- private IoFilterChain _filterChain;
-
- public MockIoSession()
- {
- _filterChain = new AbstractIoFilterChain(this)
- {
- protected void doWrite(IoSession ioSession, IoFilter.WriteRequest writeRequest) throws Exception
- {
-
- }
-
- protected void doClose(IoSession ioSession) throws Exception
- {
-
- }
- };
- }
-
- public Object getLastWrittenObject()
- {
- return _lastWrittenObject;
- }
-
- public IoService getService()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public IoServiceConfig getServiceConfig()
- {
- return null;
- }
-
- public IoHandler getHandler()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public IoSessionConfig getConfig()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public IoFilterChain getFilterChain()
- {
- return _filterChain;
- }
-
- public WriteFuture write(Object message)
- {
- WriteFuture wf = new DefaultWriteFuture(null);
- _lastWrittenObject = message;
- return wf;
- }
-
- public CloseFuture close()
- {
- _closing = true;
- CloseFuture cf = new DefaultCloseFuture(null);
- cf.setClosed();
- return cf;
- }
-
- public Object getAttachment()
- {
- return _protocolSession;
- }
-
- public Object setAttachment(Object attachment)
- {
- Object current = _protocolSession;
- _protocolSession = (AMQProtocolSession) attachment;
- return current;
- }
-
- public Object getAttribute(String key)
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public Object setAttribute(String key, Object value)
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public Object setAttribute(String key)
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public Object removeAttribute(String key)
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public boolean containsAttribute(String key)
- {
- return false; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public Set getAttributeKeys()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public TransportType getTransportType()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public boolean isConnected()
- {
- return false; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public boolean isClosing()
- {
- return _closing;
- }
-
- public CloseFuture getCloseFuture()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public SocketAddress getRemoteAddress()
- {
- return new InetSocketAddress("127.0.0.1", 1234); //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public SocketAddress getLocalAddress()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public SocketAddress getServiceAddress()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public int getIdleTime(IdleStatus status)
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public long getIdleTimeInMillis(IdleStatus status)
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public void setIdleTime(IdleStatus status, int idleTime)
- {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public int getWriteTimeout()
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public long getWriteTimeoutInMillis()
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public void setWriteTimeout(int writeTimeout)
- {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public TrafficMask getTrafficMask()
- {
- return null; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public void setTrafficMask(TrafficMask trafficMask)
- {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public void suspendRead()
- {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public void suspendWrite()
- {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public void resumeRead()
- {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public void resumeWrite()
- {
- //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public long getReadBytes()
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public long getWrittenBytes()
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public long getReadMessages()
- {
- return 0L;
- }
-
- public long getWrittenMessages()
- {
- return 0L;
- }
-
- public long getWrittenWriteRequests()
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public int getScheduledWriteRequests()
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public int getScheduledWriteBytes()
- {
- return 0; //TODO
- }
-
- public long getCreationTime()
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public long getLastIoTime()
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public long getLastReadTime()
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public long getLastWriteTime()
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public boolean isIdle(IdleStatus status)
- {
- return false; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public int getIdleCount(IdleStatus status)
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-
- public long getLastIdleTime(IdleStatus status)
- {
- return 0; //To change body of implemented methods use File | Settings | File Templates.
- }
-}
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/client/security/CallbackHandlerRegistryTest.java b/qpid/java/client/src/test/java/org/apache/qpid/client/security/CallbackHandlerRegistryTest.java
new file mode 100644
index 0000000000..cc5d48fbef
--- /dev/null
+++ b/qpid/java/client/src/test/java/org/apache/qpid/client/security/CallbackHandlerRegistryTest.java
@@ -0,0 +1,185 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.client.security;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import org.apache.qpid.jms.ConnectionURL;
+import org.apache.qpid.test.utils.QpidTestCase;
+
+
+/**
+ * Tests the ability of {@link CallbackHandlerRegistry} to correctly parse
+ * the properties describing the available callback handlers. Ensures also
+ * that it is able to select the mechanism and create an implementation
+ * given a variety of starting conditions.
+ *
+ */
+public class CallbackHandlerRegistryTest extends QpidTestCase
+{
+ private CallbackHandlerRegistry _registry; // Object under test
+
+ public void testCreateHandlerSuccess()
+ {
+ final Properties props = new Properties();
+ props.put("TESTA.1", TestACallbackHandler.class.getName());
+
+ _registry = new CallbackHandlerRegistry(props);
+ assertEquals(1,_registry.getMechanisms().size());
+
+ final CallbackHandler handler = _registry.createCallbackHandler("TESTA");
+ assertTrue(handler instanceof TestACallbackHandler);
+ }
+
+ public void testCreateHandlerForUnknownMechanismName()
+ {
+ final Properties props = new Properties();
+ props.put("TEST1.1", TestACallbackHandler.class.getName());
+
+ _registry = new CallbackHandlerRegistry(props);
+
+ try
+ {
+ _registry.createCallbackHandler("NOTFOUND");
+ fail("Exception not thrown");
+ }
+ catch (IllegalArgumentException iae)
+ {
+ // PASS
+ }
+ }
+
+ public void testSelectMechanism()
+ {
+ final Properties props = new Properties();
+ props.put("TESTA.1", TestACallbackHandler.class.getName());
+ props.put("TESTB.2", TestBCallbackHandler.class.getName());
+
+ _registry = new CallbackHandlerRegistry(props);
+ assertEquals(2,_registry.getMechanisms().size());
+
+ final String selectedMechanism = _registry.selectMechanism("TESTA");
+ assertEquals("TESTA", selectedMechanism);
+ }
+
+ public void testSelectReturnsFirstMutallyAvailableMechanism()
+ {
+ final Properties props = new Properties();
+ props.put("TESTA.1", TestACallbackHandler.class.getName());
+ props.put("TESTB.2", TestBCallbackHandler.class.getName());
+
+ _registry = new CallbackHandlerRegistry(props);
+
+ final String selectedMechanism = _registry.selectMechanism("TESTD TESTB TESTA");
+ // TESTA should be returned as it is higher than TESTB in the properties file.
+ assertEquals("Selected mechanism should respect the ordinal", "TESTA", selectedMechanism);
+ }
+
+ public void testRestrictedSelectReturnsMechanismFromRestrictedList()
+ {
+ final Properties props = new Properties();
+ props.put("TESTA.1", TestACallbackHandler.class.getName());
+ props.put("TESTB.2", TestBCallbackHandler.class.getName());
+ props.put("TESTC.3", TestCCallbackHandler.class.getName());
+
+ _registry = new CallbackHandlerRegistry(props);
+
+ final String selectedMechanism = _registry.selectMechanism("TESTC TESTB TESTA", "TESTB TESTC");
+ // TESTB should be returned as client has restricted the mechanism list to TESTB and TESTC
+ assertEquals("Selected mechanism should respect the ordinal and be limitted by restricted list","TESTB", selectedMechanism);
+ }
+
+ public void testOldPropertyFormatRejected()
+ {
+ final Properties props = new Properties();
+ props.put("CallbackHandler.TESTA", TestACallbackHandler.class.getName());
+
+ try
+ {
+ new CallbackHandlerRegistry(props);
+ fail("exception not thrown");
+ }
+ catch(IllegalArgumentException iae)
+ {
+ // PASS
+ }
+ }
+
+ public void testPropertyWithNonnumericalOrdinal()
+ {
+ final Properties props = new Properties();
+ props.put("TESTA.z", TestACallbackHandler.class.getName());
+ try
+ {
+ new CallbackHandlerRegistry(props);
+ fail("exception not thrown");
+ }
+ catch(IllegalArgumentException iae)
+ {
+ // PASS
+ }
+ }
+
+ public void testUnexpectedCallbackImplementationsIgnored()
+ {
+ final Properties props = new Properties();
+ props.put("TESTA.1", TestACallbackHandler.class.getName());
+ props.put("TESTB.2", "NotFound");
+ props.put("TESTC.3", "java.lang.String");
+
+ _registry = new CallbackHandlerRegistry(props);
+
+ assertEquals(1,_registry.getMechanisms().size());
+ }
+
+ static class TestACallbackHandler extends TestCallbackHandler
+ {
+ }
+
+ static class TestBCallbackHandler extends TestCallbackHandler
+ {
+ }
+
+ static class TestCCallbackHandler extends TestCallbackHandler
+ {
+ }
+
+ static abstract class TestCallbackHandler implements AMQCallbackHandler
+ {
+ @Override
+ public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void initialise(ConnectionURL connectionURL)
+ {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+}
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/client/util/ClassLoadingAwareObjectInputStreamTest.java b/qpid/java/client/src/test/java/org/apache/qpid/client/util/ClassLoadingAwareObjectInputStreamTest.java
new file mode 100644
index 0000000000..a12e4ce977
--- /dev/null
+++ b/qpid/java/client/src/test/java/org/apache/qpid/client/util/ClassLoadingAwareObjectInputStreamTest.java
@@ -0,0 +1,86 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.client.util;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.io.ObjectOutputStream;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.qpid.test.utils.QpidTestCase;
+
+public class ClassLoadingAwareObjectInputStreamTest extends QpidTestCase
+{
+ InputStream _in;
+ ClassLoadingAwareObjectInputStream _claOIS;
+
+ protected void setUp() throws Exception
+ {
+ //Create a viable input stream for instantiating the CLA OIS
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ ObjectOutputStream out = new ObjectOutputStream(baos);
+ out.writeObject("testString");
+ out.flush();
+ out.close();
+
+
+ _in = new ByteArrayInputStream(baos.toByteArray());
+
+ _claOIS = new ClassLoadingAwareObjectInputStream(_in);
+ }
+
+ /**
+ * Test that the resolveProxyClass method returns a proxy class implementing the desired interface
+ */
+ public void testResolveProxyClass() throws Exception
+ {
+ //try to proxy an interface
+ Class<?> clazz = _claOIS.resolveProxyClass(new String[]{"java.lang.CharSequence"});
+
+ //verify the proxy supports the expected interface (only)
+ List<Class<?>> interfaces = Arrays.asList(clazz.getInterfaces());
+ assertTrue("Unexpected interfaces supported by proxy", interfaces.contains(CharSequence.class));
+ assertEquals("Unexpected interfaces supported by proxy", 1, interfaces.size());
+ }
+
+ /**
+ * Test that the resolveProxyClass method throws a ClassNotFoundException wrapping an
+ * IllegalArgumentException if it is provided arguments which violate the restrictions allowed
+ * by Proxy.getProxyClass (as required by the ObjectInputStream.resolveProxyClass javadoc).
+ */
+ public void testResolveProxyClassThrowsCNFEWrappingIAE() throws Exception
+ {
+ try
+ {
+ //try to proxy a *class* rather than an interface, which is illegal
+ _claOIS.resolveProxyClass(new String[]{"java.lang.String"});
+ fail("should have thrown an exception");
+ }
+ catch(ClassNotFoundException cnfe)
+ {
+ //expected, but must verify it is wrapping an IllegalArgumentException
+ assertTrue(cnfe.getCause() instanceof IllegalArgumentException);
+ }
+ }
+}
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/message/ObjectMessageUnitTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/message/ObjectMessageUnitTest.java
new file mode 100644
index 0000000000..e37970e9a2
--- /dev/null
+++ b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/client/message/ObjectMessageUnitTest.java
@@ -0,0 +1,105 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.test.unit.client.message;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.apache.qpid.client.message.JMSObjectMessage;
+import org.apache.qpid.client.message.TestMessageHelper;
+import org.apache.qpid.test.utils.QpidTestCase;
+
+public class ObjectMessageUnitTest extends QpidTestCase
+{
+ private JMSObjectMessage _om;
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ _om = TestMessageHelper.newJMSObjectMessage();
+ }
+
+ /**
+ * Test that setObject with a primitive works
+ */
+ public void testSetObjectWithBooleanPrimitive() throws Exception
+ {
+ _om.setObject(true);
+
+ //make the message readable
+ Object object = _om.getObject();
+
+ assertTrue("Unexpected type returned", object instanceof Boolean);
+ assertEquals("Unexpected value returned", true, object);
+ }
+
+ /**
+ * Test that setObject with a serializable Object works
+ */
+ public void testSetObjectWithString() throws Exception
+ {
+ _om.setObject("test string");
+
+ //make the message readable
+ Object object = _om.getObject();
+
+ assertTrue("Unexpected type returned", object instanceof String);
+ assertEquals("Unexpected value returned", "test string", object);
+ }
+
+ /**
+ * Test that setObject with a Collection of serializable's works, returning
+ * the items in the list when deserialized and ignoring any values
+ * added to the collection after setObject() is called on the message.
+ */
+ public void testSetObjectWithArrayListOfInteger() throws Exception
+ {
+ ArrayList<Integer> list = new ArrayList<Integer>();
+ list.add(1234);
+ list.add(Integer.MIN_VALUE);
+ list.add(Integer.MAX_VALUE);
+
+ _om.setObject(list);
+
+ //add something extra to the list now, and check it isn't in the value read back
+ list.add(0);
+
+ //make the message readable
+
+ //retrieve the Object
+ Object object = _om.getObject();
+
+ ArrayList<?> returnedList = null;
+ if(object instanceof ArrayList<?>)
+ {
+ returnedList = (ArrayList<?>) object;
+ }
+ else
+ {
+ fail("returned object was not an ArrayList");
+ }
+
+ //verify the extra added Integer was not present, then remove it from original list again and compare contents with the returned list
+ assertFalse("returned list should not have had the value added after setObject() was used", returnedList.contains(0));
+ list.remove(Integer.valueOf(0));
+ assertTrue("list contents were not equal", Arrays.equals(list.toArray(), returnedList.toArray()));
+ }
+}
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/ConnectionFactoryTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/ConnectionFactoryTest.java
index 9e76b0d468..20496026ce 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/ConnectionFactoryTest.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/ConnectionFactoryTest.java
@@ -21,10 +21,10 @@
package org.apache.qpid.test.unit.jndi;
import junit.framework.TestCase;
+
import org.apache.qpid.client.AMQConnectionFactory;
import org.apache.qpid.jms.BrokerDetails;
import org.apache.qpid.jms.ConnectionURL;
-import org.apache.qpid.url.URLSyntaxException;
public class ConnectionFactoryTest extends TestCase
{
@@ -34,21 +34,9 @@ public class ConnectionFactoryTest extends TestCase
public static final String URL = "amqp://guest:guest@clientID/test?brokerlist='tcp://localhost:5672'";
public static final String URL_STAR_PWD = "amqp://guest:********@clientID/test?brokerlist='tcp://localhost:5672'";
- public void testConnectionURLString()
+ public void testConnectionURLStringMasksPassword() throws Exception
{
- AMQConnectionFactory factory = new AMQConnectionFactory();
-
- assertNull("ConnectionURL should have no value at start",
- factory.getConnectionURL());
-
- try
- {
- factory.setConnectionURLString(URL);
- }
- catch (URLSyntaxException e)
- {
- fail(e.getMessage());
- }
+ AMQConnectionFactory factory = new AMQConnectionFactory(URL);
//URL will be returned with the password field swapped for '********'
assertEquals("Connection URL not correctly set", URL_STAR_PWD, factory.getConnectionURLString());
diff --git a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java
index a1b14d5723..2052312f54 100644
--- a/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java
+++ b/qpid/java/client/src/test/java/org/apache/qpid/test/unit/jndi/JNDIPropertyFileTest.java
@@ -24,6 +24,7 @@ import java.util.Properties;
import javax.jms.Queue;
import javax.jms.Topic;
+import javax.naming.ConfigurationException;
import javax.naming.Context;
import javax.naming.InitialContext;
@@ -67,4 +68,22 @@ public class JNDIPropertyFileTest extends TestCase
assertEquals("Topic" + i + "WithSpace",bindingKey.asString());
}
}
+
+ public void testConfigurationErrors() throws Exception
+ {
+ Properties properties = new Properties();
+ properties.put("java.naming.factory.initial", "org.apache.qpid.jndi.PropertiesFileInitialContextFactory");
+ properties.put("destination.my-queue","amq.topic/test;create:always}");
+
+ try
+ {
+ ctx = new InitialContext(properties);
+ fail("A configuration exception should be thrown with details about the address syntax error");
+ }
+ catch(ConfigurationException e)
+ {
+ assertTrue("Incorrect exception", e.getMessage().contains("Failed to parse entry: amq.topic/test;create:always}"));
+ }
+
+ }
}
diff --git a/qpid/java/common.xml b/qpid/java/common.xml
index d8150bac6b..6bb71ef24e 100644
--- a/qpid/java/common.xml
+++ b/qpid/java/common.xml
@@ -132,8 +132,6 @@
</sequential>
</macrodef>
-
-
<macrodef name="jython">
<attribute name="path"/>
<element name="args"/>
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQCodecFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQCodecFactory.java
index 591dbd085b..c81af9760b 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQCodecFactory.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQCodecFactory.java
@@ -20,9 +20,6 @@
*/
package org.apache.qpid.codec;
-import org.apache.mina.filter.codec.ProtocolCodecFactory;
-import org.apache.mina.filter.codec.ProtocolDecoder;
-import org.apache.mina.filter.codec.ProtocolEncoder;
import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
/**
@@ -31,14 +28,11 @@ import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
*
* <p/><table id="crc"><caption>CRC Card</caption>
* <tr><th> Responsibilities <th> Collaborations.
- * <tr><td> Supply the protocol encoder. <td> {@link AMQEncoder}
* <tr><td> Supply the protocol decoder. <td> {@link AMQDecoder}
* </table>
*/
-public class AMQCodecFactory implements ProtocolCodecFactory
+public class AMQCodecFactory
{
- /** Holds the protocol encoder. */
- private final AMQEncoder _encoder = new AMQEncoder();
/** Holds the protocol decoder. */
private final AMQDecoder _frameDecoder;
@@ -56,15 +50,6 @@ public class AMQCodecFactory implements ProtocolCodecFactory
_frameDecoder = new AMQDecoder(expectProtocolInitiation, session);
}
- /**
- * Gets the AMQP encoder.
- *
- * @return The AMQP encoder.
- */
- public ProtocolEncoder getEncoder()
- {
- return _encoder;
- }
/**
* Gets the AMQP decoder.
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java b/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java
index 281c0761d9..69bf73bb49 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQDecoder.java
@@ -20,13 +20,9 @@
*/
package org.apache.qpid.codec;
-import java.util.ArrayList;
-
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoSession;
-import org.apache.mina.common.SimpleByteBufferAllocator;
-import org.apache.mina.filter.codec.CumulativeProtocolDecoder;
-import org.apache.mina.filter.codec.ProtocolDecoderOutput;
+import java.io.*;
+import java.nio.ByteBuffer;
+import java.util.*;
import org.apache.qpid.framing.AMQDataBlock;
import org.apache.qpid.framing.AMQDataBlockDecoder;
@@ -54,11 +50,8 @@ import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
* @todo If protocol initiation decoder not needed, then don't create it. Probably not a big deal, but it adds to the
* per-session overhead.
*/
-public class AMQDecoder extends CumulativeProtocolDecoder
+public class AMQDecoder
{
-
- private static final String BUFFER = AMQDecoder.class.getName() + ".Buffer";
-
/** Holds the 'normal' AMQP data decoder. */
private AMQDataBlockDecoder _dataBlockDecoder = new AMQDataBlockDecoder();
@@ -67,12 +60,11 @@ public class AMQDecoder extends CumulativeProtocolDecoder
/** Flag to indicate whether this decoder needs to handle protocol initiation. */
private boolean _expectProtocolInitiation;
- private boolean firstDecode = true;
private AMQMethodBodyFactory _bodyFactory;
- private ByteBuffer _remainingBuf;
-
+ private List<ByteArrayInputStream> _remainingBufs = new ArrayList<ByteArrayInputStream>();
+
/**
* Creates a new AMQP decoder.
*
@@ -84,98 +76,7 @@ public class AMQDecoder extends CumulativeProtocolDecoder
_bodyFactory = new AMQMethodBodyFactory(session);
}
- /**
- * Delegates decoding AMQP from the data buffer that Mina has retrieved from the wire, to the data or protocol
- * intiation decoders.
- *
- * @param session The Mina session.
- * @param in The raw byte buffer.
- * @param out The Mina object output gatherer to write decoded objects to.
- *
- * @return <tt>true</tt> if the data was decoded, <tt>false<tt> if more is needed and the data should accumulate.
- *
- * @throws Exception If the data cannot be decoded for any reason.
- */
- protected boolean doDecode(IoSession session, ByteBuffer in, ProtocolDecoderOutput out) throws Exception
- {
-
- boolean decoded;
- if (_expectProtocolInitiation
- || (firstDecode
- && (in.remaining() > 0)
- && (in.get(in.position()) == (byte)'A')))
- {
- decoded = doDecodePI(session, in, out);
- }
- else
- {
- decoded = doDecodeDataBlock(session, in, out);
- }
- if(firstDecode && decoded)
- {
- firstDecode = false;
- }
- return decoded;
- }
-
- /**
- * Decodes AMQP data, delegating the decoding to an {@link AMQDataBlockDecoder}.
- *
- * @param session The Mina session.
- * @param in The raw byte buffer.
- * @param out The Mina object output gatherer to write decoded objects to.
- *
- * @return <tt>true</tt> if the data was decoded, <tt>false<tt> if more is needed and the data should accumulate.
- *
- * @throws Exception If the data cannot be decoded for any reason.
- */
- protected boolean doDecodeDataBlock(IoSession session, ByteBuffer in, ProtocolDecoderOutput out) throws Exception
- {
- int pos = in.position();
- boolean enoughData = _dataBlockDecoder.decodable(in.buf());
- in.position(pos);
- if (!enoughData)
- {
- // returning false means it will leave the contents in the buffer and
- // call us again when more data has been read
- return false;
- }
- else
- {
- _dataBlockDecoder.decode(session, in, out);
-
- return true;
- }
- }
-
- /**
- * Decodes an AMQP initiation, delegating the decoding to a {@link ProtocolInitiation.Decoder}.
- *
- * @param session The Mina session.
- * @param in The raw byte buffer.
- * @param out The Mina object output gatherer to write decoded objects to.
- *
- * @return <tt>true</tt> if the data was decoded, <tt>false<tt> if more is needed and the data should accumulate.
- *
- * @throws Exception If the data cannot be decoded for any reason.
- */
- private boolean doDecodePI(IoSession session, ByteBuffer in, ProtocolDecoderOutput out) throws Exception
- {
- boolean enoughData = _piDecoder.decodable(in.buf());
- if (!enoughData)
- {
- // returning false means it will leave the contents in the buffer and
- // call us again when more data has been read
- return false;
- }
- else
- {
- ProtocolInitiation pi = new ProtocolInitiation(in.buf());
- out.write(pi);
- return true;
- }
- }
/**
* Sets the protocol initation flag, that determines whether decoding is handled by the data decoder of the protocol
@@ -189,151 +90,168 @@ public class AMQDecoder extends CumulativeProtocolDecoder
_expectProtocolInitiation = expectProtocolInitiation;
}
-
- /**
- * Cumulates content of <tt>in</tt> into internal buffer and forwards
- * decoding request to {@link #doDecode(IoSession, ByteBuffer, ProtocolDecoderOutput)}.
- * <tt>doDecode()</tt> is invoked repeatedly until it returns <tt>false</tt>
- * and the cumulative buffer is compacted after decoding ends.
- *
- * @throws IllegalStateException if your <tt>doDecode()</tt> returned
- * <tt>true</tt> not consuming the cumulative buffer.
- */
- public void decode( IoSession session, ByteBuffer in,
- ProtocolDecoderOutput out ) throws Exception
+ private class RemainingByteArrayInputStream extends InputStream
{
- ByteBuffer buf = ( ByteBuffer ) session.getAttribute( BUFFER );
- // if we have a session buffer, append data to that otherwise
- // use the buffer read from the network directly
- if( buf != null )
- {
- buf.put( in );
- buf.flip();
- }
- else
+ private int _currentListPos;
+ private int _markPos;
+
+
+ @Override
+ public int read() throws IOException
{
- buf = in;
+ ByteArrayInputStream currentStream = _remainingBufs.get(_currentListPos);
+ if(currentStream.available() > 0)
+ {
+ return currentStream.read();
+ }
+ else if((_currentListPos == _remainingBufs.size())
+ || (++_currentListPos == _remainingBufs.size()))
+ {
+ return -1;
+ }
+ else
+ {
+
+ ByteArrayInputStream stream = _remainingBufs.get(_currentListPos);
+ stream.mark(0);
+ return stream.read();
+ }
}
- for( ;; )
+ @Override
+ public int read(final byte[] b, final int off, final int len) throws IOException
{
- int oldPos = buf.position();
- boolean decoded = doDecode( session, buf, out );
- if( decoded )
+
+ if(_currentListPos == _remainingBufs.size())
{
- if( buf.position() == oldPos )
+ return -1;
+ }
+ else
+ {
+ ByteArrayInputStream currentStream = _remainingBufs.get(_currentListPos);
+ final int available = currentStream.available();
+ int read = currentStream.read(b, off, len > available ? available : len);
+ if(read < len)
{
- throw new IllegalStateException(
- "doDecode() can't return true when buffer is not consumed." );
+ if(_currentListPos++ != _remainingBufs.size())
+ {
+ _remainingBufs.get(_currentListPos).mark(0);
+ }
+ int correctRead = read == -1 ? 0 : read;
+ int subRead = read(b, off+correctRead, len-correctRead);
+ if(subRead == -1)
+ {
+ return read;
+ }
+ else
+ {
+ return correctRead+subRead;
+ }
}
-
- if( !buf.hasRemaining() )
+ else
{
- break;
+ return len;
}
}
- else
- {
- break;
- }
}
- // if there is any data left that cannot be decoded, we store
- // it in a buffer in the session and next time this decoder is
- // invoked the session buffer gets appended to
- if ( buf.hasRemaining() )
+ @Override
+ public int available() throws IOException
{
- storeRemainingInSession( buf, session );
+ int total = 0;
+ for(int i = _currentListPos; i < _remainingBufs.size(); i++)
+ {
+ total += _remainingBufs.get(i).available();
+ }
+ return total;
}
- else
+
+ @Override
+ public void mark(final int readlimit)
{
- removeSessionBuffer( session );
+ _markPos = _currentListPos;
+ final ByteArrayInputStream stream = _remainingBufs.get(_currentListPos);
+ if(stream != null)
+ {
+ stream.mark(readlimit);
+ }
}
- }
-
- /**
- * Releases the cumulative buffer used by the specified <tt>session</tt>.
- * Please don't forget to call <tt>super.dispose( session )</tt> when
- * you override this method.
- */
- public void dispose( IoSession session ) throws Exception
- {
- removeSessionBuffer( session );
- }
- private void removeSessionBuffer(IoSession session)
- {
- ByteBuffer buf = ( ByteBuffer ) session.getAttribute( BUFFER );
- if( buf != null )
+ @Override
+ public void reset() throws IOException
{
- buf.release();
- session.removeAttribute( BUFFER );
+ _currentListPos = _markPos;
+ final int size = _remainingBufs.size();
+ if(_currentListPos < size)
+ {
+ _remainingBufs.get(_currentListPos).reset();
+ }
+ for(int i = _currentListPos+1; i<size; i++)
+ {
+ _remainingBufs.get(i).reset();
+ }
}
}
- private static final SimpleByteBufferAllocator SIMPLE_BYTE_BUFFER_ALLOCATOR = new SimpleByteBufferAllocator();
-
- private void storeRemainingInSession(ByteBuffer buf, IoSession session)
- {
- ByteBuffer remainingBuf = SIMPLE_BYTE_BUFFER_ALLOCATOR.allocate( buf.remaining(), false );
- remainingBuf.setAutoExpand( true );
- remainingBuf.put( buf );
- session.setAttribute( BUFFER, remainingBuf );
- }
- public ArrayList<AMQDataBlock> decodeBuffer(java.nio.ByteBuffer buf) throws AMQFrameDecodingException, AMQProtocolVersionException
+ public ArrayList<AMQDataBlock> decodeBuffer(ByteBuffer buf) throws AMQFrameDecodingException, AMQProtocolVersionException, IOException
{
// get prior remaining data from accumulator
ArrayList<AMQDataBlock> dataBlocks = new ArrayList<AMQDataBlock>();
- ByteBuffer msg;
- // if we have a session buffer, append data to that otherwise
- // use the buffer read from the network directly
- if( _remainingBuf != null )
+ DataInputStream msg;
+
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(buf.array(),buf.arrayOffset()+buf.position(), buf.remaining());
+ if(!_remainingBufs.isEmpty())
{
- _remainingBuf.put(buf);
- _remainingBuf.flip();
- msg = _remainingBuf;
+ _remainingBufs.add(bais);
+ msg = new DataInputStream(new RemainingByteArrayInputStream());
}
else
{
- msg = ByteBuffer.wrap(buf);
+ msg = new DataInputStream(bais);
}
-
- if (_expectProtocolInitiation
- || (firstDecode
- && (msg.remaining() > 0)
- && (msg.get(msg.position()) == (byte)'A')))
- {
- if (_piDecoder.decodable(msg.buf()))
- {
- dataBlocks.add(new ProtocolInitiation(msg.buf()));
- }
- }
- else
+
+ boolean enoughData = true;
+ while (enoughData)
{
- boolean enoughData = true;
- while (enoughData)
+ if(!_expectProtocolInitiation)
{
- int pos = msg.position();
-
enoughData = _dataBlockDecoder.decodable(msg);
- msg.position(pos);
if (enoughData)
{
dataBlocks.add(_dataBlockDecoder.createAndPopulateFrame(_bodyFactory, msg));
}
- else
+ }
+ else
+ {
+ enoughData = _piDecoder.decodable(msg);
+ if (enoughData)
{
- _remainingBuf = SIMPLE_BYTE_BUFFER_ALLOCATOR.allocate(msg.remaining(), false);
- _remainingBuf.setAutoExpand(true);
- _remainingBuf.put(msg);
+ dataBlocks.add(new ProtocolInitiation(msg));
+ }
+
+ }
+
+ if(!enoughData)
+ {
+ if(!_remainingBufs.isEmpty())
+ {
+ _remainingBufs.remove(_remainingBufs.size()-1);
+ ListIterator<ByteArrayInputStream> iterator = _remainingBufs.listIterator();
+ while(iterator.hasNext() && iterator.next().available() == 0)
+ {
+ iterator.remove();
+ }
+ }
+ if(bais.available()!=0)
+ {
+ byte[] remaining = new byte[bais.available()];
+ bais.read(remaining);
+ _remainingBufs.add(new ByteArrayInputStream(remaining));
}
}
- }
- if(firstDecode && dataBlocks.size() > 0)
- {
- firstDecode = false;
}
return dataBlocks;
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQEncoder.java b/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQEncoder.java
deleted file mode 100644
index 53f48ae1c8..0000000000
--- a/qpid/java/common/src/main/java/org/apache/qpid/codec/AMQEncoder.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.codec;
-
-import org.apache.mina.common.IoSession;
-import org.apache.mina.filter.codec.ProtocolEncoder;
-import org.apache.mina.filter.codec.ProtocolEncoderOutput;
-
-import org.apache.qpid.framing.AMQDataBlockEncoder;
-
-/**
- * AMQEncoder delegates encoding of AMQP to a data encoder.
- *
- * <p/><table id="crc"><caption>CRC Card</caption>
- * <tr><th> Responsibilities <th> Collaborations
- * <tr><td> Delegate AMQP encoding. <td> {@link AMQDataBlockEncoder}
- * </table>
- *
- * @todo This class just delegates to another, so seems to be pointless. Unless it is going to handle some
- * responsibilities in the future, then drop it.
- */
-public class AMQEncoder implements ProtocolEncoder
-{
- /** The data encoder that is delegated to. */
- private AMQDataBlockEncoder _dataBlockEncoder = new AMQDataBlockEncoder();
-
- /**
- * Encodes AMQP.
- *
- * @param session The Mina session.
- * @param message The data object to encode.
- * @param out The Mina writer to output the raw byte data to.
- *
- * @throws Exception If the data cannot be encoded for any reason.
- */
- public void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception
- {
- _dataBlockEncoder.encode(session, message, out);
- }
-
- /**
- * Does nothing. Called by Mina to allow this to clean up resources when it is no longer needed.
- *
- * @param session The Mina session.
- */
- public void dispose(IoSession session)
- { }
-}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java b/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java
index 5fa14cf103..62ded5b2d8 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/configuration/ClientProperties.java
@@ -23,7 +23,7 @@ package org.apache.qpid.configuration;
*/
public class ClientProperties
{
-
+
/**
* Currently with Qpid it is not possible to change the client ID.
* If one is not specified upon connection construction, an id is generated automatically.
@@ -68,38 +68,50 @@ public class ClientProperties
* by the broker in TuneOK it will be used as the heartbeat interval.
* If not a warning will be printed and the max value specified for
* heartbeat in TuneOK will be used
- *
+ *
* The default idle timeout is set to 120 secs
*/
public static final String IDLE_TIMEOUT_PROP_NAME = "idle_timeout";
public static final long DEFAULT_IDLE_TIMEOUT = 120000;
-
+
public static final String HEARTBEAT = "qpid.heartbeat";
public static final int HEARTBEAT_DEFAULT = 120;
-
+
/**
* This value will be used to determine the default destination syntax type.
* Currently the two types are Binding URL (java only) and the Addressing format (used by
- * all clients).
+ * all clients).
*/
public static final String DEST_SYNTAX = "qpid.dest_syntax";
-
+
public static final String USE_LEGACY_MAP_MESSAGE_FORMAT = "qpid.use_legacy_map_message";
public static final String AMQP_VERSION = "qpid.amqp.version";
-
- private static ClientProperties _instance = new ClientProperties();
-
+
+ public static final String QPID_VERIFY_CLIENT_ID = "qpid.verify_client_id";
+
+ /**
+ * System properties to change the default timeout used during
+ * synchronous operations.
+ */
+ public static final String QPID_SYNC_OP_TIMEOUT = "qpid.sync_op_timeout";
+ public static final String AMQJ_DEFAULT_SYNCWRITE_TIMEOUT = "amqj.default_syncwrite_timeout";
+
+ /**
+ * A default timeout value for synchronous operations
+ */
+ public static final int DEFAULT_SYNC_OPERATION_TIMEOUT = 60000;
+
/*
- public static final QpidProperty<Boolean> IGNORE_SET_CLIENTID_PROP_NAME =
+ public static final QpidProperty<Boolean> IGNORE_SET_CLIENTID_PROP_NAME =
QpidProperty.booleanProperty(false,"qpid.ignore_set_client_id","ignore_setclientID");
-
+
public static final QpidProperty<Boolean> SYNC_PERSISTENT_PROP_NAME =
QpidProperty.booleanProperty(false,"qpid.sync_persistence","sync_persistence");
-
-
+
+
public static final QpidProperty<Integer> MAX_PREFETCH_PROP_NAME =
QpidProperty.intProperty(500,"qpid.max_prefetch","max_prefetch"); */
-
-
+
+
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQBody.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQBody.java
index fe04155bb8..ebdad12178 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQBody.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQBody.java
@@ -20,7 +20,9 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
import org.apache.qpid.AMQException;
@@ -34,7 +36,7 @@ public interface AMQBody
*/
public abstract int getSize();
- public void writePayload(ByteBuffer buffer);
+ public void writePayload(DataOutputStream buffer) throws IOException;
- void handle(final int channelId, final AMQVersionAwareProtocolSession amqMinaProtocolSession) throws AMQException;
+ void handle(final int channelId, final AMQVersionAwareProtocolSession amqProtocolSession) throws AMQException;
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlock.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlock.java
index a2fc3a03ef..00c1f5aae5 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlock.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlock.java
@@ -20,7 +20,10 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
/**
* A data block represents something that has a size in bytes and the ability to write itself to a byte
@@ -39,25 +42,6 @@ public abstract class AMQDataBlock implements EncodableAMQDataBlock
* Writes the datablock to the specified buffer.
* @param buffer
*/
- public abstract void writePayload(ByteBuffer buffer);
-
- public ByteBuffer toByteBuffer()
- {
- final ByteBuffer buffer = ByteBuffer.allocate((int)getSize());
-
- writePayload(buffer);
- buffer.flip();
- return buffer;
- }
-
- public java.nio.ByteBuffer toNioByteBuffer()
- {
- final java.nio.ByteBuffer buffer = java.nio.ByteBuffer.allocate((int) getSize());
-
- ByteBuffer buf = ByteBuffer.wrap(buffer);
- writePayload(buf);
- buffer.flip();
- return buffer;
- }
+ public abstract void writePayload(DataOutputStream buffer) throws IOException;
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockDecoder.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockDecoder.java
index 228867b2b0..2165cadd14 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockDecoder.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockDecoder.java
@@ -20,18 +20,14 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoSession;
-import org.apache.mina.filter.codec.ProtocolDecoderOutput;
-
-import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.DataInputStream;
+import java.io.IOException;
+
public class AMQDataBlockDecoder
{
- private static final String SESSION_METHOD_BODY_FACTORY = "QPID_SESSION_METHOD_BODY_FACTORY";
private static final BodyFactory[] _bodiesSupported = new BodyFactory[Byte.MAX_VALUE];
@@ -47,27 +43,32 @@ public class AMQDataBlockDecoder
public AMQDataBlockDecoder()
{ }
- public boolean decodable(java.nio.ByteBuffer in) throws AMQFrameDecodingException
+ public boolean decodable(DataInputStream in) throws AMQFrameDecodingException, IOException
{
- final int remainingAfterAttributes = in.remaining() - (1 + 2 + 4 + 1);
+ final int remainingAfterAttributes = in.available() - (1 + 2 + 4 + 1);
// type, channel, body length and end byte
if (remainingAfterAttributes < 0)
{
return false;
}
- in.position(in.position() + 1 + 2);
+ in.mark(8);
+ in.skip(1 + 2);
+
+
// Get an unsigned int, lifted from MINA ByteBuffer getUnsignedInt()
- final long bodySize = in.getInt() & 0xffffffffL;
+ final long bodySize = in.readInt() & 0xffffffffL;
+
+ in.reset();
return (remainingAfterAttributes >= bodySize);
}
- public AMQFrame createAndPopulateFrame(AMQMethodBodyFactory methodBodyFactory, ByteBuffer in)
- throws AMQFrameDecodingException, AMQProtocolVersionException
+ public AMQFrame createAndPopulateFrame(AMQMethodBodyFactory methodBodyFactory, DataInputStream in)
+ throws AMQFrameDecodingException, AMQProtocolVersionException, IOException
{
- final byte type = in.get();
+ final byte type = in.readByte();
BodyFactory bodyFactory;
if (type == AMQMethodBody.TYPE)
@@ -84,8 +85,8 @@ public class AMQDataBlockDecoder
throw new AMQFrameDecodingException(null, "Unsupported frame type: " + type, null);
}
- final int channel = in.getUnsignedShort();
- final long bodySize = in.getUnsignedInt();
+ final int channel = in.readUnsignedShort();
+ final long bodySize = EncodingUtils.readUnsignedInteger(in);
// bodySize can be zero
if ((channel < 0) || (bodySize < 0))
@@ -96,7 +97,7 @@ public class AMQDataBlockDecoder
AMQFrame frame = new AMQFrame(in, channel, bodySize, bodyFactory);
- byte marker = in.get();
+ byte marker = in.readByte();
if ((marker & 0xFF) != 0xCE)
{
throw new AMQFrameDecodingException(null, "End of frame marker not found. Read " + marker + " length=" + bodySize
@@ -106,26 +107,4 @@ public class AMQDataBlockDecoder
return frame;
}
- public void decode(IoSession session, ByteBuffer in, ProtocolDecoderOutput out) throws Exception
- {
- AMQMethodBodyFactory bodyFactory = (AMQMethodBodyFactory) session.getAttribute(SESSION_METHOD_BODY_FACTORY);
- if (bodyFactory == null)
- {
- AMQVersionAwareProtocolSession protocolSession = (AMQVersionAwareProtocolSession) session.getAttachment();
- bodyFactory = new AMQMethodBodyFactory(protocolSession);
- session.setAttribute(SESSION_METHOD_BODY_FACTORY, bodyFactory);
- }
-
- out.write(createAndPopulateFrame(bodyFactory, in));
- }
-
- public boolean decodable(ByteBuffer msg) throws AMQFrameDecodingException
- {
- return decodable(msg.buf());
- }
-
- public AMQDataBlock createAndPopulateFrame(AMQMethodBodyFactory factory, java.nio.ByteBuffer msg) throws AMQProtocolVersionException, AMQFrameDecodingException
- {
- return createAndPopulateFrame(factory, ByteBuffer.wrap(msg));
- }
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockEncoder.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockEncoder.java
deleted file mode 100644
index 374644b4f2..0000000000
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQDataBlockEncoder.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.framing;
-
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoSession;
-import org.apache.mina.filter.codec.ProtocolEncoderOutput;
-import org.apache.mina.filter.codec.demux.MessageEncoder;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.Collections;
-import java.util.Set;
-
-public final class AMQDataBlockEncoder implements MessageEncoder
-{
- private static final Logger _logger = LoggerFactory.getLogger(AMQDataBlockEncoder.class);
-
- private final Set _messageTypes = Collections.singleton(EncodableAMQDataBlock.class);
-
- public AMQDataBlockEncoder()
- { }
-
- public void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception
- {
- final AMQDataBlock frame = (AMQDataBlock) message;
-
- final ByteBuffer buffer = frame.toByteBuffer();
-
- if (_logger.isDebugEnabled())
- {
- _logger.debug("Encoded frame byte-buffer is '" + EncodingUtils.convertToHexString(buffer) + "'");
- }
-
- out.write(buffer);
- }
-
- public Set getMessageTypes()
- {
- return _messageTypes;
- }
-}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrame.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrame.java
index 02a46f3748..6acf60a5b3 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrame.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQFrame.java
@@ -20,7 +20,9 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
public class AMQFrame extends AMQDataBlock implements EncodableAMQDataBlock
{
@@ -36,7 +38,7 @@ public class AMQFrame extends AMQDataBlock implements EncodableAMQDataBlock
_bodyFrame = bodyFrame;
}
- public AMQFrame(final ByteBuffer in, final int channel, final long bodySize, final BodyFactory bodyFactory) throws AMQFrameDecodingException
+ public AMQFrame(final DataInputStream in, final int channel, final long bodySize, final BodyFactory bodyFactory) throws AMQFrameDecodingException, IOException
{
this._channel = channel;
this._bodyFrame = bodyFactory.createBody(in,bodySize);
@@ -53,13 +55,13 @@ public class AMQFrame extends AMQDataBlock implements EncodableAMQDataBlock
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer) throws IOException
{
- buffer.put(_bodyFrame.getFrameType());
+ buffer.writeByte(_bodyFrame.getFrameType());
EncodingUtils.writeUnsignedShort(buffer, _channel);
EncodingUtils.writeUnsignedInteger(buffer, _bodyFrame.getSize());
_bodyFrame.writePayload(buffer);
- buffer.put(FRAME_END_BYTE);
+ buffer.writeByte(FRAME_END_BYTE);
}
public final int getChannel()
@@ -77,48 +79,48 @@ public class AMQFrame extends AMQDataBlock implements EncodableAMQDataBlock
return "Frame channelId: " + _channel + ", bodyFrame: " + String.valueOf(_bodyFrame);
}
- public static void writeFrame(ByteBuffer buffer, final int channel, AMQBody body)
+ public static void writeFrame(DataOutputStream buffer, final int channel, AMQBody body) throws IOException
{
- buffer.put(body.getFrameType());
+ buffer.writeByte(body.getFrameType());
EncodingUtils.writeUnsignedShort(buffer, channel);
EncodingUtils.writeUnsignedInteger(buffer, body.getSize());
body.writePayload(buffer);
- buffer.put(FRAME_END_BYTE);
+ buffer.writeByte(FRAME_END_BYTE);
}
- public static void writeFrames(ByteBuffer buffer, final int channel, AMQBody body1, AMQBody body2)
+ public static void writeFrames(DataOutputStream buffer, final int channel, AMQBody body1, AMQBody body2) throws IOException
{
- buffer.put(body1.getFrameType());
+ buffer.writeByte(body1.getFrameType());
EncodingUtils.writeUnsignedShort(buffer, channel);
EncodingUtils.writeUnsignedInteger(buffer, body1.getSize());
body1.writePayload(buffer);
- buffer.put(FRAME_END_BYTE);
- buffer.put(body2.getFrameType());
+ buffer.writeByte(FRAME_END_BYTE);
+ buffer.writeByte(body2.getFrameType());
EncodingUtils.writeUnsignedShort(buffer, channel);
EncodingUtils.writeUnsignedInteger(buffer, body2.getSize());
body2.writePayload(buffer);
- buffer.put(FRAME_END_BYTE);
+ buffer.writeByte(FRAME_END_BYTE);
}
- public static void writeFrames(ByteBuffer buffer, final int channel, AMQBody body1, AMQBody body2, AMQBody body3)
+ public static void writeFrames(DataOutputStream buffer, final int channel, AMQBody body1, AMQBody body2, AMQBody body3) throws IOException
{
- buffer.put(body1.getFrameType());
+ buffer.writeByte(body1.getFrameType());
EncodingUtils.writeUnsignedShort(buffer, channel);
EncodingUtils.writeUnsignedInteger(buffer, body1.getSize());
body1.writePayload(buffer);
- buffer.put(FRAME_END_BYTE);
- buffer.put(body2.getFrameType());
+ buffer.writeByte(FRAME_END_BYTE);
+ buffer.writeByte(body2.getFrameType());
EncodingUtils.writeUnsignedShort(buffer, channel);
EncodingUtils.writeUnsignedInteger(buffer, body2.getSize());
body2.writePayload(buffer);
- buffer.put(FRAME_END_BYTE);
- buffer.put(body3.getFrameType());
+ buffer.writeByte(FRAME_END_BYTE);
+ buffer.writeByte(body3.getFrameType());
EncodingUtils.writeUnsignedShort(buffer, channel);
EncodingUtils.writeUnsignedInteger(buffer, body3.getSize());
body3.writePayload(buffer);
- buffer.put(FRAME_END_BYTE);
+ buffer.writeByte(FRAME_END_BYTE);
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java
index 4763b22290..a076d0e5a1 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBody.java
@@ -20,12 +20,14 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
import org.apache.qpid.AMQChannelException;
import org.apache.qpid.AMQConnectionException;
import org.apache.qpid.AMQException;
import org.apache.qpid.protocol.AMQConstant;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
public interface AMQMethodBody extends AMQBody
{
public static final byte TYPE = 1;
@@ -43,12 +45,12 @@ public interface AMQMethodBody extends AMQBody
/** @return unsigned short */
public int getMethod();
- public void writeMethodPayload(ByteBuffer buffer);
+ public void writeMethodPayload(DataOutputStream buffer) throws IOException;
public int getSize();
- public void writePayload(ByteBuffer buffer);
+ public void writePayload(DataOutputStream buffer) throws IOException;
//public abstract void populateMethodBodyFromBuffer(ByteBuffer buffer) throws AMQFrameDecodingException;
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java
index 1a7022c11b..7fceb082ee 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyFactory.java
@@ -20,13 +20,14 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
-
import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.DataInputStream;
+import java.io.IOException;
+
public class AMQMethodBodyFactory implements BodyFactory
{
private static final Logger _log = LoggerFactory.getLogger(AMQMethodBodyFactory.class);
@@ -38,7 +39,7 @@ public class AMQMethodBodyFactory implements BodyFactory
_protocolSession = protocolSession;
}
- public AMQBody createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException
+ public AMQBody createBody(DataInputStream in, long bodySize) throws AMQFrameDecodingException, IOException
{
return _protocolSession.getMethodRegistry().convertToBody(in, bodySize);
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyImpl.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyImpl.java
index cd3d721065..c73c1df701 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyImpl.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyImpl.java
@@ -21,13 +21,16 @@ package org.apache.qpid.framing;
*
*/
-import org.apache.mina.common.ByteBuffer;
import org.apache.qpid.AMQChannelException;
import org.apache.qpid.AMQConnectionException;
import org.apache.qpid.AMQException;
import org.apache.qpid.protocol.AMQConstant;
import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
public abstract class AMQMethodBodyImpl implements AMQMethodBody
{
public static final byte TYPE = 1;
@@ -98,7 +101,7 @@ public abstract class AMQMethodBodyImpl implements AMQMethodBody
return 2 + 2 + getBodySize();
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer) throws IOException
{
EncodingUtils.writeUnsignedShort(buffer, getClazz());
EncodingUtils.writeUnsignedShort(buffer, getMethod());
@@ -106,12 +109,12 @@ public abstract class AMQMethodBodyImpl implements AMQMethodBody
}
- protected byte readByte(ByteBuffer buffer)
+ protected byte readByte(DataInputStream buffer) throws IOException
{
- return buffer.get();
+ return buffer.readByte();
}
- protected AMQShortString readAMQShortString(ByteBuffer buffer)
+ protected AMQShortString readAMQShortString(DataInputStream buffer) throws IOException
{
return EncodingUtils.readAMQShortString(buffer);
}
@@ -121,27 +124,27 @@ public abstract class AMQMethodBodyImpl implements AMQMethodBody
return EncodingUtils.encodedShortStringLength(string);
}
- protected void writeByte(ByteBuffer buffer, byte b)
+ protected void writeByte(DataOutputStream buffer, byte b) throws IOException
{
- buffer.put(b);
+ buffer.writeByte(b);
}
- protected void writeAMQShortString(ByteBuffer buffer, AMQShortString string)
+ protected void writeAMQShortString(DataOutputStream buffer, AMQShortString string) throws IOException
{
EncodingUtils.writeShortStringBytes(buffer, string);
}
- protected int readInt(ByteBuffer buffer)
+ protected int readInt(DataInputStream buffer) throws IOException
{
- return buffer.getInt();
+ return buffer.readInt();
}
- protected void writeInt(ByteBuffer buffer, int i)
+ protected void writeInt(DataOutputStream buffer, int i) throws IOException
{
- buffer.putInt(i);
+ buffer.writeInt(i);
}
- protected FieldTable readFieldTable(ByteBuffer buffer) throws AMQFrameDecodingException
+ protected FieldTable readFieldTable(DataInputStream buffer) throws AMQFrameDecodingException, IOException
{
return EncodingUtils.readFieldTable(buffer);
}
@@ -151,19 +154,19 @@ public abstract class AMQMethodBodyImpl implements AMQMethodBody
return EncodingUtils.encodedFieldTableLength(table); //To change body of created methods use File | Settings | File Templates.
}
- protected void writeFieldTable(ByteBuffer buffer, FieldTable table)
+ protected void writeFieldTable(DataOutputStream buffer, FieldTable table) throws IOException
{
EncodingUtils.writeFieldTableBytes(buffer, table);
}
- protected long readLong(ByteBuffer buffer)
+ protected long readLong(DataInputStream buffer) throws IOException
{
- return buffer.getLong();
+ return buffer.readLong();
}
- protected void writeLong(ByteBuffer buffer, long l)
+ protected void writeLong(DataOutputStream buffer, long l) throws IOException
{
- buffer.putLong(l);
+ buffer.writeLong(l);
}
protected int getSizeOf(byte[] response)
@@ -171,87 +174,86 @@ public abstract class AMQMethodBodyImpl implements AMQMethodBody
return (response == null) ? 4 : response.length + 4;
}
- protected void writeBytes(ByteBuffer buffer, byte[] data)
+ protected void writeBytes(DataOutputStream buffer, byte[] data) throws IOException
{
EncodingUtils.writeBytes(buffer,data);
}
- protected byte[] readBytes(ByteBuffer buffer)
+ protected byte[] readBytes(DataInputStream buffer) throws IOException
{
return EncodingUtils.readBytes(buffer);
}
- protected short readShort(ByteBuffer buffer)
+ protected short readShort(DataInputStream buffer) throws IOException
{
return EncodingUtils.readShort(buffer);
}
- protected void writeShort(ByteBuffer buffer, short s)
+ protected void writeShort(DataOutputStream buffer, short s) throws IOException
{
EncodingUtils.writeShort(buffer, s);
}
- protected Content readContent(ByteBuffer buffer)
+ protected Content readContent(DataInputStream buffer)
{
- return null; //To change body of created methods use File | Settings | File Templates.
+ return null;
}
protected int getSizeOf(Content body)
{
- return 0; //To change body of created methods use File | Settings | File Templates.
+ return 0;
}
- protected void writeContent(ByteBuffer buffer, Content body)
+ protected void writeContent(DataOutputStream buffer, Content body)
{
- //To change body of created methods use File | Settings | File Templates.
}
- protected byte readBitfield(ByteBuffer buffer)
+ protected byte readBitfield(DataInputStream buffer) throws IOException
{
- return readByte(buffer); //To change body of created methods use File | Settings | File Templates.
+ return readByte(buffer);
}
- protected int readUnsignedShort(ByteBuffer buffer)
+ protected int readUnsignedShort(DataInputStream buffer) throws IOException
{
- return buffer.getUnsignedShort(); //To change body of created methods use File | Settings | File Templates.
+ return buffer.readUnsignedShort();
}
- protected void writeBitfield(ByteBuffer buffer, byte bitfield0)
+ protected void writeBitfield(DataOutputStream buffer, byte bitfield0) throws IOException
{
- buffer.put(bitfield0);
+ buffer.writeByte(bitfield0);
}
- protected void writeUnsignedShort(ByteBuffer buffer, int s)
+ protected void writeUnsignedShort(DataOutputStream buffer, int s) throws IOException
{
EncodingUtils.writeUnsignedShort(buffer, s);
}
- protected long readUnsignedInteger(ByteBuffer buffer)
+ protected long readUnsignedInteger(DataInputStream buffer) throws IOException
{
- return buffer.getUnsignedInt();
+ return EncodingUtils.readUnsignedInteger(buffer);
}
- protected void writeUnsignedInteger(ByteBuffer buffer, long i)
+ protected void writeUnsignedInteger(DataOutputStream buffer, long i) throws IOException
{
EncodingUtils.writeUnsignedInteger(buffer, i);
}
- protected short readUnsignedByte(ByteBuffer buffer)
+ protected short readUnsignedByte(DataInputStream buffer) throws IOException
{
- return buffer.getUnsigned();
+ return (short) buffer.readUnsignedByte();
}
- protected void writeUnsignedByte(ByteBuffer buffer, short unsignedByte)
+ protected void writeUnsignedByte(DataOutputStream buffer, short unsignedByte) throws IOException
{
EncodingUtils.writeUnsignedByte(buffer, unsignedByte);
}
- protected long readTimestamp(ByteBuffer buffer)
+ protected long readTimestamp(DataInputStream buffer) throws IOException
{
return EncodingUtils.readTimestamp(buffer);
}
- protected void writeTimestamp(ByteBuffer buffer, long t)
+ protected void writeTimestamp(DataOutputStream buffer, long t) throws IOException
{
EncodingUtils.writeTimestamp(buffer, t);
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyInstanceFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyInstanceFactory.java
index 0c61d9db3c..df4d8bdcb6 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyInstanceFactory.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodBodyInstanceFactory.java
@@ -21,10 +21,11 @@
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.IOException;
public abstract interface AMQMethodBodyInstanceFactory
{
- public AMQMethodBody newInstance(ByteBuffer buffer, long size) throws AMQFrameDecodingException;
+ public AMQMethodBody newInstance(DataInputStream buffer, long size) throws AMQFrameDecodingException, IOException;
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodFactory.java
deleted file mode 100644
index bfcc38ad60..0000000000
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQMethodFactory.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.framing;
-
-import org.apache.mina.common.ByteBuffer;
-
-
-public interface AMQMethodFactory
-{
-
- // Connection Methods
-
- ConnectionCloseBody createConnectionClose();
-
- // Access Methods
-
- AccessRequestBody createAccessRequest(boolean active, boolean exclusive, boolean passive, boolean read, AMQShortString realm, boolean write);
-
-
- // Tx Methods
-
- TxSelectBody createTxSelect();
-
- TxCommitBody createTxCommit();
-
- TxRollbackBody createTxRollback();
-
- // Channel Methods
-
- ChannelOpenBody createChannelOpen();
-
- ChannelCloseBody createChannelClose(int replyCode, AMQShortString replyText);
-
- ChannelFlowBody createChannelFlow(boolean active);
-
-
- // Exchange Methods
-
-
- ExchangeBoundBody createExchangeBound(AMQShortString exchangeName,
- AMQShortString queueName,
- AMQShortString routingKey);
-
- ExchangeDeclareBody createExchangeDeclare(AMQShortString name, AMQShortString type, int ticket);
-
-
- // Queue Methods
-
- QueueDeclareBody createQueueDeclare(AMQShortString name, FieldTable arguments, boolean autoDelete, boolean durable, boolean exclusive, boolean passive, int ticket);
-
- QueueBindBody createQueueBind(AMQShortString queueName, AMQShortString exchangeName, AMQShortString routingKey, FieldTable arguments, int ticket);
-
- QueueDeleteBody createQueueDelete(AMQShortString queueName, boolean ifEmpty, boolean ifUnused, int ticket);
-
-
- // Message Methods
-
- // In different versions of the protocol we change the class used for message transfer
- // abstract this out so the appropriate methods are created
- AMQMethodBody createRecover(boolean requeue);
-
- AMQMethodBody createConsumer(AMQShortString tag, AMQShortString queueName, FieldTable arguments, boolean noAck, boolean exclusive, boolean noLocal, int ticket);
-
- AMQMethodBody createConsumerCancel(AMQShortString consumerTag);
-
- AMQMethodBody createAcknowledge(long deliveryTag, boolean multiple);
-
- AMQMethodBody createRejectBody(long deliveryTag, boolean requeue);
-
- AMQMethodBody createMessageQos(int prefetchCount, int prefetchSize);
-
-}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java
index 2b9e2ffaba..cc9a33f4cf 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQShortString.java
@@ -21,11 +21,12 @@
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
import java.util.*;
import java.lang.ref.WeakReference;
@@ -199,27 +200,16 @@ public final class AMQShortString implements CharSequence, Comparable<AMQShortSt
}
- private AMQShortString(ByteBuffer data, final int length)
+ private AMQShortString(DataInputStream data, final int length) throws IOException
{
if (length > MAX_LENGTH)
{
throw new IllegalArgumentException("Cannot create AMQShortString with number of octets over 255!");
}
- if(data.isDirect() || data.isReadOnly())
- {
- byte[] dataBytes = new byte[length];
- data.get(dataBytes);
- _data = dataBytes;
- _offset = 0;
- }
- else
- {
-
- _data = data.array();
- _offset = data.arrayOffset() + data.position();
- data.skip(length);
-
- }
+ byte[] dataBytes = new byte[length];
+ data.read(dataBytes);
+ _data = dataBytes;
+ _offset = 0;
_length = length;
}
@@ -275,9 +265,9 @@ public final class AMQShortString implements CharSequence, Comparable<AMQShortSt
return new CharSubSequence(start, end);
}
- public static AMQShortString readFromBuffer(ByteBuffer buffer)
+ public static AMQShortString readFromBuffer(DataInputStream buffer) throws IOException
{
- final short length = buffer.getUnsigned();
+ final int length = buffer.readUnsignedByte();
if (length == 0)
{
return null;
@@ -303,13 +293,13 @@ public final class AMQShortString implements CharSequence, Comparable<AMQShortSt
}
}
- public void writeToBuffer(ByteBuffer buffer)
+ public void writeToBuffer(DataOutputStream buffer) throws IOException
{
final int size = length();
//buffer.setAutoExpand(true);
- buffer.put((byte) size);
- buffer.put(_data, _offset, size);
+ buffer.write((byte) size);
+ buffer.write(_data, _offset, size);
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQType.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQType.java
index 14fb63da03..f3da64e639 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQType.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQType.java
@@ -20,8 +20,9 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
-
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
import java.math.BigDecimal;
/**
@@ -60,12 +61,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeLongStringBytes(buffer, (String) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readLongString(buffer);
}
@@ -106,12 +107,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeUnsignedInteger(buffer, (Long) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readUnsignedInteger(buffer);
}
@@ -137,7 +138,7 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
BigDecimal bd = (BigDecimal) value;
@@ -150,7 +151,7 @@ public enum AMQType
EncodingUtils.writeInteger(buffer, unscaled);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
byte places = EncodingUtils.readByte(buffer);
@@ -182,12 +183,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeLong(buffer, (Long) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readLong(buffer);
}
@@ -246,7 +247,7 @@ public enum AMQType
* @param value An instance of the type.
* @param buffer The byte buffer to write it to.
*/
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
// Ensure that the value is a FieldTable.
if (!(value instanceof FieldTable))
@@ -267,7 +268,7 @@ public enum AMQType
*
* @return An instance of the type.
*/
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
try
{
@@ -301,10 +302,10 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer)
{ }
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer)
{
return null;
}
@@ -330,12 +331,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeLongstr(buffer, (byte[]) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readLongstr(buffer);
}
@@ -360,12 +361,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeLongStringBytes(buffer, (String) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readLongString(buffer);
}
@@ -391,12 +392,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeLongStringBytes(buffer, (String) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readLongString(buffer);
}
@@ -426,12 +427,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeBoolean(buffer, (Boolean) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readBoolean(buffer);
}
@@ -461,12 +462,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeChar(buffer, (Character) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readChar(buffer);
}
@@ -496,12 +497,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeByte(buffer, (Byte) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readByte(buffer);
}
@@ -535,12 +536,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeShort(buffer, (Short) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readShort(buffer);
}
@@ -577,12 +578,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeInteger(buffer, (Integer) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readInteger(buffer);
}
@@ -624,12 +625,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeLong(buffer, (Long) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readLong(buffer);
}
@@ -659,12 +660,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeFloat(buffer, (Float) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readFloat(buffer);
}
@@ -698,12 +699,12 @@ public enum AMQType
}
}
- public void writeValueImpl(Object value, ByteBuffer buffer)
+ public void writeValueImpl(Object value, DataOutputStream buffer) throws IOException
{
EncodingUtils.writeDouble(buffer, (Double) value);
}
- public Object readValueFromBuffer(ByteBuffer buffer)
+ public Object readValueFromBuffer(DataInputStream buffer) throws IOException
{
return EncodingUtils.readDouble(buffer);
}
@@ -770,9 +771,9 @@ public enum AMQType
* @param value An instance of the type.
* @param buffer The byte buffer to write it to.
*/
- public void writeToBuffer(Object value, ByteBuffer buffer)
+ public void writeToBuffer(Object value, DataOutputStream buffer) throws IOException
{
- buffer.put(identifier());
+ buffer.writeByte(identifier());
writeValueImpl(value, buffer);
}
@@ -782,7 +783,7 @@ public enum AMQType
* @param value An instance of the type.
* @param buffer The byte buffer to write it to.
*/
- abstract void writeValueImpl(Object value, ByteBuffer buffer);
+ abstract void writeValueImpl(Object value, DataOutputStream buffer) throws IOException;
/**
* Reads an instance of the type from a specified byte buffer.
@@ -791,5 +792,5 @@ public enum AMQType
*
* @return An instance of the type.
*/
- abstract Object readValueFromBuffer(ByteBuffer buffer);
+ abstract Object readValueFromBuffer(DataInputStream buffer) throws IOException;
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQTypedValue.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQTypedValue.java
index 647d531476..1dbedca362 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQTypedValue.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/AMQTypedValue.java
@@ -20,8 +20,9 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
-
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
import java.util.Date;
import java.util.Map;
import java.math.BigDecimal;
@@ -60,7 +61,7 @@ public class AMQTypedValue
_value = type.toNativeValue(value);
}
- private AMQTypedValue(AMQType type, ByteBuffer buffer)
+ private AMQTypedValue(AMQType type, DataInputStream buffer) throws IOException
{
_type = type;
_value = type.readValueFromBuffer(buffer);
@@ -76,7 +77,7 @@ public class AMQTypedValue
return _value;
}
- public void writeToBuffer(ByteBuffer buffer)
+ public void writeToBuffer(DataOutputStream buffer) throws IOException
{
_type.writeToBuffer(_value, buffer);
}
@@ -86,9 +87,9 @@ public class AMQTypedValue
return _type.getEncodingSize(_value);
}
- public static AMQTypedValue readFromBuffer(ByteBuffer buffer)
+ public static AMQTypedValue readFromBuffer(DataInputStream buffer) throws IOException
{
- AMQType type = AMQTypeMap.getType(buffer.get());
+ AMQType type = AMQTypeMap.getType(buffer.readByte());
return new AMQTypedValue(type, buffer);
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
index c7d89a9927..57622b5054 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/BasicContentHeaderProperties.java
@@ -20,7 +20,9 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -35,27 +37,6 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
private static final AMQShortString ZERO_STRING = null;
- /**
- * We store the encoded form when we decode the content header so that if we need to write it out without modifying
- * it we can do so without incurring the expense of reencoding it
- */
- private byte[] _encodedForm;
-
- /** Flag indicating whether the entire content header has been decoded yet */
- private boolean _decoded = true;
-
- /**
- * We have some optimisations for partial decoding for maximum performance. The headers are used in the broker for
- * routing in some cases so we can decode that separately.
- */
- private boolean _decodedHeaders = true;
-
- /**
- * We have some optimisations for partial decoding for maximum performance. The content type is used by all clients
- * to determine the message type
- */
- private boolean _decodedContentType = true;
-
private AMQShortString _contentType;
private AMQShortString _encoding;
@@ -86,10 +67,10 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
private int _propertyFlags = 0;
private static final int CONTENT_TYPE_MASK = 1 << 15;
- private static final int ENCONDING_MASK = 1 << 14;
+ private static final int ENCODING_MASK = 1 << 14;
private static final int HEADERS_MASK = 1 << 13;
private static final int DELIVERY_MODE_MASK = 1 << 12;
- private static final int PROPRITY_MASK = 1 << 11;
+ private static final int PRIORITY_MASK = 1 << 11;
private static final int CORRELATION_ID_MASK = 1 << 10;
private static final int REPLY_TO_MASK = 1 << 9;
private static final int EXPIRATION_MASK = 1 << 8;
@@ -101,34 +82,11 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
private static final int CLUSTER_ID_MASK = 1 << 2;
- /**
- * This is 0_10 specific. We use this property to check if some message properties have been changed.
- */
- private boolean _hasBeenUpdated = false;
-
- public boolean reset()
- {
- boolean result = _hasBeenUpdated;
- _hasBeenUpdated = false;
- return result;
- }
-
- public void updated()
- {
- _hasBeenUpdated = true;
- }
-
public BasicContentHeaderProperties()
{ }
public int getPropertyListSize()
{
- if (_encodedForm != null)
- {
- return _encodedForm.length;
- }
- else
- {
int size = 0;
if ((_propertyFlags & (CONTENT_TYPE_MASK)) > 0)
@@ -136,7 +94,7 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
size += EncodingUtils.encodedShortStringLength(_contentType);
}
- if ((_propertyFlags & ENCONDING_MASK) > 0)
+ if ((_propertyFlags & ENCODING_MASK) > 0)
{
size += EncodingUtils.encodedShortStringLength(_encoding);
}
@@ -151,7 +109,7 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
size += 1;
}
- if ((_propertyFlags & PROPRITY_MASK) > 0)
+ if ((_propertyFlags & PRIORITY_MASK) > 0)
{
size += 1;
}
@@ -209,23 +167,10 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
}
return size;
- }
- }
-
- private void clearEncodedForm()
- {
- if (!_decoded && (_encodedForm != null))
- {
- // decode();
- }
-
- _encodedForm = null;
}
public void setPropertyFlags(int propertyFlags)
{
- _hasBeenUpdated = true;
- clearEncodedForm();
_propertyFlags = propertyFlags;
}
@@ -234,94 +179,87 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
return _propertyFlags;
}
- public void writePropertyListPayload(ByteBuffer buffer)
+ public void writePropertyListPayload(DataOutputStream buffer) throws IOException
{
- if (_encodedForm != null)
+ if ((_propertyFlags & (CONTENT_TYPE_MASK)) != 0)
{
- buffer.put(_encodedForm);
+ EncodingUtils.writeShortStringBytes(buffer, _contentType);
}
- else
+
+ if ((_propertyFlags & ENCODING_MASK) != 0)
{
- if ((_propertyFlags & (CONTENT_TYPE_MASK)) != 0)
- {
- EncodingUtils.writeShortStringBytes(buffer, _contentType);
- }
+ EncodingUtils.writeShortStringBytes(buffer, _encoding);
+ }
- if ((_propertyFlags & ENCONDING_MASK) != 0)
- {
- EncodingUtils.writeShortStringBytes(buffer, _encoding);
- }
+ if ((_propertyFlags & HEADERS_MASK) != 0)
+ {
+ EncodingUtils.writeFieldTableBytes(buffer, _headers);
+ }
- if ((_propertyFlags & HEADERS_MASK) != 0)
- {
- EncodingUtils.writeFieldTableBytes(buffer, _headers);
- }
+ if ((_propertyFlags & DELIVERY_MODE_MASK) != 0)
+ {
+ buffer.writeByte(_deliveryMode);
+ }
- if ((_propertyFlags & DELIVERY_MODE_MASK) != 0)
- {
- buffer.put(_deliveryMode);
- }
+ if ((_propertyFlags & PRIORITY_MASK) != 0)
+ {
+ buffer.writeByte(_priority);
+ }
- if ((_propertyFlags & PROPRITY_MASK) != 0)
- {
- buffer.put(_priority);
- }
+ if ((_propertyFlags & CORRELATION_ID_MASK) != 0)
+ {
+ EncodingUtils.writeShortStringBytes(buffer, _correlationId);
+ }
- if ((_propertyFlags & CORRELATION_ID_MASK) != 0)
- {
- EncodingUtils.writeShortStringBytes(buffer, _correlationId);
- }
+ if ((_propertyFlags & REPLY_TO_MASK) != 0)
+ {
+ EncodingUtils.writeShortStringBytes(buffer, _replyTo);
+ }
- if ((_propertyFlags & REPLY_TO_MASK) != 0)
+ if ((_propertyFlags & EXPIRATION_MASK) != 0)
+ {
+ if (_expiration == 0L)
{
- EncodingUtils.writeShortStringBytes(buffer, _replyTo);
+ EncodingUtils.writeShortStringBytes(buffer, ZERO_STRING);
}
-
- if ((_propertyFlags & EXPIRATION_MASK) != 0)
+ else
{
- if (_expiration == 0L)
- {
- EncodingUtils.writeShortStringBytes(buffer, ZERO_STRING);
- }
- else
- {
- EncodingUtils.writeShortStringBytes(buffer, String.valueOf(_expiration));
- }
+ EncodingUtils.writeShortStringBytes(buffer, String.valueOf(_expiration));
}
+ }
- if ((_propertyFlags & MESSAGE_ID_MASK) != 0)
- {
- EncodingUtils.writeShortStringBytes(buffer, _messageId);
- }
+ if ((_propertyFlags & MESSAGE_ID_MASK) != 0)
+ {
+ EncodingUtils.writeShortStringBytes(buffer, _messageId);
+ }
- if ((_propertyFlags & TIMESTAMP_MASK) != 0)
- {
- EncodingUtils.writeTimestamp(buffer, _timestamp);
- }
+ if ((_propertyFlags & TIMESTAMP_MASK) != 0)
+ {
+ EncodingUtils.writeTimestamp(buffer, _timestamp);
+ }
- if ((_propertyFlags & TYPE_MASK) != 0)
- {
- EncodingUtils.writeShortStringBytes(buffer, _type);
- }
+ if ((_propertyFlags & TYPE_MASK) != 0)
+ {
+ EncodingUtils.writeShortStringBytes(buffer, _type);
+ }
- if ((_propertyFlags & USER_ID_MASK) != 0)
- {
- EncodingUtils.writeShortStringBytes(buffer, _userId);
- }
+ if ((_propertyFlags & USER_ID_MASK) != 0)
+ {
+ EncodingUtils.writeShortStringBytes(buffer, _userId);
+ }
- if ((_propertyFlags & APPLICATION_ID_MASK) != 0)
- {
- EncodingUtils.writeShortStringBytes(buffer, _appId);
- }
+ if ((_propertyFlags & APPLICATION_ID_MASK) != 0)
+ {
+ EncodingUtils.writeShortStringBytes(buffer, _appId);
+ }
- if ((_propertyFlags & CLUSTER_ID_MASK) != 0)
- {
- EncodingUtils.writeShortStringBytes(buffer, _clusterId);
- }
+ if ((_propertyFlags & CLUSTER_ID_MASK) != 0)
+ {
+ EncodingUtils.writeShortStringBytes(buffer, _clusterId);
}
}
- public void populatePropertiesFromBuffer(ByteBuffer buffer, int propertyFlags, int size) throws AMQFrameDecodingException
+ public void populatePropertiesFromBuffer(DataInputStream buffer, int propertyFlags, int size) throws AMQFrameDecodingException, IOException
{
_propertyFlags = propertyFlags;
@@ -331,25 +269,18 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
}
decode(buffer);
- /*_encodedForm = new byte[size];
- buffer.get(_encodedForm, 0, size);
- _decoded = false;
- _decodedHeaders = false;
- _decodedContentType = false;*/
}
- private void decode(ByteBuffer buffer)
+ private void decode(DataInputStream buffer) throws IOException, AMQFrameDecodingException
{
// ByteBuffer buffer = ByteBuffer.wrap(_encodedForm);
- int pos = buffer.position();
- try
- {
+
if ((_propertyFlags & (CONTENT_TYPE_MASK)) != 0)
{
_contentType = EncodingUtils.readAMQShortString(buffer);
}
- if ((_propertyFlags & ENCONDING_MASK) != 0)
+ if ((_propertyFlags & ENCODING_MASK) != 0)
{
_encoding = EncodingUtils.readAMQShortString(buffer);
}
@@ -361,12 +292,12 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
if ((_propertyFlags & DELIVERY_MODE_MASK) != 0)
{
- _deliveryMode = buffer.get();
+ _deliveryMode = buffer.readByte();
}
- if ((_propertyFlags & PROPRITY_MASK) != 0)
+ if ((_propertyFlags & PRIORITY_MASK) != 0)
{
- _priority = buffer.get();
+ _priority = buffer.readByte();
}
if ((_propertyFlags & CORRELATION_ID_MASK) != 0)
@@ -413,116 +344,29 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
{
_clusterId = EncodingUtils.readAMQShortString(buffer);
}
- }
- catch (AMQFrameDecodingException e)
- {
- throw new RuntimeException("Error in content header data: " + e, e);
- }
- final int endPos = buffer.position();
- buffer.position(pos);
- final int len = endPos - pos;
- _encodedForm = new byte[len];
- final int limit = buffer.limit();
- buffer.limit(endPos);
- buffer.get(_encodedForm, 0, len);
- buffer.limit(limit);
- buffer.position(endPos);
- _decoded = true;
- }
- private void decodeUpToHeaders()
- {
- ByteBuffer buffer = ByteBuffer.wrap(_encodedForm);
- try
- {
- if ((_propertyFlags & (CONTENT_TYPE_MASK)) != 0)
- {
- byte length = buffer.get();
- buffer.skip(length);
- }
-
- if ((_propertyFlags & ENCONDING_MASK) != 0)
- {
- byte length = buffer.get();
- buffer.skip(length);
- }
-
- if ((_propertyFlags & HEADERS_MASK) != 0)
- {
- _headers = EncodingUtils.readFieldTable(buffer);
-
- }
-
- _decodedHeaders = true;
- }
- catch (AMQFrameDecodingException e)
- {
- throw new RuntimeException("Error in content header data: " + e, e);
- }
}
- private void decodeUpToContentType()
- {
- ByteBuffer buffer = ByteBuffer.wrap(_encodedForm);
-
- if ((_propertyFlags & (CONTENT_TYPE_MASK)) != 0)
- {
- _contentType = EncodingUtils.readAMQShortString(buffer);
- }
-
- _decodedContentType = true;
- }
-
- private void decodeIfNecessary()
- {
- if (!_decoded)
- {
- // decode();
- }
- }
-
- private void decodeHeadersIfNecessary()
- {
- if (!_decoded && !_decodedHeaders)
- {
- decodeUpToHeaders();
- }
- }
-
- private void decodeContentTypeIfNecessary()
- {
- if (!_decoded && !_decodedContentType)
- {
- decodeUpToContentType();
- }
- }
public AMQShortString getContentType()
{
- decodeContentTypeIfNecessary();
-
return _contentType;
}
public String getContentTypeAsString()
{
- decodeContentTypeIfNecessary();
-
return (_contentType == null) ? null : _contentType.toString();
}
public void setContentType(AMQShortString contentType)
{
- _hasBeenUpdated = true;
- clearEncodedForm();
_propertyFlags |= (CONTENT_TYPE_MASK);
_contentType = contentType;
}
public void setContentType(String contentType)
{
- _hasBeenUpdated = true;
setContentType((contentType == null) ? null : new AMQShortString(contentType));
}
@@ -534,31 +378,23 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
public AMQShortString getEncoding()
{
- decodeIfNecessary();
-
return _encoding;
}
public void setEncoding(String encoding)
{
- _hasBeenUpdated = true;
- clearEncodedForm();
- _propertyFlags |= ENCONDING_MASK;
+ _propertyFlags |= ENCODING_MASK;
_encoding = (encoding == null) ? null : new AMQShortString(encoding);
}
public void setEncoding(AMQShortString encoding)
{
- _hasBeenUpdated = true;
- clearEncodedForm();
- _propertyFlags |= ENCONDING_MASK;
+ _propertyFlags |= ENCODING_MASK;
_encoding = encoding;
}
public FieldTable getHeaders()
{
- decodeHeadersIfNecessary();
-
if (_headers == null)
{
setHeaders(FieldTableFactory.newFieldTable());
@@ -569,191 +405,146 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
public void setHeaders(FieldTable headers)
{
- _hasBeenUpdated = true;
- clearEncodedForm();
_propertyFlags |= HEADERS_MASK;
_headers = headers;
}
public byte getDeliveryMode()
{
- decodeIfNecessary();
-
return _deliveryMode;
}
public void setDeliveryMode(byte deliveryMode)
{
- clearEncodedForm();
_propertyFlags |= DELIVERY_MODE_MASK;
_deliveryMode = deliveryMode;
}
public byte getPriority()
{
- decodeIfNecessary();
-
return _priority;
}
public void setPriority(byte priority)
{
- clearEncodedForm();
- _propertyFlags |= PROPRITY_MASK;
+ _propertyFlags |= PRIORITY_MASK;
_priority = priority;
}
public AMQShortString getCorrelationId()
{
- decodeIfNecessary();
-
return _correlationId;
}
public String getCorrelationIdAsString()
{
- decodeIfNecessary();
-
return (_correlationId == null) ? null : _correlationId.toString();
}
public void setCorrelationId(String correlationId)
{
- _hasBeenUpdated = true;
setCorrelationId((correlationId == null) ? null : new AMQShortString(correlationId));
}
public void setCorrelationId(AMQShortString correlationId)
{
- _hasBeenUpdated = true;
- clearEncodedForm();
_propertyFlags |= CORRELATION_ID_MASK;
_correlationId = correlationId;
}
public String getReplyToAsString()
{
- decodeIfNecessary();
-
return (_replyTo == null) ? null : _replyTo.toString();
}
public AMQShortString getReplyTo()
{
- decodeIfNecessary();
-
return _replyTo;
}
public void setReplyTo(String replyTo)
{
- _hasBeenUpdated = true;
setReplyTo((replyTo == null) ? null : new AMQShortString(replyTo));
}
public void setReplyTo(AMQShortString replyTo)
{
- _hasBeenUpdated = true;
- clearEncodedForm();
_propertyFlags |= REPLY_TO_MASK;
_replyTo = replyTo;
}
public long getExpiration()
{
- decodeIfNecessary();
return _expiration;
}
public void setExpiration(long expiration)
{
- clearEncodedForm();
_propertyFlags |= EXPIRATION_MASK;
_expiration = expiration;
}
public AMQShortString getMessageId()
{
- decodeIfNecessary();
-
return _messageId;
}
public String getMessageIdAsString()
{
- decodeIfNecessary();
-
return (_messageId == null) ? null : _messageId.toString();
}
public void setMessageId(String messageId)
{
- _hasBeenUpdated = true;
- clearEncodedForm();
_propertyFlags |= MESSAGE_ID_MASK;
_messageId = (messageId == null) ? null : new AMQShortString(messageId);
}
public void setMessageId(AMQShortString messageId)
{
- _hasBeenUpdated = true;
- clearEncodedForm();
_propertyFlags |= MESSAGE_ID_MASK;
_messageId = messageId;
}
public long getTimestamp()
{
- decodeIfNecessary();
return _timestamp;
}
public void setTimestamp(long timestamp)
{
- clearEncodedForm();
_propertyFlags |= TIMESTAMP_MASK;
_timestamp = timestamp;
}
public String getTypeAsString()
{
- decodeIfNecessary();
-
return (_type == null) ? null : _type.toString();
}
public AMQShortString getType()
{
- decodeIfNecessary();
-
return _type;
}
public void setType(String type)
{
- _hasBeenUpdated = true;
setType((type == null) ? null : new AMQShortString(type));
}
public void setType(AMQShortString type)
{
- _hasBeenUpdated = true;
- clearEncodedForm();
_propertyFlags |= TYPE_MASK;
_type = type;
}
public String getUserIdAsString()
{
- decodeIfNecessary();
-
return (_userId == null) ? null : _userId.toString();
}
public AMQShortString getUserId()
{
- decodeIfNecessary();
-
return _userId;
}
@@ -764,65 +555,48 @@ public class BasicContentHeaderProperties implements CommonContentHeaderProperti
public void setUserId(AMQShortString userId)
{
- _hasBeenUpdated = true;
- clearEncodedForm();
_propertyFlags |= USER_ID_MASK;
_userId = userId;
}
public String getAppIdAsString()
{
- decodeIfNecessary();
-
return (_appId == null) ? null : _appId.toString();
}
public AMQShortString getAppId()
{
- decodeIfNecessary();
-
return _appId;
}
public void setAppId(String appId)
{
- _hasBeenUpdated = true;
setAppId((appId == null) ? null : new AMQShortString(appId));
}
public void setAppId(AMQShortString appId)
{
- _hasBeenUpdated = true;
- clearEncodedForm();
_propertyFlags |= APPLICATION_ID_MASK;
_appId = appId;
- _hasBeenUpdated = true;
}
public String getClusterIdAsString()
{
- _hasBeenUpdated = true;
- decodeIfNecessary();
return (_clusterId == null) ? null : _clusterId.toString();
}
public AMQShortString getClusterId()
{
- _hasBeenUpdated = true;
- decodeIfNecessary();
return _clusterId;
}
public void setClusterId(String clusterId)
{
- _hasBeenUpdated = true;
setClusterId((clusterId == null) ? null : new AMQShortString(clusterId));
}
public void setClusterId(AMQShortString clusterId)
{
- _hasBeenUpdated = true;
- clearEncodedForm();
_propertyFlags |= CLUSTER_ID_MASK;
_clusterId = clusterId;
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/BodyFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/BodyFactory.java
index 59646577e1..f9580d82b1 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/BodyFactory.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/BodyFactory.java
@@ -20,12 +20,13 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.IOException;
/**
* Any class that is capable of turning a stream of bytes into an AMQ structure must implement this interface.
*/
public interface BodyFactory
{
- AMQBody createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException;
+ AMQBody createBody(DataInputStream in, long bodySize) throws AMQFrameDecodingException, IOException;
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/CompositeAMQDataBlock.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/CompositeAMQDataBlock.java
index 94030f383e..15bc20c52d 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/CompositeAMQDataBlock.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/CompositeAMQDataBlock.java
@@ -20,7 +20,8 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataOutputStream;
+import java.io.IOException;
public class CompositeAMQDataBlock extends AMQDataBlock implements EncodableAMQDataBlock
{
@@ -49,7 +50,7 @@ public class CompositeAMQDataBlock extends AMQDataBlock implements EncodableAMQD
return frameSize;
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer) throws IOException
{
for (int i = 0; i < _blocks.length; i++)
{
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBody.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBody.java
index 9d39f8aa86..aedb35f92a 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBody.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBody.java
@@ -20,7 +20,10 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
import org.apache.qpid.AMQException;
@@ -28,27 +31,22 @@ public class ContentBody implements AMQBody
{
public static final byte TYPE = 3;
- public ByteBuffer payload;
+ public byte[] _payload;
public ContentBody()
{
}
- public ContentBody(ByteBuffer buffer, long size) throws AMQFrameDecodingException
+ public ContentBody(DataInputStream buffer, long size) throws AMQFrameDecodingException, IOException
{
- if (size > 0)
- {
- payload = buffer.slice();
- payload.limit((int) size);
- buffer.skip((int) size);
- }
-
+ _payload = new byte[(int)size];
+ buffer.read(_payload);
}
- public ContentBody(ByteBuffer payload)
+ public ContentBody(byte[] payload)
{
- this.payload = payload;
+ _payload = payload;
}
public byte getFrameType()
@@ -58,23 +56,12 @@ public class ContentBody implements AMQBody
public int getSize()
{
- return (payload == null ? 0 : payload.limit());
+ return _payload == null ? 0 : _payload.length;
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer) throws IOException
{
- if (payload != null)
- {
- if(payload.isDirect() || payload.isReadOnly())
- {
- ByteBuffer copy = payload.duplicate();
- buffer.put(copy.rewind());
- }
- else
- {
- buffer.put(payload.array(),payload.arrayOffset(),payload.limit());
- }
- }
+ buffer.write(_payload);
}
public void handle(final int channelId, final AMQVersionAwareProtocolSession session)
@@ -83,32 +70,18 @@ public class ContentBody implements AMQBody
session.contentBodyReceived(channelId, this);
}
- protected void populateFromBuffer(ByteBuffer buffer, long size) throws AMQFrameDecodingException
+ protected void populateFromBuffer(DataInputStream buffer, long size) throws AMQFrameDecodingException, IOException
{
if (size > 0)
{
- payload = buffer.slice();
- payload.limit((int) size);
- buffer.skip((int) size);
+ _payload = new byte[(int)size];
+ buffer.read(_payload);
}
}
public void reduceBufferToFit()
{
- if (payload != null && (payload.remaining() < payload.capacity() / 2))
- {
- int size = payload.limit();
- ByteBuffer newPayload = ByteBuffer.allocate(size);
-
- newPayload.put(payload);
- newPayload.flip();
-
- //reduce reference count on payload
- payload.release();
-
- payload = newPayload;
- }
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBodyFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBodyFactory.java
index c42995d148..a0b030ab6b 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBodyFactory.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentBodyFactory.java
@@ -20,7 +20,8 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -41,7 +42,7 @@ public class ContentBodyFactory implements BodyFactory
_log.debug("Creating content body factory");
}
- public AMQBody createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException
+ public AMQBody createBody(DataInputStream in, long bodySize) throws AMQFrameDecodingException, IOException
{
return new ContentBody(in, bodySize);
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java
index 30db3b8be7..18d0f26152 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBody.java
@@ -20,7 +20,10 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
import org.apache.qpid.AMQException;
@@ -42,12 +45,12 @@ public class ContentHeaderBody implements AMQBody
{
}
- public ContentHeaderBody(ByteBuffer buffer, long size) throws AMQFrameDecodingException
+ public ContentHeaderBody(DataInputStream buffer, long size) throws AMQFrameDecodingException, IOException
{
- classId = buffer.getUnsignedShort();
- weight = buffer.getUnsignedShort();
- bodySize = buffer.getLong();
- int propertyFlags = buffer.getUnsignedShort();
+ classId = buffer.readUnsignedShort();
+ weight = buffer.readUnsignedShort();
+ bodySize = buffer.readLong();
+ int propertyFlags = buffer.readUnsignedShort();
ContentHeaderPropertiesFactory factory = ContentHeaderPropertiesFactory.getInstance();
properties = factory.createContentHeaderProperties(classId, propertyFlags, buffer, (int)size - 14);
@@ -72,13 +75,13 @@ public class ContentHeaderBody implements AMQBody
return TYPE;
}
- protected void populateFromBuffer(ByteBuffer buffer, long size)
- throws AMQFrameDecodingException, AMQProtocolVersionException
+ protected void populateFromBuffer(DataInputStream buffer, long size)
+ throws AMQFrameDecodingException, AMQProtocolVersionException, IOException
{
- classId = buffer.getUnsignedShort();
- weight = buffer.getUnsignedShort();
- bodySize = buffer.getLong();
- int propertyFlags = buffer.getUnsignedShort();
+ classId = buffer.readUnsignedShort();
+ weight = buffer.readUnsignedShort();
+ bodySize = buffer.readLong();
+ int propertyFlags = buffer.readUnsignedShort();
ContentHeaderPropertiesFactory factory = ContentHeaderPropertiesFactory.getInstance();
properties = factory.createContentHeaderProperties(classId, propertyFlags, buffer, (int)size - 14);
}
@@ -90,8 +93,8 @@ public class ContentHeaderBody implements AMQBody
* @return
* @throws AMQFrameDecodingException
*/
- public static ContentHeaderBody createFromBuffer(ByteBuffer buffer, long size)
- throws AMQFrameDecodingException, AMQProtocolVersionException
+ public static ContentHeaderBody createFromBuffer(DataInputStream buffer, long size)
+ throws AMQFrameDecodingException, AMQProtocolVersionException, IOException
{
ContentHeaderBody body = new ContentHeaderBody(buffer, size);
@@ -103,11 +106,11 @@ public class ContentHeaderBody implements AMQBody
return 2 + 2 + 8 + 2 + properties.getPropertyListSize();
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer) throws IOException
{
EncodingUtils.writeUnsignedShort(buffer, classId);
EncodingUtils.writeUnsignedShort(buffer, weight);
- buffer.putLong(bodySize);
+ buffer.writeLong(bodySize);
EncodingUtils.writeUnsignedShort(buffer, properties.getPropertyFlags());
properties.writePropertyListPayload(buffer);
}
@@ -138,4 +141,15 @@ public class ContentHeaderBody implements AMQBody
{
properties = props;
}
+
+ @Override
+ public String toString()
+ {
+ return "ContentHeaderBody{" +
+ "classId=" + classId +
+ ", weight=" + weight +
+ ", bodySize=" + bodySize +
+ ", properties=" + properties +
+ '}';
+ }
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBodyFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBodyFactory.java
index 8d5e2f9fb4..a474e337b7 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBodyFactory.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderBodyFactory.java
@@ -20,7 +20,8 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.IOException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -41,7 +42,7 @@ public class ContentHeaderBodyFactory implements BodyFactory
_log.debug("Creating content header body factory");
}
- public AMQBody createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException
+ public AMQBody createBody(DataInputStream in, long bodySize) throws AMQFrameDecodingException, IOException
{
// all content headers are the same - it is only the properties that differ.
// the content header body further delegates construction of properties
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderProperties.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderProperties.java
index 7ef538cfdc..237929f9a3 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderProperties.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderProperties.java
@@ -20,7 +20,10 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
/**
* There will be an implementation of this interface for each content type. All content types have associated
@@ -32,7 +35,7 @@ public interface ContentHeaderProperties
* Writes the property list to the buffer, in a suitably encoded form.
* @param buffer The buffer to write to
*/
- void writePropertyListPayload(ByteBuffer buffer);
+ void writePropertyListPayload(DataOutputStream buffer) throws IOException;
/**
* Populates the properties from buffer.
@@ -40,8 +43,8 @@ public interface ContentHeaderProperties
* @param propertyFlags he property flags.
* @throws AMQFrameDecodingException when the buffer does not contain valid data
*/
- void populatePropertiesFromBuffer(ByteBuffer buffer, int propertyFlags, int size)
- throws AMQFrameDecodingException;
+ void populatePropertiesFromBuffer(DataInputStream buffer, int propertyFlags, int size)
+ throws AMQFrameDecodingException, IOException;
/**
* @return the size of the encoded property list in bytes.
@@ -56,5 +59,4 @@ public interface ContentHeaderProperties
*/
int getPropertyFlags();
- void updated();
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderPropertiesFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderPropertiesFactory.java
index 46189b63d7..43ee8cd1f1 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderPropertiesFactory.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/ContentHeaderPropertiesFactory.java
@@ -20,7 +20,8 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.IOException;
import org.apache.qpid.framing.amqp_8_0.BasicConsumeBodyImpl;
@@ -38,8 +39,8 @@ public class ContentHeaderPropertiesFactory
}
public ContentHeaderProperties createContentHeaderProperties(int classId, int propertyFlags,
- ByteBuffer buffer, int size)
- throws AMQFrameDecodingException
+ DataInputStream buffer, int size)
+ throws AMQFrameDecodingException, IOException
{
ContentHeaderProperties properties;
// AMQP version change: "Hardwired" version to major=8, minor=0
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/DeferredDataBlock.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/DeferredDataBlock.java
deleted file mode 100644
index f6795ff200..0000000000
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/DeferredDataBlock.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package org.apache.qpid.framing;
-
-import org.apache.mina.common.ByteBuffer;
-
-/*
-*
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*
-*/
-public abstract class DeferredDataBlock extends AMQDataBlock
-{
- private AMQDataBlock _underlyingDataBlock;
-
-
- public long getSize()
- {
- if(_underlyingDataBlock == null)
- {
- _underlyingDataBlock = createAMQDataBlock();
- }
- return _underlyingDataBlock.getSize();
- }
-
- public void writePayload(ByteBuffer buffer)
- {
- if(_underlyingDataBlock == null)
- {
- _underlyingDataBlock = createAMQDataBlock();
- }
- _underlyingDataBlock.writePayload(buffer);
- }
-
- abstract protected AMQDataBlock createAMQDataBlock();
-
-}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/EncodingUtils.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/EncodingUtils.java
index 6425f8c591..2d7e27405c 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/EncodingUtils.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/EncodingUtils.java
@@ -20,11 +20,12 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.nio.ByteBuffer;
import java.nio.charset.Charset;
public class EncodingUtils
@@ -218,7 +219,7 @@ public class EncodingUtils
return 0;
}
- public static void writeShortStringBytes(ByteBuffer buffer, String s)
+ public static void writeShortStringBytes(DataOutputStream buffer, String s) throws IOException
{
if (s != null)
{
@@ -231,18 +232,18 @@ public class EncodingUtils
// TODO: check length fits in an unsigned byte
writeUnsignedByte(buffer, (short)encodedString.length);
- buffer.put(encodedString);
+ buffer.write(encodedString);
}
else
{
// really writing out unsigned byte
- buffer.put((byte) 0);
+ buffer.write((byte) 0);
}
}
- public static void writeShortStringBytes(ByteBuffer buffer, AMQShortString s)
+ public static void writeShortStringBytes(DataOutputStream buffer, AMQShortString s) throws IOException
{
if (s != null)
{
@@ -252,11 +253,11 @@ public class EncodingUtils
else
{
// really writing out unsigned byte
- buffer.put((byte) 0);
+ buffer.write((byte) 0);
}
}
- public static void writeLongStringBytes(ByteBuffer buffer, String s)
+ public static void writeLongStringBytes(DataOutputStream buffer, String s) throws IOException
{
assert (s == null) || (s.length() <= 0xFFFE);
if (s != null)
@@ -270,7 +271,7 @@ public class EncodingUtils
encodedString[i] = (byte) cha[i];
}
- buffer.put(encodedString);
+ buffer.write(encodedString);
}
else
{
@@ -278,7 +279,7 @@ public class EncodingUtils
}
}
- public static void writeLongStringBytes(ByteBuffer buffer, char[] s)
+ public static void writeLongStringBytes(DataOutputStream buffer, char[] s) throws IOException
{
assert (s == null) || (s.length <= 0xFFFE);
if (s != null)
@@ -291,7 +292,7 @@ public class EncodingUtils
encodedString[i] = (byte) s[i];
}
- buffer.put(encodedString);
+ buffer.write(encodedString);
}
else
{
@@ -299,13 +300,13 @@ public class EncodingUtils
}
}
- public static void writeLongStringBytes(ByteBuffer buffer, byte[] bytes)
+ public static void writeLongStringBytes(DataOutputStream buffer, byte[] bytes) throws IOException
{
assert (bytes == null) || (bytes.length <= 0xFFFE);
if (bytes != null)
{
writeUnsignedInteger(buffer, bytes.length);
- buffer.put(bytes);
+ buffer.write(bytes);
}
else
{
@@ -313,24 +314,24 @@ public class EncodingUtils
}
}
- public static void writeUnsignedByte(ByteBuffer buffer, short b)
+ public static void writeUnsignedByte(DataOutputStream buffer, short b) throws IOException
{
byte bv = (byte) b;
- buffer.put(bv);
+ buffer.write(bv);
}
- public static void writeUnsignedShort(ByteBuffer buffer, int s)
+ public static void writeUnsignedShort(DataOutputStream buffer, int s) throws IOException
{
// TODO: Is this comparison safe? Do I need to cast RHS to long?
if (s < Short.MAX_VALUE)
{
- buffer.putShort((short) s);
+ buffer.writeShort(s);
}
else
{
short sv = (short) s;
- buffer.put((byte) (0xFF & (sv >> 8)));
- buffer.put((byte) (0xFF & sv));
+ buffer.write((byte) (0xFF & (sv >> 8)));
+ buffer.write((byte) (0xFF & sv));
}
}
@@ -339,12 +340,12 @@ public class EncodingUtils
return 4;
}
- public static void writeUnsignedInteger(ByteBuffer buffer, long l)
+ public static void writeUnsignedInteger(DataOutputStream buffer, long l) throws IOException
{
// TODO: Is this comparison safe? Do I need to cast RHS to long?
if (l < Integer.MAX_VALUE)
{
- buffer.putInt((int) l);
+ buffer.writeInt((int) l);
}
else
{
@@ -352,14 +353,14 @@ public class EncodingUtils
// FIXME: This *may* go faster if we build this into a local 4-byte array and then
// put the array in a single call.
- buffer.put((byte) (0xFF & (iv >> 24)));
- buffer.put((byte) (0xFF & (iv >> 16)));
- buffer.put((byte) (0xFF & (iv >> 8)));
- buffer.put((byte) (0xFF & iv));
+ buffer.write((byte) (0xFF & (iv >> 24)));
+ buffer.write((byte) (0xFF & (iv >> 16)));
+ buffer.write((byte) (0xFF & (iv >> 8)));
+ buffer.write((byte) (0xFF & iv));
}
}
- public static void writeFieldTableBytes(ByteBuffer buffer, FieldTable table)
+ public static void writeFieldTableBytes(DataOutputStream buffer, FieldTable table) throws IOException
{
if (table != null)
{
@@ -371,12 +372,12 @@ public class EncodingUtils
}
}
- public static void writeContentBytes(ByteBuffer buffer, Content content)
+ public static void writeContentBytes(DataOutputStream buffer, Content content)
{
// TODO: New Content class required for AMQP 0-9.
}
- public static void writeBooleans(ByteBuffer buffer, boolean[] values)
+ public static void writeBooleans(DataOutputStream buffer, boolean[] values) throws IOException
{
byte packedValue = 0;
for (int i = 0; i < values.length; i++)
@@ -387,16 +388,16 @@ public class EncodingUtils
}
}
- buffer.put(packedValue);
+ buffer.write(packedValue);
}
- public static void writeBooleans(ByteBuffer buffer, boolean value)
+ public static void writeBooleans(DataOutputStream buffer, boolean value) throws IOException
{
- buffer.put(value ? (byte) 1 : (byte) 0);
+ buffer.write(value ? (byte) 1 : (byte) 0);
}
- public static void writeBooleans(ByteBuffer buffer, boolean value0, boolean value1)
+ public static void writeBooleans(DataOutputStream buffer, boolean value0, boolean value1) throws IOException
{
byte packedValue = value0 ? (byte) 1 : (byte) 0;
@@ -405,10 +406,10 @@ public class EncodingUtils
packedValue = (byte) (packedValue | (byte) (1 << 1));
}
- buffer.put(packedValue);
+ buffer.write(packedValue);
}
- public static void writeBooleans(ByteBuffer buffer, boolean value0, boolean value1, boolean value2)
+ public static void writeBooleans(DataOutputStream buffer, boolean value0, boolean value1, boolean value2) throws IOException
{
byte packedValue = value0 ? (byte) 1 : (byte) 0;
@@ -422,10 +423,10 @@ public class EncodingUtils
packedValue = (byte) (packedValue | (byte) (1 << 2));
}
- buffer.put(packedValue);
+ buffer.write(packedValue);
}
- public static void writeBooleans(ByteBuffer buffer, boolean value0, boolean value1, boolean value2, boolean value3)
+ public static void writeBooleans(DataOutputStream buffer, boolean value0, boolean value1, boolean value2, boolean value3) throws IOException
{
byte packedValue = value0 ? (byte) 1 : (byte) 0;
@@ -444,11 +445,11 @@ public class EncodingUtils
packedValue = (byte) (packedValue | (byte) (1 << 3));
}
- buffer.put(packedValue);
+ buffer.write(packedValue);
}
- public static void writeBooleans(ByteBuffer buffer, boolean value0, boolean value1, boolean value2, boolean value3,
- boolean value4)
+ public static void writeBooleans(DataOutputStream buffer, boolean value0, boolean value1, boolean value2, boolean value3,
+ boolean value4) throws IOException
{
byte packedValue = value0 ? (byte) 1 : (byte) 0;
@@ -472,11 +473,11 @@ public class EncodingUtils
packedValue = (byte) (packedValue | (byte) (1 << 4));
}
- buffer.put(packedValue);
+ buffer.write(packedValue);
}
- public static void writeBooleans(ByteBuffer buffer, boolean value0, boolean value1, boolean value2, boolean value3,
- boolean value4, boolean value5)
+ public static void writeBooleans(DataOutputStream buffer, boolean value0, boolean value1, boolean value2, boolean value3,
+ boolean value4, boolean value5) throws IOException
{
byte packedValue = value0 ? (byte) 1 : (byte) 0;
@@ -505,11 +506,11 @@ public class EncodingUtils
packedValue = (byte) (packedValue | (byte) (1 << 5));
}
- buffer.put(packedValue);
+ buffer.write(packedValue);
}
- public static void writeBooleans(ByteBuffer buffer, boolean value0, boolean value1, boolean value2, boolean value3,
- boolean value4, boolean value5, boolean value6)
+ public static void writeBooleans(DataOutputStream buffer, boolean value0, boolean value1, boolean value2, boolean value3,
+ boolean value4, boolean value5, boolean value6) throws IOException
{
byte packedValue = value0 ? (byte) 1 : (byte) 0;
@@ -543,11 +544,11 @@ public class EncodingUtils
packedValue = (byte) (packedValue | (byte) (1 << 6));
}
- buffer.put(packedValue);
+ buffer.write(packedValue);
}
- public static void writeBooleans(ByteBuffer buffer, boolean value0, boolean value1, boolean value2, boolean value3,
- boolean value4, boolean value5, boolean value6, boolean value7)
+ public static void writeBooleans(DataOutputStream buffer, boolean value0, boolean value1, boolean value2, boolean value3,
+ boolean value4, boolean value5, boolean value6, boolean value7) throws IOException
{
byte packedValue = value0 ? (byte) 1 : (byte) 0;
@@ -586,7 +587,7 @@ public class EncodingUtils
packedValue = (byte) (packedValue | (byte) (1 << 7));
}
- buffer.put(packedValue);
+ buffer.write(packedValue);
}
/**
@@ -595,12 +596,12 @@ public class EncodingUtils
* @param buffer
* @param data
*/
- public static void writeLongstr(ByteBuffer buffer, byte[] data)
+ public static void writeLongstr(DataOutputStream buffer, byte[] data) throws IOException
{
if (data != null)
{
writeUnsignedInteger(buffer, data.length);
- buffer.put(data);
+ buffer.write(data);
}
else
{
@@ -608,14 +609,14 @@ public class EncodingUtils
}
}
- public static void writeTimestamp(ByteBuffer buffer, long timestamp)
+ public static void writeTimestamp(DataOutputStream buffer, long timestamp) throws IOException
{
writeLong(buffer, timestamp);
}
- public static boolean[] readBooleans(ByteBuffer buffer)
+ public static boolean[] readBooleans(DataInputStream buffer) throws IOException
{
- final byte packedValue = buffer.get();
+ final byte packedValue = buffer.readByte();
if (packedValue == 0)
{
return ALL_FALSE_ARRAY;
@@ -640,9 +641,9 @@ public class EncodingUtils
return result;
}
- public static FieldTable readFieldTable(ByteBuffer buffer) throws AMQFrameDecodingException
+ public static FieldTable readFieldTable(DataInputStream buffer) throws AMQFrameDecodingException, IOException
{
- long length = buffer.getUnsignedInt();
+ long length = ((long)(buffer.readInt())) & 0xFFFFFFFFL;
if (length == 0)
{
return null;
@@ -653,21 +654,21 @@ public class EncodingUtils
}
}
- public static Content readContent(ByteBuffer buffer) throws AMQFrameDecodingException
+ public static Content readContent(DataInputStream buffer) throws AMQFrameDecodingException
{
// TODO: New Content class required for AMQP 0-9.
return null;
}
- public static AMQShortString readAMQShortString(ByteBuffer buffer)
+ public static AMQShortString readAMQShortString(DataInputStream buffer) throws IOException
{
return AMQShortString.readFromBuffer(buffer);
}
- public static String readShortString(ByteBuffer buffer)
+ public static String readShortString(DataInputStream buffer) throws IOException
{
- short length = buffer.getUnsigned();
+ short length = (short) (((short)buffer.readByte()) & 0xFF);
if (length == 0)
{
return null;
@@ -680,7 +681,7 @@ public class EncodingUtils
// this approach here is valid since we know that all the chars are
// ASCII (0-127)
byte[] stringBytes = new byte[length];
- buffer.get(stringBytes, 0, length);
+ buffer.read(stringBytes, 0, length);
char[] stringChars = new char[length];
for (int i = 0; i < stringChars.length; i++)
{
@@ -691,9 +692,9 @@ public class EncodingUtils
}
}
- public static String readLongString(ByteBuffer buffer)
+ public static String readLongString(DataInputStream buffer) throws IOException
{
- long length = buffer.getUnsignedInt();
+ long length = ((long)(buffer.readInt())) & 0xFFFFFFFFL;
if (length == 0)
{
return "";
@@ -706,7 +707,7 @@ public class EncodingUtils
// this approach here is valid since we know that all the chars are
// ASCII (0-127)
byte[] stringBytes = new byte[(int) length];
- buffer.get(stringBytes, 0, (int) length);
+ buffer.read(stringBytes, 0, (int) length);
char[] stringChars = new char[(int) length];
for (int i = 0; i < stringChars.length; i++)
{
@@ -717,9 +718,9 @@ public class EncodingUtils
}
}
- public static byte[] readLongstr(ByteBuffer buffer)
+ public static byte[] readLongstr(DataInputStream buffer) throws IOException
{
- long length = buffer.getUnsignedInt();
+ long length = ((long)(buffer.readInt())) & 0xFFFFFFFFL;
if (length == 0)
{
return null;
@@ -727,17 +728,17 @@ public class EncodingUtils
else
{
byte[] result = new byte[(int) length];
- buffer.get(result);
+ buffer.read(result);
return result;
}
}
- public static long readTimestamp(ByteBuffer buffer)
+ public static long readTimestamp(DataInputStream buffer) throws IOException
{
// Discard msb from AMQ timestamp
// buffer.getUnsignedInt();
- return buffer.getLong();
+ return buffer.readLong();
}
static byte[] hexToByteArray(String id)
@@ -817,14 +818,14 @@ public class EncodingUtils
// AMQP_BOOLEAN_PROPERTY_PREFIX
- public static void writeBoolean(ByteBuffer buffer, Boolean aBoolean)
+ public static void writeBoolean(DataOutputStream buffer, Boolean aBoolean) throws IOException
{
- buffer.put((byte) (aBoolean ? 1 : 0));
+ buffer.write(aBoolean ? 1 : 0);
}
- public static boolean readBoolean(ByteBuffer buffer)
+ public static boolean readBoolean(DataInputStream buffer) throws IOException
{
- byte packedValue = buffer.get();
+ byte packedValue = buffer.readByte();
return (packedValue == 1);
}
@@ -835,14 +836,14 @@ public class EncodingUtils
}
// AMQP_BYTE_PROPERTY_PREFIX
- public static void writeByte(ByteBuffer buffer, Byte aByte)
+ public static void writeByte(DataOutputStream buffer, Byte aByte) throws IOException
{
- buffer.put(aByte);
+ buffer.writeByte(aByte);
}
- public static byte readByte(ByteBuffer buffer)
+ public static byte readByte(DataInputStream buffer) throws IOException
{
- return buffer.get();
+ return buffer.readByte();
}
public static int encodedByteLength()
@@ -851,14 +852,14 @@ public class EncodingUtils
}
// AMQP_SHORT_PROPERTY_PREFIX
- public static void writeShort(ByteBuffer buffer, Short aShort)
+ public static void writeShort(DataOutputStream buffer, Short aShort) throws IOException
{
- buffer.putShort(aShort);
+ buffer.writeShort(aShort);
}
- public static short readShort(ByteBuffer buffer)
+ public static short readShort(DataInputStream buffer) throws IOException
{
- return buffer.getShort();
+ return buffer.readShort();
}
public static int encodedShortLength()
@@ -867,14 +868,14 @@ public class EncodingUtils
}
// INTEGER_PROPERTY_PREFIX
- public static void writeInteger(ByteBuffer buffer, Integer aInteger)
+ public static void writeInteger(DataOutputStream buffer, Integer aInteger) throws IOException
{
- buffer.putInt(aInteger);
+ buffer.writeInt(aInteger);
}
- public static int readInteger(ByteBuffer buffer)
+ public static int readInteger(DataInputStream buffer) throws IOException
{
- return buffer.getInt();
+ return buffer.readInt();
}
public static int encodedIntegerLength()
@@ -883,14 +884,14 @@ public class EncodingUtils
}
// AMQP_LONG_PROPERTY_PREFIX
- public static void writeLong(ByteBuffer buffer, Long aLong)
+ public static void writeLong(DataOutputStream buffer, Long aLong) throws IOException
{
- buffer.putLong(aLong);
+ buffer.writeLong(aLong);
}
- public static long readLong(ByteBuffer buffer)
+ public static long readLong(DataInputStream buffer) throws IOException
{
- return buffer.getLong();
+ return buffer.readLong();
}
public static int encodedLongLength()
@@ -899,14 +900,14 @@ public class EncodingUtils
}
// Float_PROPERTY_PREFIX
- public static void writeFloat(ByteBuffer buffer, Float aFloat)
+ public static void writeFloat(DataOutputStream buffer, Float aFloat) throws IOException
{
- buffer.putFloat(aFloat);
+ buffer.writeFloat(aFloat);
}
- public static float readFloat(ByteBuffer buffer)
+ public static float readFloat(DataInputStream buffer) throws IOException
{
- return buffer.getFloat();
+ return buffer.readFloat();
}
public static int encodedFloatLength()
@@ -915,14 +916,14 @@ public class EncodingUtils
}
// Double_PROPERTY_PREFIX
- public static void writeDouble(ByteBuffer buffer, Double aDouble)
+ public static void writeDouble(DataOutputStream buffer, Double aDouble) throws IOException
{
- buffer.putDouble(aDouble);
+ buffer.writeDouble(aDouble);
}
- public static double readDouble(ByteBuffer buffer)
+ public static double readDouble(DataInputStream buffer) throws IOException
{
- return buffer.getDouble();
+ return buffer.readDouble();
}
public static int encodedDoubleLength()
@@ -930,9 +931,9 @@ public class EncodingUtils
return 8;
}
- public static byte[] readBytes(ByteBuffer buffer)
+ public static byte[] readBytes(DataInputStream buffer) throws IOException
{
- long length = buffer.getUnsignedInt();
+ long length = ((long)(buffer.readInt())) & 0xFFFFFFFFL;
if (length == 0)
{
return null;
@@ -940,19 +941,19 @@ public class EncodingUtils
else
{
byte[] dataBytes = new byte[(int)length];
- buffer.get(dataBytes, 0, (int)length);
+ buffer.read(dataBytes, 0, (int) length);
return dataBytes;
}
}
- public static void writeBytes(ByteBuffer buffer, byte[] data)
+ public static void writeBytes(DataOutputStream buffer, byte[] data) throws IOException
{
if (data != null)
{
// TODO: check length fits in an unsigned byte
writeUnsignedInteger(buffer, (long)data.length);
- buffer.put(data);
+ buffer.write(data);
}
else
{
@@ -968,35 +969,35 @@ public class EncodingUtils
return encodedByteLength();
}
- public static char readChar(ByteBuffer buffer)
+ public static char readChar(DataInputStream buffer) throws IOException
{
// This is valid as we know that the Character is ASCII 0..127
- return (char) buffer.get();
+ return (char) buffer.read();
}
- public static void writeChar(ByteBuffer buffer, char character)
+ public static void writeChar(DataOutputStream buffer, char character) throws IOException
{
// This is valid as we know that the Character is ASCII 0..127
writeByte(buffer, (byte) character);
}
- public static long readLongAsShortString(ByteBuffer buffer)
+ public static long readLongAsShortString(DataInputStream buffer) throws IOException
{
- short length = buffer.getUnsigned();
+ short length = (short) buffer.readUnsignedByte();
short pos = 0;
if (length == 0)
{
return 0L;
}
- byte digit = buffer.get();
+ byte digit = buffer.readByte();
boolean isNegative;
long result = 0;
if (digit == (byte) '-')
{
isNegative = true;
pos++;
- digit = buffer.get();
+ digit = buffer.readByte();
}
else
{
@@ -1009,7 +1010,7 @@ public class EncodingUtils
while (pos < length)
{
pos++;
- digit = buffer.get();
+ digit = buffer.readByte();
result = (result << 3) + (result << 1);
result += digit - (byte) '0';
}
@@ -1017,15 +1018,15 @@ public class EncodingUtils
return result;
}
- public static long readUnsignedInteger(ByteBuffer buffer)
+ public static long readUnsignedInteger(DataInputStream buffer) throws IOException
{
- long l = 0xFF & buffer.get();
+ long l = 0xFF & buffer.readByte();
l <<= 8;
- l = l | (0xFF & buffer.get());
+ l = l | (0xFF & buffer.readByte());
l <<= 8;
- l = l | (0xFF & buffer.get());
+ l = l | (0xFF & buffer.readByte());
l <<= 8;
- l = l | (0xFF & buffer.get());
+ l = l | (0xFF & buffer.readByte());
return l;
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
index 22205d49f8..721c821bab 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTable.java
@@ -20,12 +20,16 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.qpid.AMQPInvalidClassException;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
import java.math.BigDecimal;
import java.util.Collections;
import java.util.Enumeration;
@@ -43,8 +47,8 @@ public class FieldTable
private static final String STRICT_AMQP = "STRICT_AMQP";
private final boolean _strictAMQP = Boolean.valueOf(System.getProperty(STRICT_AMQP, "false"));
- private ByteBuffer _encodedForm;
- private LinkedHashMap<AMQShortString, AMQTypedValue> _properties;
+ private byte[] _encodedForm;
+ private LinkedHashMap<AMQShortString, AMQTypedValue> _properties = null;
private long _encodedSize;
private static final int INITIAL_HASHMAP_CAPACITY = 16;
private static final int INITIAL_ENCODED_FORM_SIZE = 256;
@@ -52,9 +56,6 @@ public class FieldTable
public FieldTable()
{
super();
- // _encodedForm = ByteBuffer.allocate(INITIAL_ENCODED_FORM_SIZE);
- // _encodedForm.setAutoExpand(true);
- // _encodedForm.limit(0);
}
/**
@@ -63,16 +64,12 @@ public class FieldTable
* @param buffer the buffer from which to read data. The length byte must be read already
* @param length the length of the field table. Must be > 0.
*/
- public FieldTable(ByteBuffer buffer, long length)
+ public FieldTable(DataInputStream buffer, long length) throws IOException
{
this();
- ByteBuffer encodedForm = buffer.slice();
- encodedForm.limit((int) length);
- _encodedForm = ByteBuffer.allocate((int)length);
- _encodedForm.put(encodedForm);
- _encodedForm.flip();
+ _encodedForm = new byte[(int) length];
+ buffer.read(_encodedForm);
_encodedSize = length;
- buffer.skip((int) length);
}
public AMQTypedValue getProperty(AMQShortString string)
@@ -108,13 +105,19 @@ public class FieldTable
{
try
{
- setFromBuffer(_encodedForm, _encodedSize);
+ setFromBuffer();
}
catch (AMQFrameDecodingException e)
{
_logger.error("Error decoding FieldTable in deferred decoding mode ", e);
throw new IllegalArgumentException(e);
}
+ catch (IOException e)
+ {
+ _logger.error("Unexpected IO exception decoding field table");
+ throw new IllegalArgumentException(e);
+
+ }
}
private AMQTypedValue setProperty(AMQShortString key, AMQTypedValue val)
@@ -766,7 +769,7 @@ public class FieldTable
// ************************* Byte Buffer Processing
- public void writeToBuffer(ByteBuffer buffer)
+ public void writeToBuffer(DataOutputStream buffer) throws IOException
{
final boolean trace = _logger.isDebugEnabled();
@@ -786,17 +789,21 @@ public class FieldTable
public byte[] getDataAsBytes()
{
- final int encodedSize = (int) getEncodedSize();
- final ByteBuffer buffer = ByteBuffer.allocate(encodedSize); // FIXME XXX: Is cast a problem?
-
- putDataInBuffer(buffer);
-
- final byte[] result = new byte[encodedSize];
- buffer.flip();
- buffer.get(result);
- buffer.release();
+ if(_encodedForm == null)
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ try
+ {
+ putDataInBuffer(new DataOutputStream(baos));
+ return baos.toByteArray();
+ }
+ catch (IOException e)
+ {
+ throw new IllegalArgumentException("IO Exception should never be thrown here");
+ }
- return result;
+ }
+ return _encodedForm.clone();
}
public long getEncodedSize()
@@ -926,15 +933,8 @@ public class FieldTable
public Iterator<Map.Entry<AMQShortString, AMQTypedValue>> iterator()
{
- if(_encodedForm != null)
- {
- return new FieldTableIterator(_encodedForm.duplicate().rewind(),(int)_encodedSize);
- }
- else
- {
- initMapIfNecessary();
- return _properties.entrySet().iterator();
- }
+ initMapIfNecessary();
+ return _properties.entrySet().iterator();
}
public Object get(String key)
@@ -1002,26 +1002,12 @@ public class FieldTable
return _properties.keySet();
}
- private void putDataInBuffer(ByteBuffer buffer)
+ private void putDataInBuffer(DataOutputStream buffer) throws IOException
{
if (_encodedForm != null)
{
- if(buffer.isDirect() || buffer.isReadOnly())
- {
- ByteBuffer encodedForm = _encodedForm.duplicate();
-
- if (encodedForm.position() != 0)
- {
- encodedForm.flip();
- }
-
- buffer.put(encodedForm);
- }
- else
- {
- buffer.put(_encodedForm.array(),_encodedForm.arrayOffset(),(int)_encodedSize);
- }
+ buffer.write(_encodedForm);
}
else if (_properties != null)
{
@@ -1035,41 +1021,27 @@ public class FieldTable
final Map.Entry<AMQShortString, AMQTypedValue> me = it.next();
try
{
- if (_logger.isDebugEnabled())
- {
- _logger.debug("Writing Property:" + me.getKey() + " Type:" + me.getValue().getType() + " Value:"
- + me.getValue().getValue());
- _logger.debug("Buffer Position:" + buffer.position() + " Remaining:" + buffer.remaining());
- }
-
// Write the actual parameter name
EncodingUtils.writeShortStringBytes(buffer, me.getKey());
me.getValue().writeToBuffer(buffer);
}
catch (Exception e)
{
- if (_logger.isDebugEnabled())
- {
- _logger.debug("Exception thrown:" + e);
- _logger.debug("Writing Property:" + me.getKey() + " Type:" + me.getValue().getType() + " Value:"
- + me.getValue().getValue());
- _logger.debug("Buffer Position:" + buffer.position() + " Remaining:" + buffer.remaining());
- }
-
throw new RuntimeException(e);
}
}
}
}
- private void setFromBuffer(ByteBuffer buffer, long length) throws AMQFrameDecodingException
+ private void setFromBuffer() throws AMQFrameDecodingException, IOException
{
+ final ByteArrayInputStream in = new ByteArrayInputStream(_encodedForm);
+ DataInputStream buffer = new DataInputStream(in);
final boolean trace = _logger.isDebugEnabled();
- if (length > 0)
+ if (_encodedSize > 0)
{
- final int expectedRemaining = buffer.remaining() - (int) length;
_properties = new LinkedHashMap<AMQShortString, AMQTypedValue>(INITIAL_HASHMAP_CAPACITY);
@@ -1077,121 +1049,16 @@ public class FieldTable
{
final AMQShortString key = EncodingUtils.readAMQShortString(buffer);
-
- _logger.debug("FieldTable::PropFieldTable(buffer," + length + "): Read key '" + key);
-
AMQTypedValue value = AMQTypedValue.readFromBuffer(buffer);
-
- if (trace)
- {
- _logger.debug("FieldTable::PropFieldTable(buffer," + length + "): Read type '" + value.getType()
- + "', key '" + key + "', value '" + value.getValue() + "'");
- }
-
_properties.put(key, value);
}
- while (buffer.remaining() > expectedRemaining);
-
- }
-
- _encodedSize = length;
-
- if (trace)
- {
- _logger.debug("FieldTable::FieldTable(buffer," + length + "): Done.");
- }
- }
-
- private static final class FieldTableEntry implements Map.Entry<AMQShortString, AMQTypedValue>
- {
- private final AMQTypedValue _value;
- private final AMQShortString _key;
-
- public FieldTableEntry(final AMQShortString key, final AMQTypedValue value)
- {
- _key = key;
- _value = value;
- }
-
- public AMQShortString getKey()
- {
- return _key;
- }
-
- public AMQTypedValue getValue()
- {
- return _value;
- }
-
- public AMQTypedValue setValue(final AMQTypedValue value)
- {
- throw new UnsupportedOperationException();
- }
-
- public boolean equals(Object o)
- {
- if(o instanceof FieldTableEntry)
- {
- FieldTableEntry other = (FieldTableEntry) o;
- return (_key == null ? other._key == null : _key.equals(other._key))
- && (_value == null ? other._value == null : _value.equals(other._value));
- }
- else
- {
- return false;
- }
- }
-
- public int hashCode()
- {
- return (getKey()==null ? 0 : getKey().hashCode())
- ^ (getValue()==null ? 0 : getValue().hashCode());
- }
-
- }
-
-
- private static final class FieldTableIterator implements Iterator<Map.Entry<AMQShortString, AMQTypedValue>>
- {
+ while (in.available() > 0);
- private final ByteBuffer _buffer;
- private int _expectedRemaining;
-
- public FieldTableIterator(ByteBuffer buffer, int length)
- {
- _buffer = buffer;
- _expectedRemaining = buffer.remaining() - length;
- }
-
- public boolean hasNext()
- {
- return (_buffer.remaining() > _expectedRemaining);
}
- public Map.Entry<AMQShortString, AMQTypedValue> next()
- {
- if(hasNext())
- {
- final AMQShortString key = EncodingUtils.readAMQShortString(_buffer);
- AMQTypedValue value = AMQTypedValue.readFromBuffer(_buffer);
- return new FieldTableEntry(key, value);
- }
- else
- {
- return null;
- }
- }
-
- public void remove()
- {
- throw new UnsupportedOperationException();
- }
}
-
-
-
public int hashCode()
{
initMapIfNecessary();
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTableFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTableFactory.java
index e9d75137ef..438a46f28b 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTableFactory.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/FieldTableFactory.java
@@ -20,7 +20,8 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.IOException;
public class FieldTableFactory
{
@@ -29,7 +30,7 @@ public class FieldTableFactory
return new FieldTable();
}
- public static FieldTable newFieldTable(ByteBuffer byteBuffer, long length) throws AMQFrameDecodingException
+ public static FieldTable newFieldTable(DataInputStream byteBuffer, long length) throws AMQFrameDecodingException, IOException
{
return new FieldTable(byteBuffer, length);
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBody.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBody.java
index 18ab05ffa1..a6ce721a50 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBody.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBody.java
@@ -20,7 +20,10 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
import org.apache.qpid.protocol.AMQVersionAwareProtocolSession;
import org.apache.qpid.AMQException;
@@ -34,12 +37,12 @@ public class HeartbeatBody implements AMQBody
}
- public HeartbeatBody(ByteBuffer buffer, long size)
+ public HeartbeatBody(DataInputStream buffer, long size) throws IOException
{
if(size > 0)
{
//allow other implementations to have a payload, but ignore it:
- buffer.skip((int) size);
+ buffer.skip(size);
}
}
@@ -53,7 +56,7 @@ public class HeartbeatBody implements AMQBody
return 0;//heartbeats we generate have no payload
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer)
{
}
@@ -63,12 +66,12 @@ public class HeartbeatBody implements AMQBody
session.heartbeatBodyReceived(channelId, this);
}
- protected void populateFromBuffer(ByteBuffer buffer, long size) throws AMQFrameDecodingException
+ protected void populateFromBuffer(DataInputStream buffer, long size) throws AMQFrameDecodingException, IOException
{
if(size > 0)
{
//allow other implementations to have a payload, but ignore it:
- buffer.skip((int) size);
+ buffer.skip(size);
}
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBodyFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBodyFactory.java
index c7ada708dc..dfc49c6167 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBodyFactory.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/HeartbeatBodyFactory.java
@@ -20,11 +20,11 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
public class HeartbeatBodyFactory implements BodyFactory
{
- public AMQBody createBody(ByteBuffer in, long bodySize) throws AMQFrameDecodingException
+ public AMQBody createBody(DataInputStream in, long bodySize) throws AMQFrameDecodingException
{
return new HeartbeatBody();
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java
index fb3dd89717..8c018316f0 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/ProtocolInitiation.java
@@ -22,6 +22,10 @@ package org.apache.qpid.framing;
import org.apache.qpid.AMQException;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.util.Arrays;
@@ -62,35 +66,30 @@ public class ProtocolInitiation extends AMQDataBlock implements EncodableAMQData
pv.equals(ProtocolVersion.v0_91) ? 1 : pv.getMinorVersion());
}
- public ProtocolInitiation(ByteBuffer in)
+ public ProtocolInitiation(DataInputStream in) throws IOException
{
_protocolHeader = new byte[4];
- in.get(_protocolHeader);
+ in.read(_protocolHeader);
- _protocolClass = in.get();
- _protocolInstance = in.get();
- _protocolMajor = in.get();
- _protocolMinor = in.get();
+ _protocolClass = in.readByte();
+ _protocolInstance = in.readByte();
+ _protocolMajor = in.readByte();
+ _protocolMinor = in.readByte();
}
- public void writePayload(org.apache.mina.common.ByteBuffer buffer)
- {
- writePayload(buffer.buf());
- }
-
public long getSize()
{
return 4 + 1 + 1 + 1 + 1;
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer) throws IOException
{
- buffer.put(_protocolHeader);
- buffer.put(_protocolClass);
- buffer.put(_protocolInstance);
- buffer.put(_protocolMajor);
- buffer.put(_protocolMinor);
+ buffer.write(_protocolHeader);
+ buffer.write(_protocolClass);
+ buffer.write(_protocolInstance);
+ buffer.write(_protocolMajor);
+ buffer.write(_protocolMinor);
}
public boolean equals(Object o)
@@ -144,9 +143,9 @@ public class ProtocolInitiation extends AMQDataBlock implements EncodableAMQData
* @return true if we have enough data to decode the PI frame fully, false if more
* data is required
*/
- public boolean decodable(ByteBuffer in)
+ public boolean decodable(DataInputStream in) throws IOException
{
- return (in.remaining() >= 8);
+ return (in.available() >= 8);
}
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/SmallCompositeAMQDataBlock.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/SmallCompositeAMQDataBlock.java
index bd763599b0..d2925d13a8 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/SmallCompositeAMQDataBlock.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/SmallCompositeAMQDataBlock.java
@@ -21,7 +21,8 @@
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataOutputStream;
+import java.io.IOException;
public class SmallCompositeAMQDataBlock extends AMQDataBlock implements EncodableAMQDataBlock
{
@@ -68,7 +69,7 @@ public class SmallCompositeAMQDataBlock extends AMQDataBlock implements Encodabl
return frameSize;
}
- public void writePayload(ByteBuffer buffer)
+ public void writePayload(DataOutputStream buffer) throws IOException
{
if (_firstFrame != null)
{
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/VersionSpecificRegistry.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/VersionSpecificRegistry.java
index 76c154581d..ed9136f7c9 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/VersionSpecificRegistry.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/VersionSpecificRegistry.java
@@ -20,7 +20,8 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.IOException;
import org.apache.qpid.framing.abstraction.ProtocolVersionMethodConverter;
@@ -144,7 +145,7 @@ public class VersionSpecificRegistry
}
- public AMQMethodBody get(short classID, short methodID, ByteBuffer in, long size) throws AMQFrameDecodingException
+ public AMQMethodBody get(short classID, short methodID, DataInputStream in, long size) throws AMQFrameDecodingException, IOException
{
AMQMethodBodyInstanceFactory bodyFactory;
try
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ContentChunk.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ContentChunk.java
index 0695349f76..470b7b05e3 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ContentChunk.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ContentChunk.java
@@ -21,12 +21,10 @@
package org.apache.qpid.framing.abstraction;
-import org.apache.mina.common.ByteBuffer;
-
public interface ContentChunk
{
int getSize();
- ByteBuffer getData();
+ byte[] getData();
void reduceToFit();
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ProtocolVersionMethodConverter.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ProtocolVersionMethodConverter.java
index 7544d9b7e7..d1e53d6907 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ProtocolVersionMethodConverter.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/abstraction/ProtocolVersionMethodConverter.java
@@ -23,8 +23,6 @@ package org.apache.qpid.framing.abstraction;
import org.apache.qpid.framing.AMQBody;
-import java.nio.ByteBuffer;
-
public interface ProtocolVersionMethodConverter extends MessagePublishInfoConverter
{
AMQBody convertToBody(ContentChunk contentBody);
@@ -32,5 +30,5 @@ public interface ProtocolVersionMethodConverter extends MessagePublishInfoConver
void configure();
- AMQBody convertToBody(ByteBuffer buf);
+ AMQBody convertToBody(byte[] input);
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_0_9/MethodConverter_0_9.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_0_9/MethodConverter_0_9.java
index 1c4a29b106..90a730d6f7 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_0_9/MethodConverter_0_9.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_0_9/MethodConverter_0_9.java
@@ -21,16 +21,13 @@
package org.apache.qpid.framing.amqp_0_9;
-import org.apache.mina.common.ByteBuffer;
-
import org.apache.qpid.framing.abstraction.AbstractMethodConverter;
import org.apache.qpid.framing.abstraction.ProtocolVersionMethodConverter;
import org.apache.qpid.framing.abstraction.ContentChunk;
import org.apache.qpid.framing.abstraction.MessagePublishInfo;
import org.apache.qpid.framing.abstraction.MessagePublishInfoImpl;
import org.apache.qpid.framing.*;
-import org.apache.qpid.framing.amqp_0_9.*;
-import org.apache.qpid.framing.amqp_0_9.BasicPublishBodyImpl;
+
public class MethodConverter_0_9 extends AbstractMethodConverter implements ProtocolVersionMethodConverter
{
@@ -72,9 +69,9 @@ public class MethodConverter_0_9 extends AbstractMethodConverter implements Prot
}
- public AMQBody convertToBody(java.nio.ByteBuffer buf)
+ public AMQBody convertToBody(byte[] data)
{
- return new ContentBody(ByteBuffer.wrap(buf));
+ return new ContentBody(data);
}
public MessagePublishInfo convertToInfo(AMQMethodBody methodBody)
@@ -116,9 +113,9 @@ public class MethodConverter_0_9 extends AbstractMethodConverter implements Prot
return _contentBodyChunk.getSize();
}
- public ByteBuffer getData()
+ public byte[] getData()
{
- return _contentBodyChunk.payload;
+ return _contentBodyChunk._payload;
}
public void reduceToFit()
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_0_91/MethodConverter_0_91.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_0_91/MethodConverter_0_91.java
index 6e330574bc..3b0cc3cebc 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_0_91/MethodConverter_0_91.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_0_91/MethodConverter_0_91.java
@@ -21,8 +21,6 @@
package org.apache.qpid.framing.amqp_0_91;
-import org.apache.mina.common.ByteBuffer;
-
import org.apache.qpid.framing.abstraction.AbstractMethodConverter;
import org.apache.qpid.framing.abstraction.ProtocolVersionMethodConverter;
import org.apache.qpid.framing.abstraction.ContentChunk;
@@ -70,9 +68,9 @@ public class MethodConverter_0_91 extends AbstractMethodConverter implements Pro
}
- public AMQBody convertToBody(java.nio.ByteBuffer buf)
+ public AMQBody convertToBody(byte[] data)
{
- return new ContentBody(ByteBuffer.wrap(buf));
+ return new ContentBody(data);
}
public MessagePublishInfo convertToInfo(AMQMethodBody methodBody)
@@ -114,9 +112,9 @@ public class MethodConverter_0_91 extends AbstractMethodConverter implements Pro
return _contentBodyChunk.getSize();
}
- public ByteBuffer getData()
+ public byte[] getData()
{
- return _contentBodyChunk.payload;
+ return _contentBodyChunk._payload;
}
public void reduceToFit()
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/MethodConverter_8_0.java b/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/MethodConverter_8_0.java
index c87820b9b2..e6d0482f0d 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/MethodConverter_8_0.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/framing/amqp_8_0/MethodConverter_8_0.java
@@ -26,11 +26,8 @@ import org.apache.qpid.framing.abstraction.ContentChunk;
import org.apache.qpid.framing.abstraction.MessagePublishInfo;
import org.apache.qpid.framing.abstraction.AbstractMethodConverter;
import org.apache.qpid.framing.abstraction.MessagePublishInfoImpl;
-import org.apache.qpid.framing.amqp_8_0.BasicPublishBodyImpl;
import org.apache.qpid.framing.*;
-import org.apache.mina.common.ByteBuffer;
-
public class MethodConverter_8_0 extends AbstractMethodConverter implements ProtocolVersionMethodConverter
{
private int _basicPublishClassId;
@@ -60,9 +57,9 @@ public class MethodConverter_8_0 extends AbstractMethodConverter implements Prot
return contentBodyChunk.getSize();
}
- public ByteBuffer getData()
+ public byte[] getData()
{
- return contentBodyChunk.payload;
+ return contentBodyChunk._payload;
}
public void reduceToFit()
@@ -81,9 +78,9 @@ public class MethodConverter_8_0 extends AbstractMethodConverter implements Prot
}
- public AMQBody convertToBody(java.nio.ByteBuffer buf)
+ public AMQBody convertToBody(byte[] data)
{
- return new ContentBody(ByteBuffer.wrap(buf));
+ return new ContentBody(data);
}
public MessagePublishInfo convertToInfo(AMQMethodBody methodBody)
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/pool/Job.java b/qpid/java/common/src/main/java/org/apache/qpid/pool/Job.java
deleted file mode 100644
index 82b600de88..0000000000
--- a/qpid/java/common/src/main/java/org/apache/qpid/pool/Job.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.pool;
-
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A Job is a continuation that batches together other continuations, specifically {@link Event}s, into one continuation.
- * The {@link Event}s themselves provide methods to process themselves, so processing a job simply consists of sequentially
- * processing all of its aggregated events.
- *
- * The constructor accepts a maximum number of events for the job, and only runs up to that maximum number when
- * processing the job, but the add method does not enforce this maximum. In other words, not all the enqueued events
- * may be processed in each run of the job, several runs may be required to clear the queue.
- *
- * <p/><table id="crc"><caption>CRC Card</caption>
- * <tr><th> Responsibilities <th> Collaborations
- * <tr><td> Aggregate many coninuations together into a single continuation.
- * <tr><td> Sequentially process aggregated continuations. <td> {@link Event}
- * <tr><td> Provide running and completion status of the aggregate continuation.
- * <tr><td> Execute a terminal continuation upon job completion. <td> {@link JobCompletionHandler}
- * </table>
- *
- * @todo Could make Job implement Runnable, FutureTask, or a custom Continuation interface, to clarify its status as a
- * continuation. Job is a continuation that aggregates other continuations and as such is a usefull re-usable
- * piece of code. There may be other palces than the mina filter chain where continuation batching is used within
- * qpid, so abstracting this out could provide a usefull building block. This also opens the way to different
- * kinds of job with a common interface, e.g. parallel or sequential jobs etc.
- *
- * @todo For better re-usability could make the completion handler optional. Only run it when one is set.
- */
-public class Job implements ReadWriteRunnable
-{
-
- /** Defines the maximum number of events that will be batched into a single job. */
- public static final int MAX_JOB_EVENTS = Integer.getInteger("amqj.server.read_write_pool.max_events", 10);
-
- /** The maximum number of events to process per run of the job. More events than this may be queued in the job. */
- private final int _maxEvents;
-
- /** Holds the queue of events that make up the job. */
- private final java.util.Queue<Runnable> _eventQueue = new ConcurrentLinkedQueue<Runnable>();
-
- /** Holds a status flag, that indicates when the job is actively running. */
- private final AtomicBoolean _active = new AtomicBoolean();
-
- private final boolean _readJob;
-
- private ReferenceCountingExecutorService _poolReference;
-
- private final static Logger _logger = LoggerFactory.getLogger(Job.class);
-
- public Job(ReferenceCountingExecutorService poolReference, int maxEvents, boolean readJob)
- {
- _poolReference = poolReference;
- _maxEvents = maxEvents;
- _readJob = readJob;
- }
-
- /**
- * Enqueus a continuation for sequential processing by this job.
- *
- * @param evt The continuation to enqueue.
- */
- public void add(Runnable evt)
- {
- _eventQueue.add(evt);
- }
-
- /**
- * Sequentially processes, up to the maximum number per job, the aggregated continuations in enqueued in this job.
- */
- boolean processAll()
- {
- // limit the number of events processed in one run
- int i = _maxEvents;
- while( --i != 0 )
- {
- Runnable e = _eventQueue.poll();
- if (e == null)
- {
- return true;
- }
- else
- {
- e.run();
- }
- }
- return false;
- }
-
- /**
- * Tests if there are no more enqueued continuations to process.
- *
- * @return <tt>true</tt> if there are no enqueued continuations in this job, <tt>false</tt> otherwise.
- */
- public boolean isComplete()
- {
- return _eventQueue.peek() == null;
- }
-
- /**
- * Marks this job as active if it is inactive. This method is thread safe.
- *
- * @return <tt>true</tt> if this job was inactive and has now been marked as active, <tt>false</tt> otherwise.
- */
- public boolean activate()
- {
- return _active.compareAndSet(false, true);
- }
-
- /**
- * Marks this job as inactive. This method is thread safe.
- */
- public void deactivate()
- {
- _active.set(false);
- }
-
- /**
- * Processes a batch of aggregated continuations, marks this job as inactive and call the terminal continuation.
- */
- public void run()
- {
- if(processAll())
- {
- deactivate();
- completed();
- }
- else
- {
- notCompleted();
- }
- }
-
- public boolean isRead()
- {
- return _readJob;
- }
-
- /**
- * Adds an {@link Event} to a {@link Job}, triggering the execution of the job if it is not already running.
- *
- * @param job The job.
- * @param event The event to hand off asynchronously.
- */
- public static void fireAsynchEvent(ExecutorService pool, Job job, Runnable event)
- {
-
- job.add(event);
-
-
- if(pool == null)
- {
- return;
- }
-
- // rather than perform additional checks on pool to check that it hasn't shutdown.
- // catch the RejectedExecutionException that will result from executing on a shutdown pool
- if (job.activate())
- {
- try
- {
- pool.execute(job);
- }
- catch(RejectedExecutionException e)
- {
- _logger.warn("Thread pool shutdown while tasks still outstanding");
- }
- }
-
- }
-
- /**
- * Implements a terminal continuation for the {@link Job} for this filter. Whenever the Job completes its processing
- * of a batch of events this is called. This method simply re-activates the job, if it has more events to process.
- *
- * @param session The Mina session to work in.
- * @param job The job that completed.
- */
- public void completed()
- {
- if (!isComplete())
- {
- final ExecutorService pool = _poolReference.getPool();
-
- if(pool == null)
- {
- return;
- }
-
-
- // ritchiem : 2006-12-13 Do we need to perform the additional checks here?
- // Can the pool be shutdown at this point?
- if (activate())
- {
- try
- {
- pool.execute(this);
- }
- catch(RejectedExecutionException e)
- {
- _logger.warn("Thread pool shutdown while tasks still outstanding");
- }
-
- }
- }
- }
-
- public void notCompleted()
- {
- final ExecutorService pool = _poolReference.getPool();
-
- if(pool == null)
- {
- return;
- }
-
- try
- {
- pool.execute(this);
- }
- catch(RejectedExecutionException e)
- {
- _logger.warn("Thread pool shutdown while tasks still outstanding");
- }
- }
-
-}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java b/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java
index f0f2652ce3..f9f6ca8444 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/protocol/AMQConstant.java
@@ -80,7 +80,7 @@ public final class AMQConstant
/**
* An operator intervened to close the connection for some reason. The client may retry at some later date.
*/
- public static final AMQConstant CONTEXT_IN_USE = new AMQConstant(320, "context in use", true);
+ public static final AMQConstant CONNECTION_FORCED = new AMQConstant(320, "connection forced", true);
/** The client tried to work with an unknown virtual host or cluster. */
public static final AMQConstant INVALID_PATH = new AMQConstant(402, "invalid path", true);
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolEngine.java b/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolEngine.java
index 48a3df734a..fd651a2b66 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolEngine.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolEngine.java
@@ -21,8 +21,11 @@
package org.apache.qpid.protocol;
import java.net.SocketAddress;
+import java.nio.ByteBuffer;
import org.apache.qpid.transport.Receiver;
+import org.apache.qpid.transport.Sender;
+import org.apache.qpid.transport.network.NetworkConnection;
/**
* A ProtocolEngine is a Receiver for java.nio.ByteBuffers. It takes the data passed to it in the received
@@ -53,4 +56,6 @@ public interface ProtocolEngine extends Receiver<java.nio.ByteBuffer>
void readerIdle();
+ public void setNetworkConnection(NetworkConnection network, Sender<ByteBuffer> sender);
+
} \ No newline at end of file
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolEngineFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolEngineFactory.java
index 4e40b78440..7378edff0c 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolEngineFactory.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/protocol/ProtocolEngineFactory.java
@@ -26,6 +26,6 @@ public interface ProtocolEngineFactory
{
// Returns a new instance of a ProtocolEngine
- ProtocolEngine newProtocolEngine(NetworkConnection network);
+ ProtocolEngine newProtocolEngine();
} \ No newline at end of file
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/PrincipalHolder.java b/qpid/java/common/src/main/java/org/apache/qpid/protocol/ServerProtocolEngine.java
index 7e93623cab..e8362f79f0 100755..100644
--- a/qpid/java/broker/src/main/java/org/apache/qpid/server/security/PrincipalHolder.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/protocol/ServerProtocolEngine.java
@@ -18,12 +18,12 @@
* under the License.
*
*/
-package org.apache.qpid.server.security;
+package org.apache.qpid.protocol;
-import java.security.Principal;
-
-public interface PrincipalHolder
+public interface ServerProtocolEngine extends ProtocolEngine
{
- /** @return a Principal that was used to authorized this session */
- Principal getPrincipal();
+ /**
+ * Gets the connection ID associated with this ProtocolEngine
+ */
+ long getConnectionId();
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/security/AMQPCallbackHandler.java b/qpid/java/common/src/main/java/org/apache/qpid/security/AMQPCallbackHandler.java
deleted file mode 100644
index a3dad9acdc..0000000000
--- a/qpid/java/common/src/main/java/org/apache/qpid/security/AMQPCallbackHandler.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.security;
-
-import javax.security.auth.callback.CallbackHandler;
-
-public interface AMQPCallbackHandler extends CallbackHandler
-{
- void initialise(String username,String password);
-}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/security/UsernamePasswordCallbackHandler.java b/qpid/java/common/src/main/java/org/apache/qpid/security/UsernamePasswordCallbackHandler.java
deleted file mode 100644
index 89a63abeab..0000000000
--- a/qpid/java/common/src/main/java/org/apache/qpid/security/UsernamePasswordCallbackHandler.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.security;
-
-import java.io.IOException;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-import javax.security.auth.callback.UnsupportedCallbackException;
-
-public class UsernamePasswordCallbackHandler implements AMQPCallbackHandler
-{
- private String _username;
- private String _password;
-
- public void initialise(String username,String password)
- {
- _username = username;
- _password = password;
- }
-
- public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
- {
- for (int i = 0; i < callbacks.length; i++)
- {
- Callback cb = callbacks[i];
- if (cb instanceof NameCallback)
- {
- ((NameCallback)cb).setName(_username);
- }
- else if (cb instanceof PasswordCallback)
- {
- ((PasswordCallback)cb).setPassword((_password).toCharArray());
- }
- else
- {
- throw new UnsupportedCallbackException(cb);
- }
- }
- }
-}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/ssl/SSLContextFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/ssl/SSLContextFactory.java
index 702746b3da..01f13408b0 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/ssl/SSLContextFactory.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/ssl/SSLContextFactory.java
@@ -20,18 +20,17 @@
*/
package org.apache.qpid.ssl;
-import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
-import java.io.InputStream;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
import javax.net.ssl.KeyManager;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
+import org.apache.qpid.transport.network.security.ssl.QpidClientX509KeyManager;
import org.apache.qpid.transport.network.security.ssl.SSLUtil;
/**
@@ -39,157 +38,92 @@ import org.apache.qpid.transport.network.security.ssl.SSLUtil;
* before this will work.
*
*/
-public class SSLContextFactory {
-
- /**
- * Path to the Java keystore file
- */
- private String _keyStorePath;
-
- /**
- * Password for the keystore
- */
- private String _keyStorePassword;
-
- /**
- * Cert type to use in keystore
- */
- private String _keyStoreCertType;
-
- /**
- * Path to the Java truststore file
- */
- private String _trustStorePath;
-
- /**
- * Password for the truststore
- */
- private String _trustStorePassword;
-
- /**
- * Cert type to use in truststore
- */
- private String _trustStoreCertType;
-
- private KeyManager customKeyManager;
-
- public SSLContextFactory(String trustStorePath, String trustStorePassword,
- String trustStoreCertType)
+public class SSLContextFactory
+{
+ public static final String JAVA_KEY_STORE_CODE = "JKS";
+ public static final String TRANSPORT_LAYER_SECURITY_CODE = "TLS";
+ public static final String KEY_STORE_CERTIFICATE_TYPE = "SunX509";
+
+ private SSLContextFactory()
{
- this(trustStorePath,trustStorePassword,trustStoreCertType,
- trustStorePath,trustStorePassword,trustStoreCertType);
+ //no instances
}
- /**
- * Create a factory instance
- * @param keystorePath path to the Java keystore file
- * @param keystorePassword password for the Java keystore
- * @param certType certificate type
- */
- public SSLContextFactory(String trustStorePath, String trustStorePassword, String trustStoreCertType,
- String keyStorePath, String keyStorePassword, String keyStoreCertType)
- {
+ public static SSLContext buildServerContext(final String keyStorePath,
+ final String keyStorePassword, final String keyStoreCertType)
+ throws GeneralSecurityException, IOException
+ {
+ return buildContext(null, null, null, keyStorePath, keyStorePassword,
+ keyStoreCertType, null);
+ }
- _trustStorePath = trustStorePath;
- _trustStorePassword = trustStorePassword;
-
- if (_trustStorePassword != null && _trustStorePassword.equals("none"))
- {
- _trustStorePassword = null;
- }
- _trustStoreCertType = trustStoreCertType;
-
- _keyStorePath = keyStorePath;
- _keyStorePassword = keyStorePassword;
-
- if (_keyStorePassword != null && _keyStorePassword.equals("none"))
- {
- _keyStorePassword = null;
- }
- _keyStoreCertType = keyStoreCertType;
-
- if (_trustStorePath == null) {
- throw new IllegalArgumentException("A TrustStore path or KeyStore path must be specified");
- }
- if (_trustStoreCertType == null) {
- throw new IllegalArgumentException("Cert type must be specified");
- }
- }
-
- public SSLContextFactory(String trustStorePath, String trustStorePassword, String trustStoreCertType,
- KeyManager customKeyManager)
+ public static SSLContext buildClientContext(final String trustStorePath,
+ final String trustStorePassword, final String trustStoreCertType,
+ final String keyStorePath, final String keyStorePassword,
+ final String keyStoreCertType, final String certAlias)
+ throws GeneralSecurityException, IOException
+ {
+ return buildContext(trustStorePath, trustStorePassword,
+ trustStoreCertType, keyStorePath, keyStorePassword,
+ keyStoreCertType, certAlias);
+ }
+
+ private static SSLContext buildContext(final String trustStorePath,
+ final String trustStorePassword, final String trustStoreCertType,
+ final String keyStorePath, final String keyStorePassword,
+ final String keyStoreCertType, final String certAlias)
+ throws GeneralSecurityException, IOException
{
+ // Initialize the SSLContext to work with our key managers.
+ final SSLContext sslContext = SSLContext
+ .getInstance(TRANSPORT_LAYER_SECURITY_CODE);
- _trustStorePath = trustStorePath;
- _trustStorePassword = trustStorePassword;
-
- if (_trustStorePassword != null && _trustStorePassword.equals("none"))
+ final TrustManager[] trustManagers;
+ final KeyManager[] keyManagers;
+
+ if (trustStorePath != null)
{
- _trustStorePassword = null;
- }
- _trustStoreCertType = trustStoreCertType;
-
- if (_trustStorePath == null) {
- throw new IllegalArgumentException("A TrustStore path or KeyStore path must be specified");
+ final KeyStore ts = SSLUtil.getInitializedKeyStore(trustStorePath,
+ trustStorePassword);
+ final TrustManagerFactory tmf = TrustManagerFactory
+ .getInstance(trustStoreCertType);
+ tmf.init(ts);
+
+ trustManagers = tmf.getTrustManagers();
}
- if (_trustStoreCertType == null) {
- throw new IllegalArgumentException("Cert type must be specified");
+ else
+ {
+ trustManagers = null;
}
-
- this.customKeyManager = customKeyManager;
- }
-
-
- /**
- * Builds a SSLContext appropriate for use with a server
- * @return SSLContext
- * @throws GeneralSecurityException
- * @throws IOException
- */
- public SSLContext buildServerContext() throws GeneralSecurityException, IOException
- {
- KeyStore ts = SSLUtil.getInitializedKeyStore(_trustStorePath,_trustStorePassword);
- TrustManagerFactory tmf = TrustManagerFactory.getInstance(_trustStoreCertType);
- tmf.init(ts);
-
- // Initialize the SSLContext to work with our key managers.
- SSLContext sslContext = SSLContext.getInstance("TLS");
-
- if (customKeyManager != null)
+ if (keyStorePath != null)
{
- sslContext.init(new KeyManager[]{customKeyManager},
- tmf.getTrustManagers(), null);
-
+ if (certAlias != null)
+ {
+ keyManagers = new KeyManager[] { new QpidClientX509KeyManager(
+ certAlias, keyStorePath, keyStorePassword,
+ keyStoreCertType) };
+ }
+ else
+ {
+ final KeyStore ks = SSLUtil.getInitializedKeyStore(
+ keyStorePath, keyStorePassword);
+
+ char[] keyStoreCharPassword = keyStorePassword == null ? null : keyStorePassword.toCharArray();
+ // Set up key manager factory to use our key store
+ final KeyManagerFactory kmf = KeyManagerFactory
+ .getInstance(keyStoreCertType);
+ kmf.init(ks, keyStoreCharPassword);
+ keyManagers = kmf.getKeyManagers();
+ }
}
else
{
- // Create keystore
- KeyStore ks = SSLUtil.getInitializedKeyStore(_keyStorePath,_keyStorePassword);
- // Set up key manager factory to use our key store
- KeyManagerFactory kmf = KeyManagerFactory.getInstance(_keyStoreCertType);
- kmf.init(ks, _keyStorePassword.toCharArray());
-
- sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
+ keyManagers = null;
}
-
- return sslContext;
- }
-
- /**
- * Creates a SSLContext factory appropriate for use with a client
- * @return SSLContext
- * @throws GeneralSecurityException
- * @throws IOException
- */
- public SSLContext buildClientContext() throws GeneralSecurityException, IOException
- {
- KeyStore ks = SSLUtil.getInitializedKeyStore(_trustStorePath,_trustStorePassword);
- TrustManagerFactory tmf = TrustManagerFactory.getInstance(_trustStoreCertType);
- tmf.init(ks);
- SSLContext context = SSLContext.getInstance("TLS");
- context.init(null, tmf.getTrustManagers(), null);
- return context;
- }
-
+
+ sslContext.init(keyManagers, trustManagers, null);
+
+ return sslContext;
+ }
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/thread/QpidThreadExecutor.java b/qpid/java/common/src/main/java/org/apache/qpid/thread/QpidThreadExecutor.java
index 38f60c04fe..30010a2d89 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/thread/QpidThreadExecutor.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/thread/QpidThreadExecutor.java
@@ -23,7 +23,7 @@ package org.apache.qpid.thread;
import org.apache.qpid.thread.Threading;
-import edu.emory.mathcs.backport.java.util.concurrent.Executor;
+import java.util.concurrent.Executor;
public class QpidThreadExecutor implements Executor
{
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/ClientDelegate.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/ClientDelegate.java
index c8b7ad2a5e..9bdad6b00e 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/ClientDelegate.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/ClientDelegate.java
@@ -20,28 +20,20 @@
*/
package org.apache.qpid.transport;
-import org.ietf.jgss.GSSContext;
-import org.ietf.jgss.GSSException;
-import org.ietf.jgss.GSSManager;
-import org.ietf.jgss.GSSName;
-import org.ietf.jgss.Oid;
-
-import org.apache.qpid.security.UsernamePasswordCallbackHandler;
import static org.apache.qpid.transport.Connection.State.OPEN;
import static org.apache.qpid.transport.Connection.State.RESUMING;
-import org.apache.qpid.transport.util.Logger;
-import javax.security.sasl.Sasl;
-import javax.security.sasl.SaslClient;
-import javax.security.sasl.SaslException;
import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
-import java.util.ArrayList;
-import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import javax.security.sasl.SaslClient;
+import javax.security.sasl.SaslException;
+
+import org.apache.qpid.transport.util.Logger;
+
/**
* ClientDelegate
@@ -52,31 +44,13 @@ public class ClientDelegate extends ConnectionDelegate
{
private static final Logger log = Logger.get(ClientDelegate.class);
- private static final String KRB5_OID_STR = "1.2.840.113554.1.2.2";
- protected static final Oid KRB5_OID;
- static
- {
- Oid oid;
- try
- {
- oid = new Oid(KRB5_OID_STR);
- }
- catch (GSSException ignore)
- {
- oid = null;
- }
- KRB5_OID = oid;
- }
-
- private List<String> clientMechs;
- private ConnectionSettings conSettings;
+ protected final ConnectionSettings _conSettings;
public ClientDelegate(ConnectionSettings settings)
{
- this.conSettings = settings;
- this.clientMechs = Arrays.asList(settings.getSaslMechs().split(" "));
+ this._conSettings = settings;
}
public void init(Connection conn, ProtocolHeader hdr)
@@ -92,9 +66,9 @@ public class ClientDelegate extends ConnectionDelegate
{
Map<String,Object> clientProperties = new HashMap<String,Object>();
- if(this.conSettings.getClientProperties() != null)
+ if(this._conSettings.getClientProperties() != null)
{
- clientProperties.putAll(this.conSettings.getClientProperties());
+ clientProperties.putAll(_conSettings.getClientProperties());
}
clientProperties.put("qpid.session_flow", 1);
@@ -109,41 +83,12 @@ public class ClientDelegate extends ConnectionDelegate
(clientProperties, null, null, conn.getLocale());
return;
}
-
- List<String> choosenMechs = new ArrayList<String>();
- for (String mech:clientMechs)
- {
- if (brokerMechs.contains(mech))
- {
- choosenMechs.add(mech);
- }
- }
-
- if (choosenMechs.size() == 0)
- {
- conn.exception(new ConnectionException("The following SASL mechanisms " +
- clientMechs.toString() +
- " specified by the client are not supported by the broker"));
- return;
- }
-
- String[] mechs = new String[choosenMechs.size()];
- choosenMechs.toArray(mechs);
-
conn.setServerProperties(start.getServerProperties());
try
{
- Map<String,Object> saslProps = new HashMap<String,Object>();
- if (conSettings.isUseSASLEncryption())
- {
- saslProps.put(Sasl.QOP, "auth-conf");
- }
- UsernamePasswordCallbackHandler handler =
- new UsernamePasswordCallbackHandler();
- handler.initialise(conSettings.getUsername(), conSettings.getPassword());
- SaslClient sc = Sasl.createSaslClient
- (mechs, null, conSettings.getSaslProtocol(), conSettings.getSaslServerName(), saslProps, handler);
+ final SaslClient sc = createSaslClient(brokerMechs);
+
conn.setSaslClient(sc);
byte[] response = sc.hasInitialResponse() ?
@@ -152,12 +97,22 @@ public class ClientDelegate extends ConnectionDelegate
(clientProperties, sc.getMechanismName(), response,
conn.getLocale());
}
+ catch (ConnectionException ce)
+ {
+ conn.exception(ce);
+ }
catch (SaslException e)
{
conn.exception(e);
}
}
+
+ protected SaslClient createSaslClient(List<Object> brokerMechs) throws ConnectionException, SaslException
+ {
+ throw new UnsupportedOperationException();
+ }
+
@Override
public void connectionSecure(Connection conn, ConnectionSecure secure)
{
@@ -176,7 +131,7 @@ public class ClientDelegate extends ConnectionDelegate
@Override
public void connectionTune(Connection conn, ConnectionTune tune)
{
- int hb_interval = calculateHeartbeatInterval(conSettings.getHeartbeatInterval(),
+ int hb_interval = calculateHeartbeatInterval(_conSettings.getHeartbeatInterval(),
tune.getHeartbeatMin(),
tune.getHeartbeatMax()
);
@@ -191,32 +146,12 @@ public class ClientDelegate extends ConnectionDelegate
//(or that forced by protocol limitations [0xFFFF])
conn.setChannelMax(channelMax == 0 ? Connection.MAX_CHANNEL_MAX : channelMax);
- conn.connectionOpen(conSettings.getVhost(), null, Option.INSIST);
+ conn.connectionOpen(_conSettings.getVhost(), null, Option.INSIST);
}
@Override
public void connectionOpenOk(Connection conn, ConnectionOpenOk ok)
{
- SaslClient sc = conn.getSaslClient();
- if (sc != null)
- {
- if (sc.getMechanismName().equals("GSSAPI"))
- {
- String id = getKerberosUser();
- if (id != null)
- {
- conn.setUserID(id);
- }
- }
- else if (sc.getMechanismName().equals("EXTERNAL"))
- {
- if (conn.getSecurityLayer() != null)
- {
- conn.setUserID(conn.getSecurityLayer().getUserID());
- }
- }
- }
-
if (conn.isConnectionResuming())
{
conn.setState(RESUMING);
@@ -286,35 +221,7 @@ public class ClientDelegate extends ConnectionDelegate
}
- private String getKerberosUser()
- {
- log.debug("Obtaining userID from kerberos");
- String service = conSettings.getSaslProtocol() + "@" + conSettings.getSaslServerName();
- GSSManager manager = GSSManager.getInstance();
-
- try
- {
- GSSName acceptorName = manager.createName(service,
- GSSName.NT_HOSTBASED_SERVICE, KRB5_OID);
-
- GSSContext secCtx = manager.createContext(acceptorName,
- KRB5_OID,
- null,
- GSSContext.INDEFINITE_LIFETIME);
- secCtx.initSecContext(new byte[0], 0, 1);
- if (secCtx.getSrcName() != null)
- {
- return secCtx.getSrcName().toString();
- }
- }
- catch (GSSException e)
- {
- log.warn("Unable to retrieve userID from Kerberos due to error",e);
- }
-
- return null;
- }
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java
index 609611e3fb..347bf8e649 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/Connection.java
@@ -25,7 +25,6 @@ import static org.apache.qpid.transport.Connection.State.CLOSING;
import static org.apache.qpid.transport.Connection.State.NEW;
import static org.apache.qpid.transport.Connection.State.OPEN;
import static org.apache.qpid.transport.Connection.State.OPENING;
-import static org.apache.qpid.transport.Connection.State.RESUMING;
import java.nio.ByteBuffer;
import java.util.ArrayList;
@@ -36,18 +35,19 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
import javax.security.sasl.SaslClient;
import javax.security.sasl.SaslServer;
+import org.apache.qpid.framing.ProtocolVersion;
import org.apache.qpid.transport.network.Assembler;
import org.apache.qpid.transport.network.Disassembler;
import org.apache.qpid.transport.network.InputHandler;
import org.apache.qpid.transport.network.NetworkConnection;
import org.apache.qpid.transport.network.OutgoingNetworkTransport;
-import org.apache.qpid.transport.network.io.IoNetworkTransport;
+import org.apache.qpid.transport.network.Transport;
import org.apache.qpid.transport.network.security.SecurityLayer;
+import org.apache.qpid.transport.network.security.SecurityLayerFactory;
import org.apache.qpid.transport.util.Logger;
import org.apache.qpid.transport.util.Waiter;
import org.apache.qpid.util.Strings;
@@ -73,6 +73,7 @@ public class Connection extends ConnectionInvoker
public static final int MAX_CHANNEL_MAX = 0xFFFF;
public static final int MIN_USABLE_CHANNEL_NUM = 0;
+
public enum State { NEW, CLOSED, OPENING, OPEN, CLOSING, CLOSE_RCVD, RESUMING }
static class DefaultConnectionListener implements ConnectionListener
@@ -120,17 +121,14 @@ public class Connection extends ConnectionInvoker
private SaslServer saslServer;
private SaslClient saslClient;
private int idleTimeout = 0;
- private String _authorizationID;
private Map<String,Object> _serverProperties;
private String userID;
private ConnectionSettings conSettings;
private SecurityLayer securityLayer;
private String _clientId;
-
- private static final AtomicLong idGenerator = new AtomicLong(0);
- private final long _connectionId = idGenerator.incrementAndGet();
+
private final AtomicBoolean connectionLost = new AtomicBoolean(false);
-
+
public Connection() {}
public void setConnectionDelegate(ConnectionDelegate delegate)
@@ -241,15 +239,23 @@ public class Connection extends ConnectionInvoker
conSettings = settings;
state = OPENING;
userID = settings.getUsername();
- delegate = new ClientDelegate(settings);
- securityLayer = new SecurityLayer();
- securityLayer.init(this);
+ securityLayer = SecurityLayerFactory.newInstance(getConnectionSettings());
- OutgoingNetworkTransport transport = new IoNetworkTransport();
- Receiver<ByteBuffer> receiver = securityLayer.receiver(new InputHandler(new Assembler(this)));
- NetworkConnection network = transport.connect(settings, receiver, null);
- sender = new Disassembler(securityLayer.sender(network.getSender()), settings.getMaxFrameSize());
+ OutgoingNetworkTransport transport = Transport.getOutgoingTransportInstance(ProtocolVersion.v0_10);
+ Receiver<ByteBuffer> secureReceiver = securityLayer.receiver(new InputHandler(new Assembler(this)));
+ if(secureReceiver instanceof ConnectionListener)
+ {
+ addConnectionListener((ConnectionListener)secureReceiver);
+ }
+
+ NetworkConnection network = transport.connect(settings, secureReceiver, null);
+ final Sender<ByteBuffer> secureSender = securityLayer.sender(network.getSender());
+ if(secureSender instanceof ConnectionListener)
+ {
+ addConnectionListener((ConnectionListener)secureSender);
+ }
+ sender = new Disassembler(secureSender, settings.getMaxFrameSize());
send(new ProtocolHeader(1, 0, 10));
@@ -331,23 +337,31 @@ public class Connection extends ConnectionInvoker
Waiter w = new Waiter(lock, timeout);
while (w.hasTime() && state != OPEN && error == null)
{
- w.await();
+ w.await();
}
-
+
if (state != OPEN)
{
throw new ConnectionException("Timed out waiting for connection to be ready. Current state is :" + state);
}
-
+
Session ssn = _sessionFactory.newSession(this, name, expiry);
- sessions.put(name, ssn);
+ registerSession(ssn);
map(ssn);
ssn.attach();
return ssn;
}
}
- void removeSession(Session ssn)
+ public void registerSession(Session ssn)
+ {
+ synchronized (lock)
+ {
+ sessions.put(ssn.getName(),ssn);
+ }
+ }
+
+ public void removeSession(Session ssn)
{
synchronized (lock)
{
@@ -362,11 +376,6 @@ public class Connection extends ConnectionInvoker
_sessionFactory = sessionFactory;
}
- public long getConnectionId()
- {
- return _connectionId;
- }
-
public ConnectionDelegate getConnectionDelegate()
{
return delegate;
@@ -415,7 +424,7 @@ public class Connection extends ConnectionInvoker
else
{
throw new ProtocolViolationException(
- "Received frames for an already dettached session", null);
+ "Received frames for an already detached session", null);
}
}
@@ -464,7 +473,7 @@ public class Connection extends ConnectionInvoker
}
}
- protected Session getSession(int channel)
+ public Session getSession(int channel)
{
synchronized (lock)
{
@@ -485,13 +494,13 @@ public class Connection extends ConnectionInvoker
ssn.setState(Session.State.CLOSED);
}
else
- {
+ {
map(ssn);
ssn.attach();
ssn.resume();
}
}
-
+
for (Binary ssn_name : transactedSessions)
{
sessions.remove(ssn_name);
@@ -582,12 +591,12 @@ public class Connection extends ConnectionInvoker
{
close(ConnectionCloseCode.NORMAL, null);
}
-
+
public void mgmtClose()
{
close(ConnectionCloseCode.CONNECTION_FORCED, "The connection was closed using the broker's management interface.");
}
-
+
public void close(ConnectionCloseCode replyCode, String replyText, Option ... _options)
{
synchronized (lock)
@@ -661,16 +670,6 @@ public class Connection extends ConnectionInvoker
return idleTimeout;
}
- public void setAuthorizationID(String authorizationID)
- {
- _authorizationID = authorizationID;
- }
-
- public String getAuthorizationID()
- {
- return _authorizationID;
- }
-
public String getUserID()
{
return userID;
@@ -700,12 +699,12 @@ public class Connection extends ConnectionInvoker
{
return conSettings;
}
-
+
public SecurityLayer getSecurityLayer()
{
return securityLayer;
}
-
+
public boolean isConnectionResuming()
{
return connectionLost.get();
@@ -715,4 +714,9 @@ public class Connection extends ConnectionInvoker
{
return channels.values();
}
+
+ public boolean hasSessionWithName(final String name)
+ {
+ return sessions.containsKey(new Binary(name.getBytes()));
+ }
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionDelegate.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionDelegate.java
index 88dd2d6afa..393301659d 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionDelegate.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionDelegate.java
@@ -85,7 +85,7 @@ public abstract class ConnectionDelegate
@Override public void sessionDetach(Connection conn, SessionDetach dtc)
{
Session ssn = conn.getSession(dtc.getChannel());
- ssn.sessionDetached(dtc.getName(), SessionDetachCode.NORMAL);
+ ssn.sessionDetached(dtc.getName(), ssn.getDetachCode() == null? SessionDetachCode.NORMAL: ssn.getDetachCode());
conn.unmap(ssn);
ssn.closed();
}
@@ -95,6 +95,7 @@ public abstract class ConnectionDelegate
Session ssn = conn.getSession(dtc.getChannel());
if (ssn != null)
{
+ ssn.setDetachCode(dtc.getCode());
conn.unmap(ssn);
ssn.closed();
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java
index 2074c77a5b..37a8e594c0 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/ConnectionSettings.java
@@ -58,7 +58,7 @@ public class ConnectionSettings
boolean verifyHostname;
// SASL props
- String saslMechs = System.getProperty("qpid.sasl_mechs", "PLAIN");
+ String saslMechs = System.getProperty("qpid.sasl_mechs", null);
String saslProtocol = System.getProperty("qpid.sasl_protocol", "AMQP");
String saslServerName = System.getProperty("qpid.sasl_server_name", "localhost");
boolean useSASLEncryption;
diff --git a/qpid/dotnet/Qpid.Buffer/BufferOverflowException.cs b/qpid/java/common/src/main/java/org/apache/qpid/transport/SenderClosedException.java
index 5a2fff74a7..924c327861 100644
--- a/qpid/dotnet/Qpid.Buffer/BufferOverflowException.cs
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/SenderClosedException.java
@@ -7,9 +7,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -18,24 +18,35 @@
* under the License.
*
*/
-using System;
-using System.Runtime.Serialization;
+package org.apache.qpid.transport;
+
+
+/**
+ * SenderClosedException
+ *
+ */
-namespace Apache.Qpid.Buffer
+public class SenderClosedException extends SenderException
{
- [Serializable]
- public class BufferOverflowException : Exception
+
+ public SenderClosedException(String message, Throwable cause)
{
- public BufferOverflowException(string message) : base(message)
- {
- }
-
- protected BufferOverflowException(SerializationInfo info, StreamingContext ctxt)
- : base(info, ctxt)
- {
- }
+ super(message, cause);
}
-}
+ public SenderClosedException(String message)
+ {
+ super(message);
+ }
+
+ public SenderClosedException(Throwable cause)
+ {
+ super(cause);
+ }
+ public void rethrow()
+ {
+ throw new SenderClosedException(getMessage(), this);
+ }
+}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java
index f21df251da..82fa6ca473 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/ServerDelegate.java
@@ -75,10 +75,7 @@ public class ServerDelegate extends ConnectionDelegate
if (mechanism == null || mechanism.length() == 0)
{
- conn.connectionTune
- (getChannelMax(),
- org.apache.qpid.transport.network.ConnectionBinding.MAX_FRAME_SIZE,
- 0, getHeartbeatMax());
+ tuneAuthorizedConnection(conn);
return;
}
@@ -97,8 +94,7 @@ public class ServerDelegate extends ConnectionDelegate
}
catch (SaslException e)
{
- conn.exception(e);
- conn.connectionClose(ConnectionCloseCode.CONNECTION_FORCED, e.getMessage());
+ connectionAuthFailed(conn, e);
}
}
@@ -109,33 +105,52 @@ public class ServerDelegate extends ConnectionDelegate
return ss;
}
- private void secure(Connection conn, byte[] response)
+ protected void secure(final SaslServer ss, final Connection conn, final byte[] response)
{
- SaslServer ss = conn.getSaslServer();
try
{
byte[] challenge = ss.evaluateResponse(response);
if (ss.isComplete())
{
ss.dispose();
- conn.connectionTune
- (getChannelMax(),
- org.apache.qpid.transport.network.ConnectionBinding.MAX_FRAME_SIZE,
- 0, getHeartbeatMax());
- conn.setAuthorizationID(ss.getAuthorizationID());
+ tuneAuthorizedConnection(conn);
}
else
{
- conn.connectionSecure(challenge);
+ connectionAuthContinue(conn, challenge);
}
}
catch (SaslException e)
{
- conn.exception(e);
- conn.connectionClose(ConnectionCloseCode.CONNECTION_FORCED, e.getMessage());
+ connectionAuthFailed(conn, e);
}
}
+ protected void connectionAuthFailed(final Connection conn, Exception e)
+ {
+ conn.exception(e);
+ conn.connectionClose(ConnectionCloseCode.CONNECTION_FORCED, e.getMessage());
+ }
+
+ protected void connectionAuthContinue(final Connection conn, byte[] challenge)
+ {
+ conn.connectionSecure(challenge);
+ }
+
+ protected void tuneAuthorizedConnection(final Connection conn)
+ {
+ conn.connectionTune
+ (getChannelMax(),
+ org.apache.qpid.transport.network.ConnectionBinding.MAX_FRAME_SIZE,
+ 0, getHeartbeatMax());
+ }
+
+ protected void secure(final Connection conn, final byte[] response)
+ {
+ final SaslServer ss = conn.getSaslServer();
+ secure(ss, conn, response);
+ }
+
protected int getHeartbeatMax()
{
return 0xFFFF;
@@ -155,22 +170,7 @@ public class ServerDelegate extends ConnectionDelegate
@Override
public void connectionTuneOk(Connection conn, ConnectionTuneOk ok)
{
- int okChannelMax = ok.getChannelMax();
-
- if (okChannelMax > getChannelMax())
- {
- _logger.error("Connection '" + conn.getConnectionId() + "' being severed, " +
- "client connectionTuneOk returned a channelMax (" + okChannelMax +
- ") above the servers offered limit (" + getChannelMax() +")");
- //Due to the error we must forcefully close the connection without negotiation
- conn.getSender().close();
- return;
- }
-
- //0 means no implied limit, except available server resources
- //(or that forced by protocol limitations [0xFFFF])
- conn.setChannelMax(okChannelMax == 0 ? Connection.MAX_CHANNEL_MAX : okChannelMax);
}
@Override
@@ -200,4 +200,11 @@ public class ServerDelegate extends ConnectionDelegate
ssn.sessionAttached(atc.getName());
ssn.setState(Session.State.OPEN);
}
+
+ protected void setConnectionTuneOkChannelMax(final Connection conn, final int okChannelMax)
+ {
+ //0 means no implied limit, except available server resources
+ //(or that forced by protocol limitations [0xFFFF])
+ conn.setChannelMax(okChannelMax == 0 ? Connection.MAX_CHANNEL_MAX : okChannelMax);
+ }
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
index 862c37283b..556134f984 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/Session.java
@@ -30,6 +30,8 @@ import static org.apache.qpid.transport.Session.State.DETACHED;
import static org.apache.qpid.transport.Session.State.NEW;
import static org.apache.qpid.transport.Session.State.OPEN;
import static org.apache.qpid.transport.Session.State.RESUMING;
+
+import org.apache.qpid.configuration.ClientProperties;
import org.apache.qpid.transport.network.Frame;
import static org.apache.qpid.transport.util.Functions.mod;
import org.apache.qpid.transport.util.Logger;
@@ -42,7 +44,6 @@ import static org.apache.qpid.util.Serial.max;
import static org.apache.qpid.util.Strings.toUTF8;
import java.nio.ByteBuffer;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
@@ -58,7 +59,6 @@ import java.util.concurrent.TimeUnit;
public class Session extends SessionInvoker
{
-
private static final Logger log = Logger.get(Session.class);
public enum State { NEW, DETACHED, RESUMING, OPEN, CLOSING, CLOSED }
@@ -92,7 +92,9 @@ public class Session extends SessionInvoker
private int channel;
private SessionDelegate delegate;
private SessionListener listener = new DefaultSessionListener();
- private long timeout = 60000;
+ private final long timeout = Long.getLong(ClientProperties.QPID_SYNC_OP_TIMEOUT,
+ Long.getLong(ClientProperties.AMQJ_DEFAULT_SYNCWRITE_TIMEOUT,
+ ClientProperties.DEFAULT_SYNC_OPERATION_TIMEOUT));
private boolean autoSync = false;
private boolean incomingInit;
@@ -120,7 +122,9 @@ public class Session extends SessionInvoker
private Thread resumer = null;
private boolean transacted = false;
-
+ private SessionDetachCode detachCode;
+ private final Object stateLock = new Object();
+
protected Session(Connection connection, Binary name, long expiry)
{
this(connection, new SessionDelegate(), name, expiry);
@@ -962,16 +966,29 @@ public class Session extends SessionInvoker
public void close()
{
+ if (log.isDebugEnabled())
+ {
+ log.debug("Closing [%s] in state [%s]", this, state);
+ }
synchronized (commands)
{
- state = CLOSING;
- setClose(true);
- sessionRequestTimeout(0);
- sessionDetach(name.getBytes());
-
- awaitClose();
-
-
+ switch(state)
+ {
+ case DETACHED:
+ state = CLOSED;
+ delegate.closed(this);
+ connection.removeSession(this);
+ listener.closed(this);
+ break;
+ case CLOSED:
+ break;
+ default:
+ state = CLOSING;
+ setClose(true);
+ sessionRequestTimeout(0);
+ sessionDetach(name.getBytes());
+ awaitClose();
+ }
}
}
@@ -1045,13 +1062,55 @@ public class Session extends SessionInvoker
{
return String.format("ssn:%s", name);
}
-
+
public void setTransacted(boolean b) {
this.transacted = b;
}
-
+
public boolean isTransacted(){
return transacted;
}
-
+
+ public void setDetachCode(SessionDetachCode dtc)
+ {
+ this.detachCode = dtc;
+ }
+
+ public SessionDetachCode getDetachCode()
+ {
+ return this.detachCode;
+ }
+
+ public void awaitOpen()
+ {
+ switch (state)
+ {
+ case NEW:
+ synchronized(stateLock)
+ {
+ Waiter w = new Waiter(stateLock, timeout);
+ while (w.hasTime() && state == NEW)
+ {
+ w.await();
+ }
+ }
+
+ if (state != OPEN)
+ {
+ throw new SessionException("Timed out waiting for Session to open");
+ }
+ break;
+ case DETACHED:
+ case CLOSING:
+ case CLOSED:
+ throw new SessionException("Session closed");
+ default :
+ break;
+ }
+ }
+
+ public Object getStateLock()
+ {
+ return stateLock;
+ }
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java
index 9a02961dc4..3341149e5f 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/SessionDelegate.java
@@ -76,6 +76,10 @@ public class SessionDelegate
@Override public void sessionAttached(Session ssn, SessionAttached atc)
{
ssn.setState(Session.State.OPEN);
+ synchronized (ssn.getStateLock())
+ {
+ ssn.getStateLock().notifyAll();
+ }
}
@Override public void sessionTimeout(Session ssn, SessionTimeout t)
@@ -203,10 +207,18 @@ public class SessionDelegate
public void closed(Session session)
{
log.debug("CLOSED: [%s]", session);
+ synchronized (session.getStateLock())
+ {
+ session.getStateLock().notifyAll();
+ }
}
public void detached(Session session)
{
log.debug("DETACHED: [%s]", session);
+ synchronized (session.getStateLock())
+ {
+ session.getStateLock().notifyAll();
+ }
}
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/SocketConnectorFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/SocketConnectorFactory.java
deleted file mode 100644
index 2c7652abeb..0000000000
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/SocketConnectorFactory.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.apache.qpid.transport;
-
-import org.apache.mina.common.IoConnector;
-
-public interface SocketConnectorFactory
-{
- IoConnector newConnector();
-} \ No newline at end of file
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/IncomingNetworkTransport.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/IncomingNetworkTransport.java
index 7099916c33..b371df639e 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/IncomingNetworkTransport.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/IncomingNetworkTransport.java
@@ -20,11 +20,12 @@
*/
package org.apache.qpid.transport.network;
+import javax.net.ssl.SSLContext;
+
import org.apache.qpid.protocol.ProtocolEngineFactory;
-import org.apache.qpid.ssl.SSLContextFactory;
import org.apache.qpid.transport.NetworkTransportConfiguration;
public interface IncomingNetworkTransport extends NetworkTransport
{
- public void accept(NetworkTransportConfiguration config, ProtocolEngineFactory factory, SSLContextFactory sslFactory);
+ public void accept(NetworkTransportConfiguration config, ProtocolEngineFactory factory, SSLContext sslContext);
} \ No newline at end of file
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkConnection.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkConnection.java
index 1f69973b96..7384702525 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkConnection.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkConnection.java
@@ -29,6 +29,8 @@ public interface NetworkConnection
{
Sender<ByteBuffer> getSender();
+ void start();
+
void close();
/**
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkTransport.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkTransport.java
index 9371835e89..f71d39c381 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkTransport.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/NetworkTransport.java
@@ -20,9 +20,11 @@
*/
package org.apache.qpid.transport.network;
+/**
+ * A network transport is responsible for the establishment of network connections.
+ * NetworkTransport implementations are pluggable via the {@link Transport} class.
+ */
public interface NetworkTransport
{
public void close();
-
- public NetworkConnection getConnection();
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/OutgoingNetworkTransport.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/OutgoingNetworkTransport.java
index ff86ba481f..c3c248761c 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/OutgoingNetworkTransport.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/OutgoingNetworkTransport.java
@@ -22,11 +22,14 @@ package org.apache.qpid.transport.network;
import java.nio.ByteBuffer;
-import org.apache.qpid.ssl.SSLContextFactory;
+import javax.net.ssl.SSLContext;
+
import org.apache.qpid.transport.ConnectionSettings;
import org.apache.qpid.transport.Receiver;
public interface OutgoingNetworkTransport extends NetworkTransport
{
- public NetworkConnection connect(ConnectionSettings settings, Receiver<ByteBuffer> delegate, SSLContextFactory sslFactory);
+ public NetworkConnection getConnection();
+
+ public NetworkConnection connect(ConnectionSettings settings, Receiver<ByteBuffer> delegate, SSLContext sslContext);
} \ No newline at end of file
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/Transport.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/Transport.java
index 742d6575df..da4349ba86 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/Transport.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/Transport.java
@@ -20,7 +20,115 @@
*/
package org.apache.qpid.transport.network;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.qpid.framing.ProtocolVersion;
+import org.apache.qpid.transport.TransportException;
+
public class Transport
{
+ public static final String QPID_TRANSPORT_PROPNAME = "qpid.transport";
+ public static final String QPID_TRANSPORT_V0_8_PROPNAME = "qpid.transport.v0_8";
+ public static final String QPID_TRANSPORT_V0_9_PROPNAME = "qpid.transport.v0_9";
+ public static final String QPID_TRANSPORT_V0_9_1_PROPNAME = "qpid.transport.v0_9_1";
+ public static final String QPID_TRANSPORT_V0_10_PROPNAME = "qpid.transport.v0_10";
+ public static final String QPID_BROKER_TRANSPORT_PROPNAME = "qpid.broker.transport";
+
+ // Can't reference the class directly here, as this would preclude the ability to bundle transports separately.
+ private static final String IO_TRANSPORT_CLASSNAME = "org.apache.qpid.transport.network.io.IoNetworkTransport";
+
public static final String TCP = "tcp";
+
+ private final static Map<ProtocolVersion,String> OUTGOING_PROTOCOL_TO_IMPLDEFAULTS_MAP;
+
+ static
+ {
+ final Map<ProtocolVersion,String> map = new HashMap<ProtocolVersion, String>();
+ map.put(ProtocolVersion.v8_0, IO_TRANSPORT_CLASSNAME);
+ map.put(ProtocolVersion.v0_9, IO_TRANSPORT_CLASSNAME);
+ map.put(ProtocolVersion.v0_91, IO_TRANSPORT_CLASSNAME);
+ map.put(ProtocolVersion.v0_10, IO_TRANSPORT_CLASSNAME);
+
+ OUTGOING_PROTOCOL_TO_IMPLDEFAULTS_MAP = Collections.unmodifiableMap(map);
+ }
+
+ public static IncomingNetworkTransport getIncomingTransportInstance()
+ {
+ return (IncomingNetworkTransport) loadTransportClass(
+ System.getProperty(QPID_BROKER_TRANSPORT_PROPNAME, IO_TRANSPORT_CLASSNAME));
+ }
+
+ public static OutgoingNetworkTransport getOutgoingTransportInstance(
+ final ProtocolVersion protocolVersion)
+ {
+
+ final String overrride = getOverrideClassNameFromSystemProperty(protocolVersion);
+ final String networkTransportClassName;
+ if (overrride != null)
+ {
+ networkTransportClassName = overrride;
+ }
+ else
+ {
+ networkTransportClassName = OUTGOING_PROTOCOL_TO_IMPLDEFAULTS_MAP.get(protocolVersion);
+ }
+
+ return (OutgoingNetworkTransport) loadTransportClass(networkTransportClassName);
+ }
+
+ private static NetworkTransport loadTransportClass(final String networkTransportClassName)
+ {
+ if (networkTransportClassName == null)
+ {
+ throw new IllegalArgumentException("transport class name must not be null");
+ }
+
+ try
+ {
+ final Class<?> clazz = Class.forName(networkTransportClassName);
+ return (NetworkTransport) clazz.newInstance();
+ }
+ catch (InstantiationException e)
+ {
+ throw new TransportException("Unable to instantiate transport class " + networkTransportClassName, e);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new TransportException("Access exception " + networkTransportClassName, e);
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new TransportException("Unable to load transport class " + networkTransportClassName, e);
+ }
+ }
+
+ private static String getOverrideClassNameFromSystemProperty(final ProtocolVersion protocolVersion)
+ {
+ final String protocolSpecificSystemProperty;
+
+ if (ProtocolVersion.v0_10.equals(protocolVersion))
+ {
+ protocolSpecificSystemProperty = QPID_TRANSPORT_V0_10_PROPNAME;
+ }
+ else if (ProtocolVersion.v0_91.equals(protocolVersion))
+ {
+ protocolSpecificSystemProperty = QPID_TRANSPORT_V0_9_1_PROPNAME;
+ }
+ else if (ProtocolVersion.v0_9.equals(protocolVersion))
+ {
+ protocolSpecificSystemProperty = QPID_TRANSPORT_V0_9_PROPNAME;
+ }
+ else if (ProtocolVersion.v8_0.equals(protocolVersion))
+ {
+ protocolSpecificSystemProperty = QPID_TRANSPORT_V0_8_PROPNAME;
+ }
+ else
+ {
+ throw new IllegalArgumentException("Unknown ProtocolVersion " + protocolVersion);
+ }
+
+ return System.getProperty(protocolSpecificSystemProperty, System.getProperty(QPID_TRANSPORT_PROPNAME));
+ }
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkConnection.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkConnection.java
index cca1fc46c9..52cc6363a9 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkConnection.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkConnection.java
@@ -37,7 +37,7 @@ public class IoNetworkConnection implements NetworkConnection
private final long _timeout;
private final IoSender _ioSender;
private final IoReceiver _ioReceiver;
-
+
public IoNetworkConnection(Socket socket, Receiver<ByteBuffer> delegate,
int sendBufferSize, int receiveBufferSize, long timeout)
{
@@ -45,9 +45,15 @@ public class IoNetworkConnection implements NetworkConnection
_timeout = timeout;
_ioReceiver = new IoReceiver(_socket, delegate, receiveBufferSize,_timeout);
+
_ioSender = new IoSender(_socket, 2 * sendBufferSize, _timeout);
+
_ioSender.registerCloseListener(_ioReceiver);
+ }
+
+ public void start()
+ {
_ioReceiver.initiate();
_ioSender.initiate();
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkTransport.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkTransport.java
index d611ab1cf3..e1d1596ec5 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkTransport.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoNetworkTransport.java
@@ -21,41 +21,35 @@
package org.apache.qpid.transport.network.io;
import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.SocketException;
+import java.net.*;
import java.nio.ByteBuffer;
-import org.apache.qpid.ssl.SSLContextFactory;
-import org.apache.qpid.transport.ConnectionSettings;
-import org.apache.qpid.transport.Receiver;
-import org.apache.qpid.transport.TransportException;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLServerSocketFactory;
+
+import org.apache.qpid.protocol.ProtocolEngine;
+import org.apache.qpid.protocol.ProtocolEngineFactory;
+import org.apache.qpid.transport.*;
+import org.apache.qpid.transport.network.IncomingNetworkTransport;
import org.apache.qpid.transport.network.NetworkConnection;
import org.apache.qpid.transport.network.OutgoingNetworkTransport;
import org.apache.qpid.transport.util.Logger;
-public class IoNetworkTransport implements OutgoingNetworkTransport
+public class IoNetworkTransport implements OutgoingNetworkTransport, IncomingNetworkTransport
{
- static
- {
- org.apache.mina.common.ByteBuffer.setAllocator
- (new org.apache.mina.common.SimpleByteBufferAllocator());
- org.apache.mina.common.ByteBuffer.setUseDirectBuffers
- (Boolean.getBoolean("amqj.enableDirectBuffers"));
- }
private static final Logger LOGGER = Logger.get(IoNetworkTransport.class);
private Socket _socket;
private IoNetworkConnection _connection;
private long _timeout = 60000;
-
- public NetworkConnection connect(ConnectionSettings settings, Receiver<ByteBuffer> delegate, SSLContextFactory sslFactory)
+ private AcceptingThread _acceptor;
+
+ public NetworkConnection connect(ConnectionSettings settings, Receiver<ByteBuffer> delegate, SSLContext sslContext)
{
int sendBufferSize = settings.getWriteBufferSize();
int receiveBufferSize = settings.getReadBufferSize();
-
+
try
{
_socket = new Socket();
@@ -83,6 +77,7 @@ public class IoNetworkTransport implements OutgoingNetworkTransport
try
{
_connection = new IoNetworkConnection(_socket, delegate, sendBufferSize, receiveBufferSize, _timeout);
+ _connection.start();
}
catch(Exception e)
{
@@ -103,11 +98,134 @@ public class IoNetworkTransport implements OutgoingNetworkTransport
public void close()
{
- _connection.close();
+ if(_connection != null)
+ {
+ _connection.close();
+ }
+ if(_acceptor != null)
+ {
+ _acceptor.close();
+ }
}
public NetworkConnection getConnection()
{
return _connection;
}
+
+ public void accept(NetworkTransportConfiguration config, ProtocolEngineFactory factory, SSLContext sslContext)
+ {
+
+ try
+ {
+ _acceptor = new AcceptingThread(config, factory, sslContext);
+
+ _acceptor.start();
+ }
+ catch (IOException e)
+ {
+ throw new TransportException("Unable to start server socket", e);
+ }
+
+
+ }
+
+ private class AcceptingThread extends Thread
+ {
+ private NetworkTransportConfiguration _config;
+ private ProtocolEngineFactory _factory;
+ private SSLContext _sslContent;
+ private ServerSocket _serverSocket;
+
+ private AcceptingThread(NetworkTransportConfiguration config,
+ ProtocolEngineFactory factory,
+ SSLContext sslContext)
+ throws IOException
+ {
+ _config = config;
+ _factory = factory;
+ _sslContent = sslContext;
+
+ InetSocketAddress address = new InetSocketAddress(config.getHost(), config.getPort());
+
+ if(sslContext == null)
+ {
+ _serverSocket = new ServerSocket();
+ }
+ else
+ {
+ SSLServerSocketFactory socketFactory = sslContext.getServerSocketFactory();
+ _serverSocket = socketFactory.createServerSocket();
+ }
+
+ _serverSocket.bind(address);
+ _serverSocket.setReuseAddress(true);
+
+
+ }
+
+
+ /**
+ Close the underlying ServerSocket if it has not already been closed.
+ */
+ public void close()
+ {
+ if (!_serverSocket.isClosed())
+ {
+ try
+ {
+ _serverSocket.close();
+ }
+ catch (IOException e)
+ {
+ throw new TransportException(e);
+ }
+ }
+ }
+
+ @Override
+ public void run()
+ {
+ try
+ {
+ while (true)
+ {
+ try
+ {
+ Socket socket = _serverSocket.accept();
+ socket.setTcpNoDelay(_config.getTcpNoDelay());
+
+ final Integer sendBufferSize = _config.getSendBufferSize();
+ final Integer receiveBufferSize = _config.getReceiveBufferSize();
+
+ socket.setSendBufferSize(sendBufferSize);
+ socket.setReceiveBufferSize(receiveBufferSize);
+
+ ProtocolEngine engine = _factory.newProtocolEngine();
+
+ NetworkConnection connection = new IoNetworkConnection(socket, engine, sendBufferSize, receiveBufferSize, _timeout);
+
+
+ engine.setNetworkConnection(connection, connection.getSender());
+
+ connection.start();
+
+
+ }
+ catch(RuntimeException e)
+ {
+ LOGGER.error(e, "Error in Acceptor thread " + _config.getPort());
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ LOGGER.debug(e, "SocketException - no new connections will be accepted on port "
+ + _config.getPort());
+ }
+ }
+
+
+ }
+
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java
index fea87fc350..d4b5975e54 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoReceiver.java
@@ -92,13 +92,23 @@ final class IoReceiver implements Runnable, Closeable
{
try
{
- if (shutdownBroken)
+ try
{
- socket.close();
+ if (shutdownBroken)
+ {
+ socket.close();
+ }
+ else
+ {
+ socket.shutdownInput();
+ }
}
- else
+ catch(SocketException se)
{
- socket.shutdownInput();
+ if(!socket.isClosed() && !socket.isInputShutdown())
+ {
+ throw se;
+ }
}
if (block && Thread.currentThread() != receiverThread)
{
@@ -117,6 +127,7 @@ final class IoReceiver implements Runnable, Closeable
{
throw new TransportException(e);
}
+
}
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoSender.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoSender.java
index 1bb515624c..473d4d95ff 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoSender.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoSender.java
@@ -31,6 +31,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.qpid.common.Closeable;
import org.apache.qpid.thread.Threading;
import org.apache.qpid.transport.Sender;
+import org.apache.qpid.transport.SenderClosedException;
import org.apache.qpid.transport.SenderException;
import org.apache.qpid.transport.TransportException;
import org.apache.qpid.transport.util.Logger;
@@ -59,7 +60,7 @@ public final class IoSender implements Runnable, Sender<ByteBuffer>
private final AtomicBoolean closed = new AtomicBoolean(false);
private final Thread senderThread;
private final List<Closeable> _listeners = new ArrayList<Closeable>();
-
+
private volatile Throwable exception = null;
public IoSender(Socket socket, int bufferSize, long timeout)
@@ -80,13 +81,13 @@ public final class IoSender implements Runnable, Sender<ByteBuffer>
try
{
//Create but deliberately don't start the thread.
- senderThread = Threading.getThreadFactory().createThread(this);
+ senderThread = Threading.getThreadFactory().createThread(this);
}
catch(Exception e)
{
throw new Error("Error creating IOSender thread",e);
}
-
+
senderThread.setDaemon(true);
senderThread.setName(String.format("IoSender - %s", socket.getRemoteSocketAddress()));
}
@@ -110,7 +111,7 @@ public final class IoSender implements Runnable, Sender<ByteBuffer>
{
if (closed.get())
{
- throw new SenderException("sender is closed", exception);
+ throw new SenderClosedException("sender is closed", exception);
}
final int size = buffer.length;
@@ -143,7 +144,7 @@ public final class IoSender implements Runnable, Sender<ByteBuffer>
if (closed.get())
{
- throw new SenderException("sender is closed", exception);
+ throw new SenderClosedException("sender is closed", exception);
}
if (head - tail >= size)
@@ -255,7 +256,7 @@ public final class IoSender implements Runnable, Sender<ByteBuffer>
public void run()
{
- final int size = buffer.length;
+ final int size = buffer.length;
while (true)
{
final int hd = head;
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoTransport.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoTransport.java
deleted file mode 100644
index 796a845593..0000000000
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/io/IoTransport.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.qpid.transport.network.io;
-
-import java.net.Socket;
-import java.nio.ByteBuffer;
-
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLEngine;
-
-import org.apache.qpid.ssl.SSLContextFactory;
-import org.apache.qpid.transport.Binding;
-import org.apache.qpid.transport.Sender;
-import org.apache.qpid.transport.TransportException;
-import org.apache.qpid.transport.network.security.ssl.SSLReceiver;
-import org.apache.qpid.transport.network.security.ssl.SSLSender;
-import org.apache.qpid.transport.util.Logger;
-
-/**
- * This class provides a socket based transport using the java.io
- * classes.
- *
- * The following params are configurable via JVM arguments
- * TCP_NO_DELAY - amqj.tcpNoDelay
- * SO_RCVBUF - amqj.receiveBufferSize
- * SO_SNDBUF - amqj.sendBufferSize
- */
-public final class IoTransport<E>
-{
-
- static
- {
- org.apache.mina.common.ByteBuffer.setAllocator
- (new org.apache.mina.common.SimpleByteBufferAllocator());
- org.apache.mina.common.ByteBuffer.setUseDirectBuffers
- (Boolean.getBoolean("amqj.enableDirectBuffers"));
- }
-
- private static final Logger log = Logger.get(IoTransport.class);
-
- private static int DEFAULT_READ_WRITE_BUFFER_SIZE = 64 * 1024;
- private static int readBufferSize = Integer.getInteger
- ("amqj.receiveBufferSize", DEFAULT_READ_WRITE_BUFFER_SIZE);
- private static int writeBufferSize = Integer.getInteger
- ("amqj.sendBufferSize", DEFAULT_READ_WRITE_BUFFER_SIZE);
-
- private Socket socket;
- private Sender<ByteBuffer> sender;
- private E endpoint;
- private IoReceiver receiver;
- private long timeout = 60000;
-
- IoTransport(Socket socket, Binding<E,ByteBuffer> binding, boolean ssl)
- {
- this.socket = socket;
-
- if (ssl)
- {
- setupSSLTransport(socket, binding);
- }
- else
- {
- setupTransport(socket, binding);
- }
- }
-
- private void setupTransport(Socket socket, Binding<E, ByteBuffer> binding)
- {
- IoSender ios = new IoSender(socket, 2*writeBufferSize, timeout);
- ios.initiate();
-
- this.sender = ios;
- this.endpoint = binding.endpoint(sender);
- this.receiver = new IoReceiver(socket, binding.receiver(endpoint),
- 2*readBufferSize, timeout);
- this.receiver.initiate();
-
- ios.registerCloseListener(this.receiver);
- }
-
- private void setupSSLTransport(Socket socket, Binding<E, ByteBuffer> binding)
- {
- SSLEngine engine = null;
- SSLContext sslCtx;
- try
- {
- sslCtx = createSSLContext();
- }
- catch (Exception e)
- {
- throw new TransportException("Error creating SSL Context", e);
- }
-
- try
- {
- engine = sslCtx.createSSLEngine();
- engine.setUseClientMode(true);
- }
- catch(Exception e)
- {
- throw new TransportException("Error creating SSL Engine", e);
- }
- IoSender ios = new IoSender(socket, 2*writeBufferSize, timeout);
- ios.initiate();
- this.sender = new SSLSender(engine,ios);
- this.endpoint = binding.endpoint(sender);
- this.receiver = new IoReceiver(socket, new SSLReceiver(engine,binding.receiver(endpoint),(SSLSender)sender),
- 2*readBufferSize, timeout);
- this.receiver.initiate();
- ios.registerCloseListener(this.receiver);
-
- log.info("SSL Sender and Receiver initiated");
- }
-
- public Sender<ByteBuffer> getSender()
- {
- return sender;
- }
-
- public IoReceiver getReceiver()
- {
- return receiver;
- }
-
- public Socket getSocket()
- {
- return socket;
- }
-
- private SSLContext createSSLContext() throws Exception
- {
- String trustStorePath = System.getProperty("javax.net.ssl.trustStore");
- String trustStorePassword = System.getProperty("javax.net.ssl.trustStorePassword");
- String trustStoreCertType = System.getProperty("qpid.ssl.trustStoreCertType","SunX509");
-
- String keyStorePath = System.getProperty("javax.net.ssl.keyStore",trustStorePath);
- String keyStorePassword = System.getProperty("javax.net.ssl.keyStorePassword",trustStorePassword);
- String keyStoreCertType = System.getProperty("qpid.ssl.keyStoreCertType","SunX509");
-
- SSLContextFactory sslContextFactory = new SSLContextFactory(trustStorePath,trustStorePassword,
- trustStoreCertType,keyStorePath,
- keyStorePassword,keyStoreCertType);
-
- return sslContextFactory.buildServerContext();
-
- }
-
-}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaNetworkConnection.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaNetworkConnection.java
deleted file mode 100644
index 0f433f6eeb..0000000000
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaNetworkConnection.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.transport.network.mina;
-
-import java.net.SocketAddress;
-import java.nio.ByteBuffer;
-
-import org.apache.mina.common.IdleStatus;
-import org.apache.mina.common.IoSession;
-import org.apache.qpid.transport.Sender;
-import org.apache.qpid.transport.network.NetworkConnection;
-
-public class MinaNetworkConnection implements NetworkConnection
-{
- private IoSession _session;
- private Sender<ByteBuffer> _sender;
-
- public MinaNetworkConnection(IoSession session)
- {
- _session = session;
- _sender = new MinaSender(_session);
- }
-
- public Sender<ByteBuffer> getSender()
- {
- return _sender;
- }
-
- public void close()
- {
- _session.close();
- }
-
- public SocketAddress getRemoteAddress()
- {
- return _session.getRemoteAddress();
- }
-
- public SocketAddress getLocalAddress()
- {
- return _session.getLocalAddress();
- }
-
- public long getReadBytes()
- {
- return _session.getReadBytes();
- }
-
- public long getWrittenBytes()
- {
- return _session.getWrittenBytes();
- }
-
- public void setMaxWriteIdle(int sec)
- {
- _session.setIdleTime(IdleStatus.WRITER_IDLE, sec);
- }
-
- public void setMaxReadIdle(int sec)
- {
- _session.setIdleTime(IdleStatus.READER_IDLE, sec);
- }
-}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaNetworkHandler.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaNetworkHandler.java
deleted file mode 100644
index c00187480c..0000000000
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaNetworkHandler.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.qpid.transport.network.mina;
-
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IdleStatus;
-import org.apache.mina.common.IoHandlerAdapter;
-import org.apache.mina.common.IoSession;
-import org.apache.mina.common.SimpleByteBufferAllocator;
-import org.apache.mina.filter.SSLFilter;
-import org.apache.mina.util.SessionUtil;
-import org.apache.qpid.protocol.ProtocolEngine;
-import org.apache.qpid.protocol.ProtocolEngineFactory;
-import org.apache.qpid.ssl.SSLContextFactory;
-import org.apache.qpid.transport.network.NetworkConnection;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MinaNetworkHandler extends IoHandlerAdapter
-{
- private static final Logger LOGGER = LoggerFactory.getLogger(MinaNetworkHandler.class);
-
- private ProtocolEngineFactory _factory;
- private SSLContextFactory _sslFactory = null;
-
- static
- {
- boolean directBuffers = Boolean.getBoolean("amqj.enableDirectBuffers");
- LOGGER.debug("Using " + (directBuffers ? "direct" : "heap") + " buffers");
- ByteBuffer.setUseDirectBuffers(directBuffers);
-
- //override the MINA defaults to prevent use of the PooledByteBufferAllocator
- ByteBuffer.setAllocator(new SimpleByteBufferAllocator());
- }
-
- public MinaNetworkHandler(SSLContextFactory sslFactory, ProtocolEngineFactory factory)
- {
- _sslFactory = sslFactory;
- _factory = factory;
- }
-
- public MinaNetworkHandler(SSLContextFactory sslFactory)
- {
- this(sslFactory, null);
- }
-
- public void messageReceived(IoSession session, Object message)
- {
- ProtocolEngine engine = (ProtocolEngine) session.getAttachment();
- ByteBuffer buf = (ByteBuffer) message;
- try
- {
- engine.received(buf.buf());
- }
- catch (RuntimeException re)
- {
- engine.exception(re);
- }
- }
-
- public void exceptionCaught(IoSession ioSession, Throwable throwable) throws Exception
- {
- ProtocolEngine engine = (ProtocolEngine) ioSession.getAttachment();
- if(engine != null)
- {
- LOGGER.error("Exception caught by Mina", throwable);
- engine.exception(throwable);
- }
- else
- {
- LOGGER.error("Exception caught by Mina but without protocol engine to handle it", throwable);
- }
- }
-
- public void sessionCreated(IoSession ioSession) throws Exception
- {
- if(LOGGER.isDebugEnabled())
- {
- LOGGER.debug("Created session: " + ioSession.getRemoteAddress());
- }
-
- SessionUtil.initialize(ioSession);
-
- if (_sslFactory != null)
- {
- ioSession.getFilterChain().addBefore("protocolFilter", "sslFilter",
- new SSLFilter(_sslFactory.buildServerContext()));
- }
-
- if (_factory != null)
- {
- NetworkConnection netConn = new MinaNetworkConnection(ioSession);
-
- ProtocolEngine engine = _factory.newProtocolEngine(netConn);
- ioSession.setAttachment(engine);
- }
- }
-
- public void sessionClosed(IoSession ioSession) throws Exception
- {
- if(LOGGER.isDebugEnabled())
- {
- LOGGER.debug("closed: " + ioSession.getRemoteAddress());
- }
-
- ProtocolEngine engine = (ProtocolEngine) ioSession.getAttachment();
- if(engine != null)
- {
- engine.closed();
- }
- else
- {
- LOGGER.error("Unable to close ProtocolEngine as none was present");
- }
- }
-
-
- public void sessionIdle(IoSession session, IdleStatus status) throws Exception
- {
- if (IdleStatus.WRITER_IDLE.equals(status))
- {
- ((ProtocolEngine) session.getAttachment()).writerIdle();
- }
- else if (IdleStatus.READER_IDLE.equals(status))
- {
- ((ProtocolEngine) session.getAttachment()).readerIdle();
- }
- }
-
-}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaNetworkTransport.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaNetworkTransport.java
deleted file mode 100644
index d0367b82f4..0000000000
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaNetworkTransport.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
-*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.transport.network.mina;
-
-import static org.apache.qpid.transport.ConnectionSettings.WILDCARD_ADDRESS;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-
-import org.apache.mina.common.ConnectFuture;
-import org.apache.mina.common.ExecutorThreadModel;
-import org.apache.mina.common.IoConnector;
-import org.apache.mina.common.IoSession;
-import org.apache.mina.transport.socket.nio.SocketAcceptor;
-import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
-import org.apache.mina.transport.socket.nio.SocketConnector;
-import org.apache.mina.transport.socket.nio.SocketConnectorConfig;
-import org.apache.mina.transport.socket.nio.SocketSessionConfig;
-import org.apache.mina.util.NewThreadExecutor;
-
-import org.apache.qpid.protocol.ProtocolEngineFactory;
-import org.apache.qpid.ssl.SSLContextFactory;
-import org.apache.qpid.thread.QpidThreadExecutor;
-import org.apache.qpid.transport.ConnectionSettings;
-import org.apache.qpid.transport.NetworkTransportConfiguration;
-import org.apache.qpid.transport.Receiver;
-import org.apache.qpid.transport.SocketConnectorFactory;
-import org.apache.qpid.transport.TransportException;
-import org.apache.qpid.transport.network.IncomingNetworkTransport;
-import org.apache.qpid.transport.network.NetworkConnection;
-import org.apache.qpid.transport.network.OutgoingNetworkTransport;
-import org.apache.qpid.transport.network.Transport;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class MinaNetworkTransport implements OutgoingNetworkTransport, IncomingNetworkTransport
-{
- private static final int UNKNOWN = -1;
- private static final int TCP = 0;
-
- public NetworkConnection _connection;
- private SocketAcceptor _acceptor;
- private InetSocketAddress _address;
-
- public NetworkConnection connect(ConnectionSettings settings,
- Receiver<java.nio.ByteBuffer> delegate, SSLContextFactory sslFactory)
- {
- int transport = getTransport(settings.getProtocol());
-
- IoConnectorCreator stc;
- switch(transport)
- {
- case TCP:
- stc = new IoConnectorCreator(new SocketConnectorFactory()
- {
- public IoConnector newConnector()
- {
- return new SocketConnector(1, new QpidThreadExecutor()); // non-blocking connector
- }
- });
- _connection = stc.connect(delegate, settings, sslFactory);
- break;
- case UNKNOWN:
- default:
- throw new TransportException("Unknown protocol: " + settings.getProtocol());
- }
-
- return _connection;
- }
-
- private static int getTransport(String transport)
- {
- if (transport.equals(Transport.TCP))
- {
- return TCP;
- }
-
- return UNKNOWN;
- }
-
- public void close()
- {
- if(_connection != null)
- {
- _connection.close();
- }
- if (_acceptor != null)
- {
- _acceptor.unbindAll();
- }
- }
-
- public NetworkConnection getConnection()
- {
- return _connection;
- }
-
- public void accept(final NetworkTransportConfiguration config, final ProtocolEngineFactory factory,
- final SSLContextFactory sslFactory)
- {
- int processors = config.getConnectorProcessors();
-
- if (Transport.TCP.equalsIgnoreCase(config.getTransport()))
- {
- _acceptor = new SocketAcceptor(processors, new NewThreadExecutor());
-
- SocketAcceptorConfig sconfig = (SocketAcceptorConfig) _acceptor.getDefaultConfig();
- sconfig.setThreadModel(ExecutorThreadModel.getInstance("MinaNetworkTransport(Acceptor)"));
- SocketSessionConfig sc = (SocketSessionConfig) sconfig.getSessionConfig();
- sc.setTcpNoDelay(config.getTcpNoDelay());
- sc.setSendBufferSize(config.getSendBufferSize());
- sc.setReceiveBufferSize(config.getReceiveBufferSize());
-
- if (config.getHost().equals(WILDCARD_ADDRESS))
- {
- _address = new InetSocketAddress(config.getPort());
- }
- else
- {
- _address = new InetSocketAddress(config.getHost(), config.getPort());
- }
- }
- else
- {
- throw new TransportException("Unknown transport: " + config.getTransport());
- }
-
- try
- {
- _acceptor.bind(_address, new MinaNetworkHandler(sslFactory, factory));
- }
- catch (IOException e)
- {
- throw new TransportException("Could not bind to " + _address, e);
- }
- }
-
-
- private static class IoConnectorCreator
- {
- private static final Logger LOGGER = LoggerFactory.getLogger(IoConnectorCreator.class);
-
- private static final int CLIENT_DEFAULT_BUFFER_SIZE = 32 * 1024;
-
- private SocketConnectorFactory _ioConnectorFactory;
-
- public IoConnectorCreator(SocketConnectorFactory socketConnectorFactory)
- {
- _ioConnectorFactory = socketConnectorFactory;
- }
-
- public NetworkConnection connect(Receiver<java.nio.ByteBuffer> receiver, ConnectionSettings settings, SSLContextFactory sslFactory)
- {
- final IoConnector ioConnector = _ioConnectorFactory.newConnector();
- final SocketAddress address;
- final String protocol = settings.getProtocol();
- final int port = settings.getPort();
-
- if (Transport.TCP.equalsIgnoreCase(protocol))
- {
- address = new InetSocketAddress(settings.getHost(), port);
- }
- else
- {
- throw new TransportException("Unknown transport: " + protocol);
- }
-
- LOGGER.info("Attempting connection to " + address);
-
- if (ioConnector instanceof SocketConnector)
- {
- SocketConnectorConfig cfg = (SocketConnectorConfig) ioConnector.getDefaultConfig();
- cfg.setThreadModel(ExecutorThreadModel.getInstance("MinaNetworkTransport(Client)"));
-
- SocketSessionConfig scfg = (SocketSessionConfig) cfg.getSessionConfig();
- scfg.setTcpNoDelay(true);
- scfg.setSendBufferSize(CLIENT_DEFAULT_BUFFER_SIZE);
- scfg.setReceiveBufferSize(CLIENT_DEFAULT_BUFFER_SIZE);
-
- // Don't have the connector's worker thread wait around for other
- // connections (we only use one SocketConnector per connection
- // at the moment anyway). This allows short-running
- // clients (like unit tests) to complete quickly.
- ((SocketConnector) ioConnector).setWorkerTimeout(0);
- }
-
- ConnectFuture future = ioConnector.connect(address, new MinaNetworkHandler(sslFactory), ioConnector.getDefaultConfig());
- future.join();
- if (!future.isConnected())
- {
- throw new TransportException("Could not open connection");
- }
-
- IoSession session = future.getSession();
- session.setAttachment(receiver);
-
- return new MinaNetworkConnection(session);
- }
- }
-}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaSender.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaSender.java
deleted file mode 100644
index be114e2fa1..0000000000
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/mina/MinaSender.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.transport.network.mina;
-
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.CloseFuture;
-import org.apache.mina.common.IoSession;
-import org.apache.mina.common.WriteFuture;
-import org.apache.qpid.transport.Sender;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * MinaSender
- */
-public class MinaSender implements Sender<java.nio.ByteBuffer>
-{
- private static final Logger _log = LoggerFactory.getLogger(MinaSender.class);
-
- private final IoSession _session;
- private WriteFuture _lastWrite;
-
- public MinaSender(IoSession session)
- {
- _session = session;
- }
-
- public synchronized void send(java.nio.ByteBuffer msg)
- {
- _log.debug("sending data:");
- ByteBuffer mina = ByteBuffer.allocate(msg.limit());
- mina.put(msg);
- mina.flip();
- _lastWrite = _session.write(mina);
- _log.debug("sent data:");
- }
-
- public synchronized void flush()
- {
- if (_lastWrite != null)
- {
- _lastWrite.join();
- }
- }
-
- public void close()
- {
- // MINA will sometimes throw away in-progress writes when you ask it to close
- flush();
- CloseFuture closed = _session.close();
- closed.join();
- }
-
- public void setIdleTimeout(int i)
- {
- //TODO:
- //We are instead using the setMax[Read|Write]IdleTime methods in
- //MinaNetworkConnection for this. Should remove this method from
- //sender interface, but currently being used by IoSender for 0-10.
- }
-}
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/util/MockChannel.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SSLStatus.java
index 9bd1e7c5e1..9db7dd557a 100644
--- a/qpid/java/broker/src/test/java/org/apache/qpid/util/MockChannel.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SSLStatus.java
@@ -1,5 +1,4 @@
/*
- *
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -18,23 +17,33 @@
* under the License.
*
*/
-package org.apache.qpid.util;
-import org.apache.qpid.server.AMQChannel;
-import org.apache.qpid.server.subscription.Subscription;
-import org.apache.qpid.server.store.MessageStore;
-import org.apache.qpid.server.protocol.AMQProtocolSession;
-import org.apache.qpid.AMQException;
-import org.apache.qpid.framing.AMQShortString;
+package org.apache.qpid.transport.network.security;
+
+import java.util.concurrent.atomic.AtomicBoolean;
-public class MockChannel extends AMQChannel
+public class SSLStatus
{
- public MockChannel(AMQProtocolSession session, int channelId, MessageStore messageStore)
- throws AMQException
+ private final Object _sslLock = new Object();
+ private final AtomicBoolean _sslErrorFlag = new AtomicBoolean(false);
+
+ /**
+ * Lock used to coordinate the SSL sender with the SSL receiver.
+ *
+ * @return lock
+ */
+ public Object getSslLock()
{
- super(session, channelId, messageStore);
+ return _sslLock;
}
+ public boolean getSslErrorFlag()
+ {
+ return _sslErrorFlag.get();
+ }
-
+ public void setSslErrorFlag()
+ {
+ _sslErrorFlag.set(true);
+ }
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SecurityLayer.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SecurityLayer.java
index 3f0966903d..9fd65c6e51 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SecurityLayer.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SecurityLayer.java
@@ -25,8 +25,8 @@ import java.nio.ByteBuffer;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLEngine;
+import org.apache.qpid.ssl.SSLContextFactory;
import org.apache.qpid.transport.Connection;
-import org.apache.qpid.transport.ConnectionListener;
import org.apache.qpid.transport.ConnectionSettings;
import org.apache.qpid.transport.Receiver;
import org.apache.qpid.transport.Sender;
@@ -37,149 +37,12 @@ import org.apache.qpid.transport.network.security.ssl.SSLReceiver;
import org.apache.qpid.transport.network.security.ssl.SSLSender;
import org.apache.qpid.transport.network.security.ssl.SSLUtil;
-public class SecurityLayer
+public interface SecurityLayer
{
- ConnectionSettings settings;
- Connection con;
- SSLSecurityLayer sslLayer;
- SASLSecurityLayer saslLayer;
-
- public void init(Connection con) throws TransportException
- {
- this.con = con;
- this.settings = con.getConnectionSettings();
- if (settings.isUseSSL())
- {
- sslLayer = new SSLSecurityLayer();
- }
- if (settings.isUseSASLEncryption())
- {
- saslLayer = new SASLSecurityLayer();
- }
-
- }
-
- public Sender<ByteBuffer> sender(Sender<ByteBuffer> delegate)
- {
- Sender<ByteBuffer> sender = delegate;
-
- if (settings.isUseSSL())
- {
- sender = sslLayer.sender(sender);
- }
-
- if (settings.isUseSASLEncryption())
- {
- sender = saslLayer.sender(sender);
- }
-
- return sender;
- }
-
- public Receiver<ByteBuffer> receiver(Receiver<ByteBuffer> delegate)
- {
- Receiver<ByteBuffer> receiver = delegate;
-
- if (settings.isUseSSL())
- {
- receiver = sslLayer.receiver(receiver);
- }
-
- if (settings.isUseSASLEncryption())
- {
- receiver = saslLayer.receiver(receiver);
- }
-
- return receiver;
- }
-
- public String getUserID()
- {
- if (settings.isUseSSL())
- {
- return sslLayer.getUserID();
- }
- else
- {
- return null;
- }
- }
-
- class SSLSecurityLayer
- {
- SSLEngine engine;
- SSLSender sender;
-
- public SSLSecurityLayer()
- {
- SSLContext sslCtx;
- try
- {
- sslCtx = SSLUtil.createSSLContext(settings);
- }
- catch (Exception e)
- {
- throw new TransportException("Error creating SSL Context", e);
- }
-
- try
- {
- engine = sslCtx.createSSLEngine();
- engine.setUseClientMode(true);
- }
- catch(Exception e)
- {
- throw new TransportException("Error creating SSL Engine", e);
- }
- }
-
- public SSLSender sender(Sender<ByteBuffer> delegate)
- {
- sender = new SSLSender(engine,delegate);
- sender.setConnectionSettings(settings);
- return sender;
- }
-
- public SSLReceiver receiver(Receiver<ByteBuffer> delegate)
- {
- if (sender == null)
- {
- throw new
- IllegalStateException("SecurityLayer.sender method should be " +
- "invoked before SecurityLayer.receiver");
- }
-
- SSLReceiver receiver = new SSLReceiver(engine,delegate,sender);
- receiver.setConnectionSettings(settings);
- return receiver;
- }
-
- public String getUserID()
- {
- return SSLUtil.retriveIdentity(engine);
- }
-
- }
-
- class SASLSecurityLayer
- {
- public SASLSecurityLayer()
- {
- }
-
- public SASLSender sender(Sender<ByteBuffer> delegate)
- {
- SASLSender sender = new SASLSender(delegate);
- con.addConnectionListener((ConnectionListener)sender);
- return sender;
- }
-
- public SASLReceiver receiver(Receiver<ByteBuffer> delegate)
- {
- SASLReceiver receiver = new SASLReceiver(delegate);
- con.addConnectionListener((ConnectionListener)receiver);
- return receiver;
- }
-
- }
+
+ public Sender<ByteBuffer> sender(Sender<ByteBuffer> delegate);
+ public Receiver<ByteBuffer> receiver(Receiver<ByteBuffer> delegate);
+ public String getUserID();
+
}
+
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SecurityLayerFactory.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SecurityLayerFactory.java
new file mode 100644
index 0000000000..17f89c34ef
--- /dev/null
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/SecurityLayerFactory.java
@@ -0,0 +1,161 @@
+package org.apache.qpid.transport.network.security;
+
+import org.apache.qpid.ssl.SSLContextFactory;
+import org.apache.qpid.transport.*;
+import org.apache.qpid.transport.network.security.sasl.SASLReceiver;
+import org.apache.qpid.transport.network.security.sasl.SASLSender;
+import org.apache.qpid.transport.network.security.ssl.SSLReceiver;
+import org.apache.qpid.transport.network.security.ssl.SSLSender;
+import org.apache.qpid.transport.network.security.ssl.SSLUtil;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLEngine;
+import java.nio.ByteBuffer;
+
+public class SecurityLayerFactory
+{
+ public static SecurityLayer newInstance(ConnectionSettings settings)
+ {
+
+ SecurityLayer layer = NullSecurityLayer.getInstance();
+
+ if (settings.isUseSSL())
+ {
+ layer = new SSLSecurityLayer(settings, layer);
+ }
+ if (settings.isUseSASLEncryption())
+ {
+ layer = new SASLSecurityLayer(layer);
+ }
+
+ return layer;
+
+ }
+
+ static class SSLSecurityLayer implements SecurityLayer
+ {
+
+ private final SSLEngine _engine;
+ private final SSLStatus _sslStatus = new SSLStatus();
+ private String _hostname;
+ private SecurityLayer _layer;
+
+
+ public SSLSecurityLayer(ConnectionSettings settings, SecurityLayer layer)
+ {
+
+ SSLContext sslCtx;
+ _layer = layer;
+ try
+ {
+ sslCtx = SSLContextFactory
+ .buildClientContext(settings.getTrustStorePath(),
+ settings.getTrustStorePassword(),
+ settings.getTrustStoreCertType(),
+ settings.getKeyStorePath(),
+ settings.getKeyStorePassword(),
+ settings.getKeyStoreCertType(),
+ settings.getCertAlias());
+ }
+ catch (Exception e)
+ {
+ throw new TransportException("Error creating SSL Context", e);
+ }
+
+ if(settings.isVerifyHostname())
+ {
+ _hostname = settings.getHost();
+ }
+
+ try
+ {
+ _engine = sslCtx.createSSLEngine();
+ _engine.setUseClientMode(true);
+ }
+ catch(Exception e)
+ {
+ throw new TransportException("Error creating SSL Engine", e);
+ }
+
+ }
+
+ public Sender<ByteBuffer> sender(Sender<ByteBuffer> delegate)
+ {
+ SSLSender sender = new SSLSender(_engine, _layer.sender(delegate), _sslStatus);
+ sender.setHostname(_hostname);
+ return sender;
+ }
+
+ public Receiver<ByteBuffer> receiver(Receiver<ByteBuffer> delegate)
+ {
+ SSLReceiver receiver = new SSLReceiver(_engine, _layer.receiver(delegate), _sslStatus);
+ receiver.setHostname(_hostname);
+ return receiver;
+ }
+
+ public String getUserID()
+ {
+ return SSLUtil.retriveIdentity(_engine);
+ }
+ }
+
+
+ static class SASLSecurityLayer implements SecurityLayer
+ {
+
+ private SecurityLayer _layer;
+
+ SASLSecurityLayer(SecurityLayer layer)
+ {
+ _layer = layer;
+ }
+
+ public SASLSender sender(Sender<ByteBuffer> delegate)
+ {
+ SASLSender sender = new SASLSender(_layer.sender(delegate));
+ return sender;
+ }
+
+ public SASLReceiver receiver(Receiver<ByteBuffer> delegate)
+ {
+ SASLReceiver receiver = new SASLReceiver(_layer.receiver(delegate));
+ return receiver;
+ }
+
+ public String getUserID()
+ {
+ return _layer.getUserID();
+ }
+ }
+
+
+ static class NullSecurityLayer implements SecurityLayer
+ {
+
+ private static final NullSecurityLayer INSTANCE = new NullSecurityLayer();
+
+ private NullSecurityLayer()
+ {
+ }
+
+ public Sender<ByteBuffer> sender(Sender<ByteBuffer> delegate)
+ {
+ return delegate;
+ }
+
+ public Receiver<ByteBuffer> receiver(Receiver<ByteBuffer> delegate)
+ {
+ return delegate;
+ }
+
+ public String getUserID()
+ {
+ return null;
+ }
+
+ public static NullSecurityLayer getInstance()
+ {
+ return INSTANCE;
+ }
+ }
+}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/QpidClientX509KeyManager.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/QpidClientX509KeyManager.java
index 0dd86d4560..4391e8adfc 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/QpidClientX509KeyManager.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/QpidClientX509KeyManager.java
@@ -20,7 +20,9 @@
*/
package org.apache.qpid.transport.network.security.ssl;
+import java.io.IOException;
import java.net.Socket;
+import java.security.GeneralSecurityException;
import java.security.KeyStore;
import java.security.Principal;
import java.security.PrivateKey;
@@ -40,7 +42,7 @@ public class QpidClientX509KeyManager extends X509ExtendedKeyManager
String alias;
public QpidClientX509KeyManager(String alias, String keyStorePath,
- String keyStorePassword,String keyStoreCertType) throws Exception
+ String keyStorePassword,String keyStoreCertType) throws GeneralSecurityException, IOException
{
this.alias = alias;
KeyStore ks = SSLUtil.getInitializedKeyStore(keyStorePath,keyStorePassword);
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLReceiver.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLReceiver.java
index e227a51729..8ad40bbfd3 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLReceiver.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLReceiver.java
@@ -24,43 +24,43 @@ import java.nio.ByteBuffer;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLEngineResult;
-import javax.net.ssl.SSLException;
import javax.net.ssl.SSLEngineResult.HandshakeStatus;
import javax.net.ssl.SSLEngineResult.Status;
+import javax.net.ssl.SSLException;
import org.apache.qpid.transport.ConnectionSettings;
import org.apache.qpid.transport.Receiver;
import org.apache.qpid.transport.TransportException;
+import org.apache.qpid.transport.network.security.SSLStatus;
import org.apache.qpid.transport.util.Logger;
public class SSLReceiver implements Receiver<ByteBuffer>
{
- private Receiver<ByteBuffer> delegate;
- private SSLEngine engine;
- private SSLSender sender;
- private int sslBufSize;
+ private static final Logger log = Logger.get(SSLReceiver.class);
+
+ private final Receiver<ByteBuffer> delegate;
+ private final SSLEngine engine;
+ private final int sslBufSize;
+ private final ByteBuffer localBuffer;
+ private final SSLStatus _sslStatus;
private ByteBuffer appData;
- private ByteBuffer localBuffer;
private boolean dataCached = false;
- private final Object notificationToken;
- private ConnectionSettings settings;
-
- private static final Logger log = Logger.get(SSLReceiver.class);
- public SSLReceiver(SSLEngine engine, Receiver<ByteBuffer> delegate,SSLSender sender)
+ private String _hostname;
+
+ public SSLReceiver(final SSLEngine engine, final Receiver<ByteBuffer> delegate, final SSLStatus sslStatus)
{
this.engine = engine;
this.delegate = delegate;
- this.sender = sender;
this.sslBufSize = engine.getSession().getApplicationBufferSize();
appData = ByteBuffer.allocate(sslBufSize);
localBuffer = ByteBuffer.allocate(sslBufSize);
- notificationToken = sender.getNotificationToken();
+ _sslStatus = sslStatus;
}
- public void setConnectionSettings(ConnectionSettings settings)
+ public void setHostname(String hostname)
{
- this.settings = settings;
+ _hostname = hostname;
}
public void closed()
@@ -102,9 +102,9 @@ public class SSLReceiver implements Receiver<ByteBuffer>
try
{
SSLEngineResult result = engine.unwrap(netData, appData);
- synchronized (notificationToken)
+ synchronized (_sslStatus.getSslLock())
{
- notificationToken.notifyAll();
+ _sslStatus.getSslLock().notifyAll();
}
int read = result.bytesProduced();
@@ -129,9 +129,9 @@ public class SSLReceiver implements Receiver<ByteBuffer>
switch(status)
{
case CLOSED:
- synchronized(notificationToken)
+ synchronized(_sslStatus.getSslLock())
{
- notificationToken.notifyAll();
+ _sslStatus.getSslLock().notifyAll();
}
return;
@@ -163,20 +163,20 @@ public class SSLReceiver implements Receiver<ByteBuffer>
break;
case NEED_TASK:
- sender.doTasks();
+ doTasks();
handshakeStatus = engine.getHandshakeStatus();
case FINISHED:
- if (this.settings != null && this.settings.isVerifyHostname() )
+ if (_hostname != null)
{
- SSLUtil.verifyHostname(engine, this.settings.getHost());
+ SSLUtil.verifyHostname(engine, _hostname);
}
case NEED_WRAP:
case NOT_HANDSHAKING:
- synchronized(notificationToken)
+ synchronized(_sslStatus.getSslLock())
{
- notificationToken.notifyAll();
+ _sslStatus.getSslLock().notifyAll();
}
break;
@@ -189,14 +189,23 @@ public class SSLReceiver implements Receiver<ByteBuffer>
catch(SSLException e)
{
log.error(e, "Error caught in SSLReceiver");
- sender.setErrorFlag();
- synchronized(notificationToken)
+ _sslStatus.setSslErrorFlag();
+ synchronized(_sslStatus.getSslLock())
{
- notificationToken.notifyAll();
+ _sslStatus.getSslLock().notifyAll();
}
exception(new TransportException("Error in SSLReceiver",e));
}
}
}
+
+ private void doTasks()
+ {
+ Runnable runnable;
+ while ((runnable = engine.getDelegatedTask()) != null) {
+ runnable.run();
+ }
+ }
+
}
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLSender.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLSender.java
index cd47a11825..6f5aa6d86e 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLSender.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLSender.java
@@ -31,35 +31,38 @@ import javax.net.ssl.SSLEngineResult.Status;
import org.apache.qpid.transport.ConnectionSettings;
import org.apache.qpid.transport.Sender;
import org.apache.qpid.transport.SenderException;
+import org.apache.qpid.transport.network.security.SSLStatus;
import org.apache.qpid.transport.util.Logger;
public class SSLSender implements Sender<ByteBuffer>
{
- private Sender<ByteBuffer> delegate;
- private SSLEngine engine;
- private int sslBufSize;
- private ByteBuffer netData;
- private long timeout = 30000;
- private ConnectionSettings settings;
-
- private final Object engineState = new Object();
+ private static final Logger log = Logger.get(SSLSender.class);
+
+ private final Sender<ByteBuffer> delegate;
+ private final SSLEngine engine;
+ private final int sslBufSize;
+ private final ByteBuffer netData;
+ private final long timeout;
+ private final SSLStatus _sslStatus;
+
+ private String _hostname;
+
private final AtomicBoolean closed = new AtomicBoolean(false);
- private final AtomicBoolean error = new AtomicBoolean(false);
- private static final Logger log = Logger.get(SSLSender.class);
- public SSLSender(SSLEngine engine, Sender<ByteBuffer> delegate)
+ public SSLSender(SSLEngine engine, Sender<ByteBuffer> delegate, SSLStatus sslStatus)
{
this.engine = engine;
this.delegate = delegate;
sslBufSize = engine.getSession().getPacketBufferSize();
netData = ByteBuffer.allocate(sslBufSize);
timeout = Long.getLong("qpid.ssl_timeout", 60000);
+ _sslStatus = sslStatus;
}
- public void setConnectionSettings(ConnectionSettings settings)
+ public void setHostname(String hostname)
{
- this.settings = settings;
+ _hostname = hostname;
}
public void close()
@@ -83,13 +86,13 @@ public class SSLSender implements Sender<ByteBuffer>
}
- synchronized(engineState)
+ synchronized(_sslStatus.getSslLock())
{
while (!engine.isOutboundDone())
{
try
{
- engineState.wait();
+ _sslStatus.getSslLock().wait();
}
catch(InterruptedException e)
{
@@ -148,7 +151,7 @@ public class SSLSender implements Sender<ByteBuffer>
HandshakeStatus handshakeStatus;
Status status;
- while(appData.hasRemaining() && !error.get())
+ while(appData.hasRemaining() && !_sslStatus.getSslErrorFlag())
{
int read = 0;
try
@@ -160,6 +163,7 @@ public class SSLSender implements Sender<ByteBuffer>
}
catch(SSLException e)
{
+ // Should this set _sslError??
throw new SenderException("SSL, Error occurred while encrypting data",e);
}
@@ -207,7 +211,7 @@ public class SSLSender implements Sender<ByteBuffer>
case NEED_UNWRAP:
flush();
- synchronized(engineState)
+ synchronized(_sslStatus.getSslLock())
{
switch (engine.getHandshakeStatus())
{
@@ -215,7 +219,7 @@ public class SSLSender implements Sender<ByteBuffer>
long start = System.currentTimeMillis();
try
{
- engineState.wait(timeout);
+ _sslStatus.getSslLock().wait(timeout);
}
catch(InterruptedException e)
{
@@ -234,9 +238,9 @@ public class SSLSender implements Sender<ByteBuffer>
break;
case FINISHED:
- if (this.settings != null && this.settings.isVerifyHostname() )
+ if (_hostname != null)
{
- SSLUtil.verifyHostname(engine, this.settings.getHost());
+ SSLUtil.verifyHostname(engine, _hostname);
}
case NOT_HANDSHAKING:
@@ -249,7 +253,7 @@ public class SSLSender implements Sender<ByteBuffer>
}
}
- public void doTasks()
+ private void doTasks()
{
Runnable runnable;
while ((runnable = engine.getDelegatedTask()) != null) {
@@ -257,16 +261,6 @@ public class SSLSender implements Sender<ByteBuffer>
}
}
- public Object getNotificationToken()
- {
- return engineState;
- }
-
- public void setErrorFlag()
- {
- error.set(true);
- }
-
public void setIdleTimeout(int i)
{
delegate.setIdleTimeout(i);
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java
index fd73915b65..6bb038a581 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/transport/network/security/ssl/SSLUtil.java
@@ -125,38 +125,6 @@ public class SSLUtil
return id.toString();
}
- public static SSLContext createSSLContext(ConnectionSettings settings) throws Exception
- {
- SSLContextFactory sslContextFactory;
-
- if (settings.getCertAlias() == null)
- {
- sslContextFactory =
- new SSLContextFactory(settings.getTrustStorePath(),
- settings.getTrustStorePassword(),
- settings.getTrustStoreCertType(),
- settings.getKeyStorePath(),
- settings.getKeyStorePassword(),
- settings.getKeyStoreCertType());
-
- } else
- {
- sslContextFactory =
- new SSLContextFactory(settings.getTrustStorePath(),
- settings.getTrustStorePassword(),
- settings.getTrustStoreCertType(),
- new QpidClientX509KeyManager(settings.getCertAlias(),
- settings.getKeyStorePath(),
- settings.getKeyStorePassword(),
- settings.getKeyStoreCertType()));
-
- log.debug("Using custom key manager");
- }
-
- return sslContextFactory.buildServerContext();
-
- }
-
public static KeyStore getInitializedKeyStore(String storePath, String storePassword) throws GeneralSecurityException, IOException
{
KeyStore ks = KeyStore.getInstance("JKS");
@@ -176,7 +144,10 @@ public class SSLUtil
{
throw new IOException("Unable to load keystore resource: " + storePath);
}
- ks.load(in, storePassword.toCharArray());
+
+ char[] storeCharPassword = storePassword == null ? null : storePassword.toCharArray();
+
+ ks.load(in, storeCharPassword);
}
finally
{
diff --git a/qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java b/qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java
index 1a57af9bf7..ac8e3da3c2 100644
--- a/qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java
+++ b/qpid/java/common/src/main/java/org/apache/qpid/util/FileUtils.java
@@ -143,8 +143,9 @@ public class FileUtils
}
/**
- * Either opens the specified filename as an input stream, or uses the default resource loaded using the
- * specified class loader, if opening the file fails or no file name is specified.
+ * Either opens the specified filename as an input stream or either the filesystem or classpath,
+ * or uses the default resource loaded using the specified class loader, if opening the file fails
+ * or no file name is specified.
*
* @param filename The name of the file to open.
* @param defaultResource The name of the default resource on the classpath if the file cannot be opened.
@@ -156,28 +157,28 @@ public class FileUtils
{
InputStream is = null;
- // Flag to indicate whether the default resource should be used. By default this is true, so that the default
- // is used when opening the file fails.
- boolean useDefault = true;
-
// Try to open the file if one was specified.
if (filename != null)
{
+ // try on filesystem
try
{
is = new BufferedInputStream(new FileInputStream(new File(filename)));
-
- // Clear the default flag because the file was succesfully opened.
- useDefault = false;
}
catch (FileNotFoundException e)
{
- // Ignore this exception, the default will be used instead.
+ is = null;
+ }
+
+ if (is == null)
+ {
+ // failed on filesystem, so try on classpath
+ is = cl.getResourceAsStream(filename);
}
}
// Load the default resource if a file was not specified, or if opening the file failed.
- if (useDefault)
+ if (is == null)
{
is = cl.getResourceAsStream(defaultResource);
}
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/codec/AMQDecoderTest.java b/qpid/java/common/src/test/java/org/apache/qpid/codec/AMQDecoderTest.java
index 62e25e7d79..272eb75800 100644
--- a/qpid/java/common/src/test/java/org/apache/qpid/codec/AMQDecoderTest.java
+++ b/qpid/java/common/src/test/java/org/apache/qpid/codec/AMQDecoderTest.java
@@ -21,6 +21,9 @@ package org.apache.qpid.codec;
*/
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
@@ -46,9 +49,16 @@ public class AMQDecoderTest extends TestCase
}
- public void testSingleFrameDecode() throws AMQProtocolVersionException, AMQFrameDecodingException
+ private ByteBuffer getHeartbeatBodyBuffer() throws IOException
{
- ByteBuffer msg = HeartbeatBody.FRAME.toNioByteBuffer();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ HeartbeatBody.FRAME.writePayload(new DataOutputStream(baos));
+ return ByteBuffer.wrap(baos.toByteArray());
+ }
+
+ public void testSingleFrameDecode() throws AMQProtocolVersionException, AMQFrameDecodingException, IOException
+ {
+ ByteBuffer msg = getHeartbeatBodyBuffer();
ArrayList<AMQDataBlock> frames = _decoder.decodeBuffer(msg);
if (frames.get(0) instanceof AMQFrame)
{
@@ -60,9 +70,9 @@ public class AMQDecoderTest extends TestCase
}
}
- public void testPartialFrameDecode() throws AMQProtocolVersionException, AMQFrameDecodingException
+ public void testPartialFrameDecode() throws AMQProtocolVersionException, AMQFrameDecodingException, IOException
{
- ByteBuffer msg = HeartbeatBody.FRAME.toNioByteBuffer();
+ ByteBuffer msg = getHeartbeatBodyBuffer();
ByteBuffer msgA = msg.slice();
int msgbPos = msg.remaining() / 2;
int msgaLimit = msg.remaining() - msgbPos;
@@ -83,10 +93,10 @@ public class AMQDecoderTest extends TestCase
}
}
- public void testMultipleFrameDecode() throws AMQProtocolVersionException, AMQFrameDecodingException
+ public void testMultipleFrameDecode() throws AMQProtocolVersionException, AMQFrameDecodingException, IOException
{
- ByteBuffer msgA = HeartbeatBody.FRAME.toNioByteBuffer();
- ByteBuffer msgB = HeartbeatBody.FRAME.toNioByteBuffer();
+ ByteBuffer msgA = getHeartbeatBodyBuffer();
+ ByteBuffer msgB = getHeartbeatBodyBuffer();
ByteBuffer msg = ByteBuffer.allocate(msgA.remaining() + msgB.remaining());
msg.put(msgA);
msg.put(msgB);
@@ -106,11 +116,11 @@ public class AMQDecoderTest extends TestCase
}
}
- public void testMultiplePartialFrameDecode() throws AMQProtocolVersionException, AMQFrameDecodingException
+ public void testMultiplePartialFrameDecode() throws AMQProtocolVersionException, AMQFrameDecodingException, IOException
{
- ByteBuffer msgA = HeartbeatBody.FRAME.toNioByteBuffer();
- ByteBuffer msgB = HeartbeatBody.FRAME.toNioByteBuffer();
- ByteBuffer msgC = HeartbeatBody.FRAME.toNioByteBuffer();
+ ByteBuffer msgA = getHeartbeatBodyBuffer();
+ ByteBuffer msgB = getHeartbeatBodyBuffer();
+ ByteBuffer msgC = getHeartbeatBodyBuffer();
ByteBuffer sliceA = ByteBuffer.allocate(msgA.remaining() + msgB.remaining() / 2);
sliceA.put(msgA);
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/framing/BasicContentHeaderPropertiesTest.java b/qpid/java/common/src/test/java/org/apache/qpid/framing/BasicContentHeaderPropertiesTest.java
index 4fd1f60d69..5e7783f492 100644
--- a/qpid/java/common/src/test/java/org/apache/qpid/framing/BasicContentHeaderPropertiesTest.java
+++ b/qpid/java/common/src/test/java/org/apache/qpid/framing/BasicContentHeaderPropertiesTest.java
@@ -20,10 +20,10 @@
*/
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
-
import junit.framework.TestCase;
+import java.io.*;
+
public class BasicContentHeaderPropertiesTest extends TestCase
{
@@ -76,15 +76,14 @@ public class BasicContentHeaderPropertiesTest extends TestCase
assertEquals(99, _testProperties.getPropertyFlags());
}
- public void testWritePropertyListPayload()
+ public void testWritePropertyListPayload() throws IOException
{
- ByteBuffer buf = ByteBuffer.allocate(300);
- _testProperties.writePropertyListPayload(buf);
+ _testProperties.writePropertyListPayload(new DataOutputStream(new ByteArrayOutputStream(300)));
}
public void testPopulatePropertiesFromBuffer() throws Exception
{
- ByteBuffer buf = ByteBuffer.allocate(300);
+ DataInputStream buf = new DataInputStream(new ByteArrayInputStream(new byte[300]));
_testProperties.populatePropertiesFromBuffer(buf, 99, 99);
}
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java b/qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java
index d4691ba097..bb4c9c3884 100644
--- a/qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java
+++ b/qpid/java/common/src/test/java/org/apache/qpid/framing/PropertyFieldTableTest.java
@@ -23,14 +23,14 @@ package org.apache.qpid.framing;
import junit.framework.Assert;
import junit.framework.TestCase;
-import org.apache.mina.common.ByteBuffer;
-
import org.apache.qpid.AMQInvalidArgumentException;
import org.apache.qpid.AMQPInvalidClassException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.*;
+
public class PropertyFieldTableTest extends TestCase
{
private static final Logger _logger = LoggerFactory.getLogger(PropertyFieldTableTest.class);
@@ -441,7 +441,7 @@ public class PropertyFieldTableTest extends TestCase
}
/** Check that a nested field table parameter correctly encodes and decodes to a byte buffer. */
- public void testNestedFieldTable()
+ public void testNestedFieldTable() throws IOException
{
byte[] testBytes = new byte[] { 0, 1, 2, 3, 4, 5 };
@@ -465,14 +465,16 @@ public class PropertyFieldTableTest extends TestCase
outerTable.setFieldTable("innerTable", innerTable);
// Write the outer table into the buffer.
- final ByteBuffer buffer = ByteBuffer.allocate((int) outerTable.getEncodedSize() + 4);
- outerTable.writeToBuffer(buffer);
- buffer.flip();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ outerTable.writeToBuffer(new DataOutputStream(baos));
+
+ byte[] data = baos.toByteArray();
// Extract the table back from the buffer again.
try
{
- FieldTable extractedOuterTable = EncodingUtils.readFieldTable(buffer);
+ FieldTable extractedOuterTable = EncodingUtils.readFieldTable(new DataInputStream(new ByteArrayInputStream(data)));
FieldTable extractedTable = extractedOuterTable.getFieldTable("innerTable");
@@ -567,7 +569,7 @@ public class PropertyFieldTableTest extends TestCase
Assert.assertEquals("Hello", table.getObject("object-string"));
}
- public void testwriteBuffer()
+ public void testwriteBuffer() throws IOException
{
byte[] bytes = { 99, 98, 97, 96, 95 };
@@ -585,15 +587,17 @@ public class PropertyFieldTableTest extends TestCase
table.setString("string", "hello");
table.setString("null-string", null);
- final ByteBuffer buffer = ByteBuffer.allocate((int) table.getEncodedSize() + 4); // FIXME XXX: Is cast a problem?
- table.writeToBuffer(buffer);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream((int) table.getEncodedSize() + 4);
+ table.writeToBuffer(new DataOutputStream(baos));
+
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+ DataInputStream dis = new DataInputStream(bais);
- buffer.flip();
- long length = buffer.getUnsignedInt();
+ long length = dis.readInt() & 0xFFFFFFFFL;
- FieldTable table2 = new FieldTable(buffer, length);
+ FieldTable table2 = new FieldTable(dis, length);
Assert.assertEquals((Boolean) true, table2.getBoolean("bool"));
Assert.assertEquals((Byte) Byte.MAX_VALUE, table2.getByte("byte"));
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/session/TestSession.java b/qpid/java/common/src/test/java/org/apache/qpid/session/TestSession.java
deleted file mode 100644
index aafc91b03b..0000000000
--- a/qpid/java/common/src/test/java/org/apache/qpid/session/TestSession.java
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.session;
-
-import org.apache.mina.common.*;
-
-import java.net.SocketAddress;
-import java.util.Set;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ConcurrentHashMap;
-
-public class TestSession implements IoSession
-{
- private final ConcurrentMap attributes = new ConcurrentHashMap();
-
- public TestSession()
- {
- }
-
- public IoService getService()
- {
- return null; //TODO
- }
-
- public IoServiceConfig getServiceConfig()
- {
- return null; //TODO
- }
-
- public IoHandler getHandler()
- {
- return null; //TODO
- }
-
- public IoSessionConfig getConfig()
- {
- return null; //TODO
- }
-
- public IoFilterChain getFilterChain()
- {
- return null; //TODO
- }
-
- public WriteFuture write(Object message)
- {
- return null; //TODO
- }
-
- public CloseFuture close()
- {
- return null; //TODO
- }
-
- public Object getAttachment()
- {
- return getAttribute("");
- }
-
- public Object setAttachment(Object attachment)
- {
- return setAttribute("",attachment);
- }
-
- public Object getAttribute(String key)
- {
- return attributes.get(key);
- }
-
- public Object setAttribute(String key, Object value)
- {
- return attributes.put(key,value);
- }
-
- public Object setAttribute(String key)
- {
- return attributes.put(key, Boolean.TRUE);
- }
-
- public Object removeAttribute(String key)
- {
- return attributes.remove(key);
- }
-
- public boolean containsAttribute(String key)
- {
- return attributes.containsKey(key);
- }
-
- public Set getAttributeKeys()
- {
- return attributes.keySet();
- }
-
- public TransportType getTransportType()
- {
- return null; //TODO
- }
-
- public boolean isConnected()
- {
- return false; //TODO
- }
-
- public boolean isClosing()
- {
- return false; //TODO
- }
-
- public CloseFuture getCloseFuture()
- {
- return null; //TODO
- }
-
- public SocketAddress getRemoteAddress()
- {
- return null; //TODO
- }
-
- public SocketAddress getLocalAddress()
- {
- return null; //TODO
- }
-
- public SocketAddress getServiceAddress()
- {
- return null; //TODO
- }
-
- public int getIdleTime(IdleStatus status)
- {
- return 0; //TODO
- }
-
- public long getIdleTimeInMillis(IdleStatus status)
- {
- return 0; //TODO
- }
-
- public void setIdleTime(IdleStatus status, int idleTime)
- {
- //TODO
- }
-
- public int getWriteTimeout()
- {
- return 0; //TODO
- }
-
- public long getWriteTimeoutInMillis()
- {
- return 0; //TODO
- }
-
- public void setWriteTimeout(int writeTimeout)
- {
- //TODO
- }
-
- public TrafficMask getTrafficMask()
- {
- return null; //TODO
- }
-
- public void setTrafficMask(TrafficMask trafficMask)
- {
- //TODO
- }
-
- public void suspendRead()
- {
- //TODO
- }
-
- public void suspendWrite()
- {
- //TODO
- }
-
- public void resumeRead()
- {
- //TODO
- }
-
- public void resumeWrite()
- {
- //TODO
- }
-
- public long getReadBytes()
- {
- return 0; //TODO
- }
-
- public long getWrittenBytes()
- {
- return 0; //TODO
- }
-
- public long getReadMessages()
- {
- return 0;
- }
-
- public long getWrittenMessages()
- {
- return 0;
- }
-
- public long getWrittenWriteRequests()
- {
- return 0; //TODO
- }
-
- public int getScheduledWriteRequests()
- {
- return 0; //TODO
- }
-
- public int getScheduledWriteBytes()
- {
- return 0; //TODO
- }
-
- public long getCreationTime()
- {
- return 0; //TODO
- }
-
- public long getLastIoTime()
- {
- return 0; //TODO
- }
-
- public long getLastReadTime()
- {
- return 0; //TODO
- }
-
- public long getLastWriteTime()
- {
- return 0; //TODO
- }
-
- public boolean isIdle(IdleStatus status)
- {
- return false; //TODO
- }
-
- public int getIdleCount(IdleStatus status)
- {
- return 0; //TODO
- }
-
- public long getLastIdleTime(IdleStatus status)
- {
- return 0; //TODO
- }
-}
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/ssl/SSLContextFactoryTest.java b/qpid/java/common/src/test/java/org/apache/qpid/ssl/SSLContextFactoryTest.java
new file mode 100644
index 0000000000..288946e064
--- /dev/null
+++ b/qpid/java/common/src/test/java/org/apache/qpid/ssl/SSLContextFactoryTest.java
@@ -0,0 +1,84 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.qpid.ssl;
+
+import java.io.IOException;
+
+import javax.net.ssl.SSLContext;
+
+import org.apache.qpid.test.utils.QpidTestCase;
+
+public class SSLContextFactoryTest extends QpidTestCase
+{
+ private static final String BROKER_KEYSTORE_PATH = TEST_RESOURCES_DIR + "/ssl/java_broker_keystore.jks";
+ private static final String CLIENT_KEYSTORE_PATH = TEST_RESOURCES_DIR + "/ssl/java_client_keystore.jks";
+ private static final String CLIENT_TRUSTSTORE_PATH = TEST_RESOURCES_DIR + "/ssl/java_client_truststore.jks";
+ private static final String STORE_PASSWORD = "password";
+ private static final String CERT_TYPE = "SunX509";
+ private static final String CERT_ALIAS_APP1 = "app1";
+
+ public void testBuildServerContext() throws Exception
+ {
+ SSLContext context = SSLContextFactory.buildServerContext(BROKER_KEYSTORE_PATH, STORE_PASSWORD, CERT_TYPE);
+ assertNotNull("SSLContext should not be null", context);
+ }
+
+ public void testBuildServerContextWithIncorrectPassword() throws Exception
+ {
+ try
+ {
+ SSLContextFactory.buildServerContext(BROKER_KEYSTORE_PATH, "sajdklsad", CERT_TYPE);
+ fail("Exception was not thrown due to incorrect password");
+ }
+ catch (IOException e)
+ {
+ //expected
+ }
+ }
+
+ public void testTrustStoreDoesNotExist() throws Exception
+ {
+ try
+ {
+ SSLContextFactory.buildClientContext("/path/to/nothing", STORE_PASSWORD, CERT_TYPE, CLIENT_KEYSTORE_PATH, STORE_PASSWORD, CERT_TYPE, null);
+ fail("Exception was not thrown due to incorrect path");
+ }
+ catch (IOException e)
+ {
+ //expected
+ }
+ }
+
+ public void testBuildClientContextForSSLEncryptionOnly() throws Exception
+ {
+ SSLContext context = SSLContextFactory.buildClientContext(CLIENT_TRUSTSTORE_PATH, STORE_PASSWORD, CERT_TYPE, null, null, null, null);
+ assertNotNull("SSLContext should not be null", context);
+ }
+
+ public void testBuildClientContextWithForClientAuth() throws Exception
+ {
+ SSLContext context = SSLContextFactory.buildClientContext(CLIENT_TRUSTSTORE_PATH, STORE_PASSWORD, CERT_TYPE, CLIENT_KEYSTORE_PATH, STORE_PASSWORD, CERT_TYPE, null);
+ assertNotNull("SSLContext should not be null", context);
+ }
+
+ public void testBuildClientContextWithForClientAuthWithCertAlias() throws Exception
+ {
+ SSLContext context = SSLContextFactory.buildClientContext(CLIENT_TRUSTSTORE_PATH, STORE_PASSWORD, CERT_TYPE, CLIENT_KEYSTORE_PATH, STORE_PASSWORD, CERT_TYPE, CERT_ALIAS_APP1);
+ assertNotNull("SSLContext should not be null", context);
+ }
+}
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/test/utils/QpidTestCase.java b/qpid/java/common/src/test/java/org/apache/qpid/test/utils/QpidTestCase.java
index 808374b06e..bde8bc68ad 100644
--- a/qpid/java/common/src/test/java/org/apache/qpid/test/utils/QpidTestCase.java
+++ b/qpid/java/common/src/test/java/org/apache/qpid/test/utils/QpidTestCase.java
@@ -24,18 +24,28 @@ import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
+import java.net.DatagramSocket;
+import java.net.ServerSocket;
+import java.util.*;
import junit.framework.TestCase;
import junit.framework.TestResult;
+import org.apache.log4j.Level;
import org.apache.log4j.Logger;
-import org.apache.mina.util.AvailablePortFinder;
+
public class QpidTestCase extends TestCase
{
- protected static final Logger _logger = Logger.getLogger(QpidTestCase.class);
+ public static final String QPID_HOME = System.getProperty("QPID_HOME");
+ public static final String TEST_RESOURCES_DIR = QPID_HOME + "/../test-profiles/test_resources/";
+
+ private static final Logger _logger = Logger.getLogger(QpidTestCase.class);
+
+ private final Map<Logger, Level> _loggerLevelSetForTest = new HashMap<Logger, Level>();
+ private final Map<String, String> _propertiesSetForTest = new HashMap<String, String>();
+
+ private String _testName;
/**
* Some tests are excluded when the property test.excludes is set to true.
@@ -129,8 +139,186 @@ public class QpidTestCase extends TestCase
return storeClass != null ? storeClass : MEMORY_STORE_CLASS_NAME ;
}
+
+ public static final int MIN_PORT_NUMBER = 1;
+ public static final int MAX_PORT_NUMBER = 49151;
+
+
+ /**
+ * Gets the next available port starting at a port.
+ *
+ * @param fromPort the port to scan for availability
+ * @throws NoSuchElementException if there are no ports available
+ */
+ protected int getNextAvailable(int fromPort)
+ {
+ if ((fromPort < MIN_PORT_NUMBER) || (fromPort > MAX_PORT_NUMBER))
+ {
+ throw new IllegalArgumentException("Invalid start port: " + fromPort);
+ }
+
+ for (int i = fromPort; i <= MAX_PORT_NUMBER; i++)
+ {
+ if (available(i)) {
+ return i;
+ }
+ }
+
+ throw new NoSuchElementException("Could not find an available port above " + fromPort);
+ }
+
+ /**
+ * Checks to see if a specific port is available.
+ *
+ * @param port the port to check for availability
+ */
+ private boolean available(int port)
+ {
+ if ((port < MIN_PORT_NUMBER) || (port > MAX_PORT_NUMBER))
+ {
+ throw new IllegalArgumentException("Invalid start port: " + port);
+ }
+
+ ServerSocket ss = null;
+ DatagramSocket ds = null;
+ try
+ {
+ ss = new ServerSocket(port);
+ ss.setReuseAddress(true);
+ ds = new DatagramSocket(port);
+ ds.setReuseAddress(true);
+ return true;
+ }
+ catch (IOException e)
+ {
+ }
+ finally
+ {
+ if (ds != null)
+ {
+ ds.close();
+ }
+
+ if (ss != null)
+ {
+ try
+ {
+ ss.close();
+ }
+ catch (IOException e)
+ {
+ /* should not be thrown */
+ }
+ }
+ }
+
+ return false;
+ }
+
public int findFreePort()
{
- return AvailablePortFinder.getNextAvailable(10000);
+ return getNextAvailable(10000);
+ }
+
+ /**
+ * Set a System property for duration of this test only. The tearDown will
+ * guarantee to reset the property to its previous value after the test
+ * completes.
+ *
+ * @param property The property to set
+ * @param value the value to set it to, if null, the property will be cleared
+ */
+ protected void setTestSystemProperty(final String property, final String value)
+ {
+ if (!_propertiesSetForTest.containsKey(property))
+ {
+ // Record the current value so we can revert it later.
+ _propertiesSetForTest.put(property, System.getProperty(property));
+ }
+
+ if (value == null)
+ {
+ System.clearProperty(property);
+ }
+ else
+ {
+ System.setProperty(property, value);
+ }
+ }
+
+ /**
+ * Restore the System property values that were set by this test run.
+ */
+ protected void revertTestSystemProperties()
+ {
+ if(!_propertiesSetForTest.isEmpty())
+ {
+ _logger.debug("reverting " + _propertiesSetForTest.size() + " test properties");
+ for (String key : _propertiesSetForTest.keySet())
+ {
+ String value = _propertiesSetForTest.get(key);
+ if (value != null)
+ {
+ System.setProperty(key, value);
+ }
+ else
+ {
+ System.clearProperty(key);
+ }
+ }
+
+ _propertiesSetForTest.clear();
+ }
+ }
+
+ /**
+ * Adjust the VMs Log4j Settings just for this test run
+ *
+ * @param logger the logger to change
+ * @param level the level to set
+ */
+ protected void setLoggerLevel(Logger logger, Level level)
+ {
+ assertNotNull("Cannot set level of null logger", logger);
+ assertNotNull("Cannot set Logger("+logger.getName()+") to null level.",level);
+
+ if (!_loggerLevelSetForTest.containsKey(logger))
+ {
+ // Record the current value so we can revert it later.
+ _loggerLevelSetForTest.put(logger, logger.getLevel());
+ }
+
+ logger.setLevel(level);
+ }
+
+ /**
+ * Restore the logging levels defined by this test.
+ */
+ protected void revertLoggingLevels()
+ {
+ for (Logger logger : _loggerLevelSetForTest.keySet())
+ {
+ logger.setLevel(_loggerLevelSetForTest.get(logger));
+ }
+
+ _loggerLevelSetForTest.clear();
+ }
+
+ protected void tearDown() throws java.lang.Exception
+ {
+ _logger.info("========== tearDown " + _testName + " ==========");
+ revertTestSystemProperties();
+ revertLoggingLevels();
+ }
+
+ protected void setUp() throws Exception
+ {
+ _testName = getClass().getSimpleName() + "." + getName();
+ _logger.info("========== start " + _testName + " ==========");
+ }
+
+ protected String getTestName()
+ {
+ return _testName;
}
}
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java b/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java
index 375a326654..49f6a08007 100644
--- a/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java
+++ b/qpid/java/common/src/test/java/org/apache/qpid/transport/ConnectionTest.java
@@ -20,32 +20,27 @@
*/
package org.apache.qpid.transport;
-import org.apache.mina.util.AvailablePortFinder;
-
-import org.apache.qpid.test.utils.QpidTestCase;
-import org.apache.qpid.transport.network.ConnectionBinding;
-import org.apache.qpid.transport.network.io.IoAcceptor;
-import org.apache.qpid.transport.util.Logger;
-import org.apache.qpid.transport.util.Waiter;
+import static org.apache.qpid.transport.Option.EXPECTED;
+import static org.apache.qpid.transport.Option.NONE;
+import static org.apache.qpid.transport.Option.SYNC;
+import java.io.IOException;
import java.util.ArrayList;
-import java.util.List;
import java.util.Collections;
+import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import java.io.IOException;
-import static org.apache.qpid.transport.Option.*;
+import org.apache.qpid.test.utils.QpidTestCase;
+import org.apache.qpid.transport.network.ConnectionBinding;
+import org.apache.qpid.transport.network.io.IoAcceptor;
+import org.apache.qpid.transport.util.Waiter;
/**
* ConnectionTest
*/
-
public class ConnectionTest extends QpidTestCase implements SessionListener
{
-
- private static final Logger log = Logger.get(ConnectionTest.class);
-
private int port;
private volatile boolean queue = false;
private List<MessageTransfer> messages = new ArrayList<MessageTransfer>();
@@ -58,7 +53,7 @@ public class ConnectionTest extends QpidTestCase implements SessionListener
{
super.setUp();
- port = AvailablePortFinder.getNextAvailable(12000);
+ port = findFreePort();
}
protected void tearDown() throws Exception
@@ -158,7 +153,8 @@ public class ConnectionTest extends QpidTestCase implements SessionListener
private Connection connect(final CountDownLatch closed)
{
- Connection conn = new Connection();
+ final Connection conn = new Connection();
+ conn.setConnectionDelegate(new ClientDelegate(new ConnectionSettings()));
conn.addConnectionListener(new ConnectionListener()
{
public void opened(Connection conn) {}
@@ -182,9 +178,9 @@ public class ConnectionTest extends QpidTestCase implements SessionListener
{
// Force os.name to be windows to exercise code in IoReceiver
// that looks for the value of os.name
- System.setProperty("os.name","windows");
+ setTestSystemProperty("os.name","windows");
- // Start server as 0-9 to froce a ProtocolVersionException
+ // Start server as 0-9 to force a ProtocolVersionException
startServer(new ProtocolHeader(1, 0, 9));
CountDownLatch closed = new CountDownLatch(1);
@@ -219,7 +215,7 @@ public class ConnectionTest extends QpidTestCase implements SessionListener
conn.send(protocolHeader);
List<Object> utf8 = new ArrayList<Object>();
utf8.add("utf8");
- conn.connectionStart(null, Collections.EMPTY_LIST, utf8);
+ conn.connectionStart(null, Collections.emptyList(), utf8);
}
@Override
@@ -270,40 +266,7 @@ public class ConnectionTest extends QpidTestCase implements SessionListener
}
}
- class FailoverConnectionListener implements ConnectionListener
- {
- public void opened(Connection conn) {}
-
- public void exception(Connection conn, ConnectionException e)
- {
- throw e;
- }
-
- public void closed(Connection conn)
- {
- queue = true;
- conn.connect("localhost", port, null, "guest", "guest");
- conn.resume();
- }
- }
-
- class TestSessionListener implements SessionListener
- {
- public void opened(Session s) {}
- public void resumed(Session s) {}
- public void exception(Session s, SessionException e) {}
- public void message(Session s, MessageTransfer xfr)
- {
- synchronized (incoming)
- {
- incoming.add(xfr);
- incoming.notifyAll();
- }
- s.processed(xfr);
- }
- public void closed(Session s) {}
- }
public void testResumeNonemptyReplayBuffer() throws Exception
{
@@ -311,6 +274,7 @@ public class ConnectionTest extends QpidTestCase implements SessionListener
Connection conn = new Connection();
conn.addConnectionListener(new FailoverConnectionListener());
+ conn.setConnectionDelegate(new ClientDelegate(new ConnectionSettings()));
conn.connect("localhost", port, null, "guest", "guest");
Session ssn = conn.createSession(1);
ssn.setSessionListener(new TestSessionListener());
@@ -365,6 +329,7 @@ public class ConnectionTest extends QpidTestCase implements SessionListener
startServer();
Connection conn = new Connection();
+ conn.setConnectionDelegate(new ClientDelegate(new ConnectionSettings()));
conn.addConnectionListener(new FailoverConnectionListener());
conn.connect("localhost", port, null, "guest", "guest");
Session ssn = conn.createSession(1);
@@ -387,6 +352,7 @@ public class ConnectionTest extends QpidTestCase implements SessionListener
startServer();
Connection conn = new Connection();
+ conn.setConnectionDelegate(new ClientDelegate(new ConnectionSettings()));
conn.connect("localhost", port, null, "guest", "guest");
Session ssn = conn.createSession();
ssn.sessionFlush(EXPECTED);
@@ -400,6 +366,7 @@ public class ConnectionTest extends QpidTestCase implements SessionListener
{
startServer();
Connection conn = new Connection();
+ conn.setConnectionDelegate(new ClientDelegate(new ConnectionSettings()));
conn.connect("localhost", port, null, "guest", "guest");
conn.connectionHeartbeat();
conn.close();
@@ -410,6 +377,7 @@ public class ConnectionTest extends QpidTestCase implements SessionListener
startServer();
Connection conn = new Connection();
+ conn.setConnectionDelegate(new ClientDelegate(new ConnectionSettings()));
conn.connect("localhost", port, null, "guest", "guest");
Session ssn = conn.createSession();
send(ssn, "EXCP 0");
@@ -429,6 +397,7 @@ public class ConnectionTest extends QpidTestCase implements SessionListener
startServer();
Connection conn = new Connection();
+ conn.setConnectionDelegate(new ClientDelegate(new ConnectionSettings()));
conn.connect("localhost", port, null, "guest", "guest");
Session ssn = conn.createSession();
send(ssn, "EXCP 0", true);
@@ -443,4 +412,38 @@ public class ConnectionTest extends QpidTestCase implements SessionListener
}
}
+ class FailoverConnectionListener implements ConnectionListener
+ {
+ public void opened(Connection conn) {}
+
+ public void exception(Connection conn, ConnectionException e)
+ {
+ throw e;
+ }
+
+ public void closed(Connection conn)
+ {
+ queue = true;
+ conn.connect("localhost", port, null, "guest", "guest");
+ conn.resume();
+ }
+ }
+
+ class TestSessionListener implements SessionListener
+ {
+ public void opened(Session s) {}
+ public void resumed(Session s) {}
+ public void exception(Session s, SessionException e) {}
+ public void message(Session s, MessageTransfer xfr)
+ {
+ synchronized (incoming)
+ {
+ incoming.add(xfr);
+ incoming.notifyAll();
+ }
+
+ s.processed(xfr);
+ }
+ public void closed(Session s) {}
+ }
}
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/transport/SessionTimeoutTest.java b/qpid/java/common/src/test/java/org/apache/qpid/transport/SessionTimeoutTest.java
new file mode 100644
index 0000000000..5f1c1254a2
--- /dev/null
+++ b/qpid/java/common/src/test/java/org/apache/qpid/transport/SessionTimeoutTest.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.qpid.transport;
+
+import org.apache.qpid.configuration.ClientProperties;
+import org.apache.qpid.test.utils.QpidTestCase;
+
+
+public class SessionTimeoutTest extends QpidTestCase
+{
+ public void testSessionTimeout()
+ {
+ try
+ {
+ long timeout = 1;
+ setTestSystemProperty("qpid.sync_op_timeout", Long.toString(timeout));
+ assertSessionTimeout(timeout);
+ }
+ finally
+ {
+ revertTestSystemProperties();
+ }
+ }
+
+ public void testSessionTimeoutSetWith_amqj_default_syncwrite_timeout()
+ {
+ try
+ {
+ long timeout = 1;
+ setTestSystemProperty("amqj.default_syncwrite_timeout", Long.toString(timeout));
+ setTestSystemProperty("qpid.sync_op_timeout", null);
+ assertSessionTimeout(timeout);
+ }
+ finally
+ {
+ revertTestSystemProperties();
+ }
+ }
+
+ private void assertSessionTimeout(long timeout)
+ {
+ Session session = new TestSession(null, null, 0);
+ long startTime = System.currentTimeMillis();
+ try
+ {
+ session.awaitOpen();
+ fail("SessionTimeoutException is expected!");
+ }
+ catch (SessionException e)
+ {
+ long elapsedTime = System.currentTimeMillis() - startTime;
+ assertTrue("Expected timeout should happened in " + timeout + " ms but timeout occured in "
+ + elapsedTime + " ms!", elapsedTime >= timeout && elapsedTime < ClientProperties.DEFAULT_SYNC_OPERATION_TIMEOUT);
+ }
+ }
+
+ class TestSession extends Session
+ {
+ public TestSession(Connection connection, Binary name, long expiry)
+ {
+ super(connection, name, expiry);
+ }
+ }
+
+}
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/transport/TestNetworkConnection.java b/qpid/java/common/src/test/java/org/apache/qpid/transport/TestNetworkConnection.java
index 8686c17414..8533c64fab 100644
--- a/qpid/java/common/src/test/java/org/apache/qpid/transport/TestNetworkConnection.java
+++ b/qpid/java/common/src/test/java/org/apache/qpid/transport/TestNetworkConnection.java
@@ -49,10 +49,12 @@ public class TestNetworkConnection implements NetworkConnection
_sender = new MockSender();
}
+
+
public void bind(int port, InetAddress[] addresses, ProtocolEngineFactory protocolFactory,
NetworkTransportConfiguration config, SSLContextFactory sslFactory) throws BindException
{
-
+
}
public SocketAddress getLocalAddress()
@@ -68,37 +70,37 @@ public class TestNetworkConnection implements NetworkConnection
public void open(int port, InetAddress destination, ProtocolEngine engine, NetworkTransportConfiguration config,
SSLContextFactory sslFactory) throws OpenException
{
-
+
}
public void setMaxReadIdle(int idleTime)
{
-
+
}
public void setMaxWriteIdle(int idleTime)
{
-
+
}
public void close()
{
-
+
}
public void flush()
{
-
+
}
public void send(ByteBuffer msg)
{
-
+
}
public void setIdleTimeout(int i)
{
-
+
}
public void setPort(int port)
@@ -135,4 +137,8 @@ public class TestNetworkConnection implements NetworkConnection
{
return _sender;
}
+
+ public void start()
+ {
+ }
}
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/transport/network/TransportTest.java b/qpid/java/common/src/test/java/org/apache/qpid/transport/network/TransportTest.java
new file mode 100644
index 0000000000..7039b904e3
--- /dev/null
+++ b/qpid/java/common/src/test/java/org/apache/qpid/transport/network/TransportTest.java
@@ -0,0 +1,157 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.transport.network;
+
+
+import java.nio.ByteBuffer;
+
+import javax.net.ssl.SSLContext;
+
+import org.apache.qpid.framing.ProtocolVersion;
+import org.apache.qpid.protocol.ProtocolEngineFactory;
+import org.apache.qpid.test.utils.QpidTestCase;
+import org.apache.qpid.transport.ConnectionSettings;
+import org.apache.qpid.transport.NetworkTransportConfiguration;
+import org.apache.qpid.transport.Receiver;
+import org.apache.qpid.transport.TransportException;
+import org.apache.qpid.transport.network.io.IoNetworkTransport;
+
+public class TransportTest extends QpidTestCase
+{
+
+
+
+ public void testDefaultGetOutgoingTransportForv0_8() throws Exception
+ {
+ final OutgoingNetworkTransport networkTransport = Transport.getOutgoingTransportInstance(ProtocolVersion.v8_0);
+ assertNotNull(networkTransport);
+ assertTrue(networkTransport instanceof IoNetworkTransport);
+ }
+
+ public void testGloballyOverriddenOutgoingTransportForv0_8() throws Exception
+ {
+ setTestSystemProperty(Transport.QPID_TRANSPORT_PROPNAME, TestOutgoingNetworkTransport.class.getName());
+
+ final OutgoingNetworkTransport networkTransport = Transport.getOutgoingTransportInstance(ProtocolVersion.v8_0);
+ assertNotNull(networkTransport);
+ assertTrue(networkTransport instanceof TestOutgoingNetworkTransport);
+ }
+
+ public void testProtocolSpecificOverriddenOutgoingTransportForv0_8() throws Exception
+ {
+ setTestSystemProperty(Transport.QPID_TRANSPORT_V0_8_PROPNAME, TestOutgoingNetworkTransport.class.getName());
+
+ final OutgoingNetworkTransport networkTransport = Transport.getOutgoingTransportInstance(ProtocolVersion.v8_0);
+ assertNotNull(networkTransport);
+ assertTrue(networkTransport instanceof TestOutgoingNetworkTransport);
+ }
+
+ public void testDefaultGetOutgoingTransportForv0_10() throws Exception
+ {
+ final OutgoingNetworkTransport networkTransport = Transport.getOutgoingTransportInstance(ProtocolVersion.v0_10);
+ assertNotNull(networkTransport);
+ assertTrue(networkTransport instanceof IoNetworkTransport);
+ }
+
+ public void testDefaultGetIncomingTransport() throws Exception
+ {
+ final IncomingNetworkTransport networkTransport = Transport.getIncomingTransportInstance();
+ assertNotNull(networkTransport);
+ assertTrue(networkTransport instanceof IoNetworkTransport);
+ }
+
+ public void testOverriddenGetIncomingTransport() throws Exception
+ {
+ setTestSystemProperty(Transport.QPID_BROKER_TRANSPORT_PROPNAME, TestIncomingNetworkTransport.class.getName());
+
+ final IncomingNetworkTransport networkTransport = Transport.getIncomingTransportInstance();
+ assertNotNull(networkTransport);
+ assertTrue(networkTransport instanceof TestIncomingNetworkTransport);
+ }
+
+ public void testInvalidOutgoingTransportClassName() throws Exception
+ {
+ setTestSystemProperty(Transport.QPID_TRANSPORT_PROPNAME, "invalid");
+
+ try
+ {
+ Transport.getOutgoingTransportInstance(ProtocolVersion.v0_10);
+ fail("Should have failed to load the invalid class");
+ }
+ catch(TransportException te)
+ {
+ //expected, ignore
+ }
+ }
+
+ public void testInvalidOutgoingTransportProtocolVersion() throws Exception
+ {
+ try
+ {
+ Transport.getOutgoingTransportInstance(new ProtocolVersion((byte)0, (byte)0));
+ fail("Should have failed to load the transport for invalid protocol version");
+ }
+ catch(IllegalArgumentException iae)
+ {
+ //expected, ignore
+ }
+ }
+
+ public static class TestOutgoingNetworkTransport implements OutgoingNetworkTransport
+ {
+
+ public void close()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public NetworkConnection getConnection()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public NetworkConnection connect(ConnectionSettings settings,
+ Receiver<ByteBuffer> delegate, SSLContext sslContext)
+ {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+ public static class TestIncomingNetworkTransport implements IncomingNetworkTransport
+ {
+
+ public void close()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public NetworkConnection getConnection()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void accept(NetworkTransportConfiguration config,
+ ProtocolEngineFactory factory, SSLContext sslContext)
+ {
+ throw new UnsupportedOperationException();
+ }
+ }
+}
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/transport/network/io/IoAcceptor.java b/qpid/java/common/src/test/java/org/apache/qpid/transport/network/io/IoAcceptor.java
index 8530240dcc..e075681acb 100644
--- a/qpid/java/common/src/test/java/org/apache/qpid/transport/network/io/IoAcceptor.java
+++ b/qpid/java/common/src/test/java/org/apache/qpid/transport/network/io/IoAcceptor.java
@@ -80,7 +80,7 @@ public class IoAcceptor<E> extends Thread
try
{
Socket sock = socket.accept();
- IoTransport<E> transport = new IoTransport<E>(sock, binding,false);
+ IoTransport<E> transport = new IoTransport<E>(sock, binding);
}
catch (IOException e)
{
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/transport/network/io/IoTransport.java b/qpid/java/common/src/test/java/org/apache/qpid/transport/network/io/IoTransport.java
new file mode 100644
index 0000000000..215c6d9931
--- /dev/null
+++ b/qpid/java/common/src/test/java/org/apache/qpid/transport/network/io/IoTransport.java
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.qpid.transport.network.io;
+
+import java.net.Socket;
+import java.nio.ByteBuffer;
+
+import org.apache.qpid.transport.Binding;
+import org.apache.qpid.transport.Sender;
+import org.apache.qpid.transport.util.Logger;
+
+/**
+ * This class provides a socket based transport using the java.io
+ * classes.
+ *
+ * The following params are configurable via JVM arguments
+ * TCP_NO_DELAY - amqj.tcpNoDelay
+ * SO_RCVBUF - amqj.receiveBufferSize
+ * SO_SNDBUF - amqj.sendBufferSize
+ */
+public final class IoTransport<E>
+{
+
+
+ private static final Logger log = Logger.get(IoTransport.class);
+
+ private static int DEFAULT_READ_WRITE_BUFFER_SIZE = 64 * 1024;
+ private static int readBufferSize = Integer.getInteger
+ ("amqj.receiveBufferSize", DEFAULT_READ_WRITE_BUFFER_SIZE);
+ private static int writeBufferSize = Integer.getInteger
+ ("amqj.sendBufferSize", DEFAULT_READ_WRITE_BUFFER_SIZE);
+
+ private Socket socket;
+ private Sender<ByteBuffer> sender;
+ private E endpoint;
+ private IoReceiver receiver;
+ private long timeout = 60000;
+
+ IoTransport(Socket socket, Binding<E,ByteBuffer> binding)
+ {
+ this.socket = socket;
+ setupTransport(socket, binding);
+ }
+
+ private void setupTransport(Socket socket, Binding<E, ByteBuffer> binding)
+ {
+ IoSender ios = new IoSender(socket, 2*writeBufferSize, timeout);
+ ios.initiate();
+
+ this.sender = ios;
+ this.endpoint = binding.endpoint(sender);
+ this.receiver = new IoReceiver(socket, binding.receiver(endpoint),
+ 2*readBufferSize, timeout);
+ this.receiver.initiate();
+
+ ios.registerCloseListener(this.receiver);
+ }
+
+ public Sender<ByteBuffer> getSender()
+ {
+ return sender;
+ }
+
+ public IoReceiver getReceiver()
+ {
+ return receiver;
+ }
+
+ public Socket getSocket()
+ {
+ return socket;
+ }
+
+}
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/transport/network/mina/MinaNetworkHandlerTest.java b/qpid/java/common/src/test/java/org/apache/qpid/transport/network/mina/MinaNetworkHandlerTest.java
index 1a1b5af805..976b141fc0 100644
--- a/qpid/java/common/src/test/java/org/apache/qpid/transport/network/mina/MinaNetworkHandlerTest.java
+++ b/qpid/java/common/src/test/java/org/apache/qpid/transport/network/mina/MinaNetworkHandlerTest.java
@@ -34,6 +34,7 @@ import java.util.concurrent.TimeUnit;
import org.apache.qpid.framing.AMQDataBlock;
import org.apache.qpid.protocol.ProtocolEngine;
import org.apache.qpid.protocol.ProtocolEngineFactory;
+import org.apache.qpid.protocol.ServerProtocolEngine;
import org.apache.qpid.test.utils.QpidTestCase;
import org.apache.qpid.transport.ConnectionSettings;
import org.apache.qpid.transport.NetworkTransportConfiguration;
@@ -333,7 +334,7 @@ public class MinaNetworkHandlerTest extends QpidTestCase
}
}
- public class CountingProtocolEngine implements ProtocolEngine
+ public class CountingProtocolEngine implements ServerProtocolEngine
{
public ArrayList<ByteBuffer> _receivedBytes = new ArrayList<ByteBuffer>();
private int _readBytes;
@@ -447,6 +448,11 @@ public class MinaNetworkHandlerTest extends QpidTestCase
return _closed;
}
+ public long getConnectionId()
+ {
+ return -1;
+ }
+
}
private class EchoProtocolEngine extends CountingProtocolEngine
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java b/qpid/java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java
index 7eba5f092e..d6767eb9c0 100644
--- a/qpid/java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java
+++ b/qpid/java/common/src/test/java/org/apache/qpid/util/FileUtilsTest.java
@@ -27,7 +27,9 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
+import java.io.InputStream;
import java.util.List;
+import java.util.Properties;
public class FileUtilsTest extends TestCase
{
@@ -182,6 +184,20 @@ public class FileUtilsTest extends TestCase
}
}
+
+ /**
+ * Helper method to create a temporary file with test content.
+ *
+ * @param test_data The data to store in the file
+ *
+ * @return The File reference
+ */
+ private File createTestFileInTmpDir(final String testData) throws Exception
+ {
+ final File tmpFile = File.createTempFile("test", "tmp");
+
+ return createTestFile(tmpFile.getCanonicalPath(), testData);
+ }
/**
* Helper method to create a test file with a string content
*
@@ -302,8 +318,74 @@ public class FileUtilsTest extends TestCase
// expected path
}
}
+
+ /**
+ * Tests that openFileOrDefaultResource can open a file on the filesystem.
+ *
+ */
+ public void testOpenFileOrDefaultResourceOpensFileOnFileSystem() throws Exception
+ {
+ final File testFile = createTestFileInTmpDir("src=tmpfile");
+ final String filenameOnFilesystem = testFile.getCanonicalPath();
+ final String defaultResource = "org/apache/qpid/util/default.properties";
+
+
+ final InputStream is = FileUtils.openFileOrDefaultResource(filenameOnFilesystem, defaultResource, this.getClass().getClassLoader());
+ assertNotNull("Stream must not be null", is);
+ final Properties p = new Properties();
+ p.load(is);
+ assertEquals("tmpfile", p.getProperty("src"));
+ }
/**
+ * Tests that openFileOrDefaultResource can open a file on the classpath.
+ *
+ */
+ public void testOpenFileOrDefaultResourceOpensFileOnClasspath() throws Exception
+ {
+ final String mydefaultsResource = "org/apache/qpid/util/mydefaults.properties";
+ final String defaultResource = "org/apache/qpid/util/default.properties";
+
+
+ final InputStream is = FileUtils.openFileOrDefaultResource(mydefaultsResource, defaultResource, this.getClass().getClassLoader());
+ assertNotNull("Stream must not be null", is);
+ final Properties p = new Properties();
+ p.load(is);
+ assertEquals("mydefaults", p.getProperty("src"));
+ }
+
+ /**
+ * Tests that openFileOrDefaultResource returns the default resource when file cannot be found.
+ */
+ public void testOpenFileOrDefaultResourceOpensDefaultResource() throws Exception
+ {
+ final File fileThatDoesNotExist = new File("/does/not/exist.properties");
+ assertFalse("Test must not exist", fileThatDoesNotExist.exists());
+
+ final String defaultResource = "org/apache/qpid/util/default.properties";
+
+ final InputStream is = FileUtils.openFileOrDefaultResource(fileThatDoesNotExist.getCanonicalPath(), defaultResource, this.getClass().getClassLoader());
+ assertNotNull("Stream must not be null", is);
+ Properties p = new Properties();
+ p.load(is);
+ assertEquals("default.properties", p.getProperty("src"));
+ }
+
+ /**
+ * Tests that openFileOrDefaultResource returns null if neither the file nor
+ * the default resource can be found..
+ */
+ public void testOpenFileOrDefaultResourceReturnsNullWhenNeitherCanBeFound() throws Exception
+ {
+
+ final String mydefaultsResource = "org/apache/qpid/util/doesnotexisteiether.properties";
+ final String defaultResource = "org/apache/qpid/util/doesnotexisteiether.properties";
+
+ final InputStream is = FileUtils.openFileOrDefaultResource(mydefaultsResource, defaultResource, this.getClass().getClassLoader());
+ assertNull("Stream must be null", is);
+ }
+
+ /**
* Given two lists of File arrays ensure they are the same length and all entries in Before are in After
*
* @param filesBefore File[]
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/util/default.properties b/qpid/java/common/src/test/java/org/apache/qpid/util/default.properties
new file mode 100644
index 0000000000..cb522ea9a7
--- /dev/null
+++ b/qpid/java/common/src/test/java/org/apache/qpid/util/default.properties
@@ -0,0 +1,2 @@
+# Used by FileUtilsTests
+src=default.properties \ No newline at end of file
diff --git a/qpid/java/common/src/test/java/org/apache/qpid/util/mydefaults.properties b/qpid/java/common/src/test/java/org/apache/qpid/util/mydefaults.properties
new file mode 100644
index 0000000000..6a49d927d0
--- /dev/null
+++ b/qpid/java/common/src/test/java/org/apache/qpid/util/mydefaults.properties
@@ -0,0 +1,2 @@
+# Used by FileUtilsTests
+src=mydefaults \ No newline at end of file
diff --git a/qpid/java/common/templates/method/version/MethodBodyClass.vm b/qpid/java/common/templates/method/version/MethodBodyClass.vm
index a739110d70..ce8a453eeb 100644
--- a/qpid/java/common/templates/method/version/MethodBodyClass.vm
+++ b/qpid/java/common/templates/method/version/MethodBodyClass.vm
@@ -46,9 +46,11 @@
package org.apache.qpid.framing.amqp_$version.getMajor()_$version.getMinor();
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
import java.util.HashMap;
-import org.apache.mina.common.ByteBuffer;
import org.apache.qpid.framing.*;
import org.apache.qpid.AMQException;
@@ -56,7 +58,7 @@ public class ${javaClassName} extends AMQMethodBody_$version.getMajor()_$version
{
private static final AMQMethodBodyInstanceFactory FACTORY_INSTANCE = new AMQMethodBodyInstanceFactory()
{
- public AMQMethodBody newInstance(ByteBuffer in, long size) throws AMQFrameDecodingException
+ public AMQMethodBody newInstance(DataInputStream in, long size) throws AMQFrameDecodingException, IOException
{
return new ${javaClassName}(in);
}
@@ -84,7 +86,7 @@ public class ${javaClassName} extends AMQMethodBody_$version.getMajor()_$version
// Constructor
- public ${javaClassName}(ByteBuffer buffer) throws AMQFrameDecodingException
+ public ${javaClassName}(DataInputStream buffer) throws AMQFrameDecodingException, IOException
{
#foreach( $field in $method.ConsolidatedFields )
_$field.Name = read$field.getEncodingType()( buffer );
@@ -169,7 +171,7 @@ public class ${javaClassName} extends AMQMethodBody_$version.getMajor()_$version
return size;
}
- public void writeMethodPayload(ByteBuffer buffer)
+ public void writeMethodPayload(DataOutputStream buffer) throws IOException
{
#foreach( $field in $method.ConsolidatedFields )
write$field.getEncodingType()( buffer, _$field.Name );
diff --git a/qpid/java/common/templates/model/MethodRegistryClass.vm b/qpid/java/common/templates/model/MethodRegistryClass.vm
index 759e5e4a42..8258175ce7 100644
--- a/qpid/java/common/templates/model/MethodRegistryClass.vm
+++ b/qpid/java/common/templates/model/MethodRegistryClass.vm
@@ -30,7 +30,8 @@
package org.apache.qpid.framing;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.IOException;
import org.apache.qpid.framing.abstraction.ProtocolVersionMethodConverter;
@@ -53,8 +54,8 @@ public abstract class MethodRegistry
#end
- public abstract AMQMethodBody convertToBody(ByteBuffer in, long size)
- throws AMQFrameDecodingException;
+ public abstract AMQMethodBody convertToBody(DataInputStream in, long size)
+ throws AMQFrameDecodingException, IOException;
public abstract int getMaxClassId();
@@ -101,4 +102,4 @@ public abstract class MethodRegistry
public abstract ProtocolVersionMethodConverter getProtocolVersionMethodConverter();
-} \ No newline at end of file
+}
diff --git a/qpid/java/common/templates/model/version/MethodRegistryClass.vm b/qpid/java/common/templates/model/version/MethodRegistryClass.vm
index 277605e34b..79553f7748 100644
--- a/qpid/java/common/templates/model/version/MethodRegistryClass.vm
+++ b/qpid/java/common/templates/model/version/MethodRegistryClass.vm
@@ -35,32 +35,33 @@ import org.apache.qpid.protocol.AMQConstant;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.apache.mina.common.ByteBuffer;
+import java.io.DataInputStream;
+import java.io.IOException;
import org.apache.qpid.framing.abstraction.ProtocolVersionMethodConverter;
public class MethodRegistry_$version.getMajor()_$version.getMinor() extends MethodRegistry
{
-
+
private static final Logger _log = LoggerFactory.getLogger(MethodRegistry.class);
- private ProtocolVersionMethodConverter _protocolVersionConverter = new MethodConverter_$version.getMajor()_$version.getMinor()();
-
-#set( $specificModel = $model.asSingleVersionModel() )
-
-
-#set( $maxClassId = $specificModel.getMaximumClassId()+1 )
- private final AMQMethodBodyInstanceFactory[][] _factories = new AMQMethodBodyInstanceFactory[$maxClassId][];
-
- public MethodRegistry_$version.getMajor()_$version.getMinor()()
- {
- this(new ProtocolVersion((byte)$version.getMajor(),(byte)$version.getMinor()));
+ private ProtocolVersionMethodConverter _protocolVersionConverter = new MethodConverter_$version.getMajor()_$version.getMinor()();
+
+#set( $specificModel = $model.asSingleVersionModel() )
+
+
+#set( $maxClassId = $specificModel.getMaximumClassId()+1 )
+ private final AMQMethodBodyInstanceFactory[][] _factories = new AMQMethodBodyInstanceFactory[$maxClassId][];
+
+ public MethodRegistry_$version.getMajor()_$version.getMinor()()
+ {
+ this(new ProtocolVersion((byte)$version.getMajor(),(byte)$version.getMinor()));
}
-
- public MethodRegistry_$version.getMajor()_$version.getMinor()(ProtocolVersion pv)
- {
- super(pv);
+
+ public MethodRegistry_$version.getMajor()_$version.getMinor()(ProtocolVersion pv)
+ {
+ super(pv);
#foreach( $amqpClass in $specificModel.getClassList() )
#set( $amqpClassNameFirstChar = $amqpClass.getName().substring(0,1) )
#set( $amqpClassNameFirstCharU = $amqpClassNameFirstChar.toUpperCase() )
@@ -68,30 +69,30 @@ public class MethodRegistry_$version.getMajor()_$version.getMinor() extends Meth
- // Register method body instance factories for the $amqpClassNameUpperCamel class.
+ // Register method body instance factories for the $amqpClassNameUpperCamel class.
-#set( $maxMethodId = $amqpClass.getMaximumMethodId()+1 )
+#set( $maxMethodId = $amqpClass.getMaximumMethodId()+1 )
_factories[$amqpClass.getClassId()] = new AMQMethodBodyInstanceFactory[$maxMethodId];
-
+
#foreach( $amqpMethod in $amqpClass.getMethodList() )
#set( $amqpMethodNameFirstChar = $amqpMethod.getName().substring(0,1) )
#set( $amqpMethodNameFirstCharU = $amqpMethodNameFirstChar.toUpperCase() )
#set( $amqpMethodNameUpperCamel = "$amqpMethodNameFirstCharU$amqpMethod.getName().substring(1)" )
_factories[$amqpClass.getClassId()][$amqpMethod.getMethodId()] = ${amqpClassNameUpperCamel}${amqpMethodNameUpperCamel}BodyImpl.getFactory();
-#end
-
+#end
+
#end
-
-
- }
+
+
+ }
- public AMQMethodBody convertToBody(ByteBuffer in, long size)
- throws AMQFrameDecodingException
+ public AMQMethodBody convertToBody(DataInputStream in, long size)
+ throws AMQFrameDecodingException, IOException
{
- int classId = in.getUnsignedShort();
- int methodId = in.getUnsignedShort();
-
+ int classId = in.readUnsignedShort();
+ int methodId = in.readUnsignedShort();
+
AMQMethodBodyInstanceFactory bodyFactory;
try
{
@@ -137,15 +138,15 @@ public class MethodRegistry_$version.getMajor()_$version.getMinor() extends Meth
public int getMaxClassId()
- {
- return $specificModel.getMaximumClassId();
- }
+ {
+ return $specificModel.getMaximumClassId();
+ }
public int getMaxMethodId(int classId)
- {
- return _factories[classId].length - 1;
- }
-
+ {
+ return _factories[classId].length - 1;
+ }
+
#foreach( $amqpClass in $specificModel.getClassList() )
@@ -153,12 +154,12 @@ public class MethodRegistry_$version.getMajor()_$version.getMinor() extends Meth
#set( $amqpClassNameFirstCharU = $amqpClassNameFirstChar.toUpperCase() )
#set( $amqpClassNameUpperCamel = "$amqpClassNameFirstCharU$amqpClass.getName().substring(1)" )
-
+
#foreach( $amqpMethod in $amqpClass.getMethodList() )
#set( $amqpMethodNameFirstChar = $amqpMethod.getName().substring(0,1) )
#set( $amqpMethodNameFirstCharU = $amqpMethodNameFirstChar.toUpperCase() )
#set( $amqpMethodNameUpperCamel = "$amqpMethodNameFirstCharU$amqpMethod.getName().substring(1)" )
- public ${amqpClassNameUpperCamel}${amqpMethodNameUpperCamel}Body create${amqpClassNameUpperCamel}${amqpMethodNameUpperCamel}Body(
+ public ${amqpClassNameUpperCamel}${amqpMethodNameUpperCamel}Body create${amqpClassNameUpperCamel}${amqpMethodNameUpperCamel}Body(
#foreach( $field in $amqpMethod.FieldList )
#if( $velocityCount == $amqpMethod.getFieldList().size() )
final $field.NativeType $field.Name
@@ -166,9 +167,9 @@ public class MethodRegistry_$version.getMajor()_$version.getMinor() extends Meth
final $field.NativeType $field.Name,
#end
#end
- )
+ )
{
- return new ${amqpClassNameUpperCamel}${amqpMethodNameUpperCamel}BodyImpl(
+ return new ${amqpClassNameUpperCamel}${amqpMethodNameUpperCamel}BodyImpl(
#foreach( $field in $amqpMethod.FieldList )
#if( $velocityCount == $amqpMethod.getFieldList().size() )
$field.Name
@@ -176,18 +177,18 @@ public class MethodRegistry_$version.getMajor()_$version.getMinor() extends Meth
$field.Name,
#end
#end
- );
+ );
}
-#end
-
+#end
+
#end
-
-
+
+
public ProtocolVersionMethodConverter getProtocolVersionMethodConverter()
{
return _protocolVersionConverter;
- }
+ }
}
diff --git a/qpid/java/ivy.xml b/qpid/java/ivy.xml
index cdffcff458..1399db5248 100644
--- a/qpid/java/ivy.xml
+++ b/qpid/java/ivy.xml
@@ -18,7 +18,7 @@
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
- <info organisation="org/apache" module="qpid" revision="0.10"/>
+ <info organisation="org/apache" module="qpid" revision="0.13"/>
<publications xmlns:e="urn:ant.apache.org:ivy-extras">
<artifact name="qpid-client" type="pom" ext="pom"/>
diff --git a/qpid/java/lib/backport-util-concurrent-2.2.jar b/qpid/java/lib/backport-util-concurrent-2.2.jar
deleted file mode 100644
index 20a16877bd..0000000000
--- a/qpid/java/lib/backport-util-concurrent-2.2.jar
+++ /dev/null
Binary files differ
diff --git a/qpid/java/lib/mina-core-1.0.1.jar b/qpid/java/lib/mina-core-1.0.1.jar
deleted file mode 100755
index f12067aa90..0000000000
--- a/qpid/java/lib/mina-core-1.0.1.jar
+++ /dev/null
Binary files differ
diff --git a/qpid/java/lib/mina-filter-ssl-1.0.1.jar b/qpid/java/lib/mina-filter-ssl-1.0.1.jar
deleted file mode 100755
index 53738e6498..0000000000
--- a/qpid/java/lib/mina-filter-ssl-1.0.1.jar
+++ /dev/null
Binary files differ
diff --git a/qpid/java/lib/poms/backport-util-concurrent-2.2.xml b/qpid/java/lib/poms/backport-util-concurrent-2.2.xml
deleted file mode 100644
index 6df4cfca40..0000000000
--- a/qpid/java/lib/poms/backport-util-concurrent-2.2.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<dep>
- <groupId>backport-util-concurrent</groupId>
- <artifactId>backport-util-concurrent</artifactId>
- <version>2.2</version>
-</dep>
diff --git a/qpid/java/lib/poms/mina-core-1.0.1.xml b/qpid/java/lib/poms/mina-core-1.0.1.xml
deleted file mode 100644
index 87fb96999f..0000000000
--- a/qpid/java/lib/poms/mina-core-1.0.1.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<dep>
- <groupId>org.apache.mina</groupId>
- <artifactId>mina-core</artifactId>
- <version>1.0.1</version>
-</dep>
diff --git a/qpid/java/lib/poms/mina-filter-ssl-1.0.1.xml b/qpid/java/lib/poms/mina-filter-ssl-1.0.1.xml
deleted file mode 100644
index ae41d7ed63..0000000000
--- a/qpid/java/lib/poms/mina-filter-ssl-1.0.1.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<dep>
- <groupId>org.apache.mina</groupId>
- <artifactId>mina-filter-ssl</artifactId>
- <version>1.0.1</version>
-</dep>
diff --git a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java b/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java
index 194bd83752..1a82c58ee9 100644
--- a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java
+++ b/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/UserManagement.java
@@ -53,25 +53,6 @@ public interface UserManagement
//********** Operations *****************//
/**
- * set password for user.
- *
- * Since Qpid JMX API 1.2 this operation expects plain text passwords to be provided. Prior to this, MD5 hashed passwords were supplied.
- *
- * @deprecated since Qpid JMX API 1.7
- *
- * @param username The username for which the password is to be set
- * @param password The password for the user
- *
- * @return The result of the operation
- */
- @Deprecated
- @MBeanOperation(name = "setPassword", description = "Set password for user.",
- impact = MBeanOperationInfo.ACTION)
- boolean setPassword(@MBeanOperationParameter(name = "username", description = "Username")String username,
- //NOTE: parameter name was changed to 'passwd' in Qpid JMX API 1.7 to protect against older, incompatible management clients
- @MBeanOperationParameter(name = "passwd", description = "Password")char[] password);
-
- /**
* Set password for a given user.
*
* @since Qpid JMX API 1.7
@@ -85,85 +66,11 @@ public interface UserManagement
impact = MBeanOperationInfo.ACTION)
boolean setPassword(@MBeanOperationParameter(name = "username", description = "Username")String username,
@MBeanOperationParameter(name = "password", description = "Password")String password);
-
- /**
- * Set rights for users with given details.
- * Since Qpid JMX API 2.3 all invocations will cause an exception to be thrown
- * as access rights can no longer be maintain via this interface.
- *
- * @deprecated since Qpid JMX API 2.3
- *
- * @param username The username to create
- * @param read The set of permission to give the new user
- * @param write The set of permission to give the new user
- * @param admin The set of permission to give the new user
- *
- * @return The result of the operation
- */
- @Deprecated
- @MBeanOperation(name = "setRights", description = "Set access rights for user.",
- impact = MBeanOperationInfo.ACTION)
- boolean setRights(@MBeanOperationParameter(name = "username", description = "Username")String username,
- @MBeanOperationParameter(name = "read", description = "Administration read")boolean read,
- @MBeanOperationParameter(name = "readAndWrite", description = "Administration write")boolean write,
- @MBeanOperationParameter(name = "admin", description = "Administration rights")boolean admin);
-
- /**
- * Create users with given details.
- * Since Qpid JMX API 2.3 if the user passes true for parameters read, write, or admin, a
- * exception will be thrown as access rights can no longer be maintain via this interface.
- *
- * Since Qpid JMX API 1.2 this operation expects plain text passwords to be provided. Prior to this, MD5 hashed passwords were supplied.
- *
- * @deprecated since Qpid JMX API 1.7
- *
- * @param username The username to create
- * @param password The password for the user
- * @param read The set of permission to give the new user
- * @param write The set of permission to give the new user
- * @param admin The set of permission to give the new user
- *
- * @return true if the user was created successfully, or false otherwise
- */
- @Deprecated
- @MBeanOperation(name = "createUser", description = "Create new user from system.",
- impact = MBeanOperationInfo.ACTION)
- boolean createUser(@MBeanOperationParameter(name = "username", description = "Username")String username,
- //NOTE: parameter name was changed to 'passwd' in Qpid JMX API 1.7 to protect against older, incompatible management clients
- @MBeanOperationParameter(name = "passwd", description = "Password")char[] password,
- @MBeanOperationParameter(name = "read", description = "Administration read")boolean read,
- @MBeanOperationParameter(name = "readAndWrite", description = "Administration write")boolean write,
- @MBeanOperationParameter(name = "admin", description = "Administration rights")boolean admin);
-
- /**
- * Create users with given details.
- * Since Qpid JMX API 2.3 if the user passes true for parameters read, write, or admin, a
- * exception will be thrown as access rights can no longer be maintain via this interface.
- *
- * @deprecated since Qpid JMX API 2.3
- * @since Qpid JMX API 1.7
- *
- * @param username The username to create
- * @param password The password for the user
- * @param read The set of permission to give the new user
- * @param write The set of permission to give the new user
- * @param admin The set of permission to give the new user
- *
- * @return true if the user was created successfully, or false otherwise
- */
- @Deprecated
- @MBeanOperation(name = "createUser", description = "Create a new user.",
- impact = MBeanOperationInfo.ACTION)
- boolean createUser(@MBeanOperationParameter(name = "username", description = "Username")String username,
- @MBeanOperationParameter(name = "password", description = "Password")String password,
- @MBeanOperationParameter(name = "read", description = "Administration read")boolean read,
- @MBeanOperationParameter(name = "readAndWrite", description = "Administration write")boolean write,
- @MBeanOperationParameter(name = "admin", description = "Administration rights")boolean admin);
/**
* Create users with given details.
*
- * @since Qpid JMX API 2.3
+ * @since Qpid JMX API 2.3 / 1.12
*
* @param username The username to create
* @param password The password for the user
@@ -188,9 +95,11 @@ public interface UserManagement
/**
- * Reload the date from disk
+ * Reload the user data
*
- * Since Qpid JMX API 1.2 this operation reloads the password and authorisation files. Prior to this, only the authorisation file was reloaded.
+ * Since Qpid JMX API 2.3 / 1.12 this operation reloads only the password data.
+ * Since Qpid JMX API 1.2 but prior to 2.3 / 1.12 this operation reloads the password and authorisation files.
+ * Prior to 1.2, only the authorisation file was reloaded.
*
* @return The result of the operation
*/
@@ -201,7 +110,7 @@ public interface UserManagement
/**
* View users returns all the users that are currently available to the system.
*
- * Since Qpid JMX API 2.3 the items that corresponded to read, write and admin flags
+ * Since Qpid JMX API 2.3 / 1.12 the items that corresponded to read, write and admin flags
* are deprecated and always return false.
*
* @return a table of users data (Username, read, write, admin)
diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/LegacySupportingUserManagement.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/LegacySupportingUserManagement.java
new file mode 100644
index 0000000000..0fc94a5972
--- /dev/null
+++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/LegacySupportingUserManagement.java
@@ -0,0 +1,132 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.management.ui.views.users;
+
+import javax.management.MBeanOperationInfo;
+
+import org.apache.qpid.management.common.mbeans.UserManagement;
+import org.apache.qpid.management.common.mbeans.annotations.MBeanOperation;
+import org.apache.qpid.management.common.mbeans.annotations.MBeanOperationParameter;
+
+/**
+ * UserManagement interface extension to provide the method signatures
+ * for old UserManagement methods no longer supported by the broker.
+ *
+ * This interface is used only for the creation of MBean proxy objects
+ * within the management console, for backwards compatibility with
+ * functionality in older broker versions.
+ */
+public interface LegacySupportingUserManagement extends UserManagement
+{
+ /**
+ * set password for user.
+ *
+ * Since Qpid JMX API 1.2 this operation expects plain text passwords to be provided. Prior to this, MD5 hashed passwords were supplied.
+ *
+ * @deprecated since Qpid JMX API 1.7
+ *
+ * @param username The username for which the password is to be set
+ * @param password The password for the user
+ *
+ * @return The result of the operation
+ */
+ @Deprecated
+ @MBeanOperation(name = "setPassword", description = "Set password for user.",
+ impact = MBeanOperationInfo.ACTION)
+ boolean setPassword(@MBeanOperationParameter(name = "username", description = "Username")String username,
+ //NOTE: parameter name was changed to 'passwd' in Qpid JMX API 1.7 to protect against older, incompatible management clients
+ @MBeanOperationParameter(name = "passwd", description = "Password")char[] password);
+
+ /**
+ * Set rights for users with given details.
+ * Since Qpid JMX API 2.3 all invocations will cause an exception to be thrown
+ * as access rights can no longer be maintain via this interface.
+ *
+ * @deprecated since Qpid JMX API 2.3 / 1.12
+ *
+ * @param username The username to create
+ * @param read The set of permission to give the new user
+ * @param write The set of permission to give the new user
+ * @param admin The set of permission to give the new user
+ *
+ * @return The result of the operation
+ */
+ @Deprecated
+ @MBeanOperation(name = "setRights", description = "Set access rights for user.",
+ impact = MBeanOperationInfo.ACTION)
+ boolean setRights(@MBeanOperationParameter(name = "username", description = "Username")String username,
+ @MBeanOperationParameter(name = "read", description = "Administration read")boolean read,
+ @MBeanOperationParameter(name = "readAndWrite", description = "Administration write")boolean write,
+ @MBeanOperationParameter(name = "admin", description = "Administration rights")boolean admin);
+
+ /**
+ * Create users with given details.
+ * Since Qpid JMX API 2.3 if the user passes true for parameters read, write, or admin, a
+ * exception will be thrown as access rights can no longer be maintain via this interface.
+ *
+ * Since Qpid JMX API 1.2 this operation expects plain text passwords to be provided. Prior to this, MD5 hashed passwords were supplied.
+ *
+ * @deprecated since Qpid JMX API 1.7
+ *
+ * @param username The username to create
+ * @param password The password for the user
+ * @param read The set of permission to give the new user
+ * @param write The set of permission to give the new user
+ * @param admin The set of permission to give the new user
+ *
+ * @return true if the user was created successfully, or false otherwise
+ */
+ @Deprecated
+ @MBeanOperation(name = "createUser", description = "Create new user from system.",
+ impact = MBeanOperationInfo.ACTION)
+ boolean createUser(@MBeanOperationParameter(name = "username", description = "Username")String username,
+ //NOTE: parameter name was changed to 'passwd' in Qpid JMX API 1.7 to protect against older, incompatible management clients
+ @MBeanOperationParameter(name = "passwd", description = "Password")char[] password,
+ @MBeanOperationParameter(name = "read", description = "Administration read")boolean read,
+ @MBeanOperationParameter(name = "readAndWrite", description = "Administration write")boolean write,
+ @MBeanOperationParameter(name = "admin", description = "Administration rights")boolean admin);
+
+ /**
+ * Create users with given details.
+ * Since Qpid JMX API 2.3 if the user passes true for parameters read, write, or admin, a
+ * exception will be thrown as access rights can no longer be maintain via this interface.
+ *
+ * @deprecated since Qpid JMX API 2.3 / 1.12
+ * @since Qpid JMX API 1.7
+ *
+ * @param username The username to create
+ * @param password The password for the user
+ * @param read The set of permission to give the new user
+ * @param write The set of permission to give the new user
+ * @param admin The set of permission to give the new user
+ *
+ * @return true if the user was created successfully, or false otherwise
+ */
+ @Deprecated
+ @MBeanOperation(name = "createUser", description = "Create a new user.",
+ impact = MBeanOperationInfo.ACTION)
+ boolean createUser(@MBeanOperationParameter(name = "username", description = "Username")String username,
+ @MBeanOperationParameter(name = "password", description = "Password")String password,
+ @MBeanOperationParameter(name = "read", description = "Administration read")boolean read,
+ @MBeanOperationParameter(name = "readAndWrite", description = "Administration write")boolean write,
+ @MBeanOperationParameter(name = "admin", description = "Administration rights")boolean admin);
+
+}
diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java
index fdcc25d337..2c540bf982 100644
--- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java
+++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/users/UserManagementTabControl.java
@@ -37,7 +37,6 @@ import javax.management.openmbean.TabularDataSupport;
import org.apache.qpid.management.ui.ApiVersion;
import org.apache.qpid.management.ui.ApplicationRegistry;
import org.apache.qpid.management.ui.ManagedBean;
-import org.apache.qpid.management.common.mbeans.UserManagement;
import org.apache.qpid.management.ui.jmx.JMXManagedObject;
import org.apache.qpid.management.ui.jmx.MBeanUtility;
import org.apache.qpid.management.ui.views.TabControl;
@@ -83,7 +82,7 @@ public class UserManagementTabControl extends TabControl
private TableViewer _tableViewer = null;
private TabularDataSupport _userDetails = null;
- private UserManagement _ummb;
+ private LegacySupportingUserManagement _ummb;
private ApiVersion _ApiVersion;
public UserManagementTabControl(TabFolder tabFolder, JMXManagedObject mbean, MBeanServerConnection mbsc)
@@ -91,9 +90,9 @@ public class UserManagementTabControl extends TabControl
super(tabFolder);
_mbean = mbean;
_ApiVersion = ApplicationRegistry.getServerRegistry(mbean).getManagementApiVersion();
- _ummb = (UserManagement)
+ _ummb = (LegacySupportingUserManagement)
MBeanServerInvocationHandler.newProxyInstance(mbsc, mbean.getObjectName(),
- UserManagement.class, false);
+ LegacySupportingUserManagement.class, false);
_toolkit = new FormToolkit(_tabFolder.getDisplay());
_form = _toolkit.createScrolledForm(_tabFolder);
_form.getBody().setLayout(new GridLayout());
@@ -171,6 +170,13 @@ public class UserManagementTabControl extends TabControl
String[] titles = { "Username", "JMX Management Rights" };
int[] bounds = { 310, 200 };
+ if(!settingManagementRightsSupported())
+ {
+ //Since Qpid JMX API 2.3 / 1.12 only Username is used
+ titles = new String[]{ "Username"};
+ bounds = new int[]{ 310 };
+ }
+
for (int i = 0; i < titles.length; i++)
{
final int index = i;
@@ -214,7 +220,16 @@ public class UserManagementTabControl extends TabControl
Composite buttonsComposite = _toolkit.createComposite(tableComposite);
gridData = new GridData(SWT.FILL, SWT.TOP, false, false);
- gridData.heightHint = 165;
+ if(!settingManagementRightsSupported())
+ {
+ //The 'Set Rights' button is not shown from Qpid JMX API 2.3 / 1.12
+ //onward, provide less space
+ gridData.heightHint = 135;
+ }
+ else
+ {
+ gridData.heightHint = 165;
+ }
buttonsComposite.setLayoutData(gridData);
buttonsComposite.setLayout(new GridLayout());
@@ -292,14 +307,14 @@ public class UserManagementTabControl extends TabControl
if (returnValue == InputDialog.OK)
{
- char[] password = id.getValue().toCharArray();
+ char[] passwordArray = id.getValue().toCharArray();
// Qpid JMX API 1.1 and below expects the password to be sent as a hashed value.
if (_ApiVersion.lessThanOrEqualTo(1,1))
{
try
{
- password = ViewUtility.getHash(id.getValue());
+ passwordArray = ViewUtility.getHash(id.getValue());
}
catch (Exception hashException)
{
@@ -312,7 +327,18 @@ public class UserManagementTabControl extends TabControl
try
{
- boolean result = _ummb.setPassword(user, password);
+ boolean result;
+
+ //For Qpid JMX API >=1.7 use String based method instead of older char[] based method.
+ if(_ApiVersion.greaterThanOrEqualTo(1, 7))
+ {
+ result = _ummb.setPassword(user, id.getValue());
+ }
+ else
+ {
+ result = _ummb.setPassword(user, passwordArray);
+ }
+
ViewUtility.operationResultFeedback(result, "Updated user password", "Failed to update user password");
}
catch(Exception e2)
@@ -324,25 +350,34 @@ public class UserManagementTabControl extends TabControl
}
}
});
-
- final Button setRightsButton = _toolkit.createButton(buttonsComposite, "Set Rights ...", SWT.PUSH);
- gridData = new GridData(SWT.CENTER, SWT.BOTTOM, false, false);
- gridData.widthHint = 125;
- setRightsButton.setLayoutData(gridData);
- setRightsButton.setEnabled(false);
- setRightsButton.addSelectionListener(new SelectionAdapter()
+
+ final Button setRightsButton;
+ if(!settingManagementRightsSupported())
{
- public void widgetSelected(SelectionEvent e)
+ //The 'Set Rights' button is not used from Qpid JMX API 2.3 / 1.12 onward
+ setRightsButton = null;
+ }
+ else
+ {
+ setRightsButton = _toolkit.createButton(buttonsComposite, "Set Rights ...", SWT.PUSH);
+ gridData = new GridData(SWT.CENTER, SWT.BOTTOM, false, false);
+ gridData.widthHint = 125;
+ setRightsButton.setLayoutData(gridData);
+ setRightsButton.setEnabled(false);
+ setRightsButton.addSelectionListener(new SelectionAdapter()
{
- int selectionIndex = _table.getSelectionIndex();
-
- if (selectionIndex != -1)
+ public void widgetSelected(SelectionEvent e)
{
- setRights(setRightsButton.getShell());
+ int selectionIndex = _table.getSelectionIndex();
+
+ if (selectionIndex != -1)
+ {
+ setRights(setRightsButton.getShell());
+ }
}
- }
- });
-
+ });
+ }
+
_tableViewer.addSelectionChangedListener(new ISelectionChangedListener(){
public void selectionChanged(SelectionChangedEvent evt)
{
@@ -351,14 +386,20 @@ public class UserManagementTabControl extends TabControl
if (selectionIndex == -1)
{
deleteUsersButton.setEnabled(false);
- setRightsButton.setEnabled(false);
setPasswordButton.setEnabled(false);
+ if(setRightsButton != null)
+ {
+ setRightsButton.setEnabled(false);
+ }
return;
}
else
{
deleteUsersButton.setEnabled(true);
- setRightsButton.setEnabled(true);
+ if(setRightsButton != null)
+ {
+ setRightsButton.setEnabled(true);
+ }
}
if (_table.getSelectionCount() > 1)
@@ -386,11 +427,17 @@ public class UserManagementTabControl extends TabControl
//this only reloaded the JMX rights file before Qpid JMX API 1.2
_toolkit.createLabel(miscGroup, " Loads the current management rights file from disk");
}
- else
+ else if(settingManagementRightsSupported())
{
- //since Qpid JMX API 1.2 it also reloads the password file
+ //from Qpid JMX API 1.2 to 2.3 / 1.12 it also reloads the password file
_toolkit.createLabel(miscGroup, " Loads the current password and management rights files from disk");
}
+ else
+ {
+ //since Qpid JMX API 2.3 / 1.12 it only reloads the password file
+ _toolkit.createLabel(miscGroup, " Loads the current password data");
+ }
+
reloadUserDetails.addSelectionListener(new SelectionAdapter()
{
public void widgetSelected(SelectionEvent e)
@@ -453,7 +500,7 @@ public class UserManagementTabControl extends TabControl
{
case 0 : // username column
return (String) ((CompositeData) element).get(USERNAME);
- case 1 : // rights column
+ case 1 : // rights column (used for API < 2.3 / 1.12)
return classifyUserRights((CompositeData) element);
default :
return "-";
@@ -510,11 +557,11 @@ public class UserManagementTabControl extends TabControl
int comparison = 0;
switch(column)
{
- case 0:
+ case 0: //username column
comparison = String.valueOf(user1.get(USERNAME)).compareTo(
String.valueOf(user2.get(USERNAME)));
break;
- case 1:
+ case 1: // rights column (used for API < 2.3 / 1.12)
comparison = classifyUserRights(user1).compareTo(classifyUserRights(user2));
break;
default:
@@ -555,7 +602,12 @@ public class UserManagementTabControl extends TabControl
private void setRights(final Shell parent)
{
-
+ if(!settingManagementRightsSupported())
+ {
+ throw new UnsupportedOperationException("Setting management rights" +
+ " is not supported using this version of the broker management API: " + (_ApiVersion));
+ }
+
int selectionIndex = _table.getSelectionIndex();
if (selectionIndex == -1)
@@ -699,6 +751,13 @@ public class UserManagementTabControl extends TabControl
shell.open();
}
+
+ protected boolean settingManagementRightsSupported()
+ {
+ //setting management access rights was supported until Qpid JMX API 1.12 / 2.3
+ return _ApiVersion.lessThan(1,12) ||
+ (_ApiVersion.greaterThanOrEqualTo(2, 0) && _ApiVersion.lessThan(2,3));
+ }
private void addUser(final Shell parent)
{
@@ -706,7 +765,8 @@ public class UserManagementTabControl extends TabControl
Composite usernameComposite = _toolkit.createComposite(shell, SWT.NONE);
usernameComposite.setBackground(shell.getBackground());
- usernameComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+ GridData usernameCompGridData = new GridData(SWT.FILL, SWT.TOP, true, false);
+ usernameComposite.setLayoutData(usernameCompGridData);
usernameComposite.setLayout(new GridLayout(2,false));
_toolkit.createLabel(usernameComposite,"Username:").setBackground(shell.getBackground());
@@ -715,28 +775,45 @@ public class UserManagementTabControl extends TabControl
Composite passwordComposite = _toolkit.createComposite(shell, SWT.NONE);
passwordComposite.setBackground(shell.getBackground());
- passwordComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+ GridData passwordCompGridData = new GridData(SWT.FILL, SWT.TOP, true, false);
+ passwordComposite.setLayoutData(passwordCompGridData);
passwordComposite.setLayout(new GridLayout(2,false));
_toolkit.createLabel(passwordComposite,"Password:").setBackground(shell.getBackground());
final Text passwordText = new Text(passwordComposite, SWT.BORDER | SWT.PASSWORD);
passwordText.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
-
- Group buttonGroup = new Group(shell, SWT.NONE);
- buttonGroup.setText("JMX Management Rights");
- buttonGroup.setBackground(shell.getBackground());
- buttonGroup.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
- buttonGroup.setLayout(new GridLayout(4,false));
- final Button noneButton = new Button(buttonGroup, SWT.RADIO);
- noneButton.setText("No Access");
- noneButton.setSelection(true);
- final Button readButton = new Button(buttonGroup, SWT.RADIO);
- readButton.setText("Read Only");
- final Button writeButton = new Button(buttonGroup, SWT.RADIO);
- writeButton.setText("Read + Write");
- final Button adminButton = new Button(buttonGroup, SWT.RADIO);
- adminButton.setText("Admin");
+ final Button readButton;
+ final Button writeButton;
+ final Button adminButton;
+ if(settingManagementRightsSupported())
+ {
+ Group buttonGroup = new Group(shell, SWT.NONE);
+ buttonGroup.setText("JMX Management Rights");
+ buttonGroup.setBackground(shell.getBackground());
+ buttonGroup.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
+ buttonGroup.setLayout(new GridLayout(4,false));
+
+ final Button noneButton = new Button(buttonGroup, SWT.RADIO);
+ noneButton.setText("No Access");
+ noneButton.setSelection(true);
+ readButton = new Button(buttonGroup, SWT.RADIO);
+ readButton.setText("Read Only");
+ writeButton = new Button(buttonGroup, SWT.RADIO);
+ writeButton.setText("Read + Write");
+ adminButton = new Button(buttonGroup, SWT.RADIO);
+ adminButton.setText("Admin");
+ }
+ else
+ {
+ readButton = null;
+ writeButton = null;
+ adminButton = null;
+ //The lack of rights settings will cause the dialog to,
+ //shrink so add width hints to the other components
+ passwordCompGridData.widthHint = 350;
+ usernameCompGridData.widthHint = 350;
+ }
Composite okCancelButtonsComp = _toolkit.createComposite(shell);
okCancelButtonsComp.setBackground(shell.getBackground());
@@ -784,22 +861,36 @@ public class UserManagementTabControl extends TabControl
return;
}
}
-
- boolean read = readButton.getSelection();
- boolean write = writeButton.getSelection();
- boolean admin = adminButton.getSelection();
+
+ //read the access rights selections if required
+ boolean read = false;
+ boolean write = false;
+ boolean admin = false;
+ if(settingManagementRightsSupported())
+ {
+ read = readButton.getSelection();
+ write = writeButton.getSelection();
+ admin = adminButton.getSelection();
+ }
shell.dispose();
try
{
boolean result = false;
- // If we have Qpid JMX API 1.7 or above, use newer createUser method with String based password.
- if (_ApiVersion.greaterThanOrEqualTo(1,7))
+
+ if (!settingManagementRightsSupported())
+ {
+ // If we have Qpid JMX API 2.3 / 1.12 or above, use newer createUser method without rights parameters.
+ result = _ummb.createUser(username, password);
+ }
+ else if (_ApiVersion.greaterThanOrEqualTo(1,7))
{
+ // If we have Qpid JMX API 1.7 or above, use newer createUser method with String based password.
result = _ummb.createUser(username, password, read, write, admin);
}
else
{
+ // Else we have Qpid JMX API 1.6 or below, use older createUser method with char[] based password.
result = _ummb.createUser(username, passwordChars, read, write, admin);
}
diff --git a/qpid/java/module.xml b/qpid/java/module.xml
index c7819febf4..050382ee80 100644
--- a/qpid/java/module.xml
+++ b/qpid/java/module.xml
@@ -281,7 +281,8 @@
<javac target="${java.target}" source="${java.source}"
destdir="${module.test.classes}" debug="on"
deprecation="${javac.deprecation}"
- srcdir="${module.test.src}">
+ srcdir="${module.test.src}"
+ includeantruntime="false">
<classpath refid="module.test.path"/>
</javac>
diff --git a/qpid/java/perftests/src/main/java/org/apache/qpid/client/message/TestMessageFactory.java b/qpid/java/perftests/src/main/java/org/apache/qpid/client/message/TestMessageFactory.java
index 3ad6c021bd..d94ca5592b 100644
--- a/qpid/java/perftests/src/main/java/org/apache/qpid/client/message/TestMessageFactory.java
+++ b/qpid/java/perftests/src/main/java/org/apache/qpid/client/message/TestMessageFactory.java
@@ -20,9 +20,6 @@
*/
package org.apache.qpid.client.message;
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.SimpleByteBufferAllocator;
-
import javax.jms.JMSException;
import javax.jms.Session;
import javax.jms.ObjectMessage;
diff --git a/qpid/java/perftests/src/main/java/org/apache/qpid/config/AMQConnectionFactoryInitialiser.java b/qpid/java/perftests/src/main/java/org/apache/qpid/config/AMQConnectionFactoryInitialiser.java
index cac0064785..76fd318625 100644
--- a/qpid/java/perftests/src/main/java/org/apache/qpid/config/AMQConnectionFactoryInitialiser.java
+++ b/qpid/java/perftests/src/main/java/org/apache/qpid/config/AMQConnectionFactoryInitialiser.java
@@ -21,8 +21,11 @@
package org.apache.qpid.config;
import org.apache.qpid.client.AMQConnectionFactory;
+import org.apache.qpid.client.AMQConnectionURL;
import org.apache.qpid.config.ConnectionFactoryInitialiser;
import org.apache.qpid.config.ConnectorConfig;
+import org.apache.qpid.jms.ConnectionURL;
+import org.apache.qpid.url.URLSyntaxException;
import javax.jms.ConnectionFactory;
@@ -30,6 +33,15 @@ class AMQConnectionFactoryInitialiser implements ConnectionFactoryInitialiser
{
public ConnectionFactory getFactory(ConnectorConfig config)
{
- return new AMQConnectionFactory(config.getHost(), config.getPort(), "/test_path");
+ try
+ {
+ final ConnectionURL connectionUrl = new AMQConnectionURL(ConnectionURL.AMQ_PROTOCOL +
+ "://guest:guest@/test_path?brokerlist='tcp://" + config.getHost() + ":" + config.getPort() + "'");
+ return new AMQConnectionFactory(connectionUrl);
+ }
+ catch (URLSyntaxException e)
+ {
+ throw new RuntimeException("Problem building URL", e);
+ }
}
}
diff --git a/qpid/java/resources/NOTICE b/qpid/java/resources/NOTICE
index 607c1c1580..add7753a4b 100644
--- a/qpid/java/resources/NOTICE
+++ b/qpid/java/resources/NOTICE
@@ -10,13 +10,6 @@ available from
http://www.slf4j.org/
-Concurrency utlitity classes are provided by the backport-util-concurrent
-library package, which is open source software, written by
-Dawid Kurzyniec, and copyright by Distributed Computing Laboratory,
-Emory University. The original software is available from
-
- http://dcl.mathcs.emory.edu/util/backport-util-concurrent/
-
Data compression support is provided by the JZLib library package,
which is open source software, written by JCraft, and copyright
by JCraft. The original software is available from
diff --git a/qpid/java/systests/build.xml b/qpid/java/systests/build.xml
index 1da0a6d355..33ad2227bb 100644
--- a/qpid/java/systests/build.xml
+++ b/qpid/java/systests/build.xml
@@ -22,7 +22,7 @@ nn - or more contributor license agreements. See the NOTICE file
<property name="module.depends" value="client management/tools/qpid-cli management/common broker broker/test common common/test junit-toolkit"/>
<property name="module.test.src" location="src/main/java"/>
<property name="module.test.excludes"
- value="**/TTLTest.java,**/DropInTest.java,**/TestClientControlledTest.java"/>
+ value="**/DropInTest.java,**/TestClientControlledTest.java"/>
<import file="../module.xml"/>
diff --git a/qpid/java/systests/etc/config-systests-ServerConfigurationTest-New.xml b/qpid/java/systests/etc/config-systests-ServerConfigurationTest-New.xml
deleted file mode 100644
index 1c7c7bb60f..0000000000
--- a/qpid/java/systests/etc/config-systests-ServerConfigurationTest-New.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-
-<broker>
- <work>${QPID_WORK}</work>
- <conf>${QPID_HOME}/etc</conf>
- <passwordDir>${conf}</passwordDir>
- <plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory>
- <cache-directory>${QPID_WORK}/cache</cache-directory>
- <connector>
- <transport>nio</transport>
- <port>5672</port>
- <socketReceiveBuffer>32768</socketReceiveBuffer>
- <socketSendBuffer>32768</socketSendBuffer>
- </connector>
- <management>
- <enabled>false</enabled>
- <jmxport>8999</jmxport>
- </management>
- <advanced>
- <filterchain enableExecutorPool="true"/>
- <enablePooledAllocator>false</enablePooledAllocator>
- <enableDirectBuffers>false</enableDirectBuffers>
- <framesize>65535</framesize>
- <compressBufferOnQueue>false</compressBufferOnQueue>
- </advanced>
-
- <security>
- <principal-databases>
- <principal-database>
- <name>passwordfile</name>
- <class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>
- <attributes>
- <attribute>
- <name>passwordFile</name>
- <value>${passwordDir}/passwd</value>
- </attribute>
- </attributes>
- </principal-database>
- </principal-databases>
- </security>
-
- <virtualhosts>${conf}/virtualhosts-ServerConfigurationTest-New.xml</virtualhosts>
-
- <heartbeat>
- <delay>0</delay>
- <timeoutFactor>2.0</timeoutFactor>
- </heartbeat>
- <queue>
- <auto_register>true</auto_register>
- </queue>
-</broker>
-
-
diff --git a/qpid/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml b/qpid/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml
deleted file mode 100644
index 56eaced9f7..0000000000
--- a/qpid/java/systests/etc/config-systests-ServerConfigurationTest-Old.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-
-<configuration>
-<work>${QPID_WORK}</work>
-<conf>${QPID_HOME}/etc</conf>
-<passwordDir>${conf}</passwordDir>
-<plugin-directory>${QPID_HOME}/lib/plugins</plugin-directory>
-<cache-directory>${QPID_WORK}/cache</cache-directory>
-<connector>
-<transport>nio</transport>
-<port>5672</port>
-<socketReceiveBuffer>32768</socketReceiveBuffer>
-<socketSendBuffer>32768</socketSendBuffer>
-</connector>
-<management>
-<enabled>false</enabled>
-<jmxport>8999</jmxport>
-</management>
-<advanced>
-<filterchain enableExecutorPool="true"/>
-<enablePooledAllocator>false</enablePooledAllocator>
-<enableDirectBuffers>false</enableDirectBuffers>
-<framesize>65535</framesize>
-<compressBufferOnQueue>false</compressBufferOnQueue>
-</advanced>
-<security>
-<principal-databases>
-<principal-database>
-<name>passwordfile</name>
-<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>
-<attributes>
-<attribute>
-<name>passwordFile</name>
-<value>${passwordDir}/passwd</value>
-</attribute>
-</attributes>
-</principal-database>
-</principal-databases>
-</security>
-<virtualhosts>${conf}/virtualhosts-ServerConfigurationTest-New.xml
-<default>dev-only</default>
-<virtualhost>
-<name>dev-only</name>
-<dev-only>
-<store>
-<class>org.apache.qpid.server.store.MemoryMessageStore</class>
-<environment-path>${work}/bdbstore/dev-only-store</environment-path>
-</store>
-<queues>
-<exchange>amq.direct</exchange>
-<maximumQueueDepth>102400</maximumQueueDepth>
-<maximumMessageSize>20480</maximumMessageSize>
-<maximumMessageAge>60000</maximumMessageAge>
-<queue>
-<name>dev-queue</name>
-</queue>
-</queues>
-</dev-only>
-</virtualhost>
-</virtualhosts>
-<heartbeat>
-<delay>0</delay>
-<timeoutFactor>2.0</timeoutFactor>
-</heartbeat>
-<queue>
-<auto_register>true</auto_register>
-</queue>
-</configuration>
diff --git a/qpid/java/systests/etc/config-systests-firewall-2.xml b/qpid/java/systests/etc/config-systests-firewall-2.xml
index 2eedd65d54..2549a7e6c4 100644
--- a/qpid/java/systests/etc/config-systests-firewall-2.xml
+++ b/qpid/java/systests/etc/config-systests-firewall-2.xml
@@ -42,13 +42,6 @@
</connector>
<management>
<enabled>false</enabled>
- <jmxport>8999</jmxport>
- <ssl>
- <enabled>false</enabled>
- <!-- Update below path to your keystore location, eg ${conf}/qpid.keystore -->
- <keyStorePath>${prefix}/../test-profiles/test_resources/ssl/keystore.jks</keyStorePath>
- <keyStorePassword>password</keyStorePassword>
- </ssl>
</management>
<advanced>
<filterchain enableExecutorPool="true"/>
@@ -61,10 +54,8 @@
</advanced>
<security>
- <principal-databases>
- <!-- Example use of Base64 encoded MD5 hashes for authentication via CRAM-MD5-Hashed -->
+ <pd-auth-manager>
<principal-database>
- <name>passwordfile</name>
<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>
<attributes>
<attribute>
@@ -73,7 +64,7 @@
</attribute>
</attributes>
</principal-database>
- </principal-databases>
+ </pd-auth-manager>
<msg-auth>false</msg-auth>
diff --git a/qpid/java/systests/etc/config-systests-firewall-3.xml b/qpid/java/systests/etc/config-systests-firewall-3.xml
index fc7d9a4c76..0cafb6d70a 100644
--- a/qpid/java/systests/etc/config-systests-firewall-3.xml
+++ b/qpid/java/systests/etc/config-systests-firewall-3.xml
@@ -42,13 +42,6 @@
</connector>
<management>
<enabled>false</enabled>
- <jmxport>8999</jmxport>
- <ssl>
- <enabled>false</enabled>
- <!-- Update below path to your keystore location, eg ${conf}/qpid.keystore -->
- <keyStorePath>${prefix}/../test-profiles/test_resources/ssl/keystore.jks</keyStorePath>
- <keyStorePassword>password</keyStorePassword>
- </ssl>
</management>
<advanced>
<filterchain enableExecutorPool="true"/>
@@ -61,10 +54,8 @@
</advanced>
<security>
- <principal-databases>
- <!-- Example use of Base64 encoded MD5 hashes for authentication via CRAM-MD5-Hashed -->
+ <pd-auth-manager>
<principal-database>
- <name>passwordfile</name>
<class>org.apache.qpid.server.security.auth.database.PlainPasswordFilePrincipalDatabase</class>
<attributes>
<attribute>
@@ -73,7 +64,7 @@
</attribute>
</attributes>
</principal-database>
- </principal-databases>
+ </pd-auth-manager>
<msg-auth>false</msg-auth>
diff --git a/qpid/java/systests/etc/config-systests-settings.xml b/qpid/java/systests/etc/config-systests-settings.xml
index 751ff133cb..5ed208bfe7 100644
--- a/qpid/java/systests/etc/config-systests-settings.xml
+++ b/qpid/java/systests/etc/config-systests-settings.xml
@@ -20,11 +20,20 @@
-
-->
<broker>
+ <connector>
+ <ssl>
+ <port>15671</port>
+ <enabled>false</enabled>
+ <sslOnly>false</sslOnly>
+ <keystorePath>${QPID_HOME}/../test-profiles/test_resources/ssl/java_broker_keystore.jks</keystorePath>
+ <keystorePassword>password</keystorePassword>
+ </ssl>
+ </connector>
<management>
<enabled>false</enabled>
<ssl>
<enabled>false</enabled>
- <keyStorePath>${QPID_HOME}/../test-profiles/test_resources/ssl/keystore.jks</keyStorePath>
+ <keyStorePath>${QPID_HOME}/../test-profiles/test_resources/ssl/java_broker_keystore.jks</keyStorePath>
<keyStorePassword>password</keyStorePassword>
</ssl>
</management>
diff --git a/qpid/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml b/qpid/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml
deleted file mode 100644
index 1b6845662b..0000000000
--- a/qpid/java/systests/etc/virtualhosts-ServerConfigurationTest-New.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
- -
- - Licensed to the Apache Software Foundation (ASF) under one
- - or more contributor license agreements. See the NOTICE file
- - distributed with this work for additional information
- - regarding copyright ownership. The ASF licenses this file
- - to you under the Apache License, Version 2.0 (the
- - "License"); you may not use this file except in compliance
- - with the License. You may obtain a copy of the License at
- -
- - http://www.apache.org/licenses/LICENSE-2.0
- -
- - Unless required by applicable law or agreed to in writing,
- - software distributed under the License is distributed on an
- - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- - KIND, either express or implied. See the License for the
- - specific language governing permissions and limitations
- - under the License.
- -
- -->
-<virtualhosts>
- <default>dev-only</default>
- <virtualhost>
- <name>dev-only</name>
- <dev-only>
- <queues>
- <exchange>amq.direct</exchange>
- <!-- Small defaults for development -->
- <maximumQueueDepth>102400</maximumQueueDepth> <!-- 100k -->
- <maximumMessageSize>20480</maximumMessageSize> <!-- 20kb -->
- <maximumMessageAge>60000</maximumMessageAge> <!-- 1 mins -->
-
- <queue>
- <name>dev-queue</name>
- </queue>
- </queues>
- <store>
- <class>org.apache.qpid.server.store.MemoryMessageStore</class>
- <environment-path>${QPID_WORK}/bdbstore/dev-only-store</environment-path>
- </store>
- </dev-only>
- </virtualhost>
-</virtualhosts>
- \ No newline at end of file
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java
index 8cdf12eaa4..471ebb16fc 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/client/ssl/SSLTest.java
@@ -31,62 +31,72 @@ import org.apache.qpid.test.utils.QpidBrokerTestCase;
import org.apache.qpid.transport.Connection;
public class SSLTest extends QpidBrokerTestCase
-{
-
+{
+ private static final String KEYSTORE = TEST_RESOURCES_DIR + "/ssl/java_client_keystore.jks";
+ private static final String KEYSTORE_PASSWORD = "password";
+ private static final String TRUSTSTORE = TEST_RESOURCES_DIR + "/ssl/java_client_truststore.jks";
+ private static final String TRUSTSTORE_PASSWORD = "password";
+ private static final String CERT_ALIAS_APP1 = "app1";
+ private static final String CERT_ALIAS_APP2 = "app2";
+
@Override
protected void setUp() throws Exception
{
- System.setProperty("javax.net.debug", "ssl");
+ if(isJavaBroker())
+ {
+ setTestClientSystemProperty("profile.use_ssl", "true");
+ setConfigurationProperty("connector.ssl.enabled", "true");
+ setConfigurationProperty("connector.ssl.sslOnly", "true");
+ }
+
+ // set the ssl system properties
+ setSystemProperty("javax.net.ssl.keyStore", KEYSTORE);
+ setSystemProperty("javax.net.ssl.keyStorePassword", KEYSTORE_PASSWORD);
+ setSystemProperty("javax.net.ssl.trustStore", TRUSTSTORE);
+ setSystemProperty("javax.net.ssl.trustStorePassword", TRUSTSTORE_PASSWORD);
+ setSystemProperty("javax.net.debug", "ssl");
super.setUp();
}
- @Override
- protected void tearDown() throws Exception
- {
- System.setProperty("javax.net.debug", "");
- super.tearDown();
- }
-
- public void testCreateSSLContextFromConnectionURLParams()
+ public void testCreateSSLConnectionUsingConnectionURLParams() throws Exception
{
if (Boolean.getBoolean("profile.use_ssl"))
- {
+ {
+ // Clear the ssl system properties
+ setSystemProperty("javax.net.ssl.keyStore", null);
+ setSystemProperty("javax.net.ssl.keyStorePassword", null);
+ setSystemProperty("javax.net.ssl.trustStore", null);
+ setSystemProperty("javax.net.ssl.trustStorePassword", null);
+
String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:%s" +
"?ssl='true'&ssl_verify_hostname='true'" +
"&key_store='%s'&key_store_password='%s'" +
"&trust_store='%s'&trust_store_password='%s'" +
"'";
- String keyStore = System.getProperty("javax.net.ssl.keyStore");
- String keyStorePass = System.getProperty("javax.net.ssl.keyStorePassword");
- String trustStore = System.getProperty("javax.net.ssl.trustStore");
- String trustStorePass = System.getProperty("javax.net.ssl.trustStorePassword");
+ url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT,
+ KEYSTORE,KEYSTORE_PASSWORD,TRUSTSTORE,TRUSTSTORE_PASSWORD);
- url = String.format(url,System.getProperty("test.port.ssl"),
- keyStore,keyStorePass,trustStore,trustStorePass);
+ AMQConnection con = new AMQConnection(url);
+ assertNotNull("connection should be successful", con);
+ Session ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
+ assertNotNull("create session should be successful", ssn);
+ }
+ }
+
+ public void testCreateSSLConnectionUsingSystemProperties() throws Exception
+ {
+ if (Boolean.getBoolean("profile.use_ssl"))
+ {
+
+ String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:%s?ssl='true''";
+
+ url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT);
- // temporarily set the trust/key store jvm args to something else
- // to ensure we only read from the connection URL param.
- System.setProperty("javax.net.ssl.trustStore","fessgsdgd");
- System.setProperty("javax.net.ssl.trustStorePassword","fessgsdgd");
- System.setProperty("javax.net.ssl.keyStore","fessgsdgd");
- System.setProperty("javax.net.ssl.keyStorePassword","fessgsdgd");
- try
- {
- AMQConnection con = new AMQConnection(url);
- Session ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
- }
- catch (Exception e)
- {
- fail("SSL Connection should be successful");
- }
- finally
- {
- System.setProperty("javax.net.ssl.trustStore",trustStore);
- System.setProperty("javax.net.ssl.trustStorePassword",trustStorePass);
- System.setProperty("javax.net.ssl.keyStore",keyStore);
- System.setProperty("javax.net.ssl.keyStorePassword",keyStorePass);
- }
+ AMQConnection con = new AMQConnection(url);
+ assertNotNull("connection should be successful", con);
+ Session ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
+ assertNotNull("create session should be successful", ssn);
}
}
@@ -95,8 +105,8 @@ public class SSLTest extends QpidBrokerTestCase
if (Boolean.getBoolean("profile.use_ssl"))
{
String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:" +
- System.getProperty("test.port.ssl") +
- "?ssl='true'&ssl_cert_alias='app1''";
+ QpidBrokerTestCase.DEFAULT_SSL_PORT +
+ "?ssl='true'&ssl_cert_alias='" + CERT_ALIAS_APP1 + "''";
AMQTestConnection_0_10 con = new AMQTestConnection_0_10(url);
Connection transportCon = con.getConnection();
@@ -105,8 +115,8 @@ public class SSLTest extends QpidBrokerTestCase
con.close();
url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:" +
- System.getProperty("test.port.ssl") +
- "?ssl='true'&ssl_cert_alias='app2''";
+ QpidBrokerTestCase.DEFAULT_SSL_PORT +
+ "?ssl='true'&ssl_cert_alias='" + CERT_ALIAS_APP2 + "''";
con = new AMQTestConnection_0_10(url);
transportCon = con.getConnection();
@@ -116,12 +126,12 @@ public class SSLTest extends QpidBrokerTestCase
}
}
- public void testVerifyHostName()
+ public void testVerifyHostNameWithIncorrectHostname()
{
if (Boolean.getBoolean("profile.use_ssl"))
{
String url = "amqp://guest:guest@test/?brokerlist='tcp://127.0.0.1:" +
- System.getProperty("test.port.ssl") +
+ QpidBrokerTestCase.DEFAULT_SSL_PORT +
"?ssl='true'&ssl_verify_hostname='true''";
try
@@ -140,42 +150,53 @@ public class SSLTest extends QpidBrokerTestCase
}
}
- public void testVerifyLocalHost()
+ public void testVerifyLocalHost() throws Exception
{
if (Boolean.getBoolean("profile.use_ssl"))
{
String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:" +
- System.getProperty("test.port.ssl") +
+ QpidBrokerTestCase.DEFAULT_SSL_PORT +
"?ssl='true'&ssl_verify_hostname='true''";
-
- try
- {
- AMQConnection con = new AMQConnection(url);
- }
- catch (Exception e)
- {
- fail("Hostname verification should succeed");
- }
- }
+
+ AMQConnection con = new AMQConnection(url);
+ assertNotNull("connection should have been created", con);
+ }
}
- public void testVerifyLocalHostLocalDomain()
+ public void testVerifyLocalHostLocalDomain() throws Exception
{
if (Boolean.getBoolean("profile.use_ssl"))
{
String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost.localdomain:" +
- System.getProperty("test.port.ssl") +
+ QpidBrokerTestCase.DEFAULT_SSL_PORT +
"?ssl='true'&ssl_verify_hostname='true''";
+
+ AMQConnection con = new AMQConnection(url);
+ assertNotNull("connection should have been created", con);
+ }
+ }
+
+ public void testCreateSSLConnectionUsingConnectionURLParamsTrustStoreOnly() throws Exception
+ {
+ if (Boolean.getBoolean("profile.use_ssl"))
+ {
+ // Clear the ssl system properties
+ setSystemProperty("javax.net.ssl.keyStore", null);
+ setSystemProperty("javax.net.ssl.keyStorePassword", null);
+ setSystemProperty("javax.net.ssl.trustStore", null);
+ setSystemProperty("javax.net.ssl.trustStorePassword", null);
- try
- {
- AMQConnection con = new AMQConnection(url);
- }
- catch (Exception e)
- {
- fail("Hostname verification should succeed");
- }
-
+ String url = "amqp://guest:guest@test/?brokerlist='tcp://localhost:%s" +
+ "?ssl='true'&ssl_verify_hostname='true'" +
+ "&trust_store='%s'&trust_store_password='%s'" +
+ "'";
+
+ url = String.format(url,QpidBrokerTestCase.DEFAULT_SSL_PORT, TRUSTSTORE,TRUSTSTORE_PASSWORD);
+
+ AMQConnection con = new AMQConnection(url);
+ assertNotNull("connection should be successful", con);
+ Session ssn = con.createSession(false,Session.AUTO_ACKNOWLEDGE);
+ assertNotNull("create session should be successful", ssn);
}
}
}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/jms/xa/XAResourceTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/jms/xa/XAResourceTest.java
new file mode 100644
index 0000000000..d7ee203fdf
--- /dev/null
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/jms/xa/XAResourceTest.java
@@ -0,0 +1,116 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.jms.xa;
+
+import javax.jms.XAConnection;
+import javax.jms.XAConnectionFactory;
+import javax.jms.XASession;
+import javax.transaction.xa.XAResource;
+
+import org.apache.qpid.client.AMQConnectionFactory;
+import org.apache.qpid.jms.ConnectionURL;
+import org.apache.qpid.test.utils.QpidBrokerTestCase;
+import org.apache.qpid.util.FileUtils;
+
+public class XAResourceTest extends QpidBrokerTestCase
+{
+
+ private static final String FACTORY_NAME = "default";
+ private static final String ALT_FACTORY_NAME = "connection2";
+
+ /*
+ * Test with multiple XAResources originating from the same connection factory. XAResource(s) will be equal,
+ * as they originate from the same session.
+ */
+ public void testIsSameRMSingleCF() throws Exception
+ {
+ XAConnectionFactory factory = getConnectionFactory(FACTORY_NAME);
+ XAConnection conn = factory.createXAConnection();
+ XASession session = conn.createXASession();
+ XAResource xaResource1 = session.getXAResource();
+ XAResource xaResource2 = session.getXAResource();
+
+ assertEquals("XAResource objects not equal", xaResource1, xaResource2);
+ assertTrue("isSameRM not true for identical objects", xaResource1.isSameRM(xaResource2));
+
+ session.close();
+ conn.close();
+ }
+
+ /*
+ * Test with multiple XAResources originating from different connection factory's and different sessions. XAResources will not be
+ * equal as they do not originate from the same session. As the UUID from the broker will be the same, isSameRM will be true.
+ *
+ */
+ public void testIsSameRMMultiCF() throws Exception
+ {
+ startBroker(FAILING_PORT);
+ ConnectionURL url = getConnectionFactory(FACTORY_NAME).getConnectionURL();
+ XAConnectionFactory factory = new AMQConnectionFactory(url);
+ XAConnectionFactory factory2 = new AMQConnectionFactory(url);
+ XAConnectionFactory factory3 = getConnectionFactory(ALT_FACTORY_NAME);
+
+ XAConnection conn = factory.createXAConnection();
+ XAConnection conn2 = factory2.createXAConnection();
+ XAConnection conn3 = factory3.createXAConnection();
+
+ XASession session = conn.createXASession();
+ XASession session2 = conn2.createXASession();
+ XASession session3 = conn3.createXASession();
+
+ XAResource xaResource1 = session.getXAResource();
+ XAResource xaResource2 = session2.getXAResource();
+ XAResource xaResource3 = session3.getXAResource();
+
+ assertFalse("XAResource objects should not be equal", xaResource1.equals(xaResource2));
+ assertTrue("isSameRM not true for identical objects", xaResource1.isSameRM(xaResource2));
+ assertFalse("isSameRM true for XA Resources created by two different brokers", xaResource1.isSameRM(xaResource3));
+
+ conn.close();
+ conn2.close();
+ conn3.close();
+ }
+
+ @Override
+ public void stopBroker(int port) throws Exception
+ {
+ if (isBrokerPresent(port))
+ {
+ super.stopBroker(port);
+ }
+ }
+
+ @Override
+ public void tearDown() throws Exception
+ {
+ try
+ {
+ super.tearDown();
+ }
+ finally
+ {
+ // Ensure we shutdown any secondary brokers
+ stopBroker(FAILING_PORT);
+ FileUtils.deleteDirectory(System.getProperty("QPID_WORK") + "/" + getFailingPort());
+ }
+ }
+
+}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagementActorLoggingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagementActorLoggingTest.java
index 19657ef396..2864d8e994 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagementActorLoggingTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/ManagementActorLoggingTest.java
@@ -68,61 +68,6 @@ public class ManagementActorLoggingTest extends AbstractTestLogging
/**
* Description:
- * When a JMX Management connection is made then this will be logged out.
- *
- * Input:
- *
- * 1. Running Broker
- * 2. Connect Management client via JMX
- * Output:
- *
- * <date> MNG-1007 : Open <user>
- *
- * Validation Steps:
- * 1. The MNG ID is correct
- * 2. The user is correct
- *
- * On connection close a MNG-1008 is expected
- *
- * * <date> MNG-1008 : Close
- *
- * Validation Steps:
- * 1. The MNG ID is correct
- *
- * @throws java.io.IOException - if there is a problem reseting the log monitor
- */
- public void testJMXManagementConsoleConnection() throws IOException
- {
- List<String> results = waitAndFindMatches("MNG-1007");
-
- assertEquals("Unexpected Management Connection count", 1, results.size());
-
- String log = getLogMessage(results, 0);
-
- validateMessageID("MNG-1007", log);
-
- assertTrue("User not in log message:" + log, log.endsWith(USER));
- // Extract the id from the log string
- // MESSAGE [mng:1(rmi://169.24.29.116)] MNG-1007 : Open : User admin
- int connectionID = Integer.parseInt(fromActor(getLog(results.get(0))).charAt(4) + "");
-
- results = findMatches("MNG-1008");
-
- assertEquals("Unexpected Management Connection close count", 0, results.size());
-
- _jmxUtils.close();
- _closed = true;
-
- results = waitAndFindMatches("MNG-1008");
-
- assertEquals("Unexpected Management Connection count", 1, results.size());
-
- assertEquals("Close does not have same id as open,", connectionID,
- Integer.parseInt(fromActor(getLog(results.get(0))).charAt(4) + ""));
- }
-
- /**
- * Description:
* When a connected client has its connection closed via the Management Console this will be logged as a CON-1002 message.
* Input:
*
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/MessageStatisticsDeliveryTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/MessageStatisticsDeliveryTest.java
index e657856d0e..c374d23473 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/MessageStatisticsDeliveryTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/management/jmx/MessageStatisticsDeliveryTest.java
@@ -103,7 +103,7 @@ public class MessageStatisticsDeliveryTest extends MessageStatisticsTestCase
MessageConsumer consumer = session.createConsumer(_queue);
for (int i = 0; i < number; i++)
{
- Message msg = consumer.receive(100);
+ Message msg = consumer.receive(1000);
assertNotNull("Message " + i + " was not received", msg);
}
}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/failover/FailoverMethodTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/failover/FailoverMethodTest.java
index 35650e314a..470fcefae3 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/failover/FailoverMethodTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/failover/FailoverMethodTest.java
@@ -26,6 +26,7 @@ import java.util.concurrent.TimeUnit;
import javax.jms.ExceptionListener;
import javax.jms.JMSException;
+import org.apache.qpid.AMQConnectionClosedException;
import org.apache.qpid.AMQDisconnectedException;
import org.apache.qpid.AMQException;
import org.apache.qpid.client.AMQConnection;
@@ -60,7 +61,7 @@ public class FailoverMethodTest extends QpidBrokerTestCase implements ExceptionL
try
{
long start = System.currentTimeMillis();
- AMQConnection connection = new AMQConnection(url, null);
+ AMQConnection connection = new AMQConnection(url);
connection.setExceptionListener(this);
@@ -104,7 +105,7 @@ public class FailoverMethodTest extends QpidBrokerTestCase implements ExceptionL
try
{
long start = System.currentTimeMillis();
- AMQConnection connection = new AMQConnection(url, null);
+ AMQConnection connection = new AMQConnection(url);
connection.setExceptionListener(this);
@@ -128,8 +129,8 @@ public class FailoverMethodTest extends QpidBrokerTestCase implements ExceptionL
assertTrue("Failover took less than 6 seconds", duration > 6000);
// Ensure we don't have delays before initial connection and reconnection.
- // We allow 1 second for initial connection and failover logic on top of 6s of sleep.
- assertTrue("Failover took more than 7 seconds:(" + duration + ")", duration < 7000);
+ // We allow 3 second for initial connection and failover logic on top of 6s of sleep.
+ assertTrue("Failover took more than 9 seconds:(" + duration + ")", duration < 9000);
}
catch (AMQException e)
{
@@ -139,7 +140,7 @@ public class FailoverMethodTest extends QpidBrokerTestCase implements ExceptionL
public void onException(JMSException e)
{
- if (e.getLinkedException() instanceof AMQDisconnectedException)
+ if (e.getLinkedException() instanceof AMQDisconnectedException || e.getLinkedException() instanceof AMQConnectionClosedException)
{
_logger.debug("Received AMQDisconnectedException");
_failoverComplete.countDown();
@@ -159,19 +160,34 @@ public class FailoverMethodTest extends QpidBrokerTestCase implements ExceptionL
*/
public void testNoFailover() throws Exception
{
+ if (!isInternalBroker())
+ {
+ // QPID-3359
+ // These tests always used to be inVM tests, then QPID-2815, with removal of ivVM,
+ // converted the test to use QpidBrokerTestCase. However, since then we notice this
+ // test fails on slower CI boxes. It turns out the test design is *extremely*
+ // sensitive the length of time the broker takes to start up.
+ //
+ // Making the test a same-VM test to temporarily avoid the issue. In long term, test
+ // needs redesigned to avoid the issue.
+ return;
+ }
+
int CONNECT_DELAY = 2000;
String connectionString = "amqp://guest:guest@/test?brokerlist='tcp://localhost:" + getPort() + "?connectdelay='" + CONNECT_DELAY + "'," +
"retries='3'',failover='nofailover'";
+
AMQConnectionURL url = new AMQConnectionURL(connectionString);
+ Thread brokerStart = null;
try
{
//Kill initial broker
stopBroker();
//Create a thread to start the broker asynchronously
- Thread brokerStart = new Thread(new Runnable()
+ brokerStart = new Thread(new Runnable()
{
public void run()
{
@@ -194,9 +210,8 @@ public class FailoverMethodTest extends QpidBrokerTestCase implements ExceptionL
brokerStart.start();
long start = System.currentTimeMillis();
-
//Start the connection so it will use the retries
- AMQConnection connection = new AMQConnection(url, null);
+ AMQConnection connection = new AMQConnection(url);
long end = System.currentTimeMillis();
@@ -210,6 +225,7 @@ public class FailoverMethodTest extends QpidBrokerTestCase implements ExceptionL
//Ensure we collect the brokerStart thread
brokerStart.join();
+ brokerStart = null;
start = System.currentTimeMillis();
@@ -233,6 +249,23 @@ public class FailoverMethodTest extends QpidBrokerTestCase implements ExceptionL
{
fail(e.getMessage());
}
+ finally
+ {
+ // Guard against the case where the broker took too long to start
+ // and the initial connection failed to be formed.
+ if (brokerStart != null)
+ {
+ brokerStart.join();
+ }
+ }
+ }
+
+ public void stopBroker(int port) throws Exception
+ {
+ if (isBrokerPresent(port))
+ {
+ super.stopBroker(port);
+ }
}
}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/failover/MessageDisappearWithIOExceptionTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/failover/MessageDisappearWithIOExceptionTest.java
index 4c2758241e..fd33266414 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/failover/MessageDisappearWithIOExceptionTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/failover/MessageDisappearWithIOExceptionTest.java
@@ -20,13 +20,10 @@
*/
package org.apache.qpid.server.failover;
-import org.apache.mina.common.WriteTimeoutException;
import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.protocol.AMQProtocolSession;
import org.apache.qpid.jms.ConnectionListener;
-import org.apache.qpid.test.utils.QpidBrokerTestCase;
import org.apache.qpid.test.utils.FailoverBaseCase;
-import org.apache.qpid.AMQConnectionClosedException;
import javax.jms.Destination;
import javax.jms.Message;
@@ -34,6 +31,7 @@ import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
@@ -195,7 +193,7 @@ public class MessageDisappearWithIOExceptionTest extends FailoverBaseCase implem
// Send IO Exception - causing failover
_connection.getProtocolHandler().
- exception(new WriteTimeoutException("WriteTimeoutException to cause failover."));
+ exception(new IOException("IOException to cause failover."));
// Verify Failover occured through ConnectionListener
assertTrue("Failover did not occur",
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java
index 58b2edfee2..a2487b49bf 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java
@@ -46,7 +46,7 @@ public class AlertingTest extends AbstractTestLogging
{
// Update the configuration to make our virtualhost Persistent.
makeVirtualHostPersistent(VIRTUALHOST);
- setConfigurationProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".housekeeping.expiredMessageCheckPeriod", "5000");
+ setConfigurationProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".housekeeping.checkPeriod", "5000");
_numMessages = 50;
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java
index 9155b84365..e901903eb4 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java
@@ -519,7 +519,7 @@ public class BrokerLoggingTest extends AbstractTestLogging
setConfigurationProperty("connector.ssl.keyStorePath", getConfigurationStringProperty("management.ssl.keyStorePath"));
setConfigurationProperty("connector.ssl.keyStorePassword", getConfigurationStringProperty("management.ssl.keyStorePassword"));
- Integer sslPort = Integer.parseInt(getConfigurationStringProperty("connector.sslport"));
+ Integer sslPort = Integer.parseInt(getConfigurationStringProperty("connector.ssl.port"));
startBroker();
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java
index 1e48f34f99..b3c080b2e3 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java
@@ -20,6 +20,16 @@
*/
package org.apache.qpid.server.logging;
+import java.io.IOException;
+import java.util.List;
+
+import javax.jms.Connection;
+import javax.jms.JMSException;
+import javax.jms.MessageProducer;
+import javax.jms.Queue;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.AMQSession_0_10;
import org.apache.qpid.framing.AMQFrame;
@@ -28,13 +38,6 @@ import org.apache.qpid.framing.ExchangeDeleteBody;
import org.apache.qpid.framing.ExchangeDeleteOkBody;
import org.apache.qpid.framing.amqp_8_0.MethodRegistry_8_0;
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Queue;
-import javax.jms.Session;
-import java.io.IOException;
-import java.util.List;
-
/**
* Exchange
*
@@ -214,4 +217,38 @@ public class ExchangeLoggingTest extends AbstractTestLogging
}
+ public void testDiscardedMessage() throws Exception
+ {
+ //Ignore broker startup messages
+ _monitor.reset();
+
+ if (!isBroker010())
+ {
+ // Default 0-8..-0-9-1 behaviour is for messages to be rejected (returned to client).
+ setTestClientSystemProperty("qpid.default_mandatory", "false");
+ }
+
+ _session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ // Do not create consumer so queue is not created and message will be discarded.
+ final MessageProducer producer = _session.createProducer(_queue);
+
+ // Sending message
+ final TextMessage msg = _session.createTextMessage("msg");
+ producer.send(msg);
+
+ final String expectedMessageBody = "Discarded Message : Name: " + _name + " Routing Key: " + _queue.getQueueName();
+
+ // Ensure we have received the EXH log msg.
+ waitForMessage("EXH-1003");
+
+ List<String> results = findMatches(EXH_PREFIX);
+ assertEquals("Result set larger than expected.", 2, results.size());
+
+ final String log = getLogMessage(results, 1);
+ validateMessageID("EXH-1003", log);
+
+ final String message = getMessageString(fromMessage(log));
+ assertEquals("Log Message not as expected", expectedMessageBody, message);
+ }
}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java
index 9feca7279e..24e6aa4207 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ManagementLoggingTest.java
@@ -22,6 +22,7 @@ package org.apache.qpid.server.logging;
import junit.framework.AssertionFailedError;
+import org.apache.qpid.server.configuration.ServerConfiguration;
import org.apache.qpid.util.LogMonitor;
import java.util.List;
@@ -206,7 +207,7 @@ public class ManagementLoggingTest extends AbstractTestLogging
validateMessageID("MNG-1002", log);
//Check the RMI Registry port is as expected
- int mPort = getPort() + (DEFAULT_MANAGEMENT_PORT - DEFAULT_PORT);
+ int mPort = getManagementPort(getPort());
assertTrue("RMI Registry port not as expected(" + mPort + ").:" + getMessageString(log),
getMessageString(log).endsWith(String.valueOf(mPort)));
@@ -217,7 +218,7 @@ public class ManagementLoggingTest extends AbstractTestLogging
// We expect the RMI Registry port (the defined 'management port') to be
// 100 lower than the JMX RMIConnector Server Port (the actual JMX server)
- int jmxPort = mPort + 100;
+ int jmxPort = mPort + ServerConfiguration.JMXPORT_CONNECTORSERVER_OFFSET;
assertTrue("JMX RMIConnectorServer port not as expected(" + jmxPort + ").:" + getMessageString(log),
getMessageString(log).endsWith(String.valueOf(jmxPort)));
}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java
index 7f8f71d965..8aa5b6d9de 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/AbstractACLTestCase.java
@@ -196,7 +196,7 @@ public abstract class AbstractACLTestCase extends QpidBrokerTestCase implements
}
PrintWriter out = new PrintWriter(new FileWriter(aclFile));
- out.println(String.format("# %s", _testName));
+ out.println(String.format("# %s", getTestName()));
for (String line : rules)
{
out.println(line);
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/ExternalACLTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/ExternalACLTest.java
index d1ba725721..782ca22965 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/ExternalACLTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/security/acl/ExternalACLTest.java
@@ -67,14 +67,14 @@ public class ExternalACLTest extends AbstractACLTestCase
fail("Connection was not created due to:" + e);
}
}
-
+
public void testAccessVhostAuthorisedGuestSuccess() throws IOException, Exception
{
//The 'guest' user has no access to the 'test' vhost, as tested below in testAccessNoRights(), and so
- //is unable to perform actions such as connecting (and by extension, creating a queue, and consuming
- //from a queue etc). In order to test the vhost-wide 'access' ACL right, the 'guest' user has been given
+ //is unable to perform actions such as connecting (and by extension, creating a queue, and consuming
+ //from a queue etc). In order to test the vhost-wide 'access' ACL right, the 'guest' user has been given
//this right in the 'test2' vhost.
-
+
try
{
//get a connection to the 'test2' vhost using the guest user and perform various actions.
@@ -106,7 +106,7 @@ public class ExternalACLTest extends AbstractACLTestCase
fail("Test failed due to:" + e.getMessage());
}
}
-
+
public void testAccessNoRightsFailure() throws Exception
{
try
@@ -115,7 +115,7 @@ public class ExternalACLTest extends AbstractACLTestCase
Session sess = conn.createSession(true, Session.SESSION_TRANSACTED);
conn.start();
sess.rollback();
-
+
fail("Connection was created.");
}
catch (JMSException e)
@@ -126,11 +126,11 @@ public class ExternalACLTest extends AbstractACLTestCase
Throwable cause = linkedException.getCause();
assertNotNull("Cause was null", cause);
assertTrue("Wrong linked exception type", cause instanceof AMQException);
- AMQConstant errorCode = isBroker010() ? AMQConstant.CONTEXT_IN_USE : AMQConstant.ACCESS_REFUSED;
+ AMQConstant errorCode = isBroker010() ? AMQConstant.CONNECTION_FORCED : AMQConstant.ACCESS_REFUSED;
assertEquals("Incorrect error code received", errorCode, ((AMQException) cause).getErrorCode());
}
}
-
+
public void testClientDeleteQueueSuccess() throws Exception
{
try
@@ -155,7 +155,7 @@ public class ExternalACLTest extends AbstractACLTestCase
fail("Test failed due to:" + e.getMessage());
}
}
-
+
public void testServerDeleteQueueFailure() throws Exception
{
try
@@ -207,13 +207,13 @@ public class ExternalACLTest extends AbstractACLTestCase
try
{
Connection conn = getConnection("test", "client", "guest");
-
+
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
conn.start();
sess.createConsumer(sess.createQueue("IllegalQueue"));
-
+
fail("Test failed as consumer was created.");
}
catch (JMSException e)
@@ -253,10 +253,10 @@ public class ExternalACLTest extends AbstractACLTestCase
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
conn.start();
-
+
//Create a Named Queue
((AMQSession<?, ?>) sess).createQueue(new AMQShortString("IllegalQueue"), false, false, false);
-
+
fail("Test failed as Queue creation succeded.");
//conn will be automatically closed
}
@@ -385,7 +385,7 @@ public class ExternalACLTest extends AbstractACLTestCase
try
{
Connection conn = getConnection("test", "client", "guest");
-
+
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
conn.start();
@@ -405,13 +405,13 @@ public class ExternalACLTest extends AbstractACLTestCase
try
{
Connection conn = getConnection("test", "server", "guest");
-
+
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
conn.start();
sess.createConsumer(sess.createTemporaryQueue());
-
+
fail("Test failed as consumer was created.");
}
catch (JMSException e)
@@ -446,7 +446,7 @@ public class ExternalACLTest extends AbstractACLTestCase
try
{
Connection conn = getConnection("test", "server", "guest");
-
+
Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
conn.start();
@@ -480,13 +480,13 @@ public class ExternalACLTest extends AbstractACLTestCase
check403Exception(e.getLinkedException());
}
}
-
+
public void testServerCreateAutoDeleteQueueInvalid() throws NamingException, JMSException, AMQException, Exception
{
try
{
Connection connection = getConnection("test", "server", "guest");
-
+
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
connection.start();
@@ -630,8 +630,8 @@ public class ExternalACLTest extends AbstractACLTestCase
check403Exception(e.getLinkedException());
}
}
-
-
+
+
@Override
public String getConfig()
{
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java
index 97d825177c..d6caf05d33 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/client/QueueBrowserAutoAckTest.java
@@ -59,7 +59,7 @@ public class QueueBrowserAutoAckTest extends FailoverBaseCase
_queue = _clientSession.createQueue(getTestQueueName());
_clientSession.createConsumer(_queue).close();
-
+
//Ensure there are no messages on the queue to start with.
checkQueueDepth(0);
}
@@ -490,7 +490,7 @@ public class QueueBrowserAutoAckTest extends FailoverBaseCase
}
}
- assertTrue("We should get atleast " + messages + " msgs.", msgCount >= messages);
+ assertTrue("We should get atleast " + messages + " msgs (found " + msgCount +").", msgCount >= messages);
if (_logger.isDebugEnabled())
{
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
index 5dac9fb7c3..b5bb74327e 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
@@ -49,11 +49,13 @@ import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.AMQDestination;
import org.apache.qpid.client.AMQSession;
import org.apache.qpid.client.AMQSession_0_10;
+import org.apache.qpid.client.message.QpidMessageProperties;
import org.apache.qpid.client.messaging.address.Node.ExchangeNode;
import org.apache.qpid.client.messaging.address.Node.QueueNode;
import org.apache.qpid.jndi.PropertiesFileInitialContextFactory;
import org.apache.qpid.messaging.Address;
import org.apache.qpid.test.utils.QpidBrokerTestCase;
+import org.apache.qpid.transport.ExecutionErrorCode;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -210,7 +212,7 @@ public class AddressBasedDestinationTest extends QpidBrokerTestCase
"durable: true ," +
"x-declare: " +
"{" +
- "auto-delete: true," +
+ "exclusive: true," +
"arguments: {" +
"'qpid.max_size': 1000," +
"'qpid.max_count': 100" +
@@ -226,6 +228,9 @@ public class AddressBasedDestinationTest extends QpidBrokerTestCase
"}";
AMQDestination dest = new AMQAnyDestination(addr);
MessageConsumer cons = jmsSession.createConsumer(dest);
+ cons.close();
+
+ // Even if the consumer is closed the queue and the bindings should be intact.
assertTrue("Queue not created as expected",(
(AMQSession_0_10)jmsSession).isQueueExist(dest,(QueueNode)dest.getSourceNode(), true));
@@ -254,12 +259,44 @@ public class AddressBasedDestinationTest extends QpidBrokerTestCase
(AMQSession_0_10)jmsSession).isQueueBound("amq.match",
dest.getAddressName(),null, args));
+ MessageProducer prod = jmsSession.createProducer(dest);
+ prod.send(jmsSession.createTextMessage("test"));
+
+ MessageConsumer cons2 = jmsSession.createConsumer(jmsSession.createQueue("ADDR:my-queue"));
+ Message m = cons2.receive(1000);
+ assertNotNull("Should receive message sent to my-queue",m);
+ assertEquals("The subject set in the message is incorrect","hello",m.getStringProperty(QpidMessageProperties.QPID_SUBJECT));
}
public void testCreateExchange() throws Exception
{
+ createExchangeImpl(false, false);
+ }
+
+ /**
+ * Verify creating an exchange via an Address, with supported
+ * exchange-declare arguments.
+ */
+ public void testCreateExchangeWithArgs() throws Exception
+ {
+ createExchangeImpl(true, false);
+ }
+
+ /**
+ * Verify that when creating an exchange via an Address, if a
+ * nonsense argument is specified the broker throws an execution
+ * exception back on the session with NOT_IMPLEMENTED status.
+ */
+ public void testCreateExchangeWithNonsenseArgs() throws Exception
+ {
+ createExchangeImpl(true, true);
+ }
+
+ private void createExchangeImpl(final boolean withExchangeArgs,
+ final boolean useNonsenseArguments) throws Exception
+ {
Session jmsSession = _connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
-
+
String addr = "ADDR:my-exchange/hello; " +
"{ " +
"create: always, " +
@@ -269,17 +306,36 @@ public class AddressBasedDestinationTest extends QpidBrokerTestCase
"x-declare: " +
"{ " +
"type:direct, " +
- "auto-delete: true, " +
- "arguments: {" +
- "'qpid.msg_sequence': 1, " +
- "'qpid.ive': 1" +
- "}" +
+ "auto-delete: true" +
+ createExchangeArgsString(withExchangeArgs, useNonsenseArguments) +
"}" +
"}" +
"}";
AMQDestination dest = new AMQAnyDestination(addr);
- MessageConsumer cons = jmsSession.createConsumer(dest);
+
+ MessageConsumer cons;
+ try
+ {
+ cons = jmsSession.createConsumer(dest);
+ if(useNonsenseArguments)
+ {
+ fail("Expected execution exception during exchange declare did not occur");
+ }
+ }
+ catch(JMSException e)
+ {
+ if(useNonsenseArguments && e.getCause().getMessage().contains(ExecutionErrorCode.NOT_IMPLEMENTED.toString()))
+ {
+ //expected because we used an argument which the broker doesn't have functionality
+ //for. We can't do the rest of the test as a result of the exception, just stop.
+ return;
+ }
+ else
+ {
+ fail("Unexpected exception whilst creating consumer: " + e);
+ }
+ }
assertTrue("Exchange not created as expected",(
(AMQSession_0_10)jmsSession).isExchangeExist(dest, (ExchangeNode)dest.getTargetNode() , true));
@@ -294,6 +350,32 @@ public class AddressBasedDestinationTest extends QpidBrokerTestCase
cons = jmsSession.createConsumer(dest);
}
+ private String createExchangeArgsString(final boolean withExchangeArgs,
+ final boolean useNonsenseArguments)
+ {
+ String argsString;
+
+ if(withExchangeArgs && useNonsenseArguments)
+ {
+ argsString = ", arguments: {" +
+ "'abcd.1234.wxyz': 1, " +
+ "}";
+ }
+ else if(withExchangeArgs)
+ {
+ argsString = ", arguments: {" +
+ "'qpid.msg_sequence': 1, " +
+ "'qpid.ive': 1" +
+ "}";
+ }
+ else
+ {
+ argsString = "";
+ }
+
+ return argsString;
+ }
+
public void checkQueueForBindings(Session jmsSession, AMQDestination dest,String headersBinding) throws Exception
{
assertTrue("Queue not created as expected",(
@@ -547,11 +629,25 @@ public class AddressBasedDestinationTest extends QpidBrokerTestCase
}
/**
- * Test goal: Verifies that session.creatTopic method
- * works as expected both with the new and old addressing scheme.
+ * Test goal: Verifies that session.creatTopic method works as expected
+ * both with the new and old addressing scheme.
*/
public void testSessionCreateTopic() throws Exception
{
+ sessionCreateTopicImpl(false);
+ }
+
+ /**
+ * Test goal: Verifies that session.creatTopic method works as expected
+ * both with the new and old addressing scheme when adding exchange arguments.
+ */
+ public void testSessionCreateTopicWithExchangeArgs() throws Exception
+ {
+ sessionCreateTopicImpl(true);
+ }
+
+ private void sessionCreateTopicImpl(boolean withExchangeArgs) throws Exception
+ {
Session ssn = _connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
// Using the BURL method
@@ -571,7 +667,7 @@ public class AddressBasedDestinationTest extends QpidBrokerTestCase
prod.send(ssn.createTextMessage("test"));
assertNotNull("consumer should receive a message",cons.receive(1000));
cons.close();
-
+
String addr = "ADDR:vehicles/bus; " +
"{ " +
"create: always, " +
@@ -581,11 +677,8 @@ public class AddressBasedDestinationTest extends QpidBrokerTestCase
"x-declare: " +
"{ " +
"type:direct, " +
- "auto-delete: true, " +
- "arguments: {" +
- "'qpid.msg_sequence': 1, " +
- "'qpid.ive': 1" +
- "}" +
+ "auto-delete: true" +
+ createExchangeArgsString(withExchangeArgs, false) +
"}" +
"}, " +
"link: {name : my-topic, " +
@@ -697,7 +790,7 @@ public class AddressBasedDestinationTest extends QpidBrokerTestCase
public void testSubscriptionForSameDestination() throws Exception
{
Session ssn = _connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
- Destination dest = ssn.createTopic("ADDR:amq.topic/foo");
+ Destination dest = ssn.createTopic("ADDR:amq.topic/foo; {link:{durable:true}}");
MessageConsumer consumer1 = ssn.createConsumer(dest);
MessageConsumer consumer2 = ssn.createConsumer(dest);
MessageProducer prod = ssn.createProducer(dest);
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
index fcbab273e5..3068deecf8 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/client/failover/FailoverTest.java
@@ -299,7 +299,7 @@ public class FailoverTest extends FailoverBaseCase implements ConnectionListener
details.setProperty(BrokerDetails.OPTIONS_RETRY, String.valueOf(RETRIES));
details.setProperty(BrokerDetails.OPTIONS_CONNECT_DELAY, String.valueOf(DELAY));
- connection = new AMQConnection(connectionURL, null);
+ connection = new AMQConnection(connectionURL);
((AMQConnection) connection).setConnectionListener(this);
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/testcases/TTLTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/testcases/TTLTest.java
deleted file mode 100644
index d4bab657d7..0000000000
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/testcases/TTLTest.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.test.testcases;
-
-import org.apache.qpid.test.framework.Circuit;
-import org.apache.qpid.test.framework.FrameworkBaseCase;
-import static org.apache.qpid.test.framework.MessagingTestConfigProperties.ACK_MODE_PROPNAME;
-import static org.apache.qpid.test.framework.MessagingTestConfigProperties.PUBSUB_PROPNAME;
-import org.apache.qpid.test.framework.TestUtils;
-import org.apache.qpid.test.framework.localcircuit.LocalCircuitImpl;
-import org.apache.qpid.test.framework.sequencers.CircuitFactory;
-
-import javax.jms.*;
-
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Random;
-
-/**
- * TTLTest checks that time-to-live is applied to messages. The test sends messages with a variety of TTL stamps on them
- * then after a pause attempts to receive those messages. Only messages with a large enough TTL to have survived the pause
- * should be receiveable. This test case also applies an additional assertion against the broker, that the message store
- * is empty at the end of the test.
- *
- * <p/>This test is designed to run over local circuits only, as it must control a timed pause between sending and receiving
- * messages to that TTL can be applied to purge some of the messages.
- *
- * <p/><table id="crc"><caption>CRC Card</caption>
- * <tr><th> Responsibilities <th> Collaborations
- * <tr><td>
- * </table>
- *
- * @todo Use an interface or other method to mark this test as local only.
- *
- * @todo Implement the message store assertion for in-vm broker. Could also be done for external broker, for example
- * by using diagnostic exchange.
- *
- * @todo Implement and add a queue depth assertion too. This might already be in another test to copy from.
- *
- * @todo Create variations on test theme, for different ack mode and tx and message sizes etc.
- *
- * @todo Add an allowable margin of error to the test, as ttl may not be precise.
- */
-public class TTLTest extends FrameworkBaseCase
-{
- /**
- * Creates a new test case with the specified name.
- *
- * @param name The test case name.
- */
- public TTLTest(String name)
- {
- super(name);
- }
-
- /**
- * Checks that all messages sent with a TTL shorter than a pause between sending them and attempting to receive them
- * will fail to arrive. Once all messages have been purged by TTL or received, check that they no longer exist on
- * the broker.
- *
- * @throws javax.jms.JMSException Allowed to fall through and fail test.
- */
- public void testTTLP2P() throws Exception
- {
- String errorMessages = "";
- Random r = new Random();
-
- // Used to accumulate correctly received messages in.
- List<Message> receivedMessages = new LinkedList<Message>();
-
- // Set up the test properties to match the test case requirements.
- getTestProps().setProperty(ACK_MODE_PROPNAME, Session.AUTO_ACKNOWLEDGE);
- getTestProps().setProperty(PUBSUB_PROPNAME, false);
-
- // Create the test circuit from the test configuration parameters.
- CircuitFactory circuitFactory = getCircuitFactory();
- Circuit testCircuit = circuitFactory.createCircuit(getConnection(), getTestProps());
-
- // This test case assumes it is using a local circuit.
- LocalCircuitImpl localCircuit = (LocalCircuitImpl) testCircuit;
-
- Session producerSession = localCircuit.getLocalPublisherCircuitEnd().getSession();
- MessageProducer producer = localCircuit.getLocalPublisherCircuitEnd().getProducer();
- MessageConsumer consumer = localCircuit.getLocalReceiverCircuitEnd().getConsumer();
-
- // Send some tests messages, with random TTLs, some shorter and some longer than the pause time.
- for (int i = 0; i < 100; i++)
- {
- Message testMessage = TestUtils.createTestMessageOfSize(producerSession, 10);
-
- // Set the TTL on the message and record its value in the message headers.
- long ttl = 500 + r.nextInt(1500);
- producer.setTimeToLive(ttl);
- testMessage.setLongProperty("testTTL", ttl);
-
- producer.send(testMessage);
- // producerSession.commit();
- }
-
- // Inject a pause to allow some messages to be purged by TTL.
- TestUtils.pause(1000);
-
- // Attempt to receive back all of the messages, confirming by the message time stamps and TTLs that only
- // those received should have avoided being purged by the TTL.
- boolean timedOut = false;
-
-
- Message testMessage = null;
-
- do
- {
- testMessage = consumer.receive(1000);
-
- long ttl = testMessage.getLongProperty("testTTL");
- long timeStamp = testMessage.getJMSTimestamp();
- long now = System.currentTimeMillis();
-
- if ((timeStamp + ttl) < now)
- {
- errorMessages +=
- "Received message [sent: " + timeStamp + ", ttl: " + ttl + ", received: " + now
- + "] which should have been purged by its TTL.\n";
- }
- /*else
- {
- receivedMessages.add(testMessage);
- }*/
- } while (!timedOut && testMessage != null);
-
- // Check that the queue and message store on the broker are empty.
- // assertTrue("Message store is not empty.", messageStoreEmpty.apply());
- // assertTrue("Queue is not empty.", queueEmpty.apply());
-
- assertTrue(errorMessages, "".equals(errorMessages));
- }
-}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ack/QuickAcking.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ack/QuickAcking.java
index 6c83136511..13c78c1e14 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ack/QuickAcking.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/ack/QuickAcking.java
@@ -20,7 +20,7 @@
*/
package org.apache.qpid.test.unit.ack;
-import edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch;
+import java.util.concurrent.CountDownLatch;
import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.jms.ConnectionListener;
import org.apache.qpid.test.utils.QpidBrokerTestCase;
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/BytesMessageTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/BytesMessageTest.java
index 59ce64eb4f..0731d56204 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/BytesMessageTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/BytesMessageTest.java
@@ -21,7 +21,6 @@ package org.apache.qpid.test.unit.basic;
import junit.framework.Assert;
-import org.apache.mina.common.ByteBuffer;
import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.AMQDestination;
@@ -45,6 +44,7 @@ import javax.jms.MessageNotWriteableException;
import javax.jms.MessageProducer;
import javax.jms.Session;
+import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/FieldTableMessageTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/FieldTableMessageTest.java
index abf8da799c..3af215d1d5 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/FieldTableMessageTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/basic/FieldTableMessageTest.java
@@ -20,8 +20,6 @@
*/
package org.apache.qpid.test.unit.basic;
-import org.apache.mina.common.ByteBuffer;
-
import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.AMQDestination;
import org.apache.qpid.client.AMQQueue;
@@ -41,6 +39,8 @@ import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.MessageProducer;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.concurrent.CountDownLatch;
@@ -105,7 +105,7 @@ public class FieldTableMessageTest extends QpidBrokerTestCase implements Message
{
int count = _count;
_waitForCompletion = new CountDownLatch(_count);
- send(count);
+ send(count);
_waitForCompletion.await(20, TimeUnit.SECONDS);
check();
_logger.info("Completed without failure");
@@ -125,12 +125,15 @@ public class FieldTableMessageTest extends QpidBrokerTestCase implements Message
}
- void check() throws JMSException, AMQFrameDecodingException
+ void check() throws JMSException, AMQFrameDecodingException, IOException
{
for (Object m : received)
{
- ByteBuffer buffer = ((JMSBytesMessage) m).getData();
- FieldTable actual = FieldTableFactory.newFieldTable(buffer, buffer.remaining());
+ final BytesMessage bytesMessage = (BytesMessage) m;
+ final long bodyLength = bytesMessage.getBodyLength();
+ byte[] data = new byte[(int) bodyLength];
+ bytesMessage.readBytes(data);
+ FieldTable actual = FieldTableFactory.newFieldTable(new DataInputStream(new ByteArrayInputStream(data)), bodyLength);
for (String key : _expected.keys())
{
assertEquals("Values for " + key + " did not match", _expected.getObject(key), actual.getObject(key));
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
index 481b144caf..e79fe69199 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
@@ -50,9 +50,9 @@ import org.slf4j.LoggerFactory;
public class AMQConnectionTest extends QpidBrokerTestCase
{
- private static AMQConnection _connection;
- private static AMQTopic _topic;
- private static AMQQueue _queue;
+ protected static AMQConnection _connection;
+ protected static AMQTopic _topic;
+ protected static AMQQueue _queue;
private static QueueSession _queueSession;
private static TopicSession _topicSession;
protected static final Logger _logger = LoggerFactory.getLogger(AMQConnectionTest.class);
@@ -60,15 +60,14 @@ public class AMQConnectionTest extends QpidBrokerTestCase
protected void setUp() throws Exception
{
super.setUp();
- _connection = (AMQConnection) getConnection("guest", "guest");
+ createConnection();
_topic = new AMQTopic(_connection.getDefaultTopicExchangeName(), new AMQShortString("mytopic"));
_queue = new AMQQueue(_connection.getDefaultQueueExchangeName(), new AMQShortString("myqueue"));
}
-
- protected void tearDown() throws Exception
+
+ protected void createConnection() throws Exception
{
- _connection.close();
- super.tearDown();
+ _connection = (AMQConnection) getConnection("guest", "guest");
}
/**
@@ -207,61 +206,50 @@ public class AMQConnectionTest extends QpidBrokerTestCase
public void testPrefetchSystemProperty() throws Exception
{
- String oldPrefetch = System.getProperty(ClientProperties.MAX_PREFETCH_PROP_NAME);
- try
- {
- _connection.close();
- System.setProperty(ClientProperties.MAX_PREFETCH_PROP_NAME, new Integer(2).toString());
- _connection = (AMQConnection) getConnection();
- _connection.start();
- // Create two consumers on different sessions
- Session consSessA = _connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
- MessageConsumer consumerA = consSessA.createConsumer(_queue);
-
- Session producerSession = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
- MessageProducer producer = producerSession.createProducer(_queue);
+ _connection.close();
+ setTestClientSystemProperty(ClientProperties.MAX_PREFETCH_PROP_NAME, new Integer(2).toString());
+
+ createConnection();
+ _connection.start();
+ // Create two consumers on different sessions
+ Session consSessA = _connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
+ MessageConsumer consumerA = consSessA.createConsumer(_queue);
- // Send 3 messages
- for (int i = 0; i < 3; i++)
- {
- producer.send(producerSession.createTextMessage("test"));
- }
-
- MessageConsumer consumerB = null;
- // 0-8, 0-9, 0-9-1 prefetch is per session, not consumer.
- if (!isBroker010())
- {
- Session consSessB = _connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
- consumerB = consSessB.createConsumer(_queue);
- }
- else
- {
- consumerB = consSessA.createConsumer(_queue);
- }
+ Session producerSession = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ MessageProducer producer = producerSession.createProducer(_queue);
- Message msg;
- // Check that consumer A has 2 messages
- for (int i = 0; i < 2; i++)
- {
- msg = consumerA.receive(1500);
- assertNotNull("Consumer A should receive 2 messages",msg);
- }
-
- msg = consumerA.receive(1500);
- assertNull("Consumer A should not have received a 3rd message",msg);
-
- // Check that consumer B has the last message
- msg = consumerB.receive(1500);
- assertNotNull("Consumer B should have received the message",msg);
+ // Send 3 messages
+ for (int i = 0; i < 3; i++)
+ {
+ producer.send(producerSession.createTextMessage("test"));
}
- finally
+
+ MessageConsumer consumerB = null;
+ // 0-8, 0-9, 0-9-1 prefetch is per session, not consumer.
+ if (!isBroker010())
{
- if (oldPrefetch == null)
- {
- oldPrefetch = ClientProperties.MAX_PREFETCH_DEFAULT;
- }
- System.setProperty(ClientProperties.MAX_PREFETCH_PROP_NAME, oldPrefetch);
+ Session consSessB = _connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
+ consumerB = consSessB.createConsumer(_queue);
+ }
+ else
+ {
+ consumerB = consSessA.createConsumer(_queue);
+ }
+
+ Message msg;
+ // Check that consumer A has 2 messages
+ for (int i = 0; i < 2; i++)
+ {
+ msg = consumerA.receive(1500);
+ assertNotNull("Consumer A should receive 2 messages",msg);
}
+
+ msg = consumerA.receive(1500);
+ assertNull("Consumer A should not have received a 3rd message",msg);
+
+ // Check that consumer B has the last message
+ msg = consumerB.receive(1500);
+ assertNotNull("Consumer B should have received the message",msg);
}
public void testGetChannelID() throws Exception
@@ -284,120 +272,5 @@ public class AMQConnectionTest extends QpidBrokerTestCase
}
}
}
-
- /**
- * Test Strategy : Kill -STOP the broker and see
- * if the client terminates the connection with a
- * read timeout.
- * The broker process is cleaned up in the test itself
- * and avoids using process.waitFor() as it hangs.
- */
- public void testHeartBeat() throws Exception
- {
- boolean windows =
- ((String) System.getProperties().get("os.name")).matches("(?i).*windows.*");
-
- if (!isCppBroker() || windows)
- {
- return;
- }
-
- Process process = null;
- int port = getPort(0);
- String pid = null;
- try
- {
- // close the connection and shutdown the broker started by QpidTest
- _connection.close();
- stopBroker(port);
-
- System.setProperty("qpid.heartbeat", "1");
-
- // in case this broker gets stuck, atleast the rest of the tests will not fail.
- port = port + 200;
- String startCmd = getBrokerCommand(port);
-
- // start a broker using a script
- ProcessBuilder pb = new ProcessBuilder(System.getProperty("broker.start"));
- pb.redirectErrorStream(true);
-
- Map<String, String> env = pb.environment();
- env.put("BROKER_CMD",startCmd);
- env.put("BROKER_READY",System.getProperty(BROKER_READY));
-
- Process startScript = pb.start();
- startScript.waitFor();
- startScript.destroy();
-
- Connection con =
- new AMQConnection("amqp://guest:guest@clientid/testpath?brokerlist='tcp://localhost:" + port + "'");
- final AtomicBoolean lock = new AtomicBoolean(false);
-
- String cmd = "/usr/bin/pgrep -f " + port;
- process = Runtime.getRuntime().exec("/bin/bash");
- LineNumberReader reader = new LineNumberReader(new InputStreamReader(process.getInputStream()));
- PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(process.getOutputStream())), true);
- out.println(cmd);
- pid = reader.readLine();
- try
- {
- Integer.parseInt(pid);
- }
- catch (NumberFormatException e)
- {
- // Error! try to read further to gather the error msg.
- String line;
- _logger.debug(pid);
- while ((line = reader.readLine()) != null )
- {
- _logger.debug(line);
- }
- throw new Exception( "Unable to get the brokers pid " + pid);
- }
- _logger.debug("pid : " + pid);
-
- con.setExceptionListener(new ExceptionListener(){
-
- public void onException(JMSException e)
- {
- synchronized(lock) {
- lock.set(true);
- lock.notifyAll();
- }
- }
- });
- out.println("kill -STOP " + pid);
-
- synchronized(lock){
- lock.wait(2500);
- }
- out.close();
- reader.close();
- assertTrue("Client did not terminate the connection, check log for details",lock.get());
- }
- catch(Exception e)
- {
- throw e;
- }
- finally
- {
- System.setProperty("qpid.heartbeat", "");
-
- if (process != null)
- {
- process.destroy();
- }
-
- Process killScript = Runtime.getRuntime().exec(System.getProperty("broker.kill") + " " + pid);
- killScript.waitFor();
- killScript.destroy();
- cleanBroker();
- }
- }
-
- public static junit.framework.Test suite()
- {
- return new junit.framework.TestSuite(AMQConnectionTest.class);
- }
}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQSSLConnectionTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQSSLConnectionTest.java
new file mode 100644
index 0000000000..53a433c543
--- /dev/null
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQSSLConnectionTest.java
@@ -0,0 +1,57 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.qpid.test.unit.client;
+
+import org.apache.qpid.client.AMQConnection;
+import org.apache.qpid.client.AMQConnectionURL;
+
+public class AMQSSLConnectionTest extends AMQConnectionTest
+{
+ private static final String KEYSTORE = TEST_RESOURCES_DIR + "/ssl/java_client_keystore.jks";
+ private static final String KEYSTORE_PASSWORD = "password";
+ private static final String TRUSTSTORE = TEST_RESOURCES_DIR + "/ssl/java_client_truststore.jks";
+ private static final String TRUSTSTORE_PASSWORD = "password";
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ setTestClientSystemProperty("profile.use_ssl", "true");
+ setConfigurationProperty("connector.ssl.enabled", "true");
+ setConfigurationProperty("connector.ssl.sslOnly", "true");
+ super.setUp();
+ }
+
+ protected void createConnection() throws Exception
+ {
+
+ final String sslPrototypeUrl = "amqp://guest:guest@test/?brokerlist='tcp://localhost:%s" +
+ "?ssl='true'&ssl_verify_hostname='false'" +
+ "&key_store='%s'&key_store_password='%s'" +
+ "&trust_store='%s'&trust_store_password='%s'" +
+ "'";
+
+ final String url = String.format(sslPrototypeUrl,System.getProperty("test.port.ssl"),
+ KEYSTORE,KEYSTORE_PASSWORD,TRUSTSTORE,TRUSTSTORE_PASSWORD);
+
+ _connection = (AMQConnection) getConnection(new AMQConnectionURL(url));
+ }
+}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/CloseAfterConnectionFailureTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/CloseAfterConnectionFailureTest.java
index dc2f59c384..91e681131f 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/CloseAfterConnectionFailureTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/CloseAfterConnectionFailureTest.java
@@ -55,7 +55,7 @@ public class CloseAfterConnectionFailureTest extends QpidBrokerTestCase implemen
try
{
//Start the connection so it will use the retries
- connection = new AMQConnection(url, null);
+ connection = new AMQConnection(url);
connection.setExceptionListener(this);
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java
index 6d1b6de238..7f166d07fe 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java
@@ -27,6 +27,7 @@ import java.util.HashMap;
import java.util.Map;
import javax.jms.Connection;
+import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
@@ -98,6 +99,31 @@ public class ConnectionCloseTest extends QpidBrokerTestCase
delta.size() < deltaThreshold);
}
+ /**
+ * This test is added due to QPID-3453 to test connection closing when AMQ
+ * session is not closed but underlying transport session is in detached
+ * state and transport connection is closed
+ */
+ public void testConnectionCloseOnOnForcibleBrokerStop() throws Exception
+ {
+ Connection connection = getConnection();
+ connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+ stopBroker();
+
+ // we need to close connection explicitly in order to verify that
+ // closing of connection having transport session in DETACHED state and
+ // transport connection in CLOSED state does not throw an exception
+ try
+ {
+ connection.close();
+ }
+ catch (JMSException e)
+ {
+ // session closing should not fail
+ fail("Cannot close connection:" + e.getMessage());
+ }
+ }
+
private void dumpStacks(Map<Thread,StackTraceElement[]> map)
{
for (Map.Entry<Thread,StackTraceElement[]> entry : map.entrySet())
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionFactoryTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionFactoryTest.java
new file mode 100644
index 0000000000..545081fb43
--- /dev/null
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionFactoryTest.java
@@ -0,0 +1,41 @@
+package org.apache.qpid.test.unit.client.connection;
+
+import org.apache.qpid.client.AMQConnection;
+import org.apache.qpid.client.AMQConnectionFactory;
+import org.apache.qpid.test.utils.QpidBrokerTestCase;
+
+public class ConnectionFactoryTest extends QpidBrokerTestCase
+{
+
+ /**
+ * The username & password specified should not override the default
+ * specified in the URL.
+ */
+ public void testCreateConnectionWithUsernamePassword() throws Exception
+ {
+
+ String brokerUrl = getBroker().toString();
+ String URL = "amqp://guest:guest@clientID/test?brokerlist='" + brokerUrl + "'";
+ AMQConnectionFactory factory = new AMQConnectionFactory(URL);
+
+ AMQConnection con = (AMQConnection)factory.createConnection();
+ assertEquals("Usernames used is different from the one in URL","guest",con.getConnectionURL().getUsername());
+ assertEquals("Password used is different from the one in URL","guest",con.getConnectionURL().getPassword());
+
+ try
+ {
+ AMQConnection con2 = (AMQConnection)factory.createConnection("user","pass");
+ assertEquals("Usernames used is different from the one in URL","user",con2.getConnectionURL().getUsername());
+ assertEquals("Password used is different from the one in URL","pass",con2.getConnectionURL().getPassword());
+ }
+ catch(Exception e)
+ {
+ // ignore
+ }
+
+ AMQConnection con3 = (AMQConnection)factory.createConnection();
+ assertEquals("Usernames used is different from the one in URL","guest",con3.getConnectionURL().getUsername());
+ assertEquals("Password used is different from the one in URL","guest",con3.getConnectionURL().getPassword());
+ }
+
+}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java
index d17ead13aa..f18f365f20 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionTest.java
@@ -32,6 +32,7 @@ import org.apache.qpid.client.AMQConnectionURL;
import org.apache.qpid.client.AMQQueue;
import org.apache.qpid.client.AMQSession;
import org.apache.qpid.client.AMQTopic;
+import org.apache.qpid.configuration.ClientProperties;
import org.apache.qpid.exchange.ExchangeDefaults;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.jms.BrokerDetails;
@@ -81,21 +82,21 @@ public class ConnectionTest extends QpidBrokerTestCase
+ "&temporaryTopicExchange='tmp.topic'");
System.err.println(url.toString());
- conn = new AMQConnection(url, null);
+ conn = new AMQConnection(url);
AMQSession sess = (AMQSession) conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-
- sess.declareExchange(new AMQShortString("test.direct"),
+
+ sess.declareExchange(new AMQShortString("test.direct"),
ExchangeDefaults.DIRECT_EXCHANGE_CLASS, false);
- sess.declareExchange(new AMQShortString("tmp.direct"),
+ sess.declareExchange(new AMQShortString("tmp.direct"),
ExchangeDefaults.DIRECT_EXCHANGE_CLASS, false);
- sess.declareExchange(new AMQShortString("tmp.topic"),
+ sess.declareExchange(new AMQShortString("tmp.topic"),
ExchangeDefaults.TOPIC_EXCHANGE_CLASS, false);
- sess.declareExchange(new AMQShortString("test.topic"),
+ sess.declareExchange(new AMQShortString("test.topic"),
ExchangeDefaults.TOPIC_EXCHANGE_CLASS, false);
QueueSession queueSession = conn.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
@@ -111,7 +112,7 @@ public class ConnectionTest extends QpidBrokerTestCase
queueSession.close();
TopicSession topicSession = conn.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
-
+
AMQTopic topic = (AMQTopic) topicSession.createTopic("silly.topic");
assertEquals(topic.getExchangeName().toString(), "test.topic");
@@ -269,7 +270,7 @@ public class ConnectionTest extends QpidBrokerTestCase
}
connection.close();
}
-
+
public void testUnsupportedSASLMechanism() throws Exception
{
BrokerDetails broker = getBroker();
@@ -285,10 +286,64 @@ public class ConnectionTest extends QpidBrokerTestCase
}
catch (Exception e)
{
- assertTrue("Incorrect exception thrown",
- e.getMessage().contains("The following SASL mechanisms " +
- "[MY_MECH]" +
- " specified by the client are not supported by the broker"));
+ assertTrue("Unexpected exception message : " + e.getMessage(),
+ e.getMessage().contains("Client and broker have no SASL mechanisms in common."));
+ assertTrue("Unexpected exception message : " + e.getMessage(),
+ e.getMessage().contains("Client restricted itself to : MY_MECH"));
+
+ }
+ }
+
+ /**
+ * Tests that when the same user connects twice with same clientid, the second connection
+ * fails if the clientid verification feature is enabled (which uses a dummy 0-10 Session
+ * with the clientid as its name to detect the previous usage of the clientid by the user)
+ */
+ public void testClientIDVerificationForSameUser() throws Exception
+ {
+ setTestSystemProperty(ClientProperties.QPID_VERIFY_CLIENT_ID, "true");
+
+ BrokerDetails broker = getBroker();
+ try
+ {
+ Connection con = new AMQConnection(broker.toString(), "guest", "guest",
+ "client_id", "test");
+
+ Connection con2 = new AMQConnection(broker.toString(), "guest", "guest",
+ "client_id", "test");
+
+ fail("The client should throw a ConnectionException stating the" +
+ " client ID is not unique");
+ }
+ catch (Exception e)
+ {
+ assertTrue("Incorrect exception thrown: " + e.getMessage(),
+ e.getMessage().contains("ClientID must be unique"));
+ }
+ }
+
+ /**
+ * Tests that when different users connects with same clientid, the second connection
+ * succeeds even though the clientid verification feature is enabled (which uses a dummy
+ * 0-10 Session with the clientid as its name; these are only verified unique on a
+ * per-principal basis)
+ */
+ public void testClientIDVerificationForDifferentUsers() throws Exception
+ {
+ setTestSystemProperty(ClientProperties.QPID_VERIFY_CLIENT_ID, "true");
+
+ BrokerDetails broker = getBroker();
+ try
+ {
+ Connection con = new AMQConnection(broker.toString(), "guest", "guest",
+ "client_id", "test");
+
+ Connection con2 = new AMQConnection(broker.toString(), "admin", "admin",
+ "client_id", "test");
+ }
+ catch (Exception e)
+ {
+ fail("Unexpected exception thrown, client id was not unique but usernames were different! " + e.getMessage());
}
}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ExceptionListenerTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ExceptionListenerTest.java
index cec9d292cf..0057422c8f 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ExceptionListenerTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ExceptionListenerTest.java
@@ -47,13 +47,15 @@ public class ExceptionListenerTest extends QpidBrokerTestCase
{
public void onException(JMSException e)
{
+ _logger.debug("&&&&&&&&&&&&&&&&&&&&&&&&&&&& Caught exception &&&&&&&&&&&&&&&&&&&&&&&&&&&& ", e);
fired.countDown();
}
});
-
+ _logger.debug("%%%%%%%%%%%%%%%% Stopping Broker %%%%%%%%%%%%%%%%%%%%%");
stopBroker();
+ _logger.debug("%%%%%%%%%%%%%%%% Stopped Broker %%%%%%%%%%%%%%%%%%%%%");
- if (!fired.await(3, TimeUnit.SECONDS))
+ if (!fired.await(5, TimeUnit.SECONDS))
{
fail("exception listener was not fired");
}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java
index 5701b5a1fd..836684c965 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/protocol/AMQProtocolSessionTest.java
@@ -25,7 +25,6 @@ import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.net.UnknownHostException;
-import org.apache.mina.transport.vmpipe.VmPipeAddress;
import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.protocol.AMQProtocolHandler;
import org.apache.qpid.client.protocol.AMQProtocolSession;
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java
index 5721bcf4e3..97452ad1c8 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java
@@ -25,6 +25,7 @@ import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.AMQQueue;
import org.apache.qpid.client.AMQSession;
import org.apache.qpid.client.message.NonQpidObjectMessage;
+import org.apache.qpid.client.message.QpidMessageProperties;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.test.utils.QpidBrokerTestCase;
@@ -172,7 +173,7 @@ public class JMSPropertiesTest extends QpidBrokerTestCase
* Test Goal : Test if custom message properties can be set and retrieved properly with out an error.
* Also test if unsupported properties are filtered out. See QPID-2930.
*/
- public void testApplicationProperties() throws Exception
+ public void testQpidExtensionProperties() throws Exception
{
Connection con = getConnection("guest", "guest");
Session ssn = (AMQSession) con.createSession(false, Session.CLIENT_ACKNOWLEDGE);
@@ -182,8 +183,8 @@ public class JMSPropertiesTest extends QpidBrokerTestCase
MessageConsumer consumer = ssn.createConsumer(topic);
MessageProducer prod = ssn.createProducer(topic);
Message m = ssn.createMessage();
- m.setObjectProperty("x-amqp-0-10.routing-key", "routing-key".getBytes());
- m.setObjectProperty("x-amqp-0-10.app-id", "my-app-id");
+ m.setObjectProperty("foo-bar", "foobar".getBytes());
+ m.setObjectProperty(QpidMessageProperties.AMQP_0_10_APP_ID, "my-app-id");
prod.send(m);
Message msg = consumer.receive(1000);
@@ -198,7 +199,9 @@ public class JMSPropertiesTest extends QpidBrokerTestCase
map.put(name, value);
}
- assertFalse("Property 'x-amqp-0-10.routing-key' should have been filtered out",map.containsKey("x-amqp-0-10.routing-key"));
- assertEquals("Property x-amqp-0-10.app-id should be present","my-app-id",msg.getStringProperty("x-amqp-0-10.app-id"));
+ assertFalse("Property 'foo-bar' should have been filtered out",map.containsKey("foo-bar"));
+ assertEquals("Property "+ QpidMessageProperties.AMQP_0_10_APP_ID + " should be present","my-app-id",msg.getStringProperty(QpidMessageProperties.AMQP_0_10_APP_ID));
+ assertEquals("Property "+ QpidMessageProperties.AMQP_0_10_ROUTING_KEY + " should be present","test",msg.getStringProperty(QpidMessageProperties.AMQP_0_10_ROUTING_KEY));
+
}
}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/StreamMessageTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/StreamMessageTest.java
index 0f799073b4..39691a5c7c 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/StreamMessageTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/StreamMessageTest.java
@@ -20,6 +20,10 @@
*/
package org.apache.qpid.test.unit.message;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+
import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.AMQHeadersExchange;
import org.apache.qpid.client.AMQQueue;
@@ -50,21 +54,8 @@ import javax.jms.StreamMessage;
*/
public class StreamMessageTest extends QpidBrokerTestCase
{
-
private static final Logger _logger = LoggerFactory.getLogger(StreamMessageTest.class);
- public String _connectionString = "vm://:1";
-
- protected void setUp() throws Exception
- {
- super.setUp();
- }
-
- protected void tearDown() throws Exception
- {
- super.tearDown();
- }
-
public void testStreamMessageEOF() throws Exception
{
Connection con = (AMQConnection) getConnection("guest", "guest");
@@ -114,6 +105,7 @@ public class StreamMessageTest extends QpidBrokerTestCase
try
{
msg2.readByte();
+ fail("Expected exception not thrown");
}
catch (Exception e)
{
@@ -125,6 +117,9 @@ public class StreamMessageTest extends QpidBrokerTestCase
public void testModifyReceivedMessageExpandsBuffer() throws Exception
{
+ final CountDownLatch awaitMessages = new CountDownLatch(1);
+ final AtomicReference<Throwable> listenerCaughtException = new AtomicReference<Throwable>();
+
AMQConnection con = (AMQConnection) getConnection("guest", "guest");
AMQSession consumerSession = (AMQSession) con.createSession(false, Session.CLIENT_ACKNOWLEDGE);
AMQQueue queue = new AMQQueue(con.getDefaultQueueExchangeName(), new AMQShortString("testQ"));
@@ -134,28 +129,38 @@ public class StreamMessageTest extends QpidBrokerTestCase
public void onMessage(Message message)
{
- StreamMessage sm = (StreamMessage) message;
+ final StreamMessage sm = (StreamMessage) message;
try
{
sm.clearBody();
+ // it is legal to extend a stream message's content
sm.writeString("dfgjshfslfjshflsjfdlsjfhdsljkfhdsljkfhsd");
}
- catch (JMSException e)
+ catch (Throwable t)
+ {
+ listenerCaughtException.set(t);
+ }
+ finally
{
- _logger.error("Error when writing large string to received msg: " + e, e);
- fail("Error when writing large string to received msg" + e);
+ awaitMessages.countDown();
}
}
});
Connection con2 = (AMQConnection) getConnection("guest", "guest");
AMQSession producerSession = (AMQSession) con2.createSession(false, Session.CLIENT_ACKNOWLEDGE);
- MessageProducer mandatoryProducer = producerSession.createProducer(queue);
+ MessageProducer producer = producerSession.createProducer(queue);
con.start();
StreamMessage sm = producerSession.createStreamMessage();
sm.writeInt(42);
- mandatoryProducer.send(sm);
- Thread.sleep(2000);
+ producer.send(sm);
+
+ // Allow up to five seconds for the message to arrive with the consumer
+ final boolean completed = awaitMessages.await(5, TimeUnit.SECONDS);
+ assertTrue("Message did not arrive with consumer within a reasonable time", completed);
+ final Throwable listenerException = listenerCaughtException.get();
+ assertNull("No exception should be caught by listener : " + listenerException, listenerException);
+
con.close();
con2.close();
}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java
index fe929b4965..978ebfa93f 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/message/UTF8Test.java
@@ -20,17 +20,20 @@
*/
package org.apache.qpid.test.unit.message;
-import org.apache.qpid.test.utils.QpidBrokerTestCase;
-import org.apache.qpid.transport.Connection;
-import org.apache.qpid.transport.Session;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.io.BufferedReader;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.util.Properties;
+import javax.jms.Connection;
+import javax.jms.Destination;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
import javax.naming.InitialContext;
-import javax.jms.*;
-import java.util.Properties;
-import java.io.*;
+
+import org.apache.qpid.test.utils.QpidBrokerTestCase;
/**
@@ -41,8 +44,6 @@ import java.io.*;
*/
public class UTF8Test extends QpidBrokerTestCase
{
- private static final Logger _logger = LoggerFactory.getLogger(UTF8Test.class);
-
public void testPlainEn() throws Exception
{
invoke("UTF8En");
@@ -65,38 +66,24 @@ public class UTF8Test extends QpidBrokerTestCase
private void runTest(String exchangeName, String queueName, String routingKey, String data) throws Exception
{
- _logger.info("Running test for exchange: " + exchangeName
- + " queue Name: " + queueName
- + " routing key: " + routingKey);
- declareQueue(exchangeName, routingKey, queueName);
+ Connection con = getConnection();
+ Session sess = con.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
+ final Destination dest = getDestination(exchangeName, routingKey, queueName);
+
+ final MessageConsumer msgCons = sess.createConsumer(dest);
+ con.start();
- javax.jms.Connection con = getConnection();
- javax.jms.Session sess = con.createSession(false, javax.jms.Session.AUTO_ACKNOWLEDGE);
- Destination dest = getDestination(exchangeName, routingKey, queueName);
// Send data
MessageProducer msgProd = sess.createProducer(dest);
TextMessage message = sess.createTextMessage(data);
msgProd.send(message);
+
// consume data
- MessageConsumer msgCons = sess.createConsumer(dest);
- con.start();
TextMessage m = (TextMessage) msgCons.receive(RECEIVE_TIMEOUT);
assertNotNull(m);
assertEquals(m.getText(), data);
}
- private void declareQueue(String exch, String routkey, String qname) throws Exception
- {
- Connection conn = new Connection();
- conn.connect("localhost", QpidBrokerTestCase.DEFAULT_PORT, "test", "guest", "guest",false);
- Session sess = conn.createSession(0);
- sess.exchangeDeclare(exch, "direct", null, null);
- sess.queueDeclare(qname, null, null);
- sess.exchangeBind(qname, exch, routkey, null);
- sess.sync();
- conn.close();
- }
-
private Destination getDestination(String exch, String routkey, String qname) throws Exception
{
Properties props = new Properties();
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutConfigurationTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutConfigurationTest.java
index 36bac3b715..46e5d214f5 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutConfigurationTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutConfigurationTest.java
@@ -31,7 +31,7 @@ public class TransactionTimeoutConfigurationTest extends TransactionTimeoutTestC
protected void configure() throws Exception
{
// Setup housekeeping every second
- setConfigurationProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".housekeeping.expiredMessageCheckPeriod", "100");
+ setConfigurationProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".housekeeping.checkPeriod", "100");
// Set transaction timout properties.
setConfigurationProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".transactionTimeout.openWarn", "200");
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutDisabledTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutDisabledTest.java
index 71b89bf911..db508143f9 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutDisabledTest.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutDisabledTest.java
@@ -29,7 +29,7 @@ public class TransactionTimeoutDisabledTest extends TransactionTimeoutTestCase
protected void configure() throws Exception
{
// Setup housekeeping every second
- setConfigurationProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".housekeeping.expiredMessageCheckPeriod", "100");
+ setConfigurationProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".housekeeping.checkPeriod", "100");
}
public void testProducerIdleCommit() throws Exception
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTestCase.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTestCase.java
index 786fc2adb0..ef2de5c592 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTestCase.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTestCase.java
@@ -72,7 +72,7 @@ public class TransactionTimeoutTestCase extends QpidBrokerTestCase implements Ex
protected void configure() throws Exception
{
// Setup housekeeping every second
- setConfigurationProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".housekeeping.expiredMessageCheckPeriod", "100");
+ setConfigurationProperty("virtualhosts.virtualhost." + VIRTUALHOST + ".housekeeping.checkPeriod", "100");
/*
* Set transaction timout properties. The XML in the virtualhosts configuration is as follows:
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
index b39b31df58..40df024c67 100644
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
+++ b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
@@ -83,7 +83,7 @@ public class QpidBrokerTestCase extends QpidTestCase
INTERNAL /** Test case starts an embedded broker within this JVM */,
SPAWNED /** Test case spawns a new broker as a separate process */
}
- protected final String QpidHome = System.getProperty("QPID_HOME");
+ protected final static String QpidHome = System.getProperty("QPID_HOME");
protected File _configFile = new File(System.getProperty("broker.config"));
protected static final Logger _logger = Logger.getLogger(QpidBrokerTestCase.class);
@@ -91,9 +91,7 @@ public class QpidBrokerTestCase extends QpidTestCase
protected long RECEIVE_TIMEOUT = 1000l;
- private Map<String, String> _propertiesSetForTestOnly = new HashMap<String, String>();
private Map<String, String> _propertiesSetForBroker = new HashMap<String, String>();
- private Map<Logger, Level> _loggerLevelSetForTest = new HashMap<Logger, Level>();
private XMLConfiguration _testConfiguration = new XMLConfiguration();
private XMLConfiguration _testVirtualhosts = new XMLConfiguration();
@@ -139,8 +137,8 @@ public class QpidBrokerTestCase extends QpidTestCase
public static final int DEFAULT_VM_PORT = 1;
public static final int DEFAULT_PORT = Integer.getInteger("test.port", ServerConfiguration.DEFAULT_PORT);
public static final int FAILING_PORT = Integer.parseInt(System.getProperty("test.port.alt"));
- public static final int DEFAULT_MANAGEMENT_PORT = Integer.getInteger("test.mport", ServerConfiguration.DEFAULT_JMXPORT);
- public static final int DEFAULT_SSL_PORT = Integer.getInteger("test.sslport", ServerConfiguration.DEFAULT_SSL_PORT);
+ public static final int DEFAULT_MANAGEMENT_PORT = Integer.getInteger("test.mport", ServerConfiguration.DEFAULT_JMXPORT_REGISTRYSERVER);
+ public static final int DEFAULT_SSL_PORT = Integer.getInteger("test.port.ssl", ServerConfiguration.DEFAULT_SSL_PORT);
protected String _brokerLanguage = System.getProperty(BROKER_LANGUAGE, JAVA);
protected BrokerType _brokerType = BrokerType.valueOf(System.getProperty(BROKER_TYPE, "").toUpperCase());
@@ -164,8 +162,6 @@ public class QpidBrokerTestCase extends QpidTestCase
protected InitialContext _initialContext;
protected AMQConnectionFactory _connectionFactory;
- protected String _testName;
-
// the connections created for a given test
protected List<Connection> _connections = new ArrayList<Connection>();
public static final String QUEUE = "queue";
@@ -207,7 +203,6 @@ public class QpidBrokerTestCase extends QpidTestCase
public void runBare() throws Throwable
{
- _testName = getClass().getSimpleName() + "." + getName();
String qname = getClass().getName() + "." + getName();
// Initialize this for each test run
@@ -238,7 +233,6 @@ public class QpidBrokerTestCase extends QpidTestCase
}
}
- _logger.info("========== start " + _testName + " ==========");
try
{
super.runBare();
@@ -259,6 +253,10 @@ public class QpidBrokerTestCase extends QpidTestCase
_logger.error("exception stopping broker", e);
}
+ // reset properties used in the test
+ revertSystemProperties();
+ revertLoggingLevels();
+
if(_brokerCleanBetweenTests)
{
try
@@ -271,7 +269,7 @@ public class QpidBrokerTestCase extends QpidTestCase
}
}
- _logger.info("========== stop " + _testName + " ==========");
+ _logger.info("========== stop " + getTestName() + " ==========");
if (redirected)
{
@@ -290,6 +288,8 @@ public class QpidBrokerTestCase extends QpidTestCase
@Override
protected void setUp() throws Exception
{
+ super.setUp();
+
if (!_configFile.exists())
{
fail("Unable to test without config file:" + _configFile);
@@ -441,10 +441,11 @@ public class QpidBrokerTestCase extends QpidTestCase
protected String getBrokerCommand(int port) throws MalformedURLException
{
- final String protocolExcludesList = _brokerProtocolExcludes.replace("@PORT", "" + port);
+ final int sslPort = port-1;
+ final String protocolExcludesList = getProtocolExcludesList(port, sslPort);
return _brokerCommand
.replace("@PORT", "" + port)
- .replace("@SSL_PORT", "" + (port - 1))
+ .replace("@SSL_PORT", "" + sslPort)
.replace("@MPORT", "" + getManagementPort(port))
.replace("@CONFIG_FILE", _configFile.toString())
.replace("@EXCLUDES", protocolExcludesList);
@@ -477,9 +478,9 @@ public class QpidBrokerTestCase extends QpidTestCase
options.setConfigFile(_configFile.getAbsolutePath());
options.addPort(port);
- addExcludedPorts(port, options);
+ addExcludedPorts(port, DEFAULT_SSL_PORT, options);
- options.setJmxPort(getManagementPort(port));
+ options.setJmxPortRegistryServer(getManagementPort(port));
//Set the log config file, relying on the log4j.configuration system property
//set on the JVM by the JUnit runner task in module.xml.
@@ -508,7 +509,7 @@ public class QpidBrokerTestCase extends QpidTestCase
//Add the test name to the broker run.
// DON'T change PNAME, qpid.stop needs this value.
- env.put("QPID_PNAME", "-DPNAME=QPBRKR -DTNAME=\"" + _testName + "\"");
+ env.put("QPID_PNAME", "-DPNAME=QPBRKR -DTNAME=\"" + getTestName() + "\"");
// Add the port to QPID_WORK to ensure unique working dirs for multi broker tests
env.put("QPID_WORK", getQpidWork(_brokerType, port));
@@ -598,9 +599,9 @@ public class QpidBrokerTestCase extends QpidTestCase
}
}
- private void addExcludedPorts(int port, BrokerOptions options)
+ private void addExcludedPorts(int port, int sslPort, BrokerOptions options)
{
- final String protocolExcludesList = _brokerProtocolExcludes.replace("@PORT", "" + port);
+ final String protocolExcludesList = getProtocolExcludesList(port, sslPort);
if (protocolExcludesList.equals(""))
{
@@ -622,6 +623,13 @@ public class QpidBrokerTestCase extends QpidTestCase
}
}
+ protected String getProtocolExcludesList(int port, int sslPort)
+ {
+ final String protocolExcludesList =
+ _brokerProtocolExcludes.replace("@PORT", "" + port).replace("@SSL_PORT", "" + sslPort);
+ return protocolExcludesList;
+ }
+
private boolean existingInternalBroker()
{
for(BrokerHolder holder : _brokers.values())
@@ -875,20 +883,14 @@ public class QpidBrokerTestCase extends QpidTestCase
}
/**
- * Set a System (-D) property for the external Broker of this test.
+ * Set a System property for the client (and broker if using the same vm) of this test.
*
* @param property The property to set
* @param value the value to set it to.
*/
protected void setTestClientSystemProperty(String property, String value)
{
- if (!_propertiesSetForTestOnly.containsKey(property))
- {
- // Record the current value so we can revert it later.
- _propertiesSetForTestOnly.put(property, System.getProperty(property));
- }
-
- System.setProperty(property, value);
+ setTestSystemProperty(property, value);
}
/**
@@ -896,20 +898,7 @@ public class QpidBrokerTestCase extends QpidTestCase
*/
protected void revertSystemProperties()
{
- for (String key : _propertiesSetForTestOnly.keySet())
- {
- String value = _propertiesSetForTestOnly.get(key);
- if (value != null)
- {
- System.setProperty(key, value);
- }
- else
- {
- System.clearProperty(key);
- }
- }
-
- _propertiesSetForTestOnly.clear();
+ revertTestSystemProperties();
// We don't change the current VMs settings for Broker only properties
// so we can just clear this map
@@ -928,40 +917,6 @@ public class QpidBrokerTestCase extends QpidTestCase
}
/**
- * Adjust the VMs Log4j Settings just for this test run
- *
- * @param logger the logger to change
- * @param level the level to set
- */
- protected void setLoggerLevel(Logger logger, Level level)
- {
- assertNotNull("Cannot set level of null logger", logger);
- assertNotNull("Cannot set Logger("+logger.getName()+") to null level.",level);
-
- if (!_loggerLevelSetForTest.containsKey(logger))
- {
- // Record the current value so we can revert it later.
- _loggerLevelSetForTest.put(logger, logger.getLevel());
- }
-
- logger.setLevel(level);
- }
-
- /**
- * Restore the logging levels defined by this test.
- */
- protected void revertLoggingLevels()
- {
- for (Logger logger : _loggerLevelSetForTest.keySet())
- {
- logger.setLevel(_loggerLevelSetForTest.get(logger));
- }
-
- _loggerLevelSetForTest.clear();
-
- }
-
- /**
* Check whether the broker is an 0.8
*
* @return true if the broker is an 0_8 version, false otherwise.
@@ -1069,7 +1024,7 @@ public class QpidBrokerTestCase extends QpidTestCase
{
return (AMQConnectionFactory) getInitialContext().lookup(factoryName);
}
-
+
public Connection getConnection() throws JMSException, NamingException
{
return getConnection("guest", "guest");
@@ -1137,18 +1092,12 @@ public class QpidBrokerTestCase extends QpidTestCase
protected void tearDown() throws java.lang.Exception
{
- try
+ super.tearDown();
+
+ // close all the connections used by this test.
+ for (Connection c : _connections)
{
- // close all the connections used by this test.
- for (Connection c : _connections)
- {
- c.close();
- }
- }
- finally{
- // Ensure any problems with close does not interfer with property resets
- revertSystemProperties();
- revertLoggingLevels();
+ c.close();
}
}
diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/protocol/TestIoSession.java b/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/protocol/TestIoSession.java
deleted file mode 100644
index f1eb8159b6..0000000000
--- a/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/protocol/TestIoSession.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-package org.apache.qpid.test.utils.protocol;
-
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-
-import org.apache.mina.common.IoFilterChain;
-import org.apache.mina.common.IoHandler;
-import org.apache.mina.common.IoService;
-import org.apache.mina.common.IoServiceConfig;
-import org.apache.mina.common.IoSessionConfig;
-import org.apache.mina.common.TransportType;
-import org.apache.mina.common.support.BaseIoSession;
-
-public class TestIoSession extends BaseIoSession {
-
- private String _stringLocalAddress;
- private int _localPort;
-
- public SocketAddress getLocalAddress()
- {
- //create a new address for testing purposes using member variables
- return new InetSocketAddress(_stringLocalAddress,_localPort);
- }
-
- protected void updateTrafficMask() {
- //dummy
- }
-
- public IoService getService() {
- return null;
- }
-
- public IoServiceConfig getServiceConfig() {
- return null;
- }
-
- public IoHandler getHandler() {
- return null;
- }
-
- public IoSessionConfig getConfig() {
- return null;
- }
-
- public IoFilterChain getFilterChain() {
- return null;
- }
-
- public TransportType getTransportType() {
- return null;
- }
-
- public SocketAddress getRemoteAddress() {
- return null;
- }
-
- public SocketAddress getServiceAddress() {
- return null;
- }
-
- public int getScheduledWriteRequests() {
- return 0;
- }
-
- public int getScheduledWriteBytes() {
- return 0;
- }
-
- public String getStringLocalAddress() {
- return _stringLocalAddress;
- }
-
- public void setStringLocalAddress(String _stringLocalAddress) {
- this._stringLocalAddress = _stringLocalAddress;
- }
-
- public int getLocalPort() {
- return _localPort;
- }
-
- public void setLocalPort(int _localPort) {
- this._localPort = _localPort;
- }
-}
diff --git a/qpid/java/test-profiles/CPPExcludes b/qpid/java/test-profiles/CPPExcludes
index 6f6fb01421..2b58a0684d 100755
--- a/qpid/java/test-profiles/CPPExcludes
+++ b/qpid/java/test-profiles/CPPExcludes
@@ -17,11 +17,17 @@
// under the License.
//
+// QPID-3391: the C++ broker does not currently validate the exchange creation arguments
+org.apache.qpid.test.client.destination.AddressBasedDestinationTest#testCreateExchangeWithNonsenseArgs
+
+//This test requires SSL, but SSL is only enabled for the C++ broker in the cpp.ssl test profile
+//which runs *all* the tests with SSL, so this one can be excluded safely enough
+org.apache.qpid.test.unit.client.AMQSSLConnectionTest#*
+
org.apache.qpid.test.unit.client.channelclose.ChannelCloseTest#*
org.apache.qpid.client.ResetMessageListenerTest#*
// This test is not finished
-org.apache.qpid.test.testcases.TTLTest#*
org.apache.qpid.test.client.failover.FailoverTest#test4MinuteFailover
// Those tests are testing 0.8 specific semantics
@@ -141,9 +147,6 @@ org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecoverTest#*
org.apache.qpid.test.client.RollbackOrderTest#testOrderingAfterRollbackOnMessage#*
-// Temporarily adding the following until the issues are sorted out.
-org.apache.qpid.test.unit.client.AMQConnectionTest#testHeartBeat
-
//Excluded due to QPID-1447 : CPP broker does not have SlowConsumer Disconnection
org.apache.qpid.systest.GlobalQueuesTest#*
org.apache.qpid.systest.GlobalTopicsTest#*
@@ -177,3 +180,14 @@ org.apache.qpid.server.management.AMQUserManagementMBeanTest#*
// QPID-3133: On 0-10, the exception listener is currently not invoked when reconnection fails to occurs.
org.apache.qpid.server.failover.FailoverMethodTest#*
+//QPID-3468: exclude QueueBrowser related failover tests
+org.apache.qpid.test.client.QueueBrowserAutoAckTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserAutoAckTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserClientAckTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserClientAckTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserNoAckTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserNoAckTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserPreAckTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserPreAckTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserDupsOkTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserDupsOkTest#testFailoverAsQueueBrowserCreated
diff --git a/qpid/java/test-profiles/Excludes b/qpid/java/test-profiles/Excludes
index 7e096d3ac8..b1edd07f87 100644
--- a/qpid/java/test-profiles/Excludes
+++ b/qpid/java/test-profiles/Excludes
@@ -17,12 +17,6 @@
// under the License.
//
-// QPID-1715, QPID-1715 : Client Error Handling on close is still broken
-org.apache.qpid.server.queue.QueueCreateTest#testCreatePriorityString
-org.apache.qpid.server.queue.QueueCreateTest#testCreateFlowToDiskValidNoSize
-org.apache.qpid.server.queue.QueueCreateTest#testCreateFlowToDiskInvalid
-org.apache.qpid.server.queue.QueueCreateTest#testCreateFlowToDiskInvalidSize
-
//
// QPID-2031 : Broker is not cleanly shutdown by QpidTestCase
//
@@ -32,7 +26,7 @@ org.apache.qpid.server.logging.BrokerLoggingTest#testBrokerShutdownStopped
org.apache.qpid.server.logging.VirtualHostLoggingTest#testVirtualhostClosure
org.apache.qpid.server.logging.MemoryMessageStoreLoggingTest#testMessageStoreClose
-// QPID-XXX : Test fails to start external broker due to Derby Exception.
+// QPID-3424 : Test fails to start external broker due to Derby Exception.
org.apache.qpid.server.logging.DerbyMessageStoreLoggingTest#*
// QPID-1816 : Client Ack has not been addressed
@@ -49,3 +43,5 @@ org.apache.qpid.test.unit.ack.AcknowledgeAfterFailoverTest#*
// QPID-2418 : The queue backing the dur sub is not currently deleted at subscription change, so the test will fail.
org.apache.qpid.test.unit.ct.DurableSubscriberTest#testResubscribeWithChangedSelectorAndRestart
+
+org.apache.qpid.client.ssl.SSLTest#testVerifyLocalHostLocalDomain
diff --git a/qpid/java/test-profiles/Java010Excludes b/qpid/java/test-profiles/Java010Excludes
index 36f156157a..fe0a53bdfc 100755
--- a/qpid/java/test-profiles/Java010Excludes
+++ b/qpid/java/test-profiles/Java010Excludes
@@ -37,9 +37,6 @@ org.apache.qpid.test.client.FlowControlTest#*
// 0-10 protocol doesn't support message bouncing
org.apache.qpid.server.exchange.ReturnUnroutableMandatoryMessageTest#*
-// QPID-1727 , QPID-1726 :c++ broker does not support flow to disk on transient queues. Also it requries a persistent store impl. for Apache
-org.apache.qpid.test.client.QueueBrowsingFlowToDiskTest#*
-
// 0-10 and 0-9 connections dont generate the exact same logging due to protocol differences
org.apache.qpid.server.logging.ChannelLoggingTest#testChannelStartsFlowStopped
org.apache.qpid.server.logging.ChannelLoggingTest#testChannelStartConsumerFlowStarted
@@ -49,9 +46,6 @@ org.apache.qpid.server.logging.SubscriptionLoggingTest#testSubscriptionSuspend
org.apache.qpid.management.jmx.ManagementActorLoggingTest#testConnectionCloseViaManagement
org.apache.qpid.management.jmx.MessageConnectionStatisticsTest#*
-// 0-10 has different ideas about clientid and ownership of queues
-org.apache.qpid.server.queue.ModelTest#*
-
// 0-10 is not supported by the MethodRegistry
org.apache.qpid.test.unit.close.JavaServerCloseRaceConditionTest#*
@@ -61,24 +55,41 @@ org.apache.qpid.server.queue.ProducerFlowControlTest#*
//QPID-1950 : Commit to test this failure. This is a MINA only failure so it cannot be tested when using 010.
org.apache.qpid.server.failover.MessageDisappearWithIOExceptionTest#*
-//QPID-2471 : Issues with 0-10 recovery
-org.apache.qpid.test.unit.ack.RecoverTest#testRecoverInAutoAckListener
-org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecoverTest#testRecoverInAutoAckListener
-
-// Temporarily disabling until properly investigated.
+//QPID-3421: tests are failing on 0.10 test profile
org.apache.qpid.test.unit.publish.DirtyTransactedPublishTest#*
-//rollback with subscriptions does not work in 0-10 yet
+//QPID-1864: rollback with subscriptions does not work in 0-10 yet
org.apache.qpid.test.client.RollbackOrderTest#testOrderingAfterRollbackOnMessage
-org.apache.qpid.test.unit.ack.RecoverTest#testRecoverInAutoAckListener
// This test uses 0-8 channel frames
org.apache.qpid.test.unit.client.channelclose.ChannelCloseTest#*
-//Temporarily adding the following until the issues are sorted out.
-//Should probably raise JIRAs for them.
-org.apache.qpid.test.client.destination.AddressBasedDestinationTest#testCreateExchange
+//QPID-3422: test fails because ring queue is not implemented on java broker
org.apache.qpid.test.client.destination.AddressBasedDestinationTest#testBrowseMode
// QPID-3133: On 0-10, the exception listener is currently not invoked when reconnection fails to occurs.
org.apache.qpid.server.failover.FailoverMethodTest#*
+
+// QPID-3392: the Java broker does not yet implement exchange creation arguments
+org.apache.qpid.test.client.destination.AddressBasedDestinationTest#testCreateExchangeWithArgs
+org.apache.qpid.test.client.destination.AddressBasedDestinationTest#testSessionCreateTopicWithExchangeArgs
+
+// QPID-1935: the following tests are failing on 0.10 profiles
+org.apache.qpid.test.client.QueueBrowserTransactedTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserTransactedTest#testFailoverWithQueueBrowser
+
+// QPID-3432: These tests test the behaviour of 0-8..-0-9-1 specific system property (amqj.default_syncwrite_timeout)
+org.apache.qpid.test.client.timeouts.SyncWaitTimeoutDelayTest#*
+org.apache.qpid.test.client.timeouts.SyncWaitDelayTest#*
+
+//QPID-3468: exclude QueueBrowser related failover tests
+org.apache.qpid.test.client.QueueBrowserAutoAckTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserAutoAckTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserClientAckTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserClientAckTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserNoAckTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserNoAckTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserPreAckTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserPreAckTest#testFailoverAsQueueBrowserCreated
+org.apache.qpid.test.client.QueueBrowserDupsOkTest#testFailoverWithQueueBrowser
+org.apache.qpid.test.client.QueueBrowserDupsOkTest#testFailoverAsQueueBrowserCreated
diff --git a/qpid/java/test-profiles/JavaExcludes b/qpid/java/test-profiles/JavaExcludes
index 409ba9d832..8de36cbd9a 100644
--- a/qpid/java/test-profiles/JavaExcludes
+++ b/qpid/java/test-profiles/JavaExcludes
@@ -17,31 +17,9 @@
// under the License.
//
-// Those tests are not finished
-org.apache.qpid.test.testcases.TTLTest#*
-
// QPID-1823: this takes ages to run
org.apache.qpid.client.SessionCreateTest#*
-// related to QPID-2471. Temporarily disabling these tests until I figure out why they are failing with the Java broker.
-org.apache.qpid.test.unit.ack.RecoverTest#testRecoverResendsMsgs
-org.apache.qpid.test.unit.ack.RecoverTest#testRecoverResendsMsgsAckOnEarlier
-org.apache.qpid.test.unit.ack.RecoverTest#testAcknowledgePerConsumer
-org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecoverTest#testRecoverResendsMsgs
-org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecoverTest#testRecoverResendsMsgsAckOnEarlier
-org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecoverTest#testAcknowledgePerConsumer
-
-// related to QPID-2471. These are new test cases and fail with the Java broker.
-org.apache.qpid.test.unit.ack.RecoverTest#testOderingWithAsyncConsumer
-org.apache.qpid.test.unit.ack.RecoverTest#testOderingWithSyncConsumer
-org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecoverTest#testOderingWithAsyncConsumer
-org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecoverTest#testOderingWithSyncConsumer
-
-org.apache.qpid.test.client.queue.LVQTest#*
-
-// Session resume is not supported in the Java client
-org.apache.qpid.transport.ConnectionTest#testResumeNonemptyReplayBuffer
-
//QPID-2845: The queue policy types used by the C++ broker are not currently supported by the Java broker
org.apache.qpid.test.client.queue.QueuePolicyTest#testRingPolicy
org.apache.qpid.test.client.queue.QueuePolicyTest#testRejectPolicy
@@ -50,40 +28,18 @@ org.apache.qpid.test.client.queue.QueuePolicyTest#testRejectPolicy
//Moved from JavaStandaloneExcludes when it was removed
///////////////////////////////////////////////////////
+// QPID-3426: The following test is broken.
// This is a long running test so should exclude from normal runs
org.apache.qpid.test.client.failover.FailoverTest#test4MinuteFailover
-// Those tests require failover support
-org.apache.qpid.test.client.QueueBrowserAutoAckTest#testFailoverAsQueueBrowserCreated
-org.apache.qpid.test.client.QueueBrowserAutoAckTest#testFailoverWithQueueBrowser
-org.apache.qpid.test.client.QueueBrowserClientAckTest#testFailoverAsQueueBrowserCreated
-org.apache.qpid.test.client.QueueBrowserClientAckTest#testFailoverWithQueueBrowser
-org.apache.qpid.test.client.QueueBrowserDupsOkTest#testFailoverAsQueueBrowserCreated
-org.apache.qpid.test.client.QueueBrowserDupsOkTest#testFailoverWithQueueBrowser
-org.apache.qpid.test.client.QueueBrowserNoAckTest#testFailoverAsQueueBrowserCreated
-org.apache.qpid.test.client.QueueBrowserNoAckTest#testFailoverWithQueueBrowser
-org.apache.qpid.test.client.QueueBrowserPreAckTest#testFailoverAsQueueBrowserCreated
-org.apache.qpid.test.client.QueueBrowserPreAckTest#testFailoverWithQueueBrowser
-org.apache.qpid.test.client.QueueBrowserTransactedTest#testFailoverAsQueueBrowserCreated
-org.apache.qpid.test.client.QueueBrowserTransactedTest#testFailoverWithQueueBrowser
-org.apache.qpid.test.testcases.FailoverTest#*
-org.apache.qpid.test.client.failover.FailoverTest#*
-
-// InVM Broker tests awaiting resolution of QPID-1103
-org.apache.qpid.test.client.timeouts.SyncWaitDelayTest#*
-org.apache.qpid.test.client.timeouts.SyncWaitTimeoutDelayTest#*
-
-// This test currently does not pick up the runtime location of the nonVm queueBacking store.
-org.apache.qpid.test.unit.close.FlowToDiskBackingQueueDeleteTest#*
-
// This test may use QpidTestCase but it is not using the getConnection and is hardwired to InVM
org.apache.qpid.test.unit.client.connection.CloseAfterConnectionFailureTest#*
-//QPID-1818 : Client code path does not correctly restore a transacted session after failover.
+//QPID-1818, QPID-1821 : Client code path does not correctly restore a transacted session after failover.
org.apache.qpid.server.persistent.NoLocalAfterRecoveryTest#*
-// This test requires the standard configuration file for validation.
-// Excluding here does not reduce test coverage.
-org.apache.qpid.server.configuration.ServerConfigurationFileTest#*
-
+//XA functionality is not fully implemented yet
+org.apache.qpid.jms.xa.XAResourceTest#*
+//The Java broker doesnt support client auth
+org.apache.qpid.client.ssl.SSLTest#testMultipleCertsInSingleStore
diff --git a/qpid/java/test-profiles/JavaPre010Excludes b/qpid/java/test-profiles/JavaPre010Excludes
index c0a53bcef1..c31add9224 100644
--- a/qpid/java/test-profiles/JavaPre010Excludes
+++ b/qpid/java/test-profiles/JavaPre010Excludes
@@ -27,7 +27,7 @@ org.apache.qpid.test.client.message.JMSDestinationTest#testReceiveResend
// QPID-2478 test fails when run against broker using 0-8/9
org.apache.qpid.test.client.message.JMSDestinationTest#testGetDestinationWithCustomExchange
-// The new addressing based sytanx is not supported for AMQP 0-8/0-9 versions
+// The new addressing based syntax is not supported for AMQP 0-8/0-9 versions
org.apache.qpid.test.client.destination.AddressBasedDestinationTest#*
org.apache.qpid.test.client.queue.QueuePolicyTest#testRingPolicy
org.apache.qpid.test.client.queue.QueuePolicyTest#testRejectPolicy
@@ -37,6 +37,26 @@ org.apache.qpid.test.unit.message.JMSPropertiesTest#testApplicationProperties
org.apache.qpid.test.unit.message.UTF8Test#*
org.apache.qpid.client.MessageListenerTest#testSynchronousReceiveNoWait
+// Tests 0.10 client feature
org.apache.qpid.test.unit.client.connection.ConnectionTest#testUnsupportedSASLMechanism
-org.apache.qpid.test.unit.message.JMSPropertiesTest#testGetPropertyNames
+// uses AMQP 0-10 related properties
+org.apache.qpid.test.unit.message.JMSPropertiesTest#testQpidExtensionProperties
+
+// QPID-3034: tests are passing on 0.10 profiles but failing on 0.9.1 profiles
+org.apache.qpid.test.unit.ack.RecoverTest#testRecoverResendsMsgs
+org.apache.qpid.test.unit.ack.RecoverTest#testRecoverResendsMsgsAckOnEarlier
+org.apache.qpid.test.unit.ack.RecoverTest#testAcknowledgePerConsumer
+org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecoverTest#testRecoverResendsMsgs
+org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecoverTest#testRecoverResendsMsgsAckOnEarlier
+org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecoverTest#testAcknowledgePerConsumer
+org.apache.qpid.test.unit.ack.RecoverTest#testOderingWithSyncConsumer
+org.apache.qpid.test.unit.ack.FailoverBeforeConsumingRecoverTest#testOderingWithSyncConsumer
+
+
+// LVQ tests use new address syntax and can not be run on 0.9.1 profiles
+org.apache.qpid.test.client.queue.LVQTest#*
+
+// Verification of unique client id is 0-10 specific
+org.apache.qpid.test.unit.client.connection.ConnectionTest#testClientIDVerificationForSameUser
+org.apache.qpid.test.unit.client.connection.ConnectionTest#testClientIDVerificationForDifferentUsers
diff --git a/qpid/java/test-profiles/cpp.ssl.excludes b/qpid/java/test-profiles/cpp.ssl.excludes
index 4d499c57b9..14c8ac2fe3 100644
--- a/qpid/java/test-profiles/cpp.ssl.excludes
+++ b/qpid/java/test-profiles/cpp.ssl.excludes
@@ -18,3 +18,10 @@
//
#org.apache.qpid.test.client.failover.FailoverTest#*
+
+//This test does not supply a client keystore, therefore it cant login to the C++ broker
+//in this test profile as it demands client certificate authentication
+org.apache.qpid.client.ssl.SSLTest#testCreateSSLConnectionUsingConnectionURLParamsTrustStoreOnly
+
+//QPID-3431: excluding because this takes 30+ mins to run on the C++ SSL profile for some reason
+org.apache.qpid.client.SessionCreateTest#testSessionCreationLimit
diff --git a/qpid/java/test-profiles/cpp.ssl.testprofile b/qpid/java/test-profiles/cpp.ssl.testprofile
index bf71384835..b3bb5e22f7 100644
--- a/qpid/java/test-profiles/cpp.ssl.testprofile
+++ b/qpid/java/test-profiles/cpp.ssl.testprofile
@@ -23,7 +23,7 @@ broker.modules=--load-module ${broker.module.ssl} --ssl-cert-name localhost.loca
profile.use_ssl=true
broker.ready= Listening for SSL connections
-javax.net.ssl.keyStore=${test.profiles}/test_resources/ssl/keystore.jks
+javax.net.ssl.keyStore=${test.profiles}/test_resources/ssl/java_client_keystore.jks
javax.net.ssl.keyStorePassword=password
-javax.net.ssl.trustStore=${test.profiles}/test_resources/ssl/certstore.jks
+javax.net.ssl.trustStore=${test.profiles}/test_resources/ssl/java_client_truststore.jks
javax.net.ssl.trustStorePassword=password
diff --git a/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile b/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile
index f79e1f3aad..1580cec1c5 100644
--- a/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile
+++ b/qpid/java/test-profiles/java-dby-spawn.0-9-1.testprofile
@@ -24,7 +24,7 @@ broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work
broker.ready=BRK-1004
broker.stopped=Exception
broker.config=${project.root}/build/etc/config-systests-derby.xml
-broker.protocol.excludes=--exclude-0-10 @PORT
+broker.protocol.excludes=--exclude-0-10 @PORT --exclude-0-10 @SSL_PORT
messagestore.class.name=org.apache.qpid.server.store.DerbyMessageStore
profile.excludes=JavaPersistentExcludes JavaPre010Excludes
broker.clean.between.tests=true
diff --git a/qpid/java/test-profiles/java-dby.0-9-1.testprofile b/qpid/java/test-profiles/java-dby.0-9-1.testprofile
index f9700da82d..b4d506df05 100644
--- a/qpid/java/test-profiles/java-dby.0-9-1.testprofile
+++ b/qpid/java/test-profiles/java-dby.0-9-1.testprofile
@@ -24,7 +24,7 @@ broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work
broker.ready=BRK-1004
broker.stopped=Exception
broker.config=${project.root}/build/etc/config-systests-derby.xml
-broker.protocol.excludes=--exclude-0-10 @PORT
+broker.protocol.excludes=--exclude-0-10 @PORT --exclude-0-10 @SSL_PORT
messagestore.class.name=org.apache.qpid.server.store.DerbyMessageStore
profile.excludes=JavaPersistentExcludes JavaPre010Excludes
broker.clean.between.tests=true
diff --git a/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile b/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile
index f94b93c793..4563600ba1 100644
--- a/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile
+++ b/qpid/java/test-profiles/java-mms-spawn.0-9-1.testprofile
@@ -23,7 +23,7 @@ broker.command=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDE
broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work
broker.ready=BRK-1004
broker.stopped=Exception
-broker.protocol.excludes=--exclude-0-10 @PORT
+broker.protocol.excludes=--exclude-0-10 @PORT --exclude-0-10 @SSL_PORT
#
# Do not enable. Allow client to attempt 0-10 and negotiate downwards
#
diff --git a/qpid/java/test-profiles/java-mms.0-9-1.testprofile b/qpid/java/test-profiles/java-mms.0-9-1.testprofile
index 45e2fc7162..cec02f3aa6 100644
--- a/qpid/java/test-profiles/java-mms.0-9-1.testprofile
+++ b/qpid/java/test-profiles/java-mms.0-9-1.testprofile
@@ -24,7 +24,7 @@ broker.command=${project.root}/build/bin/qpid-server -p @PORT -m @MPORT @EXCLUDE
broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work
broker.ready=BRK-1004
broker.stopped=Exception
-broker.protocol.excludes=--exclude-0-10 @PORT
+broker.protocol.excludes=--exclude-0-10 @PORT --exclude-0-10 @SSL_PORT
#
# Do not enable. Allow client to attempt 0-10 and negotiate downwards
#
diff --git a/qpid/java/test-profiles/log4j-test.xml b/qpid/java/test-profiles/log4j-test.xml
index 9adfd68202..062acaaac9 100644
--- a/qpid/java/test-profiles/log4j-test.xml
+++ b/qpid/java/test-profiles/log4j-test.xml
@@ -59,10 +59,6 @@
<level value="ERROR"/>
</logger>
- <logger name="org.apache.qpid.server.virtualhost.VirtualHostImpl$1HouseKeepingTask">
- <level value="WARN"/>
- </logger>
-
<root>
<level value="${root.logging.level}"/>
<appender-ref ref="console" />
diff --git a/qpid/java/test-profiles/python_tests/Java010PythonExcludes b/qpid/java/test-profiles/python_tests/Java010PythonExcludes
new file mode 100644
index 0000000000..31d2a8affc
--- /dev/null
+++ b/qpid/java/test-profiles/python_tests/Java010PythonExcludes
@@ -0,0 +1,22 @@
+//
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+//
+
+// QPID-3477: Java broker does not handle rejection code specified in test
+qpid.tests.messaging.endpoints.SessionTests.testReject
+
diff --git a/qpid/java/test-profiles/test_resources/ssl/java_broker.crt b/qpid/java/test-profiles/test_resources/ssl/java_broker.crt
new file mode 100644
index 0000000000..7543ee8a7d
--- /dev/null
+++ b/qpid/java/test-profiles/test_resources/ssl/java_broker.crt
@@ -0,0 +1,15 @@
+-----BEGIN CERTIFICATE-----
+MIICVzCCAcCgAwIBAgIFAJVWeugwDQYJKoZIhvcNAQEFBQAwQTELMAkGA1UEBhMC
+Q0ExEDAOBgNVBAgTB09udGFyaW8xDTALBgNVBAoTBEFDTUUxETAPBgNVBAMTCE15
+Um9vdENBMB4XDTExMDgxNzEzNTQ1NFoXDTExMTExNzEzNTQ1NFowejEQMA4GA1UE
+BhMHVW5rbm93bjEQMA4GA1UECBMHVW5rbm93bjEQMA4GA1UEBxMHVW5rbm93bjEQ
+MA4GA1UEChMHVW5rbm93bjEQMA4GA1UECxMHVW5rbm93bjEeMBwGA1UEAxMVbG9j
+YWxob3N0LmxvY2FsZG9tYWluMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCj
+VSo/qOCDsPXQ2HKn2M4ey1FzK6NORkWYefFu5fDFJUKKPXXA8Ey9rPDv+XGGIQKI
+6JlmD2nnjp8Em7+/xa6u4XbFqLR8ycmgldGB7r8RbH3B7KYY3s4AxL9A3/TzHza4
+FJAk2X4LTVWHuX8tB/JyLS6695NSLoI5xKW4maARxwIDAQABoyIwIDAJBgNVHRME
+AjAAMBMGA1UdJQQMMAoGCCsGAQUFBwMBMA0GCSqGSIb3DQEBBQUAA4GBAFsexncH
+xxTjk9YMoPpjjU0t/UgzjBLEruIIQQ/EtcZIOEqNCDwpzfgY/x7GVCy8VjLISgzK
+xJsNv75F/vP8a4eaeTRJmrvVcWUZJu6r/A8WNwJVYUvXhy2+jbfdp/UMlRg+ODw7
+GMU9ILQW4LGJnTtJKrlVrcQqzw6IZRduEE65
+-----END CERTIFICATE-----
diff --git a/qpid/java/test-profiles/test_resources/ssl/java_broker.req b/qpid/java/test-profiles/test_resources/ssl/java_broker.req
new file mode 100644
index 0000000000..05fc8b0eda
--- /dev/null
+++ b/qpid/java/test-profiles/test_resources/ssl/java_broker.req
@@ -0,0 +1,10 @@
+-----BEGIN NEW CERTIFICATE REQUEST-----
+MIIBujCCASMCAQAwejEQMA4GA1UEBhMHVW5rbm93bjEQMA4GA1UECBMHVW5rbm93bjEQMA4GA1UE
+BxMHVW5rbm93bjEQMA4GA1UEChMHVW5rbm93bjEQMA4GA1UECxMHVW5rbm93bjEeMBwGA1UEAxMV
+bG9jYWxob3N0LmxvY2FsZG9tYWluMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCjVSo/qOCD
+sPXQ2HKn2M4ey1FzK6NORkWYefFu5fDFJUKKPXXA8Ey9rPDv+XGGIQKI6JlmD2nnjp8Em7+/xa6u
+4XbFqLR8ycmgldGB7r8RbH3B7KYY3s4AxL9A3/TzHza4FJAk2X4LTVWHuX8tB/JyLS6695NSLoI5
+xKW4maARxwIDAQABoAAwDQYJKoZIhvcNAQEFBQADgYEAjXXfPRv7xQYY3R8lZ78/0gbXZ35Lq/1h
+6sxShXfqXxFXE8oP4uGLTlsnSvfsHQL60ihKP3V+nv/zIxNudAsrM57x70owUWyp/bm0XXD89X0T
+zEBP9OQexDTwC2r/8gvYMi++022LMTluEPw29bCsp6usuKh61eLmekprpNlhs5M=
+-----END NEW CERTIFICATE REQUEST-----
diff --git a/qpid/java/test-profiles/test_resources/ssl/java_broker_keystore.jks b/qpid/java/test-profiles/test_resources/ssl/java_broker_keystore.jks
new file mode 100644
index 0000000000..4c4449e20d
--- /dev/null
+++ b/qpid/java/test-profiles/test_resources/ssl/java_broker_keystore.jks
Binary files differ
diff --git a/qpid/java/test-profiles/test_resources/ssl/keystore.jks b/qpid/java/test-profiles/test_resources/ssl/java_client_keystore.jks
index e3a850a248..e3a850a248 100644
--- a/qpid/java/test-profiles/test_resources/ssl/keystore.jks
+++ b/qpid/java/test-profiles/test_resources/ssl/java_client_keystore.jks
Binary files differ
diff --git a/qpid/java/test-profiles/test_resources/ssl/certstore.jks b/qpid/java/test-profiles/test_resources/ssl/java_client_truststore.jks
index 2af95f21f8..2af95f21f8 100644
--- a/qpid/java/test-profiles/test_resources/ssl/certstore.jks
+++ b/qpid/java/test-profiles/test_resources/ssl/java_client_truststore.jks
Binary files differ
diff --git a/qpid/java/test-profiles/testprofile.defaults b/qpid/java/test-profiles/testprofile.defaults
index 35429d3fed..151e904930 100644
--- a/qpid/java/test-profiles/testprofile.defaults
+++ b/qpid/java/test-profiles/testprofile.defaults
@@ -20,7 +20,7 @@ java.naming.factory.initial=org.apache.qpid.jndi.PropertiesFileInitialContextFac
java.naming.provider.url=${test.profiles}/test-provider.properties
broker.clean=${test.profiles}/clean-dir ${build.data} ${project.root}/build/work
-broker.ready=Listening on TCP port
+broker.ready=Listening on TCP
broker.config=${project.root}/build/etc/config-systests.xml
messagestore.class.name=org.apache.qpid.server.store.MemoryMessageStore
broker.protocol.excludes=
diff --git a/qpid/java/tools/bin/Profile-run-from-source b/qpid/java/tools/bin/Profile-run-from-source
new file mode 100755
index 0000000000..f8ec45ccff
--- /dev/null
+++ b/qpid/java/tools/bin/Profile-run-from-source
@@ -0,0 +1,71 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# Sets the environment for running the scripts from a source checkout.
+txtbld=$(tput bold) # Bold
+txtrst=$(tput sgr0) # Reset
+txtred=$(tput setaf 1) # red
+txtgreen=$(tput setaf 2) # green
+
+echo "${txtbld}Setting the environment to run qpid java tools from a source checkout${txtrst}"
+
+abs_path()
+{
+ D=`dirname "$1"`
+ echo "`cd \"$D\" 2>/dev/null && pwd`"
+}
+
+export QPID_CHECKOUT=`abs_path "../../../../"`
+echo "${txtgreen}Using source checkout at $QPID_CHECKOUT${txtrst}"
+
+export PATH=$QPID_CHECKOUT/java/tools/bin:$PATH
+
+if [ "$JAVA" = "" ] ; then
+ export JAVA=$(which java)
+fi
+
+#------------- Required for perf_report, qpid-bench & qpid-python-testkit ----------------
+
+export VENDOR_LIB=$QPID_CHECKOUT/java/build/lib
+export CLASSPATH=`find $VENDOR_LIB -name '*.jar' | tr '\n' ':'`
+export LOG_CONFIG="-Dlog4j.configuration=file:///$QPID_CHECKOUT/java/tools/etc/test.log4j"
+
+
+#------------- Required for qpid-python-testkit -----------------------------------------
+
+PYTHONPATH=$QPID_CHECKOUT/python/qpid:$QPID_CHECKOUT/cpp/src/test/brokertest.py:$PYTHONPATH
+export PATH=$QPID_CHECKOUT/python:$PATH
+
+if [ -x $QPID_CHECKOUT/cpp/src/qpidd ]; then
+ QPIDD_EXEC=$QPID_CHECKOUT/cpp/src/qpidd
+else
+ echo "${txtred}WARNING: Qpid CPP broker executable not found. You will not be able to run qpid-python-testkit${txtrst}"
+fi
+
+if [ -x $QPID_CHECKOUT/cpp/src/.libs/cluster.so ]; then
+ CLUSTER_LIB=$QPID_CHECKOUT/cpp/src/.libs/cluster.so
+else
+ echo "${txtred}WARNING: Qpid cluster.so not found.You will not be able to run qpid-python-testkit${txtrst}"
+fi
+
+if [ "$STORE_LIB" = "" ] ; then
+ echo "${txtred}WARNING: Please point the STORE_LIB variable to the message store module. If not persistence tests will not write messages to disk.${txtrst}"
+fi
+
+export PYTHONPATH QPIDD_EXEC CLUSTER_LIB
diff --git a/qpid/dotnet/build-nant-release b/qpid/java/tools/bin/check-qpid-java-env
index a6d73dc40a..dedd6e06ea 100755
--- a/qpid/dotnet/build-nant-release
+++ b/qpid/java/tools/bin/check-qpid-java-env
@@ -1,6 +1,5 @@
#!/bin/bash
#
-#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
@@ -8,27 +7,32 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-#
#
+if [ -z "$LOG_CONFIG" ]; then
+ echo "Please set the appropriate parameters for logging as it may affect performance. Ex log4j defaults to DEBUG if not configured properly"
+ exit -1
+fi
-Usage()
-{
- echo "usage: $0 net-2.0|mono-2.0"
- exit 2
-}
+if [ -z "$JAVA_MEM" ]; then
+ JAVA_MEM=-Xmx1024m
+fi
-if [[ $# -ne 1 ]]; then
- Usage
+if [ -z "$JAVA" ]; then
+ echo "Please set the path to the correct java executable to JAVA"
+ exit -1
fi
-nant -t:$1 release-pkg -D:build.config=release
+if [ -z "$CLASSPATH" ]; then
+ echo "Please set the $CLASSPATH variable to point to the jar/class files"
+ exit -1
+fi
diff --git a/qpid/java/tools/bin/controller b/qpid/java/tools/bin/controller
new file mode 100644
index 0000000000..fab8614039
--- /dev/null
+++ b/qpid/java/tools/bin/controller
@@ -0,0 +1,132 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# This starts the controller for coordinating perf tests/
+
+. check-qpid-java-env
+
+PROGRAM_NAME=controller
+CONSUMER_COUNT=1
+PRODUCER_COUNT=1
+DURATION=-1
+TEST_NAME="TEST_NAME"
+EXTRA_JVM_ARGS=""
+
+TEMP=$(getopt -n $PROGRAM_NAME -o c:p:d:n:a:h --long consumers:,producers:,jvm-args:help -- "$@")
+
+usage()
+{
+ printf "\n%s\n" "Usage: controller [option].."
+
+ printf "\n%31s\n%52s\n" "-c, --consumer-count=count" "No of consumers participating in the test"
+
+ printf "\n%31s\n%52s\n" "-p, --producer-count=count" "No of producers participating in the test"
+
+ printf "\n%24s\n%94s\n" "-d, --duration=mins" "The duration of the test in mins. If not specified, it will just run one iteration."
+
+ printf "\n%27s\n%32s\n" "-n, --name=<test-name>" "The name of the test."
+
+ printf "\n%19s\n%50s\n" "-a, --jvm-args" "Extra jvm arguments you want to specify"
+}
+
+eval set -- "$TEMP"
+while true; do
+ case $1 in
+ -c|--consumer-count)
+ CONSUMER_COUNT="$2"; shift; shift; continue
+ ;;
+ -p|--producer-count)
+ PRODUCER_COUNT="$2"; shift; shift; continue
+ ;;
+ -d|--duration)
+ DURATION="$2"; shift; shift; continue
+ ;;
+ -n|--name)
+ TEST_NAME="$2"; shift; shift; continue
+ ;;
+ -h|--help)
+ usage
+ exit 0
+ ;;
+ -a|--jvm-args)
+ EXTRA_JVM_ARGS="$2"; shift; shift; continue
+ ;;
+ --)
+ # no more arguments to parse
+ break
+ ;;
+ *)
+ # no more arguments to parse
+ break
+ ;;
+ esac
+done
+
+CONTROLLER_ARGS="-server -Durl=amqp://guest:guest@clientid/testpath?brokerlist='tcp://localhost:5672' -Dprecision=mili -Dprod_count=$PRODUCER_COUNT -Dcons_count=$CONSUMER_COUNT -Dprint_std_dev=true -Dduration=${DURATION}"
+
+
+waitfor() { until grep -a -l "$2" $1 >/dev/null 2>&1 ; do sleep 1 ; done ; }
+cleanup()
+{
+ pids=`ps aux | grep java | grep PerfTestController | awk '{print $2}'`
+ if [ "$pids" != "" ]; then
+ kill -3 $pids
+ kill -9 $pids >/dev/null 2>&1
+ fi
+}
+
+run_controller()
+{
+ TEST_ARGS="$LOG_CONFIG $JAVA_MEM $CONTROLLER_ARGS $EXTRA_JVM_ARGS"
+ echo "Running controller with : $TEST_ARGS" > test.out
+ $JAVA -cp $CLASSPATH $TEST_ARGS org.apache.qpid.tools.PerfTestController >> test.out &
+ waitfor test.out "Controller: Completed the test"
+ sleep 2 #give a grace period to shutdown
+ print_result $TEST_NAME
+}
+
+print_result()
+{
+ prod_rate=`cat test.out | grep "Avg Producer rate" | awk '{print $5}'`
+ sys_rate=`cat test.out | grep "System Throughput" | awk '{print $4}'`
+ cons_rate=`cat test.out | grep "Avg Consumer rate" | awk '{print $5}'`
+ avg_latency=`cat test.out | grep "Avg System Latency" | awk '{print $5}'`
+ min_latency=`cat test.out | grep "Min System Latency" | awk '{print $5}'`
+ max_latency=`cat test.out | grep "Max System Latency" | awk '{print $5}'`
+ std_dev=`cat test.out | grep "Avg System Std Dev" | awk '{print $6}'`
+
+ printf "|%-15s|%15.2f|%13.2f|%13.2f|%11.2f|%11.2f|%11.2f|%7.2f|\n" $1 $sys_rate $prod_rate $cons_rate $avg_latency $min_latency $max_latency $std_dev
+ echo "--------------------------------------------------------------------------------------------------------"
+}
+
+trap cleanup EXIT
+
+rm -rf *.out
+
+if [ "$DURATION" = -1 ]; then
+ echo "Test report on " `date +%F`
+ echo "========================================================================================================"
+ echo "|Test |System throuput|Producer rate|Consumer Rate|Avg Latency|Min Latency|Max Latency|Std Dev|"
+ echo "--------------------------------------------------------------------------------------------------------"
+else
+ echo "Test in progress....Tail stats-csv.log to see results being printed for each iteration."
+fi
+
+run_controller
diff --git a/qpid/java/tools/bin/perf_report.sh b/qpid/java/tools/bin/perf-report
index e6b4c987e5..7de3f2b602 100755
--- a/qpid/java/tools/bin/perf_report.sh
+++ b/qpid/java/tools/bin/perf-report
@@ -18,23 +18,19 @@
# under the License.
#
-# This will run the 8 use cases defined below and produce
-# a report in tabular format. Refer to the documentation
-# for more details.
+# This will run the following test cases defined below and produce
+# a report in tabular format.
-SUB_MEM=-Xmx1024M
-PUB_MEM=-Xmx1024M
-LOG_CONFIG="-Damqj.logging.level=WARN"
QUEUE="queue;{create:always,node:{x-declare:{auto-delete:true}}}"
DURA_QUEUE="dqueue;{create:always,node:{durable:true,x-declare:{auto-delete:true}}}"
TOPIC="amq.topic/test"
DURA_TOPIC="amq.topic/test;{create:always,link:{durable:true}}"
-. setenv.sh
+COMMON_CONFIG="-server -Durl=amqp://guest:guest@clientid/testpath?brokerlist='tcp://localhost:5672'"
waitfor() { until grep -a -l "$2" $1 >/dev/null 2>&1 ; do sleep 1 ; done ; }
cleanup()
-{
+{
pids=`ps aux | grep java | grep Perf | awk '{print $2}'`
if [ "$pids" != "" ]; then
kill -3 $pids
@@ -46,30 +42,31 @@ cleanup()
# $2 consumer options
# $3 producer options
run_testcase()
-{
- sh run_sub.sh $LOG_CONFIG $SUB_MEM $2 > sub.out &
- waitfor sub.out "Warming up"
- sh run_pub.sh $LOG_CONFIG $PUB_MEM $3 > pub.out &
- waitfor sub.out "Completed the test"
- waitfor pub.out "Consumer has completed the test"
+{
+ sh run-sub $COMMON_CONFIG $2 > sub.out &
+ sh run-pub $COMMON_CONFIG $3 > pub.out &
+ waitfor pub.out "Controller: Completed the test"
sleep 2 #give a grace period to shutdown
- print_result $1
+ print_result $1
+ mv pub.out $1.pub.out
+ mv sub.out $1.sub.out
}
print_result()
{
- prod_rate=`cat pub.out | grep "Producer rate" | awk '{print $3}'`
- sys_rate=`cat sub.out | grep "System Throughput" | awk '{print $4}'`
- cons_rate=`cat sub.out | grep "Consumer rate" | awk '{print $4}'`
- avg_latency=`cat sub.out | grep "Avg Latency" | awk '{print $4}'`
- min_latency=`cat sub.out | grep "Min Latency" | awk '{print $4}'`
- max_latency=`cat sub.out | grep "Max Latency" | awk '{print $4}'`
-
- printf "|%-15s|%15.2f|%13.2f|%13.2f|%11.2f|%11d|%11d|\n" $1 $sys_rate $prod_rate $cons_rate $avg_latency $min_latency $max_latency
+ prod_rate=`cat pub.out | grep "Avg Producer rate" | awk '{print $5}'`
+ sys_rate=`cat pub.out | grep "System Throughput" | awk '{print $4}'`
+ cons_rate=`cat pub.out | grep "Avg Consumer rate" | awk '{print $5}'`
+ avg_latency=`cat pub.out | grep "Avg System Latency" | awk '{print $5}'`
+ min_latency=`cat pub.out | grep "Min System Latency" | awk '{print $5}'`
+ max_latency=`cat pub.out | grep "Max System Latency" | awk '{print $5}'`
+
+ printf "|%-15s|%15.2f|%13.2f|%13.2f|%11.2f|%11.2f|%11.2f|\n" $1 $sys_rate $prod_rate $cons_rate $avg_latency $min_latency $max_latency
echo "------------------------------------------------------------------------------------------------"
}
trap cleanup EXIT
+rm -rf *.out #cleanup old files.
echo "Test report on " `date +%F`
echo "================================================================================================"
@@ -82,7 +79,7 @@ echo "--------------------------------------------------------------------------
# setting very low values to start with and experiment while increasing them slowly.
# Test 1 Trans Queue
-#run_testcase "Trans_Queue" "-Daddress=$QUEUE" "-Daddress=$QUEUE -Dwarmup_count=1 -Dmsg_count=10"
+run_testcase "Trans_Queue" "-Daddress=$QUEUE" "-Daddress=$QUEUE -Dwarmup_count=1 -Dmsg_count=10"
# Test 2 Dura Queue
run_testcase "Dura_Queue" "-Daddress=$DURA_QUEUE -Ddurable=true" "-Daddress=$DURA_QUEUE -Ddurable=true -Dwarmup_count=1 -Dmsg_count=10"
diff --git a/qpid/java/tools/bin/qpid-bench b/qpid/java/tools/bin/qpid-bench
index c982e64efd..cd894b607f 100644..100755
--- a/qpid/java/tools/bin/qpid-bench
+++ b/qpid/java/tools/bin/qpid-bench
@@ -18,18 +18,6 @@
# under the License.
#
-if [ -z "$QPID_HOME" ]; then
- export QPID_HOME=$(dirname $(dirname $(readlink -f $0)))
- export PATH=${PATH}:${QPID_HOME}/bin
-fi
+. check-qpid-java-env
-# Set classpath to include Qpid jar with all required jars in manifest
-QPID_LIBS=$QPID_HOME/lib/qpid-all.jar
-
-# Set other variables used by the qpid-run script before calling
-export JAVA=java \
- JAVA_VM=-server \
- JAVA_MEM=-Xmx1024m \
- QPID_CLASSPATH=$QPID_LIBS
-
-. qpid-run org.apache.qpid.tools.QpidBench "$@"
+$JAVA -cp $CLASSPATH -server $JAVA_MEM $LOG_CONFIG org.apache.qpid.tools.QpidBench "$@"
diff --git a/qpid/java/tools/bin/qpid-python-testkit b/qpid/java/tools/bin/qpid-python-testkit
index cbe7972421..7233d0d075 100755
--- a/qpid/java/tools/bin/qpid-python-testkit
+++ b/qpid/java/tools/bin/qpid-python-testkit
@@ -22,9 +22,12 @@
# via the python test runner. The defaults are set for a running
# from an svn checkout
-. ./set-testkit-env.sh
+. check-qpid-java-env
export PYTHONPATH=./:$PYTHONPATH
-rm -rf $OUTDIR
-qpid-python-test -DOUTDIR=$OUTDIR -m testkit "$@"
-
+echo $PYTHONPATH
+if [ "$OUTDIR" = "" ] ; then
+ OUTDIR=$PWD
+fi
+testdir=$OUTDIR/testkit-out-`date +%F-%H-%M-%S`
+qpid-python-test -m testkit -DOUTDIR=$testdir"$@"
diff --git a/qpid/java/tools/bin/run-pub b/qpid/java/tools/bin/run-pub
new file mode 100755
index 0000000000..9efe58c4b8
--- /dev/null
+++ b/qpid/java/tools/bin/run-pub
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+. check-qpid-java-env
+
+JVM_ARGS="$1"
+PROGRAM_ARGS="$2"
+
+echo "JVM ARGS : $JAVA_MEM $JVM_ARGS"
+echo "PROGRAM ARGS : $PROGRAM_ARGS"
+$JAVA -cp $CLASSPATH $LOG_CONFIG $JAVA_MEM $JVM_ARGS org.apache.qpid.tools.PerfProducer $PROGRAM_ARGS
diff --git a/qpid/ruby/lib/qpid/packer.rb b/qpid/java/tools/bin/run-sub
index ae1be37faf..8449563f7f 100644..100755
--- a/qpid/ruby/lib/qpid/packer.rb
+++ b/qpid/java/tools/bin/run-sub
@@ -1,3 +1,4 @@
+#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
@@ -17,17 +18,15 @@
# under the License.
#
-module Qpid
- module Packer
- def unpack(fmt, len)
- raw = read(len)
- values = raw.unpack(fmt)
- values = values[0] if values.size == 1
- return values
- end
+. check-qpid-java-env
+
+echo "All args $@"
+
+JVM_ARGS="$1"
+PROGRAM_ARGS="$2"
+
+echo "JVM ARGS : $JAVA_MEM $JVM_ARGS"
+echo "PROGRAM ARGS : $PROGRAM_ARGS"
+
+$JAVA -cp $CLASSPATH $LOG_CONFIG $JAVA_MEM $JVM_ARGS org.apache.qpid.tools.PerfConsumer $PROGRAM_ARGS
- def pack(fmt, *args)
- write(args.pack(fmt))
- end
- end
-end
diff --git a/qpid/java/tools/bin/set-testkit-env.sh b/qpid/java/tools/bin/set-testkit-env.sh
deleted file mode 100644
index 051dad8179..0000000000
--- a/qpid/java/tools/bin/set-testkit-env.sh
+++ /dev/null
@@ -1,88 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# If QPIDD_EXEC ..etc is not set, it will first check to see
-# if this is run from a qpid svn check out, if not it will look
-# for installed rpms.
-
-abs_path()
-{
- D=`dirname "$1"`
- B=`basename "$1"`
- echo "`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B"
-}
-
-# Environment for python tests
-
-if [ -d ../../../python ] ; then
- PYTHON_DIR=../../../python
- PYTHONPATH=$PYTHON_DIR:$PYTHON_DIR/qpid
-elif [ -z `echo $PYTHONPATH | awk '$0 ~ /qpid/'` ]; then
- echo "WARNING: skipping test, no qpid python scripts found ."; exit 0;
-fi
-
-
-if [ "$QPIDD_EXEC" = "" ] ; then
- if [ -x ../../../cpp/src/qpidd ]; then
- QPIDD_EXEC=`abs_path "../../../cpp/src/qpidd"`
- elif [ -n "$(which qpidd)" ] ; then
- QPIDD_EXEC=$(which qpidd)
- else
- echo "WARNING: skipping test, QPIDD_EXEC not set and qpidd not found."; exit 0;
- fi
-fi
-
-if [ "$CLUSTER_LIB" = "" ] ; then
- if [ -x ../../../cpp/src/.libs/cluster.so ]; then
- CLUSTER_LIB=`abs_path "../../../cpp/src/.libs/cluster.so"`
- elif [ -e /usr/lib64/qpid/daemon/cluster.so ] ; then
- CLUSTER_LIB="/usr/lib64/qpid/daemon/cluster.so"
- elif [ -e /usr/lib/qpid/daemon/cluster.so ] ; then
- CLUSTER_LIB="/usr/lib/qpid/daemon/cluster.so"
- else
- echo "WARNING: skipping test, CLUSTER_LIB not set and cluster.so not found."; exit 0;
- fi
-fi
-
-if [ "$STORE_LIB" = "" ] ; then
- if [ -e /usr/lib64/qpid/daemon/msgstore.so ] ; then
- STORE_LIB="/usr/lib64/qpid/daemon/msgstore.so"
- elif [ -e /usr/lib/qpid/daemon/msgstore.so ] ; then
- STORE_LIB="/usr/lib/qpid/daemon/msgstore.so"
- #else
- # echo "WARNING: skipping test, STORE_LIB not set and msgstore.so not found."; exit 0;
- fi
-fi
-
-if [ "$QP_CP" = "" ] ; then
- if [ -d ../../build/lib/ ]; then
- QP_JAR_PATH=`abs_path "../../build/lib/"`
- elif [ -d /usr/share/java/qpid-deps ]; then
- QP_JAR_PATH=`abs_path "/usr/share/java"`
- else
- "WARNING: skipping test, QP_CP not set and the Qpid jars are not present."; exit 0;
- fi
- QP_CP=`find $QP_JAR_PATH -name '*.jar' | tr '\n' ':'`
-fi
-
-if [ "$OUTDIR" = "" ] ; then
- OUTDIR=`abs_path "./output"`
-fi
-
-export PYTHONPATH PYTHON_DIR QPIDD_EXEC CLUSTER_LIB QP_CP OUTDIR
diff --git a/qpid/java/tools/bin/setenv.sh b/qpid/java/tools/bin/setenv.sh
deleted file mode 100644
index 24135e711b..0000000000
--- a/qpid/java/tools/bin/setenv.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/sh
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# Compiles the test classes and sets the CLASSPATH
-
-# check for QPID_TEST_HOME
-if [ "$QPID_TEST_HOME" = "" ] ; then
- echo "ERROR: Please set QPID_TEST_HOME ...."
- exit 1
-fi
-
-# check for JAVA_HOME
-if [ "$JAVA_HOME" = "" ] ; then
- echo "ERROR: Please set JAVA_HOME ...."
- exit 1
-fi
-
-# VENDOR_LIB path needs to be set
-# for Qpid set this to {qpid_checkout}/java/build/lib
-if [ "$VENDOR_LIB" = "" ] ; then
- echo "ERROR: Please set VENDOR_LIB path in the script ...."
- exit 1
-fi
-
-
-[ -d $QPID_TEST_HOME/classes ] || mkdir $QPID_TEST_HOME/classes
-
-CLASSPATH=`find $VENDOR_LIB -name *.jar* | tr '\n' ":"`
-$JAVA_HOME/bin/javac -cp $CLASSPATH -d $QPID_TEST_HOME/classes -sourcepath $QPID_TEST_HOME/src `find $QPID_TEST_HOME/src -name '*.java'`
-
-export CLASSPATH=$QPID_TEST_HOME/classes:$CLASSPATH
-
diff --git a/qpid/java/tools/bin/start-consumers b/qpid/java/tools/bin/start-consumers
new file mode 100644
index 0000000000..c71fc0c21f
--- /dev/null
+++ b/qpid/java/tools/bin/start-consumers
@@ -0,0 +1,119 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# This starts the controller for coordinating perf tests/
+
+. check-qpid-java-env
+
+PROGRAM_NAME="start-consumers"
+PROCESS_COUNT=1
+CON_COUNT=1
+MSG_COUNT=10000
+ADDRESS="queue;{create:always}"
+UNIQUE_DEST="false"
+
+EXTRA_JVM_ARGS=" -Dmax_prefetch=500 "
+
+TEST_ID=`echo ${HOSTNAME} | awk -F . '{print $1}'`
+
+TEMP=$(getopt -n $PROGRAM_NAME -o C:P:uc:p:a:s:t:w:h\
+ --long connection-count:,process-count:,create-unique-queues-topics,\
+jvm-args:,queue:,topic:,address:,\
+msg-count:,help -- "$@")
+
+usage()
+{
+ printf "\n%s\n" "Usage: start-producers [option].."
+
+ printf "\n%32s\n%51s\n" "-C, --connection-count=count" "No of consumers participating in the test"
+
+ printf "\n%29s\n%51s\n" "-P, --process-count=count" "No of producers participating in the test"
+
+ printf "\n%37s\n%105s\n" "-u, --create-unique-queues-topics" "This will create unique queue names and topics based on what you specify for --queue or --topic"
+
+ printf "\n%11s\n%55s\n" "--queue" "The Queue you want to publish to. Ex my-queue"
+
+ printf "\n%11s\n%84s\n" "--topic" "The Topic you want to publish to in amq.topic exchange. Ex amq.topic/topic"
+
+ printf "\n%13s\n%44s\n" "--address" "The address you want to publish to"
+
+ printf "\n%25s\n%50s\n" "-c, --msg-count=count" "message count per test (default 500,000)"
+
+ printf "\n%18s\n%49s\n" "-a, --jvm-args" "Extra jvm arguments you want to specify"
+}
+
+eval set -- "$TEMP"
+while true; do
+ case $1 in
+ -C|--connection-count)
+ CON_COUNT="$2"; shift; shift; continue
+ ;;
+ -P|--process-count)
+ PROCESS_COUNT="$2"; shift; shift; continue
+ ;;
+ -u|--create-unique-queues-topics)
+ UNIQUE_DEST="true"; shift; continue
+ ;;
+ --queue)
+ ADDRESS="$2;{create: always}"; shift; shift; continue
+ ;;
+ --topic)
+ ADDRESS="amq.topic/$2"; shift; shift; continue
+ ;;
+ --address)
+ ADDRESS="$2"; shift; shift; continue
+ ;;
+ -h|--help)
+ usage
+ exit 0
+ ;;
+ -a|--jvm-args)
+ EXTRA_JVM_ARGS="$2"; shift; shift; continue
+ ;;
+ -c|--msg-count)
+ MSG_COUNT="$2"; shift; shift; continue
+ ;;
+ --)
+ # no more arguments to parse
+ break
+ ;;
+ *)
+ # no more arguments to parse
+ break
+ ;;
+ esac
+done
+
+CONSUMER_ARGS="-server -Durl=amqp://guest:guest@clientid/testpath?brokerlist='tcp://localhost:5672' -Dprecision=mili -Dcon_count=$CON_COUNT -Dprint_std_dev=true"
+
+start_consumers()
+{
+ for ((i=0; i<$PROCESS_COUNT; i++))
+ do
+ if [ "$UNIQUE_DEST" = "true" ]; then
+ sh run-sub "$CONSUMER_ARGS $@" "${TEST_ID}_$i" > ${TEST_ID}_$i.sub.out 2>&1 &
+ else
+ sh run-sub "$CONSUMER_ARGS $@" > ${TEST_ID}_$i.sub.out 2>&1 &
+ fi
+ done
+}
+
+start_consumers "-Daddress=$ADDRESS -Duse_unique_dest=$UNIQUE_DEST -Dmsg_count=$MSG_COUNT -Dcon_count=$CON_COUNT $EXTRA_JVM_ARGS"
+
diff --git a/qpid/java/tools/bin/start-producers b/qpid/java/tools/bin/start-producers
new file mode 100644
index 0000000000..7ba0286f7c
--- /dev/null
+++ b/qpid/java/tools/bin/start-producers
@@ -0,0 +1,136 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# This starts the controller for coordinating perf tests/
+
+. check-qpid-java-env
+
+PROGRAM_NAME="start-producers"
+PROCESS_COUNT=1
+CON_COUNT=1
+MSG_TYPE="bytes"
+WARMUP_MSG_COUNT=1000
+MSG_COUNT=10000
+MSG_SIZE=1024
+ADDRESS="queue;{create:always}"
+UNIQUE_DEST="false"
+
+EXTRA_JVM_ARGS=""
+TEST_ID=`echo ${HOSTNAME} | awk -F . '{print $1}'`
+
+TEMP=$(getopt -n $PROGRAM_NAME -o C:P:uc:p:a:s:t:w:h\
+ --long connection-count:,process-count:,create-unique-queues-topics,\
+jvm-args:,queue:,topic:,address:,\
+msg-count:,msg-size:msg-type:,warmup-msg-count,help -- "$@")
+
+usage()
+{
+ printf "\n%s\n" "Usage: start-producers [option].."
+
+ printf "\n%32s\n%51s\n" "-C, --connection-count=count" "No of consumers participating in the test"
+
+ printf "\n%29s\n%51s\n" "-P, --process-count=count" "No of producers participating in the test"
+
+ printf "\n%37s\n%105s\n" "-u, --create-unique-queues-topics" "This will create unique queue names and topics based on what you specify for --queue or --topic"
+
+ printf "\n%11s\n%55s\n" "--queue" "The Queue you want to publish to. Ex my-queue"
+
+ printf "\n%11s\n%84s\n" "--topic" "The Topic you want to publish to in amq.topic exchange. Ex amq.topic/topic"
+
+ printf "\n%13s\n%44s\n" "--address" "The address you want to publish to"
+
+ printf "\n%23s\n%37s\n" "-s, --msg-size=size" "message size (default 1024)"
+
+ printf "\n%25s\n%50s\n" "-c, --msg-count=count" "message count per test (default 500,000)"
+
+ printf "\n%18s\n%38s\n" "-t, --msg-type" "{bytes|text} (default bytes)"
+
+ printf "\n%26s\n%49s\n" "-w, --warmup-msg-count" "warm up message count (default 100,000)"
+
+ printf "\n%18s\n%49s\n" "-a, --jvm-args" "Extra jvm arguments you want to specify"
+}
+
+eval set -- "$TEMP"
+while true; do
+ case $1 in
+ -C|--connection-count)
+ CON_COUNT="$2"; shift; shift; continue
+ ;;
+ -P|--process-count)
+ PROCESS_COUNT="$2"; shift; shift; continue
+ ;;
+ -u|--create-unique-queues-topics)
+ UNIQUE_DEST="true"; shift; continue
+ ;;
+ --queue)
+ ADDRESS="$2;{create: always}"; shift; shift; continue
+ ;;
+ --topic)
+ ADDRESS="amq.topic/$2"; shift; shift; continue
+ ;;
+ --address)
+ ADDRESS="$2"; shift; shift; continue
+ ;;
+ -h|--help)
+ usage
+ exit 0
+ ;;
+ -a|--jvm-args)
+ EXTRA_JVM_ARGS="$2"; shift; shift; continue
+ ;;
+ -s|--msg-size)
+ MSG_SIZE="$2"; shift; shift; continue
+ ;;
+ -c|--msg-count)
+ MSG_COUNT="$2"; shift; shift; continue
+ ;;
+ -t|--msg_type)
+ MSG_TYPE="$2"; shift; shift; continue
+ ;;
+ -w|--warmup-msg-count)
+ WARMUP_MSG_COUNT="$2"; shift; shift; continue
+ ;;
+ --)
+ # no more arguments to parse
+ break
+ ;;
+ *)
+ # no more arguments to parse
+ break
+ ;;
+ esac
+done
+
+PRODUCER_ARGS="-server -Durl=amqp://guest:guest@clientid/testpath?brokerlist='tcp://localhost:5672' -Dext_controller=true -Dprecision=mili -Dcon_count=$CON_COUNT"
+
+start_producers()
+{
+ for ((i=0; i<$PROCESS_COUNT; i++))
+ do
+ if [ "$UNIQUE_DEST" = "true" ]; then
+ sh run-pub "$PRODUCER_ARGS $@" "${TEST_ID}_$i" > ${TEST_ID}_$i.pub.out 2>&1 &
+ else
+ sh run-pub "$PRODUCER_ARGS $@" > ${TEST_ID}_$i.pub.out 2>&1 &
+ fi
+ done
+}
+
+start_producers "-Daddress=$ADDRESS -Duse_unique_dest=$UNIQUE_DEST -Dmsg_count=$MSG_COUNT -Dmsg_size=$MSG_SIZE -Dwarmup_count=$WARMUP_MSG_COUNT -Dmsg_type=$MSG_TYPE -Dcon_count=$CON_COUNT $EXTRA_JVM_ARGS"
+
diff --git a/qpid/java/tools/etc/perf-report.gnu b/qpid/java/tools/etc/perf-report.gnu
new file mode 100644
index 0000000000..6d5020efb5
--- /dev/null
+++ b/qpid/java/tools/etc/perf-report.gnu
@@ -0,0 +1,42 @@
+set terminal png
+set datafile separator ","
+
+set title "Variation of avg latency between iterations"
+set yrange [10:20]
+set xlabel "Iterations"
+set ylabel "Latency (ms)"
+set output "avg_latency.png"
+plot "stats-csv.log" using 9 title "avg latency" with lines, 14 title "target latency" with lines
+
+
+set title "Variation of max latency between iterations"
+set yrange [0:1000]
+set xlabel "Iterations"
+set ylabel "Latency (ms)"
+set output "max_latency.png"
+plot "stats-csv.log" using 11 title "max latency" with lines,14 title "target latency" with lines,100 title "100 ms" with lines
+
+
+set title "Variation of standard deviation of latency between iterations"
+set yrange [0:20]
+set xlabel "Iterations"
+set ylabel "Standard Deviation"
+set output "std_dev_latency.png"
+plot "stats-csv.log" using 12 title "standard deviation" with lines
+
+
+set title "Variation of system throughput between iterations"
+set yrange [400000:450000]
+set xlabel "Iterations"
+set ylabel "System Throuhgput (msg/sec)"
+set output "system_rate.png"
+plot "stats-csv.log" using 2 title "system throughput" with lines
+
+
+set title "Variation of avg producer & consumer rates between iterations"
+set yrange [6500:7500]
+set xlabel "Iterations"
+set ylabel "Avg Rates (msg/sec)"
+set output "prod_cons_rate.png"
+plot "stats-csv.log" using 6 title "producer rate" with lines,"stats-csv.log" using 3 title "consumer rate" with lines
+
diff --git a/qpid/java/tools/src/main/java/org/apache/qpid/tools/Clock.java b/qpid/java/tools/src/main/java/org/apache/qpid/tools/Clock.java
new file mode 100644
index 0000000000..37369959a8
--- /dev/null
+++ b/qpid/java/tools/src/main/java/org/apache/qpid/tools/Clock.java
@@ -0,0 +1,92 @@
+package org.apache.qpid.tools;
+
+/**
+ * In the future this will be replaced by a Clock abstraction
+ * that can utilize a realtime clock when running in RT Java.
+ */
+
+public class Clock
+{
+ private static Precision precision;
+ private static long offset = -1; // in nano secs
+
+ public enum Precision
+ {
+ NANO_SECS, MILI_SECS;
+
+ static Precision getPrecision(String str)
+ {
+ if ("mili".equalsIgnoreCase(str))
+ {
+ return MILI_SECS;
+ }
+ else
+ {
+ return NANO_SECS;
+ }
+ }
+ };
+
+ static
+ {
+ precision = Precision.getPrecision(System.getProperty("precision","mili"));
+ //offset = Long.getLong("offset",-1);
+
+ System.out.println("Using precision : " + precision + " and offset " + offset);
+ }
+
+ public static Precision getPrecision()
+ {
+ return precision;
+ }
+
+ public static long getTime()
+ {
+ if (precision == Precision.NANO_SECS)
+ {
+ if (offset == -1)
+ {
+ return System.nanoTime();
+ }
+ else
+ {
+ return System.nanoTime() + offset;
+ }
+ }
+ else
+ {
+ if (offset == -1)
+ {
+ return System.currentTimeMillis();
+ }
+ else
+ {
+ return System.currentTimeMillis() + offset/convertToMiliSecs();
+ }
+ }
+ }
+
+ public static long convertToSecs()
+ {
+ if (precision == Precision.NANO_SECS)
+ {
+ return 1000000000;
+ }
+ else
+ {
+ return 1000;
+ }
+ }
+
+ public static long convertToMiliSecs()
+ {
+ if (precision == Precision.NANO_SECS)
+ {
+ return 1000000;
+ }
+ else
+ {
+ return 1;
+ }
+ }
+}
diff --git a/qpid/java/tools/src/main/java/org/apache/qpid/tools/LatencyTest.java b/qpid/java/tools/src/main/java/org/apache/qpid/tools/LatencyTest.java
index b88b242e6d..90ee7e28ae 100644
--- a/qpid/java/tools/src/main/java/org/apache/qpid/tools/LatencyTest.java
+++ b/qpid/java/tools/src/main/java/org/apache/qpid/tools/LatencyTest.java
@@ -77,7 +77,7 @@ public class LatencyTest extends PerfBase implements MessageListener
public LatencyTest()
{
- super();
+ super("");
warmedUp = lock.newCondition();
testCompleted = lock.newCondition();
// Storing the following two for efficiency
@@ -314,7 +314,7 @@ public class LatencyTest extends PerfBase implements MessageListener
public static void main(String[] args)
{
- final LatencyTest latencyTest = new LatencyTest();
+ final LatencyTest latencyTest = new LatencyTest();
Runnable r = new Runnable()
{
public void run()
@@ -334,16 +334,16 @@ public class LatencyTest extends PerfBase implements MessageListener
}
}
};
-
+
Thread t;
try
{
- t = Threading.getThreadFactory().createThread(r);
+ t = Threading.getThreadFactory().createThread(r);
}
catch(Exception e)
{
throw new Error("Error creating latency test thread",e);
}
- t.start();
+ t.start();
}
-} \ No newline at end of file
+}
diff --git a/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfBase.java b/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfBase.java
index ac597d17de..121e94cea1 100644
--- a/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfBase.java
+++ b/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfBase.java
@@ -20,36 +20,113 @@
*/
package org.apache.qpid.tools;
+import java.net.InetAddress;
import java.text.DecimalFormat;
-import java.util.Hashtable;
+import java.util.UUID;
import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
import javax.jms.Destination;
+import javax.jms.MapMessage;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
import javax.jms.Session;
-import javax.naming.Context;
-import javax.naming.InitialContext;
import org.apache.qpid.client.AMQAnyDestination;
import org.apache.qpid.client.AMQConnection;
+import org.apache.qpid.client.AMQDestination;
+import org.apache.qpid.client.AMQSession_0_10;
+import org.apache.qpid.framing.AMQShortString;
+import org.apache.qpid.messaging.Address;
public class PerfBase
{
+ public final static String CODE = "CODE";
+ public final static String ID = "ID";
+ public final static String REPLY_ADDR = "REPLY_ADDR";
+ public final static String MAX_LATENCY = "MAX_LATENCY";
+ public final static String MIN_LATENCY = "MIN_LATENCY";
+ public final static String AVG_LATENCY = "AVG_LATENCY";
+ public final static String STD_DEV = "STD_DEV";
+ public final static String CONS_RATE = "CONS_RATE";
+ public final static String PROD_RATE = "PROD_RATE";
+ public final static String MSG_COUNT = "MSG_COUNT";
+ public final static String TIMESTAMP = "Timestamp";
+
+ String CONTROLLER_ADDR = System.getProperty("CONT_ADDR","CONTROLLER;{create: always, node:{x-declare:{auto-delete:true}}}");
+
TestParams params;
Connection con;
Session session;
+ Session controllerSession;
Destination dest;
- Destination feedbackDest;
+ Destination myControlQueue;
+ Destination controllerQueue;
DecimalFormat df = new DecimalFormat("###.##");
+ String id;
+ String myControlQueueAddr;
+
+ MessageProducer sendToController;
+ MessageConsumer receiveFromController;
+ String prefix = "";
- public PerfBase()
+ enum OPCode {
+ REGISTER_CONSUMER, REGISTER_PRODUCER,
+ PRODUCER_STARTWARMUP, CONSUMER_STARTWARMUP,
+ CONSUMER_READY, PRODUCER_READY,
+ PRODUCER_START,
+ RECEIVED_END_MSG, CONSUMER_STOP,
+ RECEIVED_PRODUCER_STATS, RECEIVED_CONSUMER_STATS,
+ CONTINUE_TEST, STOP_TEST
+ };
+
+ enum MessageType {
+ BYTES, TEXT, MAP, OBJECT;
+
+ public static MessageType getType(String s) throws Exception
+ {
+ if ("text".equalsIgnoreCase(s))
+ {
+ return TEXT;
+ }
+ else if ("bytes".equalsIgnoreCase(s))
+ {
+ return BYTES;
+ }
+ /*else if ("map".equalsIgnoreCase(s))
+ {
+ return MAP;
+ }
+ else if ("object".equalsIgnoreCase(s))
+ {
+ return OBJECT;
+ }*/
+ else
+ {
+ throw new Exception("Unsupported message type");
+ }
+ }
+ };
+
+ MessageType msgType = MessageType.BYTES;
+
+ public PerfBase(String prefix)
{
params = new TestParams();
+ String host = "";
+ try
+ {
+ host = InetAddress.getLocalHost().getHostName();
+ }
+ catch (Exception e)
+ {
+ }
+ id = host + "-" + UUID.randomUUID().toString();
+ this.prefix = prefix;
+ this.myControlQueueAddr = id + ";{create: always}";
}
public void setUp() throws Exception
- {
-
+ {
if (params.getHost().equals("") || params.getPort() == -1)
{
con = new AMQConnection(params.getUrl());
@@ -62,7 +139,78 @@ public class PerfBase
session = con.createSession(params.isTransacted(),
params.isTransacted()? Session.SESSION_TRANSACTED:params.getAckMode());
- dest = new AMQAnyDestination(params.getAddress());
+ controllerSession = con.createSession(false, Session.AUTO_ACKNOWLEDGE);
+
+ dest = createDestination();
+ controllerQueue = new AMQAnyDestination(CONTROLLER_ADDR);
+ myControlQueue = session.createQueue(myControlQueueAddr);
+ msgType = MessageType.getType(params.getMessageType());
+ System.out.println("Using " + msgType + " messages");
+
+ sendToController = controllerSession.createProducer(controllerQueue);
+ receiveFromController = controllerSession.createConsumer(myControlQueue);
+ }
+
+ private Destination createDestination() throws Exception
+ {
+ if (params.isUseUniqueDests())
+ {
+ System.out.println("Prefix : " + prefix);
+ Address addr = Address.parse(params.getAddress());
+ AMQAnyDestination temp = new AMQAnyDestination(params.getAddress());
+ int type = ((AMQSession_0_10)session).resolveAddressType(temp);
+
+ if ( type == AMQDestination.TOPIC_TYPE)
+ {
+ addr = new Address(addr.getName(),addr.getSubject() + "." + prefix,addr.getOptions());
+ System.out.println("Setting subject : " + addr);
+ }
+ else
+ {
+ addr = new Address(addr.getName() + "_" + prefix,addr.getSubject(),addr.getOptions());
+ System.out.println("Setting name : " + addr);
+ }
+
+ return new AMQAnyDestination(addr);
+ }
+ else
+ {
+ return new AMQAnyDestination(params.getAddress());
+ }
+ }
+
+ public synchronized void sendMessageToController(MapMessage m) throws Exception
+ {
+ m.setString(ID, id);
+ m.setString(REPLY_ADDR,myControlQueueAddr);
+ sendToController.send(m);
+ }
+
+ public void receiveFromController(OPCode expected) throws Exception
+ {
+ MapMessage m = (MapMessage)receiveFromController.receive();
+ OPCode code = OPCode.values()[m.getInt(CODE)];
+ System.out.println("Received Code : " + code);
+ if (expected != code)
+ {
+ throw new Exception("Expected OPCode : " + expected + " but received : " + code);
+ }
+
+ }
+
+ public boolean continueTest() throws Exception
+ {
+ MapMessage m = (MapMessage)receiveFromController.receive();
+ OPCode code = OPCode.values()[m.getInt(CODE)];
+ System.out.println("Received Code : " + code);
+ return (code == OPCode.CONTINUE_TEST);
+ }
+
+ public void tearDown() throws Exception
+ {
+ session.close();
+ controllerSession.close();
+ con.close();
}
public void handleError(Exception e,String msg)
diff --git a/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfConsumer.java b/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfConsumer.java
index 0ef0455a64..b63892bb51 100644
--- a/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfConsumer.java
+++ b/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfConsumer.java
@@ -20,13 +20,17 @@
*/
package org.apache.qpid.tools;
-import javax.jms.Destination;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+
+import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageListener;
-import javax.jms.MessageProducer;
import javax.jms.TextMessage;
+import org.apache.qpid.client.AMQDestination;
import org.apache.qpid.thread.Threading;
/**
@@ -47,7 +51,7 @@ import org.apache.qpid.thread.Threading;
* b) They are on separate machines that have their time synced via a Time Server
*
* In order to calculate latency the producer inserts a timestamp
- * hen the message is sent. The consumer will note the current time the message is
+ * when the message is sent. The consumer will note the current time the message is
* received and will calculate the latency as follows
* latency = rcvdTime - msg.getJMSTimestamp()
*
@@ -55,13 +59,9 @@ import org.apache.qpid.thread.Threading;
* variance in latencies.
*
* Avg latency is measured by adding all latencies and dividing by the total msgs.
- * You can also compute this by (rcvdTime - testStartTime)/rcvdMsgCount
*
* Throughput
* ===========
- * System throughput is calculated as follows
- * rcvdMsgCount/(rcvdTime - testStartTime)
- *
* Consumer rate is calculated as
* rcvdMsgCount/(rcvdTime - startTime)
*
@@ -81,130 +81,160 @@ public class PerfConsumer extends PerfBase implements MessageListener
long minLatency = Long.MAX_VALUE;
long totalLatency = 0; // to calculate avg latency.
int rcvdMsgCount = 0;
- long testStartTime = 0; // to measure system throughput
long startTime = 0; // to measure consumer throughput
long rcvdTime = 0;
boolean transacted = false;
int transSize = 0;
+ boolean printStdDev = false;
+ List<Long> sample;
+
final Object lock = new Object();
- public PerfConsumer()
+ public PerfConsumer(String prefix)
{
- super();
+ super(prefix);
+ System.out.println("Consumer ID : " + id);
}
public void setUp() throws Exception
{
super.setUp();
consumer = session.createConsumer(dest);
+ System.out.println("Consumer: " + id + " Receiving messages from : " + ((AMQDestination)dest).getQueueName() + "\n");
// Storing the following two for efficiency
transacted = params.isTransacted();
transSize = params.getTransactionSize();
+ printStdDev = params.isPrintStdDev();
+ MapMessage m = controllerSession.createMapMessage();
+ m.setInt(CODE, OPCode.REGISTER_CONSUMER.ordinal());
+ sendMessageToController(m);
}
public void warmup()throws Exception
{
- System.out.println("Warming up......");
-
- boolean start = false;
- while (!start)
+ receiveFromController(OPCode.CONSUMER_STARTWARMUP);
+ Message msg = consumer.receive();
+ // This is to ensure we drain the queue before we start the actual test.
+ while ( msg != null)
{
- Message msg = consumer.receive();
- if (msg instanceof TextMessage)
+ if (msg.getBooleanProperty("End") == true)
{
- if (((TextMessage)msg).getText().equals("End"))
- {
- start = true;
- MessageProducer temp = session.createProducer(msg.getJMSReplyTo());
- temp.send(session.createMessage());
- if (params.isTransacted())
- {
- session.commit();
- }
- temp.close();
- }
+ // It's more realistic for the consumer to signal this.
+ MapMessage m = controllerSession.createMapMessage();
+ m.setInt(CODE, OPCode.PRODUCER_READY.ordinal());
+ sendMessageToController(m);
}
+ msg = consumer.receive(1000);
+ }
+
+ if (params.isTransacted())
+ {
+ session.commit();
}
+
+ MapMessage m = controllerSession.createMapMessage();
+ m.setInt(CODE, OPCode.CONSUMER_READY.ordinal());
+ sendMessageToController(m);
+ consumer.setMessageListener(this);
}
public void startTest() throws Exception
{
- System.out.println("Starting test......");
- consumer.setMessageListener(this);
+ System.out.println("Consumer: " + id + " Starting test......" + "\n");
+ resetCounters();
}
- public void printResults() throws Exception
+ public void resetCounters()
{
- synchronized (lock)
+ rcvdMsgCount = 0;
+ maxLatency = 0;
+ minLatency = Long.MAX_VALUE;
+ totalLatency = 0;
+ if (printStdDev)
{
- lock.wait();
+ sample = null;
+ sample = new ArrayList<Long>(params.getMsgCount());
}
+ }
+
+ public void sendResults() throws Exception
+ {
+ receiveFromController(OPCode.CONSUMER_STOP);
double avgLatency = (double)totalLatency/(double)rcvdMsgCount;
- double throughput = ((double)rcvdMsgCount/(double)(rcvdTime - testStartTime))*1000;
- double consRate = ((double)rcvdMsgCount/(double)(rcvdTime - startTime))*1000;
+ double consRate = (double)rcvdMsgCount*Clock.convertToSecs()/(double)(rcvdTime - startTime);
+ double stdDev = 0.0;
+ if (printStdDev)
+ {
+ stdDev = calculateStdDev(avgLatency);
+ }
+ MapMessage m = controllerSession.createMapMessage();
+ m.setInt(CODE, OPCode.RECEIVED_CONSUMER_STATS.ordinal());
+ m.setDouble(AVG_LATENCY, avgLatency/Clock.convertToMiliSecs());
+ m.setDouble(MIN_LATENCY,minLatency/Clock.convertToMiliSecs());
+ m.setDouble(MAX_LATENCY,maxLatency/Clock.convertToMiliSecs());
+ m.setDouble(STD_DEV, stdDev/Clock.convertToMiliSecs());
+ m.setDouble(CONS_RATE, consRate);
+ m.setLong(MSG_COUNT, rcvdMsgCount);
+ sendMessageToController(m);
+
System.out.println(new StringBuilder("Total Msgs Received : ").append(rcvdMsgCount).toString());
System.out.println(new StringBuilder("Consumer rate : ").
append(df.format(consRate)).
append(" msg/sec").toString());
- System.out.println(new StringBuilder("System Throughput : ").
- append(df.format(throughput)).
- append(" msg/sec").toString());
System.out.println(new StringBuilder("Avg Latency : ").
- append(df.format(avgLatency)).
+ append(df.format(avgLatency/Clock.convertToMiliSecs())).
append(" ms").toString());
System.out.println(new StringBuilder("Min Latency : ").
- append(minLatency).
+ append(df.format(minLatency/Clock.convertToMiliSecs())).
append(" ms").toString());
System.out.println(new StringBuilder("Max Latency : ").
- append(maxLatency).
+ append(df.format(maxLatency/Clock.convertToMiliSecs())).
append(" ms").toString());
- System.out.println("Completed the test......\n");
- }
-
- public void notifyCompletion(Destination replyTo) throws Exception
- {
- MessageProducer tmp = session.createProducer(replyTo);
- Message endMsg = session.createMessage();
- tmp.send(endMsg);
- if (params.isTransacted())
+ if (printStdDev)
{
- session.commit();
+ System.out.println(new StringBuilder("Std Dev : ").
+ append(stdDev/Clock.convertToMiliSecs()).toString());
}
- tmp.close();
}
- public void tearDown() throws Exception
+ public double calculateStdDev(double mean)
{
- consumer.close();
- session.close();
- con.close();
+ double v = 0;
+ for (double latency: sample)
+ {
+ v = v + Math.pow((latency-mean), 2);
+ }
+ v = v/sample.size();
+ return Math.round(Math.sqrt(v));
}
public void onMessage(Message msg)
{
try
{
- if (msg instanceof TextMessage && ((TextMessage)msg).getText().equals("End"))
+ // To figure out the decoding overhead of text
+ if (msgType == MessageType.TEXT)
{
- notifyCompletion(msg.getJMSReplyTo());
+ ((TextMessage)msg).getText();
+ }
- synchronized (lock)
- {
- lock.notifyAll();
- }
+ if (msg.getBooleanProperty("End"))
+ {
+ MapMessage m = controllerSession.createMapMessage();
+ m.setInt(CODE, OPCode.RECEIVED_END_MSG.ordinal());
+ sendMessageToController(m);
}
else
{
- rcvdTime = System.currentTimeMillis();
+ rcvdTime = Clock.getTime();
rcvdMsgCount ++;
if (rcvdMsgCount == 1)
{
startTime = rcvdTime;
- testStartTime = msg.getJMSTimestamp();
}
if (transacted && (rcvdMsgCount % transSize == 0))
@@ -212,10 +242,14 @@ public class PerfConsumer extends PerfBase implements MessageListener
session.commit();
}
- long latency = rcvdTime - msg.getJMSTimestamp();
+ long latency = rcvdTime - msg.getLongProperty(TIMESTAMP);
maxLatency = Math.max(maxLatency, latency);
minLatency = Math.min(minLatency, latency);
totalLatency = totalLatency + latency;
+ if (printStdDev)
+ {
+ sample.add(latency);
+ }
}
}
@@ -226,14 +260,21 @@ public class PerfConsumer extends PerfBase implements MessageListener
}
- public void test()
+ public void run()
{
try
{
setUp();
warmup();
- startTest();
- printResults();
+ boolean nextIteration = true;
+ while (nextIteration)
+ {
+ System.out.println("=========================================================\n");
+ System.out.println("Consumer: " + id + " starting a new iteration ......\n");
+ startTest();
+ sendResults();
+ nextIteration = continueTest();
+ }
tearDown();
}
catch(Exception e)
@@ -242,26 +283,43 @@ public class PerfConsumer extends PerfBase implements MessageListener
}
}
- public static void main(String[] args)
+ @Override
+ public void tearDown() throws Exception
+ {
+ super.tearDown();
+ }
+
+ public static void main(String[] args) throws InterruptedException
{
- final PerfConsumer cons = new PerfConsumer();
- Runnable r = new Runnable()
+ String scriptId = (args.length == 1) ? args[0] : "";
+ int conCount = Integer.getInteger("con_count",1);
+ final CountDownLatch testCompleted = new CountDownLatch(conCount);
+ for (int i=0; i < conCount; i++)
{
- public void run()
+
+ final PerfConsumer cons = new PerfConsumer(scriptId + i);
+ Runnable r = new Runnable()
{
- cons.test();
+ public void run()
+ {
+ cons.run();
+ testCompleted.countDown();
+ }
+ };
+
+ Thread t;
+ try
+ {
+ t = Threading.getThreadFactory().createThread(r);
}
- };
-
- Thread t;
- try
- {
- t = Threading.getThreadFactory().createThread(r);
- }
- catch(Exception e)
- {
- throw new Error("Error creating consumer thread",e);
+ catch(Exception e)
+ {
+ throw new Error("Error creating consumer thread",e);
+ }
+ t.start();
+
}
- t.start();
+ testCompleted.await();
+ System.out.println("Consumers have completed the test......\n");
}
} \ No newline at end of file
diff --git a/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfProducer.java b/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfProducer.java
index 6172a95c3d..ac6129ab68 100644
--- a/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfProducer.java
+++ b/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfProducer.java
@@ -23,13 +23,15 @@ package org.apache.qpid.tools;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
+import java.util.concurrent.CountDownLatch;
import javax.jms.BytesMessage;
import javax.jms.DeliveryMode;
+import javax.jms.MapMessage;
import javax.jms.Message;
-import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
+import org.apache.qpid.client.AMQDestination;
import org.apache.qpid.thread.Threading;
/**
@@ -51,9 +53,17 @@ import org.apache.qpid.thread.Threading;
* System throughput and latencies calculated by the PerfConsumer are more realistic
* numbers.
*
+ * Answer by rajith : I agree about in memory buffering affecting rates. But Based on test runs
+ * I have done so far, it seems quite useful to compute the producer rate as it gives an
+ * indication of how the system behaves. For ex if there is a gap between producer and consumer rates
+ * you could clearly see the higher latencies and when producer and consumer rates are very close,
+ * latency is good.
+ *
*/
public class PerfProducer extends PerfBase
{
+ private static long SEC = 60000;
+
MessageProducer producer;
Message msg;
Object payload;
@@ -63,51 +73,25 @@ public class PerfProducer extends PerfBase
boolean durable = false;
Random random;
int msgSizeRange = 1024;
+ boolean rateLimitProducer = false;
+ double rateFactor = 0.4;
+ double rate = 0.0;
- enum MessageType {
- BYTES, TEXT, MAP, OBJECT;
-
- public static MessageType getType(String s) throws Exception
- {
- if ("text".equalsIgnoreCase(s))
- {
- return TEXT;
- }
- else if ("bytes".equalsIgnoreCase(s))
- {
- return BYTES;
- }
- /*else if ("map".equalsIgnoreCase(s))
- {
- return MAP;
- }
- else if ("object".equalsIgnoreCase(s))
- {
- return OBJECT;
- }*/
- else
- {
- throw new Exception("Unsupported message type");
- }
- }
- };
-
- MessageType msgType = MessageType.BYTES;
-
- public PerfProducer()
+ public PerfProducer(String prefix)
{
- super();
+ super(prefix);
+ System.out.println("Producer ID : " + id);
}
public void setUp() throws Exception
{
super.setUp();
- feedbackDest = session.createTemporaryQueue();
-
durable = params.isDurable();
- msgType = MessageType.getType(params.getMessageType());
-
- System.out.println("Using " + msgType + " messages");
+ rateLimitProducer = params.getRate() > 0 ? true : false;
+ if (rateLimitProducer)
+ {
+ System.out.println("The test will attempt to limit the producer to " + params.getRate() + " msg/sec");
+ }
// if message caching is enabled we pre create the message
// else we pre create the payload
@@ -138,8 +122,13 @@ public class PerfProducer extends PerfBase
}
producer = session.createProducer(dest);
+ System.out.println("Producer: " + id + " Sending messages to: " + ((AMQDestination)dest).getQueueName());
producer.setDisableMessageID(params.isDisableMessageID());
producer.setDisableMessageTimestamp(params.isDisableTimestamp());
+
+ MapMessage m = controllerSession.createMapMessage();
+ m.setInt(CODE, OPCode.REGISTER_PRODUCER.ordinal());
+ sendMessageToController(m);
}
Object createPayload(int size)
@@ -168,7 +157,6 @@ public class PerfProducer extends PerfBase
}
}
-
protected Message getNextMessage() throws Exception
{
if (cacheMsg)
@@ -197,96 +185,109 @@ public class PerfProducer extends PerfBase
public void warmup()throws Exception
{
- System.out.println("Warming up......");
- MessageConsumer tmp = session.createConsumer(feedbackDest);
+ receiveFromController(OPCode.PRODUCER_STARTWARMUP);
+ System.out.println("Producer: " + id + " Warming up......");
for (int i=0; i < params.getWarmupCount() -1; i++)
{
producer.send(getNextMessage());
}
- Message msg = session.createTextMessage("End");
- msg.setJMSReplyTo(feedbackDest);
- producer.send(msg);
-
- if (params.isTransacted())
- {
- session.commit();
- }
-
- tmp.receive();
+ sendEndMessage();
if (params.isTransacted())
{
session.commit();
}
-
- tmp.close();
}
public void startTest() throws Exception
{
- System.out.println("Starting test......");
+ resetCounters();
+ receiveFromController(OPCode.PRODUCER_START);
int count = params.getMsgCount();
boolean transacted = params.isTransacted();
int tranSize = params.getTransactionSize();
- long start = System.currentTimeMillis();
+ long limit = (long)(params.getRate() * rateFactor); // in msecs
+ long timeLimit = (long)(SEC * rateFactor); // in msecs
+
+ long start = Clock.getTime(); // defaults to nano secs
+ long interval = start;
for(int i=0; i < count; i++ )
{
Message msg = getNextMessage();
- msg.setJMSTimestamp(System.currentTimeMillis());
+ msg.setLongProperty(TIMESTAMP, Clock.getTime());
producer.send(msg);
if ( transacted && ((i+1) % tranSize == 0))
{
session.commit();
}
+
+ if (rateLimitProducer && i%limit == 0)
+ {
+ long elapsed = (Clock.getTime() - interval)*Clock.convertToMiliSecs(); // in msecs
+ if (elapsed < timeLimit)
+ {
+ Thread.sleep(elapsed);
+ }
+ interval = Clock.getTime();
+
+ }
}
- long time = System.currentTimeMillis() - start;
- double rate = ((double)count/(double)time)*1000;
+ sendEndMessage();
+ if ( transacted)
+ {
+ session.commit();
+ }
+ long time = Clock.getTime() - start;
+ rate = (double)count*Clock.convertToSecs()/(double)time;
System.out.println(new StringBuilder("Producer rate: ").
append(df.format(rate)).
append(" msg/sec").
toString());
}
- public void waitForCompletion() throws Exception
+ public void resetCounters()
{
- MessageConsumer tmp = session.createConsumer(feedbackDest);
- Message msg = session.createTextMessage("End");
- msg.setJMSReplyTo(feedbackDest);
- producer.send(msg);
- if (params.isTransacted())
- {
- session.commit();
- }
-
- tmp.receive();
+ }
- if (params.isTransacted())
- {
- session.commit();
- }
+ public void sendEndMessage() throws Exception
+ {
+ Message msg = session.createMessage();
+ msg.setBooleanProperty("End", true);
+ producer.send(msg);
+ }
- tmp.close();
- System.out.println("Consumer has completed the test......");
+ public void sendResults() throws Exception
+ {
+ MapMessage msg = controllerSession.createMapMessage();
+ msg.setInt(CODE, OPCode.RECEIVED_PRODUCER_STATS.ordinal());
+ msg.setDouble(PROD_RATE, rate);
+ sendMessageToController(msg);
}
+ @Override
public void tearDown() throws Exception
{
- producer.close();
- session.close();
- con.close();
+ super.tearDown();
}
- public void test()
+ public void run()
{
try
{
setUp();
warmup();
- startTest();
- waitForCompletion();
+ boolean nextIteration = true;
+ while (nextIteration)
+ {
+ System.out.println("=========================================================\n");
+ System.out.println("Producer: " + id + " starting a new iteration ......\n");
+ startTest();
+ sendResults();
+ nextIteration = continueTest();
+ }
tearDown();
}
catch(Exception e)
@@ -295,27 +296,63 @@ public class PerfProducer extends PerfBase
}
}
-
- public static void main(String[] args)
+ public void startControllerIfNeeded()
{
- final PerfProducer prod = new PerfProducer();
- Runnable r = new Runnable()
+ if (!params.isExternalController())
{
- public void run()
+ final PerfTestController controller = new PerfTestController();
+ Runnable r = new Runnable()
+ {
+ public void run()
+ {
+ controller.run();
+ }
+ };
+
+ Thread t;
+ try
{
- prod.test();
+ t = Threading.getThreadFactory().createThread(r);
}
- };
-
- Thread t;
- try
- {
- t = Threading.getThreadFactory().createThread(r);
+ catch(Exception e)
+ {
+ throw new Error("Error creating controller thread",e);
+ }
+ t.start();
}
- catch(Exception e)
+ }
+
+
+ public static void main(String[] args) throws InterruptedException
+ {
+ String scriptId = (args.length == 1) ? args[0] : "";
+ int conCount = Integer.getInteger("con_count",1);
+ final CountDownLatch testCompleted = new CountDownLatch(conCount);
+ for (int i=0; i < conCount; i++)
{
- throw new Error("Error creating producer thread",e);
+ final PerfProducer prod = new PerfProducer(scriptId + i);
+ prod.startControllerIfNeeded();
+ Runnable r = new Runnable()
+ {
+ public void run()
+ {
+ prod.run();
+ testCompleted.countDown();
+ }
+ };
+
+ Thread t;
+ try
+ {
+ t = Threading.getThreadFactory().createThread(r);
+ }
+ catch(Exception e)
+ {
+ throw new Error("Error creating producer thread",e);
+ }
+ t.start();
}
- t.start();
+ testCompleted.await();
+ System.out.println("Producers have completed the test......");
}
} \ No newline at end of file
diff --git a/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfTestController.java b/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfTestController.java
new file mode 100644
index 0000000000..5c98c645f4
--- /dev/null
+++ b/qpid/java/tools/src/main/java/org/apache/qpid/tools/PerfTestController.java
@@ -0,0 +1,422 @@
+package org.apache.qpid.tools;
+
+import java.io.FileWriter;
+import java.util.Collection;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CountDownLatch;
+
+import javax.jms.MapMessage;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageListener;
+import javax.jms.MessageProducer;
+
+import org.apache.qpid.client.message.AMQPEncodedMapMessage;
+
+/**
+ * The Controller coordinates a test run between a number
+ * of producers and consumers, configured via -Dprod_count and -Dcons_count.
+ *
+ * It waits till all the producers and consumers have registered and then
+ * conducts a warmup run. Once all consumers and producers have completed
+ * the warmup run and is ready, it will conduct the actual test run and
+ * collect all stats from the participants and calculates the system
+ * throughput, the avg/min/max for producer rates, consumer rates and latency.
+ *
+ * These stats are then printed to std out.
+ * The Controller also prints events to std out to give a running account
+ * of the test run in progress. Ex registering of participants, starting warmup ..etc.
+ * This allows a scripting tool to monitor the progress.
+ *
+ * The Controller can be run in two modes.
+ * 1. A single test run (default) where it just runs until the message count specified
+ * for the producers via -Dmsg_count is sent and received.
+ *
+ * 2. Time based, configured via -Dduration=x, where x is in mins.
+ * In this mode, the Controller repeatedly cycles through the tests (after an initial
+ * warmup run) until the desired time is reached. If a test run is in progress
+ * and the time is up, it will allow the run the complete.
+ *
+ * After each iteration, the stats will be printed out in csv format to a separate log file.
+ * System throughput is calculated as follows
+ * totalMsgCount/(totalTestTime)
+ */
+public class PerfTestController extends PerfBase implements MessageListener
+{
+ enum TestMode { SINGLE_RUN, TIME_BASED };
+
+ TestMode testMode = TestMode.SINGLE_RUN;
+
+ long totalTestTime;
+
+ private double avgSystemLatency = 0.0;
+ private double minSystemLatency = Double.MAX_VALUE;
+ private double maxSystemLatency = 0;
+ private double avgSystemLatencyStdDev = 0.0;
+
+ private double avgSystemConsRate = 0.0;
+ private double maxSystemConsRate = 0.0;
+ private double minSystemConsRate = Double.MAX_VALUE;
+
+ private double avgSystemProdRate = 0.0;
+ private double maxSystemProdRate = 0.0;
+ private double minSystemProdRate = Double.MAX_VALUE;
+
+ private long totalMsgCount = 0;
+ private double totalSystemThroughput = 0.0;
+
+ private int consumerCount = Integer.getInteger("cons_count", 1);
+ private int producerCount = Integer.getInteger("prod_count", 1);
+ private int duration = Integer.getInteger("duration", -1); // in mins
+ private Map<String,MapMessage> consumers;
+ private Map<String,MapMessage> producers;
+
+ private CountDownLatch consRegistered;
+ private CountDownLatch prodRegistered;
+ private CountDownLatch consReady;
+ private CountDownLatch prodReady;
+ private CountDownLatch receivedEndMsg;
+ private CountDownLatch receivedConsStats;
+ private CountDownLatch receivedProdStats;
+
+ private MessageConsumer consumer;
+ private boolean printStdDev = false;
+ FileWriter writer;
+
+ public PerfTestController()
+ {
+ super("");
+ consumers = new ConcurrentHashMap<String,MapMessage>(consumerCount);
+ producers = new ConcurrentHashMap<String,MapMessage>(producerCount);
+
+ consRegistered = new CountDownLatch(consumerCount);
+ prodRegistered = new CountDownLatch(producerCount);
+ consReady = new CountDownLatch(consumerCount);
+ prodReady = new CountDownLatch(producerCount);
+ printStdDev = params.isPrintStdDev();
+ testMode = (duration == -1) ? TestMode.SINGLE_RUN : TestMode.TIME_BASED;
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ if (testMode == TestMode.TIME_BASED)
+ {
+ writer = new FileWriter("stats-csv.log");
+ }
+ consumer = controllerSession.createConsumer(controllerQueue);
+ System.out.println("\nController: " + producerCount + " producers are expected");
+ System.out.println("Controller: " + consumerCount + " consumers are expected \n");
+ consumer.setMessageListener(this);
+ consRegistered.await();
+ prodRegistered.await();
+ System.out.println("\nController: All producers and consumers have registered......\n");
+ }
+
+ public void warmup() throws Exception
+ {
+ System.out.println("Controller initiating warm up sequence......");
+ sendMessageToNodes(OPCode.CONSUMER_STARTWARMUP,consumers.values());
+ sendMessageToNodes(OPCode.PRODUCER_STARTWARMUP,producers.values());
+ prodReady.await();
+ consReady.await();
+ System.out.println("\nController : All producers and consumers are ready to start the test......\n");
+ }
+
+ public void startTest() throws Exception
+ {
+ resetCounters();
+ System.out.println("\nController Starting test......");
+ long start = Clock.getTime();
+ sendMessageToNodes(OPCode.PRODUCER_START,producers.values());
+ receivedEndMsg.await();
+ totalTestTime = Clock.getTime() - start;
+ sendMessageToNodes(OPCode.CONSUMER_STOP,consumers.values());
+ receivedProdStats.await();
+ receivedConsStats.await();
+ }
+
+ public void resetCounters()
+ {
+ minSystemLatency = Double.MAX_VALUE;
+ maxSystemLatency = 0;
+ maxSystemConsRate = 0.0;
+ minSystemConsRate = Double.MAX_VALUE;
+ maxSystemProdRate = 0.0;
+ minSystemProdRate = Double.MAX_VALUE;
+
+ totalMsgCount = 0;
+
+ receivedConsStats = new CountDownLatch(consumerCount);
+ receivedProdStats = new CountDownLatch(producerCount);
+ receivedEndMsg = new CountDownLatch(producerCount);
+ }
+
+ public void calcStats() throws Exception
+ {
+ double totLatency = 0.0;
+ double totStdDev = 0.0;
+ double totalConsRate = 0.0;
+ double totalProdRate = 0.0;
+
+ MapMessage conStat = null; // for error handling
+ try
+ {
+ for (MapMessage m: consumers.values())
+ {
+ conStat = m;
+ minSystemLatency = Math.min(minSystemLatency,m.getDouble(MIN_LATENCY));
+ maxSystemLatency = Math.max(maxSystemLatency,m.getDouble(MAX_LATENCY));
+ totLatency = totLatency + m.getDouble(AVG_LATENCY);
+ totStdDev = totStdDev + m.getDouble(STD_DEV);
+
+ minSystemConsRate = Math.min(minSystemConsRate,m.getDouble(CONS_RATE));
+ maxSystemConsRate = Math.max(maxSystemConsRate,m.getDouble(CONS_RATE));
+ totalConsRate = totalConsRate + m.getDouble(CONS_RATE);
+
+ totalMsgCount = totalMsgCount + m.getLong(MSG_COUNT);
+ }
+ }
+ catch(Exception e)
+ {
+ System.out.println("Error calculating stats from Consumer : " + conStat);
+ }
+
+
+ MapMessage prodStat = null; // for error handling
+ try
+ {
+ for (MapMessage m: producers.values())
+ {
+ prodStat = m;
+ minSystemProdRate = Math.min(minSystemProdRate,m.getDouble(PROD_RATE));
+ maxSystemProdRate = Math.max(maxSystemProdRate,m.getDouble(PROD_RATE));
+ totalProdRate = totalProdRate + m.getDouble(PROD_RATE);
+ }
+ }
+ catch(Exception e)
+ {
+ System.out.println("Error calculating stats from Producer : " + conStat);
+ }
+
+ avgSystemLatency = totLatency/consumers.size();
+ avgSystemLatencyStdDev = totStdDev/consumers.size();
+ avgSystemConsRate = totalConsRate/consumers.size();
+ avgSystemProdRate = totalProdRate/producers.size();
+
+ System.out.println("Total test time : " + totalTestTime + " in " + Clock.getPrecision());
+
+ totalSystemThroughput = (totalMsgCount*Clock.convertToSecs()/totalTestTime);
+ }
+
+ public void printResults() throws Exception
+ {
+ System.out.println(new StringBuilder("Total Msgs Received : ").append(totalMsgCount).toString());
+ System.out.println(new StringBuilder("System Throughput : ").
+ append(df.format(totalSystemThroughput)).
+ append(" msg/sec").toString());
+ System.out.println(new StringBuilder("Avg Consumer rate : ").
+ append(df.format(avgSystemConsRate)).
+ append(" msg/sec").toString());
+ System.out.println(new StringBuilder("Min Consumer rate : ").
+ append(df.format(minSystemConsRate)).
+ append(" msg/sec").toString());
+ System.out.println(new StringBuilder("Max Consumer rate : ").
+ append(df.format(maxSystemConsRate)).
+ append(" msg/sec").toString());
+
+ System.out.println(new StringBuilder("Avg Producer rate : ").
+ append(df.format(avgSystemProdRate)).
+ append(" msg/sec").toString());
+ System.out.println(new StringBuilder("Min Producer rate : ").
+ append(df.format(minSystemProdRate)).
+ append(" msg/sec").toString());
+ System.out.println(new StringBuilder("Max Producer rate : ").
+ append(df.format(maxSystemProdRate)).
+ append(" msg/sec").toString());
+
+ System.out.println(new StringBuilder("Avg System Latency : ").
+ append(df.format(avgSystemLatency)).
+ append(" ms").toString());
+ System.out.println(new StringBuilder("Min System Latency : ").
+ append(df.format(minSystemLatency)).
+ append(" ms").toString());
+ System.out.println(new StringBuilder("Max System Latency : ").
+ append(df.format(maxSystemLatency)).
+ append(" ms").toString());
+ if (printStdDev)
+ {
+ System.out.println(new StringBuilder("Avg System Std Dev : ").
+ append(avgSystemLatencyStdDev));
+ }
+ }
+
+ private synchronized void sendMessageToNodes(OPCode code,Collection<MapMessage> nodes) throws Exception
+ {
+ System.out.println("\nController: Sending code " + code);
+ MessageProducer tmpProd = controllerSession.createProducer(null);
+ MapMessage msg = controllerSession.createMapMessage();
+ msg.setInt(CODE, code.ordinal());
+ for (MapMessage node : nodes)
+ {
+ if (node.getString(REPLY_ADDR) == null)
+ {
+ System.out.println("REPLY_ADDR is null " + node);
+ }
+ else
+ {
+ System.out.println("Controller: Sending " + code + " to " + node.getString(REPLY_ADDR));
+ }
+ tmpProd.send(controllerSession.createQueue(node.getString(REPLY_ADDR)), msg);
+ }
+ }
+
+ public void onMessage(Message msg)
+ {
+ try
+ {
+ MapMessage m = (MapMessage)msg;
+ OPCode code = OPCode.values()[m.getInt(CODE)];
+
+ System.out.println("\n---------Controller Received Code : " + code);
+ System.out.println("---------Data : " + ((AMQPEncodedMapMessage)m).getMap());
+
+ switch (code)
+ {
+ case REGISTER_CONSUMER :
+ if (consRegistered.getCount() == 0)
+ {
+ System.out.println("Warning : Expected number of consumers have already registered," +
+ "ignoring extra consumer");
+ break;
+ }
+ consumers.put(m.getString(ID),m);
+ consRegistered.countDown();
+ break;
+
+ case REGISTER_PRODUCER :
+ if (prodRegistered.getCount() == 0)
+ {
+ System.out.println("Warning : Expected number of producers have already registered," +
+ "ignoring extra producer");
+ break;
+ }
+ producers.put(m.getString(ID),m);
+ prodRegistered.countDown();
+ break;
+
+ case CONSUMER_READY :
+ consReady.countDown();
+ break;
+
+ case PRODUCER_READY :
+ prodReady.countDown();
+ break;
+
+ case RECEIVED_END_MSG :
+ receivedEndMsg.countDown();
+ break;
+
+ case RECEIVED_CONSUMER_STATS :
+ consumers.put(m.getString(ID),m);
+ receivedConsStats.countDown();
+ break;
+
+ case RECEIVED_PRODUCER_STATS :
+ producers.put(m.getString(ID),m);
+ receivedProdStats.countDown();
+ break;
+
+ default:
+ throw new Exception("Invalid OPCode " + code);
+ }
+ }
+ catch (Exception e)
+ {
+ handleError(e,"Error when receiving messages " + msg);
+ }
+ }
+
+ public void run()
+ {
+ try
+ {
+ setUp();
+ warmup();
+ if (testMode == TestMode.SINGLE_RUN)
+ {
+ startTest();
+ calcStats();
+ printResults();
+ }
+ else
+ {
+ long startTime = Clock.getTime();
+ long timeLimit = duration * 60 * 1000; // duration is in mins.
+ boolean nextIteration = true;
+ while (nextIteration)
+ {
+ startTest();
+ calcStats();
+ writeStatsToFile();
+ if (Clock.getTime() - startTime < timeLimit)
+ {
+ sendMessageToNodes(OPCode.CONTINUE_TEST,consumers.values());
+ sendMessageToNodes(OPCode.CONTINUE_TEST,producers.values());
+ nextIteration = true;
+ }
+ else
+ {
+ nextIteration = false;
+ }
+ }
+ }
+ tearDown();
+
+ }
+ catch(Exception e)
+ {
+ handleError(e,"Error when running test");
+ }
+ }
+
+ @Override
+ public void tearDown() throws Exception {
+ System.out.println("Controller: Completed the test......\n");
+ if (testMode == TestMode.TIME_BASED)
+ {
+ writer.close();
+ }
+ sendMessageToNodes(OPCode.STOP_TEST,consumers.values());
+ sendMessageToNodes(OPCode.STOP_TEST,producers.values());
+ super.tearDown();
+ }
+
+ public void writeStatsToFile() throws Exception
+ {
+ writer.append(String.valueOf(totalMsgCount)).append(",");
+ writer.append(df.format(totalSystemThroughput)).append(",");
+ writer.append(df.format(avgSystemConsRate)).append(",");
+ writer.append(df.format(minSystemConsRate)).append(",");
+ writer.append(df.format(maxSystemConsRate)).append(",");
+ writer.append(df.format(avgSystemProdRate)).append(",");
+ writer.append(df.format(minSystemProdRate)).append(",");
+ writer.append(df.format(maxSystemProdRate)).append(",");
+ writer.append(df.format(avgSystemLatency)).append(",");
+ writer.append(df.format(minSystemLatency)).append(",");
+ writer.append(df.format(maxSystemLatency));
+ if (printStdDev)
+ {
+ writer.append(",").append(String.valueOf(avgSystemLatencyStdDev));
+ }
+ writer.append("\n");
+ writer.flush();
+ }
+
+ public static void main(String[] args)
+ {
+ PerfTestController controller = new PerfTestController();
+ controller.run();
+ }
+}
diff --git a/qpid/java/tools/src/main/java/org/apache/qpid/tools/TestParams.java b/qpid/java/tools/src/main/java/org/apache/qpid/tools/TestParams.java
index 80014d8ac0..d73be0181b 100644
--- a/qpid/java/tools/src/main/java/org/apache/qpid/tools/TestParams.java
+++ b/qpid/java/tools/src/main/java/org/apache/qpid/tools/TestParams.java
@@ -43,7 +43,7 @@ public class TestParams
private int msg_size = 1024;
- private int msg_type = 1; // not used yet
+ private int random_msg_size_start_from = 1;
private boolean cacheMessage = false;
@@ -67,6 +67,14 @@ public class TestParams
private String msgType = "bytes";
+ private boolean printStdDev = false;
+
+ private long rate = -1;
+
+ private boolean externalController = false;
+
+ private boolean useUniqueDest = false; // useful when using multiple connections.
+
public TestParams()
{
@@ -76,7 +84,6 @@ public class TestParams
address = System.getProperty("address",address);
msg_size = Integer.getInteger("msg_size", 1024);
- msg_type = Integer.getInteger("msg_type",1);
cacheMessage = Boolean.getBoolean("cache_msg");
disableMessageID = Boolean.getBoolean("disableMessageID");
disableTimestamp = Boolean.getBoolean("disableTimestamp");
@@ -88,6 +95,11 @@ public class TestParams
warmup_count = Integer.getInteger("warmup_count",warmup_count);
random_msg_size = Boolean.getBoolean("random_msg_size");
msgType = System.getProperty("msg_type","bytes");
+ printStdDev = Boolean.getBoolean("print_std_dev");
+ rate = Long.getLong("rate",-1);
+ externalController = Boolean.getBoolean("ext_controller");
+ useUniqueDest = Boolean.getBoolean("use_unique_dest");
+ random_msg_size_start_from = Integer.getInteger("random_msg_size_start_from", 1);
}
public String getUrl()
@@ -125,9 +137,9 @@ public class TestParams
return msg_size;
}
- public int getMsgType()
+ public int getRandomMsgSizeStartFrom()
{
- return msg_type;
+ return random_msg_size_start_from;
}
public boolean isDurable()
@@ -174,4 +186,29 @@ public class TestParams
{
return msgType;
}
+
+ public boolean isPrintStdDev()
+ {
+ return printStdDev;
+ }
+
+ public long getRate()
+ {
+ return rate;
+ }
+
+ public boolean isExternalController()
+ {
+ return externalController;
+ }
+
+ public void setAddress(String addr)
+ {
+ address = addr;
+ }
+
+ public boolean isUseUniqueDests()
+ {
+ return useUniqueDest;
+ }
}
diff --git a/qpid/python/qpid/client.py b/qpid/python/qpid/client.py
index 45ce8498e8..5a877bb8d6 100644
--- a/qpid/python/qpid/client.py
+++ b/qpid/python/qpid/client.py
@@ -106,7 +106,7 @@ class Client:
try:
id = None
for i in xrange(1, 64*1024):
- if not self.sessions.has_key(id):
+ if not self.sessions.has_key(i):
id = i
break
finally:
diff --git a/qpid/python/qpid/util.py b/qpid/python/qpid/util.py
index e62bebdf24..89677289e2 100644
--- a/qpid/python/qpid/util.py
+++ b/qpid/python/qpid/util.py
@@ -39,12 +39,17 @@ except ImportError:
self.sock.close()
def connect(host, port):
- sock = socket.socket()
- sock.connect((host, port))
- sock.setblocking(1)
- # XXX: we could use this on read, but we'd have to put write in a
- # loop as well
- # sock.settimeout(1)
+ for res in socket.getaddrinfo(host, port, 0, socket.SOCK_STREAM):
+ af, socktype, proto, canonname, sa = res
+ sock = socket.socket(af, socktype, proto)
+ try:
+ sock.connect(sa)
+ break
+ except socket.error, msg:
+ sock.close
+ else:
+ # If we got here then we couldn't connect (yet)
+ raise
return sock
def listen(host, port, predicate = lambda: True, bound = lambda: None):
@@ -101,15 +106,23 @@ def fill(text, indent, heading = None):
class URL:
RE = re.compile(r"""
- # [ <scheme>:// ] [ <user> [ / <password> ] @] <host> [ :<port> ]
- ^ (?: ([^:/@]+)://)? (?: ([^:/@]+) (?: / ([^:/@]+) )? @)? ([^@:/]+) (?: :([0-9]+))?$
-""", re.X)
+ # [ <scheme>:// ] [ <user> [ / <password> ] @] ( <host4> | \[ <host6> \] ) [ :<port> ]
+ ^ (?: ([^:/@]+)://)? (?: ([^:/@]+) (?: / ([^:/@]+) )? @)? (?: ([^@:/\[]+) | \[ ([a-f0-9:.]+) \] ) (?: :([0-9]+))?$
+""", re.X | re.I)
AMQPS = "amqps"
AMQP = "amqp"
- def __init__(self, s):
- if isinstance(s, URL):
+ def __init__(self, s=None, **kwargs):
+ if s is None:
+ self.scheme = kwargs.get('scheme', None)
+ self.user = kwargs.get('user', None)
+ self.password = kwargs.get('password', None)
+ self.host = kwargs.get('host', None)
+ self.port = kwargs.get('port', None)
+ if self.host is None:
+ raise ValueError('Host required for url')
+ elif isinstance(s, URL):
self.scheme = s.scheme
self.user = s.user
self.password = s.password
@@ -119,7 +132,8 @@ class URL:
match = URL.RE.match(s)
if match is None:
raise ValueError(s)
- self.scheme, self.user, self.password, self.host, port = match.groups()
+ self.scheme, self.user, self.password, host4, host6, port = match.groups()
+ self.host = host4 or host6
if port is None:
self.port = None
else:
@@ -137,11 +151,25 @@ class URL:
if self.password:
s += "/%s" % self.password
s += "@"
- s += self.host
+ if ':' not in self.host:
+ s += self.host
+ else:
+ s += "[%s]" % self.host
if self.port:
s += ":%s" % self.port
return s
+ def __eq__(self, url):
+ if isinstance(url, basestring):
+ url = URL(url)
+ return \
+ self.scheme==url.scheme and \
+ self.user==url.user and self.password==url.password and \
+ self.host==url.host and self.port==url.port
+
+ def __ne__(self, url):
+ return not self.__eq__(url)
+
def default(value, default):
if value is None:
return default
diff --git a/qpid/ruby/LICENSE.txt b/qpid/ruby/LICENSE.txt
deleted file mode 100755
index 6b0b1270ff..0000000000
--- a/qpid/ruby/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
diff --git a/qpid/ruby/Makefile b/qpid/ruby/Makefile
deleted file mode 100644
index 9cac3207c0..0000000000
--- a/qpid/ruby/Makefile
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-SASL_DIR = ext/sasl
-SASL_MODULE = $(SASL_DIR)/sasl.so
-RUBY_LIB = lib
-SPEC_CACHE_SCRIPT = sc.rb
-
-.PHONY: spec_cache all clean distclean
-
-all : build
-
-$(SASL_MODULE) : $(SASL_DIR)/sasl.c
- cd $(SASL_DIR); ruby extconf.rb
- $(MAKE) -C $(SASL_DIR)
-
-spec_cache :
- echo "require 'qpid'" > $(SPEC_CACHE_SCRIPT)
- echo "Qpid::Spec010::load()" >> $(SPEC_CACHE_SCRIPT)
- ruby -I $(RUBY_LIB) -I $(SASL_DIR) $(SPEC_CACHE_SCRIPT)
- rm $(SPEC_CACHE_SCRIPT)
-
-build: $(SASL_MODULE) spec_cache
-
-clean:
- cd $(SASL_DIR); make clean
-
-distclean:
- cd $(SASL_DIR); make distclean
- rm -rf $(RUBY_LIB)/qpid/spec_cache
-
diff --git a/qpid/ruby/NOTICE.txt b/qpid/ruby/NOTICE.txt
deleted file mode 100644
index fff2bca45c..0000000000
--- a/qpid/ruby/NOTICE.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-=========================================================================
-== NOTICE file corresponding to the section 4 d of ==
-== the Apache License, Version 2.0, ==
-== in this case for the Apache Qpid distribution. ==
-=========================================================================
-
-This product includes software developed by the Apache Software Foundation
-(http://www.apache.org/).
-
-Please read the LICENSE.txt file present in the root directory of this
-distribution.
-
-
-Aside from contributions to the Apache Qpid project, this software also
-includes (binary only):
-
- - None at this time.
-
-
diff --git a/qpid/ruby/README.txt b/qpid/ruby/README.txt
deleted file mode 100644
index 330f9c6f61..0000000000
--- a/qpid/ruby/README.txt
+++ /dev/null
@@ -1,26 +0,0 @@
-= Running hello-world.rb =
-
-The ruby client includes a simple hello-world example that publishes
-and consumes a message. You can find this in the examples
-directory. This example requires a running broker.
-
-You can set RUBYLIB to the directories containing the Qpid ruby
-library and the SASL extension, then run the example from the command
-line. These are found in the ./lib and ./ext/sasl subdirectories.
-
-$ export RUBYLIB=/home/me/qpid/ruby/lib:/home/me/qpid/ruby/ext/sasl
-$ ./hello-world.rb
-#<Qpid::Message:0xb761c378 @headers=[#<struct Struct::Qpid_Message_properties content_length=nil, message_id=nil, correlation_id=nil, reply_to=nil, content_type="text/plain", content_encoding=nil, user_id=nil, app_id=nil, application_headers=nil, st_type=message_properties, id=nil>, #<struct Struct::Qpid_Delivery_properties discard_unroutable=nil, immediate=nil, redelivered=nil, priority=nil, delivery_mode=nil, ttl=nil, timestamp=nil, expiration=nil, exchange="", routing_key="test-queue", resume_id=nil, resume_ttl=nil, st_type=delivery_properties, id=nil>], @body="Hello World!", @id=#<Qpid::Serial:0xb76450fc @value=0>>
-
-Alternatively, you can specify the library paths using $ ruby -I:
-
-$ ruby -I /home/me/qpid/ruby/lib:/home/me/qpid/ruby/ext/sasl hello-world.rb
-#<Qpid::Message:0xb7504a44 @headers=[#<struct Struct::Qpid_Message_properties content_length=nil, message_id=nil, correlation_id=nil, reply_to=nil, content_type="text/plain", content_encoding=nil, user_id=nil, app_id=nil, application_headers=nil, st_type=message_properties, id=nil>, #<struct Struct::Qpid_Delivery_properties discard_unroutable=nil, immediate=nil, redelivered=nil, priority=nil, delivery_mode=nil, ttl=nil, timestamp=nil, expiration=nil, exchange="", routing_key="test-queue", resume_id=nil, resume_ttl=nil, st_type=delivery_properties, id=nil>], @body="Hello World!", @id=#<Qpid::Serial:0xb752d548 @value=0>>
-
-= Running the Tests =
-
-The "tests" directory contains a collection of unit tests for the ruby
-client. These can be run from the 'ruby' directory with the Rakefile
-provided:
-
-$ rake test
diff --git a/qpid/ruby/RELEASE_NOTES b/qpid/ruby/RELEASE_NOTES
deleted file mode 100644
index 90e7297e47..0000000000
--- a/qpid/ruby/RELEASE_NOTES
+++ /dev/null
@@ -1,10 +0,0 @@
-Apache Qpid Ruby 0.8 Release Notes
----------------------------------
-
-The Qpid 0.8 release of the ruby client contains support the for AMQP
-0-10 & 0-8 specifications. See:
-
-http://www.amqp.org/confluence/display/AMQP/AMQP+Specification
-
-The README file provided contains some details on installing and using
-the ruby client that is included with this distribution.
diff --git a/qpid/ruby/Rakefile b/qpid/ruby/Rakefile
deleted file mode 100644
index 9b0878813d..0000000000
--- a/qpid/ruby/Rakefile
+++ /dev/null
@@ -1,116 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# Rakefile for ruby-rpm -*- ruby -*-
-require 'rake/clean'
-require 'rake/testtask'
-require 'rake/gempackagetask'
-require 'pathname'
-
-PKG_NAME='ruby-qpid'
-PKG_VERSION='0.10.2'
-GEM_NAME='qpid'
-
-EXT_CONF="ext/sasl/extconf.rb"
-MAKEFILE="ext/sasl/Makefile"
-SASL_MODULE="ext/sasl/sasl.so"
-SASL_SRC=SASL_MODULE.gsub(/.so$/, ".c")
-
-#
-# Additional files for clean/clobber
-#
-
-CLEAN.include [ "**/*~", "lib/*/spec_cache", SASL_MODULE, "ext/**/*.o" ]
-
-CLOBBER.include [ "config.save", "ext/**/mkmf.log",
- MAKEFILE ]
-
-file MAKEFILE => EXT_CONF do |t|
- Dir::chdir(File::dirname(EXT_CONF)) do
- unless sh "ruby #{File::basename(EXT_CONF)}"
- $stderr.puts "Failed to run extconf"
- break
- end
- end
-end
-
-file SASL_MODULE => [ MAKEFILE, SASL_SRC ] do |t|
- Dir::chdir(File::dirname(EXT_CONF)) do
- unless sh "make"
- $stderr.puts "make failed"
- break
- end
- end
-end
-desc "Build the native library and AMQP spec cache"
-task :build => :spec_cache
-
-Rake::TestTask.new(:test) do |t|
- t.test_files = FileList['tests/*.rb'].exclude("tests/util.rb")
- t.libs = [ 'lib', 'ext/sasl' ]
-end
-
-Rake::TestTask.new(:"test_0-8") do |t|
- t.test_files = FileList["tests_0-8/*.rb"]
- t.libs = [ 'lib', 'ext/sasl' ]
-end
-
-desc "Create cached versions of the AMQP specs"
-task :spec_cache => SASL_MODULE do |t|
- pid = fork do
- $:.insert(0, "lib", "ext/sasl")
- require 'qpid'
- Qpid::Spec010::load()
- end
- Process.wait(pid)
-end
-
-#
-# Packaging
-#
-
-PKG_FILES = FileList[
- "LICENSE.txt", "NOTICE.txt",
- "Rakefile", "RELEASE_NOTES",
- "lib/**/*.rb", "lib/**/*.xml", "lib/**/*.dtd", "lib/*/spec_cache/*.rb*",
- "tests/**/*", "examples/**", "ext/**/*.[ch]", "ext/**/MANIFEST",
- "ext/**/extconf.rb"
-]
-
-DIST_FILES = FileList[
- "pkg/*.tgz", "pkg/*.gem"
-]
-
-SPEC = Gem::Specification.new do |s|
- s.name = GEM_NAME
- s.version = PKG_VERSION
- s.email = "dev@qpid.apache.org"
- s.homepage = "http://cwiki.apache.org/qpid/"
- s.summary = "Ruby client for Qpid"
- s.files = PKG_FILES
- s.required_ruby_version = '>= 1.8.1'
- s.description = "Ruby client for Qpid"
- s.extensions << 'ext/sasl/extconf.rb'
-end
-
-Rake::GemPackageTask.new(SPEC) do |pkg|
- task pkg.package_dir => [ :spec_cache ]
- pkg.need_tar = true
- pkg.need_zip = true
-end
diff --git a/qpid/ruby/examples/hello-world.rb b/qpid/ruby/examples/hello-world.rb
deleted file mode 100755
index e8ef673316..0000000000
--- a/qpid/ruby/examples/hello-world.rb
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/ruby
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "qpid"
-require "socket"
-
-broker = if ARGV.length > 0 then ARGV[0] else "localhost" end
-port = if ARGV.length > 1 then ARGV[1].to_i else 5672 end
-if ARGV.length > 2 then
- puts "usage: hello-world.rb [ <broker> [ <port> ] ]"
- exit 1
-end
-
-conn = Qpid::Connection.new(TCPSocket.new(broker, port))
-conn.start(10)
-
-ssn = conn.session("test")
-
-# create a queue
-ssn.queue_declare("test-queue")
-
-ssn.exchange_declare("test-exchange", :type => "direct")
-
-# Publish a message
-dp = ssn.delivery_properties(:routing_key => "test-queue")
-mp = ssn.message_properties(:content_type => "text/plain")
-msg = Qpid::Message.new(dp, mp, "Hello World!")
-ssn.message_transfer(:message => msg)
-
-# subscribe to a queue
-ssn.message_subscribe(:destination => "messages", :queue => "test-queue",
- :accept_mode => ssn.message_accept_mode.none)
-incoming = ssn.incoming("messages")
-
-# start incoming message flow
-incoming.start()
-
-# grab a message from the queue
-p incoming.get(10)
-
-# cancel the subscription and close the session and connection
-ssn.message_cancel(:destination => "messages")
-ssn.close()
-conn.close()
diff --git a/qpid/ruby/examples/qmf-libvirt.rb b/qpid/ruby/examples/qmf-libvirt.rb
deleted file mode 100644
index 492f4fe8d6..0000000000
--- a/qpid/ruby/examples/qmf-libvirt.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/ruby
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "qpid"
-
-s = Qpid::Qmf::Session.new()
-b = s.add_broker("amqp://localhost:5672")
-
-while true:
- nodes = s.objects(:class => "node")
- nodes.each do |node|
- puts "node: #{node.hostname}"
- for (key, val) in node.properties
- puts " property: #{key}, #{val}"
- end
-
- # Find any domains that on the current node.
- domains = s.objects(:class => "domain", 'node' => node.object_id)
- domains.each do |domain|
- r = domain.getXMLDesc()
- puts "status: #{r.status}"
- if r.status == 0
- puts "xml description: #{r.description}"
- puts "length: #{r.description.length}"
- end
-
- puts " domain: #{domain.name}, state: #{domain.state}, id: #{domain.id}"
- for (key, val) in domain.properties
- puts " property: #{key}, #{val}"
- end
- end
-
- pools = s.objects(:class => "pool", 'node' => node.object_id)
- pools.each do |pool|
- puts " pool: #{pool.name}"
- for (key, val) in pool.properties
- puts " property: #{key}, #{val}"
- end
-
- r = pool.getXMLDesc()
- puts "status: #{r.status}"
- puts "text: #{r.text}"
- if r.status == 0
- puts "xml description: #{r.description}"
- puts "length: #{r.description.length}"
- end
-
- # Find volumes that are part of the pool.
- volumes = s.objects(:class => "volume", 'pool' => pool.object_id)
- volumes.each do |volume|
- puts " volume: #{volume.name}"
- for (key, val) in volume.properties
- puts " property: #{key}, #{val}"
- end
- end
- end
-
- end
-
- puts '----------------------------'
- sleep(5)
-
-end
diff --git a/qpid/ruby/ext/sasl/sasl.c b/qpid/ruby/ext/sasl/sasl.c
deleted file mode 100644
index 2d4e40d30e..0000000000
--- a/qpid/ruby/ext/sasl/sasl.c
+++ /dev/null
@@ -1,472 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
-*/
-
-#include <stdio.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <string.h>
-#include <sasl/sasl.h>
-#include <ruby.h>
-
-static VALUE mSasl;
-
-#define INPUT_SIZE 512
-#define MECH_SIZE 32
-
-typedef void* sasl_context_t;
-
-#define QSASL_OK 0
-#define QSASL_CONTINUE 1
-#define QSASL_FAILED 2
-
-typedef struct {
- char magic[8];
- sasl_conn_t* conn;
- sasl_callback_t callbacks[8];
- char* userName;
- char* password;
- char* operUserName;
- unsigned int minSsf;
- unsigned int maxSsf;
- char mechanism[MECH_SIZE];
- char input[INPUT_SIZE];
-} context_t;
-
-//
-// Resolve forward references
-//
-static VALUE qsasl_free(int, VALUE*, VALUE);
-
-//
-// Validate an input string to ensure that it is either NULL or of reasonable size.
-//
-static int qsasl_valid(char* str)
-{
- int idx;
-
- if (str == 0)
- return 1;
-
- for (idx = 0; idx < INPUT_SIZE; idx++) {
- if (str[idx] == '\0')
- return 1;
- }
-
- return 0;
-}
-
-//
-// SASL callback for identity and authentication identity.
-//
-static int qsasl_cb_user(void* _context, int id, const char **result, unsigned *len)
-{
- context_t* context = (context_t*) _context;
-
- if (context->userName)
- *result = context->userName;
-
- return SASL_OK;
-}
-
-//
-// SASL callback for passwords.
-//
-static int qsasl_cb_password(sasl_conn_t* conn, void* _context, int id, sasl_secret_t **psecret)
-{
- context_t* context = (context_t*) _context;
- sasl_secret_t* secret;
- size_t length;
-
- if (context->password)
- length = strlen(context->password);
- else
- length = 0;
-
- secret = (sasl_secret_t*) malloc(sizeof(sasl_secret_t) + length);
- secret->len = length;
- if (length)
- memcpy(secret->data, context->password, length);
- *psecret = secret;
-
- return SASL_OK;
-}
-
-//
-// Interactively prompt the user for authentication data.
-//
-static void qsasl_prompt(sasl_context_t _context, sasl_interact_t* interact)
-{
- context_t* context = (context_t*) _context;
- char *pass;
- char *input;
- char passwdPrompt[100];
-
- if (interact->id == SASL_CB_PASS) {
- strncpy(passwdPrompt, interact->prompt, 95);
- strcat(passwdPrompt, ": ");
- pass = getpass(passwdPrompt);
- strncpy(context->input, pass, INPUT_SIZE - 1);
- context->input[INPUT_SIZE - 1] = '\0';
- } else {
- printf(interact->prompt);
- if (interact->defresult) {
- printf(" (%s)", interact->defresult);
- }
- printf(": ");
- input = fgets(context->input, INPUT_SIZE, stdin);
- if (input != context->input) {
- rb_raise(rb_eRuntimeError, "Unexpected EOF on interactive prompt");
- }
- }
-
- interact->result = context->input;
- interact->len = strlen(context->input);
-}
-
-//
-// Initialize the SASL client library.
-//
-static VALUE qsasl_client_init()
-{
- int result;
-
- result = sasl_client_init(0);
- if (result != SASL_OK)
- rb_raise(rb_eRuntimeError,
- "sasl_client_init failed: %d - %s",
- result, sasl_errstring(result, -0, 0));
- return Qnil;
-}
-
-//
-// Allocate a new SASL client context.
-//
-static VALUE qsasl_client_new(int argc, VALUE *argv, VALUE obj)
-{
- char* mechanism = 0;
- char* serviceName = 0;
- char* hostName = 0;
- char* userName = 0;
- char* password = 0;
- unsigned int minSsf = 0;
- unsigned int maxSsf = 65535;
-
- int result;
- int i = 0;
- context_t *context;
- sasl_security_properties_t secprops;
-
- if (argc != 7)
- rb_raise(rb_eRuntimeError, "Wrong number of arguments");
-
- if (!NIL_P(argv[0]))
- mechanism = StringValuePtr(argv[0]);
- if (!NIL_P(argv[1]))
- serviceName = StringValuePtr(argv[1]);
- if (!NIL_P(argv[2]))
- hostName = StringValuePtr(argv[2]);
- if (!NIL_P(argv[3]))
- userName = StringValuePtr(argv[3]);
- if (!NIL_P(argv[4]))
- password = StringValuePtr(argv[4]);
- minSsf = FIX2INT(argv[5]);
- maxSsf = FIX2INT(argv[6]);
-
- if (!qsasl_valid(mechanism) || !qsasl_valid(serviceName) ||
- !qsasl_valid(hostName) || !qsasl_valid(userName) ||
- !qsasl_valid(password)) {
- rb_raise(rb_eRuntimeError, "Invalid string argument");
- }
-
- context = (context_t*) malloc(sizeof(context_t));
- memset(context, 0, sizeof(context_t));
- strcpy(context->magic, "QSASL01");
-
- context->minSsf = minSsf;
- context->maxSsf = maxSsf;
- if (mechanism != 0) {
- strncpy(context->mechanism, mechanism, MECH_SIZE - 1);
- context->mechanism[MECH_SIZE - 1] = '\0';
- }
-
- context->callbacks[i].id = SASL_CB_GETREALM;
- context->callbacks[i].proc = 0;
- context->callbacks[i++].context = 0;
-
- if (userName != 0 && userName[0] != '\0') {
- context->userName = (char*) malloc(strlen(userName) + 1);
- strcpy(context->userName, userName);
-
- context->callbacks[i].id = SASL_CB_USER;
- context->callbacks[i].proc = qsasl_cb_user;
- context->callbacks[i++].context = context;
-
- context->callbacks[i].id = SASL_CB_AUTHNAME;
- context->callbacks[i].proc = qsasl_cb_user;
- context->callbacks[i++].context = context;
- }
-
- context->callbacks[i].id = SASL_CB_PASS;
- if (password != 0 && password[0] != '\0') {
- context->password = (char*) malloc(strlen(password) + 1);
- strcpy(context->password, password);
-
- context->callbacks[i].proc = qsasl_cb_password;
- } else
- context->callbacks[i].proc = 0;
- context->callbacks[i++].context = context;
-
- context->callbacks[i].id = SASL_CB_LIST_END;
- context->callbacks[i].proc = 0;
- context->callbacks[i++].context = 0;
-
- result = sasl_client_new(serviceName, hostName, 0, 0,
- context->callbacks, 0, &context->conn);
-
- if (result != SASL_OK) {
- context->conn = 0;
- qsasl_free(1, (VALUE*) &context, Qnil);
- rb_raise(rb_eRuntimeError, "sasl_client_new failed: %d - %s",
- result, sasl_errstring(result, 0, 0));
- }
-
- secprops.min_ssf = minSsf;
- secprops.max_ssf = maxSsf;
- secprops.maxbufsize = 65535;
- secprops.property_names = 0;
- secprops.property_values = 0;
- secprops.security_flags = 0;//TODO: provide means for application to configure these
-
- result = sasl_setprop(context->conn, SASL_SEC_PROPS, &secprops);
- if (result != SASL_OK) {
- qsasl_free(1, (VALUE*) &context, Qnil);
- rb_raise(rb_eRuntimeError, "sasl_setprop failed: %d - %s",
- result, sasl_errdetail(context->conn));
- }
-
- return (VALUE) context;
-}
-
-//
-// Free a SASL client context.
-//
-static VALUE qsasl_free(int argc, VALUE *argv, VALUE obj)
-{
- context_t* context;
-
- if (argc == 1)
- context = (context_t*) argv[0];
- else
- rb_raise(rb_eRuntimeError, "Wrong Number of Arguments");
-
- if (context->conn)
- sasl_dispose(&context->conn);
- if (context->userName)
- free(context->userName);
- if (context->password)
- free(context->password);
- if (context->operUserName)
- free(context->operUserName);
- free(context);
-
- return Qnil;
-}
-
-//
-// Start the SASL exchange from the client's point of view.
-//
-static VALUE qsasl_client_start(int argc, VALUE *argv, VALUE obj)
-{
- context_t* context;
- char* mechList;
- char* mechToUse;
- int result;
- int propResult;
- const char* response;
- unsigned int len;
- sasl_interact_t* interact = 0;
- const char* chosen;
- const char* operName;
-
- if (argc == 2) {
- context = (context_t*) argv[0];
- mechList = StringValuePtr(argv[1]);
- } else
- rb_raise(rb_eRuntimeError, "Wrong Number of Arguments");
-
- if (strlen(context->mechanism) == 0)
- mechToUse = mechList;
- else
- mechToUse = context->mechanism;
-
- do {
- result = sasl_client_start(context->conn, mechToUse, &interact,
- &response, &len, &chosen);
- if (result == SASL_INTERACT) {
- qsasl_prompt(context, interact);
- }
- } while (result == SASL_INTERACT);
-
- if (result != SASL_OK && result != SASL_CONTINUE)
- rb_raise(rb_eRuntimeError, "sasl_client_start failed: %d - %s",
- result, sasl_errdetail(context->conn));
-
- if (result == SASL_OK) {
- propResult = sasl_getprop(context->conn, SASL_USERNAME, (const void**) &operName);
- if (propResult == SASL_OK) {
- context->operUserName = (char*) malloc(strlen(operName) + 1);
- strcpy(context->operUserName, operName);
- }
- }
-
- return rb_ary_new3(3, INT2NUM(result), rb_str_new(response, len), rb_str_new2(chosen));
-}
-
-//
-// Take a step in the SASL exchange (only needed for multi-challenge mechanisms).
-//
-static VALUE qsasl_client_step(int argc, VALUE *argv, VALUE obj)
-{
- context_t* context;
- VALUE challenge;
- int result;
- int propResult;
- const char* response;
- const char* operName;
- unsigned int len;
- sasl_interact_t* interact = 0;
-
- if (argc == 2) {
- context = (context_t*) argv[0];
- challenge = argv[1];
- }
- else
- rb_raise(rb_eRuntimeError, "Wrong Number of Arguments");
-
- do {
- result = sasl_client_step(context->conn,
- RSTRING(challenge)->ptr, RSTRING(challenge)->len,
- &interact, &response, &len);
- if (result == SASL_INTERACT) {
- qsasl_prompt(context, interact);
- }
- } while (result == SASL_INTERACT);
-
- if (result != SASL_OK && result != SASL_CONTINUE)
- return QSASL_FAILED;
-
- if (result == SASL_OK) {
- propResult = sasl_getprop(context->conn, SASL_USERNAME, (const void**) &operName);
- if (propResult == SASL_OK) {
- context->operUserName = (char*) malloc(strlen(operName) + 1);
- strcpy(context->operUserName, operName);
- }
- }
-
- return rb_ary_new3(2, INT2NUM(result), rb_str_new(response, len));
-}
-
-static VALUE qsasl_user_id(int argc, VALUE *argv, VALUE obj)
-{
- context_t* context;
-
- if (argc == 1) {
- context = (context_t*) argv[0];
- } else {
- rb_raise(rb_eRuntimeError, "Wrong Number of Arguments");
- }
-
- if (context->operUserName)
- return rb_str_new2(context->operUserName);
-
- return Qnil;
-}
-
-//
-// Encode transport data for the security layer.
-//
-static VALUE qsasl_encode(int argc, VALUE *argv, VALUE obj)
-{
- context_t* context;
- VALUE clearText;
- const char* outBuffer;
- unsigned int outSize;
- int result;
-
- if (argc == 2) {
- context = (context_t*) argv[0];
- clearText = argv[1];
- }
- else
- rb_raise(rb_eRuntimeError, "Wrong Number of Arguments");
-
- result = sasl_encode(context->conn,
- RSTRING(clearText)->ptr, RSTRING(clearText)->len,
- &outBuffer, &outSize);
- if (result != SASL_OK)
- rb_raise(rb_eRuntimeError, "sasl_encode failed: %d - %s",
- result, sasl_errdetail(context->conn));
-
- return rb_str_new(outBuffer, outSize);
-}
-
-//
-// Decode transport data for the security layer.
-//
-static VALUE qsasl_decode(int argc, VALUE *argv, VALUE obj)
-{
- context_t* context;
- VALUE cipherText;
- const char* outBuffer;
- unsigned int outSize;
- int result;
-
- if (argc == 2) {
- context = (context_t*) argv[0];
- cipherText = argv[1];
- }
- else
- rb_raise(rb_eRuntimeError, "Wrong Number of Arguments");
-
- result = sasl_decode(context->conn,
- RSTRING(cipherText)->ptr, RSTRING(cipherText)->len,
- &outBuffer, &outSize);
- if (result != SASL_OK)
- rb_raise(rb_eRuntimeError, "sasl_decode failed: %d - %s",
- result, sasl_errdetail(context->conn));
-
- return rb_str_new(outBuffer, outSize);
-}
-
-//
-// Initialize the Sasl module.
-//
-void Init_sasl()
-{
- mSasl = rb_define_module("Sasl");
-
- rb_define_module_function(mSasl, "client_init", qsasl_client_init, -1);
- rb_define_module_function(mSasl, "client_new", qsasl_client_new, -1);
- rb_define_module_function(mSasl, "free", qsasl_free, -1);
- rb_define_module_function(mSasl, "client_start", qsasl_client_start, -1);
- rb_define_module_function(mSasl, "client_step", qsasl_client_step, -1);
- rb_define_module_function(mSasl, "user_id", qsasl_user_id, -1);
- rb_define_module_function(mSasl, "encode", qsasl_encode, -1);
- rb_define_module_function(mSasl, "decode", qsasl_decode, -1);
-}
diff --git a/qpid/ruby/lib/qpid.rb b/qpid/ruby/lib/qpid.rb
deleted file mode 100644
index 1c719e9b1d..0000000000
--- a/qpid/ruby/lib/qpid.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-module Qpid
- def self.logger
- @logger ||= {}
- @logger
- end
-end
-
-require "qpid/util"
-require "qpid/queue"
-require "qpid/packer"
-require "qpid/framer"
-require "qpid/codec"
-require 'qpid/datatypes'
-require 'qpid/spec010'
-require 'qpid/delegates'
-require 'qpid/invoker'
-require "qpid/assembler"
-require 'qpid/session'
-require "qpid/connection"
-require "qpid/spec"
-require 'qpid/queue'
-require 'qpid/qmf'
diff --git a/qpid/ruby/lib/qpid/assembler.rb b/qpid/ruby/lib/qpid/assembler.rb
deleted file mode 100644
index b768c3f195..0000000000
--- a/qpid/ruby/lib/qpid/assembler.rb
+++ /dev/null
@@ -1,148 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-module Qpid
-
- class << self
- attr_accessor :asm_logger
- end
-
- class Segment
-
- attr_reader :type, :payload, :track, :channel
- attr_accessor :id, :offset
-
- def initialize(first, last, type, track, channel, payload)
- @id = nil
- @offset = nil
- @first = first
- @last = last
- @type = type
- @track = track
- @channel = channel
- @payload = payload
- end
-
- def first_segment? ; @first ; end
-
- def last_segment? ; @last ; end
-
- def decode(spec)
- segs = spec[:segment_type]
- choice = segs.enum.choices[type]
- return method("decode_#{choice.name}").call(spec)
- end
-
- def decode_control(spec)
- sc = StringCodec.new(spec, payload)
- return sc.read_control()
- end
-
- def decode_command(spec)
- sc = StringCodec.new(spec, payload)
- hdr, cmd = sc.read_command()
- cmd.id = id
- return hdr, cmd
- end
-
- def decode_header(spec)
- sc = StringCodec.new(spec, payload)
- values = []
- until sc.encoded.empty?
- values << sc.read_struct32()
- end
- return values
- end
-
- def decode_body(spec)
- payload
- end
-
- def append(frame)
- @payload += frame.payload
- end
-
- def to_s
- f = first_segment? ? 'F' : '.'
- l = last_segment? ? 'L' : '.'
- return "%s%s %s %s %s %s" % [f, l, @type,
- @track, @channel, @payload.inspect]
- end
-
- end
-
- class Assembler < Framer
-
- def logger; Qpid::asm_logger; end
-
- def initialize(sock, max_payload = Frame::MAX_PAYLOAD)
- super(sock)
- @max_payload = max_payload
- @fragments = {}
- end
-
- def read_segment
- loop do
- frame = read_frame
- key = [frame.channel, frame.track]
- seg = @fragments[key]
- unless seg
- seg = Segment.new(frame.first_segment?,
- frame.last_segment?,
- frame.type, frame.track,
- frame.channel, "")
- @fragments[key] = seg
- end
-
- seg.append(frame)
-
- if frame.last_frame?
- @fragments.delete(key)
- logger.debug("RECV #{seg}") if logger
- return seg
- end
- end
- end
-
- def write_segment(segment)
- remaining = segment.payload
-
- first = true
- while first or remaining
- payload = remaining[0, @max_payload]
- remaining = remaining[@max_payload, remaining.size]
-
- flags = 0
-
- flags |= FIRST_FRM if first
- flags |= LAST_FRM unless remaining
- flags |= FIRST_SEG if segment.first_segment?
- flags |= LAST_SEG if segment.last_segment?
-
- frame = Frame.new(flags, segment.type, segment.track,
- segment.channel, payload)
- write_frame(frame)
-
- first = false
- end
-
- logger.debug("SENT #{segment}") if logger
- end
- end
-end
diff --git a/qpid/ruby/lib/qpid/client.rb b/qpid/ruby/lib/qpid/client.rb
deleted file mode 100644
index ec3d100a9c..0000000000
--- a/qpid/ruby/lib/qpid/client.rb
+++ /dev/null
@@ -1,136 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "thread"
-require "qpid/peer"
-require "qpid/queue"
-
-module Qpid08
-
- class Client
- def initialize(host, port, spec, vhost = "/")
- @host = host
- @port = port
- @spec = spec
- @vhost = vhost
-
- @mechanism = nil
- @response = nil
- @locale = nil
-
- @queues = {}
- @mutex = Mutex.new()
-
- @closed = false
- @code = nil
- @started = ConditionVariable.new()
-
- @conn = Connection.new(@host, @port, @spec)
- @peer = Peer.new(@conn, ClientDelegate.new(self))
- end
-
- attr_reader :mechanism, :response, :locale
-
- def closed?; @closed end
- def closed=(value); @closed = value end
- def code; @code end
-
- def wait()
- @mutex.synchronize do
- @started.wait(@mutex)
- end
- raise EOFError.new() if closed?
- end
-
- def signal_start()
- @started.broadcast()
- end
-
- def queue(key)
- @mutex.synchronize do
- q = @queues[key]
- if q.nil?
- q = Queue.new()
- @queues[key] = q
- end
- return q
- end
- end
-
- def start(response, mechanism="AMQPLAIN", locale="en_US")
- @response = response
- @mechanism = mechanism
- @locale = locale
-
- @conn.connect()
- @conn.init()
- @peer.start()
- wait()
- channel(0).connection_open(@vhost)
- end
-
- def channel(id)
- return @peer.channel(id)
- end
-
- def close(msg = nil)
- @closed = true
- @code = msg
- @peer.close()
- end
- end
-
- class ClientDelegate
-
- include Delegate
-
- def initialize(client)
- @client = client
- end
-
- def connection_start(ch, msg)
- ch.connection_start_ok(:mechanism => @client.mechanism,
- :response => @client.response,
- :locale => @client.locale)
- end
-
- def connection_tune(ch, msg)
- ch.connection_tune_ok(*msg.fields)
- @client.signal_start()
- end
-
- def connection_close(ch, msg)
- puts "CONNECTION CLOSED: #{msg.args.join(", ")}"
- @client.close(msg)
- end
-
- def channel_close(ch, msg)
- puts "CHANNEL[#{ch.id}] CLOSED: #{msg.args.join(", ")}"
- ch.channel_close_ok()
- ch.close()
- end
-
- def basic_deliver(ch, msg)
- queue = @client.queue(msg.consumer_tag)
- queue << msg
- end
-
- end
-
-end
diff --git a/qpid/ruby/lib/qpid/codec.rb b/qpid/ruby/lib/qpid/codec.rb
deleted file mode 100644
index a3b5d101c4..0000000000
--- a/qpid/ruby/lib/qpid/codec.rb
+++ /dev/null
@@ -1,457 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require 'qpid/packer.rb'
-require 'iconv'
-
-module Qpid
-
- class Codec
-
- include Qpid::Packer
-
- attr_reader :spec
-
- def initialize(spec = "")
- @spec = spec
- end
-
- def write_void(v)
- unless v.nil?
- raise Exception.new("void not nil: #{v}")
- end
- end
-
- def read_void
- return nil
- end
-
- def write_bit(b)
- unless b
- raise Exception.new("bit is nil: #{b}")
- end
- end
-
- def read_bit
- return true
- end
-
- def read_uint8
- return unpack("C", 1)
- end
-
- def write_uint8(n)
- return pack("C", n)
- end
-
- def read_int8
- return unpack("c", 1)
- end
-
- def write_int8(n)
- pack("c", n)
- end
-
- def read_char
- return unpack("c", 1)
- end
-
- def write_char(c)
- pack("c")
- end
-
- def read_boolean
- return read_uint8 != 0
- end
-
- def write_boolean(b)
- n = 0
- n = 1 if b != 0
- write_uint8(n)
- end
-
- def read_uint16
- return unpack("n", 2)
- end
-
- def write_uint16(n)
- pack("n", n)
- end
-
- def read_int16
- # XXX: holy moly.. pack/unpack doesn't have signed network byte order. Crazy hackery.
- val = unpack("n", 2)
- val -= 2 ** 16 if val >= 2 ** 15
- return val
- end
-
- def write_int16(n)
- # XXX: Magically this one works even though it's not signed.
- pack("n", n)
- end
-
- def read_uint32
- return unpack("N", 4)
- end
-
- def write_uint32(n)
- pack("N", n)
- end
-
- def read_int32
- # Again no pack/unpack for signed int
- return unpack("N", 4)
- end
-
- def write_int32(n)
- # FIXME
- pack("N", n)
- end
-
- def read_float
- return unpack("g", 4)
- end
-
- def write_float(n)
- pack("g", n)
- end
-
- def read_sequence_no
- return read_uint32.to_serial
- end
-
- def write_sequence_no(n)
- write_uint32(n.value)
- end
-
- def encode_64bit(num, signed = false)
- b = []
-
- if num < 0 && signed
- num += 2 ** 64
- end
-
- (0..7).each do |c|
- d = 7 - c
- b[c] = (num & (0xff << d * 8)) >> d * 8
- end
- pack('C8', *b)
- end
-
-
- def decode_64bit(signed = false)
- # Silly ruby pack/unpack does not implement 64 bit network byte order
- # encode/decode.
- a = unpack('C8', 8)
- num = 0
- (0..7).each do |c|
- d = 7 - c
- num |= a[c] << 8 * d
- end
-
- if signed && num >= 2 ** 63
- num -= 2 ** 64
- end
- return num
- end
-
- def read_uint64
- return decode_64bit
- end
-
- def write_uint64(n)
- encode_64bit(n)
- end
-
- def read_int64
- return decode_64bit(signed = true)
- end
-
- def write_int64(n)
- encode_64bit(n, signed = true)
- end
-
- def read_datetime
- return read_uint64
- end
-
- def write_datetime(n)
- write_uint64(n)
- end
-
- def read_double
- return unpack("G", 8)
- end
-
- def write_double(n)
- pack("G", n)
- end
-
- def read_vbin8
- # XXX
- return read(read_uint8)
- end
-
- def write_vbin8(b)
- # XXX
- write_uint8(b.length)
- write(b)
- end
-
- def read_str8
- # FIXME: Check iconv.. I think this will throw if there are odd characters.
- return Iconv.conv("ASCII", "UTF-8", read_vbin8)
- end
-
- def write_str8(s)
- write_vbin8(Iconv.conv("UTF-8", "ASCII", s))
- end
-
- def read_str16
- return Iconv.conv("ASCII", "UTF-8", read_vbin16)
- end
-
- def write_str16(s)
- write_vbin16(Iconv.conv("UTF-8", "ASCII", s))
- end
-
- def read_vbin16
- # XXX: Using read method?
- return read(read_uint16)
- end
-
- def write_vbin16(b)
- write_uint16(b.length)
- write(b)
- end
-
- def read_sequence_set
- # FIXME: Need datatypes
- result = RangedSet.new
- size = read_uint16
- nranges = size / 8
- nranges.times do |i|
- lower = read_sequence_no
- upper = read_sequence_no
- result.add(lower, upper)
- end
- return result
- end
-
- def write_sequence_set(ss)
- size = 8 * ss.ranges.length
- write_uint16(size)
- ss.ranges.each do |range|
- write_sequence_no(range.lower)
- write_sequence_no(range.upper)
- end
- end
-
- def read_vbin32
- return read(read_uint32)
- end
-
- def write_vbin32(b)
- write_uint32(b.length)
- write(b)
- end
-
- def write_map(m)
- sc = StringCodec.new(@spec)
- unless m.nil?
- sc.write_uint32(m.size)
- m.each do |k, v|
- unless type = @spec.encoding(v.class)
- raise Exception.new("no encoding for: #{v.class}")
- end
- sc.write_str8(k)
- sc.write_uint8(type.code)
- type.encode(sc, v)
- end
- end
- write_vbin32(sc.encoded)
- end
-
- def read_map
- sc = StringCodec.new(@spec, read_vbin32)
- return nil unless sc.encoded
- count = sc.read_uint32
- result = nil
- if count
- result = {}
- until sc.encoded.empty?
- k = sc.read_str8
- code = sc.read_uint8
- type = @spec.types[code]
- v = type.decode(sc)
- result[k] = v
- end
- end
- return result
- end
-
- def write_array(a)
- sc = StringCodec.new(@spec)
- unless a.nil?
- if a.length > 0
- type = @spec.encoding(a[0].class)
- else
- type = @spec.encoding(nil.class)
- end
- sc.write_uint8(type.code)
- sc.write_uint32(a.size)
- a.each { |o| type.encode(sc, o) }
- end
- write_vbin32(sc.encoded)
- end
-
- def read_array
- sc = StringCodec.new(@spec, read_vbin32)
- return nil if not sc.encoded
- type = @spec.types[sc.read_uint8]
- count = sc.read_uint32
- result = nil
- if count
- result = []
- count.times { |i| result << (type.decode(sc)) }
- end
- return result
- end
-
- def write_list(l)
- sc = StringCodec.new(@spec)
- unless l.nil?
- sc.write_uint32(l.length)
- l.each do |o|
- type = @spec.encoding(o.class)
- sc.write_uint8(type.code)
- type.encode(sc, o)
- end
- end
- write_vbin32(sc.encoded)
- end
-
- def read_list
- sc = StringCodec.new(@spec, read_vbin32)
- return nil if not sc.encoded
- count = sc.read_uint32
- result = nil
- if count
- result = []
- count.times do |i|
- type = @spec.types[sc.read_uint8]
- result << type.decode(sc)
- end
- end
- return result
- end
-
- def read_struct32
- size = read_uint32
- code = read_uint16
- type = @spec.structs[code]
- # XXX: BLEH!
- fields = type.decode_fields(self)
- return Qpid::struct(type, fields)
- end
-
- def write_struct32(value)
- type = value.st_type
- sc = StringCodec.new(@spec)
- sc.write_uint16(type.code)
- type.encode_fields(sc, value)
- write_vbin32(sc.encoded)
- end
-
- def read_control
- cntrl = @spec.controls[read_uint16]
- return Qpid::struct(cntrl, cntrl.decode_fields(self))
- end
-
- def write_control(ctrl)
- type = ctrl.st_type
- write_uint16(type.code)
- type.encode_fields(self, ctrl)
- end
-
- def read_command
- type = @spec.commands[read_uint16]
- hdr = @spec[:header].decode(self)
- cmd = Qpid::struct(type, type.decode_fields(self))
- return hdr, cmd
- end
-
- def write_command(hdr, cmd)
- type = cmd.st_type
- write_uint16(type.code)
- hdr.st_type.encode(self, hdr)
- type.encode_fields(self, cmd)
- end
-
- def read_size(width)
- if width > 0
- return send(:"read_uint#{width * 8}")
- end
- end
-
- def write_size(width, n)
- if width > 0
- send(:"write_uint#{width * 8}", n)
- end
- end
-
- def read_uuid
- return unpack("a16", 16)
- end
-
- def write_uuid(s)
- pack("a16", s)
- end
-
- def read_bin128
- return unpack("a16", 16)
- end
-
- def write_bin128(b)
- pack("a16", b)
- end
-
- end
-
- class StringCodec < Codec
-
- def initialize(spec, encoded = "")
- @spec = spec
- @encoded = encoded
- end
-
- attr_reader :encoded
-
- def write(s)
- @encoded += s
- end
-
- def read(n)
- return "" if n.nil?
- result = @encoded[0...n]
- @encoded = @encoded[n...@encoded.size] || ""
- return result
- end
- end
-end
diff --git a/qpid/ruby/lib/qpid/codec08.rb b/qpid/ruby/lib/qpid/codec08.rb
deleted file mode 100644
index 148dee07bb..0000000000
--- a/qpid/ruby/lib/qpid/codec08.rb
+++ /dev/null
@@ -1,265 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-module Qpid08
- # is there a better way to do this?
- class StringWriter
-
- def initialize(str = "")
- @str = str
- end
-
- def write(value)
- @str << value
- end
-
- def to_s()
- return @str
- end
-
- end
-
- class EOF < Exception; end
-
- class Encoder
-
- def initialize(out)
- @out = out
- @bits = []
- end
-
- attr_reader(:out)
-
- def encode(type, value)
- send(type, value)
- end
-
- def bit(b)
- @bits << b
- end
-
- def octet(o)
- pack("C", o)
- end
-
- def short(s)
- pack("n", s)
- end
-
- def long(l)
- pack("N", l)
- end
-
- def longlong(l)
- lower = l & 0xffffffff
- upper = (l & ~0xffffffff) >> 32
- long(upper)
- long(lower)
- end
-
- def timestamp(l)
- longlong(l)
- end
-
- def shortstr(s)
- # shortstr is actually octetstr
- octet(s.length)
- write(s)
- end
-
- def longstr(s)
- case s
- when Hash
- table(s)
- else
- long(s.length)
- write(s)
- end
- end
-
- def table(t)
- t = {} if t.nil?
- enc = Encoder.new(StringWriter.new())
- t.each {|key, value|
- enc.shortstr(key)
- # I offer this chicken to the gods of polymorphism. May they
- # choke on it.
- case value
- when String
- type = :longstr
- desc = "S"
- when Numeric
- type = :long
- desc = "I"
- else
- raise Exception.new("unknown table value: #{value.class}")
- end
- enc.write(desc)
- enc.encode(type, value)
- }
- longstr(enc.out.to_s())
- end
-
- def write(str)
- flushbits()
- @out.write(str)
- # puts "OUT #{str.inspect()}"
- end
-
- def pack(fmt, *args)
- write(args.pack(fmt))
- end
-
- def flush()
- flushbits()
- end
-
- private
-
- def flushbits()
- if @bits.empty? then return end
-
- bytes = []
- index = 0
- @bits.each {|b|
- bytes << 0 if index == 0
- if b then bytes[-1] |= 1 << index end
- index = (index + 1) % 8
- }
- @bits.clear()
- bytes.each {|b|
- octet(b)
- }
- end
-
- end
-
- class StringReader
-
- def initialize(str)
- @str = str
- @index = 0
- end
-
- def read(n)
- result = @str[@index, n]
- @index += result.length
- return result
- end
-
- end
-
- class Decoder
-
- def initialize(_in)
- @in = _in
- @bits = []
- end
-
- def decode(type)
- return send(type)
- end
-
- def bit()
- if @bits.empty?
- byte = octet()
- 7.downto(0) {|i|
- @bits << (byte[i] == 1)
- }
- end
- return @bits.pop()
- end
-
- def octet()
- return unpack("C", 1)
- end
-
- def short()
- return unpack("n", 2)
- end
-
- def long()
- return unpack("N", 4)
- end
-
- def longlong()
- upper = long()
- lower = long()
- return upper << 32 | lower
- end
-
- def timestamp()
- return longlong()
- end
-
- def shortstr()
- # shortstr is actually octetstr
- return read(octet())
- end
-
- def longstr()
- return read(long())
- end
-
- def table()
- dec = Decoder.new(StringReader.new(longstr()))
- result = {}
- while true
- begin
- key = dec.shortstr()
- rescue EOF
- break
- end
- desc = dec.read(1)
- case desc
- when "S"
- value = dec.longstr()
- when "I"
- value = dec.long()
- else
- raise Exception.new("unrecognized descriminator: #{desc.inspect()}")
- end
- result[key] = value
- end
- return result
- end
-
- def read(n)
- return "" if n == 0
- result = @in.read(n)
- if result.nil? or result.empty?
- raise EOF.new()
- else
- # puts " IN #{result.inspect()}"
- return result
- end
- end
-
- def unpack(fmt, size)
- result = read(size).unpack(fmt)
- if result.length == 1
- return result[0]
- else
- return result
- end
- end
-
- end
-
-end
diff --git a/qpid/ruby/lib/qpid/config.rb b/qpid/ruby/lib/qpid/config.rb
deleted file mode 100644
index b5b79cd309..0000000000
--- a/qpid/ruby/lib/qpid/config.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-module Qpid
- module Config
-
- def self.amqp_spec
- dirs = [File::expand_path(File::join(File::dirname(__FILE__), "specs"))]
- dirs.each do |d|
- spec = File::join(d, "amqp.0-10-qpid-errata.xml")
- return spec if File::exists? spec
- end
- end
-
- end
-end
diff --git a/qpid/ruby/lib/qpid/connection.rb b/qpid/ruby/lib/qpid/connection.rb
deleted file mode 100644
index d2efbfb263..0000000000
--- a/qpid/ruby/lib/qpid/connection.rb
+++ /dev/null
@@ -1,222 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require 'monitor'
-
-module Qpid
-
- class ChannelBusy< Exception ; end
-
- class ChannelsBusy < Exception ; end
-
- class SessionBusy < Exception ; end
-
- class ConnectionFailed < Exception ; end
-
- class Timeout < Exception ; end
-
- class Connection < Assembler
-
- include MonitorMixin
-
- attr_reader :spec, :attached, :sessions, :thread
- attr_accessor :opened, :failed, :close_code, :user_id
-
- def initialize(sock, args={})
- super(sock)
-
- delegate = args[:delegate] || Qpid::Delegate::Client.method(:new)
- spec = args[:spec] || nil
-
- @spec = Qpid::Spec010::load(spec)
- @track = @spec["track"]
-
- @attached = {}
- @sessions = {}
-
- @condition = new_cond
- @opened = false
- @failed = false
- @close_code = [nil, "connection aborted"]
-
- @thread = nil
-
- @channel_max = 65535
- @user_id = nil
-
- @delegate = delegate.call(self, args)
- end
-
- def attach(name, ch, delegate, force=false)
- synchronize do
- ssn = @attached[ch.id]
- if ssn
- raise ChannelBusy.new(ch, ssn) unless ssn.name == name
- else
- ssn = @sessions[name]
- if ssn.nil?
- ssn = Session.new(name, @spec, :delegate => delegate)
- @sessions[name] = ssn
- elsif ssn.channel
- if force
- @attached.delete(ssn.channel.id)
- ssn.channel = nil
- else
- raise SessionBusy.new(ssn)
- end
- end
- @attached[ch.id] = ssn
- ssn.channel = ch
- end
- ch.session = ssn
- return ssn
- end
- end
-
- def detach(name, ch)
- synchronize do
- @attached.delete(ch.id)
- ssn = @sessions.delete(name)
- if ssn
- ssn.channel = nil
- ssn.closed
- return ssn
- end
- end
- end
-
- def session(name, kwargs = {})
- timeout = kwargs[:timeout]
- delegate = kwargs[:delegate] || Qpid::Session::Client.method(:new)
-
- # FIXME: Python has cryptic comment about 'ch 0 ?'
- channel = (0..@channel_max).detect { |i| ! @attached.key?(i) }
- raise ChannelsBusy unless channel
-
- synchronize do
- ch = Channel.new(self, channel)
- ssn = attach(name, ch, delegate)
- ssn.channel.session_attach(name)
- if ssn.wait_for(timeout) { ssn.channel }
- return ssn
- else
- detach(name, ch)
- raise Timeout
- end
- end
- end
-
- def detach_all
- synchronize do
- attached.values.each do |ssn|
- ssn.exceptions << @close_code unless @close_code[0] == 200
- detach(ssn.name, ssn.channel)
- end
- end
- end
-
- def start(timeout=nil)
- @delegate.start
- @thread = Thread.new { run }
- @thread[:name] = 'conn'
- synchronize do
- unless @condition.wait_for(timeout) { @opened || @failed }
- raise Timeout
- end
- end
- if @failed
- raise ConnectionFailed.new(@close_code)
- end
- end
-
- def run
- # XXX: we don't really have a good way to exit this loop without
- # getting the other end to kill the socket
- loop do
- begin
- seg = read_segment
- rescue Qpid::Closed => e
- detach_all
- break
- end
- @delegate.received(seg)
- end
- end
-
- def close(timeout=nil)
- return unless @opened
- Channel.new(self, 0).connection_close(200)
- synchronize do
- unless @condition.wait_for(timeout) { ! @opened }
- raise Timeout
- end
- end
- @thread.join(timeout)
- @thread = nil
- end
-
- def signal
- synchronize { @condition.signal }
- end
-
- def to_s
- # FIXME: We'd like to report something like HOST:PORT
- return @sock.to_s
- end
-
- class Channel < Invoker
-
- attr_reader :id, :connection
- attr_accessor :session
-
- def initialize(connection, id)
- @connection = connection
- @id = id
- @session = nil
- end
-
- def resolve_method(name)
- inst = @connection.spec[name]
- if inst.is_a?(Qpid::Spec010::Control)
- return invocation(:method, inst)
- else
- return invocation(:error, nil)
- end
- end
-
- def invoke(type, args)
- ctl = type.create(*args)
- sc = StringCodec.new(@connection.spec)
- sc.write_control(ctl)
- @connection.write_segment(Segment.new(true, true, type.segment_type,
- type.track, self.id, sc.encoded))
-
- log = Qpid::logger["qpid.io.ctl"]
- log.debug("SENT %s", ctl) if log
- end
-
- def to_s
- return "#{@connection}[#{@id}]"
- end
-
- end
-
- end
-
-end
diff --git a/qpid/ruby/lib/qpid/connection08.rb b/qpid/ruby/lib/qpid/connection08.rb
deleted file mode 100644
index 09a4888cc4..0000000000
--- a/qpid/ruby/lib/qpid/connection08.rb
+++ /dev/null
@@ -1,252 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "socket"
-require "qpid/codec08"
-
-module Qpid08
-
- class Connection
-
- def initialize(host, port, spec)
- @host = host
- @port = port
- @spec = spec
- end
-
- attr_reader(:host, :port, :spec)
-
- def connect()
- @sock = TCPSocket.open(@host, @port)
- @out = Encoder.new(@sock)
- @in = Decoder.new(@sock)
- end
-
- def init()
- @out.write("AMQP")
- [1, 1, @spec.major, @spec.minor].each {|o|
- @out.octet(o)
- }
- end
-
- def write(frame)
- # puts "OUT #{frame.inspect()}"
- @out.octet(@spec.constants[frame.payload.type].id)
- @out.short(frame.channel)
- frame.payload.encode(@out)
- @out.octet(frame_end)
- end
-
- def read()
- type = @spec.constants[@in.octet()].name
- channel = @in.short()
- payload = Payload.decode(type, @spec, @in)
- oct = @in.octet()
- if oct != frame_end
- raise Exception.new("framing error: expected #{frame_end}, got #{oct}")
- end
- frame = Frame.new(channel, payload)
- # puts " IN #{frame.inspect}"
- return frame
- end
-
- private
-
- def frame_end
- @spec.constants[:"frame_end"].id
- end
-
- end
-
- class Frame
-
- def initialize(channel, payload)
- @channel = channel
- @payload = payload
- end
-
- attr_reader(:channel, :payload)
-
- end
-
- class Payload
-
- TYPES = {}
-
- def Payload.singleton_method_added(name)
- if name == :type
- TYPES[type] = self
- end
- end
-
- def Payload.decode(type, spec, dec)
- klass = TYPES[type]
- klass.decode(spec, dec)
- end
-
- end
-
- class Method < Payload
-
- def initialize(method, args)
- if args.size != method.fields.size
- raise ArgumentError.new("argument mismatch #{method} #{args}")
- end
- @method = method
- @args = args
- end
-
- attr_reader(:method, :args)
-
- def Method.type; :frame_method end
-
- def type; Method.type end
-
- def encode(encoder)
- buf = StringWriter.new()
- enc = Encoder.new(buf)
- enc.short(@method.parent.id)
- enc.short(@method.id)
- @method.fields.zip(self.args).each {|f, a|
- if a.nil?; a = f.default end
- enc.encode(f.type, a)
- }
- enc.flush()
- encoder.longstr(buf.to_s)
- end
-
- def Method.decode(spec, decoder)
- buf = decoder.longstr()
- dec = Decoder.new(StringReader.new(buf))
- klass = spec.classes[dec.short()]
- meth = klass.methods[dec.short()]
- args = meth.fields.map {|f| dec.decode(f.type)}
- return Method.new(meth, args)
- end
-
- def inspect(); "#{method.qname}(#{args.join(", ")})" end
-
- end
-
- class Header < Payload
-
- def Header.type; :frame_header end
-
- def initialize(klass, weight, size, properties)
- @klass = klass
- @weight = weight
- @size = size
- @properties = properties
- end
-
- attr_reader :weight, :size, :properties
-
- def type; Header.type end
-
- def encode(encoder)
- buf = StringWriter.new()
- enc = Encoder.new(buf)
- enc.short(@klass.id)
- enc.short(@weight)
- enc.longlong(@size)
-
- # property flags
- nprops = @klass.fields.size
- flags = 0
- 0.upto(nprops - 1) do |i|
- f = @klass.fields[i]
- flags <<= 1
- flags |= 1 unless @properties[f.name].nil?
- # the last bit indicates more flags
- if i > 0 and (i % 15) == 0
- flags <<= 1
- if nprops > (i + 1)
- flags |= 1
- enc.short(flags)
- flags = 0
- end
- end
- end
- flags <<= ((16 - (nprops % 15)) % 16)
- enc.short(flags)
-
- # properties
- @klass.fields.each do |f|
- v = @properties[f.name]
- enc.encode(f.type, v) unless v.nil?
- end
- enc.flush()
- encoder.longstr(buf.to_s)
- end
-
- def Header.decode(spec, decoder)
- dec = Decoder.new(StringReader.new(decoder.longstr()))
- klass = spec.classes[dec.short()]
- weight = dec.short()
- size = dec.longlong()
-
- # property flags
- bits = []
- while true
- flags = dec.short()
- 15.downto(1) do |i|
- if flags >> i & 0x1 != 0
- bits << true
- else
- bits << false
- end
- end
- break if flags & 0x1 == 0
- end
-
- # properties
- properties = {}
- bits.zip(klass.fields).each do |b, f|
- properties[f.name] = dec.decode(f.type) if b
- end
- return Header.new(klass, weight, size, properties)
- end
-
- def inspect(); "#{@klass.name}(#{@properties.inspect()})" end
-
- end
-
- class Body < Payload
-
- def Body.type; :frame_body end
-
- def type; Body.type end
-
- def initialize(content)
- @content = content
- end
-
- attr_reader :content
-
- def encode(enc)
- enc.longstr(@content)
- end
-
- def Body.decode(spec, dec)
- return Body.new(dec.longstr())
- end
-
- end
-
-end
diff --git a/qpid/ruby/lib/qpid/datatypes.rb b/qpid/ruby/lib/qpid/datatypes.rb
deleted file mode 100644
index 418388c73a..0000000000
--- a/qpid/ruby/lib/qpid/datatypes.rb
+++ /dev/null
@@ -1,353 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-module Qpid
-
- def self.struct(type, *args)
- # FIXME: This is fragile; the last arg could be a hash,
- # without being hte keywords
- kwargs = {}
- kwargs = args.pop if args.any? && args[-1].is_a?(Hash)
-
- if args.size > type.fields.size
- raise TypeError,
- "%s() takes at most %d arguments (%d given)" %
- [type.name, type.fields.size, args.size]
- end
-
- attrs = type.fields.inject({}) do |attrs, field|
- if args.any?
- attrs[field.name] = args.shift
- if kwargs.key?(field.name)
- raise TypeError,
- "%s() got multiple values for keyword argument '%s'" %
- [type.name, field.name]
- end
- elsif kwargs.key?(field.name)
- attrs[field.name] = kwargs.delete(field.name)
- else
- attrs[field.name] = field.default
- end
- attrs
- end
-
- unless kwargs.empty?
- unexpected = kwargs.keys[0]
- raise TypeError,
- "%s() got an unexpected keyword argument '%s'" %
- [type.name, unexpected]
- end
-
- attrs[:st_type] = type
- attrs[:id] = nil
-
- name = "Qpid_" + type.name.to_s.capitalize
- unless ::Struct.const_defined?(name)
- vars = type.fields.collect { |f| f.name } << :st_type << :id
- ::Struct.new(name, *vars)
- end
- st = ::Struct.const_get(name)
-
- result = st.new
- attrs.each { |k, v| result[k] = v }
- return result
- end
-
- class Message
-
- attr_accessor :headers, :body, :id
-
- def initialize(*args)
- @body = nil
- @headers = nil
-
- @body = args.pop unless args.empty?
- @headers = args unless args.empty?
-
- @id = nil
- end
-
- def has(name)
- return ! get(name).nil?
- end
-
- def get(name)
- if @headers
- name = name.to_sym
- @headers.find { |h| h.st_type.name == name }
- end
- end
-
- def set(header)
- @headers ||= []
- if h = @headers.find { |h| h.st_type == header.st_type }
- ind = @headers.index(h)
- @headers[ind] = header
- else
- @headers << header
- end
- end
-
- def clear(name)
- if @headers
- name = name.to_sym
- @headers.delete_if { |h| h.st_type.name == name }
- end
- end
-
- # FIXME: Not sure what to do here
- # Ruby doesn't have a notion of a evaluable string representation
- # def __repr__(self):
- # args = []
- # if self.headers:
- # args.extend(map(repr, self.headers))
- # if self.body:
- # args.append(repr(self.body))
- # if self.id is not None:
- # args.append("id=%s" % self.id)
- # return "Message(%s)" % ", ".join(args)
- # end
- end
-
- class ::Object
-
- def to_serial
- Qpid::Serial.new(self)
- end
- end
-
- class Serial
-
- include Comparable
-
- attr_accessor :value
-
- def initialize(value)
- @value = value & 0xFFFFFFFF
- end
-
- def hash
- @value.hash
- end
-
- def to_serial
- self
- end
-
- def eql?(other)
- other = other.to_serial
- value.eql?(other.value)
- end
-
- def <=>(other)
- return 1 if other.nil?
-
- other = other.to_serial
-
- delta = (value - other.value) & 0xFFFFFFFF
- neg = delta & 0x80000000
- mag = delta & 0x7FFFFFFF
-
- return (neg>0) ? -mag : mag
- end
-
- def +(other)
- result = other.to_serial
- result.value += value
- return result
- end
-
- def -(other)
- result = other.to_serial
- result.value = value - result.value
- return result
- end
-
- def succ
- Serial.new(value + 1)
- end
-
- # FIXME: Not sure what to do here
- # Ruby doesn't have a notion of a evaluable string representation
- # def __repr__(self):
- # return "serial(%s)" % self.value
- # end
-
- def to_s
- value.to_s
- end
-
- end
-
- # The Python class datatypes.Range is emulated by the standard
- # Range class with a few additions
- class ::Range
-
- alias :lower :begin
- alias :upper :end
-
- def touches(r)
- # XXX: are we doing more checks than we need?
- return (r.include?(lower - 1) ||
- r.include?(upper + 1) ||
- include?(r.lower - 1) ||
- include?(r.upper + 1) ||
- r.include?(lower) ||
- r.include?(upper) ||
- include?(r.lower) ||
- include?(r.upper))
- end
-
- def span(r)
- Range.new([lower, r.lower].min, [upper, r.upper].max)
- end
-
- def intersect(r)
- l = [lower, r.lower].max
- u = [upper, r.upper].min
- return l > u ? nil : Range.new(l, u)
- end
-
- end
-
- class RangedSet
-
- include Enumerable
-
- attr_accessor :ranges
-
- def initialize(*args)
- @ranges = []
- args.each { |n| add(n) }
- end
-
- def each(&block)
- ranges.each { |r| yield(r) }
- end
-
- def include?(n)
- if (n.is_a?(Range))
- super(n)
- else
- ranges.find { |r| r.include?(n) }
- end
- end
-
- def add_range(range)
- ranges.delete_if do |r|
- if range.touches(r)
- range = range.span(r)
- true
- else
- false
- end
- end
- ranges << range
- end
-
- def add(lower, upper = nil)
- upper = lower if upper.nil?
- add_range(Range.new(lower, upper))
- end
-
- def to_s
- repr = ranges.sort { |a,b| b.lower <=> a.lower }.
- map { |r| r.to_s }.join(",")
- "<RangedSet: {#{repr}}"
- end
- end
-
- class Future
- def initialize(initial=nil, exception=Exception)
- @value = initial
- @error = nil
- @set = Util::Event.new
- @exception = exception
- end
-
- def error(error)
- @error = error
- @set.set
- end
-
- def set(value)
- @value = value
- @set.set
- end
-
- def get(timeout=nil)
- @set.wait(timeout)
- unless @error.nil?
- raise @exception.new(@error)
- end
- @value
- end
- end
-
- class UUID
- include Comparable
-
- attr_accessor :bytes
-
- def initialize(bytes)
- @bytes = bytes
- end
-
- def <=>(other)
- if other.respond_to?(:bytes)
- return bytes <=> other.bytes
- else
- raise NotImplementedError
- end
- end
-
- def to_s
- UUID::format(bytes)
- end
-
- # FIXME: Not sure what to do here
- # Ruby doesn't have a notion of a evaluable string representation
- # def __repr__(self):
- # return "UUID(%r)" % str(self)
- # end
-
- def self.random_uuid
- bytes = (1..16).collect { |i| rand(256) }
-
- # From RFC4122, the version bits are set to 0100
- bytes[7] &= 0x0F
- bytes[7] |= 0x40
-
- # From RFC4122, the top two bits of byte 8 get set to 01
- bytes[8] &= 0x3F
- bytes[8] |= 0x80
- return bytes.pack("C16")
- end
-
- def self.uuid4
- UUID.new(random_uuid)
- end
-
- def self.format(s)
- # Python format !LHHHHL
- # big-endian, ulong, ushort x 4, ulong
- "%08x-%04x-%04x-%04x-%04x%08x" % s.unpack("NnnnnN")
- end
- end
-end
diff --git a/qpid/ruby/lib/qpid/delegates.rb b/qpid/ruby/lib/qpid/delegates.rb
deleted file mode 100644
index f779047e05..0000000000
--- a/qpid/ruby/lib/qpid/delegates.rb
+++ /dev/null
@@ -1,237 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require 'rbconfig'
-require 'sasl'
-
-module Qpid
-
- class Delegate
-
- def initialize(connection, args={})
- @connection = connection
- @spec = connection.spec
- @delegate = args[:delegate] || Qpid::Delegate::Client.method(:new)
- @control = @spec[:track].enum[:control].value
- end
-
- def log ; Qpid::logger["qpid.io.ctl"]; end
-
- def received(seg)
- ssn = @connection.attached[seg.channel]
- unless ssn
- ch = Qpid::Connection::Channel.new(@connection, seg.channel)
- else
- ch = ssn.channel
- end
-
- if seg.track == @control
- ctl = seg.decode(@spec)
- log.debug("RECV %s", ctl) if log
- attr = ctl.st_type.name
- method(attr).call(ch, ctl)
- elsif ssn.nil?
- ch.session_detached
- else
- ssn.received(seg)
- end
- end
-
- def connection_close(ch, close)
- @connection.close_code = [close.reply_code, close.reply_text]
- ch.connection_close_ok
- @connection.sock.close_write()
- unless @connection.opened
- @connection.failed = true
- @connection.signal
- end
- end
-
- def connection_close_ok(ch, close_ok)
- @connection.opened = false
- @connection.signal
- end
-
- def session_attach(ch, a)
- begin
- @connection.attach(a.name, ch, @delegate, a.force)
- ch.session_attached(a.name)
- rescue Qpid::ChannelBusy
- ch.session_detached(a.name)
- rescue Qpid::SessionBusy
- ch.session_detached(a.name)
- end
- end
-
- def session_attached(ch, a)
- ch.session.signal
- end
-
- def session_detach(ch, d)
- #send back the confirmation of detachment before removing the
- #channel from the attached set; this avoids needing to hold the
- #connection lock during the sending of this control and ensures
- #that if the channel is immediately reused for a new session the
- #attach request will follow the detached notification.
- ch.session_detached(d.name)
- ssn = @connection.detach(d.name, ch)
- end
-
- def session_detached(ch, d)
- @connection.detach(d.name, ch)
- end
-
- def session_request_timeout(ch, rt)
- ch.session_timeout(rt.timeout)
- end
-
- def session_command_point(ch, cp)
- ssn = ch.session
- ssn.receiver.next_id = cp.command_id
- ssn.receiver.next_offset = cp.command_offset
- end
-
- def session_completed(ch, cmp)
- ch.session.sender.has_completed(cmp.commands)
- if cmp.timely_reply
- ch.session_known_completed(cmp.commands)
- end
- ch.session.signal
- end
-
- def session_known_completed(ch, kn_cmp)
- ch.session.receiver.known_completed(kn_cmp.commands)
- end
-
- def session_flush(ch, f)
- rcv = ch.session.receiver
- if f.expected
- if rcv.next_id
- exp = Qpid::RangedSet.new(rcv.next_id)
- else
- exp = nil
- end
- ch.session_expected(exp)
- end
- if f.confirmed
- ch.session_confirmed(rcv.completed)
- end
- if f.completed
- ch.session_completed(rcv.completed)
- end
- end
-
- class Server < Delegate
-
- def start
- @connection.read_header()
- @connection.write_header(@spec.major, @spec.minor)
- ch = Qpid::Connection::Channel.new(@connection, 0)
- ch.connection_start(:mechanisms => ["ANONYMOUS"])
- ch
- end
-
- def connection_start_ok(ch, start_ok)
- ch.connection_tune(:channel_max => 65535)
- end
-
- def connection_tune_ok(ch, tune_ok)
- nil
- end
-
- def connection_open(ch, open)
- @connection.opened = true
- ch.connection_open_ok()
- @connection.signal
- end
- end
-
- class Client < Delegate
-
- # FIXME: Python uses os.name for platform - we don't have an exact
- # analog in Ruby
- PROPERTIES = {"product" => "qpid python client",
- "version" => "development",
- "platform" => Config::CONFIG["build_os"],
- "qpid.client_process" => File.basename($0),
- "qpid.client_pid" => Process.pid,
- "qpid.client_ppid" => Process.ppid}
-
-
- def initialize(connection, args)
- super(connection)
-
- result = Sasl::client_init
-
- @mechanism= args[:mechanism]
- @username = args[:username]
- @password = args[:password]
- @service = args[:service] || "qpidd"
- @min_ssf = args[:min_ssf] || 0
- @max_ssf = args[:max_ssf] || 65535
-
- @saslConn = Sasl.client_new(@mechanism, @service, args[:host],
- @username, @password, @min_ssf, @max_ssf)
- end
-
- def start
- @connection.write_header(@spec.major, @spec.minor)
- @connection.read_header
- end
-
- def connection_start(ch, start)
- mech_list = ""
- start.mechanisms.each do |m|
- mech_list += m + " "
- end
- begin
- resp = Sasl.client_start(@saslConn, mech_list)
- @connection.user_id = Sasl.user_id(@saslConn)
- ch.connection_start_ok(:client_properties => PROPERTIES,
- :mechanism => resp[2],
- :response => resp[1])
- rescue exception
- ch.connection_close(:message => $!.message)
- @connection.failed = true
- @connection.signal
- end
- end
-
- def connection_secure(ch, secure)
- resp = Sasl.client_step(@saslConn, secure.challenge)
- @connection.user_id = Sasl.user_id(@saslConn)
- ch.connection_secure_ok(:response => resp[1])
- end
-
- def connection_tune(ch, tune)
- ch.connection_tune_ok(:channel_max => tune.channel_max,
- :max_frame_size => tune.max_frame_size,
- :heartbeat => 0)
- ch.connection_open()
- @connection.security_layer_tx = @saslConn
- end
-
- def connection_open_ok(ch, open_ok)
- @connection.security_layer_rx = @saslConn
- @connection.opened = true
- @connection.signal
- end
- end
- end
-end
diff --git a/qpid/ruby/lib/qpid/framer.rb b/qpid/ruby/lib/qpid/framer.rb
deleted file mode 100644
index d057605383..0000000000
--- a/qpid/ruby/lib/qpid/framer.rb
+++ /dev/null
@@ -1,212 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require 'monitor'
-require 'logger'
-require 'sasl'
-
-module Qpid
-
- FIRST_SEG = 0x08
- LAST_SEG = 0x04
- FIRST_FRM = 0x02
- LAST_FRM = 0x01
-
- class << self
- attr_accessor :raw_logger, :frm_logger
- end
-
- def self.packed_size(format)
- # FIXME: This is a total copout to simulate Python's
- # struct.calcsize
- ([0]*256).pack(format).size
- end
-
- class Frame
- attr_reader :payload, :track, :flags, :type, :channel
-
- # HEADER = "!2BHxBH4x"
- # Python Meaning Ruby
- # ! big endian (implied by format char)
- # 2B 2 uchar C2
- # H unsigned short n
- # x pad byte x
- # B uchar C
- # H unsigned short n
- # 4x pad byte x4
- HEADER = "C2nxCnx4"
- HEADER_SIZE = Qpid::packed_size(HEADER)
- MAX_PAYLOAD = 65535 - HEADER_SIZE
-
- def initialize(flags, type, track, channel, payload)
- if payload.size > MAX_PAYLOAD
- raise ArgumentError, "max payload size exceeded: #{payload.size}"
- end
-
- @flags = flags
- @type = type
- @track = track
- @channel = channel
- @payload = payload
- end
-
- def first_segment? ; FIRST_SEG & @flags > 0 ; end
-
- def last_segment? ; LAST_SEG & @flags > 0 ; end
-
- def first_frame? ; FIRST_FRM & @flags > 0 ; end
-
- def last_frame? ; LAST_FRM & @flags > 0 ; end
-
- def to_s
- fs = first_segment? ? 'S' : '.'
- ls = last_segment? ? 's' : '.'
- ff = first_frame? ? 'F' : '.'
- lf = last_frame? ? 'f' : '.'
-
- return "%s%s%s%s %s %s %s %s" % [fs, ls, ff, lf,
- @type,
- @track,
- @channel,
- @payload.inspect]
- end
- end
-
- class FramingError < Exception ; end
-
- class Closed < Exception ; end
-
- class Framer
- include Packer
-
- # Python: "!4s4B"
- HEADER = "a4C4"
- HEADER_SIZE = 8
-
- def raw
- Qpid::raw_logger
- end
-
- def frm
- Qpid::frm_logger
- end
-
- def initialize(sock)
- @sock = sock
- @sock.extend(MonitorMixin)
- @tx_buf = ""
- @rx_buf = ""
- @security_layer_tx = nil
- @security_layer_rx = nil
- @maxbufsize = 65535
- end
-
- attr_reader :sock
- attr_accessor :security_layer_tx, :security_layer_rx
-
- def aborted? ; false ; end
-
- def write(buf)
- @tx_buf += buf
- end
-
- def flush
- @sock.synchronize do
- if @security_layer_tx
- cipher_buf = Sasl.encode(@security_layer_tx, @tx_buf)
- _write(cipher_buf)
- else
- _write(@tx_buf)
- end
- @tx_buf = ""
- frm.debug("FLUSHED") if frm
- end
- rescue
- @sock.close unless @sock.closed?
- end
-
- def _write(buf)
- while buf && buf.size > 0
- # FIXME: Catch errors
- n = @sock.write(buf)
- raw.debug("SENT #{buf[0, n].inspect}") if raw
- buf[0,n] = ""
- @sock.flush
- end
- end
-
- def read(n)
- while @rx_buf.size < n
- begin
- s = @sock.recv(@maxbufsize)
- if @security_layer_rx
- s = Sasl.decode(@security_layer_rx, s)
- end
- rescue IOError => e
- raise e if @rx_buf != ""
- @sock.close unless @sock.closed?
- raise Closed
- end
- # FIXME: Catch errors
- if s.nil? or s.size == 0
- @sock.close unless @sock.closed?
- raise Closed
- end
- @rx_buf += s
- raw.debug("RECV #{n}/#{@rx_buf.size} #{s.inspect}") if raw
- end
- data = @rx_buf[0, n]
- @rx_buf = @rx_buf[n, @rx_buf.size - n]
- return data
- end
-
- def read_header
- unpack(Framer::HEADER, Framer::HEADER_SIZE)
- end
-
- def write_header(major, minor)
- @sock.synchronize do
- pack(Framer::HEADER, "AMQP", 1, 1, major, minor)
- flush()
- end
- end
-
- def write_frame(frame)
- @sock.synchronize do
- size = frame.payload.size + Frame::HEADER_SIZE
- track = frame.track & 0x0F
- pack(Frame::HEADER, frame.flags, frame.type, size, track, frame.channel)
- write(frame.payload)
- if frame.last_segment? and frame.last_frame?
- flush()
- frm.debug("SENT #{frame}") if frm
- end
- end
- end
-
- def read_frame
- flags, type, size, track, channel = unpack(Frame::HEADER, Frame::HEADER_SIZE)
- raise FramingError if (flags & 0xF0 > 0)
- payload = read(size - Frame::HEADER_SIZE)
- frame = Frame.new(flags, type, track, channel, payload)
- frm.debug("RECV #{frame}") if frm
- return frame
- end
- end
-end
diff --git a/qpid/ruby/lib/qpid/invoker.rb b/qpid/ruby/lib/qpid/invoker.rb
deleted file mode 100644
index 39716ac6c2..0000000000
--- a/qpid/ruby/lib/qpid/invoker.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-class Qpid::Invoker
-
- # Requires that client defines a invoke method and overrides
- # resolve_method
-
- # FIXME: Is it really worth defining methods in method_missing ? We
- # could just dispatch there directly
-
- def invc_method(name, resolved)
- define_singleton_method(name) { |*args| invoke(resolved, args) }
- # FIXME: the Python code also attaches docs from resolved.pydoc
- end
-
- def invc_value(name, resolved)
- define_singleton_method(name) { | | resolved }
- end
-
- def invc_error(name, resolved)
- msg = "%s instance has no attribute '%s'" % [self.class.name, name]
- if resolved
- msg += "\n%s" % resolved
- end
- raise NameError, msg
- end
-
- def resolve_method(name)
- invocation(:error, nil)
- end
-
- def method_missing(name, *args)
- disp, resolved = resolve_method(name)
- disp.call(name, resolved)
- send(name, *args)
- end
-
- def invocation(kind, name = nil)
- [ method("invc_#{kind}"), name ]
- end
-
- private
- def define_singleton_method(name, &body)
- singleton_class = class << self; self; end
- singleton_class.send(:define_method, name, &body)
- end
-
-end
diff --git a/qpid/ruby/lib/qpid/peer.rb b/qpid/ruby/lib/qpid/peer.rb
deleted file mode 100644
index cdb962169b..0000000000
--- a/qpid/ruby/lib/qpid/peer.rb
+++ /dev/null
@@ -1,289 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "thread"
-require "qpid/queue"
-require "qpid/connection08"
-require "qpid/fields"
-
-module Qpid08
-
- Queue = Qpid::Queue
-
- class Peer
-
- def initialize(conn, delegate)
- @conn = conn
- @delegate = delegate
- @outgoing = Queue.new()
- @work = Queue.new()
- @channels = {}
- @mutex = Mutex.new()
- end
-
- def channel(id)
- @mutex.synchronize do
- ch = @channels[id]
- if ch.nil?
- ch = Channel.new(id, self, @outgoing, @conn.spec)
- @channels[id] = ch
- end
- return ch
- end
- end
-
- def channel_delete(id)
- @channels.delete(id)
- end
-
- def start()
- spawn(:writer)
- spawn(:reader)
- spawn(:worker)
- end
-
- def close()
- @mutex.synchronize do
- @channels.each_value do |ch|
- ch.close()
- end
- @outgoing.close()
- @work.close()
- end
- end
-
- private
-
- def spawn(method, *args)
- Thread.new do
- begin
- send(method, *args)
- # is this the standard way to catch any exception?
- rescue Closed => e
- puts "#{method} #{e}"
- rescue Object => e
- print e
- e.backtrace.each do |line|
- print "\n ", line
- end
- print "\n"
- end
- end
- end
-
- def reader()
- while true
- frame = @conn.read()
- ch = channel(frame.channel)
- ch.dispatch(frame, @work)
- end
- end
-
- def writer()
- while true
- @conn.write(@outgoing.get())
- end
- end
-
- def worker()
- while true
- dispatch(@work.get())
- end
- end
-
- def dispatch(queue)
- frame = queue.get()
- ch = channel(frame.channel)
- payload = frame.payload
- if payload.method.content?
- content = Qpid08::read_content(queue)
- else
- content = nil
- end
-
- message = Message.new(payload.method, payload.args, content)
- @delegate.dispatch(ch, message)
- end
-
- end
-
- class Channel
- def initialize(id, peer, outgoing, spec)
- @id = id
- @peer = peer
- @outgoing = outgoing
- @spec = spec
- @incoming = Queue.new()
- @responses = Queue.new()
- @queue = nil
- @closed = false
- end
-
- attr_reader :id
-
- def closed?; @closed end
-
- def close()
- return if closed?
- @peer.channel_delete(@id)
- @closed = true
- @incoming.close()
- @responses.close()
- end
-
- def dispatch(frame, work)
- payload = frame.payload
- case payload
- when Method
- if payload.method.response?
- @queue = @responses
- else
- @queue = @incoming
- work << @incoming
- end
- end
- @queue << frame
- end
-
- def method_missing(name, *args)
- method = @spec.find_method(name)
- if method.nil?
- raise NoMethodError.new("undefined method '#{name}' for #{self}:#{self.class}")
- end
-
- if args.size == 1 and args[0].instance_of? Hash
- kwargs = args[0]
- invoke_args = method.fields.map do |f|
- kwargs[f.name]
- end
- content = kwargs[:content]
- else
- invoke_args = []
- method.fields.each do |f|
- if args.any?
- invoke_args << args.shift()
- else
- invoke_args << f.default
- end
- end
- if method.content? and args.any?
- content = args.shift()
- else
- content = nil
- end
- if args.any? then raise ArgumentError.new("#{args.size} extr arguments") end
- end
- return invoke(method, invoke_args, content)
- end
-
- def invoke(method, args, content = nil)
- raise Closed() if closed?
- frame = Frame.new(@id, Method.new(method, args))
- @outgoing << frame
-
- if method.content?
- content = Content.new() if content.nil?
- write_content(method.parent, content, @outgoing)
- end
-
- nowait = false
- f = method.fields[:"nowait"]
- nowait = args[method.fields.index(f)] unless f.nil?
-
- unless nowait or method.responses.empty?
- resp = @responses.get().payload
- if resp.method.content?
- content = read_content(@responses)
- else
- content = nil
- end
- if method.responses.include? resp.method
- return Message.new(resp.method, resp.args, content)
- else
- # XXX: ValueError doesn't actually exist
- raise ValueError.new(resp)
- end
- end
- end
-
- def write_content(klass, content, queue)
- size = content.size
- header = Frame.new(@id, Header.new(klass, content.weight, size, content.headers))
- queue << header
- content.children.each {|child| write_content(klass, child, queue)}
- queue << Frame.new(@id, Body.new(content.body)) if size > 0
- end
-
- end
-
- def Qpid08.read_content(queue)
- frame = queue.get()
- header = frame.payload
- children = []
- 1.upto(header.weight) { children << read_content(queue) }
- size = header.size
- read = 0
- buf = ""
- while read < size
- body = queue.get()
- content = body.payload.content
- buf << content
- read += content.size
- end
- buf.freeze()
- return Content.new(header.properties.clone(), buf, children)
- end
-
- class Content
- def initialize(headers = {}, body = "", children = [])
- @headers = headers
- @body = body
- @children = children
- end
-
- attr_reader :headers, :body, :children
-
- def size; body.size end
- def weight; children.size end
-
- def [](key); @headers[key] end
- def []=(key, value); @headers[key] = value end
- end
-
- class Message
- fields(:method, :args, :content)
-
- alias fields args
-
- def method_missing(name)
- return args[@method.fields[name].id]
- end
-
- def inspect()
- "#{method.qname}(#{args.join(", ")})"
- end
- end
-
- module Delegate
- def dispatch(ch, msg)
- send(msg.method.qname, ch, msg)
- end
- end
-
-end
diff --git a/qpid/ruby/lib/qpid/qmf.rb b/qpid/ruby/lib/qpid/qmf.rb
deleted file mode 100644
index 4711d355cd..0000000000
--- a/qpid/ruby/lib/qpid/qmf.rb
+++ /dev/null
@@ -1,1957 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# Console API for Qpid Management Framework
-
-require 'socket'
-require 'monitor'
-require 'thread'
-require 'uri'
-require 'time'
-
-module Qpid::Qmf
-
- # To access the asynchronous operations, a class must be derived from
- # Console with overrides of any combination of the available methods.
- class Console
-
- # Invoked when a connection is established to a broker
- def broker_connected(broker); end
-
- # Invoked when the connection to a broker is lost
- def broker_disconnected(broker); end
-
- # Invoked when a QMF package is discovered
- def new_package(name); end
-
- # Invoked when a new class is discovered. Session.getSchema can be
- # used to obtain details about the class
- def new_class(kind, klass_key); end
-
- # Invoked when a QMF agent is discovered
- def new_agent(agent); end
-
- # Invoked when a QMF agent disconects
- def del_agent(agent); end
-
- # Invoked when an object is updated
- def object_props(broker, record); end
-
- # Invoked when an object is updated
- def object_stats(broker, record); end
-
- # Invoked when an event is raised
- def event(broker, event); end
-
- # Invoked when an agent heartbeat is received.
- def heartbeat(agent, timestamp); end
-
- # Invoked when the connection sequence reaches the point where broker information is available.
- def broker_info(broker); end
-
- # Invoked when a method response from an asynchronous method call is received.
- def method_response(broker, seq, response); end
- end
-
- class BrokerURL
-
- attr_reader :host, :port, :auth_name, :auth_pass
-
- def initialize(text)
- uri = URI.parse(text)
-
- @host = uri.host
- @port = uri.port ? uri.port : 5672
- @auth_name = uri.user
- @auth_pass = uri.password
-
- return uri
- end
-
- def name
- "#{@host}:#{@port}"
- end
-
- def match(host, port)
- # FIXME: Unlcear what the Python code is actually checking for
- # here, especially since HOST can resolve to multiple IP's
- @port == port &&
- (host == @host || ipaddr(host, port) == ipaddr(@host, @port))
- end
-
- private
- def ipaddr(host, port)
- s = Socket::getaddrinfo(host, port,
- Socket::AF_INET, Socket::SOCK_STREAM)
- s[0][2]
- end
- end
-
- # An instance of the Session class represents a console session running
- # against one or more QMF brokers. A single instance of Session is
- # needed to interact with the management framework as a console.
- class Session
- CONTEXT_SYNC = 1
- CONTEXT_STARTUP = 2
- CONTEXT_MULTIGET = 3
-
- DEFAULT_GET_WAIT_TIME = 60
-
- include MonitorMixin
-
- attr_reader :binding_key_list, :select, :seq_mgr, :console, :packages
-
- # Initialize a session. If the console argument is provided, the
- # more advanced asynchronous features are available. If console is
- # defaulted, the session will operate in a simpler, synchronous
- # manner. The rcvObjects, rcvEvents, and rcvHeartbeats arguments
- # are meaningful only if 'console' is provided. They control
- # whether object updates, events, and agent-heartbeats are
- # subscribed to. If the console is not interested in receiving one
- # or more of the above, setting the argument to False will reduce
- # tha bandwidth used by the API. If manageConnections is set to
- # True, the Session object will manage connections to the brokers.
- # This means that if a broker is unreachable, it will retry until a
- # connection can be established. If a connection is lost, the
- # Session will attempt to reconnect.
- #
- # If manageConnections is set to False, the user is responsible for
- # handing failures. In this case, an unreachable broker will cause
- # addBroker to raise an exception. If userBindings is set to False
- # (the default) and rcvObjects is True, the console will receive
- # data for all object classes. If userBindings is set to True, the
- # user must select which classes the console shall receive by
- # invoking the bindPackage or bindClass methods. This allows the
- # console to be configured to receive only information that is
- # relavant to a particular application. If rcvObjects id False,
- # userBindings has no meaning.
- #
- # Accept a hash of parameters, where keys can be :console,
- # :rcv_objects, :rcv_events, :rcv_heartbeats, :manage_connections,
- # and :user_bindings
- def initialize(kwargs = {})
- super()
- @console = kwargs[:console] || nil
- @brokers = []
- @packages = {}
- @seq_mgr = SequenceManager.new
- @cv = new_cond
- @sync_sequence_list = []
- @result = []
- @select = []
- @error = nil
- @rcv_objects = kwargs[:rcv_objects] == nil ? true : kwargs[:rcv_objects]
- @rcv_events = kwargs[:rcv_events] == nil ? true : kwargs[:rcv_events]
- @rcv_heartbeats = kwargs[:rcv_heartbeats] == nil ? true : kwargs[:rcv_heartbeats]
- @user_bindings = kwargs[:user_bindings] == nil ? false : kwargs[:user_bindings]
- unless @console
- @rcv_objects = false
- @rcv_events = false
- @rcv_heartbeats = false
- end
- @binding_key_list = binding_keys
- @manage_connections = kwargs[:manage_connections] || false
-
- if @user_bindings && ! @rcv_objects
- raise ArgumentError, "user_bindings can't be set unless rcv_objects is set and a console is provided"
- end
-
- end
-
- def to_s
- "QMF Console Session Manager (brokers: #{@brokers.size})"
- end
-
- def managedConnections?
- return @manage_connections
- end
-
- # Connect to a Qpid broker. Returns an object of type Broker
- #
- # To supply a username for authentication, use the URL syntax:
- #
- # amqp://username@hostname:port
- #
- # If the broker needs a password for the client, an interactive prompt will be
- # provided to the user.
- #
- # To supply a username and a password, use
- #
- # amqp://username:password@hostname:port
- #
- # The following keyword arguments may be used to control authentication:
- #
- # :mechanism - SASL mechanism (i.e. "PLAIN", "GSSAPI", "ANONYMOUS", etc.
- # - defaults to unspecified (the system chooses for you)
- # :service - SASL service name (i.e. the kerberos principal of the broker)
- # - defaults to "qpidd"
- # :min_ssf - Minimum Security Strength Factor for SASL security layers
- # - defaults to 0
- # :max_ssf - Maximum Security Strength Factor for SASL security layers
- # - defaults to 65535
- #
- def add_broker(target = "amqp://localhost", kwargs = {})
- url = BrokerURL.new(target)
- broker = Broker.new(self, url.host, url.port, url.auth_name, url.auth_pass, kwargs)
- unless broker.connected? || @manage_connections
- raise broker.error
- end
-
- @brokers << broker
- objects(:broker => broker, :class => "agent") unless @manage_connections
- return broker
- end
-
- # Disconnect from a broker. The 'broker' argument is the object
- # returned from the addBroker call
- def del_broker(broker)
- broker.shutdown
- @brokers.delete(broker)
- end
-
- # Get the list of known classes within a QMF package
- def classes(package_name)
- list = []
- @brokers.each { |broker| broker.wait_for_stable }
- if @packages.include?(package_name)
- # FIXME What's the actual structure of @packages[package_name]
- @packages[package_name].each do |key, schema_class|
- list << schema_class.klass_key
- end
- end
- return list
- end
-
- # Get the schema for a QMF class
- def schema(klass_key)
- @brokers.each { |broker| broker.wait_for_stable }
- if @packages.include?(klass_key.package)
- @packages[klass_key.package][ [klass_key.klass_name, klass_key.hash] ]
- end
- end
-
- def bind_package(package_name)
- unless @user_bindings && @rcv_objects
- raise "userBindings option not set for Session"
- end
- @brokers.each do |broker|
- args = { :exchange => "qpid.management",
- :queue => broker.topic_name,
- :binding_key => "console.obj.*.*.#{package_name}.#" }
- broker.amqp_session.exchange_bind(args)
- end
- end
-
- def bind_class(package_name, class_name)
- unless @user_bindings && @rcv_objects
- raise "userBindings option not set for Session"
- end
- @brokers.each do |broker|
- args = { :exchange => "qpid.management",
- :queue => broker.topic_name,
- :binding_key=> "console.obj.*.*.#{package_name}.#{class_name}.#" }
- broker.amqp_session.exchange_bind(args)
- end
- end
-
- def bind_class_key(klass_key)
- unless @user_bindings && @rcv_objects
- raise "userBindings option not set for Session"
- end
- pname, cname, hash = klass_key.to_a()
- @brokers.each do |broker|
- args = { :exchange => "qpid.management",
- :queue => broker.topic_name,
- :binding_key => "console.obj.*.*.#{pname}.#{cname}.#" }
- broker.amqp_session.exchange_bind(args)
- end
- end
-
- # Get a list of currently known agents
- def agents(broker=nil)
- broker_list = []
- if broker.nil?
- broker_list = @brokers.dup
- else
- broker_list << broker
- end
- broker_list.each { |b| b.wait_for_stable }
- agent_list = []
- broker_list.each { |b| agent_list += b.agents }
- return agent_list
- end
-
- # Get a list of objects from QMF agents.
- # All arguments are passed by name(keyword).
- #
- # The class for queried objects may be specified in one of the
- # following ways:
- # :schema => <schema> - supply a schema object returned from getSchema.
- # :key => <key> - supply a klass_key from the list returned by getClasses.
- # :class => <name> - supply a class name as a string. If the class name exists
- # in multiple packages, a _package argument may also be supplied.
- # :object_id = <id> - get the object referenced by the object-id
- #
- # If objects should be obtained from only one agent, use the following argument.
- # Otherwise, the query will go to all agents.
- #
- # :agent = <agent> - supply an agent from the list returned by getAgents.
- #
- # If the get query is to be restricted to one broker (as opposed to
- # all connected brokers), add the following argument:
- #
- # :broker = <broker> - supply a broker as returned by addBroker.
- #
- # The default timeout for this synchronous operation is 60 seconds. To change the timeout,
- # use the following argument:
- #
- # :timeout = <time in seconds>
- #
- # If additional arguments are supplied, they are used as property
- # selectors, as long as their keys are strings. For example, if
- # the argument "name" => "test" is supplied, only objects whose
- # "name" property is "test" will be returned in the result.
- def objects(kwargs)
- if kwargs.include?(:broker)
- broker_list = []
- broker_list << kwargs[:broker]
- else
- broker_list = @brokers
- end
- broker_list.each { |broker|
- broker.wait_for_stable
- if kwargs[:package] != "org.apache.qpid.broker" or kwargs[:class] != "agent"
- objects(:agent => broker.agent(1,0), :package => "org.apache.qpid.broker", :class => "agent") if broker.connected?
- end
- }
-
- agent_list = []
- if kwargs.include?(:agent)
- agent = kwargs[:agent]
- unless broker_list.include?(agent.broker)
- raise ArgumentError, "Supplied agent is not accessible through the supplied broker"
- end
- agent_list << agent if agent.broker.connected?
- else
- if kwargs.include?(:object_id)
- oid = kwargs[:object_id]
- broker_list.each { |broker|
- broker.agents.each { |agent|
- if oid.broker_bank == agent.broker_bank && oid.agent_bank == agent.agent_bank
- agent_list << agent if agent.broker.connected?
- end
- }
- }
- else
- broker_list.each { |broker|
- agent_list += broker.agents if broker.connected?
- }
- end
- end
-
- cname = nil
- if kwargs.include?(:schema)
- # FIXME: What kind of object is kwargs[:schema]
- pname, cname, hash = kwargs[:schema].getKey().to_a
- elsif kwargs.include?(:key)
- pname, cname, hash = kwargs[:key].to_a
- elsif kwargs.include?(:class)
- pname, cname, hash = [kwargs[:package], kwargs[:class], nil]
- end
- if cname.nil? && ! kwargs.include?(:object_id)
- raise ArgumentError,
- "No class supplied, use :schema, :key, :class, or :object_id' argument"
- end
-
- map = {}
- @select = []
- if kwargs.include?(:object_id)
- map["_objectid"] = kwargs[:object_id].to_s
- else
- map["_class"] = cname
- map["_package"] = pname if pname
- map["_hash"] = hash if hash
- kwargs.each do |k,v|
- @select << [k, v] if k.is_a?(String)
- end
- end
-
- @result = []
- agent_list.each do |agent|
- broker = agent.broker
- send_codec = Qpid::StringCodec.new(broker.conn.spec)
- seq = nil
- synchronize do
- seq = @seq_mgr.reserve(CONTEXT_MULTIGET)
- @sync_sequence_list << seq
- end
- broker.set_header(send_codec, ?G, seq)
- send_codec.write_map(map)
- bank_key = "%d.%d" % [broker.broker_bank, agent.agent_bank]
- smsg = broker.message(send_codec.encoded, "agent.#{bank_key}")
- broker.emit(smsg)
- end
-
- timeout = false
- if kwargs.include?(:timeout)
- wait_time = kwargs[:timeout]
- else
- wait_time = DEFAULT_GET_WAIT_TIME
- end
- synchronize do
- unless @cv.wait_for(wait_time) { @sync_sequence_list.empty? || @error }
- @sync_sequence_list.each do |pending_seq|
- @seq_mgr.release(pending_seq)
- end
- @sync_sequence_list = []
- timeout = true
- end
- end
-
- if @error
- errorText = @error
- @error = nil
- raise errorText
- end
-
- if @result.empty? && timeout
- raise "No agent responded within timeout period"
- end
- @result
- end
-
- # Return one and only one object or nil.
- def object(kwargs)
- objs = objects(kwargs)
- return objs.length == 1 ? objs[0] : nil
- end
-
- # Return the first of potentially many objects.
- def first_object(kwargs)
- objs = objects(kwargs)
- return objs.length > 0 ? objs[0] : nil
- end
-
- def set_event_filter(kwargs); end
-
- def handle_broker_connect(broker); end
-
- def handle_broker_resp(broker, codec, seq)
- broker.broker_id = codec.read_uuid
- @console.broker_info(broker) if @console
-
- # Send a package request
- # (effectively inc and dec outstanding by not doing anything)
- send_codec = Qpid::StringCodec.new(broker.conn.spec)
- seq = @seq_mgr.reserve(CONTEXT_STARTUP)
- broker.set_header(send_codec, ?P, seq)
- smsg = broker.message(send_codec.encoded)
- broker.emit(smsg)
- end
-
- def handle_package_ind(broker, codec, seq)
- pname = codec.read_str8
- new_package = false
- synchronize do
- new_package = ! @packages.include?(pname)
- @packages[pname] = {} if new_package
- end
- @console.new_package(pname) if @console
-
- # Send a class request
- broker.inc_outstanding
- send_codec = Qpid::StringCodec.new(broker.conn.spec)
- seq = @seq_mgr.reserve(CONTEXT_STARTUP)
- broker.set_header(send_codec, ?Q, seq)
- send_codec.write_str8(pname)
- smsg = broker.message(send_codec.encoded)
- broker.emit(smsg)
- end
-
- def handle_command_complete(broker, codec, seq)
- code = codec.read_uint32
- text = codec.read_str8
- context = @seq_mgr.release(seq)
- if context == CONTEXT_STARTUP
- broker.dec_outstanding
- elsif context == CONTEXT_SYNC && seq == broker.sync_sequence
- broker.sync_done
- elsif context == CONTEXT_MULTIGET && @sync_sequence_list.include?(seq)
- synchronize do
- @sync_sequence_list.delete(seq)
- @cv.signal if @sync_sequence_list.empty?
- end
- end
- end
-
- def handle_class_ind(broker, codec, seq)
- kind = codec.read_uint8
- classKey = ClassKey.new(codec)
- unknown = false
-
- synchronize do
- return unless @packages.include?(classKey.package)
- unknown = true unless @packages[classKey.package].include?([classKey.klass_name, classKey.hash])
- end
-
-
- if unknown
- # Send a schema request for the unknown class
- broker.inc_outstanding
- send_codec = Qpid::StringCodec.new(broker.conn.spec)
- seq = @seq_mgr.reserve(CONTEXT_STARTUP)
- broker.set_header(send_codec, ?S, seq)
- classKey.encode(send_codec)
- smsg = broker.message(send_codec.encoded)
- broker.emit(smsg)
- end
- end
-
- def handle_method_resp(broker, codec, seq)
- code = codec.read_uint32
- text = codec.read_str16
- out_args = {}
- pair = @seq_mgr.release(seq)
- return unless pair
- method, synchronous = pair
- if code == 0
- method.arguments.each do |arg|
- if arg.dir.index(?O)
- out_args[arg.name] = decode_value(codec, arg.type)
- end
- end
- end
- result = MethodResult.new(code, text, out_args)
- if synchronous:
- broker.synchronize do
- broker.sync_result = MethodResult.new(code, text, out_args)
- broker.sync_done
- end
- else
- @console.method_response(broker, seq, result) if @console
- end
- end
-
- def handle_heartbeat_ind(broker, codec, seq, msg)
- if @console
- broker_bank = 1
- agent_bank = 0
- dp = msg.get("delivery_properties")
- if dp
- key = dp["routing_key"]
- key_elements = key.split(".")
- if key_elements.length == 4
- broker_bank = key_elements[2].to_i
- agent_bank = key_elements[3].to_i
- end
- end
- agent = broker.agent(broker_bank, agent_bank)
- timestamp = codec.read_uint64
- @console.heartbeat(agent, timestamp) if agent
- end
- end
-
- def handle_event_ind(broker, codec, seq)
- if @console
- event = Event.new(self, broker, codec)
- @console.event(broker, event)
- end
- end
-
- def handle_schema_resp(broker, codec, seq)
- kind = codec.read_uint8
- classKey = ClassKey.new(codec)
- klass = SchemaClass.new(self, kind, classKey, codec)
- synchronize { @packages[classKey.package][ [classKey.klass_name, classKey.hash] ] = klass }
-
- @seq_mgr.release(seq)
- broker.dec_outstanding
- @console.new_class(kind, classKey) if @console
- end
-
- def handle_content_ind(broker, codec, seq, prop=false, stat=false)
- klass_key = ClassKey.new(codec)
- pname, cname, hash = klass_key.to_a() ;
-
- schema = nil
- synchronize do
- return unless @packages.include?(klass_key.package)
- return unless @packages[klass_key.package].include?([klass_key.klass_name, klass_key.hash])
- schema = @packages[klass_key.package][ [klass_key.klass_name, klass_key.hash] ]
- end
-
-
- object = Qpid::Qmf::Object.new(self, broker, schema, codec, prop, stat)
- if pname == "org.apache.qpid.broker" && cname == "agent" && prop
- broker.update_agent(object)
- end
-
- synchronize do
- if @sync_sequence_list.include?(seq)
- if object.timestamps()[2] == 0 && select_match(object)
- @result << object
- end
- return
- end
- end
-
- @console.object_props(broker, object) if @console && @rcv_objects && prop
- @console.object_stats(broker, object) if @console && @rcv_objects && stat
- end
-
- def handle_broker_disconnect(broker); end
-
- def handle_error(error)
- synchronize do
- @error = error if @sync_sequence_list.length > 0
- @sync_sequence_list = []
- @cv.signal
- end
- end
-
- # Decode, from the codec, a value based on its typecode
- def decode_value(codec, typecode)
- case typecode
- when 1: data = codec.read_uint8 # U8
- when 2: data = codec.read_uint16 # U16
- when 3: data = codec.read_uint32 # U32
- when 4: data = codec.read_uint64 # U64
- when 6: data = codec.read_str8 # SSTR
- when 7: data = codec.read_str16 # LSTR
- when 8: data = codec.read_int64 # ABSTIME
- when 9: data = codec.read_uint64 # DELTATIME
- when 10: data = ObjectId.new(codec) # REF
- when 11: data = codec.read_uint8 != 0 # BOOL
- when 12: data = codec.read_float # FLOAT
- when 13: data = codec.read_double # DOUBLE
- when 14: data = codec.read_uuid # UUID
- when 15: data = codec.read_map # FTABLE
- when 16: data = codec.read_int8 # S8
- when 17: data = codec.read_int16 # S16
- when 18: data = codec.read_int32 # S32
- when 19: data = codec.read_int64 # S64
- when 20: # Object
- inner_type_code = codec.read_uint8()
- if (inner_type_code == 20)
- classKey = ClassKey.new(codec)
- innerSchema = schema(classKey)
- data = Object.new(self, @broker, innerSchema, codec, true, true, false) if innerSchema
- else
- data = decode_value(codec, inner_type_code)
- end
- when 21:
- data = []
- rec_codec = Qpid::StringCodec.new(codec.spec, codec.read_vbin32())
- count = rec_codec.read_uint32()
- while count > 0 do
- type = rec_codec.read_uint8()
- data << (decode_value(rec_codec,type))
- count -= 1
- end
- when 22:
- data = []
- rec_codec = Qpid::StringCodec.new(codec.spec, codec.read_vbin32())
- count = rec_codec.read_uint32()
- type = rec_codec.read_uint8()
- while count > 0 do
- data << (decode_value(rec_codec,type))
- count -= 1
- end
- else
- raise ArgumentError, "Invalid type code: #{typecode} - #{typecode.inspect}"
- end
- return data
- end
-
- ENCODINGS = {
- String => 6,
- Fixnum => 18,
- Bignum => 19,
- Float => 12,
- Array => 21,
- Hash => 15
- }
-
- def encoding(object)
- klass = object.class
- if ENCODINGS.has_key?(klass)
- return ENCODINGS[klass]
- end
- for base in klass.__bases__
- result = encoding(base)
- return result unless result.nil?
- end
- end
-
- # Encode, into the codec, a value based on its typecode
- def encode_value(codec, value, typecode)
- # FIXME: Python does a lot of magic type conversions
- # We just assume that value has the right type; this is safer
- # than coercing explicitly, since Array::pack will complain
- # loudly about various type errors
- case typecode
- when 1: codec.write_uint8(value) # U8
- when 2: codec.write_uint16(value) # U16
- when 3: codec.write_uint32(value) # U32
- when 4: codec.write_uint64(value) # U64
- when 6: codec.write_str8(value) # SSTR
- when 7: codec.write_str16(value) # LSTR
- when 8: codec.write_int64(value) # ABSTIME
- when 9: codec.write_uint64(value) # DELTATIME
- when 10: value.encode(codec) # REF
- when 11: codec.write_uint8(value ? 1 : 0) # BOOL
- when 12: codec.write_float(value) # FLOAT
- when 13: codec.write_double(value) # DOUBLE
- when 14: codec.write_uuid(value) # UUID
- when 15: codec.write_map(value) # FTABLE
- when 16: codec.write_int8(value) # S8
- when 17: codec.write_int16(value) # S16
- when 18: codec.write_int32(value) # S32
- when 19: codec.write_int64(value) # S64
- when 20: value.encode(codec)
- when 21: # List
- send_codec = Qpid::StringCodec.new(codec.spec)
- encode_value(send_codec, value.size, 3)
- value.each do v
- ltype = encoding(v)
- encode_value(send_codec,ltype,1)
- encode_value(send_codec,v,ltype)
- end
- codec.write_vbin32(send_codec.encoded)
- when 22: # Array
- send_codec = Qpid::StringCodec.new(codec.spec)
- encode_value(send_codec, value.size, 3)
- if value.size > 0
- ltype = encoding(value[0])
- encode_value(send_codec,ltype,1)
- value.each do v
- encode_value(send_codec,v,ltype)
- end
- end
- codec.write_vbin32(send_codec.encoded)
- else
- raise ValueError, "Invalid type code: %d" % typecode
- end
- end
-
- def display_value(value, typecode)
- case typecode
- when 1: return value.to_s
- when 2: return value.to_s
- when 3: return value.to_s
- when 4: return value.to_s
- when 6: return value.to_s
- when 7: return value.to_s
- when 8: return strftime("%c", gmtime(value / 1000000000))
- when 9: return value.to_s
- when 10: return value.to_s
- when 11: return value ? 'T' : 'F'
- when 12: return value.to_s
- when 13: return value.to_s
- when 14: return Qpid::UUID::format(value)
- when 15: return value.to_s
- when 16: return value.to_s
- when 17: return value.to_s
- when 18: return value.to_s
- when 19: return value.to_s
- when 20: return value.to_s
- when 21: return value.to_s
- when 22: return value.to_s
- else
- raise ValueError, "Invalid type code: %d" % typecode
- end
- end
-
- private
-
- def binding_keys
- key_list = []
- key_list << "schema.#"
- if @rcv_objects && @rcv_events && @rcv_heartbeats &&
- ! @user_bindings
- key_list << "console.#"
- else
- if @rcv_objects && ! @user_bindings
- key_list << "console.obj.#"
- else
- key_list << "console.obj.*.*.org.apache.qpid.broker.agent"
- end
- key_list << "console.event.#" if @rcv_events
- key_list << "console.heartbeat.#" if @rcv_heartbeats
- end
- return key_list
- end
-
- # Check the object against select to check for a match
- def select_match(object)
- select.each do |key, value|
- object.properties.each do |prop, propval|
- return false if key == prop.name && value != propval
- end
- end
- return true
- end
-
- end
-
- class Package
- attr_reader :name
-
- def initialize(name)
- @name = name
- end
- end
-
- # A ClassKey uniquely identifies a class from the schema.
- class ClassKey
- attr_reader :package, :klass_name, :hash
-
- def initialize(package="", klass_name="", hash=0)
- if (package.kind_of?(Qpid::Codec))
- @package = package.read_str8()
- @klass_name = package.read_str8()
- @hash = package.read_bin128()
- else
- @package = package
- @klass_name = klass_name
- @hash = hash
- end
- end
-
- def encode(codec)
- codec.write_str8(@package)
- codec.write_str8(@klass_name)
- codec.write_bin128(@hash)
- end
-
- def to_a()
- return [@package, @klass_name, @hash]
- end
-
- def hash_string()
- "%08x-%08x-%08x-%08x" % hash.unpack("NNNN")
- end
-
- def to_s()
- return "#{@package}:#{@klass_name}(#{hash_string()})"
- end
- end
-
- class SchemaClass
-
- CLASS_KIND_TABLE = 1
- CLASS_KIND_EVENT = 2
-
- attr_reader :klass_key, :arguments, :super_klass_key
-
- def initialize(session, kind, key, codec)
- @session = session
- @kind = kind
- @klass_key = key
- @super_klass_key = nil
- @properties = []
- @statistics = []
- @methods = []
- @arguments = []
-
- has_supertype = 0 #codec.read_uint8
- if @kind == CLASS_KIND_TABLE
- prop_count = codec.read_uint16
- stat_count = codec.read_uint16
- method_count = codec.read_uint16
- if has_supertype == 1
- @super_klass_key = ClassKey.new(codec)
- end
- prop_count.times { |idx|
- @properties << SchemaProperty.new(codec) }
- stat_count.times { |idx|
- @statistics << SchemaStatistic.new(codec) }
- method_count.times { |idx|
- @methods<< SchemaMethod.new(codec) }
- elsif @kind == CLASS_KIND_EVENT
- arg_count = codec.read_uint16
- arg_count.times { |idx|
- sa = SchemaArgument.new(codec, false)
- @arguments << sa
- }
- end
- end
-
- def is_table?
- @kind == CLASS_KIND_TABLE
- end
-
- def is_event?
- @kind == CLASS_KIND_EVENT
- end
-
- def properties(include_inherited = true)
- returnValue = @properties
- if !@super_klass_key.nil? && include_inherited
- returnValue = @properties + @session.schema(@super_klass_key).properties
- end
- return returnValue
- end
-
- def statistics(include_inherited = true)
- returnValue = @statistics
- if !@super_klass_key.nil? && include_inherited
- returnValue = @statistics + @session.schema(@super_klass_key).statistics
- end
- return returnValue
- end
-
- def methods(include_inherited = true)
- returnValue = @methods
- if !@super_klass_key.nil? && include_inherited
- returnValue = @methods + @session.schema(@super_klass_key).methods
- end
- return returnValue
- end
-
- def to_s
- if @kind == CLASS_KIND_TABLE
- kind_str = "Table"
- elsif @kind == CLASS_KIND_EVENT
- kind_str = "Event"
- else
- kind_str = "Unsupported"
- end
- "#{kind_str} Class: #{klass_key.to_s}"
- end
- end
-
- class SchemaProperty
-
- attr_reader :name, :type, :access, :index, :optional,
- :unit, :min, :max, :maxlen, :desc, :refClass, :refPackage
-
- def initialize(codec)
- map = codec.read_map
- @name = map["name"]
- @type = map["type"]
- @access = map["access"]
- @index = map["index"] != 0
- @optional = map["optional"] != 0
- @unit = map["unit"]
- @min = map["min"]
- @max = map["max"]
- @maxlen = map["maxlen"]
- @desc = map["desc"]
- @refClass = map["refClass"]
- @refPackage = map["refPackage"]
- end
-
- def to_s
- @name
- end
- end
-
- class SchemaStatistic
-
- attr_reader :name, :type, :unit, :desc, :refClass, :refPackage
-
- def initialize(codec)
- map = codec.read_map
- @name = map["name"]
- @type = map["type"]
- @unit = map["unit"]
- @desc = map["desc"]
- @refClass = map["refClass"]
- @refPackage = map["refPackage"]
- end
-
- def to_s
- @name
- end
- end
-
- class SchemaMethod
-
- attr_reader :name, :desc, :arguments
-
- def initialize(codec)
- map = codec.read_map
- @name = map["name"]
- arg_count = map["argCount"]
- @desc = map["desc"]
- @arguments = []
- arg_count.times { |idx|
- @arguments << SchemaArgument.new(codec, true)
- }
- end
-
- def to_s
- result = @name + "("
- first = true
- result += @arguments.select { |arg| arg.dir.index(?I) }.join(", ")
- result += ")"
- return result
- end
- end
-
- class SchemaArgument
-
- attr_reader :name, :type, :dir, :unit, :min, :max, :maxlen
- attr_reader :desc, :default, :refClass, :refPackage
-
- def initialize(codec, method_arg)
- map = codec.read_map
- @name = map["name"]
- @type = map["type"]
- @dir = map["dir"].upcase if method_arg
- @unit = map["unit"]
- @min = map["min"]
- @max = map["max"]
- @maxlen = map["maxlen"]
- @desc = map["desc"]
- @default = map["default"]
- @refClass = map["refClass"]
- @refPackage = map["refPackage"]
- end
- end
-
- # Object that represents QMF object identifiers
- class ObjectId
-
- include Comparable
-
- attr_reader :first, :second
-
- def initialize(codec, first=0, second=0)
- if codec
- @first = codec.read_uint64
- @second = codec.read_uint64
- else
- @first = first
- @second = second
- end
- end
-
- def <=>(other)
- return 1 unless other.is_a?(ObjectId)
- return -1 if first < other.first
- return 1 if first > other.first
- return second <=> other.second
- end
-
- def to_s
- "%d-%d-%d-%d-%d" % [flags, sequence, broker_bank, agent_bank, object]
- end
-
- def index
- [first, second]
- end
-
- def flags
- (first & 0xF000000000000000) >> 60
- end
-
- def sequence
- (first & 0x0FFF000000000000) >> 48
- end
-
- def broker_bank
- (first & 0x0000FFFFF0000000) >> 28
- end
-
- def agent_bank
- first & 0x000000000FFFFFFF
- end
-
- def object
- second
- end
-
- def durable?
- sequence == 0
- end
-
- def encode(codec)
- codec.write_uint64(first)
- codec.write_uint64(second)
- end
- end
-
- class Object
-
- DEFAULT_METHOD_WAIT_TIME = 60
-
- attr_reader :object_id, :schema, :properties, :statistics,
- :current_time, :create_time, :delete_time, :broker
-
- def initialize(session, broker, schema, codec, prop, stat, managed=true)
- @session = session
- @broker = broker
- @schema = schema
- if managed
- @current_time = codec.read_uint64
- @create_time = codec.read_uint64
- @delete_time = codec.read_uint64
- @object_id = ObjectId.new(codec)
- end
- @properties = []
- @statistics = []
- if prop
- missing = parse_presence_masks(codec, schema)
- schema.properties.each do |property|
- v = nil
- unless missing.include?(property.name)
- v = @session.decode_value(codec, property.type)
- end
- @properties << [property, v]
- end
- end
-
- if stat
- schema.statistics.each do |statistic|
- s = @session.decode_value(codec, statistic.type)
- @statistics << [statistic, s]
- end
- end
- end
-
- def klass_key
- @schema.klass_key
- end
-
-
- def methods
- @schema.methods
- end
-
- # Return the current, creation, and deletion times for this object
- def timestamps
- return [@current_time, @create_time, @delete_time]
- end
-
- # Return a string describing this object's primary key
- def index
- @properties.select { |property, value|
- property.index
- }.collect { |property,value|
- @session.display_value(value, property.type) }.join(":")
- end
-
- # Replace properties and/or statistics with a newly received update
- def merge_update(newer)
- unless object_id == newer.object_id
- raise "Objects with different object-ids"
- end
- @properties = newer.properties unless newer.properties.empty?
- @statistics = newer.statistics unless newer.statistics.empty?
- end
-
- def update
- obj = @session.object(:object_id => @object_id, :broker => @broker)
- if obj
- merge_update(obj)
- else
- raise "Underlying object no longer exists."
- end
- end
-
- def to_s
- @schema.klass_key.to_s
- end
-
- # This must be defined because ruby has this (deprecated) method built in.
- def id
- method_missing(:id)
- end
-
- # Same here..
- def type
- method_missing(:type)
- end
-
- def name
- method_missing(:name)
- end
-
- def method_missing(name, *args)
- name = name.to_s
-
- if method = @schema.methods.find { |method| name == method.name }
- return invoke(method, name, args)
- end
-
- @properties.each do |property, value|
- return value if name == property.name
- if name == "_#{property.name}_" && property.type == 10
- # Dereference references
- deref = @session.objects(:object_id => value, :broker => @broker)
- return nil unless deref.size == 1
- return deref[0]
- end
- end
- @statistics.each do |statistic, value|
- if name == statistic.name
- return value
- end
- end
- raise "Type Object has no attribute '#{name}'"
- end
-
- def encode(codec)
- codec.write_uint8(20)
- @schema.klass_key.encode(codec)
-
- # emit presence masks for optional properties
- mask = 0
- bit = 0
- schema.properties.each do |property|
- if prop.optional
- bit = 1 if bit == 0
- mask |= bit if value
- bit = bit << 1
- if bit == 256
- bit = 0
- codec.write_uint8(mask)
- mask = 0
- end
- codec.write_uint8(mask) if bit != 0
- end
- end
-
- # encode properties
- @properties.each do |property, value|
- @session.encode_value(codec, value, prop.type) if value
- end
-
- # encode statistics
- @statistics.each do |statistic, value|
- @session.encode_value(codec, value, stat.type)
- end
- end
-
- private
-
- def send_method_request(method, name, args, synchronous = false, time_wait = nil)
- @schema.methods.each do |schema_method|
- if name == schema_method.name
- send_codec = Qpid::StringCodec.new(@broker.conn.spec)
- seq = @session.seq_mgr.reserve([schema_method, synchronous])
- @broker.set_header(send_codec, ?M, seq)
- @object_id.encode(send_codec)
- @schema.klass_key.encode(send_codec)
- send_codec.write_str8(name)
-
- formals = method.arguments.select { |arg| arg.dir.index(?I) }
- count = method.arguments.select { |arg| arg.dir.index(?I) }.size
- unless formals.size == args.size
- raise "Incorrect number of arguments: expected #{formals.size}, got #{args.size}"
- end
-
- formals.zip(args).each do |formal, actual|
- @session.encode_value(send_codec, actual, formal.type)
- end
-
- ttl = time_wait ? time_wait * 1000 : nil
- smsg = @broker.message(send_codec.encoded,
- "agent.#{object_id.broker_bank}.#{object_id.agent_bank}", ttl=ttl)
- @broker.sync_start if synchronous
- @broker.emit(smsg)
-
- return seq
- end
- end
- end
-
- def invoke(method, name, args)
- kwargs = args[args.size - 1]
- sync = true
- timeout = DEFAULT_METHOD_WAIT_TIME
-
- if kwargs.class == Hash
- if kwargs.include?(:timeout)
- timeout = kwargs[:timeout]
- end
-
- if kwargs.include?(:async)
- sync = !kwargs[:async]
- end
- args.pop
- end
-
- seq = send_method_request(method, name, args, synchronous = sync)
- if seq
- return seq unless sync
- unless @broker.wait_for_sync_done(timeout)
- @session.seq_mgr.release(seq)
- raise "Timed out waiting for method to respond"
- end
-
- if @broker.error
- error_text = @broker.error
- @broker.error = nil
- raise error_text
- end
-
- return @broker.sync_result
- end
- raise "Invalid Method (software defect) [#{name}]"
- end
-
- def parse_presence_masks(codec, schema)
- exclude_list = []
- bit = 0
- schema.properties.each do |property|
- if property.optional
- if bit == 0
- mask = codec.read_uint8
- bit = 1
- end
- if (mask & bit) == 0
- exclude_list << property.name
- end
- bit *= 2
- bit = 0 if bit == 256
- end
- end
- return exclude_list
- end
- end
-
- class MethodResult
-
- attr_reader :status, :text, :out_args
-
- def initialize(status, text, out_args)
- @status = status
- @text = text
- @out_args = out_args
- end
-
- def method_missing(name)
- name = name.to_s()
- if @out_args.include?(name)
- return @out_args[name]
- else
- raise "Unknown method result arg #{name}"
- end
- end
-
- def to_s
- argsString = ""
- padding = ""
- out_args.each do |key,value|
- argsString += padding
- padding = " " if padding == ""
- argsString += key.to_s
- argsString += " => "
- argsString += value.to_s()
- end
- "MethodResult(Msg: '#{text}' Status: #{status} Return: [#{argsString}])"
- end
- end
-
- class ManagedConnection
-
- DELAY_MIN = 1
- DELAY_MAX = 128
- DELAY_FACTOR = 2
- include MonitorMixin
-
- def initialize(broker)
- super()
- @broker = broker
- @cv = new_cond
- @is_cancelled = false
- end
-
- # Main body of the running thread.
- def start
- @thread = Thread.new {
- delay = DELAY_MIN
- while true
- begin
- @broker.try_to_connect
- synchronize do
- while !@is_cancelled and @broker.connected?
- @cv.wait
- Thread.exit if @is_cancelled
- delay = DELAY_MIN
- end
- end
-
- rescue
- delay *= DELAY_FACTOR if delay < DELAY_MAX
- end
-
- synchronize do
- @cv.wait(delay)
- Thread.exit if @is_cancelled
- end
- end
- }
- end
-
- # Tell this thread to stop running and return.
- def stop
- synchronize do
- @is_cancelled = true
- @cv.signal
- end
- end
-
- # Notify the thread that the connection was lost.
- def disconnected
- synchronize do
- @cv.signal
- end
- end
-
- def join
- @thread.join
- end
- end
-
- class Broker
-
- SYNC_TIME = 60
- @@next_seq = 1
-
- include MonitorMixin
-
- attr_accessor :error
-
- attr_reader :amqp_session_id, :amqp_session, :conn, :broker_bank, :topic_name
-
- attr_accessor :broker_id, :sync_result
-
- def initialize(session, host, port, auth_name, auth_pass, kwargs)
- super()
-
- # For debugging..
- Thread.abort_on_exception = true
-
- @session = session
- @host = host
- @port = port
- @auth_name = auth_name
- @auth_pass = auth_pass
- @user_id = nil
- @auth_mechanism = kwargs[:mechanism]
- @auth_service = kwargs[:service]
- @broker_bank = 1
- @topic_bound = false
- @cv = new_cond
- @error = nil
- @broker_id = nil
- @is_connected = false
- @amqp_session_id = "%s.%d.%d" % [Socket.gethostname, Process::pid, @@next_seq]
- @@next_seq += 1
- @conn = nil
- if @session.managedConnections?
- @thread = ManagedConnection.new(self)
- @thread.start
- else
- @thread = nil
- try_to_connect
- end
- end
-
- def connected?
- @is_connected
- end
-
- def agent(broker_bank, agent_bank)
- bank_key = "%d.%d" % [broker_bank, agent_bank]
- return @agents[bank_key]
- end
-
- # Get the list of agents reachable via this broker
- def agents
- @agents.values
- end
-
- def url
- "#{@host}:#{@port}"
- end
-
- def to_s
- if connected?
- "Broker connected at: #{url}"
- else
- "Disconnected Broker"
- end
- end
-
- def wait_for_sync_done(timeout=nil)
- wait_time = timeout ? timeout : SYNC_TIME
- synchronize do
- return @cv.wait_for(wait_time) { ! @sync_in_flight || @error }
- end
- end
-
- def wait_for_stable
- synchronize do
- return unless connected?
- return if @reqs_outstanding == 0
- @sync_in_flight = true
- unless @cv.wait_for(SYNC_TIME) { @reqs_outstanding == 0 }
- raise "Timed out waiting for broker to synchronize"
- end
- end
- end
-
- # Compose the header of a management message
- def set_header(codec, opcode, seq=0)
- codec.write_uint8(?A)
- codec.write_uint8(?M)
- codec.write_uint8(?2)
- codec.write_uint8(opcode)
- codec.write_uint32(seq)
- end
-
- def message(body, routing_key="broker", ttl=nil)
- dp = @amqp_session.delivery_properties
- dp.routing_key = routing_key
- dp.ttl = ttl if ttl
- mp = @amqp_session.message_properties
- mp.content_type = "x-application/qmf"
- mp.reply_to = amqp_session.reply_to("amq.direct", @reply_name)
- #mp.user_id = @user_id if @user_id
- return Qpid::Message.new(dp, mp, body)
- end
-
- def emit(msg, dest="qpid.management")
- @amqp_session.message_transfer(:destination => dest,
- :message => msg)
- end
-
- def inc_outstanding
- synchronize { @reqs_outstanding += 1 }
- end
-
- def dec_outstanding
- synchronize do
- @reqs_outstanding -= 1
- if @reqs_outstanding == 0 && ! @topic_bound
- @topic_bound = true
- @session.binding_key_list.each do |key|
- args = {
- :exchange => "qpid.management",
- :queue => @topic_name,
- :binding_key => key }
- @amqp_session.exchange_bind(args)
- end
- end
- if @reqs_outstanding == 0 && @sync_in_flight
- sync_done
- end
- end
- end
-
- def sync_start
- synchronize { @sync_in_flight = true }
- end
-
- def sync_done
- synchronize do
- @sync_in_flight = false
- @cv.signal
- end
- end
-
- def update_agent(obj)
- bank_key = "%d.%d" % [obj.brokerBank, obj.agentBank]
- if obj.delete_time == 0
- unless @agents.include?(bank_key)
- agent = Agent.new(self, obj.agentBank, obj.label)
- @agents[bank_key] = agent
- @session.console.new_agent(agent) if @session.console
- end
- else
- agent = @agents.delete(bank_key)
- @session.console.del_agent(agent) if agent && @session.console
- end
- end
-
- def shutdown
- if @thread
- @thread.stop
- @thread.join
- end
- if connected?
- @amqp_session.incoming("rdest").stop
- if @session.console
- @amqp_session.incoming("tdest").stop
- end
- @amqp_session.close
- @is_connected = false
- end
- end
-
- def try_to_connect
- @agents = {}
- @agents["1.0"] = Agent.new(self, 0, "BrokerAgent")
- @topic_bound = false
- @sync_in_flight = false
- @sync_request = 0
- @sync_result = nil
- @reqs_outstanding = 1
-
- # FIXME: Need sth for Qpid::Util::connect
-
- @conn = Qpid::Connection.new(TCPSocket.new(@host, @port),
- :mechanism => @auth_mechanism,
- :username => @auth_name,
- :password => @auth_pass,
- :host => @host,
- :service => @auth_service)
- @conn.start
- @user_id = @conn.user_id
- @reply_name = "reply-%s" % amqp_session_id
- @amqp_session = @conn.session(@amqp_session_id)
- @amqp_session.auto_sync = true
-
- @amqp_session.queue_declare(:queue => @reply_name,
- :exclusive => true,
- :auto_delete => true)
-
- @amqp_session.exchange_bind(:exchange => "amq.direct",
- :queue => @reply_name,
- :binding_key => @reply_name)
- @amqp_session.message_subscribe(:queue => @reply_name,
- :destination => "rdest",
- :accept_mode => @amqp_session.message_accept_mode.none,
- :acquire_mode => @amqp_session.message_acquire_mode.pre_acquired)
- q = @amqp_session.incoming("rdest")
- q.exc_listen(& method(:exception_cb))
- q.listen(& method(:reply_cb))
- @amqp_session.message_set_flow_mode(:destination => "rdest",
- :flow_mode => 1)
- @amqp_session.message_flow(:destination => "rdest",
- :unit => 0,
- :value => 0xFFFFFFFF)
- @amqp_session.message_flow(:destination => "rdest",
- :unit => 1,
- :value => 0xFFFFFFFF)
-
- @topic_name = "topic-#{@amqp_session_id}"
- @amqp_session.queue_declare(:queue => @topic_name,
- :exclusive => true,
- :auto_delete => true)
- @amqp_session.message_subscribe(:queue => @topic_name,
- :destination => "tdest",
- :accept_mode => @amqp_session.message_accept_mode.none,
- :acquire_mode => @amqp_session.message_acquire_mode.pre_acquired)
- @amqp_session.incoming("tdest").listen(& method(:reply_cb))
- @amqp_session.message_set_flow_mode(:destination => "tdest",
- :flow_mode => 1)
- @amqp_session.message_flow(:destination => "tdest",
- :unit => 0,
- :value => 0xFFFFFFFF)
- @amqp_session.message_flow(:destination => "tdest",
- :unit => 1,
- :value => 0xFFFFFFFF)
-
- @is_connected = true
- @session.handle_broker_connect(self)
-
- codec = Qpid::StringCodec.new(@conn.spec)
- set_header(codec, ?B)
- msg = message(codec.encoded)
- emit(msg)
- end
-
- private
-
- # Check the header of a management message and extract the opcode and
- # class
- def check_header(codec)
- begin
- return [nil, nil] unless codec.read_uint8 == ?A
- return [nil, nil] unless codec.read_uint8 == ?M
- return [nil, nil] unless codec.read_uint8 == ?2
- opcode = codec.read_uint8
- seq = codec.read_uint32
- return [opcode, seq]
- rescue
- return [nil, nil]
- end
- end
-
- def reply_cb(msg)
- codec = Qpid::StringCodec.new(@conn.spec, msg.body)
- loop do
- opcode, seq = check_header(codec)
- return unless opcode
- case opcode
- when ?b: @session.handle_broker_resp(self, codec, seq)
- when ?p: @session.handle_package_ind(self, codec, seq)
- when ?z: @session.handle_command_complete(self, codec, seq)
- when ?q: @session.handle_class_ind(self, codec, seq)
- when ?m: @session.handle_method_resp(self, codec, seq)
- when ?h: @session.handle_heartbeat_ind(self, codec, seq, msg)
- when ?e: @session.handle_event_ind(self, codec, seq)
- when ?s: @session.handle_schema_resp(self, codec, seq)
- when ?c: @session.handle_content_ind(self, codec, seq, true, false)
- when ?i: @session.handle_content_ind(self, codec, seq, false, true)
- when ?g: @session.handle_content_ind(self, codec, seq, true, true)
- else
- raise "Unexpected opcode #{opcode.inspect}"
- end
- end
- end
-
- def exception_cb(data)
- @is_connected = false
- @error = data
- synchronize { @cv.signal if @sync_in_flight }
- @session.handle_error(@error)
- @session.handle_broker_disconnect(self)
- @thread.disconnected if @thread
- end
- end
-
- class Agent
- attr_reader :broker, :agent_bank, :label
-
- def initialize(broker, agent_bank, label)
- @broker = broker
- @agent_bank = agent_bank
- @label = label
- end
-
- def broker_bank
- @broker.broker_bank
- end
-
- def to_s
- "Agent at bank %d.%d (%s)" % [@broker.broker_bank, @agent_bank, @label]
- end
- end
-
- class Event
-
- attr_reader :klass_key, :arguments, :timestamp, :name, :schema
-
- def initialize(session, broker, codec)
- @session = session
- @broker = broker
- @klass_key = ClassKey.new(codec)
- @timestamp = codec.read_int64
- @severity = codec.read_uint8
- @schema = nil
-
- pname, cname, hash = @klass_key.to_a()
- session.packages.keys.each do |pname|
- k = [cname, hash]
- if session.packages[pname].include?(k)
- @schema = session.packages[pname][k]
- @arguments = {}
- @schema.arguments.each do |arg|
- v = session.decode_value(codec, arg.type)
- @arguments[arg.name] = v
- end
- end
- end
- end
-
- def to_s
- return "<uninterpretable>" unless @schema
- t = Time.at(self.timestamp / 1000000000)
- out = t.strftime("%c")
- out += " " + sev_name + " " + @klass_key.package + ":" + @klass_key.klass_name
- out += " broker=" + @broker.url
- @schema.arguments.each do |arg|
- out += " " + arg.name + "=" + @session.display_value(@arguments[arg.name], arg.type)
- end
- return out
- end
-
- def sev_name
- case @severity
- when 0 : return "EMER "
- when 1 : return "ALERT"
- when 2 : return "CRIT "
- when 3 : return "ERROR"
- when 4 : return "WARN "
- when 5 : return "NOTIC"
- when 6 : return "INFO "
- when 7 : return "DEBUG"
- else
- return "INV-%d" % @severity
- end
- end
-
- end
-
- # Manage sequence numbers for asynchronous method calls
- class SequenceManager
- include MonitorMixin
-
- def initialize
- super()
- @sequence = 0
- @pending = {}
- end
-
- # Reserve a unique sequence number
- def reserve (data)
- synchronize do
- result = @sequence
- @sequence += 1
- @pending[result] = data
- return result
- end
- end
-
- # Release a reserved sequence number
- def release (seq)
- synchronize { @pending.delete(seq) }
- end
- end
-
- class DebugConsole < Console
-
- def broker_connected(broker)
- puts "brokerConnected #{broker}"
- end
-
- def broker_disconnected(broker)
- puts "brokerDisconnected #{broker}"
- end
-
- def new_package(name)
- puts "newPackage #{name}"
- end
-
- def new_class(kind, klass_key)
- puts "newClass #{kind} #{klass_key}"
- end
-
- def new_agent(agent)
- puts "new_agent #{agent}"
- end
-
- def del_agent(agent)
- puts "delAgent #{agent}"
- end
-
- def object_props(broker, record)
- puts "objectProps #{record}"
- end
-
- def object_stats(broker, record)
- puts "objectStats #{record}"
- end
-
- def event(broker, event)
- puts "event #{event}"
- end
-
- def heartbeat(agent, timestamp)
- puts "heartbeat #{agent}"
- end
-
- def broker_info(broker)
- puts "brokerInfo #{broker}"
- end
- end
-
- module XML
- TYPES = {
- 1 => "uint8",
- 2 => "uint16",
- 3 => "uint32",
- 4 => "uint64",
- 5 => "bool",
- 6 => "short-stirng",
- 7 => "long-string",
- 8 => "abs-time",
- 9 => "delta-time",
- 10 => "reference",
- 11 => "boolean",
- 12 => "float",
- 13 => "double",
- 14 => "uuid",
- 15 => "field-table",
- 16 => "int8",
- 17 => "int16",
- 18 => "int32",
- 19 => "int64",
- 20 => "object",
- 21 => "list",
- 22 => "array"
- }
-
- ACCESS_MODES = {
- 1 => "RC",
- 2 => "RW",
- 3 => "RO"
- }
-
- def common_attributes(item)
- attr_string = ""
- attr_string << " desc='#{item.desc}'" if item.desc
- attr_string << " desc='#{item.desc}'" if item.desc
- attr_string << " refPackage='#{item.refPackage}'" if item.refPackage
- attr_string << " refClass='#{item.refClass}'" if item.refClass
- attr_string << " unit='#{item.unit}'" if item.unit
- attr_string << " min='#{item.min}'" if item.min
- attr_string << " max='#{item.max}'" if item.max
- attr_string << " maxlen='#{item.maxlen}'" if item.maxlen
- return attr_string
- end
-
- module_function :common_attributes
-
- def schema_xml(session, *packages)
- schema = "<schemas>\n"
- packages.each do |package|
- schema << "\t<schema package='#{package}'>\n"
- session.classes(package).each do |klass_key|
- klass = session.schema(klass_key)
- if klass.is_table?
- if klass.super_klass_key
- schema << "\t\t<class name='#{klass.klass_key.klass_name}' hash='#{klass.klass_key.hash_string}' extends='#{klass.super_klass_key.to_s}'>\n"
- else
- schema << "\t\t<class name='#{klass.klass_key.klass_name}' hash='#{klass.klass_key.hash_string}'>\n"
- end
- klass.properties(false).each do |property|
- schema << "\t\t\t<property name='#{property.name}' type='#{TYPES[property.type]}' access='#{ACCESS_MODES[property.access]}' optional='#{property.optional ? "True" : "False"}'#{common_attributes(property)}/>\n"
- end
- klass.methods(false).each do |method|
- schema << "\t\t\t<method name='#{method.name}'>\n"
- method.arguments.each do |arg|
- schema << "\t\t\t\t<arg name='#{arg.name}' dir='#{arg.dir}' type='#{TYPES[arg.type]}'#{common_attributes(arg)}/>\n"
- end
- schema << "\t\t\t</method>\n"
- end
- schema << "\t\t</class>\n"
- else
- schema << "\t\t<event name='#{klass.klass_key.klass_name}' hash='#{klass.klass_key.hash_string}'>\n"
- klass.arguments.each do |arg|
- schema << "\t\t\t<arg name='#{arg.name}'type='#{TYPES[arg.type]}'#{common_attributes(arg)}/>\n"
- end
- schema << "\t\t</event>\n"
- end
- end
- schema << "\t</package>\n"
- end
- schema << "</schema>"
- end
-
- module_function :schema_xml
- end
-
-end
diff --git a/qpid/ruby/lib/qpid/queue.rb b/qpid/ruby/lib/qpid/queue.rb
deleted file mode 100644
index 4150173b53..0000000000
--- a/qpid/ruby/lib/qpid/queue.rb
+++ /dev/null
@@ -1,101 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-# Augment the standard python multithreaded Queue implementation to add a
-# close() method so that threads blocking on the content of a queue can be
-# notified if the queue is no longer in use.
-
-require 'thread'
-
-# Python nominally uses a bounded queue, but the code never establishes
-# a maximum size; we therefore use Ruby's unbounded queue
-class Qpid::Queue < ::Queue
-
- DONE = Object.new
- STOP = Object.new
-
- def initialize
- super
- @error = nil
- @listener = nil
- @exc_listener = nil
- @exc_listener_lock = Monitor.new
- @thread = nil
- end
-
- def close(error = nil)
- @error = error
- put(DONE)
- unless @thread.nil?
- @thread.join()
- @thread = nil
- end
- end
-
- def get(block = true, timeout = nil)
- unless timeout.nil?
- raise NotImplementedError
- end
- result = pop(! block)
- if result == DONE
- # this guarantees that any other waiting threads or any future
- # calls to get will also result in a Qpid::Closed exception
- put(DONE)
- raise Qpid::Closed.new(@error)
- else
- return result
- end
- end
-
- alias :put :push
-
- def exc_listen(&block)
- @exc_listener_lock.synchronize do
- @exc_listener = block
- end
- end
-
- def listen(&block)
- if ! block_given? && @thread
- put(STOP)
- @thread.join()
- @thread = nil
- end
-
- # FIXME: There is a potential race since we could be changing one
- # non-nil listener to another
- @listener = block
-
- if block_given? && @thread.nil?
- @thread = Thread.new do
- loop do
- begin
- o = get()
- break if o == STOP
- @listener.call(o)
- rescue Qpid::Closed => e
- @exc_listener.call(e) if @exc_listener
- break
- end
- end
- end
- end
- end
-
-end
diff --git a/qpid/ruby/lib/qpid/session.rb b/qpid/ruby/lib/qpid/session.rb
deleted file mode 100644
index d693b722c2..0000000000
--- a/qpid/ruby/lib/qpid/session.rb
+++ /dev/null
@@ -1,458 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require 'monitor'
-
-module Qpid
-
- class Session < Invoker
-
- def log; Qpid::logger["qpid.io.cmd"]; end
- def msg; Qpid::logger["qpid.io.msg"]; end
-
-
- class Exception < RuntimeError; end
- class Closed < Qpid::Session::Exception; end
- class Detached < Qpid::Session::Exception; end
-
-
- INCOMPLETE = Object.new
-
- def self.client(*args)
- return Qpid::Client(*args)
- end
-
- def self.server(*args)
- return Server(*args)
- end
-
- attr_reader :name, :spec, :auto_sync, :timeout, :channel
- attr_reader :results, :exceptions
- attr_accessor :channel, :auto_sync, :send_id, :receiver, :sender
-
- # FIXME: Pass delegate through a block ?
- def initialize(name, spec, kwargs = {})
- auto_sync = true
- auto_sync = kwargs[:auto_sync] if kwargs.key?(:auto_sync)
- timeout = kwargs[:timeout] || 10
- delegate = kwargs[:delegate]
-
- @name = name
- @spec = spec
- @auto_sync = auto_sync
- @timeout = timeout
- @invoke_lock = Monitor.new
- @closing = false
- @closed = false
-
- @cond_lock = Monitor.new
- @condition = @cond_lock.new_cond
-
- @send_id = true
- @receiver = Receiver.new(self)
- @sender = Sender.new(self)
-
- @lock = Monitor.new
- @incoming = {}
- @results = {}
- @exceptions = []
-
- @assembly = nil
-
- @delegate = delegate.call(self) if delegate
-
- @ctl_seg = spec[:segment_type].enum[:control].value
- @cmd_seg = spec[:segment_type].enum[:command].value
- @hdr_seg = spec[:segment_type].enum[:header].value
- @body_seg = spec[:segment_type].enum[:body].value
- end
-
- def incoming(destination)
- @lock.synchronize do
- queue = @incoming[destination]
- unless queue
- queue = Incoming.new(self, destination)
- @incoming[destination] = queue
- end
- return queue
- end
- end
-
- def error?
- @exceptions.size > 0
- end
-
- def sync(timeout=nil)
- if channel && Thread.current == channel.connection.thread
- raise Qpid::Session::Exception, "deadlock detected"
- end
- unless @auto_sync
- execution_sync(:sync => true)
- end
- last = @sender.next_id - 1
- @cond_lock.synchronize do
- unless @condition.wait_for(timeout) {
- @sender.completed.include?(last) || error?
- }
- raise Qpid::Timeout
- end
- end
- if error?
- raise Qpid::Session::Exception, @exceptions
- end
- end
-
- def close(timeout=nil)
- @invoke_lock.synchronize do
- @closing = true
- channel.session_detach(name)
- end
- @cond_lock.synchronize do
- unless @condition.wait_for(timeout) { @closed }
- raise Qpid::Timeout
- end
- end
- end
-
- def closed
- @lock.synchronize do
- return if @closed
-
- @results.each { |id, f| f.error(exceptions) }
- @results.clear
-
- @incoming.values.each { |q| q.close(exceptions) }
- @closed = true
- @cond_lock.synchronize { @condition.signal }
- end
- end
-
- def resolve_method(name)
- o = @spec.children[name]
- case o
- when Qpid::Spec010::Command
- return invocation(:method, o)
- when Qpid::Spec010::Struct
- return invocation(:method, o)
- when Qpid::Spec010::Domain
- return invocation(:value, o.enum) unless o.enum.nil?
- end
-
- matches = @spec.children.select { |x|
- x.name.to_s.include?(name.to_s)
- }.collect { |x| x.name.to_s }.sort
- if matches.size == 0
- msg = nil
- elsif matches.size == 1
- msg = "Did you mean #{matches[0]} ? "
- else
- msg = "Did you mean one of #{matches.join(",")} ? "
- end
- return invocation(:error, msg)
- end
-
- def invoke(type, args)
- # XXX
- unless type.respond_to?(:track)
- return type.create(*args)
- end
- @invoke_lock.synchronize do
- return do_invoke(type, args)
- end
- end
-
- def do_invoke(type, args)
- raise Qpid::Session::Closed if @closing
- raise Qpid::Session::Detached unless channel
-
- # Clumsy simulation of Python's keyword args
- kwargs = {}
- if args.size > 0 && args[-1].is_a?(Hash)
- if args.size > type.fields.size
- kwargs = args.pop
- elsif type.fields[args.size - 1].type != @spec[:map]
- kwargs = args.pop
- end
- end
-
- if type.payload
- if args.size == type.fields.size + 1
- message = args.pop
- else
- message = kwargs.delete(:message) # XXX Really ?
- end
- else
- message = nil
- end
-
- hdr = Qpid::struct(@spec[:header])
- hdr.sync = @auto_sync || kwargs.delete(:sync)
-
- cmd = type.create(*args.push(kwargs))
- sc = Qpid::StringCodec.new(@spec)
- sc.write_command(hdr, cmd)
-
- seg = Segment.new(true, (message.nil? ||
- (message.headers.nil? && message.body.nil?)),
- type.segment_type, type.track, @channel.id, sc.encoded)
-
- unless type.result.nil?
- result = Future.new(exception=Exception)
- @results[@sender.next_id] = result
- end
- emit(seg)
-
- log.debug("SENT %s %s %s" % [seg.id, hdr, cmd]) if log
-
- unless message.nil?
- unless message.headers.nil?
- sc = Qpid::StringCodec.new(@spec)
- message.headers.each { |st| sc.write_struct32(st) }
-
- seg = Segment.new(false, message.body.nil?, @hdr_seg,
- type.track, @channel.id, sc.encoded)
- emit(seg)
- end
- unless message.body.nil?
- seg = Segment.new(false, true, @body_seg, type.track,
- @channel.id, message.body)
- emit(seg)
- end
- msg.debug("SENT %s" % message) if msg
- end
-
- if !type.result.nil?
- return @auto_sync ? result.get(@timeout) : result
- elsif @auto_sync
- sync(@timeout)
- end
- end
-
- def received(seg)
- @receiver.received(seg)
- if seg.first_segment?
- raise Qpid::Session::Exception unless @assembly.nil?
- @assembly = []
- end
- @assembly << seg
- if seg.last_segment?
- dispatch(@assembly)
- @assembly = nil
- end
- end
-
- def dispatch(assembly)
- hdr = nil
- cmd = nil
- header = nil
- body = nil
- assembly.each do |seg|
- d = seg.decode(@spec)
- case seg.type
- when @cmd_seg
- hdr, cmd = d
- when @hdr_seg
- header = d
- when @body_seg
- body = d
- else
- raise Qpid::Session::Exception
- end
- end
- log.debug("RECV %s %s %s" % [cmd.id, hdr, cmd]) if log
-
- if cmd.st_type.payload
- result = @delegate.send(cmd.st_type.name, cmd, header, body)
- else
- result = @delegate.send(cmd.st_type.name, cmd)
- end
-
- unless cmd.st_type.result.nil?
- execution_result(cmd.id, result)
- end
-
- if result != INCOMPLETE
- assembly.each do |seg|
- @receiver.has_completed(seg)
- # XXX: don't forget to obey sync for manual completion as well
- if hdr.sync
- @channel.session_completed(@receiver.completed)
- end
- end
- end
- end
-
- # Python calls this 'send', but that has a special meaning
- # in Ruby, so we call it 'emit'
- def emit(seg)
- @sender.emit(seg)
- end
-
- def signal
- @cond_lock.synchronize { @condition.signal }
- end
-
- def wait_for(timeout = nil, &block)
- @cond_lock.synchronize { @condition.wait_for(timeout, &block) }
- end
-
- def to_s
- "<Session: #{name}, #{channel}>"
- end
-
- class Receiver
-
- attr_reader :completed
- attr_accessor :next_id, :next_offset
-
- def initialize(session)
- @session = session
- @next_id = nil
- @next_offset = nil
- @completed = Qpid::RangedSet.new()
- end
-
- def received(seg)
- if @next_id.nil? || @next_offset.nil?
- raise Exception, "todo"
- end
- seg.id = @next_id
- seg.offset = @next_offset
- if seg.last_segment?
- @next_id += 1
- @next_offset = 0
- else
- @next_offset += seg.payload.size
- end
- end
-
- def has_completed(seg)
- if seg.id.nil?
- raise ArgumentError, "cannot complete unidentified segment"
- end
- if seg.last_segment?
- @completed.add(seg.id)
- end
- end
-
- def known_completed(commands)
- completed = Qpid::RangedSet.new()
- @completed.ranges.each do |c|
- unless commands.ranges.find { |kc|
- kc.contains(c.lower) && kc.contains(c.upper)
- }
- completed.add_range(c)
- end
- end
- @completed = completed
- end
- end
-
- class Sender
-
- def initialize(session)
- @session = session
- @next_id = 0.to_serial
- @next_offset = 0
- @segments = []
- @completed = RangedSet.new()
- end
-
- attr_reader :next_id, :completed
-
- def emit(seg)
- seg.id = @next_id
- seg.offset = @next_offset
- if seg.last_segment?
- @next_id += 1
- @next_offset = 0
- else
- @next_offset += seg.payload.size
- end
- @segments << seg
- if @session.send_id
- @session.send_id = false
- @session.channel.session_command_point(seg.id, seg.offset)
- end
- @session.channel.connection.write_segment(seg)
- end
-
- def has_completed(commands)
- @segments = @segments.reject { |seg| commands.include?(seg.id) }
- commands.ranges.each do |range|
- @completed.add(range.lower, range.upper)
- end
- end
- end
-
- class Incoming < Qpid::Queue
-
- def initialize(session, destination)
- super()
- @session = session
- @destination = destination
- end
-
- def start
- @session.message_credit_unit.choices.each do |unit|
- @session.message_flow(@destination, unit.value, 0xFFFFFFFF)
- end
- end
-
- def stop
- @session.message_cancel(@destination)
- listen # Kill the listener
- end
- end
-
- class Delegate
-
- def initialize(session)
- @session = session
- end
-
- #XXX: do something with incoming accepts
- def message_accept(ma) nil; end
-
- def execution_result(er)
- future = @session.results.delete(er.command_id)
- future.set(er.value)
- end
-
- def execution_exception(ex)
- @session.exceptions << ex
- end
- end
-
- class Client < Delegate
-
- def log ; Qpid::logger["qpid.io.msg"]; end
-
- def message_transfer(cmd, headers, body)
- m = Qpid::Message.new(body)
- m.headers = headers
- m.id = cmd.id
- messages = @session.incoming(cmd.destination)
- messages.put(m)
- log.debug("RECV %s" % m) if log
- return INCOMPLETE
- end
- end
- end
-end
diff --git a/qpid/ruby/lib/qpid/spec.rb b/qpid/ruby/lib/qpid/spec.rb
deleted file mode 100644
index b3d70d019d..0000000000
--- a/qpid/ruby/lib/qpid/spec.rb
+++ /dev/null
@@ -1,183 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "set"
-require "rexml/document"
-require "qpid/fields"
-require "qpid/traverse"
-
-module Qpid
- module Spec
-
- include REXML
-
- class Container < Array
-
- def initialize()
- @cache = {}
- end
-
- def [](key)
- return @cache[key] if @cache.include?(key)
- value = do_lookup(key)
- @cache[key] = value
- return value
- end
-
- def do_lookup(key)
- case key
- when String
- return find {|x| x.name == key.intern()}
- when Symbol
- return find {|x| x.name == key}
- else
- return slice(key)
- end
- end
-
- def +(other)
- copy = clone()
- copy.concat(other)
- return copy
- end
-
- end
-
- class Reference
-
- fields(:name)
-
- def init(&block)
- @resolver = block
- end
-
- def resolve(*args)
- @resolver.call(*args)
- end
-
- end
-
- class Loader
-
- def initialize()
- @stack = []
- end
-
- def container()
- return Container.new()
- end
-
- def load(obj)
- case obj
- when String
- elem = @stack[-1]
- result = container()
- elem.elements.each(obj) {|e|
- @index = result.size
- result << load(e)
- }
- @index = nil
- return result
- else
- elem = obj
- @stack << elem
- begin
- result = send(:"load_#{elem.name}")
- ensure
- @stack.pop()
- end
- return result
- end
- end
-
- def element
- @stack[-1]
- end
-
- def text
- element.text
- end
-
- def attr(name, type = :string, default = nil, path = nil)
- if path.nil?
- elem = element
- else
- elem = nil
- element.elements.each(path) {|elem|}
- if elem.nil?
- return default
- end
- end
-
- value = elem.attributes[name]
- value = value.strip() unless value.nil?
- if value.nil?
- default
- else
- send(:"parse_#{type}", value)
- end
- end
-
- def parse_int(value)
- if value.nil?
- return nil
- else
- value.to_i(0)
- end
- end
-
- TRUE = ["yes", "true", "1"].to_set
- FALSE = ["no", "false", "0", nil].to_set
-
- def parse_bool(value)
- if TRUE.include?(value)
- true
- elsif FALSE.include?(value)
- false
- else
- raise Exception.new("parse error, expecting boolean: #{value}")
- end
- end
-
- def parse_string(value)
- value.to_s
- end
-
- def parse_symbol(value)
- value.intern() unless value.nil?
- end
-
- REPLACE = {" " => "_", "-" => "_"}
- KEYWORDS = {"global" => "global_", "return" => "return_"}
-
- def parse_name(value)
- return if value.nil?
-
- REPLACE.each do |k, v|
- value = value.gsub(k, v)
- end
-
- value = KEYWORDS[value] if KEYWORDS.has_key? value
- return value.intern()
- end
-
- end
-
- end
-end
diff --git a/qpid/ruby/lib/qpid/spec010.rb b/qpid/ruby/lib/qpid/spec010.rb
deleted file mode 100644
index 3e54115087..0000000000
--- a/qpid/ruby/lib/qpid/spec010.rb
+++ /dev/null
@@ -1,485 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "qpid/spec"
-require 'pathname'
-require 'fileutils'
-
-module Qpid::Spec010
-
- include Qpid::Spec
-
- # XXX: workaround for ruby bug/missfeature
- Reference = Reference
- Loader = Loader
-
- class Spec
-
- ENCODINGS = {
- String => "str16",
- Fixnum => "int64",
- Bignum => "int64",
- Float => "float",
- NilClass => "void",
- Array => "list",
- Hash => "map"
- }
-
- fields(:major, :minor, :port, :children)
-
- def init()
- @controls = {}
- @commands = {}
- @structs = {}
- @types = {}
- children.each {|c|
- case c
- when Control
- @controls[c.code] = c
- when Command
- @commands[c.code] = c
- when Struct
- @structs[c.code] = c
- when Type
- @types[c.code] = c unless c.code.nil?
- end
- }
- end
-
- attr_reader :controls, :commands, :structs, :types
-
- def [](key)
- return @children[key]
- end
-
- def encoding(klass)
- if ENCODINGS.has_key?(klass)
- return self[ENCODINGS[klass]]
- end
- for base in klass.__bases__
- result = encoding(base)
- return result unless result.nil?
- end
- end
-
- def inspect; "spec"; end
- end
-
- class Constant
-
- fields(:name, :value)
-
- attr :parent, true
-
- end
-
- class Type
-
- fields(:name, :code, :fixed, :variable)
-
- attr :parent, true
-
- def present?(value)
- if @fixed == 0
- return value
- else
- return !value.nil?
- end
- end
-
- def encode(codec, value)
- codec.send("write_#{name}", value)
- end
-
- def decode(codec)
- return codec.send("read_#{name}")
- end
-
- def inspect; name; end
-
- end
-
- class Domain < Type
-
- fields(:name, :type, :enum)
-
- attr :parent, true
-
- def encode(codec, value)
- @type.encode(codec, value)
- end
-
- def decode(codec)
- return @type.decode(codec)
- end
-
- end
-
- class Enum
- fields(:choices)
-
- def [](choice)
- case choice
- when String
- choice = choice.to_sym
- return choices.find { |c| c.name == choice }
- when Symbol
- return choices.find { |c| c.name == choice }
- else
- return choices.find { |c| c.value == choice }
- end
- end
-
- def method_missing(name, *args)
- raise ArgumentError.new("wrong number of arguments") unless args.empty?
- return self[name].value
- end
-
- end
-
- class Choice
- fields(:name, :value)
- end
-
- class Composite
-
- fields(:name, :code, :size, :pack, :fields)
-
- attr :parent, true
-
- # Python calls this 'new', but that has special meaning in Ruby
- def create(*args)
- return Qpid::struct(self, *args)
- end
-
- def decode(codec)
- codec.read_size(@size)
- codec.read_uint16() unless @code.nil?
- return Qpid::struct(self, self.decode_fields(codec))
- end
-
- def decode_fields(codec)
- flags = 0
- pack.times {|i| flags |= (codec.read_uint8() << 8*i)}
-
- result = {}
-
- fields.each_index {|i|
- f = @fields[i]
- if flags & (0x1 << i) != 0
- result[f.name] = f.type.decode(codec)
- else
- result[f.name] = nil
- end
- }
-
- return result
- end
-
- def encode(codec, value)
- sc = Qpid::StringCodec.new(@spec)
- sc.write_uint16(@code) unless @code.nil?
- encode_fields(sc, value)
- codec.write_size(@size, sc.encoded.size)
- codec.write(sc.encoded)
- end
-
- def encode_fields(codec, values)
- # FIXME: This could be written cleaner using select
- # instead of flags
- flags = 0
- fields.each_index do |i|
- f = fields[i]
- flags |= (0x1 << i) if f.type.present?(values[f.name])
- end
-
- pack.times { |i| codec.write_uint8((flags >> 8*i) & 0xFF) }
-
- fields.each_index do |i|
- f = fields[i]
- f.type.encode(codec, values[f.name]) if flags & (0x1 << i) != 0
- end
- end
-
- def inspect; name; end
-
- end
-
- class Field
-
- fields(:name, :type, :exceptions)
-
- def default()
- return nil
- end
-
- end
-
- class Struct < Composite
-
- def present?(value)
- return !value.nil?
- end
-
- end
-
- class Action < Composite; end
-
- class Control < Action
-
- def segment_type
- @parent[:segment_type].enum[:control].value
- end
-
- def track
- @parent[:track].enum[:control].value
- end
-
- end
-
- class Command < Action
-
- attr_accessor :payload, :result
-
- def segment_type
- @parent["segment_type"].enum["command"].value
- end
-
- def track
- @parent["track"].enum["command"].value
- end
-
- end
-
- class Doc
- fields(:type, :title, :text)
- end
-
- class Loader010 < Loader
-
- def initialize()
- super()
- end
-
- def klass
- cls = element
- until cls.nil?
- break if cls.name == "class"
- cls = cls.parent
- end
- return cls
- end
-
- def scope
- if element.name == "struct"
- return nil
- else
- return class_name
- end
- end
-
- def class_name
- cls = klass
- if cls.nil?
- return nil
- else
- return parse_name(cls.attributes["name"].strip)
- end
- end
-
- def class_code
- cls = klass
- if cls.nil?
- return 0
- else
- return parse_int(cls.attributes["code"].strip)
- end
- end
-
- def parse_decl(value)
- name = parse_name(value)
-
- s = scope
- if s.nil?
- return name
- else
- return :"#{s}_#{name}"
- end
- end
-
- def parse_code(value)
- c = parse_int(value)
- if c.nil?
- return nil
- else
- return c | (class_code << 8)
- end
- end
-
- def parse_type(value)
- name = parse_name(value.sub(".", "_"))
- cls = class_name
- return Reference.new {|spec|
- candidates = [name]
- candidates << :"#{cls}_#{name}" unless cls.nil?
- for c in candidates
- child = spec[c]
- break unless child.nil?
- end
- if child.nil?
- raise Exception.new("unresolved type: #{name}")
- else
- child
- end
-}
- end
-
- def load_amqp()
- children = nil
-
- for s in ["constant", "type", "domain", "struct", "control",
- "command"]
- ch = load(s)
- if children.nil?
- children = ch
- else
- children += ch
- end
- children += load("class/#{s}")
- end
- children += load("class/command/result/struct")
- Spec.new(attr("major", :int), attr("minor", :int), attr("port", :int),
- children)
- end
-
- def load_constant()
- Constant.new(attr("name", :decl), attr("value", :int))
- end
-
- def load_type()
- Type.new(attr("name", :decl), attr("code", :code),
- attr("fixed-width", :int), attr("variable-width", :int))
- end
-
- def load_domain()
- Domain.new(attr("name", :decl), attr("type", :type), load("enum").first)
- end
-
- def load_enum()
- Enum.new(load("choice"))
- end
-
- def load_choice()
- Choice.new(attr("name", :name), attr("value", :int))
- end
-
- def load_field()
- Field.new(attr("name", :name), attr("type", :type))
- end
-
- def load_struct()
- Struct.new(attr("name", :decl), attr("code", :code), attr("size", :int),
- attr("pack", :int), load("field"))
- end
-
- def load_action(cls)
- cls.new(attr("name", :decl), attr("code", :code), 0, 2, load("field"))
- end
-
- def load_control()
- load_action(Control)
- end
-
- def load_command()
- result = attr("type", :type, nil, "result")
- result = attr("name", :type, nil, "result/struct") if result.nil?
- segs = load("segments")
- cmd = load_action(Command)
- cmd.result = result
- cmd.payload = !segs.empty?
- return cmd
- end
-
- def load_result()
- true
- end
-
- def load_segments()
- true
- end
-
- end
-
- def self.spec_cache(specfile)
- File::join(File::dirname(__FILE__), "spec_cache",
- File::basename(specfile, ".xml") + ".rb_marshal")
- end
-
- # XXX: could be shared
- def self.load(spec = nil)
- return spec if spec.is_a?(Qpid::Spec010::Spec)
- if spec.nil?
- # FIXME: Need to add a packaging setup in here so we know where
- # the installed spec is going to be.
- specfile = nil
- if ENV['AMQP_SPEC']
- specfile = ENV['AMQP_SPEC']
- else
- require "qpid/config"
- specfile = Qpid::Config.amqp_spec
- end
- else
- specfile = spec
- end
-
- specfile_cache = spec_cache(specfile)
- # FIXME: Check that cache is newer than specfile
- if File::exist?(specfile_cache)
- begin
- spec = File::open(specfile_cache, "r") do |f|
- Marshal::load(f)
- end
- return spec
- rescue
- # Ignore, will load from XML
- end
- end
-
- doc = File::open(specfile, "r") { |f| Document.new(f) }
- spec = Loader010.new().load(doc.root)
- spec.traverse! do |o|
- if o.is_a?(Reference)
- o.resolve(spec)
- else
- o
- end
- end
-
- spec.children.each { |c| c.parent = spec }
-
- begin
- FileUtils::mkdir_p(File::dirname(specfile_cache))
- File::open(specfile_cache, "w") { |f| Marshal::dump(spec, f) }
- rescue
- # Ignore, we are fine without the cached spec
- end
- return spec
- end
-
-end
diff --git a/qpid/ruby/lib/qpid/spec08.rb b/qpid/ruby/lib/qpid/spec08.rb
deleted file mode 100644
index 902c05c297..0000000000
--- a/qpid/ruby/lib/qpid/spec08.rb
+++ /dev/null
@@ -1,190 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "qpid/spec"
-
-module Qpid08
-
- module Spec
-
- include Qpid::Spec
-
- # XXX: workaround for ruby bug/missfeature
- Reference = Reference
-
- class Root
- fields(:major, :minor, :classes, :constants, :domains)
-
- def find_method(name)
- classes.each do |c|
- c.methods.each do |m|
- if name == m.qname
- return m
- end
- end
- end
-
- return nil
- end
- end
-
- class Constant
- fields(:name, :id, :type, :docs)
- end
-
- class Domain
- fields(:name, :type)
- end
-
- class Class
- fields(:name, :id, :handler, :fields, :methods, :docs)
- end
-
- class Method
- fields(:name, :id, :content?, :responses, :synchronous?, :fields,
- :docs)
-
- def init()
- @response = false
- end
-
- attr :parent, true
-
- def response?; @response end
- def response=(b); @response = b end
-
- def qname
- :"#{parent.name}_#{name}"
- end
- end
-
- class Field
- fields(:name, :id, :type, :docs)
-
- def default
- case type
- when :bit then false
- when :octet, :short, :long, :longlong then 0
- when :shortstr, :longstr then ""
- when :table then {}
- end
- end
- end
-
- class Doc
- fields(:type, :text)
- end
-
- class Container08 < Container
- def do_lookup(key)
- case key
- when Integer
- return find {|x| x.id == key}
- else
- return super(key)
- end
- end
- end
-
- class Loader08 < Loader
-
- def container()
- return Container08.new()
- end
-
- def load_amqp()
- Root.new(attr("major", :int), attr("minor", :int), load("class"),
- load("constant"), load("domain"))
- end
-
- def load_class()
- Class.new(attr("name", :name), attr("index", :int), attr("handler", :name),
- load("field"), load("method"), load("doc"))
- end
-
- def load_method()
- Method.new(attr("name", :name), attr("index", :int),
- attr("content", :bool), load("response"),
- attr("synchronous", :bool), load("field"), load("docs"))
- end
-
- def load_response()
- name = attr("name", :name)
- Reference.new {|spec, klass|
- response = klass.methods[name]
- if response.nil?
- raise Exception.new("no such method: #{name}")
- end
- response
- }
- end
-
- def load_field()
- type = attr("type", :name)
- if type.nil?
- domain = attr("domain", :name)
- type = Reference.new {|spec, klass|
- spec.domains[domain].type
- }
- end
- Field.new(attr("name", :name), @index, type, load("docs"))
- end
-
- def load_constant()
- Constant.new(attr("name", :name), attr("value", :int), attr("class", :name),
- load("doc"))
- end
-
- def load_domain()
- Domain.new(attr("name", :name), attr("type", :name))
- end
-
- def load_doc()
- Doc.new(attr("type", :symbol), text)
- end
-
- end
-
- def self.load(spec)
- case spec
- when String
- spec = File.new(spec)
- end
- doc = Document.new(spec)
- spec = Loader08.new().load(doc.root)
- spec.classes.each do |klass|
- klass.traverse! do |o|
- case o
- when Reference
- o.resolve(spec, klass)
- else
- o
- end
- end
- klass.methods.each do |m|
- m.parent = klass
- m.responses.each do |r|
- r.response = true
- end
- end
- end
- return spec
- end
- end
-end
diff --git a/qpid/ruby/lib/qpid/specs/amqp.0-10-qpid-errata.xml b/qpid/ruby/lib/qpid/specs/amqp.0-10-qpid-errata.xml
deleted file mode 100644
index 365928ea4e..0000000000
--- a/qpid/ruby/lib/qpid/specs/amqp.0-10-qpid-errata.xml
+++ /dev/null
@@ -1,6654 +0,0 @@
-<?xml version="1.0"?>
-
-<!--
- Copyright Notice
- ================
- (c) Copyright Cisco Systems, Credit Suisse, Deutsche Borse Systems, Envoy Technologies, Inc.,
- Goldman Sachs, IONA Technologies PLC, iMatix Corporation sprl.,JPMorgan Chase Bank Inc. N.A,
- Novell, Rabbit Technologies Ltd., Red Hat, Inc., TWIST Process Innovations ltd, and 29West Inc.
- 2006, 2007. All rights reserved.
-
- License
- =======
-
- Cisco Systems, Credit Suisse, Deutsche Borse Systems, Envoy Technologies, Inc.,Goldman Sachs,
- IONA Technologies PLC, iMatix Corporation sprl.,JPMorgan Chase Bank Inc. N.A, Novell, Rabbit
- Technologies Ltd., Red Hat, Inc., TWIST Process Innovations ltd, and 29West Inc. (collectively,
- the "Authors") each hereby grants to you a worldwide, perpetual, royalty-free, nontransferable,
- nonexclusive license to (i) copy, display, distribute and implement the Advanced Messaging Queue
- Protocol ("AMQP") Specification and (ii) the Licensed Claims that are held by the Authors, all for
- the purpose of implementing the Advanced Messaging Queue Protocol Specification. Your license and
- any rights under this Agreement will terminate immediately without notice from any Author if you
- bring any claim, suit, demand, or action related to the Advanced Messaging Queue Protocol
- Specification against any Author. Upon termination, you shall destroy all copies of the Advanced
- Messaging Queue Protocol Specification in your possession or control.
-
- As used hereunder, "Licensed Claims" means those claims of a patent or patent application,
- throughout the world, excluding design patents and design registrations, owned or controlled, or
- that can be sublicensed without fee and in compliance with the requirements of this Agreement, by
- an Author or its affiliates now or at any future time and which would necessarily be infringed by
- implementation of the Advanced Messaging Queue Protocol Specification. A claim is necessarily
- infringed hereunder only when it is not possible to avoid infringing it because there is no
- plausible non-infringing alternative for implementing the required portions of the Advanced
- Messaging Queue Protocol Specification. Notwithstanding the foregoing, Licensed Claims shall not
- include any claims other than as set forth above even if contained in the same patent as Licensed
- Claims; or that read solely on any implementations of any portion of the Advanced Messaging Queue
- Protocol Specification that are not required by the Advanced Messaging Queue Protocol
- Specification, or that, if licensed, would require a payment of royalties by the licensor to
- unaffiliated third parties. Moreover, Licensed Claims shall not include (i) any enabling
- technologies that may be necessary to make or use any Licensed Product but are not themselves
- expressly set forth in the Advanced Messaging Queue Protocol Specification (e.g., semiconductor
- manufacturing technology, compiler technology, object oriented technology, networking technology,
- operating system technology, and the like); or (ii) the implementation of other published
- standards developed elsewhere and merely referred to in the body of the Advanced Messaging Queue
- Protocol Specification, or (iii) any Licensed Product and any combinations thereof the purpose or
- function of which is not required for compliance with the Advanced Messaging Queue Protocol
- Specification. For purposes of this definition, the Advanced Messaging Queue Protocol
- Specification shall be deemed to include both architectural and interconnection requirements
- essential for interoperability and may also include supporting source code artifacts where such
- architectural, interconnection requirements and source code artifacts are expressly identified as
- being required or documentation to achieve compliance with the Advanced Messaging Queue Protocol
- Specification.
-
- As used hereunder, "Licensed Products" means only those specific portions of products (hardware,
- software or combinations thereof) that implement and are compliant with all relevant portions of
- the Advanced Messaging Queue Protocol Specification.
-
- The following disclaimers, which you hereby also acknowledge as to any use you may make of the
- Advanced Messaging Queue Protocol Specification:
-
- THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO
- REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS
- OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE
- IMPLEMENTATION OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION WILL NOT INFRINGE ANY THIRD
- PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
- THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
- DAMAGES ARISING OUT OF OR RELATING TO ANY USE, IMPLEMENTATION OR DISTRIBUTION OF THE ADVANCED
- MESSAGING QUEUE PROTOCOL SPECIFICATION.
-
- The name and trademarks of the Authors may NOT be used in any manner, including advertising or
- publicity pertaining to the Advanced Messaging Queue Protocol Specification or its contents
- without specific, written prior permission. Title to copyright in the Advanced Messaging Queue
- Protocol Specification will at all times remain with the Authors.
-
- No other rights are granted by implication, estoppel or otherwise.
-
- Upon termination of your license or rights under this Agreement, you shall destroy all copies of
- the Advanced Messaging Queue Protocol Specification in your possession or control.
-
- Trademarks
- ==========
- "JPMorgan", "JPMorgan Chase", "Chase", the JPMorgan Chase logo and the Octagon Symbol are
- trademarks of JPMorgan Chase & Co.
-
- IMATIX and the iMatix logo are trademarks of iMatix Corporation sprl.
-
- IONA, IONA Technologies, and the IONA logos are trademarks of IONA Technologies PLC and/or its
- subsidiaries.
-
- LINUX is a trademark of Linus Torvalds. RED HAT and JBOSS are registered trademarks of Red Hat,
- Inc. in the US and other countries.
-
- Java, all Java-based trademarks and OpenOffice.org are trademarks of Sun Microsystems, Inc. in the
- United States, other countries, or both.
-
- Other company, product, or service names may be trademarks or service marks of others.
-
- Links to full AMQP specification:
- =================================
- http://www.envoytech.org/spec/amq/
- http://www.iona.com/opensource/amqp/
- http://www.redhat.com/solutions/specifications/amqp/
- http://www.twiststandards.org/tiki-index.php?page=AMQ
- http://www.imatix.com/amqp
--->
-
-<!--
- XML Notes
- =========
-
- We use entities to indicate repetition; attributes to indicate properties.
-
- We use the "name" attribute as an identifier, usually within the context of the surrounding
- entities.
-
- We use hyphens (minus char '-') to seperate words in names.
-
- We do not enforce any particular validation mechanism but we support all mechanisms. The protocol
- definition conforms to a formal grammar that is published seperately in several technologies.
-
--->
-
-<!DOCTYPE amqp SYSTEM "amqp.0-10.dtd">
-
-<amqp xmlns="http://www.amqp.org/schema/amqp.xsd"
- major="0" minor="10" port="5672">
-
- <!--
- ====================== == type definitions == ======================
- -->
-
- <!--
- 0x00 - 0x0f: Fixed width, 1 octet
- -->
-
- <type name="bin8" code="0x00" fixed-width="1" label="octet of unspecified encoding">
- <doc>
- The bin8 type consists of exactly one octet of opaque binary data.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET
- +----------+
- | bin8 |
- +----------+
- </doc>
-
- <doc type="bnf">
- bin8 = OCTET
- </doc>
- </type>
-
- <type name="int8" code="0x01" fixed-width="1" label="8-bit signed integral value (-128 - 127)">
- <doc>
- The int8 type is a signed integral value encoded using an 8-bit two's complement
- representation.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET
- +----------+
- | int8 |
- +----------+
- </doc>
-
- <doc type="bnf">
- int8 = OCTET
- </doc>
- </type>
-
- <type name="uint8" code="0x02" fixed-width="1" label="8-bit unsigned integral value (0 - 255)">
- <doc>
- The uint8 type is an 8-bit unsigned integral value.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET
- +---------+
- | uint8 |
- +---------+
- </doc>
-
- <doc type="bnf">
- uint8 = OCTET
- </doc>
- </type>
-
- <type name="char" code="0x04" fixed-width="1" label="an iso-8859-15 character">
- <doc>
- The char type encodes a single character from the iso-8859-15 character set.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET
- +----------+
- | char |
- +----------+
- </doc>
-
- <doc type="bnf">
- char = OCTET
- </doc>
- </type>
-
- <type name="boolean" code="0x08" fixed-width="1"
- label="boolean value (zero represents false, nonzero represents true)">
- <doc>
- The boolean type is a single octet that encodes a true or false value. If the octet is zero,
- then the boolean is false. Any other value represents true.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET
- +---------+
- | boolean |
- +---------+
- </doc>
-
- <doc type="bnf">
- boolean = OCTET
- </doc>
- </type>
-
- <!--
- 0x10 - 0x1f: Fixed width, 2 octets
- -->
-
- <type name="bin16" code="0x10" fixed-width="2" label="two octets of unspecified binary encoding">
- <doc>
- The bin16 type consists of two consecutive octets of opaque binary data.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET
- +-----------+-----------+
- | octet-one | octet-two |
- +-----------+-----------+
- </doc>
-
- <doc type="bnf">
- bin16 = 2 OCTET
- </doc>
- </type>
-
- <type name="int16" code="0x11" fixed-width="2" label="16-bit signed integral value">
- <doc>
- The int16 type is a signed integral value encoded using a 16-bit two's complement
- representation in network byte order.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET
- +-----------+----------+
- | high-byte | low-byte |
- +-----------+----------+
- </doc>
-
- <doc type="bnf">
- int16 = high-byte low-byte
- high-byte = OCTET
- low-byte = OCTET
- </doc>
- </type>
-
- <type name="uint16" code="0x12" fixed-width="2" label="16-bit unsigned integer">
- <doc>
- The uint16 type is a 16-bit unsigned integral value encoded in network byte order.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET
- +-----------+----------+
- | high-byte | low-byte |
- +-----------+----------+
- </doc>
-
- <doc type="bnf">
- uint16 = high-byte low-byte
- high-byte = OCTET
- low-byte = OCTET
- </doc>
- </type>
-
- <!--
- 0x20 - 0x2f: Fixed width, 4 octets
- -->
-
- <type name="bin32" code="0x20" fixed-width="4" label="four octets of unspecified binary encoding">
- <doc>
- The bin32 type consists of 4 consecutive octets of opaque binary data.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET 1 OCTET 1 OCTET
- +-----------+-----------+-------------+------------+
- | octet-one | octet-two | octet-three | octet-four |
- +-----------+-----------+-------------+------------+
- </doc>
-
- <doc type="bnf">
- bin32 = 4 OCTET
- </doc>
- </type>
-
- <type name="int32" code="0x21" fixed-width="4" label="32-bit signed integral value">
- <doc>
- The int32 type is a signed integral value encoded using a 32-bit two's complement
- representation in network byte order.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET 1 OCTET 1 OCTET
- +-----------+------------+----------+----------+
- | byte-four | byte-three | byte-two | byte-one |
- +-----------+------------+----------+----------+
- MSB LSB
- </doc>
-
- <doc type="bnf">
- int32 = byte-four byte-three byte-two byte-one
- byte-four = OCTET ; most significant byte (MSB)
- byte-three = OCTET
- byte-two = OCTET
- byte-one = OCTET ; least significant byte (LSB)
- </doc>
- </type>
-
- <type name="uint32" code="0x22" fixed-width="4" label="32-bit unsigned integral value">
- <doc>
- The uint32 type is a 32-bit unsigned integral value encoded in network byte order.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET 1 OCTET 1 OCTET
- +-----------+------------+----------+----------+
- | byte-four | byte-three | byte-two | byte-one |
- +-----------+------------+----------+----------+
- MSB LSB
- </doc>
-
- <doc type="bnf">
- uint32 = byte-four byte-three byte-two byte-one
- byte-four = OCTET ; most significant byte (MSB)
- byte-three = OCTET
- byte-two = OCTET
- byte-one = OCTET ; least significant byte (LSB)
- </doc>
- </type>
-
- <type name="float" code="0x23" fixed-width="4"
- label="single precision IEEE 754 32-bit floating point">
- <doc>
- The float type encodes a single precision 32-bit floating point number. The format and
- operations are defined by the IEEE 754 standard for 32-bit floating point numbers.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 4 OCTETs
- +-----------------------+
- | float |
- +-----------------------+
- IEEE 754 32-bit float
- </doc>
-
- <doc type="bnf">
- float = 4 OCTET ; IEEE 754 32-bit floating point number
- </doc>
- </type>
-
- <type name="char-utf32" code="0x27" fixed-width="4"
- label="single unicode character in UTF-32 encoding">
- <doc>
- The char-utf32 type consists of a single unicode character in the UTF-32 encoding.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 4 OCTETs
- +------------------+
- | char-utf32 |
- +------------------+
- UTF-32 character
- </doc>
-
- <doc type="bnf">
- char-utf32 = 4 OCTET ; single UTF-32 character
- </doc>
- </type>
-
- <type name="sequence-no" fixed-width="4" label="serial number defined in RFC-1982">
- <doc>
- The sequence-no type encodes, in network byte order, a serial number as defined in RFC-1982.
- The arithmetic, operators, and ranges for numbers of this type are defined by RFC-1982.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 4 OCTETs
- +------------------------+
- | sequence-no |
- +------------------------+
- RFC-1982 serial number
- </doc>
-
- <doc type="bnf">
- sequence-no = 4 OCTET ; RFC-1982 serial number
- </doc>
- </type>
-
- <!--
- 0x30 - 0x3f: Fixed width types - 8 octets
- -->
-
- <type name="bin64" code="0x30" fixed-width="8"
- label="eight octets of unspecified binary encoding">
- <doc>
- The bin64 type consists of eight consecutive octets of opaque binary data.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET 1 OCTET 1 OCTET
- +-----------+-----------+-----+-------------+-------------+
- | octet-one | octet-two | ... | octet-seven | octet-eight |
- +-----------+-----------+-----+-------------+-------------+
- </doc>
-
- <doc type="bnf">
- bin64 = 8 OCTET
- </doc>
- </type>
-
- <type name="int64" code="0x31" fixed-width="8" label="64-bit signed integral value">
- <doc>
- The int64 type is a signed integral value encoded using a 64-bit two's complement
- representation in network byte order.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET 1 OCTET 1 OCTET
- +------------+------------+-----+----------+----------+
- | byte-eight | byte-seven | ... | byte-two | byte-one |
- +------------+------------+-----+----------+----------+
- MSB LSB
- </doc>
-
- <doc type="bnf">
- int64 = byte-eight byte-seven byte-six byte-five
- byte-four byte-three byte-two byte-one
- byte-eight = 1 OCTET ; most significant byte (MSB)
- byte-seven = 1 OCTET
- byte-six = 1 OCTET
- byte-five = 1 OCTET
- byte-four = 1 OCTET
- byte-three = 1 OCTET
- byte-two = 1 OCTET
- byte-one = 1 OCTET ; least significant byte (LSB)
- </doc>
- </type>
-
- <type name="uint64" code="0x32" fixed-width="8" label="64-bit unsigned integral value">
- <doc>
- The uint64 type is a 64-bit unsigned integral value encoded in network byte order.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET 1 OCTET 1 OCTET
- +------------+------------+-----+----------+----------+
- | byte-eight | byte-seven | ... | byte-two | byte-one |
- +------------+------------+-----+----------+----------+
- MSB LSB
- </doc>
-
- <doc type="bnf">
- uint64 = byte-eight byte-seven byte-six byte-five
- byte-four byte-three byte-two byte-one
- byte-eight = 1 OCTET ; most significant byte (MSB)
- byte-seven = 1 OCTET
- byte-six = 1 OCTET
- byte-five = 1 OCTET
- byte-four = 1 OCTET
- byte-three = 1 OCTET
- byte-two = 1 OCTET
- byte-one = 1 OCTET ; least significant byte (LSB)
- </doc>
- </type>
-
- <type name="double" code="0x33" fixed-width="8" label="double precision IEEE 754 floating point">
- <doc>
- The double type encodes a double precision 64-bit floating point number. The format and
- operations are defined by the IEEE 754 standard for 64-bit double precision floating point
- numbers.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 8 OCTETs
- +-----------------------+
- | double |
- +-----------------------+
- IEEE 754 64-bit float
- </doc>
-
- <doc type="bnf">
- double = 8 OCTET ; double precision IEEE 754 floating point number
- </doc>
- </type>
-
- <type name="datetime" code="0x38" fixed-width="8" label="datetime in 64 bit POSIX time_t format">
- <doc>
- The datetime type encodes a date and time using the 64 bit POSIX time_t format.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 8 OCTETs
- +---------------------+
- | datetime |
- +---------------------+
- posix time_t format
- </doc>
-
- <doc type="bnf">
- datetime = 8 OCTET ; 64 bit posix time_t format
- </doc>
- </type>
-
- <!--
- 0x40 - 0x4f: Fixed width types - 16 octets
- -->
-
- <type name="bin128" code="0x40" fixed-width="16"
- label="sixteen octets of unspecified binary encoding">
- <doc>
- The bin128 type consists of 16 consecutive octets of opaque binary data.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET 1 OCTET 1 OCTET
- +-----------+-----------+-----+---------------+---------------+
- | octet-one | octet-two | ... | octet-fifteen | octet-sixteen |
- +-----------+-----------+-----+---------------+---------------+
- </doc>
-
- <doc type="bnf">
- bin128 = 16 OCTET
- </doc>
- </type>
-
- <type name="uuid" code="0x48" fixed-width="16" label="UUID (RFC-4122 section 4.1.2) - 16 octets">
- <doc>
- The uuid type encodes a universally unique id as defined by RFC-4122. The format and
- operations for this type can be found in section 4.1.2 of RFC-4122.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 16 OCTETs
- +---------------+
- | uuid |
- +---------------+
- RFC-4122 UUID
- </doc>
-
- <doc type="bnf">
- uuid = 16 OCTET ; RFC-4122 section 4.1.2
- </doc>
- </type>
-
- <!--
- 0x50 - 0x5f: Fixed width types - 32 octets
- -->
-
- <type name="bin256" code="0x50" fixed-width="32"
- label="thirty two octets of unspecified binary encoding">
- <doc>
- The bin256 type consists of thirty two consecutive octets of opaque binary data.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET 1 OCTET 1 OCTET
- +-----------+-----------+-----+------------------+------------------+
- | octet-one | octet-two | ... | octet-thirty-one | octet-thirty-two |
- +-----------+-----------+-----+------------------+------------------+
- </doc>
-
- <doc type="bnf">
- bin256 = 32 OCTET
- </doc>
- </type>
-
- <!--
- 0x60 - 0x6f: Fixed width types - 64 octets
- -->
-
- <type name="bin512" code="0x60" fixed-width="64"
- label="sixty four octets of unspecified binary encoding">
- <doc>
- The bin512 type consists of sixty four consecutive octets of opaque binary data.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET 1 OCTET 1 OCTET
- +-----------+-----------+-----+-------------------+------------------+
- | octet-one | octet-two | ... | octet-sixty-three | octet-sixty-four |
- +-----------+-----------+-----+-------------------+------------------+
- </doc>
-
- <doc type="bnf">
- bin512 = 64 OCTET
- </doc>
- </type>
-
- <!--
- 0x70 - 0x7f: Fixed width types - 128 octets
- -->
-
- <type name="bin1024" code="0x70" fixed-width="128"
- label="one hundred and twenty eight octets of unspecified binary encoding">
- <doc>
- The bin1024 type consists of one hundred and twenty eight octets of opaque binary data.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET 1 OCTET 1 OCTET
- +-----------+-----------+-----+------------------------+------------------------+
- | octet-one | octet-two | ... | octet-one-twenty-seven | octet-one-twenty-eight |
- +-----------+-----------+-----+------------------------+------------------------+
- </doc>
-
- <doc type="bnf">
- bin1024 = 128 OCTET
- </doc>
- </type>
-
- <!--
- 0x80 - 0x8f: Variable length - one byte length field (up to 255 octets)
- -->
-
- <type name="vbin8" code="0x80" variable-width="1" label="up to 255 octets of opaque binary data">
- <doc>
- The vbin8 type encodes up to 255 octets of opaque binary data. The number of octets is first
- encoded as an 8-bit unsigned integral value. This is followed by the actual data.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET size OCTETs
- +---------+-------------+
- | size | octets |
- +---------+-------------+
- uint8
- </doc>
-
- <doc type="bnf">
- vbin8 = size octets
- size = uint8
- octets = 0*255 OCTET ; size OCTETs
- </doc>
- </type>
-
- <type name="str8-latin" code="0x84" variable-width="1" label="up to 255 iso-8859-15 characters">
- <doc>
- The str8-latin type encodes up to 255 octets of iso-8859-15 characters. The number of octets
- is first encoded as an 8-bit unsigned integral value. This is followed by the actual
- characters.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET size OCTETs
- +---------+------------------------+
- | size | characters |
- +---------+------------------------+
- uint16 iso-8859-15 characters
- </doc>
-
- <doc type="bnf">
- str8-latin = size characters
- size = uint8
- characters = 0*255 OCTET ; size OCTETs
- </doc>
- </type>
-
- <type name="str8" code="0x85" variable-width="1" label="up to 255 octets worth of UTF-8 unicode">
- <doc>
- The str8 type encodes up to 255 octets worth of UTF-8 unicode. The number of octets of unicode
- is first encoded as an 8-bit unsigned integral value. This is followed by the actual UTF-8
- unicode. Note that the encoded size refers to the number of octets of unicode, not necessarily
- the number of characters since the UTF-8 unicode may include multi-byte character sequences.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET size OCTETs
- +---------+--------------+
- | size | utf8-unicode |
- +---------+--------------+
- uint8
- </doc>
-
- <doc type="bnf">
- str8 = size utf8-unicode
- size = uint8
- utf8-unicode = 0*255 OCTET ; size OCTETs
- </doc>
- </type>
-
- <type name="str8-utf16" code="0x86" variable-width="1"
- label="up to 255 octets worth of UTF-16 unicode">
- <doc>
- The str8-utf16 type encodes up to 255 octets worth of UTF-16 unicode. The number of octets of
- unicode is first encoded as an 8-bit unsigned integral value. This is followed by the actual
- UTF-16 unicode. Note that the encoded size refers to the number of octets of unicode, not the
- number of characters since the UTF-16 unicode will include at least two octets per unicode
- character.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET size OCTETs
- +---------+---------------+
- | size | utf16-unicode |
- +---------+---------------+
- uint8
- </doc>
-
- <doc type="bnf">
- str8-utf16 = size utf16-unicode
- size = uint8
- utf16-unicode = 0*255 OCTET ; size OCTETs
- </doc>
- </type>
-
- <!--
- 0x90 - 0x9f: Variable length types - two byte length field (up to 65535 octets)
- -->
-
- <type name="vbin16" code="0x90" variable-width="2"
- label="up to 65535 octets of opaque binary data">
- <doc>
- The vbin16 type encodes up to 65535 octets of opaque binary data. The number of octets is
- first encoded as a 16-bit unsigned integral value in network byte order. This is followed by
- the actual data.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 2 OCTETs size OCTETs
- +----------+-------------+
- | size | octets |
- +----------+-------------+
- uint16
- </doc>
-
- <doc type="bnf">
- vbin16 = size octets
- size = uint16
- octets = 0*65535 OCTET ; size OCTETs
- </doc>
- </type>
-
- <type name="str16-latin" code="0x94" variable-width="2"
- label="up to 65535 iso-8859-15 characters">
- <doc>
- The str16-latin type encodes up to 65535 octets of is-8859-15 characters. The number of octets
- is first encoded as a 16-bit unsigned integral value in network byte order. This is followed
- by the actual characters.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 2 OCTETs size OCTETs
- +----------+------------------------+
- | size | characters |
- +----------+------------------------+
- uint16 iso-8859-15 characters
- </doc>
-
- <doc type="bnf">
- str16-latin = size characters
- size = uint16
- characters = 0*65535 OCTET ; size OCTETs
- </doc>
- </type>
-
- <type name="str16" code="0x95" variable-width="2"
- label="up to 65535 octets worth of UTF-8 unicode">
- <doc>
- The str16 type encodes up to 65535 octets worth of UTF-8 unicode. The number of octets is
- first encoded as a 16-bit unsigned integral value in network byte order. This is followed by
- the actual UTF-8 unicode. Note that the encoded size refers to the number of octets of
- unicode, not necessarily the number of unicode characters since the UTF-8 unicode may include
- multi-byte character sequences.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 2 OCTETs size OCTETs
- +----------+--------------+
- | size | utf8-unicode |
- +----------+--------------+
- uint16
- </doc>
-
- <doc type="bnf">
- str16 = size utf8-unicode
- size = uint16
- utf8-unicode = 0*65535 OCTET ; size OCTETs
- </doc>
- </type>
-
- <type name="str16-utf16" code="0x96" variable-width="2"
- label="up to 65535 octets worth of UTF-16 unicode">
- <doc>
- The str16-utf16 type encodes up to 65535 octets worth of UTF-16 unicode. The number of octets
- is first encoded as a 16-bit unsigned integral value in network byte order. This is followed
- by the actual UTF-16 unicode. Note that the encoded size refers to the number of octets of
- unicode, not the number of unicode characters since the UTF-16 unicode will include at least
- two octets per unicode character.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 2 OCTETs size OCTETs
- +----------+---------------+
- | size | utf16-unicode |
- +----------+---------------+
- uint16
- </doc>
-
- <doc type="bnf">
- str16-utf16 = size utf16-unicode
- size = uint16
- utf16-unicode = 0*65535 OCTET ; size OCTETs
- </doc>
- </type>
-
- <type name="byte-ranges" variable-width="2" label="byte ranges within a 64-bit payload">
- <doc>
- The byte-ranges type encodes up to 65535 octets worth of non-overlapping, non-touching,
- ascending byte ranges within a 64-bit sequence of bytes. Each range is represented as an
- inclusive lower and upper bound that identifies all the byte offsets included within a given
- range.
- </doc>
-
- <doc>
- The number of octets of data is first encoded as a 16-bit unsigned integral value in network
- byte order. This is then followed by the encoded representation of the ranges included in the
- set. These MUST be encoded in ascending order, and any two ranges included in a given set MUST
- NOT include overlapping or touching byte offsets.
- </doc>
-
- <doc>
- Each range is encoded as a pair of 64-bit unsigned integral values in network byte order
- respectively representing the lower and upper bounds for that range. Note that because each
- range is exactly 16 octets, the size in octets of the encoded ranges will always be 16 times
- the number of ranges in the set.
- </doc>
-
- <doc type="picture" title="Wire Format">
- +----= size OCTETs =----+
- | |
- 2 OCTETs | 16 OCTETs |
- +----------+-----+-----------+-----+
- | size | .../| range |\... |
- +----------+---/ +-----------+ \---+
- uint16 / / \ \
- / / \ \
- / 8 OCTETs 8 OCTETs \
- +-----------+-----------+
- | lower | upper |
- +-----------+-----------+
- uint64 uint64
- </doc>
-
- <doc type="bnf">
- byte-ranges = size *range
- size = uint16
- range = lower upper
- lower = uint64
- upper = uint64
- </doc>
- </type>
-
- <type name="sequence-set" variable-width="2" label="ranged set representation">
- <doc>
- The sequence-set type is a set of pairs of RFC-1982 numbers representing a discontinuous range
- within an RFC-1982 sequence. Each pair represents a closed interval within the list.
- </doc>
-
- <doc>
- Sequence-sets can be represented as lists of pairs of positive 32-bit numbers, each pair
- representing a closed interval that does not overlap or touch with any other interval in the
- list. For example, a set containing words 0, 1, 2, 5, 6, and 15 can be represented:
- </doc>
-
- <doc type="picture">
- [(0, 2), (5, 6), (15, 15)]
- </doc>
-
- <doc>
- 1) The list-of-pairs representation is sorted ascending (as defined by RFC 1982
- (http://www.ietf.org/rfc/rfc1982.txt) ) by the first elements of each pair.
- </doc>
-
- <doc>
- 2) The list-of-pairs is flattened into a list-of-words.
- </doc>
-
- <doc>
- 3) Each word in the list is packed into ascending locations in memory with network byte
- ordering.
- </doc>
-
- <doc>
- 4) The size in bytes, represented as a 16-bit network-byte-order unsigned value, is prepended.
- </doc>
-
- <doc>
- For instance, the example from above would be encoded:
- </doc>
-
- <doc type="picture">
- [(0, 2), (5, 6), (15, 15)] -- already sorted.
- [0, 2, 5, 6, 15, 15] -- flattened.
- 000000000000000200000005000000060000000F0000000F -- bytes in hex
- 0018000000000000000200000005000000060000000F0000000F -- bytes in hex,
- length (24) prepended
- </doc>
-
- <doc type="picture" title="Wire Format">
- +----= size OCTETs =----+
- | |
- 2 OCTETs | 8 OCTETs |
- +----------+-----+-----------+-----+
- | size | .../| range |\... |
- +----------+---/ +-----------+ \---+
- uint16 / / \ \
- / / \ \
- / / \ \
- / / \ \
- / 4 OCTETs 4 OCTETs \
- +-------------+-------------+
- | lower | upper |
- +-------------+-------------+
- sequence-no sequence-no
- </doc>
-
- <doc type="bnf">
- sequence-set = size *range
- size = uint16 ; length of variable portion in bytes
-
- range = lower upper ; inclusive
- lower = sequence-no
- upper = sequence-no
- </doc>
- </type>
-
- <!--
- 0xa0 - 0xaf: Variable length types - four byte length field (up to 4294967295 octets)
- -->
-
- <type name="vbin32" code="0xa0" variable-width="4"
- label="up to 4294967295 octets of opaque binary data">
- <doc>
- The vbin32 type encodes up to 4294967295 octets of opaque binary data. The number of octets is
- first encoded as a 32-bit unsigned integral value in network byte order. This is followed by
- the actual data.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 4 OCTETs size OCTETs
- +----------+-------------+
- | size | octets |
- +----------+-------------+
- uint32
- </doc>
-
- <doc type="bnf">
- vbin32 = size octets
- size = uint32
- octets = 0*4294967295 OCTET ; size OCTETs
- </doc>
- </type>
-
- <type name="map" code="0xa8" variable-width="4" label="a mapping of keys to typed values">
- <doc>
- A map is a set of distinct keys where each key has an associated (type,value) pair. The triple
- of the key, type, and value, form an entry within a map. Each entry within a given map MUST
- have a distinct key. A map is encoded as a size in octets, a count of the number of entries,
- followed by the encoded entries themselves.
- </doc>
-
- <doc>
- An encoded map may contain up to (4294967295 - 4) octets worth of encoded entries. The size is
- encoded as a 32-bit unsigned integral value in network byte order equal to the number of
- octets worth of encoded entries plus 4. (The extra 4 octets is added for the entry count.) The
- size is then followed by the number of entries encoded as a 32-bit unsigned integral value in
- network byte order. Finally the entries are encoded sequentially.
- </doc>
-
- <doc>
- An entry is encoded as the key, followed by the type, and then the value. The key is always a
- string encoded as a str8. The type is a single octet that may contain any valid AMQP type
- code. The value is encoded according to the rules defined by the type code for that entry.
- </doc>
-
- <doc type="picture" title="Wire Format">
- +------------= size OCTETs =-----------+
- | |
- 4 OCTETs | 4 OCTETs |
- +----------+----------+-----+---------------+-----+
- | size | count | .../| entry |\... |
- +----------+----------+---/ +---------------+ \---+
- uint32 uint32 / / \ \
- / / \ \
- / / \ \
- / / \ \
- / / \ \
- / k OCTETs 1 OCTET n OCTETs \
- +-----------+---------+-----------+
- | key | type | value |
- +-----------+---------+-----------+
- str8 *type*
- </doc>
-
- <doc type="bnf">
- map = size count *entry
-
- size = uint32 ; size of count and entries in octets
- count = uint32 ; number of entries in the map
-
- entry = key type value
- key = str8
- type = OCTET ; type code of the value
- value = *OCTET ; the encoded value
- </doc>
- </type>
-
- <type name="list" code="0xa9" variable-width="4" label="a series of consecutive type-value pairs">
- <doc>
- A list is an ordered sequence of (type, value) pairs. The (type, value) pair forms an item
- within the list. The list may contain items of many distinct types. A list is encoded as a
- size in octets, followed by a count of the number of items, followed by the items themselves
- encoded in their defined order.
- </doc>
-
- <doc>
- An encoded list may contain up to (4294967295 - 4) octets worth of encoded items. The size is
- encoded as a 32-bit unsigned integral value in network byte order equal to the number of
- octets worth of encoded items plus 4. (The extra 4 octets is added for the item count.) The
- size is then followed by the number of items encoded as a 32-bit unsigned integral value in
- network byte order. Finally the items are encoded sequentially in their defined order.
- </doc>
-
- <doc>
- An item is encoded as the type followed by the value. The type is a single octet that may
- contain any valid AMQP type code. The value is encoded according to the rules defined by the
- type code for that item.
- </doc>
-
- <doc type="picture" title="Wire Format">
- +---------= size OCTETs =---------+
- | |
- 4 OCTETs | 4 OCTETs |
- +----------+----------+-----+----------+-----+
- | size | count | .../| item |\... |
- +----------+----------+---/ +----------+ \---+
- uint32 uint32 / / \ \
- / / \ \
- / 1 OCTET n OCTETs \
- +----------+-----------+
- | type | value |
- +----------+-----------+
- *type*
- </doc>
-
- <doc type="bnf">
- list = size count *item
-
- size = uint32 ; size of count and items in octets
- count = uint32 ; number of items in the list
-
- item = type value
- type = OCTET ; type code of the value
- value = *OCTET ; the encoded value
- </doc>
- </type>
-
- <type name="array" code="0xaa" variable-width="4"
- label="a defined length collection of values of a single type">
- <doc>
- An array is an ordered sequence of values of the same type. The array is encoded in as a size
- in octets, followed by a type code, then a count of the number values in the array, and
- finally the values encoded in their defined order.
- </doc>
-
- <doc>
- An encoded array may contain up to (4294967295 - 5) octets worth of encoded values. The size
- is encoded as a 32-bit unsigned integral value in network byte order equal to the number of
- octets worth of encoded values plus 5. (The extra 5 octets consist of 4 octets for the count
- of the number of values, and one octet to hold the type code for the items in the array.) The
- size is then followed by a single octet that may contain any valid AMQP type code. The type
- code is then followed by the number of values encoded as a 32-bit unsigned integral value in
- network byte order. Finally the values are encoded sequentially in their defined order
- according to the rules defined by the type code for the array.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 4 OCTETs 1 OCTET 4 OCTETs (size - 5) OCTETs
- +----------+---------+----------+-------------------------+
- | size | type | count | values |
- +----------+---------+----------+-------------------------+
- uint32 uint32 *count* encoded *types*
- </doc>
-
- <doc type="bnf">
- array = size type count values
-
- size = uint32 ; size of type, count, and values in octets
- type = OCTET ; the type of the encoded values
- count = uint32 ; number of items in the array
-
- values = 0*4294967290 OCTET ; (size - 5) OCTETs
- </doc>
- </type>
-
- <type name="struct32" code="0xab" variable-width="4" label="a coded struct with a 32-bit size">
- <doc>
- The struct32 type describes any coded struct with a 32-bit (4 octet) size. The type is
- restricted to be only coded structs with a 32-bit size, consequently the first six octets of
- any encoded value for this type MUST always contain the size, class-code, and struct-code in
- that order.
- </doc>
-
- <doc>
- The size is encoded as a 32-bit unsigned integral value in network byte order that is equal to
- the size of the encoded field-data, packing-flags, class-code, and struct-code. The class-code
- is a single octet that may be set to any valid class code. The struct-code is a single octet
- that may be set to any valid struct code within the given class-code.
- </doc>
-
- <doc>
- The first six octets are then followed by the packing flags and encoded field data. The
- presence and quantity of packing-flags, as well as the specific fields are determined by the
- struct definition identified with the encoded class-code and struct-code.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 4 OCTETs 1 OCTET 1 OCTET pack-width OCTETs n OCTETs
- +----------+------------+-------------+-------------------+------------+
- | size | class-code | struct-code | packing-flags | field-data |
- +----------+------------+-------------+-------------------+------------+
- uint32
-
- n = (size - 2 - pack-width)
- </doc>
-
- <doc type="bnf">
- struct32 = size class-code struct-code packing-flags field-data
-
- size = uint32
-
- class-code = OCTET ; zero for top-level structs
- struct-code = OCTET ; together with class-code identifies the struct
- ; definition which determines the pack-width and
- ; fields
-
- packing-flags = 0*4 OCTET ; pack-width OCTETs
-
- field-data = *OCTET ; (size - 2 - pack-width) OCTETs
- </doc>
- </type>
-
- <!--
- 0xb0 - 0xbf: Reserved
- -->
-
- <!--
- 0xc0 - 0xcf:Fixed width types - 5 octets
- -->
-
- <type name="bin40" code="0xc0" fixed-width="5" label="five octets of unspecified binary encoding">
- <doc>
- The bin40 type consists of five consecutive octets of opaque binary data.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET 1 OCTET 1 OCTET 1 OCTET
- +-----------+-----------+-------------+------------+------------+
- | octet-one | octet-two | octet-three | octet-four | octet-five |
- +-----------+-----------+-------------+------------+------------+
- </doc>
-
- <doc type="bnf">
- bin40 = 5 OCTET
- </doc>
- </type>
-
- <type name="dec32" code="0xc8" fixed-width="5"
- label="32-bit decimal value (e.g. for use in financial values)">
- <doc>
- The dec32 type is decimal value with a variable number of digits following the decimal point.
- It is encoded as an 8-bit unsigned integral value representing the number of decimal places.
- This is followed by the signed integral value encoded using a 32-bit two's complement
- representation in network byte order.
- </doc>
-
- <doc>
- The former value is referred to as the exponent of the divisor. The latter value is the
- mantissa. The decimal value is given by: mantissa / 10^exponent.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 4 OCTETs
- +----------+----------+
- | exponent | mantissa |
- +----------+----------+
- uint8 int32
- </doc>
-
- <doc type="bnf">
- dec32 = exponent mantissa
- exponent = uint8
- mantissa = int32
- </doc>
- </type>
-
- <!--
- 0xd0 - 0xdf: Fixed width types - 9 octets
- -->
-
- <type name="bin72" code="0xd0" fixed-width="9"
- label="nine octets of unspecified binary encoding">
- <doc>
- The bin72 type consists of nine consecutive octets of opaque binary data.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 1 OCTET 1 OCTET 1 OCTET
- +-----------+-----------+-----+-------------+------------+
- | octet-one | octet-two | ... | octet-eight | octet-nine |
- +-----------+-----------+-----+-------------+------------+
- </doc>
-
- <doc type="bnf">
- bin64 = 9 OCTET
- </doc>
- </type>
-
- <type name="dec64" code="0xd8" fixed-width="9"
- label="64-bit decimal value (e.g. for use in financial values)">
- <doc>
- The dec64 type is decimal value with a variable number of digits following the decimal point.
- It is encoded as an 8-bit unsigned integral value representing the number of decimal places.
- This is followed by the signed integral value encoded using a 64-bit two's complement
- representation in network byte order.
- </doc>
-
- <doc>
- The former value is referred to as the exponent of the divisor. The latter value is the
- mantissa. The decimal value is given by: mantissa / 10^exponent.
- </doc>
-
- <doc type="picture" title="Wire Format">
- 1 OCTET 8 OCTETs
- +----------+----------+
- | exponent | mantissa |
- +----------+----------+
- uint8 int64
- </doc>
-
- <doc type="bnf">
- dec64 = exponent mantissa
- exponent = uint8
- mantissa = int64
- </doc>
- </type>
-
- <!--
- 0xe0 - 0xef: Reserved
- -->
-
- <!--
- 0xf0 - 0xff: Zero-length types
- -->
-
- <type name="void" code="0xf0" fixed-width="0" label="the void type">
- <doc>
- The void type is used within tagged data structures such as maps and lists to indicate an
- empty value. The void type has no value and is encoded as an empty sequence of octets.
- </doc>
- </type>
-
- <type name="bit" code="0xf1" fixed-width="0" label="presence indicator">
- <doc>
- The bit type is used to indicate that a packing flag within a packed struct is being used to
- represent a boolean value based on the presence of an empty value. The bit type has no value
- and is encoded as an empty sequence of octets.
- </doc>
- </type>
-
- <!--
- ======================================================
- == CONSTANTS
- ======================================================
- -->
-
- <!-- Protocol constants -->
-
- <constant name="MIN-MAX-FRAME-SIZE" value="4096" label="The minimum size (in bytes) which can be
- agreed upon as the maximum frame size.">
- <doc>
- During the initial connection negotiation, the two peers must agree upon a maximum frame size.
- This constant defines the minimum value to which the maximum frame size can be set. By
- defining this value, the peers can guarantee that they can send frames of up to this size
- until they have agreed a definitive maximum frame size for that connection.
- </doc>
- </constant>
-
- <!--
- ======================================================
- == DOMAIN TYPES
- ======================================================
- -->
-
- <!-- Segment types -->
-
- <domain name="segment-type" type="uint8" label="valid values for the frame type indicator.">
- <doc>
- Segments are defined in <xref ref="specification.transport.assemblies_segments_and_frames"/>.
- The segment domain defines the valid values that may be used for the segment indicator within
- the frame header.
- </doc>
-
- <enum>
- <choice name="control" value="0">
- <doc>
- The frame type indicator for Control segments (see <xref
- ref="specification.formal_notation.controls"/>).
- </doc>
- </choice>
- <choice name="command" value="1">
- <doc>
- The frame type indicator for Command segments (see <xref
- ref="specification.formal_notation.commands"/>).
- </doc>
- </choice>
- <choice name="header" value="2" >
- <doc>
- The frame type indicator for Header segments (see <xref
- ref="specification.formal_notation.segments.header"/>).
- </doc>
- </choice>
- <choice name="body" value="3" >
- <doc>
- The frame type indicator for Body segments (see <xref
- ref="specification.formal_notation.segments.body"/>).
- </doc>
- </choice>
- </enum>
- </domain>
-
- <!-- Tracks -->
-
- <domain name="track" type="uint8" label="Valid values for transport level tracks">
- <doc> Tracks are defined in <xref ref="specification.transport.channels_and_tracks"/>. The
- track domain defines the valid values that may used for the track indicator within the frame
- header</doc>
- <enum>
- <choice name="control" value="0">
- <doc>
- The track used for all controls. All controls defined in this specification MUST be sent
- on track 0.
- </doc>
- </choice>
- <choice name="command" value="1">
- <doc>
- The track used for all commands. All commands defined in this specification MUST be sent
- on track 1.
- </doc>
- </choice>
- </enum>
- </domain>
-
-
- <domain name="str16-array" type="array" label="An array of values of type str16.">
- <doc>
- An array of values of type str16.
- </doc>
- </domain>
-
-
-
- <!-- == Class: connection ==================================================================== -->
-
- <class name="connection" code="0x1" label="work with connections">
- <doc>
- The connection class provides controls for a client to establish a network connection to a
- server, and for both peers to operate the connection thereafter.
- </doc>
-
- <doc type="grammar">
- connection = open-connection
- *use-connection
- close-connection
- open-connection = C:protocol-header
- S:START C:START-OK
- *challenge
- S:TUNE C:TUNE-OK
- C:OPEN S:OPEN-OK | S:REDIRECT
- challenge = S:SECURE C:SECURE-OK
- use-connection = *channel
- close-connection = C:CLOSE S:CLOSE-OK
- / S:CLOSE C:CLOSE-OK
- </doc>
-
- <role name="server" implement="MUST" />
- <role name="client" implement="MUST" />
-
- <domain name="close-code" type="uint16" label="code used in the connection.close control to
- indicate reason for closure">
- <enum>
- <choice name="normal" value="200">
- <doc>
- The connection closed normally.
- </doc>
- </choice>
-
- <choice name="connection-forced" value="320">
- <doc>
- An operator intervened to close the connection for some reason. The client may retry at
- some later date.
- </doc>
- </choice>
-
- <choice name="invalid-path" value="402">
- <doc>
- The client tried to work with an unknown virtual host.
- </doc>
- </choice>
-
- <choice name="framing-error" value="501">
- <doc>
- A valid frame header cannot be formed from the incoming byte stream.
- </doc>
- </choice>
- </enum>
- </domain>
-
- <domain name="amqp-host-url" type="str16" label="URL for identifying an AMQP Server">
- <doc>
- The amqp-url domain defines a format for identifying an AMQP Server. It is used to provide
- alternate hosts in the case where a client has to reconnect because of failure, or because
- the server requests the client to do so upon initial connection.
- </doc>
- <doc type="bnf"><![CDATA[
- amqp_url = "amqp:" prot_addr_list
- prot_addr_list = [prot_addr ","]* prot_addr
- prot_addr = tcp_prot_addr | tls_prot_addr
-
- tcp_prot_addr = tcp_id tcp_addr
- tcp_id = "tcp:" | ""
- tcp_addr = [host [":" port] ]
- host = <as per http://www.ietf.org/rfc/rfc3986.txt>
- port = number]]>
- </doc>
- </domain>
-
- <domain name="amqp-host-array" type="array" label="An array of values of type amqp-host-url">
- <doc>
- Used to provide a list of alternate hosts.
- </doc>
- </domain>
-
- <!-- - Control: connection.start - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <control name="start" code="0x1" label="start connection negotiation">
- <doc>
- This control starts the connection negotiation process by telling the client the supported
- security mechanisms and locales from which the client can choose.
- </doc>
-
- <rule name="protocol-name">
- <doc>
- If the server cannot support the protocol specified in the protocol header, it MUST close
- the socket connection without sending any response control.
- </doc>
- <doc type="scenario">
- The client sends a protocol header containing an invalid protocol name. The server must
- respond by closing the connection.
- </doc>
- </rule>
-
- <rule name="client-support">
- <doc>
- If the client cannot handle the protocol version suggested by the server it MUST close the
- socket connection.
- </doc>
- <doc type="scenario">
- The server sends a protocol version that is lower than any valid implementation, e.g. 0.1.
- The client must respond by closing the connection.
- </doc>
- </rule>
-
- <implement role="client" handle="MUST" />
-
- <response name="start-ok" />
-
- <field name="server-properties" type="map" label="server properties">
- <rule name="required-fields">
- <doc>
- The properties SHOULD contain at least these fields: "host", specifying the server host
- name or address, "product", giving the name of the server product, "version", giving the
- name of the server version, "platform", giving the name of the operating system,
- "copyright", if appropriate, and "information", giving other general information.
- </doc>
- <doc type="scenario">
- Client connects to server and inspects the server properties. It checks for the presence
- of the required fields.
- </doc>
- </rule>
- </field>
-
- <field name="mechanisms" type="str16-array" label="available security mechanisms"
- required="true">
- <doc>
- A list of the security mechanisms that the server supports.
- </doc>
- </field>
-
- <field name="locales" type="str16-array" label="available message locales" required="true">
- <doc>
- A list of the message locales that the server supports. The locale defines the language in
- which the server will send reply texts.
- </doc>
-
- <rule name="required-support">
- <doc>
- The server MUST support at least the en_US locale.
- </doc>
- <doc type="scenario">
- Client connects to server and inspects the locales field. It checks for the presence of
- the required locale(s).
- </doc>
- </rule>
- </field>
- </control>
-
- <!-- - Control: connection.start-ok - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <control name="start-ok" code="0x2" label="select security mechanism and locale">
- <doc>
- This control selects a SASL security mechanism.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="client-properties" type="map" label="client properties">
- <rule name="required-fields">
- <!-- This rule is not testable from the client side -->
- <doc>
- The properties SHOULD contain at least these fields: "product", giving the name of the
- client product, "version", giving the name of the client version, "platform", giving the
- name of the operating system, "copyright", if appropriate, and "information", giving
- other general information.
- </doc>
- </rule>
- </field>
-
- <field name="mechanism" type="str8" label="selected security mechanism" required="true">
- <doc>
- A single security mechanisms selected by the client, which must be one of those specified
- by the server.
- </doc>
-
- <rule name="security">
- <doc>
- The client SHOULD authenticate using the highest-level security profile it can handle
- from the list provided by the server.
- </doc>
- </rule>
-
- <rule name="validity">
- <doc>
- If the mechanism field does not contain one of the security mechanisms proposed by the
- server in the Start control, the server MUST close the connection without sending any
- further data.
- </doc>
- <doc type="scenario">
- Client connects to server and sends an invalid security mechanism. The server must
- respond by closing the connection (a socket close, with no connection close
- negotiation).
- </doc>
- </rule>
- </field>
-
- <field name="response" type="vbin32" label="security response data" required="true">
- <doc>
- A block of opaque data passed to the security mechanism. The contents of this data are
- defined by the SASL security mechanism.
- </doc>
- </field>
-
- <field name="locale" type="str8" label="selected message locale" required="true">
- <doc>
- A single message locale selected by the client, which must be one of those specified by
- the server.
- </doc>
- </field>
- </control>
-
- <!-- - Control: connection.secure - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <control name="secure" code="0x3" label="security mechanism challenge">
- <doc>
- The SASL protocol works by exchanging challenges and responses until both peers have
- received sufficient information to authenticate each other. This control challenges the
- client to provide more information.
- </doc>
-
- <implement role="client" handle="MUST" />
-
- <response name="secure-ok" />
-
- <field name="challenge" type="vbin32" label="security challenge data" required="true">
- <doc>
- Challenge information, a block of opaque binary data passed to the security mechanism.
- </doc>
- </field>
- </control>
-
- <!-- - Control: connection.secure-ok - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <control name="secure-ok" code="0x4" label="security mechanism response">
- <doc>
- This control attempts to authenticate, passing a block of SASL data for the security
- mechanism at the server side.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="response" type="vbin32" label="security response data" required="true">
- <doc>
- A block of opaque data passed to the security mechanism. The contents of this data are
- defined by the SASL security mechanism.
- </doc>
- </field>
- </control>
-
- <!-- - Control: connection.tune - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <control name="tune" code="0x5" label="propose connection tuning parameters">
- <doc>
- This control proposes a set of connection configuration values to the client. The client can
- accept and/or adjust these.
- </doc>
-
- <implement role="client" handle="MUST" />
-
- <response name="tune-ok" />
-
- <field name="channel-max" type="uint16" label="proposed maximum channels">
- <doc>
- The maximum total number of channels that the server allows per connection. If this is not
- set it means that the server does not impose a fixed limit, but the number of allowed
- channels may be limited by available server resources.
- </doc>
- </field>
-
- <field name="max-frame-size" type="uint16" label="proposed maximum frame size">
- <doc>
- The largest frame size that the server proposes for the connection. The client can
- negotiate a lower value. If this is not set means that the server does not impose any
- specific limit but may reject very large frames if it cannot allocate resources for them.
- </doc>
-
- <rule name="minimum">
- <doc>
- Until the max-frame-size has been negotiated, both peers MUST accept frames of up to
- MIN-MAX-FRAME-SIZE octets large, and the minimum negotiated value for max-frame-size is
- also MIN-MAX-FRAME-SIZE.
- </doc>
- <doc type="scenario">
- Client connects to server and sends a large properties field, creating a frame of
- MIN-MAX-FRAME-SIZE octets. The server must accept this frame.
- </doc>
- </rule>
- </field>
-
- <field name="heartbeat-min" type="uint16" label="the minimum supported heartbeat delay">
- <doc>
- The minimum delay, in seconds, of the connection heartbeat supported by the server. If
- this is not set it means the server does not support sending heartbeats.
- </doc>
- </field>
-
- <field name="heartbeat-max" type="uint16" label="the maximum supported heartbeat delay">
- <doc>
- The maximum delay, in seconds, of the connection heartbeat supported by the server. If
- this is not set it means the server has no maximum.
- </doc>
-
- <rule name="permitted-range">
- <doc>
- The heartbeat-max value must be greater than or equal to the value supplied in the
- heartbeat-min field.
- </doc>
- </rule>
-
- <rule name="no-heartbeat-min">
- <doc>
- If no heartbeat-min is supplied, then the heartbeat-max field MUST remain empty.
- </doc>
- </rule>
- </field>
- </control>
-
- <!-- - Control: connection.tune-ok - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <control name="tune-ok" code="0x6" label="negotiate connection tuning parameters">
- <doc>
- This control sends the client's connection tuning parameters to the server. Certain fields
- are negotiated, others provide capability information.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="channel-max" type="uint16" label="negotiated maximum channels" required="true">
- <doc>
- The maximum total number of channels that the client will use per connection.
- </doc>
-
- <rule name="upper-limit">
- <doc>
- If the client specifies a channel max that is higher than the value provided by the
- server, the server MUST close the connection without attempting a negotiated close. The
- server may report the error in some fashion to assist implementers.
- </doc>
-
- </rule>
-
- <rule name="available-channels">
- <doc>
- If the client agrees to a channel-max of N channels, then the channels available for
- communication between client and server are precisely the channels numbered 0 to (N-1).
- </doc>
- </rule>
- </field>
-
- <field name="max-frame-size" type="uint16" label="negotiated maximum frame size">
- <doc>
- The largest frame size that the client and server will use for the connection. If it is
- not set means that the client does not impose any specific limit but may reject very large
- frames if it cannot allocate resources for them. Note that the max-frame-size limit
- applies principally to content frames, where large contents can be broken into frames of
- arbitrary size.
- </doc>
-
- <rule name="minimum">
- <doc>
- Until the max-frame-size has been negotiated, both peers MUST accept frames of up to
- MIN-MAX-FRAME-SIZE octets large, and the minimum negotiated value for max-frame-size is
- also MIN-MAX-FRAME-SIZE.
- </doc>
- </rule>
-
- <rule name="upper-limit">
- <doc>
- If the client specifies a max-frame-size that is higher than the value provided by the
- server, the server MUST close the connection without attempting a negotiated close. The
- server may report the error in some fashion to assist implementers.
- </doc>
- </rule>
-
- <rule name="max-frame-size">
- <doc>
- A peer MUST NOT send frames larger than the agreed-upon size. A peer that receives an
- oversized frame MUST close the connection with the framing-error close-code.
- </doc>
- </rule>
- </field>
-
- <field name="heartbeat" type="uint16" label="negotiated heartbeat delay">
- <doc>
- The delay, in seconds, of the connection heartbeat chosen by the client. If it is not set
- it means the client does not want a heartbeat.
- </doc>
-
- <rule name="permitted-range">
- <doc>
- The chosen heartbeat MUST be in the range supplied by the heartbeat-min and
- heartbeat-max fields of connection.tune.
- </doc>
- </rule>
-
- <rule name="no-heartbeat-min">
- <doc>
- The heartbeat field MUST NOT be set if the heartbeat-min field of connection.tune was
- not set by the server.
- </doc>
- </rule>
- </field>
- </control>
-
- <!-- - Control: connection.open - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <control name="open" code="0x7" label="open connection to virtual host">
- <doc>
- This control opens a connection to a virtual host, which is a collection of resources, and
- acts to separate multiple application domains within a server. The server may apply
- arbitrary limits per virtual host, such as the number of each type of entity that may be
- used, per connection and/or in total.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <response name="open-ok" />
- <response name="redirect" />
-
- <field name="virtual-host" type="str8" label="virtual host name" required="true">
- <doc>
- The name of the virtual host to work with.
- </doc>
-
- <rule name="separation">
- <doc>
- If the server supports multiple virtual hosts, it MUST enforce a full separation of
- exchanges, queues, and all associated entities per virtual host. An application,
- connected to a specific virtual host, MUST NOT be able to access resources of another
- virtual host.
- </doc>
- </rule>
-
- <rule name="security">
- <doc>
- The server SHOULD verify that the client has permission to access the specified virtual
- host.
- </doc>
- </rule>
- </field>
-
- <field name="capabilities" type="str16-array" label="required capabilities">
- <doc>
- The client can specify zero or more capability names. The server can use this to determine
- how to process the client's connection request.
- </doc>
- </field>
-
- <field name="insist" type="bit" label="insist on connecting to server">
- <doc>
- In a configuration with multiple collaborating servers, the server may respond to a
- connection.open control with a Connection.Redirect. The insist option tells the server
- that the client is insisting on a connection to the specified server.
- </doc>
- <rule name="behavior">
- <doc>
- When the client uses the insist option, the server MUST NOT respond with a
- Connection.Redirect control. If it cannot accept the client's connection request it
- should respond by closing the connection with a suitable reply code.
- </doc>
- </rule>
- </field>
- </control>
-
- <!-- - Control: connection.open-ok - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <control name="open-ok" code="0x8" label="signal that connection is ready">
- <doc>
- This control signals to the client that the connection is ready for use.
- </doc>
-
- <implement role="client" handle="MUST" />
-
- <field name="known-hosts" type="amqp-host-array" label="alternate hosts which may be used in
- the case of failure">
- <doc>
- Specifies an array of equivalent or alternative hosts that the server knows about, which
- will normally include the current server itself. Each entry in the array will be in the
- form of an IP address or DNS name, optionally followed by a colon and a port number.
- Clients can cache this information and use it when reconnecting to a server after a
- failure. This field may be empty.
- </doc>
- </field>
- </control>
-
- <!-- - Control: connection.redirect - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <control name="redirect" code="0x9" label="redirects client to other server">
- <doc>
- This control redirects the client to another server, based on the requested virtual host
- and/or capabilities.
- </doc>
-
- <rule name="usage">
- <doc>
- When getting the connection.redirect control, the client SHOULD reconnect to the host
- specified, and if that host is not present, to any of the hosts specified in the
- known-hosts list.
- </doc>
- </rule>
-
- <implement role="client" handle="MUST" />
-
- <field name="host" type="amqp-host-url" label="server to connect to" required="true">
- <doc>
- Specifies the server to connect to.
- </doc>
- </field>
-
- <field name="known-hosts" type="amqp-host-array" label="alternate hosts to try in case of
- failure">
- <doc>
- An array of equivalent or alternative hosts that the server knows about.
- </doc>
- </field>
- </control>
-
- <!-- - Control: connection.heartbeat - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <control name="heartbeat" code="0xa" label="indicates connection is still alive">
- <doc>
- The heartbeat control may be used to generate artificial network traffic when a connection
- is idle. If a connection is idle for more than twice the negotiated heartbeat delay, the
- peers MAY be considered disconnected.
- </doc>
- <implement role="client" handle="MAY" />
- <implement role="server" handle="MAY" />
- </control>
-
- <!-- - Control: connection.close - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <control name="close" code="0xb" label="request a connection close">
- <doc>
- This control indicates that the sender wants to close the connection. The reason for close
- is indicated with the reply-code and reply-text. The channel this control is sent on MAY be
- used to indicate which channel caused the connection to close.
- </doc>
-
- <implement role="client" handle="MUST" />
- <implement role="server" handle="MUST" />
-
- <response name="close-ok" />
-
- <field name="reply-code" type="close-code" label="the numeric reply code"
- required="true">
- <doc>
- Indicates the reason for connection closure.
- </doc>
- </field>
- <field name="reply-text" type="str8" label="the localized reply text">
- <doc>
- This text can be logged as an aid to resolving issues.
- </doc>
- </field>
- </control>
-
- <!-- - Control: connection.close-ok - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <control name="close-ok" code="0xc" label="confirm a connection close">
- <doc>
- This control confirms a connection.close control and tells the recipient that it is safe to
- release resources for the connection and close the socket.
- </doc>
-
- <rule name="reporting">
- <doc>
- A peer that detects a socket closure without having received a Close-Ok handshake control
- SHOULD log the error.
- </doc>
- </rule>
-
- <implement role="client" handle="MUST" />
- <implement role="server" handle="MUST" />
- </control>
-
- </class>
-
- <!-- == Class: session ======================================================================= -->
-
- <class name="session" code="0x2" label="session controls">
- <doc>
- A session is a named interaction between two peers. Session names are chosen by the upper
- layers and may be used indefinitely. The model layer may associate long-lived or durable state
- with a given session name. The session layer provides transport of commands associated with
- this interaction.
- </doc>
-
- <doc>
- The controls defined within this class are specified in terms of the "sender" of commands and
- the "receiver" of commands. Since both client and server send and receive commands, the
- overall session dialog is symmetric, however the semantics of the session controls are defined
- in terms of a single sender/receiver pair, and it is assumed that the client and server will
- each contain both a sender and receiver implementation.
- </doc>
-
- <rule name="attachment">
- <doc>
- The transport MUST be attached in order to use any control other than "attach", "attached",
- "detach", or "detached". A peer receiving any other control on a detached transport MUST
- discard it and send a session.detached with the "not-attached" reason code.
- </doc>
- </rule>
-
- <role name="server" implement="MUST" />
- <role name="client" implement="MUST" />
-
- <role name="sender" implement="MUST">
- <doc>
- The sender of commands.
- </doc>
- </role>
- <role name="receiver" implement="MUST">
- <doc>
- The receiver of commands.
- </doc>
- </role>
-
- <domain name="name" type="vbin16" label="opaque session name">
- <doc>
- The session name uniquely identifies an interaction between two peers. It is scoped to a
- given authentication principal.
- </doc>
- </domain>
-
- <domain name="detach-code" type="uint8" label="reason for detach">
- <enum>
- <choice name="normal" value="0">
- <doc>
- The session was detached by request.
- </doc>
- </choice>
- <choice name="session-busy" value="1">
- <doc>
- The session is currently attached to another transport.
- </doc>
- </choice>
- <choice name="transport-busy" value="2">
- <doc>
- The transport is currently attached to another session.
- </doc>
- </choice>
- <choice name="not-attached" value="3">
- <doc>
- The transport is not currently attached to any session.
- </doc>
- </choice>
- <choice name="unknown-ids" value="4">
- <doc>
- Command data was received prior to any use of the command-point control.
- </doc>
- </choice>
- </enum>
- </domain>
-
- <domain name="commands" type="sequence-set" label="identifies a set of commands">
- </domain>
-
- <struct name="header" size="1" pack="1">
- <doc>
- The session header appears on commands after the class and command id, but prior to command
- arguments.
- </doc>
-
- <field name="sync" type="bit" label="request notification of completion">
- <doc>
- Request notification of completion for this command.
- </doc>
- </field>
- </struct>
-
- <struct name="command-fragment" size="0" pack="0" label="byte-ranges within a set of commands">
-
- <field name="command-id" type="sequence-no" required="true">
-
- </field>
- <field name="byte-ranges" type="byte-ranges" required="true">
-
- </field>
- </struct>
-
- <domain name="command-fragments" type="array" label="an array of values of type
- command-fragment"/>
-
- <control name="attach" code="0x1" label="attach to the named session">
- <doc>
- Requests that the current transport be attached to the named session. Success or failure
- will be indicated with an attached or detached response. This control is idempotent.
- </doc>
-
- <rule name="one-transport-per-session">
- <doc>
- A session MUST NOT be attached to more than one transport at a time.
- </doc>
- </rule>
-
- <rule name="one-session-per-transport">
- <doc>
- A transport MUST NOT be attached to more than one session at a time.
- </doc>
- </rule>
-
- <rule name="idempotence">
- <doc>
- Attaching a session to its current transport MUST succeed and result in an attached
- response.
- </doc>
- </rule>
-
- <rule name="scoping">
- <doc>
- Attachment to the same session name from distinct authentication principals MUST succeed.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MAY" />
-
- <response name="attached"/>
- <response name="detached"/>
-
- <field name="name" type="name" label="the session name" required="true">
- <doc>
- Identifies the session to be attached to the current transport.
- </doc>
- </field>
-
- <field name="force" type="bit" label="force attachment to a busy session">
- <doc>
- If set then a busy session will be forcibly detached from its other transport and
- reattached to the current transport.
- </doc>
- </field>
- </control>
-
- <control name="attached" code="0x2" label="confirm attachment to the named session">
- <doc>
- Confirms successful attachment of the transport to the named session.
- </doc>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MUST" />
-
- <field name="name" type="name" label="the session name" required="true">
- <doc>
- Identifies the session now attached to the current transport.
- </doc>
- </field>
- </control>
-
- <control name="detach" code="0x3" label="detach from the named session">
- <doc>
- Detaches the current transport from the named session.
- </doc>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MUST" />
-
- <response name="detached"/>
-
- <field name="name" type="name" label="the session name" required="true">
- <doc>
- Identifies the session to detach.
- </doc>
- </field>
- </control>
-
- <control name="detached" code="0x4" label="confirm detachment from the named session">
- <doc>
- Confirms detachment of the current transport from the named session.
- </doc>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MUST" />
-
- <field name="name" type="name" label="the session name" required="true">
- <doc>
- Identifies the detached session.
- </doc>
- </field>
- <field name="code" type="detach-code" label="the reason for detach" required="true">
- <doc>
- Identifies the reason for detaching from the named session.
- </doc>
- </field>
- </control>
-
- <!--
- Execution state is the set of confirmed, and completed incoming commands, as well as the set
- of outgoing in-doubt commands held for replay.
- -->
-
- <control name="request-timeout" code="0x5" label="requests the execution timeout be changed">
- <doc>
- This control may be sent by either the sender or receiver of commands. It requests that the
- execution timeout be changed. This is the minimum amount of time that a peer must preserve
- execution state for a detached session.
- </doc>
-
- <rule name="maximum-granted-timeout">
- <doc>
- The handler of this request MUST set his timeout to the maximum allowed value less than or
- equal to the requested timeout, and MUST convey the chosen timeout in the response.
- </doc>
- </rule>
-
- <implement role="sender" handle="MUST" />
- <implement role="receiver" handle="MUST" />
-
- <response name="timeout"/>
-
- <field name="timeout" type="uint32" label="the requested timeout">
- <doc>
- The requested timeout for execution state in seconds. If not set, this control requests
- that execution state is preserved indefinitely.
- </doc>
- </field>
- </control>
-
- <control name="timeout" code="0x6" label="the granted timeout">
- <doc>
- This control may be sent by the either the sender or receiver of commands. It is a
- one-to-one reply to the request-timeout control that indicates the granted timeout for
- execution state.
- </doc>
-
- <implement role="sender" handle="MUST" />
- <implement role="receiver" handle="MUST" />
-
- <field name="timeout" type="uint32" label="the execution timeout">
- <doc>
- The timeout for execution state. If not set, then execution state is preserved
- indefinitely.
- </doc>
- </field>
- </control>
-
- <control name="command-point" code="0x7"
- label="the command id and byte offset of subsequent data">
- <doc>
- This control is sent by the sender of commands and handled by the receiver of commands. This
- establishes the sequence numbers associated with all subsequent command data sent from the
- sender to the receiver. The subsequent command data will be numbered starting with the
- values supplied in this control and proceeding sequentially. This must be used at least once
- prior to sending any command data on newly attached transports.
- </doc>
-
- <rule name="newly-attached-transports">
- <doc>
- If command data is sent on a newly attached transport the session MUST be detached with an
- "unknown-id" reason-code.
- </doc>
- </rule>
-
- <rule name="zero-offset">
- <doc>
- If the offset is zero, the next data frame MUST have the first-frame and first-segment
- flags set. Violation of this is a framing error.
- </doc>
- </rule>
-
- <rule name="nonzero-offset">
- <doc>
- If the offset is nonzero, the next data frame MUST NOT have both the first-frame and
- first-segment flag set. Violation of this is a framing error.
- </doc>
- </rule>
-
- <implement role="receiver" handle="MUST" />
-
- <field name="command-id" type="sequence-no" label="the command-id of the next command"
- required="true"/>
- <field name="command-offset" type="uint64" label="the byte offset within the command"
- required="true"/>
- </control>
-
- <control name="expected" code="0x8" label="informs the peer of expected commands">
- <doc>
- This control is sent by the receiver of commands and handled by the sender of commands. It
- informs the sender of what commands and command fragments are expected at the receiver.
- This control is only sent in response to a flush control with the expected flag set. The
- expected control is never sent spontaneously.
- </doc>
-
- <rule name="include-next-command">
- <doc>
- The set of expected commands MUST include the next command after the highest seen command.
- </doc>
- </rule>
-
- <rule name="commands-empty-means-new-session">
- <doc>
- The set of expected commands MUST have zero elements if and only if the sender holds no
- execution state for the session (i.e. it is a new session).
- </doc>
- </rule>
-
- <rule name="no-overlaps">
- <doc>
- If a command-id appears in the commands field, it MUST NOT appear in the fragments field.
- </doc>
- </rule>
-
- <rule name="minimal-fragments">
- <doc>
- When choice is permitted, a command MUST appear in the commands field rather than the
- fragments field.
- </doc>
- </rule>
-
- <implement role="sender" handle="MUST" />
-
- <field name="commands" type="commands" label="expected commands" required="true"/>
- <field name="fragments" type="command-fragments" label="expected fragments" />
- </control>
-
- <control name="confirmed" code="0x9" label="notifies of confirmed commands">
- <doc>
- This control is sent by the receiver of commands and handled by the sender of commands. This
- sends the set of commands that will definitely be completed by this peer to the sender. This
- excludes commands known by the receiver to be considered confirmed or complete at the
- sender.
- </doc>
- <doc>
- This control must be sent if the partner requests the set of confirmed commands using the
- session.flush control with the confirmed flag set.
- </doc>
- <doc>
- This control may be sent spontaneously. One reason for separating confirmation from
- completion is for large persistent messages, where the receipt (and storage to a durable
- store) of part of the message will result in less data needing to be replayed in the case of
- transport failure during transmission.
- </doc>
- <doc>
- A simple implementation of an AMQP client or server may be implemented to take no action on
- receipt of session.confirmed controls, and take action only when receiving
- session.completed controls.
- </doc>
- <doc>
- A simple implementation of an AMQP client or server may be implemented such that it never
- spontaneously sends session.confirmed and that when requested for the set of confirmed
- commands (via the session.flush control) it responds with the same set of commands as it
- would to when the set of completed commands was requested (trivially all completed commands
- are confirmed).
- </doc>
-
- <rule name="durability">
- <doc>
- If a command has durable implications, it MUST NOT be confirmed until the fact of the
- command has been recorded on durable media.
- </doc>
- </rule>
-
- <rule name="no-overlaps">
- <doc>
- If a command-id appears in the commands field, it MUST NOT appear in the fragments field.
- </doc>
- </rule>
-
- <rule name="minimal-fragments">
- <doc>
- When choice is permitted, a command MUST appear in the commands field rather than the
- fragments field.
- </doc>
- </rule>
-
- <implement role="sender" handle="MUST" />
-
- <field name="commands" type="commands" label="entirely confirmed commands">
- <rule name="exclude-known-complete">
- <doc>
- Command-ids included in prior known-complete replies MUST be excluded from the set of
- all confirmed commands.
- </doc>
- </rule>
- </field>
- <field name="fragments" type="command-fragments" label="partially confirmed commands"/>
- </control>
-
- <control name="completed" code="0xa" label="notifies of command completion">
- <doc>
- This control is sent by the receiver of commands, and handled by the sender of commands. It
- informs the sender of all commands completed by the receiver. This excludes commands known
- by the receiver to be considered complete at the sender.
- </doc>
-
- <rule name="known-completed-reply">
- <doc>
- The sender MUST eventually reply with a known-completed set that covers the completed ids.
- </doc>
- </rule>
-
- <rule name="delayed-reply">
- <doc>
- The known-complete reply MAY be delayed at the senders discretion if the timely-reply
- field is not set.
- </doc>
- </rule>
-
- <rule name="merged-reply">
- <doc>
- Multiple replies may be merged by sending a single known-completed that includes the union
- of the merged command-id sets.
- </doc>
- </rule>
-
- <implement role="sender" handle="MUST" />
-
- <field name="commands" type="commands" label="completed commands">
- <doc>
- The ids of all completed commands. This excludes commands known by the receiver to be
- considered complete at the sender.
- </doc>
-
- <rule name="completed-implies-confirmed">
- <doc>
- The sender MUST consider any completed commands to also be confirmed.
- </doc>
- </rule>
-
- <rule name="exclude-known-complete">
- <doc>
- Command-ids included in prior known-complete replies MUST be excluded from the set of
- all completed commands.
- </doc>
- </rule>
- </field>
- <field name="timely-reply" type="bit">
- <doc>
- If set, the sender is no longer free to delay the known-completed reply.
- </doc>
- </field>
- </control>
-
- <control name="known-completed" code="0xb" label="Inform peer of which commands are known to be
- completed">
- <doc>
- This control is sent by the sender of commands, and handled by the receiver of commands. It
- is sent in reply to one or more completed controls from the receiver. It informs the
- receiver that commands are known to be completed by the sender.
- </doc>
-
- <rule name="stateless">
- <doc>
- The sender need not keep state to generate this reply. It is sufficient to reply to any
- completed control with an exact echo of the completed ids.
- </doc>
- </rule>
-
- <implement role="receiver" handle="MUST" />
-
- <field name="commands" type="commands" label="commands known to be complete">
- <doc>
- The set of completed commands for one or more session.completed controls.
- </doc>
-
- <rule name="known-completed-implies-known-confirmed">
- <doc>
- The receiver MUST treat any of the specified commands to be considered by the sender as
- confirmed as well as completed.
- </doc>
- </rule>
- </field>
- </control>
-
- <control name="flush" code="0xc" label="requests a session.completed">
- <doc>
- This control is sent by the sender of commands and handled by the receiver of commands. It
- requests that the receiver produce the indicated command sets. The receiver should issue the
- indicated sets at the earliest possible opportunity.
- </doc>
-
- <implement role="receiver" handle="MUST" />
-
- <field name="expected" type="bit" label="request notification of expected commands"/>
- <field name="confirmed" type="bit" label="request notification of confirmed commands"/>
- <field name="completed" type="bit" label="request notification of completed commands"/>
- </control>
-
- <control name="gap" code="0xd" label="indicates missing segments in the stream">
- <doc>
- This control is sent by the sender of commands and handled by the receiver of commands. It
- sends command ranges for which there will be no further data forthcoming. The receiver
- should proceed with the next available commands that arrive after the gap.
- </doc>
-
- <rule name="gap-confirmation-and-completion">
- <doc>
- The command-ids covered by a session.gap MUST be added to the completed and confirmed sets
- by the receiver.
- </doc>
- </rule>
-
- <rule name="aborted-commands">
- <doc>
- If a session.gap covers a partially received command, the receiving peer MUST treat the
- command as aborted.
- </doc>
- </rule>
-
- <rule name="completed-or-confirmed-commands">
- <doc>
- If a session.gap covers a completed or confirmed command, the receiving peer MUST continue
- to treat the command as completed or confirmed.
- </doc>
- </rule>
-
- <implement role="receiver" handle="MUST" />
-
- <field name="commands" type="commands">
- <doc>
- The set of command-ids that are contained in this gap.
- </doc>
- </field>
- </control>
-
- </class>
-
- <!-- == Class: execution ===================================================================== -->
-
- <class name="execution" code="0x3" label="execution commands">
- <doc>
- The execution class provides commands that carry execution information about other model level
- commands.
- </doc>
-
- <role name="server" implement="MUST"/>
- <role name="client" implement="MUST"/>
-
- <domain name="error-code" type="uint16">
- <enum>
- <choice name="unauthorized-access" value="403">
- <doc>
- The client attempted to work with a server entity to which it has no access due to
- security settings.
- </doc>
- </choice>
-
- <choice name="not-found" value="404">
- <doc>
- The client attempted to work with a server entity that does not exist.
- </doc>
- </choice>
-
- <choice name="resource-locked" value="405">
- <doc>
- The client attempted to work with a server entity to which it has no access because
- another client is working with it.
- </doc>
- </choice>
-
- <choice name="precondition-failed" value="406">
- <doc>
- The client requested a command that was not allowed because some precondition failed.
- </doc>
- </choice>
-
- <choice name="resource-deleted" value="408">
- <doc>
- A server entity the client is working with has been deleted.
- </doc>
- </choice>
-
- <choice name="illegal-state" value="409">
- <doc>
- The peer sent a command that is not permitted in the current state of the session.
- </doc>
- </choice>
-
- <choice name="command-invalid" value="503">
- <doc>
- The command segments could not be decoded.
- </doc>
- </choice>
-
- <choice name="resource-limit-exceeded" value="506">
- <doc>
- The client exceeded its resource allocation.
- </doc>
- </choice>
-
- <choice name="not-allowed" value="530">
- <doc>
- The peer tried to use a command a manner that is inconsistent with the rules described
- in the specification.
- </doc>
- </choice>
-
- <choice name="illegal-argument" value="531">
- <doc>
- The command argument is malformed, i.e. it does not fall within the specified domain.
- The illegal-argument exception can be raised on execution of any command which has
- domain valued fields.
- </doc>
- </choice>
-
- <choice name="not-implemented" value="540">
- <doc>
- The peer tried to use functionality that is not implemented in its partner.
- </doc>
- </choice>
-
- <choice name="internal-error" value="541">
- <doc>
- The peer could not complete the command because of an internal error. The peer may
- require intervention by an operator in order to resume normal operations.
- </doc>
- </choice>
-
- <choice name="invalid-argument" value="542">
- <doc>
- An invalid argument was passed to a command, and the operation could not
- proceed. An invalid argument is not illegal (see illegal-argument), i.e. it matches
- the domain definition; however the particular value is invalid in this context.
- </doc>
- </choice>
- </enum>
- </domain>
-
- <!-- - Command: execution.sync - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="sync" code="0x1" label="request notification of completion for issued commands">
- <doc>
- This command is complete when all prior commands are completed.
- </doc>
-
- <implement role="server" handle="MUST"/>
- <implement role="client" handle="MUST"/>
- </command>
-
- <!-- - Command: execution.result - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="result" code="0x2" label="carries execution results">
- <doc>
- This command carries data resulting from the execution of a command.
- </doc>
-
- <implement role="server" handle="MUST"/>
- <implement role="client" handle="MUST"/>
-
- <field name="command-id" type="sequence-no" required="true"/>
- <field name="value" type="struct32"/>
- </command>
-
- <!-- - Command: execution.exception - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="exception" code="0x3" label="notifies a peer of an execution error">
- <doc>
- This command informs a peer of an execution exception. The command-id, when given,
- correlates the error to a specific command.
- </doc>
-
- <implement role="client" handle="MUST"/>
- <implement role="server" handle="MUST"/>
-
- <field name="error-code" type="error-code" required="true" label="error code indicating the
- type of error"/>
- <field name="command-id" type="sequence-no" label="exceptional command">
- <doc>
- The command-id of the command which caused the exception. If the exception was not caused
- by a specific command, this value is not set.
- </doc>
- </field>
- <field name="class-code" type="uint8" label="the class code of the command whose execution
- gave rise to the error (if appropriate)"/>
- <field name="command-code" type="uint8" label="the class code of the command whose execution
- gave rise to the error (if appropriate)"/>
- <field name="field-index" type="uint8" label="index of the exceptional field">
- <doc>
- The zero based index of the exceptional field within the arguments to the exceptional
- command. If the exception was not caused by a specific field, this value is not set.
- </doc>
- </field>
- <field name="description" type="str16" label="descriptive text on the exception">
- <doc>
- The description provided is implementation defined, but MUST be in the language
- appropriate for the selected locale. The intention is that this description is suitable
- for logging or alerting output.
- </doc>
- </field>
- <field name="error-info" type="map" label="map to carry additional information about the
- error"/>
-
- </command>
-
- </class>
-
- <!-- == Class: message ======================================================================= -->
-
- <class name="message" code="0x4" label="message transfer">
- <doc>
- The message class provides commands that support an industry-standard messaging model.
- </doc>
-
- <doc type="picture" title="Transfer States">
- START:
-
- The message has yet to be sent to the recipient.
-
- NOT-ACQUIRED:
-
- The message has been sent to the recipient, but is not
- acquired by the recipient.
-
- ACQUIRED:
-
- The message has been sent to and acquired by the recipient.
-
- END:
-
- The transfer is complete.
- </doc>
-
- <doc type="picture" title="State Transitions"><![CDATA[
- *:TRANSFER (accept-mode=none) *:TRANSFER (acquire-mode=pre-acquired)
- +---------------------------------START------------------------------------------+
- | | |
- | | *:TRANSFER (acquire-mode=not-acquired) |
- | | |
- | R:RELEASE \|/ |
- | +-------------NOT-ACQUIRED<--+ |
- | | | | | R:ACQUIRE (if unavailable) |
- | | | +-----+ |
- | | | |
- | | | R:ACQUIRE (if available) |
- | | | |
- | | \|/ |
- | | ACQUIRED<-------------------------------------------+
- | | |
- | | | R:ACCEPT / R:REJECT / R:RELEASE
- | | |
- | | \|/
- | +------------->END]]>
- | /|\
- | |
- +-------------------------------+
- </doc>
-
- <doc type="grammar">
- message = *:TRANSFER [ R:ACQUIRE ] [ R:ACCEPT / R:REJECT / R:RELEASE ]
- / *:RESUME
- / *:SET-FLOW-MODE
- / *:FLOW
- / *:STOP
- / C:SUBSCRIBE
- / C:CANCEL
- / C:FLUSH
- </doc>
-
- <rule name="persistent-message">
- <doc>
- The server SHOULD respect the delivery-mode property of messages and SHOULD make a
- best-effort to hold persistent messages on a reliable storage mechanism.
- </doc>
- <doc type="scenario">
- Send a persistent message to queue, stop server, restart server and then verify whether
- message is still present. Assumes that queues are durable. Persistence without durable
- queues makes no sense.
- </doc>
- </rule>
-
- <rule name="no-persistent-message-discard">
- <doc>
- The server MUST NOT discard a persistent message in case of a queue overflow.
- </doc>
- <doc type="scenario">
- Create a queue overflow situation with persistent messages and verify that messages do not
- get lost (presumably the server will write them to disk).
- </doc>
- </rule>
-
- <rule name="throttling">
- <doc>
- The server MAY use the message.flow command to slow or stop a message publisher when
- necessary.
- </doc>
- </rule>
-
- <rule name="non-persistent-message-overflow">
- <doc>
- The server MAY overflow non-persistent messages to persistent storage.
- </doc>
- </rule>
-
- <rule name="non-persistent-message-discard">
- <doc>
- The server MAY discard or dead-letter non-persistent messages on a priority basis if the
- queue size exceeds some configured limit.
- </doc>
- </rule>
-
- <rule name="min-priority-levels">
- <doc>
- The server MUST implement at least 2 priority levels for messages, where priorities 0 and
- 9 are treated as two distinct levels.
- </doc>
- </rule>
-
- <rule name="priority-level-implementation">
- <doc>
- The server SHOULD implement distinct priority levels in the following manner:
- </doc>
- <doc>
- If the server implements n distinct priorities then priorities 0 to 5 - ceiling(n/2) should
- be treated equivalently and should be the lowest effective priority. The priorities 4 +
- floor(n/2) should be treated equivalently and should be the highest effective priority. The
- priorities (5 - ceiling(n/2)) to (4 + floor(n/2)) inclusive must be treated as distinct
- priorities.
- </doc>
- <doc>
- Thus, for example, if 2 distinct priorities are implemented, then levels 0 to 4 are
- equivalent, and levels 5 to 9 are equivalent and levels 4 and 5 are distinct. If 3 distinct
- priorities are implements the 0 to 3 are equivalent, 5 to 9 are equivalent and 3, 4 and 5
- are distinct.
- </doc>
- <doc>
- This scheme ensures that if two priorities are distinct for a server which implements m
- separate priority levels they are also distinct for a server which implements n different
- priority levels where n > m.
- </doc>
- </rule>
-
- <rule name="priority-delivery">
- <doc>
- The server MUST deliver messages of the same priority in order irrespective of their
- individual persistence.
- </doc>
- <doc type="scenario">
- Send a set of messages with the same priority but different persistence settings to a queue.
- Subscribe and verify that messages arrive in same order as originally published.
- </doc>
- </rule>
-
- <role name="server" implement="MUST" />
- <role name="client" implement="MUST" />
-
- <domain name="destination" type="str8" label="destination for a message">
- <doc>
- Specifies the destination to which the message is to be transferred.
- </doc>
- </domain>
-
- <domain name="accept-mode" type="uint8" label="indicates a confirmation mode">
- <doc>
- Controls how the sender of messages is notified of successful transfer.
- </doc>
-
- <enum>
- <choice name="explicit" value="0">
- <doc>
- Successful transfer is signaled by message.accept. An acquired message (whether
- acquisition was implicit as in pre-acquired mode or explicit as in not-acquired mode) is
- not considered transferred until a message.accept that includes the transfer command is
- received.
- </doc>
- </choice>
-
- <choice name="none" value="1">
- <doc>
- Successful transfer is assumed when accept-mode is "pre-acquired". Messages transferred
- with an accept-mode of "not-acquired" cannot be acquired when accept-mode is "none".
- </doc>
- </choice>
- </enum>
- </domain>
-
- <domain name="acquire-mode" type="uint8" label="indicates the transfer mode">
- <doc>
- Indicates whether a transferred message can be considered as automatically acquired or
- whether an explicit request is necessary in order to acquire it.
- </doc>
-
- <enum>
- <choice name="pre-acquired" value="0">
- <doc>
- the message is acquired when the transfer starts
- </doc>
- </choice>
-
- <choice name="not-acquired" value="1">
- <doc>
- the message is not acquired when it arrives, and must be explicitly acquired by the
- recipient
- </doc>
- </choice>
- </enum>
- </domain>
-
- <domain name="reject-code" type="uint16" label="reject code for transfer">
- <doc>
- Code specifying the reason for a message reject.
- </doc>
- <enum>
- <choice name="unspecified" value="0">
- <doc>
- Rejected for an unspecified reason.
- </doc>
- </choice>
- <choice name="unroutable" value="1">
- <doc>
- Delivery was attempted but there were no queues which the message could be routed to.
- </doc>
- </choice>
- <choice name="immediate" value="2">
- <doc>
- The rejected message had the immediate flag set to true, but at the time of the transfer
- at least one of the queues to which it was to be routed did not have any subscriber able
- to take the message.
- </doc>
- </choice>
- </enum>
- </domain>
-
- <domain name="resume-id" type="str16">
- <doc>
- A resume-id serves to identify partially transferred message content. The id is chosen by
- the sender, and must be unique to a given user. A resume-id is not expected to be unique
- across users.
- </doc>
- </domain>
-
- <domain name="delivery-mode" type="uint8"
- label="indicates whether a message should be treated as transient or durable">
- <doc>
-
- Used to set the reliability requirements for a message which is transferred to the server.
- </doc>
- <enum>
- <choice name="non-persistent" value="1">
- <doc>
- A non-persistent message may be lost in event of a failure, but the nature of the
- communication is such that an occasional message loss is tolerable. This is the lowest
- overhead mode. Non-persistent messages are delivered at most once only.
- </doc>
- </choice>
-
- <choice name="persistent" value="2">
- <doc>
- A persistent message is one which must be stored on a persistent medium (usually hard
- drive) at every stage of delivery so that it will not be lost in event of failure (other
- than of the medium itself). This is normally accomplished with some additional overhead.
- A persistent message may be delivered more than once if there is uncertainty about the
- state of its delivery after a failure and recovery.
- </doc>
- </choice>
- </enum>
- </domain>
-
- <domain name="delivery-priority" type="uint8"
- label="indicates the desired priority to assign to a message transfer">
- <doc>
- Used to assign a priority to a message transfer. Priorities range from 0 (lowest) to 9
- (highest).
- </doc>
- <enum>
- <choice name="lowest" value="0">
- <doc>
- Lowest possible priority message.
- </doc>
- </choice>
-
- <choice name="lower" value="1">
- <doc>
- Very low priority message
- </doc>
- </choice>
-
- <choice name="low" value="2">
- <doc>
- Low priority message.
- </doc>
- </choice>
-
- <choice name="below-average" value="3">
- <doc>
- Below average priority message.
- </doc>
- </choice>
-
- <choice name="medium" value="4">
- <doc>
- Medium priority message.
- </doc>
- </choice>
-
-
- <choice name="above-average" value="5">
- <doc>
- Above average priority message
- </doc>
- </choice>
-
-
- <choice name="high" value="6">
- <doc>
- High priority message
- </doc>
- </choice>
-
- <choice name="higher" value="7">
- <doc>
- Higher priority message
- </doc>
- </choice>
-
- <choice name="very-high" value="8">
- <doc>
- Very high priority message.
- </doc>
- </choice>
-
- <choice name="highest" value="9">
- <doc>
- Highest possible priority message.
- </doc>
- </choice>
- </enum>
- </domain>
-
- <struct name="delivery-properties" size="4" code="0x1" pack="2">
- <field name="discard-unroutable" type="bit" label="controls discard of unroutable messages">
- <doc>
- If set on a message that is not routable the broker can discard it. If not set, an
- unroutable message should be handled by reject when accept-mode is explicit; or by routing
- to the alternate-exchange if defined when accept-mode is none.
- </doc>
- </field>
-
- <field name="immediate" type="bit" label="Consider message unroutable if it cannot be
- processed immediately">
- <doc>
- If the immediate flag is set to true on a message transferred to a Server, then the
- message should be considered unroutable (and not delivered to any queues) if, for any
- queue that it is to be routed to according to the standard routing behavior, there is not
- a subscription on that queue able to receive the message. The treatment of unroutable
- messages is dependent on the value of the discard-unroutable flag.
- </doc>
- <doc>
- The immediate flag is ignored on transferred to a Client.
- </doc>
- </field>
-
- <field name="redelivered" type="bit" label="redelivery flag">
- <doc>
- This boolean flag indicates that the message may have been previously delivered to this
- or another client.
- </doc>
- <doc>
- If the redelivered flag is set on transfer to a Server, then any delivery of the message
- from that Server to a Client must also have the redelivered flag set to true.
- </doc>
- <rule name="implementation">
- <doc>
- The server MUST try to signal redelivered messages when it can. When redelivering a
- message that was not successfully accepted, the server SHOULD deliver it to the original
- client if possible.
- </doc>
- <doc type="scenario">
- Create a shared queue and publish a message to the queue. Subscribe using explicit
- accept-mode, but do not accept the message. Close the session, reconnect, and subscribe
- to the queue again. The message MUST arrive with the redelivered flag set.
- </doc>
- </rule>
- <rule name="hinting">
- <doc>
- The client should not rely on the redelivered field to detect duplicate messages where
- publishers may themselves produce duplicates. A fully robust client should be able to
- track duplicate received messages on non-transacted, and locally-transacted sessions.
- </doc>
- </rule>
- </field>
-
- <field name="priority" type="delivery-priority" label="message priority, 0 to 9"
- required="true">
- <doc> Message priority, which can be between 0 and 9. Messages with higher priorities may be
- delivered before those with lower priorities. </doc>
- </field>
-
- <field name="delivery-mode" type="delivery-mode" label="message persistence requirement"
- required="true">
- <doc> The delivery mode may be non-persistent or persistent. </doc>
- </field>
-
- <field name="ttl" type="uint64" label="time to live in ms">
- <doc> Duration in milliseconds for which the message should be considered "live". If this is
- set then a message expiration time will be computed based on the current time plus this
- value. Messages that live longer than their expiration time will be discarded (or dead
- lettered).</doc>
- <rule name="ttl-decrement">
- <doc>
- If a message is transferred between brokers before delivery to a final subscriber the
- ttl should be decremented before peer to peer transfer and both timestamp and expiration
- should be cleared.
- </doc>
- </rule>
- </field>
-
- <field name="timestamp" type="datetime" label="message timestamp">
- <doc>
- The timestamp is set by the broker on arrival of the message.
- </doc>
- </field>
-
- <field name="expiration" type="datetime" label="message expiration time">
- <doc>
- The expiration header assigned by the broker. After receiving the message the broker sets
- expiration to the sum of the ttl specified in the publish command and the current time.
- (ttl=expiration - timestamp)
- </doc>
- </field>
-
- <field name="exchange" type="exchange.name" label="originating exchange">
- <doc>
- Identifies the exchange specified in the destination field of the message.transfer used to
- publish the message. This MUST be set by the broker upon receipt of a message.
- </doc>
- </field>
-
- <field name="routing-key" type="str8" label="message routing key">
- <doc>
- The value of the key determines to which queue the exchange will send the message. The way
- in which keys are used to make this routing decision depends on the type of exchange to
- which the message is sent. For example, a direct exchange will route a message to a queue
- if that queue is bound to the exchange with a binding-key identical to the routing-key of
- the message.
- </doc>
- </field>
-
- <field name="resume-id" type="resume-id" label="global id for message transfer">
- <doc>
- When a resume-id is provided the recipient MAY use it to retain message data should the
- session expire while the message transfer is still incomplete.
- </doc>
- </field>
-
- <field name="resume-ttl" type="uint64" label="ttl in ms for interrupted message data">
- <doc>
- When a resume-ttl is provided the recipient MAY use it has a guideline for how long to
- retain the partially complete data when a resume-id is specified. If no resume-id is
- specified then this value should be ignored.
- </doc>
- </field>
- </struct>
-
- <struct name="fragment-properties" size="4" code="0x2" pack="2">
- <doc>
- These properties permit the transfer of message fragments. These may be used in conjunction
- with byte level flow control to limit the rate at which large messages are received. Only
- the first fragment carries the delivery-properties and message-properties.
-
- Syntactically each fragment appears as a complete message to the lower layers of the
- protocol, however the model layer is required to treat all the fragments as a single
- message. For example all fragments must be delivered to the same client. In pre-acquired
- mode, no message fragments can be delivered by the broker until the entire message has been
- received.
- </doc>
-
- <field name="first" type="bit" default="1">
- <doc>True if this fragment contains the start of the message, false otherwise.</doc>
- </field>
-
- <field name="last" type="bit" default="1">
- <doc>True if this fragment contains the end of the message, false otherwise.</doc>
- </field>
-
- <field name="fragment-size" type="uint64">
- <doc>This field may optionally contain the size of the fragment.</doc>
- </field>
- </struct>
-
- <struct name="reply-to" size="2" pack="2">
- <doc>The reply-to domain provides a simple address structure for replying to to a message to a
- destination within the same virtual-host.</doc>
- <field name="exchange" type="exchange.name" label="the name of the exchange to reply to"/>
- <field name="routing-key" type="str8" label="the routing-key to use when replying"/>
- </struct>
-
- <struct name="message-properties" size="4" code="0x3" pack="2">
- <field name="content-length" type="uint64" label="length of the body segment in bytes">
- <doc>
- The length of the body segment in bytes.
- </doc>
- </field>
-
- <field name="message-id" type="uuid" label="application message identifier">
- <doc>
- Message-id is an optional property of UUID type which uniquely identifies a message within
- the message system. The message producer is usually responsible for setting the
- message-id. The server MAY discard a message as a duplicate if the value of the message-id
- matches that of a previously received message. Duplicate messages MUST still be accepted
- if transferred with an accept-mode of "explicit".
- </doc>
-
- <rule name="unique">
- <doc>
- A message-id MUST be unique within a given server instance. A message-id SHOULD be
- globally unique (i.e. across different systems).
- </doc>
- </rule>
-
- <rule name="immutable">
- <doc>
- A message ID is immutable. Once set, a message-id MUST NOT be changed or reassigned,
- even if the message is replicated, resent or sent to multiple queues.
- </doc>
- </rule>
- </field>
-
- <field name="correlation-id" type="vbin16" label="application correlation identifier">
- <doc>
- This is a client-specific id that may be used to mark or identify messages between
- clients. The server ignores this field.
- </doc>
- </field>
-
- <field name="reply-to" type="reply-to" label="destination to reply to">
- <doc>
- The destination of any message that is sent in reply to this message.
- </doc>
- </field>
-
- <field name="content-type" type="str8" label="MIME content type">
- <doc>
- The RFC-2046 MIME type for the message content (such as "text/plain"). This is set by the
- originating client.
- </doc>
- </field>
-
- <field name="content-encoding" type="str8" label="MIME content encoding">
- <doc>
- The encoding for character-based message content. This is set by the originating client.
- Examples include UTF-8 and ISO-8859-15.
- </doc>
- </field>
-
- <field name="user-id" type="vbin16" label="creating user id">
- <doc>
- The identity of the user responsible for producing the message. The client sets this
- value, and it is authenticated by the broker.
- </doc>
-
- <rule name="authentication">
- <doc>
- The server MUST produce an unauthorized-access exception if the user-id field is set to
- a principle for which the client is not authenticated.
- </doc>
- </rule>
- </field>
-
- <field name="app-id" type="vbin16" label="creating application id">
- <doc>
- The identity of the client application responsible for producing the message.
- </doc>
- </field>
-
- <field name="application-headers" type="map" label="application specific headers table">
- <doc>
- This is a collection of user-defined headers or properties which may be set by the
- producing client and retrieved by the consuming client.
- </doc>
- </field>
- </struct>
-
- <domain name="flow-mode" type="uint8" label="the flow-mode for allocating flow credit">
- <enum>
- <choice name="credit" value="0">
- <doc>
- Credit based flow control.
- </doc>
- </choice>
-
- <choice name="window" value="1">
- <doc>
- Window based flow control.
- </doc>
- </choice>
- </enum>
- </domain>
-
- <domain name="credit-unit" type="uint8" label="specifies the unit of credit balance">
- <enum>
- <choice name="message" value="0">
- <doc>Indicates a value specified in messages.</doc>
- </choice>
- <choice name="byte" value="1">
- <doc>Indicates a value specified in bytes.</doc>
- </choice>
- </enum>
- </domain>
-
- <!-- - Command: message.transfer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="transfer" code="0x1" label="transfer a message">
- <doc>
- This command transfers a message between two peers. When a client uses this command to
- publish a message to a broker, the destination identifies a specific exchange. The message
- will then be routed to queues as defined by the exchange configuration.
-
- The client may request a broker to transfer messages to it, from a particular queue, by
- issuing a subscribe command. The subscribe command specifies the destination that the broker
- should use for any resulting transfers.
- </doc>
-
- <rule name="transactional-publish">
- <doc>
- If a transfer to an exchange occurs within a transaction, then it is not available from
- the queue until the transaction commits. It is not specified whether routing takes place
- when the transfer is received or when the transaction commits.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MUST" />
-
-
- <field name="destination" type="destination" label="message destination">
- <doc>
- Specifies the destination to which the message is to be transferred.
- </doc>
-
- <rule name="blank-destination">
- <doc>
- The server MUST accept a blank destination to mean the default exchange.
- </doc>
- </rule>
-
- <exception name="nonexistent-exchange" error-code="not-found">
- <doc>
- If the destination refers to an exchange that does not exist, the peer MUST raise a
- session exception.
- </doc>
- </exception>
- </field>
-
- <field name="accept-mode" type="accept-mode" required="true">
- <doc>
- Indicates whether message.accept, session.complete, or nothing at all is required to
- indicate successful transfer of the message.
- </doc>
- </field>
-
- <field name="acquire-mode" type="acquire-mode" required="true">
- <doc>
- Indicates whether or not the transferred message has been acquired.
- </doc>
- </field>
-
- <segments>
- <header>
- <entry type="delivery-properties"/>
- <entry type="fragment-properties"/>
- <entry type="message-properties"/>
- </header>
- <body/>
- </segments>
- </command>
-
- <!-- - Command: message.accept - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="accept" code="0x2" label="reject a message">
- <doc>
- Accepts the message. Once a transfer is accepted, the command-id may no longer be referenced
- from other commands.
- </doc>
-
- <rule name="acquisition">
- <doc>
- The recipient MUST have acquired a message in order to accept it.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MUST" />
-
- <field name="transfers" type="session.commands" required="true">
- <doc>
- Identifies the messages previously transferred that should be accepted.
- </doc>
- </field>
- </command>
-
- <!-- - Command: message.reject - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="reject" code="0x3" label="reject a message">
- <doc>
- Indicates that the message transfers are unprocessable in some way. A server may reject a
- message if it is unroutable. A client may reject a message if it is invalid. A message may
- be rejected for other reasons as well. Once a transfer is rejected, the command-id may no
- longer be referenced from other commands.
- </doc>
-
- <rule name="alternate-exchange">
- <doc>
- When a client rejects a message, the server MUST deliver that message to the
- alternate-exchange on the queue from which it was delivered. If no alternate-exchange is
- defined for that queue the broker MAY discard the message.
- </doc>
- </rule>
-
- <rule name="acquisition">
- <doc>
- The recipient MUST have acquired a message in order to reject it. If the message is not
- acquired any reject MUST be ignored.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MUST" />
-
- <field name="transfers" type="session.commands" required="true">
- <doc>
- Identifies the messages previously transferred that should be rejected.
- </doc>
- </field>
- <field name="code" type="reject-code" required="true">
- <doc>
- Code describing the reason for rejection.
- </doc>
- </field>
- <field name="text" type="str8" label="informational text for message reject">
- <doc>
- Text describing the reason for rejection.
- </doc>
- </field>
- </command>
-
- <!-- - Command: message.release - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="release" code="0x4" label="release a message">
- <doc>
- Release previously transferred messages. When acquired messages are released, they become
- available for acquisition by any subscriber. Once a transfer is released, the command-id may
- no longer be referenced from other commands.
- </doc>
-
- <rule name="ordering">
- <doc>
- Acquired messages that have been released MAY subsequently be delivered out of order.
- Implementations SHOULD ensure that released messages keep their position with respect to
- undelivered messages of the same priority.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MAY" />
-
- <field name="transfers" type="session.commands" required="true">
- <doc>
- Indicates the messages to be released.
- </doc>
- </field>
- <field name="set-redelivered" type="bit" label="mark the released messages as redelivered">
- <doc>
- By setting set-redelivered to true, any acquired messages released to a queue with this
- command will be marked as redelivered on their next transfer from that queue. If this flag
- is not set, then an acquired message will retain its original redelivered status on the
- queue. Messages that are not acquired are unaffected by the value of this flag.
- </doc>
- </field>
- </command>
-
- <!-- - Command: message.acquire - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="acquire" code="0x5" label="acquire messages for consumption">
- <doc>
- Acquires previously transferred messages for consumption. The acquired ids (if any) are
- sent via message.acquired.
- </doc>
-
- <rule name="one-to-one">
- <doc>
- Each acquire MUST produce exactly one message.acquired even if it is empty.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
-
- <field name="transfers" type="session.commands" required="true">
- <doc>
- Indicates the messages to be acquired.
- </doc>
- </field>
-
- <result>
- <struct name="acquired" size="4" code="0x4" pack="2" label="indicates acquired messages">
- <doc>
- Identifies a set of previously transferred messages that have now been acquired.
- </doc>
-
- <field name="transfers" type="session.commands" required="true">
- <doc>
- Indicates the acquired messages.
- </doc>
- </field>
- </struct>
- </result>
- </command>
-
- <!-- - Command: message.resume - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="resume" code="0x6" label="resume an interrupted message transfer">
- <doc>
- This command resumes an interrupted transfer. The recipient should return the amount of
- partially transferred data associated with the given resume-id, or zero if there is no data
- at all. If a non-zero result is returned, the recipient should expect to receive message
- fragment(s) containing the remainder of the interrupted message.
- </doc>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MUST" />
-
- <field name="destination" type="destination">
- <doc>
- The destination to which the remaining message fragments are transferred.
- </doc>
-
- <exception name="destination-not-found" error-code="not-found">
- <doc>If the destination does not exist, the recipient MUST close the session.</doc>
- </exception>
- </field>
-
- <field name="resume-id" type="resume-id" required="true">
- <doc>
- The name of the transfer being resumed.
- </doc>
-
- <rule name="unknown-resume-id">
- <doc>If the resume-id is not known, the recipient MUST return an offset of zero.</doc>
- </rule>
- </field>
-
- <result>
- <struct name="message-resume-result" size="4" code="0x5" pack="2">
- <field name="offset" type="uint64">
- <doc>
- Indicates the amount of data already transferred.
- </doc>
- </field>
- </struct>
- </result>
- </command>
-
- <!-- - Command: message.subscribe - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="subscribe" code="0x7" label="start a queue subscription">
- <doc> This command asks the server to start a "subscription", which is a request for messages
- from a specific queue. Subscriptions last as long as the session they were created on, or
- until the client cancels them. </doc>
-
- <rule name="simultaneous-subscriptions">
- <doc> The server SHOULD support at least 16 subscriptions per queue, and ideally, impose no
- limit except as defined by available resources. </doc>
- <doc type="scenario"> Create a queue and create subscriptions on that queue until the server
- closes the connection. Verify that the number of subscriptions created was at least
- sixteen and report the total number. </doc>
- </rule>
-
- <rule name="default-flow-mode">
- <doc> The default flow mode for new subscriptions is window-mode. </doc>
- </rule>
-
- <exception name="queue-deletion" error-code="resource-deleted">
- <doc>
- If the queue for this subscription is deleted, any subscribing sessions MUST be closed.
- This exception may occur at any time after the subscription has been completed.
- </doc>
- </exception>
-
- <exception name="queue-not-found" error-code="not-found">
- <doc> If the queue for this subscription does not exist, then the subscribing session MUST
- be closed. </doc>
- </exception>
-
- <rule name="initial-credit">
- <doc>
- Immediately after a subscription is created, the initial byte and message credit for that
- destination is zero.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST"/>
-
- <field name="queue" type="queue.name" required="true">
- <doc> Specifies the name of the subscribed queue. </doc>
- </field>
-
- <field name="destination" type="destination" label="incoming message destination">
- <doc> The client specified name for the subscription. This is used as the destination for
- all messages transferred from this subscription. The destination is scoped to the session.
- </doc>
-
- <exception name="unique-subscriber-destination" error-code="not-allowed">
- <doc> The client MUST NOT specify a destination that refers to an existing subscription on
- the same session. </doc>
- <doc type="scenario"> Attempt to create two subscriptions on the same session with the
- same non-empty destination. </doc>
- </exception>
- </field>
-
- <field name="accept-mode" type="accept-mode" required="true">
- <doc> The accept-mode to use for messages transferred from this subscription. </doc>
- </field>
-
- <field name="acquire-mode" type="acquire-mode" required="true">
- <doc> The acquire-mode to use for messages transferred from this subscription. </doc>
- </field>
-
- <field name="exclusive" type="bit" label="request exclusive access">
- <doc> Request an exclusive subscription. This prevents other subscribers from subscribing to
- the queue. </doc>
-
- <exception name="in-use" error-code="resource-locked">
- <doc> The server MUST NOT grant an exclusive subscription to a queue that already has
- subscribers. </doc>
- <doc type="scenario"> Open two connections to a server, and in one connection create a
- shared (non-exclusive) queue and then subscribe to the queue. In the second connection
- attempt to subscribe to the same queue using the exclusive option. </doc>
- </exception>
- </field>
-
- <field name="resume-id" type="resume-id">
- <doc> Requests that the broker use the supplied resume-id when transferring messages for
- this subscription. </doc>
- </field>
-
- <field name="resume-ttl" type="uint64">
- <doc> Requested duration in milliseconds for the broker use as resume-ttl when transferring
- messages for this subscription. </doc>
- </field>
-
- <field name="arguments" type="map" label="arguments for vendor extensions">
- <doc> The syntax and semantics of these arguments depends on the providers implementation.
- </doc>
- </field>
- </command>
-
- <!-- - Command: message.cancel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="cancel" code="0x8" label="end a queue subscription">
- <doc>
- This command cancels a subscription. This does not affect already delivered messages, but it
- does mean the server will not send any more messages for that subscription. The client may
- receive an arbitrary number of messages in between sending the cancel command and receiving
- notification that the cancel command is complete.
- </doc>
-
- <rule name="post-cancel-transfer-resolution">
- <doc>
- Canceling a subscription MUST NOT affect pending transfers. A transfer made prior to
- canceling transfers to the destination MUST be able to be accepted, released, acquired, or
- rejected after the subscription is canceled.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
-
- <field name="destination" type="destination" required="true">
- <exception name="subscription-not-found" error-code="not-found">
- <doc>
- If the subscription specified by the destination is not found, the server MUST close the
- session.
- </doc>
- </exception>
- </field>
- </command>
-
- <!-- - Command: message.set-flow-mode - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="set-flow-mode" code="0x9" label="set the flow control mode">
- <doc>
- Sets the mode of flow control used for a given destination to either window or credit based
- flow control.
-
- With credit based flow control, the sender of messages continually maintains its current
- credit balance with the recipient. The credit balance consists of two values, a message
- count, and a byte count. Whenever message data is sent, both counts must be decremented.
- If either value reaches zero, the flow of message data must stop. Additional credit is
- received via the message.flow command.
-
- The sender MUST NOT send partial assemblies. This means that if there is not enough byte
- credit available to send a complete message, the sender must either wait or use message
- fragmentation (see the fragment-properties header struct) to send the first part of the
- message data in a complete assembly.
-
- Window based flow control is identical to credit based flow control, however message
- transfer completion implicitly grants a single unit of message credit, and the size of the
- message in byte credits for each completed message transfer. Completion of the transfer
- command with session.completed is the only way credit is implicitly updated; message.accept,
- message.release, message.reject, tx.commit and tx.rollback have no effect on the outstanding
- credit balances.
- </doc>
-
- <rule name="byte-accounting">
- <doc>
- The byte count is decremented by the payload size of each transmitted frame with segment
- type header or body appearing within a message.transfer command. Note that the payload
- size is the frame size less the frame header size.
- </doc>
- </rule>
-
- <rule name="mode-switching">
- <doc>
- Mode switching may only occur if both the byte and message credit balance are zero. There
- are three ways for a recipient of messages to be sure that the sender's credit balances
- are zero:
-
- 1) The recipient may send a message.stop command to the sender. When the recipient
- receives notification of completion for the message.stop command, it knows that the
- sender's credit is zero.
-
- 2) The recipient may perform the same steps described in (1) with the message.flush
- command substituted for the message.stop command.
-
- 3) Immediately after a subscription is created with message.subscribe, the credit for
- that destination is zero.
- </doc>
- </rule>
-
- <rule name="default-flow-mode">
- <doc>
- Prior to receiving an explicit set-flow-mode command, a peer MUST consider the flow-mode
- to be window.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MUST" />
-
- <field name="destination" type="destination"/>
- <field name="flow-mode" type="flow-mode" required="true">
- <doc>
- The new flow control mode.
- </doc>
- </field>
- </command>
-
- <!-- - Command: message.flow - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="flow" code="0xa" label="control message flow">
- <doc>
- This command controls the flow of message data to a given destination. It is used by the
- recipient of messages to dynamically match the incoming rate of message flow to its
- processing or forwarding capacity. Upon receipt of this command, the sender must add "value"
- number of the specified unit to the available credit balance for the specified destination.
- A value of (0xFFFFFFFF) indicates an infinite amount of credit. This disables any limit for
- the given unit until the credit balance is zeroed with message.stop or message.flush.
- </doc>
-
- <!-- throws no-such-destination -->
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MUST" />
-
- <field name="destination" type="destination"/>
- <field name="unit" type="credit-unit" required="true">
- <doc>
- The unit of value.
- </doc>
- </field>
- <field name="value" type="uint32">
- <doc>
- If the value is not set then this indicates an infinite amount of credit.
- </doc>
- </field>
- </command>
-
- <!-- - Command: message.flush - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="flush" code="0xb" label="force the sending of available messages">
- <doc>
- Forces the sender to exhaust his credit supply. The sender's credit will always be zero when
- this command completes. The command completes when immediately available message data has
- been transferred, or when the credit supply is exhausted.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="destination" type="destination"/>
- </command>
-
- <!-- - Command: message.stop - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="stop" code="0xc" label="stop the sending of messages">
- <doc>
- On receipt of this command, a producer of messages MUST set his credit to zero for the given
- destination. When notifying of completion, credit MUST be zero and no further messages will
- be sent until such a time as further credit is received.
- </doc>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MUST" />
-
- <field name="destination" type="destination"/>
- </command>
-
- </class>
-
- <!-- == Class: tx ============================================================================ -->
-
- <class name="tx" code="0x5" label="work with standard transactions">
- <doc>
- Standard transactions provide so-called "1.5 phase commit". We can ensure that work is never
- lost, but there is a chance of confirmations being lost, so that messages may be resent.
- Applications that use standard transactions must be able to detect and ignore duplicate
- messages.
- </doc>
-
- <doc type="grammar">
- tx = C:SELECT
- / C:COMMIT
- / C:ROLLBACK
- </doc>
-
- <!-- XXX: this isn't really a rule, as stated there is no way for
- a client library to implement this -->
- <rule name="duplicate-tracking">
- <doc>
- An client using standard transactions SHOULD be able to track all messages received within a
- reasonable period, and thus detect and reject duplicates of the same message. It SHOULD NOT
- pass these to the application layer.
- </doc>
- </rule>
-
- <role name="server" implement="SHOULD" />
-
- <!-- - Command: tx.select - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="select" code="0x1" label="select standard transaction mode">
- <doc>
- This command sets the session to use standard transactions. The client must use this command
- exactly once on a session before using the Commit or Rollback commands.
- </doc>
-
- <exception name="exactly-once" error-code="illegal-state">
- <doc>
- A client MUST NOT select standard transactions on a session that is already transactional.
- </doc>
- </exception>
-
- <exception name="no-dtx" error-code="illegal-state">
- <doc>
- A client MUST NOT select standard transactions on a session that is already enlisted in a
- distributed transaction.
- </doc>
- </exception>
-
- <exception name="explicit-accepts" error-code="not-allowed">
- <doc>
- On a session on which tx.select has been issued, a client MUST NOT issue a
- message.subscribe command with the accept-mode property set to any value other than
- explicit. Similarly a tx.select MUST NOT be issued on a session on which a there is a non
- cancelled subscriber with accept-mode of none.
- </doc>
- </exception>
-
- <implement role="server" handle="MUST" />
- </command>
-
- <!-- - Command: tx.commit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="commit" code="0x2" label="commit the current transaction">
- <doc>
- This command commits all messages published and accepted in the current transaction. A
- new transaction starts immediately after a commit.
- </doc>
- <doc>
- In more detail, the commit acts on all messages which have been transferred from the Client
- to the Server, and on all acceptances of messages sent from Server to Client. Since the
- commit acts on commands sent in the same direction as the commit command itself, there is no
- ambiguity on the scope of the commands being committed. Further, the commit will not be
- completed until all preceding commands which it affects have been completed.
- </doc>
- <doc>
- Since transactions act on explicit accept commands, the only valid accept-mode for message
- subscribers is explicit. For transferring messages from Client to Server (publishing) all
- accept-modes are permitted.
- </doc>
-
- <exception name="select-required" error-code="illegal-state">
- <doc>
- A client MUST NOT issue tx.commit on a session that has not been selected for standard
- transactions with tx.select.
- </doc>
- </exception>
-
-
-
- <implement role="server" handle="MUST" />
- </command>
-
- <!-- - Command: tx.rollback - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="rollback" code="0x3" label="abandon the current transaction">
- <doc>
- This command abandons the current transaction. In particular the transfers from Client to
- Server (publishes) and accepts of transfers from Server to Client which occurred in the
- current transaction are discarded. A new transaction starts immediately after a rollback.
- </doc>
- <doc>
- In more detail, when a rollback is issued, any the effects of transfers which occurred from
- Client to Server are discarded. The Server will issue completion notification for all such
- transfers prior to the completion of the rollback. Similarly the effects of any
- message.accept issued from Client to Server prior to the issuance of the tx.rollback will be
- discarded; and notification of completion for all such commands will be issued before the
- issuance of the completion for the rollback.
- </doc>
- <doc>
- After the completion of the rollback, the client will still hold the messages which it has
- not yet accepted (including those for which accepts were previously issued within the
- transaction); i.e. the messages remain "acquired". If the Client wishes to release those
- messages back to the Server, then appropriate message.release commands must be issued.
- </doc>
-
- <exception name="select-required" error-code="illegal-state">
- <doc>
- A client MUST NOT issue tx.rollback on a session that has not been selected for standard
- transactions with tx.select.
- </doc>
- </exception>
-
- <implement role="server" handle="MUST" />
- </command>
-
- </class>
-
- <!-- == Class: dtx =========================================================================== -->
-
- <class name="dtx" code="0x6" label="Demarcates dtx branches">
- <doc>
- This provides the X-Open XA distributed transaction protocol support. It allows a session
- to be selected for use with distributed transactions, the transactional boundaries for work on
- that session to be demarcated and allows the transaction manager to coordinate transaction
- outcomes.
- </doc>
-
- <doc type="grammar">
- dtx-demarcation = C:SELECT *demarcation
- demarcation = C:START C:END
- </doc>
-
- <doc type="grammar">
- dtx-coordination = *coordination
- coordination = command
- / outcome
- / recovery
- command = C:SET-TIMEOUT
- / C:GET-TIMEOUT
- outcome = one-phase-commit
- / one-phase-rollback
- / two-phase-commit
- / two-phase-rollback
- one-phase-commit = C:COMMIT
- one-phase-rollback = C:ROLLBACK
- two-phase-commit = C:PREPARE C:COMMIT
- two-phase-rollback = C:PREPARE C:ROLLBACK
- recovery = C:RECOVER *recovery-outcome
- recovery-outcome = one-phase-commit
- / one-phase-rollback
- / C:FORGET
-
- </doc>
-
- <rule name="transactionality">
- <doc>
- Enabling XA transaction support on a session requires that the server MUST manage
- transactions demarcated by start-end blocks. That is to say that on this XA-enabled session,
- work undergone within transactional blocks is performed on behalf a transaction branch
- whereas work performed outside of transactional blocks is NOT transactional.
- </doc>
- </rule>
-
- <role name="server" implement="MAY" />
- <role name="client" implement="MAY" />
-
- <!-- XA domains -->
-
- <domain name="xa-status" type="uint16" label="XA return codes">
- <enum>
- <choice name="xa-ok" value="0">
- <doc>
- Normal execution completion (no error).
- </doc>
- </choice>
-
- <choice name="xa-rbrollback" value="1">
- <doc>
- The rollback was caused for an unspecified reason.
- </doc>
- </choice>
-
- <choice name="xa-rbtimeout" value="2">
- <doc>
- A transaction branch took too long.
- </doc>
- </choice>
-
- <choice name="xa-heurhaz" value="3">
- <doc>
- The transaction branch may have been heuristically completed.
- </doc>
- </choice>
-
- <choice name="xa-heurcom" value="4">
- <doc>
- The transaction branch has been heuristically committed.
- </doc>
- </choice>
-
- <choice name="xa-heurrb" value="5">
- <doc>
- The transaction branch has been heuristically rolled back.
- </doc>
- </choice>
-
- <choice name="xa-heurmix" value="6">
- <doc>
- The transaction branch has been heuristically committed and rolled back.
- </doc>
- </choice>
-
- <choice name="xa-rdonly" value="7">
- <doc>
- The transaction branch was read-only and has been committed.
- </doc>
- </choice>
- </enum>
- </domain>
-
- <struct name="xa-result" size="4" code="0x1" pack="2">
- <field name="status" type="xa-status" required="true"/>
- </struct>
-
- <!-- Struct for xid -->
-
- <struct name="xid" size="4" code="0x4" pack="2" label="dtx branch identifier">
- <doc>
- An xid uniquely identifies a transaction branch.
- </doc>
-
- <field name="format" type="uint32" label="implementation specific format code"
- required="true"/>
- <field name="global-id" type="vbin8" label="global transaction id" required="true"/>
- <field name="branch-id" type="vbin8" label="branch qualifier" required="true"/>
- </struct>
-
- <!-- - Command: dtx.select - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="select" code="0x1" label="Select dtx mode">
- <doc>
- This command sets the session to use distributed transactions. The client must use this
- command at least once on a session before using XA demarcation operations.
- </doc>
-
- <implement role="server" handle="MAY" />
- </command>
-
- <!-- - Command: dtx.start - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="start" code="0x2" label="Start a dtx branch">
- <doc>
- This command is called when messages should be produced and consumed on behalf a transaction
- branch identified by xid.
- </doc>
-
- <exception name="illegal-state" error-code="illegal-state">
- <doc>
- If the command is invoked in an improper context (see class grammar) then the server MUST
- send a session exception.
- </doc>
- </exception>
-
- <exception name="already-known" error-code="not-allowed">
- <doc>
- If neither join nor resume is specified is specified and the transaction branch specified
- by xid has previously been seen then the server MUST raise an exception.
- </doc>
- </exception>
-
- <exception name="join-and-resume" error-code="not-allowed">
- <doc>
- If join and resume are specified then the server MUST raise an exception.
- </doc>
- </exception>
-
- <implement role="server" handle="MAY" />
-
- <field name="xid" type="xid" label="Transaction xid" required="true">
- <doc>
- Specifies the xid of the transaction branch to be started.
- </doc>
-
- <exception name="unknown-xid" error-code="not-allowed">
- <doc>
- If xid is already known by the broker then the server MUST raise an exception.
- </doc>
- </exception>
- </field>
-
- <field name="join" type="bit" label="Join with existing xid flag">
- <doc>
- Indicate whether this is joining an already associated xid. Indicate that the start
- applies to joining a transaction previously seen.
- </doc>
-
- <exception name="unsupported" error-code="not-implemented">
- <doc>
- If the broker does not support join the server MUST raise an exception.
- </doc>
- </exception>
- </field>
-
- <field name="resume" type="bit" label="Resume flag">
- <doc>
- Indicate that the start applies to resuming a suspended transaction branch specified.
- </doc>
- </field>
-
- <result type="xa-result">
- <doc>
- This confirms to the client that the transaction branch is started or specify the error
- condition.
-
- The value of this field may be one of the following constants:
-
- xa-ok: Normal execution.
-
- xa-rbrollback: The broker marked the transaction branch rollback-only for an unspecified
- reason.
-
- xa-rbtimeout: The work represented by this transaction branch took too long.
- </doc>
- </result>
- </command>
-
- <!-- - Command: dtx.end - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="end" code="0x3" label="End a dtx branch">
- <doc>
- This command is called when the work done on behalf a transaction branch finishes or needs
- to be suspended.
- </doc>
-
- <exception name="illegal-state" error-code="illegal-state">
- <doc>
- If the command is invoked in an improper context (see class grammar) then the server MUST
- raise an exception.
- </doc>
- </exception>
-
- <exception name="suspend-and-fail" error-code="not-allowed">
- <doc>
- If suspend and fail are specified then the server MUST raise an exception.
- </doc>
- </exception>
-
- <rule name="success">
- <doc>
- If neither fail nor suspend are specified then the portion of work has completed
- successfully.
- </doc>
- </rule>
-
- <rule name="session-closed">
- <doc>
- When a session is closed then the currently associated transaction branches MUST be marked
- rollback-only.
- </doc>
- </rule>
-
- <implement role="server" handle="MAY" />
-
- <field name="xid" type="xid" label="Transaction xid" required="true">
- <doc>
- Specifies the xid of the transaction branch to be ended.
- </doc>
-
- <exception name="not-associated" error-code="illegal-state">
- <doc>
- The session MUST be currently associated with the given xid (through an earlier start
- call with the same xid).
- </doc>
- </exception>
- </field>
-
- <field name="fail" type="bit" label="Failure flag">
- <doc>
- If set, indicates that this portion of work has failed; otherwise this portion of work has
- completed successfully.
- </doc>
-
- <rule name="failure">
- <doc>
- An implementation MAY elect to roll a transaction back if this failure notification is
- received. Should an implementation elect to implement this behavior, and this bit is
- set, then then the transaction branch SHOULD be marked as rollback-only and the end
- result SHOULD have the xa-rbrollback status set.
- </doc>
- </rule>
- </field>
-
- <field name="suspend" type="bit" label="Temporary suspension flag">
- <doc>
- Indicates that the transaction branch is temporarily suspended in an incomplete state.
- </doc>
-
- <rule name="resume">
- <doc>
- The transaction context is in a suspended state and must be resumed via the start
- command with resume specified.
- </doc>
- </rule>
-
- </field>
-
- <result type="xa-result">
- <doc>
- This command confirms to the client that the transaction branch is ended or specify the
- error condition.
-
- The value of this field may be one of the following constants:
-
- xa-ok: Normal execution.
-
- xa-rbrollback: The broker marked the transaction branch rollback-only for an unspecified
- reason. If an implementation chooses to implement rollback-on-failure behavior, then
- this value should be selected if the dtx.end.fail bit was set.
-
- xa-rbtimeout: The work represented by this transaction branch took too long.
- </doc>
- </result>
- </command>
-
- <!-- - Command: dtx.commit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="commit" code="0x4" label="Commit work on dtx branch">
- <doc>
- Commit the work done on behalf a transaction branch. This command commits the work
- associated with xid. Any produced messages are made available and any consumed messages are
- discarded.
- </doc>
-
- <exception name="illegal-state" error-code="illegal-state">
- <doc>
- If the command is invoked in an improper context (see class grammar) then the server MUST
- raise an exception.
- </doc>
- </exception>
-
- <implement role="server" handle="MAY" />
-
- <field name="xid" type="xid" label="Transaction xid" required="true">
- <doc>
- Specifies the xid of the transaction branch to be committed.
- </doc>
-
- <exception name="unknown-xid" error-code="not-found">
- <doc>
- If xid is unknown (the transaction branch has not been started or has already been
- ended) then the server MUST raise an exception.
- </doc>
- </exception>
-
- <exception name="not-disassociated" error-code="illegal-state">
- <doc>
- If this command is called when xid is still associated with a session then the server
- MUST raise an exception.
- </doc>
- </exception>
- </field>
-
- <field name="one-phase" type="bit" label="One-phase optimization flag">
- <doc>
- Used to indicate whether one-phase or two-phase commit is used.
- </doc>
-
- <exception name="one-phase" error-code="illegal-state">
- <doc>
- The one-phase bit MUST be set if a commit is sent without a preceding prepare.
- </doc>
- </exception>
-
- <exception name="two-phase" error-code="illegal-state">
- <doc>
- The one-phase bit MUST NOT be set if the commit has been preceded by prepare.
- </doc>
- </exception>
- </field>
-
- <result type="xa-result">
- <doc>
- This confirms to the client that the transaction branch is committed or specify the
- error condition.
-
- The value of this field may be one of the following constants:
-
- xa-ok: Normal execution
-
- xa-heurhaz: Due to some failure, the work done on behalf of the specified transaction
- branch may have been heuristically completed.
-
- xa-heurcom: Due to a heuristic decision, the work done on behalf of the specified
- transaction branch was committed.
-
- xa-heurrb: Due to a heuristic decision, the work done on behalf of the specified
- transaction branch was rolled back.
-
- xa-heurmix: Due to a heuristic decision, the work done on behalf of the specified
- transaction branch was partially committed and partially rolled back.
-
- xa-rbrollback: The broker marked the transaction branch rollback-only for an unspecified
- reason.
-
- xa-rbtimeout: The work represented by this transaction branch took too long.
- </doc>
- </result>
- </command>
-
- <!-- - Command: dtx.forget - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="forget" code="0x5" label="Discard dtx branch">
- <doc>
- This command is called to forget about a heuristically completed transaction branch.
- </doc>
-
- <exception name="illegal-state" error-code="illegal-state">
- <doc>
- If the command is invoked in an improper context (see class grammar) then the server MUST
- raise an exception.
- </doc>
- </exception>
-
- <implement role="server" handle="MAY" />
-
- <field name="xid" type="xid" label="Transaction xid" required="true">
- <doc>
- Specifies the xid of the transaction branch to be forgotten.
- </doc>
-
- <exception name="unknown-xid" error-code="not-found">
- <doc>
- If xid is unknown (the transaction branch has not been started or has already been
- ended) then the server MUST raise an exception.
- </doc>
- </exception>
-
- <exception name="not-disassociated" error-code="illegal-state">
- <doc>
- If this command is called when xid is still associated with a session then the server
- MUST raise an exception.
- </doc>
- </exception>
- </field>
- </command>
-
- <!-- - Command: dtx.get-timeout - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="get-timeout" code="0x6" label="Obtain dtx timeout in seconds">
- <doc>
- This command obtains the current transaction timeout value in seconds. If set-timeout was
- not used prior to invoking this command, the return value is the default timeout; otherwise,
- the value used in the previous set-timeout call is returned.
- </doc>
-
- <implement role="server" handle="MAY" />
-
- <field name="xid" type="xid" label="Transaction xid" required="true">
- <doc>
- Specifies the xid of the transaction branch for getting the timeout.
- </doc>
-
- <exception name="unknown-xid" error-code="not-found">
- <doc>
- If xid is unknown (the transaction branch has not been started or has already been
- ended) then the server MUST raise an exception.
- </doc>
- </exception>
- </field>
-
- <result>
- <struct name="get-timeout-result" size="4" code="0x2" pack="2">
- <doc> Returns the value of the timeout last specified through set-timeout. </doc>
-
- <field name="timeout" type="uint32" label="The current transaction timeout value"
- required="true">
- <doc> The current transaction timeout value in seconds. </doc>
- </field>
- </struct>
- </result>
- </command>
-
- <!-- - Command: dtx.prepare - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="prepare" code="0x7" label="Prepare a dtx branch">
- <doc>
- This command prepares for commitment any message produced or consumed on behalf of xid.
- </doc>
-
- <exception name="illegal-state" error-code="illegal-state">
- <doc>
- If the command is invoked in an improper context (see class grammar) then the server MUST
- raise an exception.
- </doc>
- </exception>
-
- <rule name="obligation-1">
- <doc>
- Once this command successfully returns it is guaranteed that the transaction branch may be
- either committed or rolled back regardless of failures.
- </doc>
- </rule>
-
- <rule name="obligation-2">
- <doc>
- The knowledge of xid cannot be erased before commit or rollback complete the branch.
- </doc>
- </rule>
-
- <implement role="server" handle="MAY" />
-
- <field name="xid" type="xid" label="Transaction xid" required="true">
- <doc>
- Specifies the xid of the transaction branch that can be prepared.
- </doc>
-
- <exception name="unknown-xid" error-code="not-found">
- <doc>
- If xid is unknown (the transaction branch has not been started or has already been
- ended) then the server MUST raise an exception.
- </doc>
- </exception>
-
- <exception name="not-disassociated" error-code="illegal-state">
- <doc>
- If this command is called when xid is still associated with a session then the server
- MUST raise an exception.
- </doc>
- </exception>
- </field>
-
- <result type="xa-result">
- <doc>
- This command confirms to the client that the transaction branch is prepared or specify the
- error condition.
-
- The value of this field may be one of the following constants:
-
- xa-ok: Normal execution.
-
- xa-rdonly: The transaction branch was read-only and has been committed.
-
- xa-rbrollback: The broker marked the transaction branch rollback-only for an unspecified
- reason.
-
- xa-rbtimeout: The work represented by this transaction branch took too long.
- </doc>
- </result>
- </command>
-
- <!-- - Command: dtx.recover - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="recover" code="0x8" label="Get prepared or completed xids">
- <doc>
- This command is called to obtain a list of transaction branches that are in a prepared or
- heuristically completed state.
- </doc>
-
- <implement role="server" handle="MAY" />
-
- <result>
- <struct name="recover-result" size="4" code="0x3" pack="2">
- <doc>
- Returns to the client a table with single item that is a sequence of transaction xids
- that are in a prepared or heuristically completed state.
- </doc>
-
- <field name="in-doubt" type="array" label="array of xids to be recovered" required="true">
- <doc> Array containing the xids to be recovered (xids that are in a prepared or
- heuristically completed state). </doc>
-
- </field>
- </struct>
- </result>
- </command>
-
- <!-- - Command: dtx.rollback - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="rollback" code="0x9" label="Rollback a dtx branch">
- <doc>
- This command rolls back the work associated with xid. Any produced messages are discarded
- and any consumed messages are re-enqueued.
- </doc>
-
- <exception name="illegal-state" error-code="illegal-state">
- <doc>
- If the command is invoked in an improper context (see class grammar) then the server MUST
- raise an exception.
- </doc>
- </exception>
-
- <implement role="server" handle="MAY" />
-
- <field name="xid" type="xid" label="Transaction xid" required="true">
- <doc>
- Specifies the xid of the transaction branch that can be rolled back.
- </doc>
-
- <exception name="unknown-xid" error-code="not-found">
- <doc>
- If xid is unknown (the transaction branch has not been started or has already been
- ended) then the server MUST raise an exception.
- </doc>
- </exception>
-
- <exception name="not-disassociated" error-code="illegal-state">
- <doc>
- If this command is called when xid is still associated with a session then the server
- MUST raise an exception.
- </doc>
- </exception>
- </field>
-
- <result type="xa-result">
- <doc>
- This command confirms to the client that the transaction branch is rolled back or specify
- the error condition.
-
- The value of this field may be one of the following constants:
-
- xa-ok: Normal execution
-
- xa-heurhaz: Due to some failure, the work done on behalf of the specified transaction
- branch may have been heuristically completed.
-
- xa-heurcom: Due to a heuristic decision, the work done on behalf of the specified
- transaction branch was committed.
-
- xa-heurrb: Due to a heuristic decision, the work done on behalf of the specified
- transaction branch was rolled back.
-
- xa-heurmix: Due to a heuristic decision, the work done on behalf of the specified
- transaction branch was partially committed and partially rolled back.
-
- xa-rbrollback: The broker marked the transaction branch rollback-only for an unspecified
- reason.
-
- xa-rbtimeout: The work represented by this transaction branch took too long.
- </doc>
- </result>
- </command>
-
- <!-- - Command: dtx.set-timeout - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="set-timeout" code="0xa" label="Set dtx timeout value">
- <doc>
- Sets the specified transaction branch timeout value in seconds.
- </doc>
-
- <rule name="effective">
- <doc>
- Once set, this timeout value is effective until this command is reinvoked with a different
- value.
- </doc>
- </rule>
-
- <rule name="reset">
- <doc>
- A value of zero resets the timeout value to the default value.
- </doc>
- </rule>
-
- <implement role="server" handle="MAY" />
-
- <field name="xid" type="xid" label="Transaction xid" required="true">
- <doc>
- Specifies the xid of the transaction branch for setting the timeout.
- </doc>
-
- <exception name="unknown-xid" error-code="not-found">
- <doc>
- If xid is unknown (the transaction branch has not been started or has already been
- ended) then the server MUST raise an exception.
- </doc>
- </exception>
-
- </field>
-
- <field name="timeout" type="uint32" label="Dtx timeout in seconds" required="true">
- <doc>
- The transaction timeout value in seconds.
- </doc>
- </field>
- </command>
-
- </class>
-
- <!-- == Class: exchange ====================================================================== -->
-
- <class name="exchange" code="0x7" label="work with exchanges">
- <doc>
- Exchanges match and distribute messages across queues. Exchanges can be configured in the
- server or created at runtime.
- </doc>
-
- <doc type="grammar">
- exchange = C:DECLARE
- / C:DELETE
- / C:QUERY
- </doc>
-
- <rule name="required-types">
- <doc>
- The server MUST implement these standard exchange types: fanout, direct.
- </doc>
- <doc type="scenario">
- Client attempts to declare an exchange with each of these standard types.
- </doc>
- </rule>
-
- <rule name="recommended-types">
- <doc>
- The server SHOULD implement these standard exchange types: topic, headers.
- </doc>
- <doc type="scenario">
- Client attempts to declare an exchange with each of these standard types.
- </doc>
- </rule>
-
- <rule name="required-instances">
- <doc>
- The server MUST, in each virtual host, pre-declare an exchange instance for each standard
- exchange type that it implements, where the name of the exchange instance, if defined, is
- "amq." followed by the exchange type name.
-
- The server MUST, in each virtual host, pre-declare at least two direct exchange instances:
- one named "amq.direct", the other with no public name that serves as a default exchange for
- publish commands (such as message.transfer).
- </doc>
- <doc type="scenario">
- Client creates a temporary queue and attempts to bind to each required exchange instance
- ("amq.fanout", "amq.direct", "amq.topic", and "amq.headers" if those types are defined).
- </doc>
- </rule>
-
- <rule name="default-exchange">
- <doc>
- The server MUST pre-declare a direct exchange with no public name to act as the default
- exchange for content publish commands (such as message.transfer) and for default queue
- bindings.
- </doc>
- <doc type="scenario">
- Client checks that the default exchange is active by publishing a message with a suitable
- routing key but without specifying the exchange name, then ensuring that the message arrives
- in the queue correctly.
- </doc>
- </rule>
-
- <rule name="default-access">
- <doc>
- The default exchange MUST NOT be accessible to the client except by specifying an empty
- exchange name in a content publish command (such as message.transfer). That is, the server
- must not let clients explicitly bind, unbind, delete, or make any other reference to this
- exchange.
- </doc>
- </rule>
-
- <rule name="extensions">
- <doc>
- The server MAY implement other exchange types as wanted.
- </doc>
- </rule>
-
- <role name="server" implement="MUST" />
- <role name="client" implement="MUST" />
-
- <domain name="name" type="str8" label="exchange name">
- <doc>
- The exchange name is a client-selected string that identifies the exchange for publish
- commands. Exchange names may consist of any mixture of digits, letters, and underscores.
- Exchange names are scoped by the virtual host.
- </doc>
- </domain>
-
- <!-- - Command: exchange.declare - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="declare" code="0x1" label="verify exchange exists, create if needed">
- <doc>
- This command creates an exchange if it does not already exist, and if the exchange exists,
- verifies that it is of the correct and expected class.
- </doc>
-
- <rule name="minimum">
- <doc>
- The server SHOULD support a minimum of 16 exchanges per virtual host and ideally, impose
- no limit except as defined by available resources.
- </doc>
- <doc type="scenario">
- The client creates as many exchanges as it can until the server reports an error; the
- number of exchanges successfully created must be at least sixteen.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
-
- <field name="exchange" type="name" required="true">
- <exception name="reserved-names" error-code="not-allowed">
- <doc>
- Exchange names starting with "amq." are reserved for pre-declared and standardized
- exchanges. The client MUST NOT attempt to create an exchange starting with "amq.".
- </doc>
- </exception>
-
- <exception name="exchange-name-required" error-code="invalid-argument">
- <doc>
- The name of the exchange MUST NOT be a blank or empty string.
- </doc>
- </exception>
- </field>
-
- <field name="type" type="str8" label="exchange type" required="true">
- <doc>
- Each exchange belongs to one of a set of exchange types implemented by the server. The
- exchange types define the functionality of the exchange - i.e. how messages are routed
- through it. It is not valid or meaningful to attempt to change the type of an existing
- exchange.
- </doc>
-
- <exception name="typed" error-code="not-allowed">
- <doc>
- Exchanges cannot be redeclared with different types. The client MUST NOT attempt to
- redeclare an existing exchange with a different type than used in the original
- exchange.declare command.
- </doc>
- </exception>
-
- <exception name="exchange-type-not-found" error-code="not-found">
- <doc>
- If the client attempts to create an exchange which the server does not recognize, an
- exception MUST be sent.
- </doc>
- </exception>
- </field>
-
- <field name="alternate-exchange" type="name" label= "exchange name for unroutable messages">
- <doc>
- In the event that a message cannot be routed, this is the name of the exchange to which
- the message will be sent. Messages transferred using message.transfer will be routed to
- the alternate-exchange only if they are sent with the "none" accept-mode, and the
- discard-unroutable delivery property is set to false, and there is no queue to route to
- for the given message according to the bindings on this exchange.
- </doc>
-
- <rule name="empty-name">
- <doc>
- If alternate-exchange is not set (its name is an empty string), unroutable messages
- that would be sent to the alternate-exchange MUST be dropped silently.
- </doc>
- </rule>
-
- <exception name="pre-existing-exchange" error-code="not-allowed">
- <doc>
- If the alternate-exchange is not empty and if the exchange already exists with a
- different alternate-exchange, then the declaration MUST result in an exception.
- </doc>
- </exception>
-
- <rule name="double-failure">
- <doc>
- A message which is being routed to a alternate exchange, MUST NOT be re-routed to a
- secondary alternate exchange if it fails to route in the primary alternate exchange.
- After such a failure, the message MUST be dropped. This prevents looping.
- </doc>
- </rule>
- </field>
-
- <field name="passive" type="bit" label="do not create exchange">
- <doc>
- If set, the server will not create the exchange. The client can use this to check whether
- an exchange exists without modifying the server state.
- </doc>
- <exception name="not-found" error-code="not-found">
- <doc>
- If set, and the exchange does not already exist, the server MUST raise an exception.
- </doc>
- </exception>
- </field>
-
- <field name="durable" type="bit" label="request a durable exchange">
- <doc>
- If set when creating a new exchange, the exchange will be marked as durable. Durable
- exchanges remain active when a server restarts. Non-durable exchanges (transient
- exchanges) are purged if/when a server restarts.
- </doc>
-
- <rule name="support">
- <doc>
- The server MUST support both durable and transient exchanges.
- </doc>
- </rule>
-
- <rule name="sticky">
- <doc>
- The server MUST ignore the durable field if the exchange already exists.
- </doc>
- </rule>
- </field>
-
- <field name="auto-delete" type="bit" label="auto-delete when unused">
- <doc>
- If set, the exchange is deleted automatically when there remain no bindings between the
- exchange and any queue. Such an exchange will not be automatically deleted until at least
- one binding has been made to prevent the immediate deletion of the exchange upon creation.
- </doc>
- <rule name="sticky">
- <doc>
- The server MUST ignore the auto-delete field if the exchange already exists.
- </doc>
- </rule>
- </field>
-
- <field name="arguments" type="map" label="arguments for declaration">
- <doc>
- A set of arguments for the declaration. The syntax and semantics of these arguments
- depends on the server implementation. This field is ignored if passive is 1.
- </doc>
-
- <exception name="unknown-argument" error-code="not-implemented">
- <doc>
- If the arguments field contains arguments which are not understood by the server,
- it MUST raise an exception.
- </doc>
- </exception>
- </field>
- </command>
-
- <!-- - Command: exchange.delete - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="delete" code="0x2" label="delete an exchange">
- <doc>
- This command deletes an exchange. When an exchange is deleted all queue bindings on the
- exchange are cancelled.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="exchange" type="name" required="true">
- <exception name="exists" error-code="not-found">
- <doc>
- The client MUST NOT attempt to delete an exchange that does not exist.
- </doc>
- </exception>
-
- <exception name="exchange-name-required" error-code="invalid-argument">
- <doc>
- The name of the exchange MUST NOT be a missing or empty string.
- </doc>
- </exception>
-
- <exception name="used-as-alternate" error-code="not-allowed">
- <doc>
- An exchange MUST NOT be deleted if it is in use as an alternate-exchange by a queue or
- by another exchange.
- </doc>
- </exception>
-
- </field>
-
- <field name="if-unused" type="bit" label="delete only if unused">
- <doc>
- If set, the server will only delete the exchange if it has no queue bindings. If the
- exchange has queue bindings the server does not delete it but raises an exception
- instead.
- </doc>
- <exception name="exchange-in-use" error-code="precondition-failed">
- <doc>
- If the exchange has queue bindings, and the if-unused flag is set, the server MUST NOT
- delete the exchange, but MUST raise and exception.
- </doc>
- </exception>
- </field>
- </command>
-
- <!-- - Command: exchange.query - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="query" code="0x3" label="request information about an exchange">
- <doc>
- This command is used to request information on a particular exchange.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="name" type="str8" label="the exchange name">
- <doc>
- The name of the exchange for which information is requested. If not specified explicitly
- the default exchange is implied.
- </doc>
- </field>
-
- <result>
- <struct name="exchange-query-result" size="4" code="0x1" pack="2">
- <doc>
- This is sent in response to a query request and conveys information on a particular
- exchange.
- </doc>
-
- <field name="type" type="str8" label="indicate the exchange type">
- <doc>
- The type of the exchange. Will be empty if the exchange is not found.
- </doc>
- </field>
-
- <field name="durable" type="bit" label="indicate the durability">
- <doc>
- The durability of the exchange, i.e. if set the exchange is durable. Will not be set
- if the exchange is not found.
- </doc>
- </field>
-
- <field name="not-found" type="bit" label="indicate an unknown exchange">
- <doc>
- If set, the exchange for which information was requested is not known.
- </doc>
- </field>
-
- <field name="arguments" type="map" label="other unspecified exchange properties">
- <doc>
- A set of properties of the exchange whose syntax and semantics depends on the server
- implementation. Will be empty if the exchange is not found.
- </doc>
- </field>
- </struct>
- </result>
- </command>
-
- <!-- - Command: exchange.bind - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="bind" code="0x4" label="bind queue to an exchange">
- <doc> This command binds a queue to an exchange. Until a queue is bound it will not receive
- any messages. In a classic messaging model, store-and-forward queues are bound to a direct
- exchange and subscription queues are bound to a topic exchange. </doc>
-
- <rule name="duplicates">
- <doc>
- A server MUST ignore duplicate bindings - that is, two or more bind commands with the
- same exchange, queue, and binding-key - without treating these as an error. The value of
- the arguments used for the binding MUST NOT be altered by subsequent binding requests.
- </doc>
- <doc type="scenario">
- A client binds a named queue to an exchange. The client then repeats the bind (with
- identical exchange, queue, and binding-key). The second binding should use a different
- value for the arguments field.
- </doc>
- </rule>
-
- <rule name="durable-exchange">
- <doc> Bindings between durable queues and durable exchanges are automatically durable and
- the server MUST restore such bindings after a server restart. </doc>
- <doc type="scenario"> A server creates a named durable queue and binds it to a durable
- exchange. The server is restarted. The client then attempts to use the queue/exchange
- combination. </doc>
- </rule>
-
- <rule name="binding-count">
- <doc> The server SHOULD support at least 4 bindings per queue, and ideally, impose no limit
- except as defined by available resources. </doc>
- <doc type="scenario"> A client creates a named queue and attempts to bind it to 4 different
- exchanges. </doc>
- </rule>
-
- <rule name="multiple-bindings">
- <doc> Where more than one binding exists between a particular exchange instance and a
- particular queue instance any given message published to that exchange should be delivered
- to that queue at most once, regardless of how many distinct bindings match. </doc>
- <doc type="scenario"> A client creates a named queue and binds it to the same topic exchange
- at least three times using intersecting binding-keys (for example, "animals.*",
- "animals.dogs.*", "animal.dogs.chihuahua"). Verify that a message matching all the
- bindings (using previous example, routing key = "animal.dogs.chihuahua") is delivered once
- only. </doc>
- </rule>
-
- <implement role="server" handle="MUST"/>
-
- <field name="queue" type="queue.name" required="true">
- <doc> Specifies the name of the queue to bind. </doc>
-
- <exception name="empty-queue" error-code="invalid-argument">
- <doc> A client MUST NOT be allowed to bind a non-existent and unnamed queue (i.e. empty
- queue name) to an exchange. </doc>
- <doc type="scenario"> A client attempts to bind with an unnamed (empty) queue name to an
- exchange. </doc>
- </exception>
-
- <exception name="queue-existence" error-code="not-found">
- <doc> A client MUST NOT be allowed to bind a non-existent queue (i.e. not previously
- declared) to an exchange. </doc>
- <doc type="scenario"> A client attempts to bind an undeclared queue name to an exchange.
- </doc>
- </exception>
- </field>
-
- <field name="exchange" type="name" label="name of the exchange to bind to" required="true">
- <exception name="exchange-existence" error-code="not-found">
- <doc> A client MUST NOT be allowed to bind a queue to a non-existent exchange. </doc>
- <doc type="scenario"> A client attempts to bind a named queue to a undeclared exchange.
- </doc>
- </exception>
-
- <exception name="exchange-name-required" error-code="invalid-argument">
- <doc> The name of the exchange MUST NOT be a blank or empty string. </doc>
- </exception>
- </field>
-
- <field name="binding-key" type="str8"
- label="identifies a binding between a given exchange and queue" required="true">
- <doc> The binding-key uniquely identifies a binding between a given (exchange, queue) pair.
- Depending on the exchange configuration, the binding key may be matched against the
- message routing key in order to make routing decisions. The match algorithm depends on the
- exchange type. Some exchange types may ignore the binding key when making routing
- decisions. Refer to the specific exchange type documentation. The meaning of an empty
- binding key depends on the exchange implementation. </doc>
- </field>
-
- <field name="arguments" type="map" label="arguments for binding">
- <doc> A set of arguments for the binding. The syntax and semantics of these arguments
- depends on the exchange class. </doc>
-
- <exception name="unknown-argument" error-code="not-implemented">
- <doc> If the arguments field contains arguments which are not understood by the server, it
- MUST raise an exception. </doc>
- </exception>
- </field>
- </command>
-
- <!-- - Command: exchange.unbind - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="unbind" code="0x5" label="unbind a queue from an exchange">
- <doc>
- This command unbinds a queue from an exchange.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="queue" type="queue.name" required="true">
- <doc>
- Specifies the name of the queue to unbind.
- </doc>
- <exception name="non-existent-queue" error-code="not-found">
- <doc>
- If the queue does not exist the server MUST raise an exception.
- </doc>
- </exception>
- </field>
-
- <field name="exchange" type="name" required="true">
- <doc>
- The name of the exchange to unbind from.
- </doc>
-
- <exception name="non-existent-exchange" error-code="not-found">
- <doc>
- If the exchange does not exist the server MUST raise an exception.
- </doc>
- </exception>
-
- <exception name="exchange-name-required" error-code="invalid-argument">
- <doc>
- The name of the exchange MUST NOT be a blank or empty string.
- </doc>
- </exception>
- </field>
-
- <field name="binding-key" type="str8" label="the key of the binding" required="true">
- <doc>
- Specifies the binding-key of the binding to unbind.
- </doc>
-
- <exception name="non-existent-binding-key" error-code="not-found">
- <doc>
- If there is no matching binding-key the server MUST raise an exception.
- </doc>
- </exception>
- </field>
- </command>
-
- <!-- - Command: exchange.bound - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="bound" code="0x6" label="request information about bindings to an exchange">
- <doc>
- This command is used to request information on the bindings to a particular exchange.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="exchange" type="str8" label="the exchange name">
- <doc>
- The name of the exchange for which binding information is being requested. If not
- specified explicitly the default exchange is implied.
- </doc>
- </field>
-
- <field name="queue" type="str8" label="a queue name" required="true">
- <doc>
- If populated then determine whether the given queue is bound to the exchange.
- </doc>
- </field>
-
- <field name="binding-key" type="str8" label="a binding-key">
- <doc>
- If populated defines the binding-key of the binding of interest, if not populated the
- request will ignore the binding-key on bindings when searching for a match.
- </doc>
- </field>
-
- <field name="arguments" type="map" label="a set of binding arguments">
- <doc>
- If populated defines the arguments of the binding of interest if not populated the request
- will ignore the arguments on bindings when searching for a match
- </doc>
- </field>
-
- <result>
- <struct name="exchange-bound-result" size="4" code="0x2" pack="2">
- <field name="exchange-not-found" type="bit" label="indicate an unknown exchange">
- <doc>
- If set, the exchange for which information was requested is not known.
- </doc>
- </field>
-
- <field name="queue-not-found" type="bit" label="indicate an unknown queue">
- <doc>
- If set, the queue specified is not known.
- </doc>
- </field>
-
- <field name="queue-not-matched" type="bit" label="indicate no matching queue">
- <doc>
- A bit which if set indicates that no binding was found from the specified exchange to
- the specified queue.
- </doc>
- </field>
-
- <field name="key-not-matched" type="bit" label="indicate no matching binding-key">
- <doc>
- A bit which if set indicates that no binding was found from the specified exchange
- with the specified binding-key.
- </doc>
- </field>
-
- <field name="args-not-matched" type="bit" label="indicate no matching arguments">
- <doc>
- A bit which if set indicates that no binding was found from the specified exchange
- with the specified arguments.
- </doc>
- </field>
- </struct>
- </result>
- </command>
-
- </class>
-
- <!-- == Class: queue ========================================================================= -->
-
- <class name="queue" code="0x8" label="work with queues">
- <doc>
- Queues store and forward messages. Queues can be configured in the server or created at
- runtime. Queues must be attached to at least one exchange in order to receive messages from
- publishers.
- </doc>
-
- <doc type="grammar">
- queue = C:DECLARE
- / C:BIND
- / C:PURGE
- / C:DELETE
- / C:QUERY
- / C:UNBIND
- </doc>
-
- <rule name="any-content">
- <doc>
- A server MUST allow any content class to be sent to any queue, in any mix, and queue and
- deliver these content classes independently. Note that all commands that fetch content off
- queues are specific to a given content class.
- </doc>
- <doc type="scenario">
- Client creates an exchange of each standard type and several queues that it binds to each
- exchange. It must then successfully send each of the standard content types to each of the
- available queues.
- </doc>
- </rule>
-
- <role name="server" implement="MUST" />
- <role name="client" implement="MUST" />
-
- <domain name="name" type="str8" label="queue name">
- <doc>
- The queue name identifies the queue within the virtual host. Queue names must have a length
- of between 1 and 255 characters inclusive, must start with a digit, letter or underscores
- ('_') character, and must be otherwise encoded in UTF-8.
- </doc>
- </domain>
-
- <!-- - Command: queue.declare - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="declare" code="0x1" label="declare queue">
- <doc>
- This command creates or checks a queue. When creating a new queue the client can specify
- various properties that control the durability of the queue and its contents, and the level
- of sharing for the queue.
- </doc>
-
- <rule name="default-binding">
- <doc>
- The server MUST create a default binding for a newly-created queue to the default
- exchange, which is an exchange of type 'direct' and use the queue name as the binding-key.
- </doc>
- <doc type="scenario">
- Client creates a new queue, and then without explicitly binding it to an exchange,
- attempts to send a message through the default exchange binding, i.e. publish a message to
- the empty exchange, with the queue name as binding-key.
- </doc>
- </rule>
-
- <rule name="minimum-queues">
- <doc>
- The server SHOULD support a minimum of 256 queues per virtual host and ideally, impose no
- limit except as defined by available resources.
- </doc>
- <doc type="scenario">
- Client attempts to create as many queues as it can until the server reports an error. The
- resulting count must at least be 256.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
-
- <field name="queue" type="name" required="true">
- <exception name="reserved-prefix" error-code="not-allowed">
- <doc>
- Queue names starting with "amq." are reserved for pre-declared and standardized server
- queues. A client MUST NOT attempt to declare a queue with a name that starts with "amq."
- and the passive option set to zero.
- </doc>
- <doc type="scenario">
- A client attempts to create a queue with a name starting with "amq." and with the
- passive option set to zero.
- </doc>
- </exception>
- </field>
-
- <field name="alternate-exchange" type="exchange.name"
- label= "exchange name for messages with exceptions">
- <doc>
- The alternate-exchange field specifies how messages on this queue should be treated when
- they are rejected by a subscriber, or when they are orphaned by queue deletion. When
- present, rejected or orphaned messages MUST be routed to the alternate-exchange. In all
- cases the messages MUST be removed from the queue.
- </doc>
-
- <exception name="pre-existing-exchange" error-code="not-allowed">
- <doc>
- If the alternate-exchange is not empty and if the queue already exists with a different
- alternate-exchange, then the declaration MUST result in an exception.
- </doc>
- </exception>
-
- <exception name="unknown-exchange" error-code="not-found">
- <doc>
- if the alternate-exchange does not match the name of any existing exchange on the
- server, then an exception must be raised.
- </doc>
- </exception>
- </field>
-
- <field name="passive" type="bit" label="do not create queue">
- <doc>
- If set, the server will not create the queue. This field allows the client to assert the
- presence of a queue without modifying the server state.
- </doc>
-
- <exception name="passive" error-code="not-found">
- <doc>
- The client MAY ask the server to assert that a queue exists without creating the queue
- if not. If the queue does not exist, the server treats this as a failure.
- </doc>
- <doc type="scenario">
- Client declares an existing queue with the passive option and expects the command to
- succeed. Client then attempts to declare a non-existent queue with the passive option,
- and the server must close the session with the correct exception.
- </doc>
- </exception>
- </field>
-
- <field name="durable" type="bit" label="request a durable queue">
- <doc>
- If set when creating a new queue, the queue will be marked as durable. Durable queues
- remain active when a server restarts. Non-durable queues (transient queues) are purged
- if/when a server restarts. Note that durable queues do not necessarily hold persistent
- messages, although it does not make sense to send persistent messages to a transient
- queue.
- </doc>
-
- <rule name="persistence">
- <doc>
- The queue definition MUST survive the server losing all transient memory, e.g. a
- machine restart.
- </doc>
- <doc type="scenario">
- Client creates a durable queue; server is then restarted. Client then attempts to send
- message to the queue. The message should be successfully delivered.
- </doc>
- </rule>
-
- <rule name="types">
- <doc>
- The server MUST support both durable and transient queues.
- </doc>
- <doc type="scenario">
- A client creates two named queues, one durable and one transient.
- </doc>
- </rule>
-
- <rule name="pre-existence">
- <doc>
- The server MUST ignore the durable field if the queue already exists.
- </doc>
- <doc type="scenario">
- A client creates two named queues, one durable and one transient. The client then
- attempts to declare the two queues using the same names again, but reversing the value
- of the durable flag in each case. Verify that the queues still exist with the original
- durable flag values.
- </doc>
- </rule>
- </field>
-
- <field name="exclusive" type="bit" label="request an exclusive queue">
- <doc>
- Exclusive queues can only be used from one session at a time. Once a session
- declares an exclusive queue, that queue cannot be used by any other session until the
- declaring session closes.
- </doc>
-
- <rule name="types">
- <doc>
- The server MUST support both exclusive (private) and non-exclusive (shared) queues.
- </doc>
- <doc type="scenario">
- A client creates two named queues, one exclusive and one non-exclusive.
- </doc>
- </rule>
-
- <exception name="in-use" error-code="resource-locked">
- <doc>
- If the server receives a declare, bind, consume or get request for a queue that has been
- declared as exclusive by an existing client session, it MUST raise an exception.
- </doc>
- <doc type="scenario">
- A client declares an exclusive named queue. A second client on a different session
- attempts to declare a queue of the same name.
- </doc>
- </exception>
- </field>
-
- <field name="auto-delete" type="bit" label="auto-delete queue when unused">
- <doc>
- If this field is set and the exclusive field is also set, then the queue MUST be deleted
- when the session closes.
-
- If this field is set and the exclusive field is not set the queue is deleted when all
- the consumers have finished using it. Last consumer can be cancelled either explicitly
- or because its session is closed. If there was no consumer ever on the queue, it won't
- be deleted.
- </doc>
-
- <rule name="pre-existence">
- <doc>
- The server MUST ignore the auto-delete field if the queue already exists.
- </doc>
- <doc type="scenario">
- A client creates two named queues, one as auto-delete and one explicit-delete. The
- client then attempts to declare the two queues using the same names again, but reversing
- the value of the auto-delete field in each case. Verify that the queues still exist with
- the original auto-delete flag values.
- </doc>
- </rule>
- </field>
-
- <field name="arguments" type="map" label="arguments for declaration">
- <doc>
- A set of arguments for the declaration. The syntax and semantics of these arguments
- depends on the server implementation. This field is ignored if passive is 1.
- </doc>
-
- <exception name="unknown-argument" error-code="not-implemented">
- <doc>
- If the arguments field contains arguments which are not understood by the server,
- it MUST raise an exception.
- </doc>
- </exception>
- </field>
- </command>
-
- <!-- - Command: queue.delete - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="delete" code="0x2" label="delete a queue">
- <doc>
- This command deletes a queue. When a queue is deleted any pending messages are sent to the
- alternate-exchange if defined, or discarded if it is not.
- </doc>
-
-
- <implement role="server" handle="MUST" />
-
- <field name="queue" type="name" required="true">
- <doc>
- Specifies the name of the queue to delete.
- </doc>
-
- <exception name="empty-name" error-code="invalid-argument">
- <doc>
- If the queue name in this command is empty, the server MUST raise an exception.
- </doc>
- </exception>
-
- <exception name="queue-exists" error-code="not-found">
- <doc>
- The queue must exist. If the client attempts to delete a non-existing queue the server
- MUST raise an exception.
- </doc>
- </exception>
- </field>
-
- <field name="if-unused" type="bit" label="delete only if unused">
- <doc>
- If set, the server will only delete the queue if it has no consumers. If the queue has
- consumers the server does does not delete it but raises an exception instead.
- </doc>
-
- <exception name="if-unused-flag" error-code="precondition-failed">
- <doc>
- The server MUST respect the if-unused flag when deleting a queue.
- </doc>
- </exception>
- </field>
-
- <field name="if-empty" type="bit" label="delete only if empty">
- <doc>
- If set, the server will only delete the queue if it has no messages.
- </doc>
- <exception name="not-empty" error-code="precondition-failed">
- <doc>
- If the queue is not empty the server MUST raise an exception.
- </doc>
- </exception>
- </field>
- </command>
-
- <!-- - Command: queue.purge - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="purge" code="0x3" label="purge a queue">
- <doc>
- This command removes all messages from a queue. It does not cancel subscribers. Purged
- messages are deleted without any formal "undo" mechanism.
- </doc>
-
- <rule name="empty">
- <doc>
- A call to purge MUST result in an empty queue.
- </doc>
- </rule>
-
- <rule name="pending-messages">
- <doc>
- The server MUST NOT purge messages that have already been sent to a client but not yet
- accepted.
- </doc>
- </rule>
-
- <rule name="purge-recovery">
- <doc>
- The server MAY implement a purge queue or log that allows system administrators to recover
- accidentally-purged messages. The server SHOULD NOT keep purged messages in the same
- storage spaces as the live messages since the volumes of purged messages may get very
- large.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
-
- <field name="queue" type="name" required="true">
- <doc>
- Specifies the name of the queue to purge.
- </doc>
-
- <exception name="empty-name" error-code="invalid-argument">
- <doc>
- If the the queue name in this command is empty, the server MUST raise an exception.
- </doc>
- </exception>
-
- <exception name="queue-exists" error-code="not-found">
- <doc>
- The queue MUST exist. Attempting to purge a non-existing queue MUST cause an exception.
- </doc>
- </exception>
- </field>
- </command>
-
- <!-- - Command: queue.query - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="query" code="0x4" label="request information about a queue">
- <doc>
- This command requests information about a queue.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="queue" type="name" label="the queried queue" required="true"/>
-
- <result>
- <struct name="queue-query-result" size="4" code="0x1" pack="2">
- <doc>
- This is sent in response to queue.query, and conveys the requested information about a
- queue. If no queue with the specified name exists then none of the fields within the
- returned result struct will be populated.
- </doc>
-
- <field name="queue" type="name" required="true">
- <doc>
- Reports the name of the queue.
- </doc>
- </field>
-
- <field name="alternate-exchange" type="exchange.name" />
-
- <field name="durable" type="bit" />
-
- <field name="exclusive" type="bit" />
-
- <field name="auto-delete" type="bit" />
-
- <field name="arguments" type="map" />
-
- <field name="message-count" type="uint32" label="number of messages in queue"
- required="true">
- <doc> Reports the number of messages in the queue. </doc>
- </field>
-
- <field name="subscriber-count" type="uint32" label="number of subscribers"
- required="true">
- <doc>
- Reports the number of subscribers for the queue.
- </doc>
- </field>
- </struct>
- </result>
- </command>
-
- </class>
-
- <!-- == Class: file ========================================================================== -->
-
- <class name="file" code="0x9" label="work with file content">
- <doc>
- The file class provides commands that support reliable file transfer. File messages have a
- specific set of properties that are required for interoperability with file transfer
- applications. File messages and acknowledgements are subject to session transactions. Note
- that the file class does not provide message browsing commands; these are not compatible with
- the staging model. Applications that need browsable file transfer should use Message content
- and the Message class.
- </doc>
-
- <doc type="grammar">
- file = C:QOS S:QOS-OK
- / C:CONSUME S:CONSUME-OK
- / C:CANCEL
- / C:OPEN S:OPEN-OK C:STAGE content
- / S:OPEN C:OPEN-OK S:STAGE content
- / C:PUBLISH
- / S:DELIVER
- / S:RETURN
- / C:ACK
- / C:REJECT
- </doc>
-
- <rule name="reliable-storage">
- <doc>
- The server MUST make a best-effort to hold file messages on a reliable storage mechanism.
- </doc>
- </rule>
-
- <rule name="no-discard">
- <doc>
- The server MUST NOT discard a file message in case of a queue overflow. The server MUST use
- the Session.Flow command to slow or stop a file message publisher when necessary.
- </doc>
- </rule>
-
- <rule name="priority-levels">
- <doc>
- The server MUST implement at least 2 priority levels for file messages, where priorities 0-4
- and 5-9 are treated as two distinct levels. The server MAY implement up to 10 priority
- levels.
- </doc>
- </rule>
-
- <rule name="acknowledgement-support">
- <doc>
- The server MUST support both automatic and explicit acknowledgements on file content.
- </doc>
- </rule>
-
- <role name="server" implement="MAY" />
- <role name="client" implement="MAY" />
-
- <!-- These are the properties for a File content -->
- <struct name="file-properties" size="4" code="0x1" pack="2">
- <field name="content-type" type="str8" label="MIME content type" />
- <field name="content-encoding" type="str8" label="MIME content encoding" />
- <field name="headers" type="map" label="message header field table" />
- <field name="priority" type="uint8" label="message priority, 0 to 9" />
- <field name="reply-to" type="str8" label="destination to reply to" />
- <field name="message-id" type="str8" label="application message identifier" />
- <field name="filename" type="str8" label="message filename" />
- <field name="timestamp" type="datetime" label="message timestamp" />
- <!-- This field is deprecated pending review -->
- <field name="cluster-id" type="str8" label="intra-cluster routing identifier" />
- </struct>
-
- <domain name="return-code" type="uint16" label="return code from server">
- <doc>
- The return code. The AMQP return codes are defined by this enum.
- </doc>
- <enum>
- <choice name="content-too-large" value="311">
- <doc>
- The client attempted to transfer content larger than the server could accept.
- </doc>
- </choice>
-
- <choice name="no-route" value="312">
- <doc>
- The exchange cannot route a message, most likely due to an invalid routing key. Only
- when the mandatory flag is set.
- </doc>
- </choice>
-
- <choice name="no-consumers" value="313">
- <doc>
- The exchange cannot deliver to a consumer when the immediate flag is set. As a result of
- pending data on the queue or the absence of any consumers of the queue.
- </doc>
- </choice>
- </enum>
- </domain>
-
- <!-- - Command: file.qos - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="qos" code="0x1" label="specify quality of service">
- <doc>
- This command requests a specific quality of service. The QoS can be specified for the
- current session or for all sessions on the connection. The particular properties and
- semantics of a qos command always depend on the content class semantics. Though the qos
- command could in principle apply to both peers, it is currently meaningful only for the
- server.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <response name="qos-ok" />
-
- <field name="prefetch-size" type="uint32" label="pre-fetch window in octets">
- <doc>
- The client can request that messages be sent in advance so that when the client finishes
- processing a message, the following message is already held locally, rather than needing
- to be sent within the session. Pre-fetching gives a performance improvement. This field
- specifies the pre-fetch window size in octets. May be set to zero, meaning "no specific
- limit". Note that other pre-fetch limits may still apply. The prefetch-size is ignored if
- the no-ack option is set.
- </doc>
- </field>
-
- <field name="prefetch-count" type="uint16" label="pre-fetch window in messages">
- <doc>
- Specifies a pre-fetch window in terms of whole messages. This is compatible with some file
- API implementations. This field may be used in combination with the prefetch-size field; a
- message will only be sent in advance if both pre-fetch windows (and those at the session
- and connection level) allow it. The prefetch-count is ignored if the no-ack option is set.
- </doc>
-
- <rule name="prefetch-discretion">
- <doc>
- The server MAY send less data in advance than allowed by the client's specified
- pre-fetch windows but it MUST NOT send more.
- </doc>
- </rule>
- </field>
-
- <field name="global" type="bit" label="apply to entire connection">
- <doc>
- By default the QoS settings apply to the current session only. If this field is set, they
- are applied to the entire connection.
- </doc>
- </field>
- </command>
-
- <!-- - Command: file.qos-ok - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="qos-ok" code="0x2" label="confirm the requested qos">
- <doc>
- This command tells the client that the requested QoS levels could be handled by the server.
- The requested QoS applies to all active consumers until a new QoS is defined.
- </doc>
-
- <implement role="client" handle="MUST" />
- </command>
-
- <!-- - Command: file.consume - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="consume" code="0x3" label="start a queue consumer">
- <doc>
- This command asks the server to start a "consumer", which is a transient request for
- messages from a specific queue. Consumers last as long as the session they were created on,
- or until the client cancels them.
- </doc>
-
- <rule name="min-consumers">
- <doc>
- The server SHOULD support at least 16 consumers per queue, unless the queue was declared
- as private, and ideally, impose no limit except as defined by available resources.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
-
- <response name="consume-ok" />
-
- <field name="queue" type="queue.name">
- <doc>
- Specifies the name of the queue to consume from.
- </doc>
-
- <exception name="queue-exists-if-empty" error-code="not-allowed">
- <doc>
- If the queue name in this command is empty, the server MUST raise an exception.
- </doc>
- </exception>
- </field>
-
- <field name="consumer-tag" type="str8">
- <doc>
- Specifies the identifier for the consumer. The consumer tag is local to a connection, so
- two clients can use the same consumer tags.
- </doc>
-
- <exception name="not-existing-consumer" error-code="not-allowed">
- <doc>
- The tag MUST NOT refer to an existing consumer. If the client attempts to create two
- consumers with the same non-empty tag the server MUST raise an exception.
- </doc>
- </exception>
-
- <exception name="not-empty-consumer-tag" error-code="not-allowed">
- <doc>
- The client MUST NOT specify a tag that is empty or blank.
- </doc>
- <doc type="scenario">
- Attempt to create a consumers with an empty tag.
- </doc>
- </exception>
- </field>
-
- <field name="no-local" type="bit">
- <doc>If the no-local field is set the server will not send messages to the connection that
- published them.</doc>
- </field>
-
- <field name="no-ack" type="bit" label="no acknowledgement needed">
- <doc>
- If this field is set the server does not expect acknowledgements for messages. That is,
- when a message is delivered to the client the server automatically and silently
- acknowledges it on behalf of the client. This functionality increases performance but at
- the cost of reliability. Messages can get lost if a client dies before it can deliver them
- to the application.
- </doc>
- </field>
-
- <field name="exclusive" type="bit" label="request exclusive access">
- <doc>
- Request exclusive consumer access, meaning only this consumer can access the queue.
- </doc>
-
- <exception name="in-use" error-code="resource-locked">
- <doc>
- If the server cannot grant exclusive access to the queue when asked, - because there are
- other consumers active - it MUST raise an exception.
- </doc>
- </exception>
- </field>
-
- <field name="nowait" type="bit" label="do not send a reply command">
- <doc>
- If set, the server will not respond to the command. The client should not wait for a reply
- command. If the server could not complete the command it will raise an exception.
- </doc>
- </field>
-
- <field name="arguments" type="map" label="arguments for consuming">
- <doc>
- A set of arguments for the consume. The syntax and semantics of these arguments depends on
- the providers implementation.
- </doc>
- </field>
- </command>
-
- <command name="consume-ok" code="0x4" label="confirm a new consumer">
- <doc>
- This command provides the client with a consumer tag which it MUST use in commands that work
- with the consumer.
- </doc>
-
- <implement role="client" handle="MUST" />
-
- <field name="consumer-tag" type="str8">
- <doc>
- Holds the consumer tag specified by the client or provided by the server.
- </doc>
- </field>
- </command>
-
- <!-- - Command: file.cancel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="cancel" code="0x5" label="end a queue consumer">
- <doc>
- This command cancels a consumer. This does not affect already delivered messages, but it
- does mean the server will not send any more messages for that consumer.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="consumer-tag" type="str8">
- <doc>
- the identifier of the consumer to be cancelled.
- </doc>
- </field>
- </command>
-
- <!-- - Command: file.open - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="open" code="0x6" label="request to start staging">
- <doc>
- This command requests permission to start staging a message. Staging means sending the
- message into a temporary area at the recipient end and then delivering the message by
- referring to this temporary area. Staging is how the protocol handles partial file transfers
- - if a message is partially staged and the connection breaks, the next time the sender
- starts to stage it, it can restart from where it left off.
- </doc>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MUST" />
-
- <response name="open-ok" />
-
- <field name="identifier" type="str8" label="staging identifier">
- <doc>
- This is the staging identifier. This is an arbitrary string chosen by the sender. For
- staging to work correctly the sender must use the same staging identifier when staging the
- same message a second time after recovery from a failure. A good choice for the staging
- identifier would be the SHA1 hash of the message properties data (including the original
- filename, revised time, etc.).
- </doc>
- </field>
-
- <field name="content-size" type="uint64" label="message content size">
- <doc>
- The size of the content in octets. The recipient may use this information to allocate or
- check available space in advance, to avoid "disk full" errors during staging of very large
- messages.
- </doc>
-
- <rule name="content-size">
- <doc>
- The sender MUST accurately fill the content-size field. Zero-length content is
- permitted.
- </doc>
- </rule>
- </field>
- </command>
-
- <!-- - Command: file.open-ok - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="open-ok" code="0x7" label="confirm staging ready">
- <doc>
- This command confirms that the recipient is ready to accept staged data. If the message was
- already partially-staged at a previous time the recipient will report the number of octets
- already staged.
- </doc>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MUST" />
-
- <response name="stage" />
-
- <field name="staged-size" type="uint64" label="already staged amount">
- <doc>
- The amount of previously-staged content in octets. For a new message this will be zero.
- </doc>
-
- <rule name="behavior">
- <doc>
- The sender MUST start sending data from this octet offset in the message, counting from
- zero.
- </doc>
- </rule>
-
- <rule name="staging">
- <doc>
- The recipient MAY decide how long to hold partially-staged content and MAY implement
- staging by always discarding partially-staged content. However if it uses the file
- content type it MUST support the staging commands.
- </doc>
- </rule>
- </field>
- </command>
-
- <!-- - Command: file.stage - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="stage" code="0x8" label="stage message content">
- <doc>
- This command stages the message, sending the message content to the recipient from the octet
- offset specified in the Open-Ok command.
- </doc>
-
- <implement role="server" handle="MUST" />
- <implement role="client" handle="MUST" />
-
- <segments>
- <header required="true">
- <entry type="file-properties"/>
- </header>
- <body/>
- </segments>
- </command>
-
- <!-- - Command: file.publish - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="publish" code="0x9" label="publish a message">
- <doc>
- This command publishes a staged file message to a specific exchange. The file message will
- be routed to queues as defined by the exchange configuration and distributed to any active
- consumers when the transaction, if any, is committed.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="exchange" type="exchange.name">
- <doc>
- Specifies the name of the exchange to publish to. The exchange name can be empty, meaning
- the default exchange. If the exchange name is specified, and that exchange does not exist,
- the server will raise an exception.
- </doc>
-
- <rule name="default">
- <doc>
- The server MUST accept a blank exchange name to mean the default exchange.
- </doc>
- </rule>
-
- <exception name="refusal" error-code="not-implemented">
- <doc>
- The exchange MAY refuse file content in which case it MUST send an exception.
- </doc>
- </exception>
- </field>
-
- <field name="routing-key" type="str8" label="Message routing key">
- <doc>
- Specifies the routing key for the message. The routing key is used for routing messages
- depending on the exchange configuration.
- </doc>
- </field>
-
- <field name="mandatory" type="bit" label="indicate mandatory routing">
- <doc>
- This flag tells the server how to react if the message cannot be routed to a queue. If
- this flag is set, the server will return an unroutable message with a Return command. If
- this flag is zero, the server silently drops the message.
- </doc>
-
- <rule name="implementation">
- <doc>
- The server SHOULD implement the mandatory flag.
- </doc>
- </rule>
- </field>
-
- <field name="immediate" type="bit" label="request immediate delivery">
- <doc>
- This flag tells the server how to react if the message cannot be routed to a queue
- consumer immediately. If this flag is set, the server will return an undeliverable message
- with a Return command. If this flag is zero, the server will queue the message, but with
- no guarantee that it will ever be consumed.
- </doc>
-
- <rule name="implementation">
- <doc>
- The server SHOULD implement the immediate flag.
- </doc>
- </rule>
- </field>
-
- <field name="identifier" type="str8" label="staging identifier">
- <doc>
- This is the staging identifier of the message to publish. The message must have been
- staged. Note that a client can send the Publish command asynchronously without waiting for
- staging to finish.
- </doc>
- </field>
- </command>
-
- <!-- - Command: file.return - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="return" code="0xa" label="return a failed message">
- <doc>
- This command returns an undeliverable message that was published with the "immediate" flag
- set, or an unroutable message published with the "mandatory" flag set. The reply code and
- text provide information about the reason that the message was undeliverable.
- </doc>
-
- <implement role="client" handle="MUST" />
-
- <field name="reply-code" type="return-code" />
-
- <field name="reply-text" type="str8" label="The localized reply text.">
- <doc>
- This text can be logged as an aid to resolving issues.
- </doc>
- </field>
-
- <field name="exchange" type="exchange.name">
- <doc>
- Specifies the name of the exchange that the message was originally published to.
- </doc>
- </field>
-
- <field name="routing-key" type="str8" label="Message routing key">
- <doc>
- Specifies the routing key name specified when the message was published.
- </doc>
- </field>
-
- <segments>
- <header required="true">
- <entry type="file-properties"/>
- </header>
- <body/>
- </segments>
- </command>
-
- <!-- - Command: file.deliver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="deliver" code="0xb" label="notify the client of a consumer message">
- <doc>
- This command delivers a staged file message to the client, via a consumer. In the
- asynchronous message delivery model, the client starts a consumer using the consume command,
- then the server responds with Deliver commands as and when messages arrive for that
- consumer.
- </doc>
-
- <rule name="redelivery-tracking">
- <doc>
- The server SHOULD track the number of times a message has been delivered to clients and
- when a message is redelivered a certain number of times - e.g. 5 times - without being
- acknowledged, the server SHOULD consider the message to be non-processable (possibly
- causing client applications to abort), and move the message to a dead letter queue.
- </doc>
- </rule>
-
- <implement role="client" handle="MUST" />
-
- <field name="consumer-tag" type="str8" />
-
- <field name="delivery-tag" type="uint64" >
- <doc>
- The server-assigned and session-specific delivery tag
- </doc>
-
- <rule name="non-zero">
- <doc>
- The server MUST NOT use a zero value for delivery tags. Zero is reserved for client use,
- meaning "all messages so far received".
- </doc>
- </rule>
- </field>
-
- <field name="redelivered" type="bit" label="Indicate possible duplicate delivery">
- <doc>
- This boolean flag indicates that the message may have been previously delivered to this
- or another client.
- </doc>
- </field>
-
- <field name="exchange" type="exchange.name">
- <doc>
- Specifies the name of the exchange that the message was originally published to.
- </doc>
- </field>
-
- <field name="routing-key" type="str8" label="Message routing key">
- <doc>
- Specifies the routing key name specified when the message was published.
- </doc>
- </field>
-
- <field name="identifier" type="str8" label="staging identifier">
- <doc>
- This is the staging identifier of the message to deliver. The message must have been
- staged. Note that a server can send the Deliver command asynchronously without waiting for
- staging to finish.
- </doc>
- </field>
- </command>
-
- <!-- - Command: file.ack - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="ack" code="0xc" label="acknowledge one or more messages">
- <doc>
- This command acknowledges one or more messages delivered via the Deliver command. The client
- can ask to confirm a single message or a set of messages up to and including a specific
- message.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="delivery-tag" type="uint64" >
- <doc>
- The identifier of the message being acknowledged
- </doc>
- <rule name="session-local">
- <doc>
- The delivery tag is valid only within the session from which the message was received.
- i.e. A client MUST NOT receive a message on one session and then acknowledge it on
- another.
- </doc>
- </rule>
- </field>
-
- <field name="multiple" type="bit" label="acknowledge multiple messages">
- <doc>
- If set to 1, the delivery tag is treated as "up to and including", so that the client can
- acknowledge multiple messages with a single command. If set to zero, the delivery tag
- refers to a single message. If the multiple field is 1, and the delivery tag is zero,
- tells the server to acknowledge all outstanding messages.
- </doc>
-
- <rule name="validation">
- <doc>
- The server MUST validate that a non-zero delivery-tag refers to an delivered message,
- and raise an exception if this is not the case.
- </doc>
- </rule>
- </field>
- </command>
-
- <!-- - Command: file.reject - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="reject" code="0xd" label="reject an incoming message">
- <doc>
- This command allows a client to reject a message. It can be used to return untreatable
- messages to their original queue. Note that file content is staged before delivery, so the
- client will not use this command to interrupt delivery of a large message.
- </doc>
-
- <rule name="server-interpretation">
- <doc>
- The server SHOULD interpret this command as meaning that the client is unable to process
- the message at this time.
- </doc>
- </rule>
-
- <rule name="not-selection">
- <doc>
- A client MUST NOT use this command as a means of selecting messages to process. A rejected
- message MAY be discarded or dead-lettered, not necessarily passed to another client.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
-
- <field name="delivery-tag" type="uint64">
- <doc>
- the identifier of the message to be rejected
- </doc>
- <rule name="session-local">
- <doc>
- The delivery tag is valid only within the session from which the message was received.
- i.e. A client MUST NOT receive a message on one session and then reject it on another.
- </doc>
- </rule>
- </field>
-
- <field name="requeue" type="bit" label="requeue the message">
- <doc>
- If this field is zero, the message will be discarded. If this bit is 1, the server will
- attempt to requeue the message.
- </doc>
-
- <rule name="requeue-strategy">
- <doc>
- The server MUST NOT deliver the message to the same client within the context of the
- current session. The recommended strategy is to attempt to deliver the message to an
- alternative consumer, and if that is not possible, to move the message to a dead-letter
- queue. The server MAY use more sophisticated tracking to hold the message on the queue
- and redeliver it to the same client at a later stage.
- </doc>
- </rule>
- </field>
- </command>
-
- </class>
-
- <!-- == Class: stream ======================================================================== -->
-
- <class name="stream" code="0xa" label="work with streaming content">
- <doc>
- The stream class provides commands that support multimedia streaming. The stream class uses
- the following semantics: one message is one packet of data; delivery is unacknowledged and
- unreliable; the consumer can specify quality of service parameters that the server can try to
- adhere to; lower-priority messages may be discarded in favor of high priority messages.
- </doc>
-
- <doc type="grammar">
- stream = C:QOS S:QOS-OK
- / C:CONSUME S:CONSUME-OK
- / C:CANCEL
- / C:PUBLISH content
- / S:RETURN
- / S:DELIVER content
- </doc>
-
- <rule name="overflow-discard">
- <doc>
- The server SHOULD discard stream messages on a priority basis if the queue size exceeds some
- configured limit.
- </doc>
- </rule>
-
- <rule name="priority-levels">
- <doc>
- The server MUST implement at least 2 priority levels for stream messages, where priorities
- 0-4 and 5-9 are treated as two distinct levels. The server MAY implement up to 10 priority
- levels.
- </doc>
- </rule>
-
- <rule name="acknowledgement-support">
- <doc>
- The server MUST implement automatic acknowledgements on stream content. That is, as soon as
- a message is delivered to a client via a Deliver command, the server must remove it from the
- queue.
- </doc>
- </rule>
-
- <role name="server" implement="MAY" />
- <role name="client" implement="MAY" />
-
- <!-- These are the properties for a Stream content -->
- <struct name="stream-properties" size="4" code="0x1" pack="2">
- <field name="content-type" type="str8" label="MIME content type" />
- <field name="content-encoding" type="str8" label="MIME content encoding" />
- <field name="headers" type="map" label="message header field table" />
- <field name="priority" type="uint8" label="message priority, 0 to 9" />
- <field name="timestamp" type="datetime" label="message timestamp" />
- </struct>
-
- <domain name="return-code" type="uint16" label="return code from server">
- <doc>
- The return code. The AMQP return codes are defined by this enum.
- </doc>
- <enum>
- <choice name="content-too-large" value="311">
- <doc>
- The client attempted to transfer content larger than the server could accept.
- </doc>
- </choice>
-
- <choice name="no-route" value="312">
- <doc>
- The exchange cannot route a message, most likely due to an invalid routing key. Only
- when the mandatory flag is set.
- </doc>
- </choice>
-
- <choice name="no-consumers" value="313">
- <doc>
- The exchange cannot deliver to a consumer when the immediate flag is set. As a result of
- pending data on the queue or the absence of any consumers of the queue.
- </doc>
- </choice>
- </enum>
- </domain>
-
- <!-- - Command: stream.qos - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="qos" code="0x1" label="specify quality of service">
- <doc>
- This command requests a specific quality of service. The QoS can be specified for the
- current session or for all sessions on the connection. The particular properties and
- semantics of a qos command always depend on the content class semantics. Though the qos
- command could in principle apply to both peers, it is currently meaningful only for the
- server.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <response name="qos-ok" />
-
- <field name="prefetch-size" type="uint32" label="pre-fetch window in octets">
- <doc>
- The client can request that messages be sent in advance so that when the client finishes
- processing a message, the following message is already held locally, rather than needing
- to be sent within the session. Pre-fetching gives a performance improvement. This field
- specifies the pre-fetch window size in octets. May be set to zero, meaning "no specific
- limit". Note that other pre-fetch limits may still apply.
- </doc>
- </field>
-
- <field name="prefetch-count" type="uint16" label="pre-fetch window in messages">
- <doc>
- Specifies a pre-fetch window in terms of whole messages. This field may be used in
- combination with the prefetch-size field; a message will only be sent in advance if both
- pre-fetch windows (and those at the session and connection level) allow it.
- </doc>
- </field>
-
- <field name="consume-rate" type="uint32" label="transfer rate in octets/second">
- <doc>
- Specifies a desired transfer rate in octets per second. This is usually determined by the
- application that uses the streaming data. A value of zero means "no limit", i.e. as
- rapidly as possible.
- </doc>
-
- <rule name="ignore-prefetch">
- <doc>
- The server MAY ignore the pre-fetch values and consume rates, depending on the type of
- stream and the ability of the server to queue and/or reply it.
- </doc>
- </rule>
-
- <rule name="drop-by-priority">
- <doc>
- The server MAY drop low-priority messages in favor of high-priority messages.
- </doc>
- </rule>
- </field>
-
- <field name="global" type="bit" label="apply to entire connection">
- <doc>
- By default the QoS settings apply to the current session only. If this field is set, they
- are applied to the entire connection.
- </doc>
- </field>
- </command>
-
- <!-- - Command: stream.qos-ok - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="qos-ok" code="0x2" label="confirm the requested qos">
- <doc>
- This command tells the client that the requested QoS levels could be handled by the server.
- The requested QoS applies to all active consumers until a new QoS is defined.
- </doc>
-
- <implement role="client" handle="MUST" />
- </command>
-
- <!-- - Command: stream.consume - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="consume" code="0x3" label="start a queue consumer">
- <doc>
- This command asks the server to start a "consumer", which is a transient request for
- messages from a specific queue. Consumers last as long as the session they were created on,
- or until the client cancels them.
- </doc>
-
- <rule name="min-consumers">
- <doc>
- The server SHOULD support at least 16 consumers per queue, unless the queue was declared
- as private, and ideally, impose no limit except as defined by available resources.
- </doc>
- </rule>
-
- <rule name="priority-based-delivery">
- <doc>
- Streaming applications SHOULD use different sessions to select different streaming
- resolutions. AMQP makes no provision for filtering and/or transforming streams except on
- the basis of priority-based selective delivery of individual messages.
- </doc>
- </rule>
-
- <implement role="server" handle="MUST" />
-
- <response name="consume-ok" />
-
- <field name="queue" type="queue.name">
- <doc>
- Specifies the name of the queue to consume from.
- </doc>
-
- <exception name="queue-exists-if-empty" error-code="not-allowed">
- <doc>
- If the queue name in this command is empty, the server MUST raise an exception.
- </doc>
- </exception>
- </field>
-
- <field name="consumer-tag" type="str8">
- <doc>
- Specifies the identifier for the consumer. The consumer tag is local to a connection, so
- two clients can use the same consumer tags.
- </doc>
-
- <exception name="not-existing-consumer" error-code="not-allowed">
- <doc>
- The tag MUST NOT refer to an existing consumer. If the client attempts to create two
- consumers with the same non-empty tag the server MUST raise an exception.
- </doc>
- </exception>
-
- <exception name="not-empty-consumer-tag" error-code="not-allowed">
- <doc>
- The client MUST NOT specify a tag that is empty or blank.
- </doc>
- <doc type="scenario">
- Attempt to create a consumers with an empty tag.
- </doc>
- </exception>
- </field>
-
- <field name="no-local" type="bit">
- <doc>If the no-local field is set the server will not send messages to the connection that
- published them.</doc>
- </field>
-
- <field name="exclusive" type="bit" label="request exclusive access">
- <doc>
- Request exclusive consumer access, meaning only this consumer can access the queue.
- </doc>
-
- <exception name="in-use" error-code="resource-locked">
- <doc>
- If the server cannot grant exclusive access to the queue when asked, - because there are
- other consumers active - it MUST raise an exception with return code 405
- (resource locked).
- </doc>
- </exception>
- </field>
-
- <field name="nowait" type="bit" label="do not send a reply command">
- <doc>
- If set, the server will not respond to the command. The client should not wait for a reply
- command. If the server could not complete the command it will raise an exception.
- </doc>
- </field>
-
- <field name="arguments" type="map" label="arguments for consuming">
- <doc>
- A set of arguments for the consume. The syntax and semantics of these arguments depends on
- the providers implementation.
- </doc>
- </field>
- </command>
-
- <!-- - Command: stream.consume-ok - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="consume-ok" code="0x4" label="confirm a new consumer">
- <doc>
- This command provides the client with a consumer tag which it may use in commands that work
- with the consumer.
- </doc>
-
- <implement role="client" handle="MUST" />
-
- <field name="consumer-tag" type="str8">
- <doc>
- Holds the consumer tag specified by the client or provided by the server.
- </doc>
- </field>
- </command>
-
- <!-- - Command: stream.cancel - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="cancel" code="0x5" label="end a queue consumer">
- <doc>
- This command cancels a consumer. Since message delivery is asynchronous the client may
- continue to receive messages for a short while after cancelling a consumer. It may process
- or discard these as appropriate.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="consumer-tag" type="str8" />
- </command>
-
- <!-- - Command: stream.publish - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="publish" code="0x6" label="publish a message">
- <doc>
- This command publishes a message to a specific exchange. The message will be routed to
- queues as defined by the exchange configuration and distributed to any active consumers as
- appropriate.
- </doc>
-
- <implement role="server" handle="MUST" />
-
- <field name="exchange" type="exchange.name">
- <doc>
- Specifies the name of the exchange to publish to. The exchange name can be empty, meaning
- the default exchange. If the exchange name is specified, and that exchange does not exist,
- the server will raise an exception.
- </doc>
-
- <rule name="default">
- <doc>
- The server MUST accept a blank exchange name to mean the default exchange.
- </doc>
- </rule>
-
- <exception name="refusal" error-code="not-implemented">
- <doc>
- The exchange MAY refuse stream content in which case it MUST respond with an exception.
- </doc>
- </exception>
- </field>
-
- <field name="routing-key" type="str8" label="Message routing key">
- <doc>
- Specifies the routing key for the message. The routing key is used for routing messages
- depending on the exchange configuration.
- </doc>
- </field>
-
- <field name="mandatory" type="bit" label="indicate mandatory routing">
- <doc>
- This flag tells the server how to react if the message cannot be routed to a queue. If
- this flag is set, the server will return an unroutable message with a Return command. If
- this flag is zero, the server silently drops the message.
- </doc>
-
- <rule name="implementation">
- <doc>
- The server SHOULD implement the mandatory flag.
- </doc>
- </rule>
- </field>
-
- <field name="immediate" type="bit" label="request immediate delivery">
- <doc>
- This flag tells the server how to react if the message cannot be routed to a queue
- consumer immediately. If this flag is set, the server will return an undeliverable message
- with a Return command. If this flag is zero, the server will queue the message, but with
- no guarantee that it will ever be consumed.
- </doc>
-
- <rule name="implementation">
- <doc>
- The server SHOULD implement the immediate flag.
- </doc>
- </rule>
- </field>
-
- <segments>
- <header required="true">
- <entry type="stream-properties"/>
- </header>
- <body/>
- </segments>
- </command>
-
- <!-- - Command: stream.return - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="return" code="0x7" label="return a failed message">
- <doc>
- This command returns an undeliverable message that was published with the "immediate" flag
- set, or an unroutable message published with the "mandatory" flag set. The reply code and
- text provide information about the reason that the message was undeliverable.
- </doc>
-
- <implement role="client" handle="MUST" />
-
- <field name="reply-code" type="return-code" />
-
- <field name="reply-text" type="str8" label="The localized reply text.">
- <doc>
- The localized reply text. This text can be logged as an aid to resolving issues.
- </doc>
- </field>
-
- <field name="exchange" type="exchange.name">
- <doc>
- Specifies the name of the exchange that the message was originally published to.
- </doc>
- </field>
-
- <field name="routing-key" type="str8" label="Message routing key">
- <doc>
- Specifies the routing key name specified when the message was published.
- </doc>
- </field>
-
- <segments>
- <header required="true">
- <entry type="stream-properties"/>
- </header>
- <body/>
- </segments>
- </command>
-
- <!-- - Command: stream.deliver - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
- <command name="deliver" code="0x8" label="notify the client of a consumer message">
- <doc>
- This command delivers a message to the client, via a consumer. In the asynchronous message
- delivery model, the client starts a consumer using the Consume command, then the server
- responds with Deliver commands as and when messages arrive for that consumer.
- </doc>
-
- <implement role="client" handle="MUST" />
-
- <field name="consumer-tag" type="str8" />
-
- <field name="delivery-tag" type="uint64">
- <doc>
- The server-assigned and session-specific delivery tag
- </doc>
- <rule name="session-local">
- <doc>
- The delivery tag is valid only within the session from which the message was received.
- i.e. A client MUST NOT receive a message on one session and then acknowledge it on
- another.
- </doc>
- </rule>
- </field>
-
- <field name="exchange" type="exchange.name">
- <doc>
- Specifies the name of the exchange that the message was originally published to.
- </doc>
- </field>
-
- <field name="queue" type="queue.name" required="true">
- <doc>
- Specifies the name of the queue that the message came from. Note that a single session can
- start many consumers on different queues.
- </doc>
- </field>
-
- <segments>
- <header required="true">
- <entry type="stream-properties"/>
- </header>
- <body/>
- </segments>
- </command>
-
- </class>
-
-</amqp>
diff --git a/qpid/ruby/lib/qpid/specs/amqp.0-10.dtd b/qpid/ruby/lib/qpid/specs/amqp.0-10.dtd
deleted file mode 100644
index 2be198525a..0000000000
--- a/qpid/ruby/lib/qpid/specs/amqp.0-10.dtd
+++ /dev/null
@@ -1,246 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- Copyright Notice
- ================
- (c) Copyright Cisco Systems, Credit Suisse, Deutsche Börse Systems, Envoy Technologies, Inc.,
- Goldman Sachs, IONA Technologies PLC, iMatix Corporation sprl.,JPMorgan Chase Bank Inc. N.A,
- Novell, Rabbit Technologies Ltd., Red Hat, Inc., TWIST Process Innovations ltd, and 29West Inc
- 2006, 2007. All rights reserved.
-
- License
- =======
- JPMorgan Chase Bank & Co., Cisco Systems, Inc., Envoy Technologies Inc., iMatix Corporation, IONA
- Technologies, Red Hat, Inc., TWIST Process Innovations, and 29West Inc. (collectively, the
- "Authors") each hereby grants to you a worldwide, perpetual, royalty-free, nontransferable,
- nonexclusive license to (i) copy, display, distribute and implement the Advanced Messaging Queue
- Protocol ("AMQP") Specification and (ii) the Licensed Claims that are held by the Authors, all for
- the purpose of implementing the Advanced Messaging Queue Protocol Specification. Your license and
- any rights under this Agreement will terminate immediately without notice from any Author if you
- bring any claim, suit, demand, or action related to the Advanced Messaging Queue Protocol
- Specification against any Author. Upon termination, you shall destroy all copies of the Advanced
- Messaging Queue Protocol Specification in your possession or control.
-
- As used hereunder, "Licensed Claims" means those claims of a patent or patent application,
- throughout the world, excluding design patents and design registrations, owned or controlled, or
- that can be sublicensed without fee and in compliance with the requirements of this Agreement, by
- an Author or its affiliates now or at any future time and which would necessarily be infringed by
- implementation of the Advanced Messaging Queue Protocol Specification. A claim is necessarily
- infringed hereunder only when it is not possible to avoid infringing it because there is no
- plausible non-infringing alternative for implementing the required portions of the Advanced
- Messaging Queue Protocol Specification. Notwithstanding the foregoing, Licensed Claims shall not
- include any claims other than as set forth above even if contained in the same patent as Licensed
- Claims; or that read solely on any implementations of any portion of the Advanced Messaging Queue
- Protocol Specification that are not required by the Advanced Messaging Queue Protocol
- Specification, or that, if licensed, would require a payment of royalties by the licensor to
- unaffiliated third parties. Moreover, Licensed Claims shall not include (i) any enabling
- technologies that may be necessary to make or use any Licensed Product but are not themselves
- expressly set forth in the Advanced Messaging Queue Protocol Specification (e.g., semiconductor
- manufacturing technology, compiler technology, object oriented technology, networking technology,
- operating system technology, and the like); or (ii) the implementation of other published
- standards developed elsewhere and merely referred to in the body of the Advanced Messaging Queue
- Protocol Specification, or (iii) any Licensed Product and any combinations thereof the purpose or
- function of which is not required for compliance with the Advanced Messaging Queue Protocol
- Specification. For purposes of this definition, the Advanced Messaging Queue Protocol
- Specification shall be deemed to include both architectural and interconnection requirements
- essential for interoperability and may also include supporting source code artifacts where such
- architectural, interconnection requirements and source code artifacts are expressly identified as
- being required or documentation to achieve compliance with the Advanced Messaging Queue Protocol
- Specification.
-
- As used hereunder, "Licensed Products" means only those specific portions of products (hardware,
- software or combinations thereof) that implement and are compliant with all relevant portions of
- the Advanced Messaging Queue Protocol Specification.
-
- The following disclaimers, which you hereby also acknowledge as to any use you may make of the
- Advanced Messaging Queue Protocol Specification:
-
- THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO
- REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS
- OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE
- IMPLEMENTATION OF THE ADVANCED MESSAGING QUEUE PROTOCOL SPECIFICATION WILL NOT INFRINGE ANY THIRD
- PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
-
- THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
- DAMAGES ARISING OUT OF OR RELATING TO ANY USE, IMPLEMENTATION OR OF THE ADVANCED
- MESSAGING QUEUE PROTOCOL SPECIFICATION.
-
- The name and trademarks of the Authors may NOT be used in any manner, including advertising or
- publicity pertaining to the Advanced Messaging Queue Protocol Specification or its contents
- without specific, written prior permission. Title to copyright in the Advanced Messaging Queue
- Protocol Specification will at all times remain with the Authors.
-
- No other rights are granted by implication, estoppel or otherwise.
-
- Upon termination of your license or rights under this Agreement, you shall destroy all copies of
- the Advanced Messaging Queue Protocol Specification in your possession or control.
-
- Trademarks
- ==========
- "JPMorgan", "JPMorgan Chase", "Chase", the JPMorgan Chase logo and the Octagon Symbol are
- trademarks of JPMorgan Chase & Co.
-
- IMATIX and the iMatix logo are trademarks of iMatix Corporation sprl.
-
- IONA, IONA Technologies, and the IONA logos are trademarks of IONA Technologies PLC and/or its
- subsidiaries.
-
- LINUX is a trademark of Linus Torvalds. RED HAT and JBOSS are registered trademarks of Red Hat,
- Inc. in the US and other countries.
-
- Java, all Java-based trademarks and OpenOffice.org are trademarks of Sun Microsystems, Inc. in the
- United States, other countries, or both.
-
- Other company, product, or service names may be trademarks or service marks of others.
-
- Links to full AMQP specification:
- =================================
- http://www.envoytech.org/spec/amq/
- http://www.iona.com/opensource/amqp/
- http://www.redhat.com/solutions/specifications/amqp/
- http://www.twiststandards.org/tiki-index.php?page=AMQ
- http://www.imatix.com/amqp
--->
-
-<!ELEMENT amqp (doc|type|struct|domain|constant|class)*>
-<!ATTLIST amqp
- xmlns CDATA #IMPLIED
- major CDATA #REQUIRED
- minor CDATA #REQUIRED
- port CDATA #REQUIRED
- comment CDATA #IMPLIED
->
-
-<!ELEMENT constant (doc|rule)*>
-<!ATTLIST constant
- name CDATA #REQUIRED
- value CDATA #REQUIRED
- label CDATA #IMPLIED
->
-
-<!ELEMENT type (doc|rule)*>
-<!ATTLIST type
- name CDATA #REQUIRED
- label CDATA #IMPLIED
- code CDATA #IMPLIED
- fixed-width CDATA #IMPLIED
- variable-width CDATA #IMPLIED
->
-
-<!ELEMENT domain (doc|rule|enum)*>
-<!ATTLIST domain
- name CDATA #REQUIRED
- type CDATA #IMPLIED
- label CDATA #IMPLIED
->
-
-<!ELEMENT struct (field|doc|rule)*>
-<!ATTLIST struct
- name CDATA #REQUIRED
- label CDATA #IMPLIED
- size (0|1|2|4) #IMPLIED
- pack (0|1|2|4) #IMPLIED
- code CDATA #IMPLIED>
-
-<!ELEMENT enum (choice)*>
-
-<!ELEMENT choice (doc|rule)*>
-<!ATTLIST choice
- name CDATA #REQUIRED
- value CDATA #REQUIRED
->
-
-<!ELEMENT class (doc|role|rule|struct|domain|control|command)*>
-<!ATTLIST class
- name CDATA #REQUIRED
- code CDATA #REQUIRED
- label CDATA #IMPLIED
->
-
-<!ELEMENT role (doc|rule)*>
-<!ATTLIST role
- name CDATA #REQUIRED
- implement (MAY|SHOULD|MUST) #REQUIRED
->
-
-<!ELEMENT control (doc|implement|rule|field|response)*>
-<!ATTLIST control
- name CDATA #REQUIRED
- code CDATA #REQUIRED
- label CDATA #IMPLIED
->
-
-<!ELEMENT command ((doc|implement|rule|exception|field|response)*, result?, segments?)>
-<!ATTLIST command
- name CDATA #REQUIRED
- code CDATA #REQUIRED
- label CDATA #IMPLIED
->
-
-<!ELEMENT implement (doc|rule)*>
-<!ATTLIST implement
- role CDATA #REQUIRED
- handle (MAY|SHOULD|MUST) #REQUIRED
- send (MAY|SHOULD|MUST) #IMPLIED
->
-
-<!ELEMENT field (doc|rule|exception)*>
-<!ATTLIST field
- name CDATA #REQUIRED
- type CDATA #IMPLIED
- default CDATA #IMPLIED
- code CDATA #IMPLIED
- label CDATA #IMPLIED
- required CDATA #IMPLIED
->
-
-<!ELEMENT rule (doc*)>
-<!ATTLIST rule
- name CDATA #REQUIRED
- label CDATA #IMPLIED
->
-
-<!ELEMENT exception (doc*)>
-<!ATTLIST exception
- name CDATA #REQUIRED
- error-code CDATA #IMPLIED
- label CDATA #IMPLIED
->
-
-<!ELEMENT response (doc|rule)*>
-<!ATTLIST response
- name CDATA #IMPLIED
->
-
-<!ELEMENT result (doc|rule|struct)*>
-<!ATTLIST result
- type CDATA #IMPLIED
->
-
-<!ELEMENT segments (doc|rule|header|body)*>
-
-<!ELEMENT header (doc|rule|entry)*>
-<!ATTLIST header
- required (true|false) #IMPLIED
->
-
-<!ELEMENT entry (doc|rule)*>
-<!ATTLIST entry
- type CDATA #REQUIRED
->
-
-<!ELEMENT body (doc|rule)*>
-<!ATTLIST body
- required (true|false) #IMPLIED
->
-
-<!ELEMENT doc (#PCDATA|xref)*>
-<!ATTLIST doc
- type (grammar|scenario|picture|bnf|todo) #IMPLIED
- title CDATA #IMPLIED
->
-
-<!ELEMENT xref (#PCDATA)>
-<!ATTLIST xref
- ref CDATA #REQUIRED>
diff --git a/qpid/ruby/lib/qpid/traverse.rb b/qpid/ruby/lib/qpid/traverse.rb
deleted file mode 100644
index 67358a7eb1..0000000000
--- a/qpid/ruby/lib/qpid/traverse.rb
+++ /dev/null
@@ -1,64 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-class Object
-
- public
-
- def traverse()
- traverse! {|o| yield(o); o}
- end
-
- def traverse_children!()
- instance_variables.each {|v|
- value = instance_variable_get(v)
- replacement = yield(value)
- instance_variable_set(v, replacement) unless replacement.equal? value
- }
- end
-
- def traverse!(replacements = {})
- return replacements[__id__] if replacements.has_key? __id__
- replacement = yield(self)
- replacements[__id__] = replacement
- traverse_children! {|o| o.traverse!(replacements) {|c| yield(c)}}
- return replacement
- end
-
-end
-
-class Array
- def traverse_children!()
- map! {|o| yield(o)}
- end
-end
-
-class Hash
- def traverse_children!()
- mods = {}
- each_pair {|k, v|
- key = yield(k)
- value = yield(v)
- mods[key] = value unless key.equal? k and value.equal? v
- delete(k) unless key.equal? k
- }
-
- merge!(mods)
- end
-end
diff --git a/qpid/ruby/lib/qpid/util.rb b/qpid/ruby/lib/qpid/util.rb
deleted file mode 100644
index 2dbc37da09..0000000000
--- a/qpid/ruby/lib/qpid/util.rb
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require 'thread'
-require 'monitor'
-
-# Monkeypatch
-class MonitorMixin::ConditionVariable
-
- # Wait until BLOCK returns TRUE or TIMEOUT seconds have passed
- # Return TRUE if BLOCK returned TRUE within the TIMEOUT, FALSE
- # otherswise
- def wait_for(timeout=nil, &block)
- start = Time.now
- passed = 0
- until yield
- if timeout.nil?
- wait
- elsif passed < timeout
- wait(timeout)
- else
- return false
- end
- passed = Time.now - start
- end
- return true
- end
-end
-
-module Qpid::Util
-
- # Similar to Python's threading.Event
- class Event
- def initialize
- @monitor = Monitor.new
- @cond = @monitor.new_cond
- @set = false
- end
-
- def set
- @monitor.synchronize do
- @set = true
- @cond.signal
- end
- end
-
- def clear
- @monitor.synchronize { @set = false }
- end
-
- def wait(timeout = nil)
- @monitor.synchronize do
- unless @set
- @cond.wait_for(timeout) { @set }
- end
- end
- end
- end
-end
diff --git a/qpid/ruby/tests/assembler.rb b/qpid/ruby/tests/assembler.rb
deleted file mode 100644
index 1181ece547..0000000000
--- a/qpid/ruby/tests/assembler.rb
+++ /dev/null
@@ -1,78 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "test/unit"
-require "qpid"
-require 'tests/util'
-
-require 'logger'
-
-class TestAssembler< Test::Unit::TestCase
-
- Segment = Qpid::Segment
- Assembler = Qpid::Assembler
-
- def setup
- # Qpid::asm_logger = Logger.new(STDOUT)
-
- @server = Util::ServerThread.new do |socket|
- asm = Assembler.new(socket)
- begin
- header = asm.read_header
- asm.write_header(header[-2], header[-1])
- loop do
- seg = asm.read_segment
- asm.write_segment(seg)
- end
- rescue Qpid::Closed
- nil # Ignore
- end
- end
- end
-
- def teardown
- @server.finish
- @server.join
- end
-
- def test_assembler
- asm = Assembler.new(@server.client, max_payload = 1)
- asm.write_header(0, 10)
- asm.write_segment(Segment.new(true, false, 1, 2, 3, "TEST"))
- asm.write_segment(Segment.new(false, true, 1, 2, 3, "ING"))
-
- assert_equal( ["AMQP", 1, 1, 0, 10], asm.read_header)
-
- seg = asm.read_segment
- assert_equal(true, seg.first_segment?)
- assert_equal(false, seg.last_segment?)
- assert_equal(1, seg.type)
- assert_equal(2, seg.track)
- assert_equal(3, seg.channel)
- assert_equal("TEST", seg.payload)
-
- seg = asm.read_segment
- assert_equal(false, seg.first_segment?)
- assert_equal(true, seg.last_segment?)
- assert_equal(1, seg.type)
- assert_equal(2, seg.track)
- assert_equal(3, seg.channel)
- assert_equal("ING", seg.payload)
- end
-end
diff --git a/qpid/ruby/tests/codec010.rb b/qpid/ruby/tests/codec010.rb
deleted file mode 100644
index a9a5ca81e0..0000000000
--- a/qpid/ruby/tests/codec010.rb
+++ /dev/null
@@ -1,122 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "test/unit"
-require "qpid"
-require "tests/util"
-require "socket"
-
-class CodecTest < Test::Unit::TestCase
-
- def setup
- @spec = Qpid::Spec010::load
- end
-
- def check(type, value)
- t = @spec[type]
- sc = Qpid::StringCodec.new(@spec)
- t.encode(sc, value)
- decoded = t.decode(sc)
- assert_equal(value, decoded)
- end
-
-
- def testMapString
- check("map", {"string" => "this is a test"})
- end
-
- def testMapInt
- check("map", {"int" => 3})
- end
-
- def testMapLong
- check("map", {"long" => 2**32})
- end
-
- def testMapNone
- check("map", {"none" => None})
- end
-
- def testMapNested
- check("map", {"map" => {"string" => "nested test"}})
- end
-
- def testMapList
- check("map", {"list" => [1, "two", 3.0, -4]})
- end
-
- def testMapAll
- check("map", {"string" => "this is a test",
- "int" => 3,
- "long" => 2**32,
- "nil" => nil,
- "map" => {"string" => "nested map"},
- "list" => [1, "two", 3.0, -4]})
- end
-
- def testMapEmpty
- check("map", {})
- end
-
- def testMapNone
- check("map", nil)
- end
-
- def testList
- check("list", [1, "two", 3.0, -4])
- end
-
- def testListEmpty
- check("list", [])
- end
-
- def testListNone
- check("list", nil)
- end
-
- def testArrayInt
- check("array", [1, 2, 3, 4])
- end
-
- def testArrayString
- check("array", ["one", "two", "three", "four"])
- end
-
- def testArrayEmpty
- check("array", [])
- end
-
- def testArrayNone
- check("array", nil)
- end
-
- def testInt64
- check("int64", 2 ** 40 * -1 + 43)
- end
-
- def testUint64
- check("int64", 2 ** 42)
- end
-
- def testReadNone
- sc = Qpid::StringCodec.new(@spec)
- # Python behaves this way
- assert_equal("", sc.read(nil))
- end
-end
diff --git a/qpid/ruby/tests/connection.rb b/qpid/ruby/tests/connection.rb
deleted file mode 100644
index c2a851ec0a..0000000000
--- a/qpid/ruby/tests/connection.rb
+++ /dev/null
@@ -1,246 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require 'test/unit'
-require 'qpid'
-require 'tests/util'
-
-class MockServer
-
- def initialize(queue)
- @queue = queue
- end
-
- def connection(conn, args={})
- return Qpid::Delegate::Server.new(conn, :delegate => method(:session))
- end
-
- def session(ssn, args={})
- ssn.auto_sync = false
- return MockSession.new(ssn, @queue)
- end
-end
-
-class MockSession < Qpid::Session::Delegate
-
- def initialize(session, queue)
- @session = session
- @queue = queue
- end
-
- def execution_sync(es)
- nil
- end
-
- def queue_query(qq)
- return qq.st_type.result.create(qq.queue)
- end
-
- def message_transfer(cmd, headers, body)
- if cmd.destination == "echo"
- m = Qpid::Message.new(body)
- m.headers = headers
- @session.message_transfer(cmd.destination, cmd.accept_mode,
- cmd.acquire_mode, m)
- elsif cmd.destination == "abort"
- @session.channel.connection.sock.close()
- else
- @queue.put([cmd, headers, body])
- end
- end
-
- def exchange_declare(ed)
- # do nothing
- end
-end
-
-class TestConnectionTest < Test::Unit::TestCase
-
- def setup
- # Make sure errors in threads lead to a noisy death of the test
- Thread.abort_on_exception = true
-
- @queue = Qpid::Queue.new
- @running = true
- ts = MockServer.new(@queue)
- @server = Util::ServerThread.new do |socket|
- conn = Qpid::Connection.new(socket, :delegate => ts.method(:connection))
- begin
- conn.start(5)
- rescue Qpid::Closed
- # Ignore
- end
- end
-
- class << @server
- def finish
- @running.lock
- client.close
- @sockets.each { |sock| sock.close unless sock.closed? }
- end
- end
-
- @server[:name] = 'server'
- Thread.current[:name] = 'test'
- end
-
- def teardown
- @server.finish
- @server.join
- end
-
- def connect
- sock = @server.client
- return Qpid::Connection.new(sock)
- end
-
- def test_basic
- c = connect
- c.start(10)
-
- ssn1 = c.session("test1", :timeout => 10)
- ssn2 = c.session("test2", :timeout => 10)
-
- assert_equal(c.sessions["test1"], ssn1)
- assert_equal(c.sessions["test2"], ssn2)
- assert_not_nil ssn1.channel
- assert_not_nil ssn2.channel
- assert(c.attached.values.include?(ssn1))
- assert(c.attached.values.include?(ssn2))
-
- ssn1.close(5)
-
- assert_nil(ssn1.channel)
- assert(! c.attached.values.include?(ssn1))
- assert(c.sessions.values.include?(ssn2))
-
- ssn2.close(5)
-
- assert_nil(ssn2.channel)
- assert(! c.attached.values.include?(ssn2))
- assert(! c.sessions.values.include?(ssn2))
-
- ssn = c.session("session", :timeout => 10)
-
- assert_not_nil(ssn.channel)
- assert(c.sessions.values.include?(ssn))
-
- destinations = ["one", "two", "three"]
-
- destinations.each { |d| ssn.message_transfer(d) }
-
- destinations.each do |d|
- cmd, header, body = @queue.get(10)
- assert_equal(d, cmd.destination)
- assert_nil(header)
- assert_nil(body)
- end
-
- msg = Qpid::Message.new("this is a test")
- ssn.message_transfer("four", :message => msg)
- cmd, header, body = @queue.get(10)
- assert_equal("four", cmd.destination)
- assert_nil(header)
- assert_equal(msg.body, body)
-
- qq = ssn.queue_query("asdf")
- assert_equal("asdf", qq.queue)
- c.close(5)
- end
-
- def test_close_get
- c = connect
- c.start(10)
- ssn = c.session("test", :timeout => 10)
- echos = ssn.incoming("echo")
-
- 10.times do |i|
- ssn.message_transfer("echo",
- :message => Qpid::Message.new("test#{i}"))
- end
-
- ssn.auto_sync=false
- ssn.message_transfer("abort")
-
- 10.times do |i|
- m = echos.get(timeout=10)
- assert_equal("test#{i}", m.body)
- end
-
- begin
- m = echos.get(timeout=10)
- flunk("Expected Closed")
- rescue Qpid::Closed
- # Ignore
- end
- end
-
- def test_close_listen
- c = connect
- c.start(10)
- ssn = c.session("test", :timeout => 10)
- echos = ssn.incoming("echo")
-
- messages = []
- exceptions = []
- lock = Monitor.new
- condition = lock.new_cond
-
- echos.exc_listen do |e|
- exceptions << e
- lock.synchronize { condition.signal }
- end
- echos.listen do |m|
- messages << m
- end
-
- 10.times do |i|
- ssn.message_transfer("echo",
- :message => Qpid::Message.new("test#{i}"))
- end
- ssn.auto_sync=false
- ssn.message_transfer("abort")
-
- lock.synchronize { condition.wait(10) }
-
- 10.times do |i|
- m = messages.shift
- assert_equal("test#{i}", m.body)
- end
-
- assert_equal(1, exceptions.size)
- end
-
- def test_sync
- c = connect
- c.start(10)
- s = c.session("test")
- s.auto_sync = false
- s.message_transfer("echo",
- :message => Qpid::Message.new("test"))
- s.sync(10)
- end
-
- def test_exchange_declare
- c = connect
- c.start(10)
- s = c.session("test")
- s.exchange_declare("test-exchange")
- end
-end
diff --git a/qpid/ruby/tests/datatypes.rb b/qpid/ruby/tests/datatypes.rb
deleted file mode 100644
index 65b1f9e3f5..0000000000
--- a/qpid/ruby/tests/datatypes.rb
+++ /dev/null
@@ -1,224 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require 'test/unit'
-require 'qpid'
-require 'tests/util'
-
-class TestSerial < Test::Unit::TestCase
-
- def test_cmp
- [0, 0x8FFFFFFF, 0xFFFFFFFF].each do |s|
- s = s.to_serial
- assert(s + 1 > s)
- assert(s - 1 < s)
- assert(s < s + 1)
- assert(s > s - 1)
- end
- last = 0xFFFFFFFF.to_serial
- zero = 0.to_serial
- assert_equal(zero, last + 1)
-
- assert_equal(last, [last, zero].min)
- assert_equal(zero, [last, zero].max)
- end
-
- def test_incr
- s = 0.to_serial
- s += 1
- assert_equal(1.to_serial, s)
- end
-
- def test_in
- l = [1, 2, 3, 4].collect { |i| i.to_serial }
- assert(l.include?(1.to_serial))
- assert(l.include?((0xFFFFFFFF + 2).to_serial))
- assert(l.include?(4))
- end
-
- def test_none
- assert_not_equal(nil, 0.to_serial)
- end
-
- def test_hash
- zero = 0.to_serial
- d = { zero => :zero }
- # FIXME: this does not work, since Ruby looks up the key and does
- # a 0.eql?(zero), which bypasses the Qpid::Serial::eql?
- # assert_equal(:zero, d[0])
- end
-end
-
-class TestRangedSet < Test::Unit::TestCase
-
- def assert_contains(rset, elts, nonelts = [])
- assert_equal(elts, elts.select { |e| rset.include?(e) })
- assert_equal(nonelts, nonelts.select { |e| ! rset.include?(e) })
- end
-
- def assert_ranges(rs, *ranges)
- assert_equal(ranges.size, rs.ranges.size)
- assert( ranges.all? { |rng| rs.include?(rng) } )
- end
-
- def test_simple
- rs = Qpid::RangedSet.new
-
- assert(rs.ranges.empty?)
-
- rs.add(1)
- assert_contains(rs, [1], [0,2])
- assert_ranges(rs, 1..1)
-
- rs.add(2)
- assert_contains(rs, [1,2], [0,3])
- assert_ranges(rs, 1..2)
-
- rs.add(0)
- assert_contains(rs, [0,1,2], [-1, 3])
- assert_ranges(rs, 0..2)
-
- rs.add(37)
- assert_contains(rs, [0,1,2,37], [-1, 3, 36, 38])
- assert_ranges(rs, 0..2, 37..37)
-
- rs.add(-1)
- assert_ranges(rs, -1..2, 37..37)
-
- rs.add(-3)
- assert_ranges(rs, -1..2, 37..37, -3..-3)
-
- rs.add(1, 20)
- assert_contains(rs, [20], [21])
- assert_ranges(rs, -1..20, 37..37, -3..-3)
-
- rs.add(21,36)
- assert_ranges(rs, -1..37, -3..-3)
-
- rs.add(-3, 5)
- assert_ranges(rs, -3..37)
- end
-
- def test_add_self
- a = Qpid::RangedSet.new
- a.add(0, 8)
- assert_ranges(a, 0..8)
-
- a.add(0, 8)
- assert_ranges(a, 0..8)
- end
-end
-
-class TestRange < Test::Unit::TestCase
-
- def test_intersect1
- a = Range.new(0, 10)
- b = Range.new(9, 20)
- i1 = a.intersect(b)
- i2 = b.intersect(a)
- assert_equal(9..10, i1)
- assert_equal(9..10, i2)
- end
-
- def test_intersect2
- a = Range.new(0, 10)
- b = Range.new(11, 20)
- assert_equal(nil, a.intersect(b))
- assert_equal(nil, b.intersect(a))
- end
-
- def test_intersect3
- a = Range.new(0, 10)
- b = Range.new(3, 5)
- i1 = a.intersect(b)
- i2 = b.intersect(a)
- assert_equal(3..5, i1)
- assert_equal(3..5, i2)
- end
-end
-
-class TestUUIDTest < Test::Unit::TestCase
-
- def test_simple
- # this test is kind of lame, but it does excercise the basic
- # functionality of the class
- u = Qpid::UUID::uuid4
- 1024.times { |i| assert_not_equal(u, Qpid::UUID::uuid4) }
- assert_raise NotImplementedError do
- u == 0
- end
- end
-end
-
-class TestMessage < Test::Unit::TestCase
-
- def setup
- @@spec ||= Qpid::Spec010::load()
- @mp = Qpid::struct(@@spec["message_properties"])
- @dp = Qpid::struct(@@spec["delivery_properties"])
- @fp = Qpid::struct(@@spec["fragment_properties"])
- end
-
- def test_has
- m = Qpid::Message.new(@mp, @dp, @fp, "body")
- assert m.has("message_properties")
- assert m.has("delivery_properties")
- assert m.has("fragment_properties")
- end
-
- def test_get
- m = Qpid::Message.new(@mp, @dp, @fp, "body")
- assert_same(@mp, m.get("message_properties"))
- assert_same(@dp, m.get("delivery_properties"))
- assert_same(@fp, m.get("fragment_properties"))
- end
-
- def test_set
- m = Qpid::Message.new(@mp, @dp, "body")
- assert_nil m.get("fragment_properties")
- m.set(@fp)
- assert_same(@fp, m.get("fragment_properties"), "4")
- end
-
- def test_set_on_empty
- m = Qpid::Message.new("body")
- assert_nil m.get("delivery_properties")
- m.set(@dp)
- assert_same(@dp, m.get("delivery_properties"), "5")
- end
-
- def test_set_replace
- m = Qpid::Message.new(@mp, @dp, @fp, "body")
- dp = Qpid::struct(@@spec["delivery_properties"])
- assert_same(@dp, m.get("delivery_properties"), "6")
- m.set(dp)
- assert_same(dp, m.get("delivery_properties"), "7")
- end
-
- def test_clear
- m = Qpid::Message.new(@mp, @dp, @fp, "body")
- assert_same(@mp, m.get("message_properties"), "8")
- assert_same(@dp, m.get("delivery_properties"), "9")
- assert_same(@fp, m.get("fragment_properties"), "10")
- m.clear("fragment_properties")
- assert_nil m.get("fragment_properties")
- assert_same(@mp, m.get("message_properties"), "11")
- assert_same(@dp, m.get("delivery_properties"), "12")
- end
-end
diff --git a/qpid/ruby/tests/framer.rb b/qpid/ruby/tests/framer.rb
deleted file mode 100644
index 1d56f2faf1..0000000000
--- a/qpid/ruby/tests/framer.rb
+++ /dev/null
@@ -1,99 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "test/unit"
-require "qpid"
-require 'tests/util'
-
-require 'logger'
-
-class TestFramer < Test::Unit::TestCase
-
- include Test
-
- def setup
- #Qpid::raw_logger = Logger.new(STDOUT)
- #Qpid::frm_logger = Logger.new(STDOUT)
-
- @server = Util::ServerThread.new do |socket|
- conn = Qpid::Framer.new(socket)
- begin
- h = conn.read_header
- conn.write_header(h[-2], h[-1])
- loop do
- frame = conn.read_frame
- conn.write_frame(frame)
- conn.flush
- end
- rescue Qpid::Closed
- nil # Ignore
- end
- end
- end
-
- def teardown
- @server.finish
- @server.join
- end
-
- Frame = Qpid::Frame
-
- def test_framer
- c = Qpid::Framer.new(@server.client)
-
- c.write_header(0, 10)
- assert_equal( ["AMQP", 1, 1, 0, 10], c.read_header())
-
- c.write_frame(Frame.new(Qpid::FIRST_FRM, 1, 2, 3, "THIS"))
- c.write_frame(Frame.new(0, 1, 2, 3, "IS"))
- c.write_frame(Frame.new(0, 1, 2, 3, "A"))
- c.write_frame(Frame.new(Qpid::LAST_FRM, 1, 2, 3, "TEST"))
- c.flush()
-
- f = c.read_frame
- assert(f.first_frame?)
- assert(! f.last_frame?)
- assert_equal(1, f.type)
- assert_equal(2, f.track)
- assert_equal(3, f.channel)
- assert_equal("THIS", f.payload)
-
- f = c.read_frame
- assert_equal(0, f.flags)
- assert_equal(1, f.type)
- assert_equal(2, f.track)
- assert_equal(3, f.channel)
- assert_equal("IS", f.payload)
-
- f = c.read_frame
- assert_equal(0, f.flags)
- assert_equal(1, f.type)
- assert_equal(2, f.track)
- assert_equal(3, f.channel)
- assert_equal("A", f.payload)
-
- f = c.read_frame
- assert(f.last_frame?)
- assert(! f.first_frame?)
- assert_equal(1, f.type)
- assert_equal(2, f.track)
- assert_equal(3, f.channel)
- assert_equal("TEST", f.payload)
- end
-end
diff --git a/qpid/ruby/tests/qmf.rb b/qpid/ruby/tests/qmf.rb
deleted file mode 100644
index 274e38416e..0000000000
--- a/qpid/ruby/tests/qmf.rb
+++ /dev/null
@@ -1,248 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "test/unit"
-require "qpid"
-require "tests/util"
-require "socket"
-require "monitor.rb"
-
-class QmfTest < Test::Unit::TestCase
-
- class Handler < Qpid::Qmf::Console
- include MonitorMixin
-
- def initialize
- super()
- @xmt_list = {}
- @rcv_list = {}
- end
-
- def method_response(broker, seq, response)
- synchronize do
- @rcv_list[seq] = response
- end
- end
-
- def request(broker, count)
- @count = count
- for idx in 0...count
- synchronize do
- seq = broker.echo(idx, "Echo Message", :async => true)
- @xmt_list[seq] = idx
- end
- end
- end
-
- def check
- return "fail (attempted send=%d, actual sent=%d)" % [@count, @xmt_list.size] unless @count == @xmt_list.size
- lost = 0
- mismatched = 0
- @xmt_list.each do |seq, value|
- if @rcv_list.include?(seq)
- result = @rcv_list.delete(seq)
- mismatch += 1 unless result.sequence == value
- else
- lost += 1
- end
- end
- spurious = @rcv_list.size
- if lost == 0 and mismatched == 0 and spurious == 0
- return "pass"
- else
- return "fail (lost=%d, mismatch=%d, spurious=%d)" % [lost, mismatched, spurious]
- end
- end
- end
-
- def setup()
- # Make sure errors in threads lead to a noisy death of the test
- Thread.abort_on_exception = true
-
- @host = ENV.fetch("QMF_TEST_HOST", 'localhost')
- @port = ENV.fetch("QMF_TEST_PORT", 5672)
-
- sock = TCPSocket.new(@host, @port)
-
- @conn = Qpid::Connection.new(sock)
- @conn.start()
-
- @session = @conn.session("test-session")
- end
-
- def teardown
- unless @session.error?
- @session.close(10)
- end
- @conn.close(10)
- if @qmf
- @qmf.del_broker(@qmf_broker)
- end
- end
-
- def start_qmf(kwargs = {})
- @qmf = Qpid::Qmf::Session.new(kwargs)
- @qmf_broker = @qmf.add_broker("amqp://%s:%d" % [@host, @port])
-
- brokers = @qmf.objects(:class => "broker")
- assert_equal(1, brokers.length)
- @broker = brokers[0]
- end
-
- def test_methods_sync()
- start_qmf
- body = "Echo Message Body"
- for seq in 1..10
- res = @broker.echo(seq, body, :timeout => 10)
- assert_equal(0, res.status)
- assert_equal("OK", res.text)
- assert_equal(seq, res.sequence)
- assert_equal(body, res.body)
- end
- end
-
- def test_methods_async()
- handler = Handler.new
- start_qmf(:console => handler)
- handler.request(@broker, 20)
- sleep(1)
- assert_equal("pass", handler.check)
- end
-
- def test_move_queued_messages()
- """
- Test ability to move messages from the head of one queue to another.
- Need to test moveing all and N messages.
- """
-
- "Set up source queue"
- start_qmf
- @session.queue_declare(:queue => "src-queue", :exclusive => true, :auto_delete => true)
- @session.exchange_bind(:queue => "src-queue", :exchange => "amq.direct", :binding_key => "routing_key")
-
- props = @session.delivery_properties(:routing_key => "routing_key")
- for count in 1..20
- body = "Move Message %d" % count
- src_msg = Qpid::Message.new(props, body)
- @session.message_transfer(:destination => "amq.direct", :message => src_msg)
- end
-
- "Set up destination queue"
- @session.queue_declare(:queue => "dest-queue", :exclusive => true, :auto_delete => true)
- @session.exchange_bind(:queue => "dest-queue", :exchange => "amq.direct")
-
- queues = @qmf.objects(:class => "queue")
-
- "Move 10 messages from src-queue to dest-queue"
- result = @qmf.objects(:class => "broker")[0].queueMoveMessages("src-queue", "dest-queue", 10)
- assert_equal(0, result.status)
-
- sq = @qmf.objects(:class => "queue", "name" => "src-queue")[0]
- dq = @qmf.objects(:class => "queue", "name" => "dest-queue")[0]
-
- assert_equal(10, sq.msgDepth)
- assert_equal(10, dq.msgDepth)
-
- "Move all remaining messages to destination"
- result = @qmf.objects(:class => "broker")[0].queueMoveMessages("src-queue", "dest-queue", 0)
- assert_equal(0, result.status)
-
- sq = @qmf.objects(:class => "queue", 'name' => "src-queue")[0]
- dq = @qmf.objects(:class => "queue", 'name' => "dest-queue")[0]
-
- assert_equal(0, sq.msgDepth)
- assert_equal(20, dq.msgDepth)
-
- "Use a bad source queue name"
- result = @qmf.objects(:class => "broker")[0].queueMoveMessages("bad-src-queue", "dest-queue", 0)
- assert_equal(4, result.status)
-
- "Use a bad destination queue name"
- result = @qmf.objects(:class => "broker")[0].queueMoveMessages("src-queue", "bad-dest-queue", 0)
- assert_equal(4, result.status)
-
- " Use a large qty (40) to move from dest-queue back to "
- " src-queue- should move all "
- result = @qmf.objects(:class => "broker")[0].queueMoveMessages("dest-queue", "src-queue", 40)
- assert_equal(0, result.status)
-
- sq = @qmf.objects(:class => "queue", 'name' => "src-queue")[0]
- dq = @qmf.objects(:class => "queue", 'name' => "dest-queue")[0]
-
- assert_equal(20, sq.msgDepth)
- assert_equal(0, dq.msgDepth)
-
- "Consume the messages of the queue and check they are all there in order"
- @session.message_subscribe(:queue => "src-queue",
- :destination => "tag")
- @session.message_flow(:destination => "tag",
- :unit => @session.message_credit_unit.message,
- :value => 0xFFFFFFFF)
- @session.message_flow(:destination => "tag",
- :unit => @session.message_credit_unit.byte,
- :value => 0xFFFFFFFF)
- queue = @session.incoming("tag")
- for count in 1..20
- consumed_msg = queue.get(timeout=1)
- body = "Move Message %d" % count
- assert_equal(body, consumed_msg.body)
- end
- end
-
- # Test ability to purge messages from the head of a queue. Need to test
- # moveing all, 1 (top message) and N messages.
- def test_purge_queue
- start_qmf
- # Set up purge queue"
- @session.queue_declare(:queue => "purge-queue",
- :exclusive => true,
- :auto_delete => true)
- @session.exchange_bind(:queue => "purge-queue",
- :exchange => "amq.direct",
- :binding_key => "routing_key")
-
- props = @session.delivery_properties(:routing_key => "routing_key")
- 20.times do |count|
- body = "Purge Message %d" % count
- msg = Qpid::Message.new(props, body)
- @session.message_transfer(:destination => "amq.direct",
- :message => msg)
- end
-
- pq = @qmf.objects(:class => "queue", 'name' => "purge-queue")[0]
-
- "Purge top message from purge-queue"
- result = pq.purge(1)
- assert_equal(0, result.status)
- pq = @qmf.objects(:class => "queue", 'name' => "purge-queue")[0]
- assert_equal(19, pq.msgDepth)
-
- "Purge top 9 messages from purge-queue"
- result = pq.purge(9)
- assert_equal(0, result.status)
- pq = @qmf.objects(:class => "queue", 'name' => "purge-queue")[0]
- assert_equal(10, pq.msgDepth)
-
- "Purge all messages from purge-queue"
- result = pq.purge(0)
- assert_equal(0, result.status)
- pq = @qmf.objects(:class => "queue", 'name' => "purge-queue")[0]
- assert_equal(0, pq.msgDepth)
- end
-end
diff --git a/qpid/ruby/tests/queue.rb b/qpid/ruby/tests/queue.rb
deleted file mode 100644
index 4ec0e07ffb..0000000000
--- a/qpid/ruby/tests/queue.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require 'test/unit'
-require 'qpid'
-
-class TestQueue < Test::Unit::TestCase
-
- # The qpid queue class just provides sime simple extensions to
- # python's standard queue data structure, so we don't need to test
- # all the queue functionality.
-
- def setup
- # Make sure errors in threads lead to a noisy death of the test
- Thread.abort_on_exception = true
- end
-
- def test_listen
- values = []
- heard = Qpid::Util::Event.new
-
- listener = Proc.new do |x|
- values << x
- heard.set
- end
-
- q = Qpid::Queue.new
- q.listen(&listener)
-
- heard.clear
- q.put(1)
- heard.wait
- assert_equal([1], values)
- heard.clear
- q.put(2)
- heard.wait
- assert_equal([1, 2], values)
-
- q.listen
- q.put(3)
- assert_equal(3, q.get)
-
- q.listen(&listener)
- heard.clear
- q.put(4)
- heard.wait
- assert_equal([1,2,4], values)
- end
-
- def test_close
- q = Qpid::Queue.new
- (1..3).each { |i| q.put(i) }
- q.close
- assert_equal(1, q.get)
- assert_equal(2, q.get)
- assert_equal(3, q.get)
- 10.times do |i|
- assert_raises(Qpid::Closed) do
- q.get
- end
- end
- end
-
-end
diff --git a/qpid/ruby/tests/spec010.rb b/qpid/ruby/tests/spec010.rb
deleted file mode 100644
index 6db1523455..0000000000
--- a/qpid/ruby/tests/spec010.rb
+++ /dev/null
@@ -1,80 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "test/unit"
-require "qpid/test"
-require "qpid/spec010"
-
-class SpecTest < Test::Unit::TestCase
-
- def setup()
- @spec = Qpid::Spec010.load()
- end
-
- def testSessionHeader()
- hdr = @spec[:header]
- sc = Qpid::StringCodec.new(@spec)
- hdr.encode(sc, Qpid::struct(hdr, :sync=>true))
- assert sc.encoded == "\x01\x01"
-
- sc = Qpid::StringCodec.new(@spec)
- hdr.encode(sc, Qpid::struct(hdr, :sync=>false))
- assert sc.encoded == "\x01\x00"
- end
-
- def encdec(type, value)
- sc = Qpid::StringCodec.new(@spec)
- type.encode(sc, value)
- decoded = type.decode(sc)
- return decoded
- end
-
- def testMessageProperties()
- mp = @spec[:message_properties]
- rt = @spec[:reply_to]
-
- props = Qpid::struct(mp,
- :content_length=>3735928559,
- :reply_to=>Qpid::struct(rt,
- :exchange=>"the exchange name",
- :routing_key=>"the routing key"))
- dec = encdec(mp, props)
- assert props.content_length == dec.content_length
- assert props.reply_to.exchange == dec.reply_to.exchange
- assert props.reply_to.routing_key == dec.reply_to.routing_key
- end
-
- def testMessageSubscribe()
- ms = @spec[:message_subscribe]
- cmd = Qpid::struct(ms, :exclusive=>true, :destination=>"this is a test")
- dec = encdec(@spec[:message_subscribe], cmd)
- assert cmd.exclusive == dec.exclusive
- assert cmd.destination == dec.destination
- end
-
- def testXid()
- xid = @spec[:xid]
- sc = Qpid::StringCodec.new(@spec)
- st = Qpid::struct(xid, :format=>0, :global_id=>"gid", :branch_id=>"bid")
- xid.encode(sc, st)
- assert sc.encoded == "\x00\x00\x00\x10\x06\x04\x07\x00\x00\x00\x00\x00\x03gid\x03bid"
- assert xid.decode(sc) == st
- end
-
-end
diff --git a/qpid/ruby/tests/util.rb b/qpid/ruby/tests/util.rb
deleted file mode 100644
index b22a6bab2f..0000000000
--- a/qpid/ruby/tests/util.rb
+++ /dev/null
@@ -1,72 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require 'thread'
-require 'socket'
-
-module Util
-
- TOPDIR = File::dirname(File::dirname(File::expand_path(__FILE__)))
- SPEC = File::join(TOPDIR, "specs", "amqp.0-10-qpid-errata.xml")
-
- PORT = 1234
- HOST = "0.0.0.0"
-
- def self.connect(host = HOST, port = PORT)
- TCPSocket.new(host, port)
- end
-
- class ServerThread < Thread
- def initialize(&block)
- @sockets = []
- @running = Mutex.new
- started = Qpid::Util::Event.new
- super(started, @running) do |started, running|
- tcp_srv = TCPServer.new(HOST, PORT)
- begin
- started.set
- while ! running.locked? and (session = tcp_srv.accept)
- yield(session)
- end
- rescue Exception => e
- # Exceptions in the server thread are hard to see
- # Make sure they apear loudly on the console
- $stderr.puts "#{ "*" * 20} Server exception #{ "*" * 20}"
- $stderr.puts e.message
- $stderr.puts e.backtrace
- raise
- ensure
- tcp_srv.close
- end
- end
- started.wait
- end
-
- def finish
- @running.lock
- @sockets.each { |sock| sock.close unless sock.closed? }
- end
-
- def client(host = HOST, port = PORT)
- sock = Util::connect(host, port)
- @sockets << sock
- sock
- end
- end
-end
diff --git a/qpid/ruby/tests_0-8/basic.rb b/qpid/ruby/tests_0-8/basic.rb
deleted file mode 100644
index 10a43b1aab..0000000000
--- a/qpid/ruby/tests_0-8/basic.rb
+++ /dev/null
@@ -1,69 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "test/unit"
-require "qpid/test"
-require "qpid"
-
-class Basic < Test::Unit::TestCase
-
- include Qpid08::Test
-
- def publish(body, headers = {})
- cli = connect()
- ch = cli.channel(1)
- ch.channel_open()
- content = Qpid08::Content.new(headers, body)
- ch.basic_publish(:content => content)
- msg = ch.channel_close()
- assert msg.method.qname == :channel_close_ok
- end
-
- def consume(body, headers = {})
- cli = connect()
- ch = cli.channel(1)
- ch.channel_open()
- ch.queue_declare(:queue => "test-queue")
- ch.queue_bind(:queue_name => "test-queue")
- ch.basic_consume(:queue => "test-queue", :consumer_tag => "ctag")
- content = Qpid08::Content.new(headers, body)
- ch.basic_publish(:routing_key => "test-queue", :content => content)
- queue = cli.queue("ctag")
- msg = queue.pop()
- assert content.headers == msg.content.headers
- assert content.body == msg.content.body
- assert content.children == msg.content.children
- ch.basic_ack(msg.delivery_tag)
- msg = ch.channel_close()
- assert msg.method.qname == :channel_close_ok
- end
-
- def test_publish(); publish("hello world") end
-
- def test_publish_empty(); publish("") end
-
- def test_publish_headers(); publish("hello world", :content_type => "text/plain") end
-
- def test_consume(); consume("hello world") end
-
- def test_consume_empty(); consume("") end
-
- def test_consume_headers(); consume("hello_world", :content_type => "text/plain") end
-
-end
diff --git a/qpid/ruby/tests_0-8/channel.rb b/qpid/ruby/tests_0-8/channel.rb
deleted file mode 100644
index 1eea8f18d9..0000000000
--- a/qpid/ruby/tests_0-8/channel.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-require "test/unit"
-require "qpid/test"
-require "qpid"
-
-class Channel < Test::Unit::TestCase
-
- include Qpid08::Test
-
- def test_channel_open_close()
- c = connect()
- ch = c.channel(1)
- msg = ch.channel_open()
- assert msg.method.qname == :channel_open_ok
- msg = ch.channel_close()
- assert msg.method.qname == :channel_close_ok
- end
-
- def test_channel_close()
- c = connect()
- ch = c.channel(1)
- begin
- ch.channel_close()
- rescue Qpid::Closed => e
- assert c.code.method.qname == :connection_close
- assert c.code.reply_code == 504
- end
- end
-
-end
diff --git a/qpid/specs/management-schema.xml b/qpid/specs/management-schema.xml
index f6b195f7dd..dd4acf66d5 100644
--- a/qpid/specs/management-schema.xml
+++ b/qpid/specs/management-schema.xml
@@ -171,8 +171,8 @@
<statistic name="msgTxnDequeues" type="count64" unit="message" desc="Transactional messages dequeued"/>
<statistic name="msgPersistEnqueues" type="count64" unit="message" desc="Persistent messages enqueued"/>
<statistic name="msgPersistDequeues" type="count64" unit="message" desc="Persistent messages dequeued"/>
- <statistic name="msgDepth" type="count32" unit="message" desc="Current size of queue in messages" assign="msgTotalEnqueues - msgTotalDequeues"/>
- <statistic name="byteDepth" type="count32" unit="octet" desc="Current size of queue in bytes" assign="byteTotalEnqueues - byteTotalDequeues"/>
+ <statistic name="msgDepth" type="count64" unit="message" desc="Current size of queue in messages" assign="msgTotalEnqueues - msgTotalDequeues"/>
+ <statistic name="byteDepth" type="count64" unit="octet" desc="Current size of queue in bytes" assign="byteTotalEnqueues - byteTotalDequeues"/>
<statistic name="byteTotalEnqueues" type="count64" unit="octet" desc="Total messages enqueued"/>
<statistic name="byteTotalDequeues" type="count64" unit="octet" desc="Total messages dequeued"/>
<statistic name="byteTxnEnqueues" type="count64" unit="octet" desc="Transactional messages enqueued"/>
@@ -264,7 +264,7 @@
<property name="vhostRef" type="objId" references="Vhost" access="RC" index="y" parentRef="y"/>
<property name="address" type="sstr" access="RC" index="y"/>
<property name="incoming" type="bool" access="RC"/>
- <property name="SystemConnection" type="bool" access="RC" desc="Infrastucture/ Inter-system connection (Cluster, Federation, ...)"/>
+ <property name="SystemConnection" type="bool" access="RC" desc="Infrastructure/ Inter-system connection (Cluster, Federation, ...)"/>
<property name="userProxyAuth" type="bool" access="RO" desc="Authorization to proxy for users not on broker"/>
<property name="federationLink" type="bool" access="RO" desc="Is this a federation link"/>
<property name="authIdentity" type="sstr" access="RO" desc="authId of connection if authentication enabled"/>
@@ -272,6 +272,8 @@
<property name="remotePid" type="uint32" access="RO" optional="y" desc="Process ID of remote client"/>
<property name="remoteParentPid" type="uint32" access="RO" optional="y" desc="Parent Process ID of remote client"/>
<property name="shadow" type="bool" access="RO" desc="True for shadow connections"/>
+ <property name="saslMechanism" type="sstr" access="RO" desc="SASL mechanism"/>
+ <property name="saslSsf" type="uint16" access="RO" desc="SASL security strength factor"/>
<statistic name="closing" type="bool" desc="This client is closing by management request"/>
<statistic name="framesFromClient" type="count64"/>
<statistic name="framesToClient" type="count64"/>
@@ -406,8 +408,8 @@
<arg name="reason" type="lstr" desc="Reason for a failure"/>
<arg name="rhost" type="sstr" desc="Address (i.e. DNS name, IP address, etc.) of a remotely connected host"/>
<arg name="user" type="sstr" desc="Authentication identity"/>
- <arg name="msgDepth" type="count32" desc="Current size of queue in messages"/>
- <arg name="byteDepth" type="count32" desc="Current size of queue in bytes"/>
+ <arg name="msgDepth" type="count64" desc="Current size of queue in messages"/>
+ <arg name="byteDepth" type="count64" desc="Current size of queue in bytes"/>
</eventArguments>
<event name="clientConnect" sev="inform" args="rhost, user"/>
diff --git a/qpid/tests/src/py/qpid_tests/broker_0_10/dtx.py b/qpid/tests/src/py/qpid_tests/broker_0_10/dtx.py
index 2823385a3b..19a5c6a8d9 100644
--- a/qpid/tests/src/py/qpid_tests/broker_0_10/dtx.py
+++ b/qpid/tests/src/py/qpid_tests/broker_0_10/dtx.py
@@ -6,9 +6,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -36,7 +36,7 @@ class DtxTests(TestBase010):
and the appropriate result verified.
The other tests enforce more specific rules and behaviour on a
- per-method or per-field basis.
+ per-method or per-field basis.
"""
XA_RBROLLBACK = 1
@@ -49,8 +49,8 @@ class DtxTests(TestBase010):
self.session = self.conn.session("dtx-session", 1)
def test_simple_commit(self):
- """
- Test basic one-phase commit behaviour.
+ """
+ Test basic one-phase commit behaviour.
"""
guard = self.keepQueuesAlive(["queue-a", "queue-b"])
session = self.session
@@ -73,8 +73,8 @@ class DtxTests(TestBase010):
self.assertMessageId("commit", "queue-b")
def test_simple_prepare_commit(self):
- """
- Test basic two-phase commit behaviour.
+ """
+ Test basic two-phase commit behaviour.
"""
guard = self.keepQueuesAlive(["queue-a", "queue-b"])
session = self.session
@@ -100,8 +100,8 @@ class DtxTests(TestBase010):
def test_simple_rollback(self):
- """
- Test basic rollback behaviour.
+ """
+ Test basic rollback behaviour.
"""
guard = self.keepQueuesAlive(["queue-a", "queue-b"])
session = self.session
@@ -123,8 +123,8 @@ class DtxTests(TestBase010):
self.assertMessageId("rollback", "queue-a")
def test_simple_prepare_rollback(self):
- """
- Test basic rollback behaviour after the transaction has been prepared.
+ """
+ Test basic rollback behaviour after the transaction has been prepared.
"""
guard = self.keepQueuesAlive(["queue-a", "queue-b"])
session = self.session
@@ -146,18 +146,18 @@ class DtxTests(TestBase010):
#check result
self.assertMessageCount(1, "queue-a")
self.assertMessageCount(0, "queue-b")
- self.assertMessageId("prepare-rollback", "queue-a")
+ self.assertMessageId("prepare-rollback", "queue-a")
def test_select_required(self):
"""
check that an error is flagged if select is not issued before
- start or end
+ start or end
"""
session = self.session
tx = self.xid("dummy")
try:
session.dtx_start(xid=tx)
-
+
#if we get here we have failed, but need to do some cleanup:
session.dtx_end(xid=tx)
session.dtx_rollback(xid=tx)
@@ -197,10 +197,10 @@ class DtxTests(TestBase010):
other.close()
session1.dtx_end(xid=tx)
session1.dtx_rollback(xid=tx)
-
+
#verification:
if failed: self.assertEquals(530, error.args[0].error_code)
- else: self.fail("Xid already known, expected exception!")
+ else: self.fail("Xid already known, expected exception!")
def test_forget_xid_on_completion(self):
"""
@@ -210,8 +210,8 @@ class DtxTests(TestBase010):
#do some transactional work & complete the transaction
self.test_simple_commit()
# session has been reset, so reselect for use with dtx
- self.session.dtx_select()
-
+ self.session.dtx_select()
+
#start association for the same xid as the previously completed txn
tx = self.xid("my-xid")
self.session.dtx_start(xid=tx)
@@ -237,9 +237,9 @@ class DtxTests(TestBase010):
self.assertEquals(503, e.args[0].error_code)
def test_start_join(self):
- """
+ """
Verify 'join' behaviour, where a session is associated with a
- transaction that is already associated with another session.
+ transaction that is already associated with another session.
"""
guard = self.keepQueuesAlive(["one", "two"])
#create two sessions & select them for use with dtx:
@@ -269,14 +269,14 @@ class DtxTests(TestBase010):
#mark end on both sessions
session1.dtx_end(xid=tx)
session2.dtx_end(xid=tx)
-
+
#commit and check
session1.dtx_commit(xid=tx, one_phase=True)
self.assertMessageCount(1, "one")
self.assertMessageCount(1, "two")
self.assertMessageId("a", "two")
self.assertMessageId("b", "one")
-
+
def test_suspend_resume(self):
"""
@@ -300,7 +300,7 @@ class DtxTests(TestBase010):
session.dtx_start(xid=tx, resume=True)
self.swap(session, "two", "one")#swap 'b' from 'two' to 'one'
session.dtx_end(xid=tx)
-
+
#commit and check
session.dtx_commit(xid=tx, one_phase=True)
self.assertMessageCount(1, "one")
@@ -308,7 +308,7 @@ class DtxTests(TestBase010):
self.assertMessageId("a", "two")
self.assertMessageId("b", "one")
- def test_suspend_start_end_resume(self):
+ def test_suspend_start_end_resume(self):
"""
Test suspension and resumption of an association with work
done on another transaction when the first transaction is
@@ -332,7 +332,7 @@ class DtxTests(TestBase010):
session.dtx_start(xid=tx, resume=True)
self.swap(session, "two", "one")#swap 'b' from 'two' to 'one'
session.dtx_end(xid=tx)
-
+
#commit and check
session.dtx_commit(xid=tx, one_phase=True)
self.assertMessageCount(1, "one")
@@ -341,10 +341,10 @@ class DtxTests(TestBase010):
self.assertMessageId("b", "one")
def test_end_suspend_and_fail(self):
- """
+ """
Verify that the correct error is signalled if the suspend and
fail flag are both set when disassociating a transaction from
- the session
+ the session
"""
session = self.session
session.dtx_select()
@@ -356,16 +356,16 @@ class DtxTests(TestBase010):
except SessionException, e:
self.assertEquals(503, e.args[0].error_code)
- #cleanup
+ #cleanup
other = self.connect()
session = other.session("cleanup", 1)
session.dtx_rollback(xid=tx)
session.close()
other.close()
-
+
def test_end_unknown_xid(self):
- """
+ """
Verifies that the correct exception is thrown when an attempt
is made to end the association for a xid not previously
associated with the session
@@ -382,7 +382,7 @@ class DtxTests(TestBase010):
def test_end(self):
"""
Verify that the association is terminated by end and subsequent
- operations are non-transactional
+ operations are non-transactional
"""
guard = self.keepQueuesAlive(["tx-queue"])
session = self.conn.session("alternate", 1)
@@ -408,7 +408,7 @@ class DtxTests(TestBase010):
session.message_accept(RangedSet(msg.id))
session.close()
- session = self.session
+ session = self.session
#commit the transaction and check that the first message (and
#only the first message) is then delivered
session.dtx_commit(xid=tx, one_phase=True)
@@ -418,7 +418,7 @@ class DtxTests(TestBase010):
def test_invalid_commit_one_phase_true(self):
"""
Test that a commit with one_phase = True is rejected if the
- transaction in question has already been prepared.
+ transaction in question has already been prepared.
"""
other = self.connect()
tester = other.session("tester", 1)
@@ -447,7 +447,7 @@ class DtxTests(TestBase010):
def test_invalid_commit_one_phase_false(self):
"""
Test that a commit with one_phase = False is rejected if the
- transaction in question has not yet been prepared.
+ transaction in question has not yet been prepared.
"""
other = self.connect()
tester = other.session("tester", 1)
@@ -474,7 +474,7 @@ class DtxTests(TestBase010):
def test_invalid_commit_not_ended(self):
"""
- Test that a commit fails if the xid is still associated with a session.
+ Test that a commit fails if the xid is still associated with a session.
"""
other = self.connect()
tester = other.session("tester", 1)
@@ -502,7 +502,7 @@ class DtxTests(TestBase010):
def test_invalid_rollback_not_ended(self):
"""
- Test that a rollback fails if the xid is still associated with a session.
+ Test that a rollback fails if the xid is still associated with a session.
"""
other = self.connect()
tester = other.session("tester", 1)
@@ -531,7 +531,7 @@ class DtxTests(TestBase010):
def test_invalid_prepare_not_ended(self):
"""
- Test that a prepare fails if the xid is still associated with a session.
+ Test that a prepare fails if the xid is still associated with a session.
"""
other = self.connect()
tester = other.session("tester", 1)
@@ -586,9 +586,9 @@ class DtxTests(TestBase010):
session1.dtx_rollback(xid=tx)
def test_get_timeout(self):
- """
+ """
Check that get-timeout returns the correct value, (and that a
- transaction with a timeout can complete normally)
+ transaction with a timeout can complete normally)
"""
session = self.session
tx = self.xid("dummy")
@@ -599,12 +599,12 @@ class DtxTests(TestBase010):
session.dtx_set_timeout(xid=tx, timeout=60)
self.assertEqual(60, session.dtx_get_timeout(xid=tx).timeout)
self.assertEqual(self.XA_OK, session.dtx_end(xid=tx).status)
- self.assertEqual(self.XA_OK, session.dtx_rollback(xid=tx).status)
-
+ self.assertEqual(self.XA_OK, session.dtx_rollback(xid=tx).status)
+
def test_set_timeout(self):
- """
+ """
Test the timeout of a transaction results in the expected
- behaviour
+ behaviour
"""
guard = self.keepQueuesAlive(["queue-a", "queue-b"])
@@ -627,7 +627,7 @@ class DtxTests(TestBase010):
self.assertMessageId("timeout", "queue-a")
#check the correct codes are returned when we try to complete the txn
self.assertEqual(self.XA_RBTIMEOUT, session.dtx_end(xid=tx).status)
- self.assertEqual(self.XA_RBTIMEOUT, session.dtx_rollback(xid=tx).status)
+ self.assertEqual(self.XA_RBTIMEOUT, session.dtx_rollback(xid=tx).status)
@@ -649,20 +649,20 @@ class DtxTests(TestBase010):
if i in [2, 5, 6, 8]:
session.dtx_prepare(xid=tx)
prepared.append(tx)
- else:
+ else:
session.dtx_rollback(xid=tx)
xids = session.dtx_recover().in_doubt
-
+
#rollback the prepared transactions returned by recover
for x in xids:
- session.dtx_rollback(xid=x)
+ session.dtx_rollback(xid=x)
#validate against the expected list of prepared transactions
actual = set([x.global_id for x in xids]) #TODO: come up with nicer way to test these
expected = set([x.global_id for x in prepared])
intersection = actual.intersection(expected)
-
+
if intersection != expected:
missing = expected.difference(actual)
extra = actual.difference(expected)
@@ -723,7 +723,7 @@ class DtxTests(TestBase010):
session.message_transfer(message=Message(dp, mp, "DtxMessage"))
#start the transaction:
- session.dtx_select()
+ session.dtx_select()
self.assertEqual(self.XA_OK, self.session.dtx_start(xid=tx).status)
#'swap' the message from one queue to the other, under that transaction:
@@ -760,7 +760,7 @@ class DtxTests(TestBase010):
def getMessageProperty(self, msg, prop):
for h in msg.headers:
if hasattr(h, prop): return getattr(h, prop)
- return None
+ return None
def keepQueuesAlive(self, names):
session = self.conn.session("nasty", 99)
@@ -768,7 +768,7 @@ class DtxTests(TestBase010):
session.queue_declare(queue=n, auto_delete=True)
session.message_subscribe(destination=n, queue=n)
return session
-
+
def createMessage(self, session, key, id, body):
dp=session.delivery_properties(routing_key=key)
mp=session.message_properties(correlation_id=id)
diff --git a/qpid/tests/src/py/qpid_tests/broker_0_10/exchange.py b/qpid/tests/src/py/qpid_tests/broker_0_10/exchange.py
index f51923fcf3..db52b36754 100644
--- a/qpid/tests/src/py/qpid_tests/broker_0_10/exchange.py
+++ b/qpid/tests/src/py/qpid_tests/broker_0_10/exchange.py
@@ -226,8 +226,6 @@ class DefaultExchangeRuleTests(TestHelper, StandardExchangeVerifier):
# Test automatic binding by queue name.
self.queue_declare(queue="d")
self.assertPublishConsume(queue="d", routing_key="d")
- # Test explicit bind to default queue
- self.verifyDirectExchange("")
# TODO aconway 2006-09-27: Fill in empty tests:
@@ -460,7 +458,30 @@ class MiscellaneousErrorsTests(TestHelper):
self.fail("Expected 530 for redeclaration of exchange with different type.")
except SessionException, e:
self.assertEquals(530, e.args[0].error_code)
-
+
+ def testDefaultAccessBind(self):
+ try:
+ self.session.queue_declare(queue="my-queue", auto_delete=True, exclusive=True)
+ self.session.exchange_bind(exchange="", queue="my-queue", binding_key="another-key")
+ self.fail("Expected 542 (invalid-argument) code for bind to default exchange.")
+ except SessionException, e:
+ self.assertEquals(542, e.args[0].error_code)
+
+ def testDefaultAccessUnbind(self):
+ try:
+ self.session.queue_declare(queue="my-queue", auto_delete=True, exclusive=True)
+ self.session.exchange_unbind(exchange="", queue="my-queue", binding_key="my-queue")
+ self.fail("Expected 542 (invalid-argument) code for unbind from default exchange.")
+ except SessionException, e:
+ self.assertEquals(542, e.args[0].error_code)
+
+ def testDefaultAccessDelete(self):
+ try:
+ self.session.exchange_delete(exchange="")
+ self.fail("Expected 542 (invalid-argument) code for delete of default exchange.")
+ except SessionException, e:
+ self.assertEquals(542, e.args[0].error_code)
+
class ExchangeTests(TestHelper):
def testHeadersBindNoMatchArg(self):
self.session.queue_declare(queue="q", exclusive=True, auto_delete=True)
diff --git a/qpid/tests/src/py/qpid_tests/broker_0_10/message.py b/qpid/tests/src/py/qpid_tests/broker_0_10/message.py
index b46c446833..89ba936b05 100644
--- a/qpid/tests/src/py/qpid_tests/broker_0_10/message.py
+++ b/qpid/tests/src/py/qpid_tests/broker_0_10/message.py
@@ -508,6 +508,47 @@ class MessageTests(TestBase010):
msgB = q.get(timeout=10)
+ def test_window_stop(self):
+ """
+ Ensure window based flow control reacts to stop correctly
+ """
+ session = self.session
+ #setup subscriber on a test queue
+ session.queue_declare(queue = "q", exclusive=True, auto_delete=True)
+ session.message_subscribe(queue = "q", destination = "c")
+ session.message_set_flow_mode(flow_mode = 1, destination = "c")
+ session.message_flow(unit = session.credit_unit.message, value = 5, destination = "c")
+ session.message_flow(unit = session.credit_unit.byte, value = 0xFFFFFFFFL, destination = "c")
+
+
+ #send batch of messages to queue
+ for i in range(0, 10):
+ session.message_transfer(message=Message(session.delivery_properties(routing_key="q"), "Message %d" % (i+1)))
+
+ #retrieve all delivered messages
+ q = session.incoming("c")
+ for i in range(0, 5):
+ msg = q.get(timeout = 1)
+ session.receiver._completed.add(msg.id)#TODO: this may be done automatically
+ self.assertDataEquals(session, msg, "Message %d" % (i+1))
+
+ session.message_stop(destination = "c")
+
+ #now send completions, normally used to move window forward,
+ #but after a stop should not do so
+ session.channel.session_completed(session.receiver._completed)
+
+ #check no more messages are sent
+ self.assertEmpty(q)
+
+ #re-establish window and check remaining messages
+ session.message_flow(unit = session.credit_unit.message, value = 5, destination = "c")
+ session.message_flow(unit = session.credit_unit.byte, value = 0xFFFFFFFFL, destination = "c")
+ for i in range(0, 5):
+ msg = q.get(timeout = 1)
+ self.assertDataEquals(session, msg, "Message %d" % (i+6))
+
+
def test_subscribe_not_acquired(self):
"""
Test the not-acquired modes works as expected for a simple case
diff --git a/qpid/tools/src/py/qpid-config b/qpid/tools/src/py/qpid-config
index b6eb0558cb..cd80e26a1e 100755
--- a/qpid/tools/src/py/qpid-config
+++ b/qpid/tools/src/py/qpid-config
@@ -39,11 +39,6 @@ Usage: qpid-config [OPTIONS]
qpid-config [OPTIONS] unbind <exchange-name> <queue-name> [binding-key]"""
description = """
-ADDRESS syntax:
-
- [username/password@] hostname [:<port>]
- [username/password@] ip-address [:<port>]
-
Examples:
$ qpid-config add queue q
@@ -102,6 +97,7 @@ class Config:
self._flowStopSize = None
self._flowResumeSize = None
self._extra_arguments = []
+ self._returnCode = 0
config = Config()
@@ -159,7 +155,7 @@ def OptionsAndArguments(argv):
group1 = OptionGroup(parser, "General Options")
group1.add_option("-t", "--timeout", action="store", type="int", default=10, metavar="<secs>", help="Maximum time to wait for broker connection (in seconds)")
group1.add_option("-b", "--bindings", action="store_true", help="Show bindings in queue or exchange list")
- group1.add_option("-a", "--broker-addr", action="store", type="string", default="localhost:5672", metavar="<address>", help="Address of qpidd broker")
+ group1.add_option("-a", "--broker-addr", action="store", type="string", default="localhost:5672", metavar="<address>", help="Address of qpidd broker with syntax: [username/password@] hostname | ip-address [:<port>]")
group1.add_option("--sasl-mechanism", action="store", type="string", metavar="<mech>", help="SASL mechanism for authentication (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD, DIGEST-MD5, GSSAPI). SASL automatically picks the most secure available mechanism - use this option to override.")
parser.add_option_group(group1)
@@ -172,7 +168,7 @@ def OptionsAndArguments(argv):
group3 = OptionGroup(parser, "Options for Adding Queues")
group3.add_option("--cluster-durable", action="store_true", help="The new queue becomes durable if there is only one functioning cluster node")
group3.add_option("--file-count", action="store", type="int", default=8, metavar="<n>", help="Number of files in queue's persistence journal")
- group3.add_option("--file-size", action="store", type="int", default=24, metavar="<n>", help="File size in pages (64Kib/page)")
+ group3.add_option("--file-size", action="store", type="int", default=24, metavar="<n>", help="File size in pages (64KiB/page)")
group3.add_option("--max-queue-size", action="store", type="int", metavar="<n>", help="Maximum in-memory queue size as bytes")
group3.add_option("--max-queue-count", action="store", type="int", metavar="<n>", help="Maximum in-memory queue size as a number of messages")
group3.add_option("--limit-policy", action="store", choices=["none", "reject", "flow-to-disk", "ring", "ring-strict"], metavar="<policy>", help="Action to take when queue limit is reached")
@@ -359,9 +355,16 @@ class BrokerManager:
caption1 = "Type "
caption2 = "Exchange Name"
maxNameLen = len(caption2)
+ found = False
for ex in exchanges:
if self.match(ex.name, filter):
if len(ex.name) > maxNameLen: maxNameLen = len(ex.name)
+ found = True
+ if not found:
+ global config
+ config._returnCode = 1
+ return
+
print "%s%-*s Attributes" % (caption1, maxNameLen, caption2)
line = ""
for i in range(((maxNameLen + len(caption1)) / 5) + 5):
@@ -398,12 +401,18 @@ class BrokerManager:
def QueueList(self, filter):
queues = self.qmf.getObjects(_class="queue", _agent=self.brokerAgent)
-
caption = "Queue Name"
maxNameLen = len(caption)
+ found = False
for q in queues:
if self.match(q.name, filter):
if len(q.name) > maxNameLen: maxNameLen = len(q.name)
+ found = True
+ if not found:
+ global config
+ config._returnCode = 1
+ return
+
print "%-*s Attributes" % (maxNameLen, caption)
line = ""
for i in range((maxNameLen / 5) + 5):
@@ -675,7 +684,7 @@ def main(argv=None):
print "Failed: %s: %s" % (e.__class__.__name__, e)
return 1
- return 0
+ return config._returnCode
if __name__ == "__main__":
sys.exit(main())
diff --git a/qpid/tools/src/py/qpid-route b/qpid/tools/src/py/qpid-route
index d98cefd618..f90416d7b0 100755
--- a/qpid/tools/src/py/qpid-route
+++ b/qpid/tools/src/py/qpid-route
@@ -217,11 +217,11 @@ class RouteManager:
added = False
links = self.qmf.getObjects(_class="link")
for link in links:
- url = BrokerURL("%s:%d" % (link.host, link.port))
+ url = BrokerURL(host=link.host, port=link.port)
if url.name() not in self.brokerList:
print " %s..." % url.name(),
try:
- b = self.qmf.addBroker("%s:%d" % (link.host, link.port), config._connTimeout)
+ b = self.qmf.addBroker(url, config._connTimeout)
self.brokerList[url.name()] = b
added = True
print "Ok"
@@ -245,7 +245,7 @@ class RouteManager:
for bridge in bridges:
if bridge.src == ex:
link = bridge._linkRef_
- fromUrl = "%s:%s" % (link.host, link.port)
+ fromUrl = BrokerURL(host=link.host, port=link.port)
toUrl = bridge.getBroker().getUrl()
found = False
for pair in pairs:
diff --git a/qpid/tools/src/py/qpid-tool b/qpid/tools/src/py/qpid-tool
index d6bb9bcaea..df8b7e3f96 100755
--- a/qpid/tools/src/py/qpid-tool
+++ b/qpid/tools/src/py/qpid-tool
@@ -350,7 +350,7 @@ class QmfData(Console):
self.notNone(prop.unit), notes, self.notNone(prop.desc))
rows.append(row)
for stat in schema.getStatistics():
- row = (stat.name, self.typeName(stat.type), "", self.notNone(prop.unit), "", self.notNone(prop.desc))
+ row = (stat.name, self.typeName(stat.type), "", self.notNone(stat.unit), "", self.notNone(stat.desc))
rows.append(row)
self.disp.table(title, heads, rows)