You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/12/07 17:27:43 UTC
svn commit: r887985 -
/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
Author: tabish
Date: Mon Dec 7 16:27:42 2009
New Revision: 887985
URL: http://svn.apache.org/viewvc?rev=887985&view=rev
Log:
* StompWireFormat.cs:
Update the code to reflect the new Command names and feilds.
Modified:
activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
Modified: activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs?rev=887985&r1=887984&r2=887985&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.Stomp/trunk/src/main/csharp/Protocol/StompWireFormat.cs Mon Dec 7 16:27:42 2009
@@ -55,9 +55,9 @@
{
WriteConnectionInfo((ConnectionInfo) o, ds);
}
- else if (o is ActiveMQMessage)
+ else if (o is Message)
{
- WriteMessage((ActiveMQMessage) o, ds);
+ WriteMessage((Message) o, ds);
}
else if (o is ConsumerInfo)
{
@@ -241,15 +241,15 @@
protected virtual Command ReadMessage(string command, IDictionary headers, byte[] content)
{
- ActiveMQMessage message = null;
+ Message message = null;
if (headers.Contains("content-length"))
{
- message = new ActiveMQBytesMessage();
+ message = new BytesMessage();
message.Content = content;
}
else
{
- message = new ActiveMQTextMessage(encoding.GetString(content, 0, content.Length));
+ message = new TextMessage(encoding.GetString(content, 0, content.Length));
}
// TODO now lets set the various headers
@@ -421,13 +421,13 @@
protected virtual void WriteTransactionInfo(TransactionInfo command, StompFrameStream ss)
{
TransactionId id = command.TransactionId;
- if (id is LocalTransactionId)
+ if (id is TransactionId)
{
string type = "BEGIN";
TransactionType transactionType = (TransactionType) command.Type;
switch (transactionType)
{
- case TransactionType.CommitOnePhase:
+ case TransactionType.Commit:
command.ResponseRequired = true;
type = "COMMIT";
break;
@@ -468,7 +468,7 @@
command.BeforeMarshall(null);
if (command is TextMessage)
{
- ActiveMQTextMessage textMessage = command as ActiveMQTextMessage;
+ TextMessage textMessage = command as TextMessage;
ss.Content = encoding.GetBytes(textMessage.Text);
}
else