Added visual studio project files and started porting over test cases from the java side, flesh out the durable sub stuff a little more

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@380620 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-02-24 08:41:42 +00:00
parent 6c1d45e1fc
commit 69889d82bb
16 changed files with 1258 additions and 93 deletions

800
openwire-dotnet/activemq.csproj Executable file
View File

@ -0,0 +1,800 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{E8825D2E-4EC5-43D3-9FAC-F16055294F49}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "activemq"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "activemq"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "src\OpenWire.Client\BrokerException.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Connection.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\ConnectionClosedException.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\ConnectionFactory.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\ConsumerClosedException.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\DestinationFilter.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IConnection.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IConnectionFactory.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IDestination.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IMessage.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IMessageConsumer.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IMessageProducer.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IQueue.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\ISession.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IStartable.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IStopable.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\ITemporaryQueue.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\ITemporaryTopic.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\ITextMessage.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\ITopic.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\MessageConsumer.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\MessageProducer.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\OpenWireException.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Session.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ActiveMQBytesMessage.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ActiveMQDestination.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ActiveMQMapMessage.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ActiveMQMessage.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ActiveMQObjectMessage.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ActiveMQQueue.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ActiveMQStreamMessage.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ActiveMQTempDestination.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ActiveMQTempQueue.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ActiveMQTempTopic.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ActiveMQTextMessage.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ActiveMQTopic.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\BaseCommand.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\BrokerId.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\BrokerInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ConnectionError.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ConnectionId.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ConnectionInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ConsumerId.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ConsumerInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ControlCommand.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\DataArrayResponse.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\DataResponse.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\DestinationInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\DiscoveryEvent.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ExceptionResponse.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\FlushCommand.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\IntegerResponse.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\JournalQueueAck.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\JournalTopicAck.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\JournalTrace.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\JournalTransaction.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\KeepAliveInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\LocalTransactionId.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\Message.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\MessageAck.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\MessageDispatch.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\MessageDispatchNotification.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\MessageId.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ProducerId.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ProducerInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\RemoveInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\RemoveSubscriptionInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\Response.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\SessionId.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\SessionInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\ShutdownInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\SubscriptionInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\TransactionId.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\TransactionInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\WireFormatInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Commands\XATransactionId.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Core\AbstractCommand.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Core\BooleanStream.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Core\BrokerError.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Core\Command.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Core\DataStreamMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Core\DataStructure.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Core\DataStructureSupport.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Core\Dispatcher.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Core\FutureResponse.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Core\ITransport.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Core\MarshallAware.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Core\OpenWireFormat.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\Core\SocketTransport.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ActiveMQBytesMessageMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ActiveMQDestinationMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ActiveMQMapMessageMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ActiveMQMessageMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ActiveMQObjectMessageMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ActiveMQQueueMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ActiveMQStreamMessageMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ActiveMQTempDestinationMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ActiveMQTempQueueMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ActiveMQTempTopicMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ActiveMQTextMessageMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ActiveMQTopicMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\BaseCommandMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\BrokerIdMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\BrokerInfoMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ConnectionErrorMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ConnectionIdMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ConnectionInfoMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ConsumerIdMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ConsumerInfoMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ControlCommandMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\DataArrayResponseMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\DataResponseMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\DestinationInfoMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\DiscoveryEventMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ExceptionResponseMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\FlushCommandMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\IntegerResponseMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\JournalQueueAckMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\JournalTopicAckMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\JournalTraceMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\JournalTransactionMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\KeepAliveInfoMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\LocalTransactionIdMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\MarshallerFactory.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\MessageAckMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\MessageDispatchMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\MessageDispatchNotificationMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\MessageIdMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\MessageMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ProducerIdMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ProducerInfoMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\RemoveInfoMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\RemoveSubscriptionInfoMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ResponseMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\SessionIdMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\SessionInfoMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\ShutdownInfoMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\SubscriptionInfoMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\TransactionIdMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\TransactionInfoMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\WireFormatInfoMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "src\OpenWire.Client\IO\XATransactionIdMarshaller.cs"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

30
openwire-dotnet/activemq.sln Executable file
View File

