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

@ -34,6 +34,19 @@ namespace OpenWire.Client
this.transport.Start(); 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> /// <summary>
/// Creates a new session to work on this connection /// Creates a new session to work on this connection

View File

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

View File

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

View File

@ -10,5 +10,7 @@ namespace OpenWire.Client {
IDestination FromDestination { IDestination FromDestination {
get; get;
} }
} }
} }

View File

@ -16,6 +16,11 @@ namespace OpenWire.Client
/// </summary> /// </summary>
IMessage Receive(); IMessage Receive();
/// <summary>
/// If a message is available within the timeout duration it is returned otherwise this method returns null
/// </summary>
IMessage Receive(long timeout);
/// <summary> /// <summary>
/// If a message is available immediately it is returned otherwise this method returns null /// If a message is available immediately it is returned otherwise this method returns null
/// </summary> /// </summary>

View File

@ -16,5 +16,36 @@ namespace OpenWire.Client {
/// Sends the message to the given destination /// Sends the message to the given destination
/// </summary> /// </summary>
void Send(IDestination destination, IMessage message); 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

@ -8,7 +8,6 @@ namespace OpenWire.Client {
/// </summary> /// </summary>
public interface ISession : IDisposable { public interface ISession : IDisposable {
/// <summary> /// <summary>
/// Creates a producer of messages /// Creates a producer of messages
/// </summary> /// </summary>
@ -20,15 +19,20 @@ namespace OpenWire.Client {
IMessageProducer CreateProducer(IDestination destination); IMessageProducer CreateProducer(IDestination destination);
/// <summary> /// <summary>
/// Creates a cpmsi,er of messages on a given destination /// Creates a consumer of messages on a given destination
/// </summary> /// </summary>
IMessageConsumer CreateConsumer(IDestination destination); IMessageConsumer CreateConsumer(IDestination destination);
/// <summary> /// <summary>
/// Creates a cpmsi,er of messages on a given destination with a selector /// Creates a consumer of messages on a given destination with a selector
/// </summary> /// </summary>
IMessageConsumer CreateConsumer(IDestination destination, string selector); IMessageConsumer CreateConsumer(IDestination destination, string selector);
/// <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> /// <summary>
/// Returns the queue for the given name /// Returns the queue for the given name
/// </summary> /// </summary>
@ -39,7 +43,6 @@ namespace OpenWire.Client {
/// </summary> /// </summary>
ITopic GetTopic(string name); ITopic GetTopic(string name);
/// <summary> /// <summary>
/// Creates a new message with an empty body /// Creates a new message with an empty body
/// </summary> /// </summary>

View File

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

View File

@ -13,6 +13,11 @@ namespace OpenWire.Client
private ProducerInfo info; private ProducerInfo info;
private long messageCounter; private long messageCounter;
bool persistent;
long timeToLive;
int priority;
bool disableMessageID;
bool disableMessageTimestamp;
public MessageProducer(Session session, ProducerInfo info) public MessageProducer(Session session, ProducerInfo info)
{ {
@ -45,5 +50,36 @@ namespace OpenWire.Client
{ {
session.DisposeOf(info.ProducerId); 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 public class Session : ISession
{ {
private Connection connection; private Connection connection;
private AcknowledgementMode acknowledgementMode; private AcknowledgementMode acknowledgementMode = AcknowledgementMode.AutoAcknowledge;
private SessionInfo info; private SessionInfo info;
private long consumerCounter; private long consumerCounter;
private long producerCounter; 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) public IQueue GetQueue(string name)
{ {
return new ActiveMQQueue(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] [Test]
public void TestLongEndian() public void TestLongEndian()
{ {
long value = 0x0102030405060708l; long value = 0x0102030405060708L;
long newValue = DataStreamMarshaller.SwitchEndian(value); long newValue = DataStreamMarshaller.SwitchEndian(value);