@ -0,0 +1,30 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "activemq", "activemq.csproj", "{E8825D2E-4EC5-43D3-9FAC-F16055294F49}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "tests", "tests.csproj", "{3E5FA6F9-08E6-4F0D-86D9-77562D14F8AD}"
ProjectSection(ProjectDependencies) = postProject
{E8825D2E-4EC5-43D3-9FAC-F16055294F49} = {E8825D2E-4EC5-43D3-9FAC-F16055294F49}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{E8825D2E-4EC5-43D3-9FAC-F16055294F49}.Debug.ActiveCfg = Debug|.NET
{E8825D2E-4EC5-43D3-9FAC-F16055294F49}.Debug.Build.0 = Debug|.NET
{E8825D2E-4EC5-43D3-9FAC-F16055294F49}.Release.ActiveCfg = Release|.NET
{E8825D2E-4EC5-43D3-9FAC-F16055294F49}.Release.Build.0 = Release|.NET
{3E5FA6F9-08E6-4F0D-86D9-77562D14F8AD}.Debug.ActiveCfg = Debug|.NET
{3E5FA6F9-08E6-4F0D-86D9-77562D14F8AD}.Debug.Build.0 = Debug|.NET
{3E5FA6F9-08E6-4F0D-86D9-77562D14F8AD}.Release.ActiveCfg = Release|.NET
{3E5FA6F9-08E6-4F0D-86D9-77562D14F8AD}.Release.Build.0 = Release|.NET
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@ -1,19 +1,19 @@
/*
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* 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.
*/
* Copyright 2006 The Apache Software Foundation or its licensors, as
* applicable.
*
* 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.
*/
using System;
using System.Collections;

View File

@ -33,7 +33,20 @@ namespace OpenWire.Client
this.transport.Command += new CommandHandler(OnCommand);
this.transport.Start();
}
/// <summary>
/// Starts message delivery for this connection.
/// </summary>
public void Start()
{
}
/// <summary>
/// Stop message delivery for this connection.
/// </summary>
public void Stop()
{
}
/// <summary>
/// Creates a new session to work on this connection

View File

@ -109,17 +109,17 @@ namespace OpenWire.Client.Core
{
command = (Command) wireformat.Unmarshal(socketReader);
}
catch (EndOfStreamException e)
catch (EndOfStreamException)
{
// stream closed
break;
}
catch (ObjectDisposedException e)
catch (ObjectDisposedException)
{
// stream closed
break;
}
catch (IOException e)
catch (IOException)
{
// error, assume closing
break;

View File

@ -11,7 +11,7 @@ namespace OpenWire.Client {
/// <summary>
/// Represents a connection with a message broker
/// </summary>
public interface IConnection : IDisposable {
public interface IConnection : IDisposable, IStartable, IStopable {
/// <summary>
/// Creates a new session to work on this connection
@ -34,6 +34,14 @@ namespace OpenWire.Client {
AcknowledgementMode AcknowledgementMode {
get;
set;
}
}
}
String ClientId
{
get;
set;
}
}
}

View File

@ -2,13 +2,15 @@ using System;
using OpenWire.Client.Commands;
namespace OpenWire.Client {
/// <summary>
/// Represents a message either to be sent to a message broker or received from a message broker
/// </summary>
public interface IMessage {
/// <summary>
/// Represents a message either to be sent to a message broker or received from a message broker
/// </summary>
public interface IMessage {
IDestination FromDestination {
get;
}
}
IDestination FromDestination {
get;
}
}
}

View File

@ -11,10 +11,15 @@ namespace OpenWire.Client
public interface IMessageConsumer : IDisposable
{
/// <summary>
/// Waits until a message is available and returns it
/// <summary>
/// Waits until a message is available and returns it
/// </summary>
IMessage Receive();
/// <summary>
/// If a message is available within the timeout duration it is returned otherwise this method returns null
/// </summary>
IMessage Receive();
IMessage Receive(long timeout);
/// <summary>
/// If a message is available immediately it is returned otherwise this method returns null

View File

@ -2,19 +2,50 @@ using System;
using OpenWire.Client.Commands;
namespace OpenWire.Client {
/// <summary>
/// An object capable of sending messages to some destination
/// </summary>
public interface IMessageProducer : IDisposable {
/// <summary>
/// An object capable of sending messages to some destination
/// Sends the message to the default destination for this producer
/// </summary>
public interface IMessageProducer : IDisposable {
void Send(IMessage message);
/// <summary>
/// Sends the message to the default destination for this producer
/// </summary>
void Send(IMessage message);
/// <summary>
/// Sends the message to the given destination
/// </summary>
void Send(IDestination destination, IMessage message);
/// <summary>
/// Sends the message to the given destination
/// </summary>
void Send(IDestination destination, IMessage message);
}
bool Persistent
{
get;
set;
}
long TimeToLive
{
get;
set;
}
int Priority
{
get;
set;
}
bool DisableMessageID
{
get;
set;
}
bool DisableMessageTimestamp
{
get;
set;
}
}
}

View File

@ -2,57 +2,60 @@ using System;
using OpenWire.Client.Commands;
namespace OpenWire.Client {
/// <summary>
/// Represents a single unit of work on an IConnection.
/// So the ISession can be used to perform transactional receive and sends
/// </summary>
public interface ISession : IDisposable {
/// <summary>
/// Represents a single unit of work on an IConnection.
/// So the ISession can be used to perform transactional receive and sends
/// Creates a producer of messages
/// </summary>
public interface ISession : IDisposable {
IMessageProducer CreateProducer();
/// <summary>
/// Creates a producer of messages on a given destination
/// </summary>
IMessageProducer CreateProducer(IDestination destination);
/// <summary>
/// Creates a producer of messages
/// </summary>
IMessageProducer CreateProducer();
/// <summary>
/// Creates a consumer of messages on a given destination
/// </summary>
IMessageConsumer CreateConsumer(IDestination destination);
/// <summary>
/// Creates a producer of messages on a given destination
/// </summary>
IMessageProducer CreateProducer(IDestination destination);
/// <summary>
/// Creates a consumer of messages on a given destination with a selector
/// </summary>
IMessageConsumer CreateConsumer(IDestination destination, string selector);
/// <summary>
/// Creates a cpmsi,er of messages on a given destination
/// </summary>
IMessageConsumer CreateConsumer(IDestination destination);
/// <summary>
/// Creates a cpmsi,er of messages on a given destination with a selector
/// </summary>
IMessageConsumer CreateConsumer(IDestination destination, string selector);
/// <summary>
/// Returns the queue for the given name
/// </summary>
IQueue GetQueue(string name);
/// <summary>
/// Returns the topic for the given name
/// </summary>
ITopic GetTopic(string name);
/// <summary>
/// Creates a named durable consumer of messages on a given destination with a selector
/// </summary>
IMessageConsumer CreateDurableConsumer(ITopic destination, string name, string selector, bool noLocal);
/// <summary>
/// Returns the queue for the given name
/// </summary>
IQueue GetQueue(string name);
/// <summary>
/// Creates a new message with an empty body
/// </summary>
IMessage CreateMessage();
/// <summary>
/// Creates a new text message with an empty body
/// </summary>
ITextMessage CreateTextMessage();
/// <summary>
/// Creates a new text message with the given body
/// </summary>
ITextMessage CreateTextMessage(string text);
}
/// <summary>
/// Returns the topic for the given name
/// </summary>
ITopic GetTopic(string name);
/// <summary>
/// Creates a new message with an empty body
/// </summary>
IMessage CreateMessage();
/// <summary>
/// Creates a new text message with an empty body
/// </summary>
ITextMessage CreateTextMessage();
/// <summary>
/// Creates a new text message with the given body
/// </summary>
ITextMessage CreateTextMessage(string text);
}
}

View File

@ -0,0 +1,7 @@
namespace OpenWire.Client
{
public interface IStopable
{
void Stop();
}
}

View File

@ -12,8 +12,13 @@ namespace OpenWire.Client
private Session session;
private ProducerInfo info;
private long messageCounter;
bool persistent;
long timeToLive;
int priority;
bool disableMessageID;
bool disableMessageTimestamp;
public MessageProducer(Session session, ProducerInfo info)
{
this.session = session;
@ -45,5 +50,36 @@ namespace OpenWire.Client
{
session.DisposeOf(info.ProducerId);
}
public bool Persistent
{
get { return persistent; }
set { this.persistent = value; }
}
public long TimeToLive
{
get { return timeToLive; }
set { this.timeToLive = value; }
}
public int Priority
{
get { return priority; }
set { this.priority = value; }
}
public bool DisableMessageID
{
get { return disableMessageID; }
set { this.disableMessageID = value; }
}
public bool DisableMessageTimestamp
{
get { return disableMessageTimestamp; }
set { this.disableMessageTimestamp = value; }
}
}
}

View File

@ -10,7 +10,7 @@ namespace OpenWire.Client
public class Session : ISession
{
private Connection connection;
private AcknowledgementMode acknowledgementMode;
private AcknowledgementMode acknowledgementMode = AcknowledgementMode.AutoAcknowledge;
private SessionInfo info;
private long consumerCounter;
private long producerCounter;
@ -75,6 +75,29 @@ namespace OpenWire.Client
}
}
public IMessageConsumer CreateDurableConsumer(ITopic destination, string name, string selector, bool noLocal)
{
ConsumerInfo command = CreateConsumerInfo(destination, selector);
ConsumerId consumerId = command.ConsumerId;
command.SubcriptionName = name;
command.NoLocal = noLocal;
try
{
MessageConsumer consumer = new MessageConsumer(this, command);
// lets register the consumer first in case we start dispatching messages immediately
connection.AddConsumer(consumerId, consumer);
connection.SyncRequest(command);
return consumer;
}
catch (Exception e)
{
connection.RemoveConsumer(consumerId);
throw e;
}
}
public IQueue GetQueue(string name)
{
return new ActiveMQQueue(name);

131
openwire-dotnet/tests.csproj Executable file
View File

@ -0,0 +1,131 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{3E5FA6F9-08E6-4F0D-86D9-77562D14F8AD}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "tests"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "tests"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<Reference
Name = "activemq"
Project = "{E8825D2E-4EC5-43D3-9FAC-F16055294F49}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
<Reference
Name = "nunit.framework"
AssemblyName = "nunit.framework"
HintPath = "..\..\..\Program Files\NUnit 2.2.7\bin\nunit.framework.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "tests\OpenWire.Client\ClientTest.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "tests\OpenWire.Client\CommandTest.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "tests\OpenWire.Client\ConsumerTest.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "tests\OpenWire.Client\EndianTest.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "tests\OpenWire.Client\TestMain.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "tests\OpenWire.Client\TestSupport.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<Folder RelPath = "tests\OpenWire.Client\IO\" />
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

View File

@ -0,0 +1,76 @@
using System;
using System.IO;
using NUnit.Framework;
using OpenWire.Client;
using OpenWire.Client.Core;
namespace OpenWire.Client
{
[TestFixture]
public class ConsumerTest : TestSupport
{
IConnectionFactory factory;
IConnection connection;
IDestination destination;
[SetUp]
protected void SetUp()
{
factory = new ConnectionFactory("localhost", 61616);
connection = factory.CreateConnection();
}
[TearDown]
protected void TearDown()
{
connection.Dispose();
}
[Test]
[Ignore("Not fully implemented yet.")]
public void testDurableConsumerSelectorChange()
{
// Receive a message with the JMS API
connection.ClientId="test";
connection.Start();
ISession session = connection.CreateSession(false, AcknowledgementMode.AutoAcknowledge);
destination = session.GetTopic("foo");
IMessageProducer producer = session.CreateProducer(destination);
producer.Persistent = true;
IMessageConsumer consumer = session.CreateDurableConsumer((ITopic)destination, "test", "color='red'", false);
// Send the messages
ITextMessage message = session.CreateTextMessage("1st");
//message.SetStringProperty("color", "red");
producer.Send(message);
IMessage m = consumer.Receive(1000);
Assert.IsNotNull(m);
Assert.AreEqual("1st", ((ITextMessage)m).Text );
// Change the subscription.
consumer.Dispose();
consumer = session.CreateDurableConsumer((ITopic)destination, "test", "color='blue'", false);
message = session.CreateTextMessage("2nd");
// message.setStringProperty("color", "red");
producer.Send(message);
message = session.CreateTextMessage("3rd");
// message.setStringProperty("color", "blue");
producer.Send(message);
// Selector should skip the 2nd message.
m = consumer.Receive(1000);
Assert.IsNotNull(m);
Assert.AreEqual("3rd", ((ITextMessage)m).Text);
Assert.IsNull(consumer.ReceiveNoWait());
}
}
}

View File

@ -11,7 +11,7 @@ namespace openwire_dotnet
[Test]
public void TestLongEndian()
{
long value = 0x0102030405060708l;
long value = 0x0102030405060708L;
long newValue = DataStreamMarshaller.SwitchEndian(value);