mirror of https://github.com/apache/activemq.git
latest generated openwire.net code which now compiles OK!
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@367311 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fd32d5612c
commit
f4f8bb12ed
|
@ -23,7 +23,7 @@ namespace OpenWire.Core
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual int GetCommandType()
|
public virtual byte GetCommandType()
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,10 +23,22 @@ namespace OpenWire.Core
|
||||||
|
|
||||||
public virtual void BuildCommand(Command command, BinaryReader dataIn)
|
public virtual void BuildCommand(Command command, BinaryReader dataIn)
|
||||||
{
|
{
|
||||||
|
// empty body to allow generated code to call base method
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void WriteCommand(Command command, BinaryWriter dataOut)
|
public virtual void WriteCommand(Command command, BinaryWriter dataOut)
|
||||||
{
|
{
|
||||||
|
// empty body to allow generated code to call base method
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual ActiveMQDestination ReadDestination(BinaryReader dataIn)
|
||||||
|
{
|
||||||
|
return (ActiveMQDestination) CommandMarshallerRegistry.ReadCommand(dataIn);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected virtual void WriteDestination(ActiveMQDestination command, BinaryWriter dataOut)
|
||||||
|
{
|
||||||
|
CommandMarshallerRegistry.WriteCommand(command, dataOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual BrokerId[] ReadBrokerIds(BinaryReader dataIn)
|
protected virtual BrokerId[] ReadBrokerIds(BinaryReader dataIn)
|
||||||
|
|
|
@ -0,0 +1,463 @@
|
||||||
|
using System;
|
||||||
|
using OpenWire.Core.Commands;
|
||||||
|
|
||||||
|
namespace OpenWire.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Summary description for ActiveMQDestination.
|
||||||
|
/// </summary>
|
||||||
|
public abstract class ActiveMQDestination : AbstractCommand, Destination {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Topic Destination object
|
||||||
|
*/
|
||||||
|
public const int ACTIVEMQ_TOPIC = 1;
|
||||||
|
/**
|
||||||
|
* Temporary Topic Destination object
|
||||||
|
*/
|
||||||
|
public const int ACTIVEMQ_TEMPORARY_TOPIC = 2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Queue Destination object
|
||||||
|
*/
|
||||||
|
public const int ACTIVEMQ_QUEUE = 3;
|
||||||
|
/**
|
||||||
|
* Temporary Queue Destination object
|
||||||
|
*/
|
||||||
|
public const int ACTIVEMQ_TEMPORARY_QUEUE = 4;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* prefix for Advisory message destinations
|
||||||
|
*/
|
||||||
|
public const String ADVISORY_PREFIX = "ActiveMQ.Advisory.";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* prefix for consumer advisory destinations
|
||||||
|
*/
|
||||||
|
public const String CONSUMER_ADVISORY_PREFIX = ADVISORY_PREFIX + "Consumers.";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* prefix for producer advisory destinations
|
||||||
|
*/
|
||||||
|
public const String PRODUCER_ADVISORY_PREFIX = ADVISORY_PREFIX + "Producers.";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* prefix for connection advisory destinations
|
||||||
|
*/
|
||||||
|
public const String CONNECTION_ADVISORY_PREFIX = ADVISORY_PREFIX + "Connections.";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default target for ordered destinations
|
||||||
|
*/
|
||||||
|
public const String DEFAULT_ORDERED_TARGET = "coordinator";
|
||||||
|
|
||||||
|
private const int NULL_DESTINATION = 10;
|
||||||
|
|
||||||
|
private const String TEMP_PREFIX = "{TD{";
|
||||||
|
private const String TEMP_POSTFIX = "}TD}";
|
||||||
|
private const String COMPOSITE_SEPARATOR = ",";
|
||||||
|
private const String QUEUE_PREFIX = "queue://";
|
||||||
|
private const String TOPIC_PREFIX = "topic://";
|
||||||
|
|
||||||
|
|
||||||
|
private String physicalName = "";
|
||||||
|
|
||||||
|
// Cached transient data
|
||||||
|
private bool exclusive;
|
||||||
|
private bool ordered;
|
||||||
|
private bool advisory;
|
||||||
|
private String orderedTarget = DEFAULT_ORDERED_TARGET;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Default Constructor
|
||||||
|
*/
|
||||||
|
protected ActiveMQDestination() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Construct the Destination with a defined physical name;
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
*/
|
||||||
|
protected ActiveMQDestination(String name) {
|
||||||
|
this.physicalName = name;
|
||||||
|
this.advisory = name != null && name.StartsWith(ADVISORY_PREFIX);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the advisory.
|
||||||
|
*/
|
||||||
|
public bool IsAdvisory() {
|
||||||
|
return advisory;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param advisory The advisory to set.
|
||||||
|
*/
|
||||||
|
public void SetAdvisory(bool advisory) {
|
||||||
|
this.advisory = advisory;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if this is a destination for Consumer advisories
|
||||||
|
*/
|
||||||
|
public bool IsConsumerAdvisory(){
|
||||||
|
return IsAdvisory() && physicalName.StartsWith(CONSUMER_ADVISORY_PREFIX);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if this is a destination for Producer advisories
|
||||||
|
*/
|
||||||
|
public bool IsProducerAdvisory(){
|
||||||
|
return IsAdvisory() && physicalName.StartsWith(PRODUCER_ADVISORY_PREFIX);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if this is a destination for Connection advisories
|
||||||
|
*/
|
||||||
|
public bool IsConnectionAdvisory(){
|
||||||
|
return IsAdvisory() && physicalName.StartsWith(CONNECTION_ADVISORY_PREFIX);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the exclusive.
|
||||||
|
*/
|
||||||
|
public bool IsExclusive() {
|
||||||
|
return exclusive;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param exclusive The exclusive to set.
|
||||||
|
*/
|
||||||
|
public void SetExclusive(bool exclusive) {
|
||||||
|
this.exclusive = exclusive;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return Returns the ordered.
|
||||||
|
*/
|
||||||
|
public bool IsOrdered() {
|
||||||
|
return ordered;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param ordered The ordered to set.
|
||||||
|
*/
|
||||||
|
public void SetOrdered(bool ordered) {
|
||||||
|
this.ordered = ordered;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return Returns the orderedTarget.
|
||||||
|
*/
|
||||||
|
public String GetOrderedTarget() {
|
||||||
|
return orderedTarget;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param orderedTarget The orderedTarget to set.
|
||||||
|
*/
|
||||||
|
public void SetOrderedTarget(String orderedTarget) {
|
||||||
|
this.orderedTarget = orderedTarget;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* A helper method to return a descriptive string for the topic or queue
|
||||||
|
* @param destination
|
||||||
|
*
|
||||||
|
* @return a descriptive string for this queue or topic
|
||||||
|
*/
|
||||||
|
public static String Inspect(ActiveMQDestination destination) {
|
||||||
|
if (destination is Topic) {
|
||||||
|
return "Topic(" + destination.ToString() + ")";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return "Queue(" + destination.ToString() + ")";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param destination
|
||||||
|
* @return @throws JMSException
|
||||||
|
* @throws javax.jms.JMSException
|
||||||
|
*/
|
||||||
|
public static ActiveMQDestination transformDestination(Destination destination) {
|
||||||
|
ActiveMQDestination result = null;
|
||||||
|
if (destination != null) {
|
||||||
|
if (destination is ActiveMQDestination) {
|
||||||
|
result = (ActiveMQDestination) destination;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (destination is TemporaryQueue) {
|
||||||
|
result = new ActiveMQTempQueue(((Queue) destination).QueueName);
|
||||||
|
}
|
||||||
|
else if (destination is TemporaryTopic) {
|
||||||
|
result = new ActiveMQTempTopic(((Topic) destination).TopicName);
|
||||||
|
}
|
||||||
|
else if (destination is Queue) {
|
||||||
|
result = new ActiveMQQueue(((Queue) destination).QueueName);
|
||||||
|
}
|
||||||
|
else if (destination is Topic) {
|
||||||
|
result = new ActiveMQTopic(((Topic) destination).TopicName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a Destination
|
||||||
|
* @param type
|
||||||
|
* @param pyhsicalName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static ActiveMQDestination CreateDestination(int type,String pyhsicalName){
|
||||||
|
ActiveMQDestination result = null;
|
||||||
|
if (type == ACTIVEMQ_TOPIC) {
|
||||||
|
result = new ActiveMQTopic(pyhsicalName);
|
||||||
|
}
|
||||||
|
else if (type == ACTIVEMQ_TEMPORARY_TOPIC) {
|
||||||
|
result = new ActiveMQTempTopic(pyhsicalName);
|
||||||
|
}
|
||||||
|
else if (type == ACTIVEMQ_QUEUE) {
|
||||||
|
result = new ActiveMQQueue(pyhsicalName);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
result = new ActiveMQTempQueue(pyhsicalName);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a temporary name from the clientId
|
||||||
|
*
|
||||||
|
* @param clientId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String CreateTemporaryName(String clientId) {
|
||||||
|
return TEMP_PREFIX + clientId + TEMP_POSTFIX;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* From a temporary destination find the clientId of the Connection that created it
|
||||||
|
*
|
||||||
|
* @param destination
|
||||||
|
* @return the clientId or null if not a temporary destination
|
||||||
|
*/
|
||||||
|
public static String GetClientId(ActiveMQDestination destination) {
|
||||||
|
String answer = null;
|
||||||
|
if (destination != null && destination.IsTemporary()) {
|
||||||
|
String name = destination.PhysicalName;
|
||||||
|
int start = name.IndexOf(TEMP_PREFIX);
|
||||||
|
if (start >= 0) {
|
||||||
|
start += TEMP_PREFIX.Length;
|
||||||
|
int stop = name.LastIndexOf(TEMP_POSTFIX);
|
||||||
|
if (stop > start && stop < name.Length) {
|
||||||
|
answer = name.Substring(start, stop);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param o object to compare
|
||||||
|
* @return 1 if this is less than o else 0 if they are equal or -1 if this is less than o
|
||||||
|
*/
|
||||||
|
public int CompareTo(Object o) {
|
||||||
|
if (o is ActiveMQDestination) {
|
||||||
|
return CompareTo((ActiveMQDestination) o);
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Lets sort by name first then lets sort topics greater than queues
|
||||||
|
*
|
||||||
|
* @param that another destination to compare against
|
||||||
|
* @return 1 if this is less than o else 0 if they are equal or -1 if this is less than o
|
||||||
|
*/
|
||||||
|
public int CompareTo(ActiveMQDestination that) {
|
||||||
|
int answer = 0;
|
||||||
|
if (physicalName != that.physicalName) {
|
||||||
|
if (physicalName == null) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
else if (that.physicalName == null) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
answer = physicalName.CompareTo(that.physicalName);
|
||||||
|
}
|
||||||
|
if (answer == 0) {
|
||||||
|
if (IsTopic()) {
|
||||||
|
if (that.IsQueue()) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (that.IsTopic()) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the Destination type
|
||||||
|
*/
|
||||||
|
|
||||||
|
public abstract int GetDestinationType();
|
||||||
|
|
||||||
|
|
||||||
|
public String PhysicalName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.physicalName;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.physicalName = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if a temporary Destination
|
||||||
|
*
|
||||||
|
* @return true/false
|
||||||
|
*/
|
||||||
|
|
||||||
|
public bool IsTemporary() {
|
||||||
|
return GetDestinationType() == ACTIVEMQ_TEMPORARY_TOPIC ||
|
||||||
|
GetDestinationType() == ACTIVEMQ_TEMPORARY_QUEUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if a Topic Destination
|
||||||
|
*
|
||||||
|
* @return true/false
|
||||||
|
*/
|
||||||
|
|
||||||
|
public bool IsTopic() {
|
||||||
|
return GetDestinationType() == ACTIVEMQ_TOPIC ||
|
||||||
|
GetDestinationType() == ACTIVEMQ_TEMPORARY_TOPIC;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if a Queue Destination
|
||||||
|
*
|
||||||
|
* @return true/false
|
||||||
|
*/
|
||||||
|
public bool IsQueue() {
|
||||||
|
return !IsTopic();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns true if this destination represents a collection of
|
||||||
|
* destinations; allowing a set of destinations to be published to or subscribed
|
||||||
|
* from in one JMS operation.
|
||||||
|
* <p/>
|
||||||
|
* If this destination is a composite then you can call {@link #getChildDestinations()}
|
||||||
|
* to return the list of child destinations.
|
||||||
|
*
|
||||||
|
* @return true if this destination represents a collection of child destinations.
|
||||||
|
*/
|
||||||
|
public bool IsComposite() {
|
||||||
|
return physicalName.IndexOf(COMPOSITE_SEPARATOR) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a list of child destinations if this destination represents a composite
|
||||||
|
* destination.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
/*public List GetChildDestinations() {
|
||||||
|
List answer = new ArrayList();
|
||||||
|
StringTokenizer iter = new StringTokenizer(physicalName, COMPOSITE_SEPARATOR);
|
||||||
|
while (iter.hasMoreTokens()) {
|
||||||
|
String name = iter.nextToken();
|
||||||
|
Destination child = null;
|
||||||
|
if (name.StartsWith(QUEUE_PREFIX)) {
|
||||||
|
child = new ActiveMQQueue(name.Substring(QUEUE_PREFIX.Length));
|
||||||
|
}
|
||||||
|
else if (name.StartsWith(TOPIC_PREFIX)) {
|
||||||
|
child = new ActiveMQTopic(name.Substring(TOPIC_PREFIX.Length));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
child = createDestination(name);
|
||||||
|
}
|
||||||
|
answer.add(child);
|
||||||
|
}
|
||||||
|
if (answer.size() == 1) {
|
||||||
|
// lets put ourselves inside the collection
|
||||||
|
// as we are not really a composite destination
|
||||||
|
answer.set(0, this);
|
||||||
|
}
|
||||||
|
return answer;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string representation of this instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
public override String ToString() {
|
||||||
|
return this.physicalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return hashCode for this instance
|
||||||
|
*/
|
||||||
|
|
||||||
|
public override int GetHashCode() {
|
||||||
|
int answer = 37;
|
||||||
|
|
||||||
|
if (this.physicalName != null) {
|
||||||
|
answer = physicalName.GetHashCode();
|
||||||
|
}
|
||||||
|
if (IsTopic()) {
|
||||||
|
answer ^= 0xfabfab;
|
||||||
|
}
|
||||||
|
return answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* if the object passed in is equivalent, return true
|
||||||
|
*
|
||||||
|
* @param obj the object to compare
|
||||||
|
* @return true if this instance and obj are equivalent
|
||||||
|
*/
|
||||||
|
|
||||||
|
public override bool Equals(Object obj) {
|
||||||
|
bool result = this == obj;
|
||||||
|
if (!result && obj != null && obj is ActiveMQDestination) {
|
||||||
|
ActiveMQDestination other = (ActiveMQDestination) obj;
|
||||||
|
result = this.GetDestinationType() == other.GetDestinationType() &&
|
||||||
|
this.physicalName.Equals(other.physicalName);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if the destination matches multiple possible destinations
|
||||||
|
*/
|
||||||
|
public bool IsWildcard() {
|
||||||
|
if (physicalName != null) {
|
||||||
|
return physicalName.IndexOf(DestinationFilter.ANY_CHILD) >= 0
|
||||||
|
|| physicalName.IndexOf(DestinationFilter.ANY_DESCENDENT) >= 0;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Factory method to create a child destination if this destination is a composite
|
||||||
|
* @param name
|
||||||
|
* @return the created Destination
|
||||||
|
*/
|
||||||
|
public abstract ActiveMQDestination CreateDestination(String name);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
using System;
|
||||||
|
using OpenWire.Core;
|
||||||
|
using OpenWire.Core.Commands;
|
||||||
|
|
||||||
|
namespace OpenWire.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Summary description for ActiveMQQueue.
|
||||||
|
/// </summary>
|
||||||
|
public class ActiveMQQueue : ActiveMQDestination, Queue
|
||||||
|
{
|
||||||
|
public const byte ID_ActiveMQQueue = 100;
|
||||||
|
|
||||||
|
public ActiveMQQueue() : base(){}
|
||||||
|
public ActiveMQQueue(String name) : base(name){}
|
||||||
|
|
||||||
|
public String QueueName
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
return PhysicalName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetDestinationType() {
|
||||||
|
return ACTIVEMQ_QUEUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override ActiveMQDestination CreateDestination(String name) {
|
||||||
|
return new ActiveMQQueue(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
using System;
|
||||||
|
using OpenWire.Core;
|
||||||
|
using OpenWire.Core.Commands;
|
||||||
|
|
||||||
|
namespace OpenWire.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Summary description for ActiveMQTempQueue.
|
||||||
|
/// </summary>
|
||||||
|
public class ActiveMQTempQueue : ActiveMQDestination, TemporaryQueue
|
||||||
|
{
|
||||||
|
public const byte ID_ActiveMQTempQueue = 102;
|
||||||
|
|
||||||
|
public ActiveMQTempQueue() : base(){}
|
||||||
|
public ActiveMQTempQueue(String name) : base(name){}
|
||||||
|
|
||||||
|
public String GetQueueName() {
|
||||||
|
return PhysicalName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetDestinationType() {
|
||||||
|
return ACTIVEMQ_QUEUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override ActiveMQDestination CreateDestination(String name) {
|
||||||
|
return new ActiveMQTempQueue(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
using System;
|
||||||
|
using OpenWire.Core;
|
||||||
|
using OpenWire.Core.Commands;
|
||||||
|
|
||||||
|
namespace OpenWire.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Summary description for ActiveMQTopic.
|
||||||
|
/// </summary>
|
||||||
|
public class ActiveMQTopic : ActiveMQDestination, Topic
|
||||||
|
{
|
||||||
|
public const byte ID_ActiveMQTopic = 101;
|
||||||
|
|
||||||
|
public ActiveMQTopic(): base() {}
|
||||||
|
public ActiveMQTopic(String name):base(name){}
|
||||||
|
|
||||||
|
public String TopicName
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
return PhysicalName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override int GetDestinationType()
|
||||||
|
{
|
||||||
|
return ACTIVEMQ_TOPIC;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override ActiveMQDestination CreateDestination(String name)
|
||||||
|
{
|
||||||
|
return new ActiveMQTopic(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,10 +5,8 @@ namespace OpenWire.Core
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An OpenWire command
|
/// An OpenWire command
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface Command {
|
public interface Command : DataStructure {
|
||||||
|
|
||||||
int GetCommandType();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ActiveMQBytesMessage : ActiveMQMessage
|
public class ActiveMQBytesMessage : ActiveMQMessage
|
||||||
{
|
{
|
||||||
public const int ID_ActiveMQBytesMessage = 1;
|
public const byte ID_ActiveMQBytesMessage = 24;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ActiveMQBytesMessage;
|
return ID_ActiveMQBytesMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
//
|
|
||||||
// Marshalling code for Open Wire Format for ActiveMQDestination
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// NOTE!: This file is autogenerated - do not modify!
|
|
||||||
// if you need to make a change, please see the Groovy scripts in the
|
|
||||||
// activemq-openwire module
|
|
||||||
//
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
|
|
||||||
using OpenWire.Core;
|
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
|
||||||
{
|
|
||||||
public class ActiveMQDestination : AbstractCommand
|
|
||||||
{
|
|
||||||
public const int ID_ActiveMQDestination = 1;
|
|
||||||
|
|
||||||
string physicalName;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO generate Equals method
|
|
||||||
// TODO generate GetHashCode method
|
|
||||||
// TODO generate ToString method
|
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
|
||||||
return ID_ActiveMQDestination;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Properties
|
|
||||||
|
|
||||||
public string PhysicalName
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return physicalName;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
physicalName = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ActiveMQMapMessage : ActiveMQMessage
|
public class ActiveMQMapMessage : ActiveMQMessage
|
||||||
{
|
{
|
||||||
public const int ID_ActiveMQMapMessage = 1;
|
public const byte ID_ActiveMQMapMessage = 25;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ActiveMQMapMessage;
|
return ID_ActiveMQMapMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ActiveMQMessage : AbstractCommand
|
public class ActiveMQMessage : Message
|
||||||
{
|
{
|
||||||
public const int ID_ActiveMQMessage = 1;
|
public const byte ID_ActiveMQMessage = 23;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ActiveMQMessage;
|
return ID_ActiveMQMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ActiveMQObjectMessage : ActiveMQMessage
|
public class ActiveMQObjectMessage : ActiveMQMessage
|
||||||
{
|
{
|
||||||
public const int ID_ActiveMQObjectMessage = 1;
|
public const byte ID_ActiveMQObjectMessage = 26;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ActiveMQObjectMessage;
|
return ID_ActiveMQObjectMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
//
|
|
||||||
// Marshalling code for Open Wire Format for ActiveMQQueue
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// NOTE!: This file is autogenerated - do not modify!
|
|
||||||
// if you need to make a change, please see the Groovy scripts in the
|
|
||||||
// activemq-openwire module
|
|
||||||
//
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
|
|
||||||
using OpenWire.Core;
|
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
|
||||||
{
|
|
||||||
public class ActiveMQQueue : AbstractCommand
|
|
||||||
{
|
|
||||||
public const int ID_ActiveMQQueue = 1;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO generate Equals method
|
|
||||||
// TODO generate GetHashCode method
|
|
||||||
// TODO generate ToString method
|
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
|
||||||
return ID_ActiveMQQueue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Properties
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ActiveMQStreamMessage : ActiveMQMessage
|
public class ActiveMQStreamMessage : ActiveMQMessage
|
||||||
{
|
{
|
||||||
public const int ID_ActiveMQStreamMessage = 1;
|
public const byte ID_ActiveMQStreamMessage = 27;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ActiveMQStreamMessage;
|
return ID_ActiveMQStreamMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
//
|
|
||||||
// Marshalling code for Open Wire Format for ActiveMQTempDestination
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// NOTE!: This file is autogenerated - do not modify!
|
|
||||||
// if you need to make a change, please see the Groovy scripts in the
|
|
||||||
// activemq-openwire module
|
|
||||||
//
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
|
|
||||||
using OpenWire.Core;
|
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
|
||||||
{
|
|
||||||
public class ActiveMQTempDestination : AbstractCommand
|
|
||||||
{
|
|
||||||
public const int ID_ActiveMQTempDestination = 1;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO generate Equals method
|
|
||||||
// TODO generate GetHashCode method
|
|
||||||
// TODO generate ToString method
|
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
|
||||||
return ID_ActiveMQTempDestination;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Properties
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
//
|
|
||||||
// Marshalling code for Open Wire Format for ActiveMQTempQueue
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// NOTE!: This file is autogenerated - do not modify!
|
|
||||||
// if you need to make a change, please see the Groovy scripts in the
|
|
||||||
// activemq-openwire module
|
|
||||||
//
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
|
|
||||||
using OpenWire.Core;
|
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
|
||||||
{
|
|
||||||
public class ActiveMQTempQueue : AbstractCommand
|
|
||||||
{
|
|
||||||
public const int ID_ActiveMQTempQueue = 1;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO generate Equals method
|
|
||||||
// TODO generate GetHashCode method
|
|
||||||
// TODO generate ToString method
|
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
|
||||||
return ID_ActiveMQTempQueue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Properties
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
//
|
|
||||||
// Marshalling code for Open Wire Format for ActiveMQTempTopic
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// NOTE!: This file is autogenerated - do not modify!
|
|
||||||
// if you need to make a change, please see the Groovy scripts in the
|
|
||||||
// activemq-openwire module
|
|
||||||
//
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
|
|
||||||
using OpenWire.Core;
|
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
|
||||||
{
|
|
||||||
public class ActiveMQTempTopic : AbstractCommand
|
|
||||||
{
|
|
||||||
public const int ID_ActiveMQTempTopic = 1;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO generate Equals method
|
|
||||||
// TODO generate GetHashCode method
|
|
||||||
// TODO generate ToString method
|
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
|
||||||
return ID_ActiveMQTempTopic;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Properties
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ActiveMQTextMessage : ActiveMQMessage
|
public class ActiveMQTextMessage : ActiveMQMessage
|
||||||
{
|
{
|
||||||
public const int ID_ActiveMQTextMessage = 1;
|
public const byte ID_ActiveMQTextMessage = 28;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ActiveMQTextMessage;
|
return ID_ActiveMQTextMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
//
|
|
||||||
// Marshalling code for Open Wire Format for ActiveMQTopic
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// NOTE!: This file is autogenerated - do not modify!
|
|
||||||
// if you need to make a change, please see the Groovy scripts in the
|
|
||||||
// activemq-openwire module
|
|
||||||
//
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
|
|
||||||
using OpenWire.Core;
|
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
|
||||||
{
|
|
||||||
public class ActiveMQTopic : AbstractCommand
|
|
||||||
{
|
|
||||||
public const int ID_ActiveMQTopic = 1;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO generate Equals method
|
|
||||||
// TODO generate GetHashCode method
|
|
||||||
// TODO generate ToString method
|
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
|
||||||
return ID_ActiveMQTopic;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Properties
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class BaseCommand : AbstractCommand
|
public class BaseCommand : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_BaseCommand = 1;
|
public const byte ID_BaseCommand = 0;
|
||||||
|
|
||||||
short commandId;
|
short commandId;
|
||||||
bool responseRequired;
|
bool responseRequired;
|
||||||
|
@ -28,7 +28,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_BaseCommand;
|
return ID_BaseCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class BrokerId : AbstractCommand
|
public class BrokerId : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_BrokerId = 1;
|
public const byte ID_BrokerId = 124;
|
||||||
|
|
||||||
string brokerId;
|
string brokerId;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_BrokerId;
|
return ID_BrokerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class BrokerInfo : AbstractCommand
|
public class BrokerInfo : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_BrokerInfo = 1;
|
public const byte ID_BrokerInfo = 2;
|
||||||
|
|
||||||
BrokerId brokerId;
|
BrokerId brokerId;
|
||||||
string brokerURL;
|
string brokerURL;
|
||||||
|
@ -30,7 +30,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_BrokerInfo;
|
return ID_BrokerInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ConnectionId : AbstractCommand
|
public class ConnectionId : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_ConnectionId = 1;
|
public const byte ID_ConnectionId = 120;
|
||||||
|
|
||||||
string connectionId;
|
string connectionId;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ConnectionId;
|
return ID_ConnectionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ConnectionInfo : AbstractCommand
|
public class ConnectionInfo : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_ConnectionInfo = 1;
|
public const byte ID_ConnectionInfo = 3;
|
||||||
|
|
||||||
ConnectionId connectionId;
|
ConnectionId connectionId;
|
||||||
string clientId;
|
string clientId;
|
||||||
|
@ -31,7 +31,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ConnectionInfo;
|
return ID_ConnectionInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ConsumerId : AbstractCommand
|
public class ConsumerId : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_ConsumerId = 1;
|
public const byte ID_ConsumerId = 122;
|
||||||
|
|
||||||
string connectionId;
|
string connectionId;
|
||||||
long sessionId;
|
long sessionId;
|
||||||
|
@ -29,7 +29,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ConsumerId;
|
return ID_ConsumerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ConsumerInfo : AbstractCommand
|
public class ConsumerInfo : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_ConsumerInfo = 1;
|
public const byte ID_ConsumerInfo = 5;
|
||||||
|
|
||||||
ConsumerId consumerId;
|
ConsumerId consumerId;
|
||||||
bool browser;
|
bool browser;
|
||||||
|
@ -39,7 +39,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ConsumerInfo;
|
return ID_ConsumerInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ControlCommand : AbstractCommand
|
public class ControlCommand : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_ControlCommand = 1;
|
public const byte ID_ControlCommand = 14;
|
||||||
|
|
||||||
string command;
|
string command;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ControlCommand;
|
return ID_ControlCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,11 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class DataArrayResponse : AbstractCommand
|
public class DataArrayResponse : Response
|
||||||
{
|
{
|
||||||
public const int ID_DataArrayResponse = 1;
|
public const byte ID_DataArrayResponse = 33;
|
||||||
|
|
||||||
Command[] data;
|
DataStructure[] data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,14 +27,14 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_DataArrayResponse;
|
return ID_DataArrayResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Properties
|
// Properties
|
||||||
|
|
||||||
public Command[] Data
|
public DataStructure[] Data
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,11 +14,11 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class DataResponse : AbstractCommand
|
public class DataResponse : Response
|
||||||
{
|
{
|
||||||
public const int ID_DataResponse = 1;
|
public const byte ID_DataResponse = 32;
|
||||||
|
|
||||||
Command data;
|
DataStructure data;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,14 +27,14 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_DataResponse;
|
return ID_DataResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Properties
|
// Properties
|
||||||
|
|
||||||
public Command Data
|
public DataStructure Data
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class DestinationInfo : AbstractCommand
|
public class DestinationInfo : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_DestinationInfo = 1;
|
public const byte ID_DestinationInfo = 8;
|
||||||
|
|
||||||
ConnectionId connectionId;
|
ConnectionId connectionId;
|
||||||
ActiveMQDestination destination;
|
ActiveMQDestination destination;
|
||||||
|
@ -31,7 +31,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_DestinationInfo;
|
return ID_DestinationInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
//
|
||||||
|
// Marshalling code for Open Wire Format for DiscoveryEvent
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// NOTE!: This file is autogenerated - do not modify!
|
||||||
|
// if you need to make a change, please see the Groovy scripts in the
|
||||||
|
// activemq-openwire module
|
||||||
|
//
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
using OpenWire.Core;
|
||||||
|
|
||||||
|
namespace OpenWire.Core.Commands
|
||||||
|
{
|
||||||
|
public class DiscoveryEvent : AbstractCommand
|
||||||
|
{
|
||||||
|
public const byte ID_DiscoveryEvent = 40;
|
||||||
|
|
||||||
|
string serviceName;
|
||||||
|
string brokerName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// TODO generate Equals method
|
||||||
|
// TODO generate GetHashCode method
|
||||||
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
|
public override byte GetCommandType() {
|
||||||
|
return ID_DiscoveryEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Properties
|
||||||
|
|
||||||
|
public string ServiceName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return serviceName;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
serviceName = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public string BrokerName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return brokerName;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
brokerName = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -14,11 +14,11 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ExceptionResponse : AbstractCommand
|
public class ExceptionResponse : Response
|
||||||
{
|
{
|
||||||
public const int ID_ExceptionResponse = 1;
|
public const byte ID_ExceptionResponse = 31;
|
||||||
|
|
||||||
string exception;
|
byte[] exception;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,14 +27,14 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ExceptionResponse;
|
return ID_ExceptionResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Properties
|
// Properties
|
||||||
|
|
||||||
public string Exception
|
public byte[] Exception
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class FlushCommand : AbstractCommand
|
public class FlushCommand : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_FlushCommand = 1;
|
public const byte ID_FlushCommand = 15;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_FlushCommand;
|
return ID_FlushCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class IntegerResponse : AbstractCommand
|
public class IntegerResponse : Response
|
||||||
{
|
{
|
||||||
public const int ID_IntegerResponse = 1;
|
public const byte ID_IntegerResponse = 34;
|
||||||
|
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_IntegerResponse;
|
return ID_IntegerResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class JournalQueueAck : AbstractCommand
|
public class JournalQueueAck : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_JournalQueueAck = 1;
|
public const byte ID_JournalQueueAck = 52;
|
||||||
|
|
||||||
ActiveMQDestination destination;
|
ActiveMQDestination destination;
|
||||||
MessageAck messageAck;
|
MessageAck messageAck;
|
||||||
|
@ -28,7 +28,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_JournalQueueAck;
|
return ID_JournalQueueAck;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class JournalTopicAck : AbstractCommand
|
public class JournalTopicAck : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_JournalTopicAck = 1;
|
public const byte ID_JournalTopicAck = 50;
|
||||||
|
|
||||||
ActiveMQDestination destination;
|
ActiveMQDestination destination;
|
||||||
MessageId messageId;
|
MessageId messageId;
|
||||||
|
@ -32,7 +32,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_JournalTopicAck;
|
return ID_JournalTopicAck;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class JournalTrace : AbstractCommand
|
public class JournalTrace : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_JournalTrace = 1;
|
public const byte ID_JournalTrace = 53;
|
||||||
|
|
||||||
string message;
|
string message;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_JournalTrace;
|
return ID_JournalTrace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class JournalTransaction : AbstractCommand
|
public class JournalTransaction : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_JournalTransaction = 1;
|
public const byte ID_JournalTransaction = 54;
|
||||||
|
|
||||||
TransactionId transactionId;
|
TransactionId transactionId;
|
||||||
byte type;
|
byte type;
|
||||||
|
@ -29,7 +29,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_JournalTransaction;
|
return ID_JournalTransaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class KeepAliveInfo : AbstractCommand
|
public class KeepAliveInfo : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_KeepAliveInfo = 1;
|
public const byte ID_KeepAliveInfo = 10;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_KeepAliveInfo;
|
return ID_KeepAliveInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class LocalTransactionId : AbstractCommand
|
public class LocalTransactionId : TransactionId
|
||||||
{
|
{
|
||||||
public const int ID_LocalTransactionId = 1;
|
public const byte ID_LocalTransactionId = 111;
|
||||||
|
|
||||||
long transactionId;
|
long transactionId;
|
||||||
ConnectionId connectionId;
|
ConnectionId connectionId;
|
||||||
|
@ -28,7 +28,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_LocalTransactionId;
|
return ID_LocalTransactionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class Message : AbstractCommand
|
public class Message : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_Message = 1;
|
public const byte ID_Message = 0;
|
||||||
|
|
||||||
ProducerId producerId;
|
ProducerId producerId;
|
||||||
ActiveMQDestination destination;
|
ActiveMQDestination destination;
|
||||||
|
@ -35,7 +35,7 @@ namespace OpenWire.Core.Commands
|
||||||
string type;
|
string type;
|
||||||
byte[] content;
|
byte[] content;
|
||||||
byte[] marshalledProperties;
|
byte[] marshalledProperties;
|
||||||
Command dataStructure;
|
DataStructure dataStructure;
|
||||||
ConsumerId targetConsumerId;
|
ConsumerId targetConsumerId;
|
||||||
bool compressed;
|
bool compressed;
|
||||||
int redeliveryCounter;
|
int redeliveryCounter;
|
||||||
|
@ -51,7 +51,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_Message;
|
return ID_Message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ namespace OpenWire.Core.Commands
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Command DataStructure
|
public DataStructure DataStructure
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class MessageAck : AbstractCommand
|
public class MessageAck : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_MessageAck = 1;
|
public const byte ID_MessageAck = 22;
|
||||||
|
|
||||||
ActiveMQDestination destination;
|
ActiveMQDestination destination;
|
||||||
TransactionId transactionId;
|
TransactionId transactionId;
|
||||||
|
@ -33,7 +33,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_MessageAck;
|
return ID_MessageAck;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class MessageDispatch : AbstractCommand
|
public class MessageDispatch : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_MessageDispatch = 1;
|
public const byte ID_MessageDispatch = 21;
|
||||||
|
|
||||||
ConsumerId consumerId;
|
ConsumerId consumerId;
|
||||||
ActiveMQDestination destination;
|
ActiveMQDestination destination;
|
||||||
|
@ -30,7 +30,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_MessageDispatch;
|
return ID_MessageDispatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class MessageId : AbstractCommand
|
public class MessageId : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_MessageId = 1;
|
public const byte ID_MessageId = 110;
|
||||||
|
|
||||||
ProducerId producerId;
|
ProducerId producerId;
|
||||||
long producerSequenceId;
|
long producerSequenceId;
|
||||||
|
@ -29,7 +29,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_MessageId;
|
return ID_MessageId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ProducerId : AbstractCommand
|
public class ProducerId : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_ProducerId = 1;
|
public const byte ID_ProducerId = 123;
|
||||||
|
|
||||||
string connectionId;
|
string connectionId;
|
||||||
long producerId;
|
long producerId;
|
||||||
|
@ -29,7 +29,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ProducerId;
|
return ID_ProducerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ProducerInfo : AbstractCommand
|
public class ProducerInfo : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_ProducerInfo = 1;
|
public const byte ID_ProducerInfo = 6;
|
||||||
|
|
||||||
ProducerId producerId;
|
ProducerId producerId;
|
||||||
ActiveMQDestination destination;
|
ActiveMQDestination destination;
|
||||||
|
@ -29,7 +29,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ProducerInfo;
|
return ID_ProducerInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,11 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class RemoveInfo : AbstractCommand
|
public class RemoveInfo : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_RemoveInfo = 1;
|
public const byte ID_RemoveInfo = 12;
|
||||||
|
|
||||||
Command objectId;
|
DataStructure objectId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,14 +27,14 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_RemoveInfo;
|
return ID_RemoveInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Properties
|
// Properties
|
||||||
|
|
||||||
public Command ObjectId
|
public DataStructure ObjectId
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class RemoveSubscriptionInfo : AbstractCommand
|
public class RemoveSubscriptionInfo : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_RemoveSubscriptionInfo = 1;
|
public const byte ID_RemoveSubscriptionInfo = 0;
|
||||||
|
|
||||||
ConnectionId connectionId;
|
ConnectionId connectionId;
|
||||||
string subcriptionName;
|
string subcriptionName;
|
||||||
|
@ -29,7 +29,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_RemoveSubscriptionInfo;
|
return ID_RemoveSubscriptionInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class Response : AbstractCommand
|
public class Response : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_Response = 1;
|
public const byte ID_Response = 30;
|
||||||
|
|
||||||
short correlationId;
|
short correlationId;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_Response;
|
return ID_Response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class SessionId : AbstractCommand
|
public class SessionId : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_SessionId = 1;
|
public const byte ID_SessionId = 121;
|
||||||
|
|
||||||
string connectionId;
|
string connectionId;
|
||||||
long sessionId;
|
long sessionId;
|
||||||
|
@ -28,7 +28,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_SessionId;
|
return ID_SessionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class SessionInfo : AbstractCommand
|
public class SessionInfo : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_SessionInfo = 1;
|
public const byte ID_SessionInfo = 4;
|
||||||
|
|
||||||
SessionId sessionId;
|
SessionId sessionId;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_SessionInfo;
|
return ID_SessionInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class ShutdownInfo : AbstractCommand
|
public class ShutdownInfo : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_ShutdownInfo = 1;
|
public const byte ID_ShutdownInfo = 11;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_ShutdownInfo;
|
return ID_ShutdownInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class SubscriptionInfo : AbstractCommand
|
public class SubscriptionInfo : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_SubscriptionInfo = 1;
|
public const byte ID_SubscriptionInfo = 55;
|
||||||
|
|
||||||
string clientId;
|
string clientId;
|
||||||
ActiveMQDestination destination;
|
ActiveMQDestination destination;
|
||||||
|
@ -30,7 +30,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_SubscriptionInfo;
|
return ID_SubscriptionInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class TransactionId : AbstractCommand
|
public class TransactionId : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_TransactionId = 1;
|
public const byte ID_TransactionId = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_TransactionId;
|
return ID_TransactionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class TransactionInfo : AbstractCommand
|
public class TransactionInfo : BaseCommand
|
||||||
{
|
{
|
||||||
public const int ID_TransactionInfo = 1;
|
public const byte ID_TransactionInfo = 7;
|
||||||
|
|
||||||
ConnectionId connectionId;
|
ConnectionId connectionId;
|
||||||
TransactionId transactionId;
|
TransactionId transactionId;
|
||||||
|
@ -29,7 +29,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_TransactionInfo;
|
return ID_TransactionInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class WireFormatInfo : AbstractCommand
|
public class WireFormatInfo : AbstractCommand
|
||||||
{
|
{
|
||||||
public const int ID_WireFormatInfo = 1;
|
public const byte ID_WireFormatInfo = 1;
|
||||||
|
|
||||||
byte[] magic;
|
byte[] magic;
|
||||||
int version;
|
int version;
|
||||||
|
@ -29,7 +29,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_WireFormatInfo;
|
return ID_WireFormatInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,9 +14,9 @@ using OpenWire.Core;
|
||||||
|
|
||||||
namespace OpenWire.Core.Commands
|
namespace OpenWire.Core.Commands
|
||||||
{
|
{
|
||||||
public class XATransactionId : AbstractCommand
|
public class XATransactionId : TransactionId
|
||||||
{
|
{
|
||||||
public const int ID_XATransactionId = 1;
|
public const byte ID_XATransactionId = 112;
|
||||||
|
|
||||||
int formatId;
|
int formatId;
|
||||||
byte[] globalTransactionId;
|
byte[] globalTransactionId;
|
||||||
|
@ -29,7 +29,7 @@ namespace OpenWire.Core.Commands
|
||||||
// TODO generate ToString method
|
// TODO generate ToString method
|
||||||
|
|
||||||
|
|
||||||
public override int GetCommandType() {
|
public override byte GetCommandType() {
|
||||||
return ID_XATransactionId;
|
return ID_XATransactionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace OpenWire.Core
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface DataStructure {
|
public interface DataStructure {
|
||||||
|
|
||||||
int GetCommandType();
|
byte GetCommandType();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace OpenWire.Core
|
||||||
|
|
||||||
public bool matches(ActiveMQMessage message)
|
public bool matches(ActiveMQMessage message)
|
||||||
{
|
{
|
||||||
return matches(message.getJMSDestination());
|
return matches(message.Destination);
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract bool matches(ActiveMQDestination destination);
|
public abstract bool matches(ActiveMQDestination destination);
|
||||||
|
|
|
@ -17,14 +17,10 @@ using OpenWire.Core.IO;
|
||||||
|
|
||||||
namespace OpenWire.Core.IO
|
namespace OpenWire.Core.IO
|
||||||
{
|
{
|
||||||
public class ActiveMQTempDestinationMarshaller : AbstractCommandMarshaller
|
public abstract class ActiveMQTempDestinationMarshaller : AbstractCommandMarshaller
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public override Command CreateCommand() {
|
|
||||||
return new ActiveMQTempDestination();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void BuildCommand(Command command, BinaryReader dataIn) {
|
public override void BuildCommand(Command command, BinaryReader dataIn) {
|
||||||
base.BuildCommand(command, dataIn);
|
base.BuildCommand(command, dataIn);
|
||||||
|
|
||||||
|
|
|
@ -17,14 +17,10 @@ using OpenWire.Core.IO;
|
||||||
|
|
||||||
namespace OpenWire.Core.IO
|
namespace OpenWire.Core.IO
|
||||||
{
|
{
|
||||||
public class BaseCommandMarshaller : AbstractCommandMarshaller
|
public abstract class BaseCommandMarshaller : AbstractCommandMarshaller
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public override Command CreateCommand() {
|
|
||||||
return new BaseCommand();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void BuildCommand(Command command, BinaryReader dataIn) {
|
public override void BuildCommand(Command command, BinaryReader dataIn) {
|
||||||
base.BuildCommand(command, dataIn);
|
base.BuildCommand(command, dataIn);
|
||||||
|
|
||||||
|
|
|
@ -85,10 +85,6 @@ namespace OpenWire.Core.IO
|
||||||
return wireFormatInfoMarshaller.ReadCommand(dataIn);
|
return wireFormatInfoMarshaller.ReadCommand(dataIn);
|
||||||
|
|
||||||
|
|
||||||
case TransactionId.ID_TransactionId:
|
|
||||||
return transactionIdMarshaller.ReadCommand(dataIn);
|
|
||||||
|
|
||||||
|
|
||||||
case Response.ID_Response:
|
case Response.ID_Response:
|
||||||
return responseMarshaller.ReadCommand(dataIn);
|
return responseMarshaller.ReadCommand(dataIn);
|
||||||
|
|
||||||
|
@ -109,6 +105,10 @@ namespace OpenWire.Core.IO
|
||||||
return activeMQTempTopicMarshaller.ReadCommand(dataIn);
|
return activeMQTempTopicMarshaller.ReadCommand(dataIn);
|
||||||
|
|
||||||
|
|
||||||
|
case DiscoveryEvent.ID_DiscoveryEvent:
|
||||||
|
return discoveryEventMarshaller.ReadCommand(dataIn);
|
||||||
|
|
||||||
|
|
||||||
case ConnectionInfo.ID_ConnectionInfo:
|
case ConnectionInfo.ID_ConnectionInfo:
|
||||||
return connectionInfoMarshaller.ReadCommand(dataIn);
|
return connectionInfoMarshaller.ReadCommand(dataIn);
|
||||||
|
|
||||||
|
@ -117,14 +117,6 @@ namespace OpenWire.Core.IO
|
||||||
return keepAliveInfoMarshaller.ReadCommand(dataIn);
|
return keepAliveInfoMarshaller.ReadCommand(dataIn);
|
||||||
|
|
||||||
|
|
||||||
case Message.ID_Message:
|
|
||||||
return messageMarshaller.ReadCommand(dataIn);
|
|
||||||
|
|
||||||
|
|
||||||
case BaseCommand.ID_BaseCommand:
|
|
||||||
return baseCommandMarshaller.ReadCommand(dataIn);
|
|
||||||
|
|
||||||
|
|
||||||
case XATransactionId.ID_XATransactionId:
|
case XATransactionId.ID_XATransactionId:
|
||||||
return xATransactionIdMarshaller.ReadCommand(dataIn);
|
return xATransactionIdMarshaller.ReadCommand(dataIn);
|
||||||
|
|
||||||
|
@ -137,10 +129,6 @@ namespace OpenWire.Core.IO
|
||||||
return flushCommandMarshaller.ReadCommand(dataIn);
|
return flushCommandMarshaller.ReadCommand(dataIn);
|
||||||
|
|
||||||
|
|
||||||
case ActiveMQTempDestination.ID_ActiveMQTempDestination:
|
|
||||||
return activeMQTempDestinationMarshaller.ReadCommand(dataIn);
|
|
||||||
|
|
||||||
|
|
||||||
case ConsumerId.ID_ConsumerId:
|
case ConsumerId.ID_ConsumerId:
|
||||||
return consumerIdMarshaller.ReadCommand(dataIn);
|
return consumerIdMarshaller.ReadCommand(dataIn);
|
||||||
|
|
||||||
|
@ -225,201 +213,234 @@ namespace OpenWire.Core.IO
|
||||||
|
|
||||||
public static void WriteCommand(Command command, BinaryWriter dataOut)
|
public static void WriteCommand(Command command, BinaryWriter dataOut)
|
||||||
{
|
{
|
||||||
int commandID = command.CommandType;
|
byte commandID = command.GetCommandType();
|
||||||
dataOut.Write(commandID);
|
dataOut.Write(commandID);
|
||||||
switch (commandID)
|
switch (commandID)
|
||||||
{
|
{
|
||||||
|
|
||||||
case MessageId.ID_MessageId:
|
case MessageId.ID_MessageId:
|
||||||
return messageIdMarshaller.ReadCommand(dataIn);
|
messageIdMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case BrokerInfo.ID_BrokerInfo:
|
case BrokerInfo.ID_BrokerInfo:
|
||||||
return brokerInfoMarshaller.ReadCommand(dataIn);
|
brokerInfoMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ActiveMQTempQueue.ID_ActiveMQTempQueue:
|
case ActiveMQTempQueue.ID_ActiveMQTempQueue:
|
||||||
return activeMQTempQueueMarshaller.ReadCommand(dataIn);
|
activeMQTempQueueMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case LocalTransactionId.ID_LocalTransactionId:
|
case LocalTransactionId.ID_LocalTransactionId:
|
||||||
return localTransactionIdMarshaller.ReadCommand(dataIn);
|
localTransactionIdMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case RemoveSubscriptionInfo.ID_RemoveSubscriptionInfo:
|
case RemoveSubscriptionInfo.ID_RemoveSubscriptionInfo:
|
||||||
return removeSubscriptionInfoMarshaller.ReadCommand(dataIn);
|
removeSubscriptionInfoMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case IntegerResponse.ID_IntegerResponse:
|
case IntegerResponse.ID_IntegerResponse:
|
||||||
return integerResponseMarshaller.ReadCommand(dataIn);
|
integerResponseMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ActiveMQQueue.ID_ActiveMQQueue:
|
case ActiveMQQueue.ID_ActiveMQQueue:
|
||||||
return activeMQQueueMarshaller.ReadCommand(dataIn);
|
activeMQQueueMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case DestinationInfo.ID_DestinationInfo:
|
case DestinationInfo.ID_DestinationInfo:
|
||||||
return destinationInfoMarshaller.ReadCommand(dataIn);
|
destinationInfoMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ActiveMQBytesMessage.ID_ActiveMQBytesMessage:
|
case ActiveMQBytesMessage.ID_ActiveMQBytesMessage:
|
||||||
return activeMQBytesMessageMarshaller.ReadCommand(dataIn);
|
activeMQBytesMessageMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ShutdownInfo.ID_ShutdownInfo:
|
case ShutdownInfo.ID_ShutdownInfo:
|
||||||
return shutdownInfoMarshaller.ReadCommand(dataIn);
|
shutdownInfoMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case DataResponse.ID_DataResponse:
|
case DataResponse.ID_DataResponse:
|
||||||
return dataResponseMarshaller.ReadCommand(dataIn);
|
dataResponseMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case SessionId.ID_SessionId:
|
case SessionId.ID_SessionId:
|
||||||
return sessionIdMarshaller.ReadCommand(dataIn);
|
sessionIdMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case DataArrayResponse.ID_DataArrayResponse:
|
case DataArrayResponse.ID_DataArrayResponse:
|
||||||
return dataArrayResponseMarshaller.ReadCommand(dataIn);
|
dataArrayResponseMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case JournalQueueAck.ID_JournalQueueAck:
|
case JournalQueueAck.ID_JournalQueueAck:
|
||||||
return journalQueueAckMarshaller.ReadCommand(dataIn);
|
journalQueueAckMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case WireFormatInfo.ID_WireFormatInfo:
|
case WireFormatInfo.ID_WireFormatInfo:
|
||||||
return wireFormatInfoMarshaller.ReadCommand(dataIn);
|
wireFormatInfoMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
case TransactionId.ID_TransactionId:
|
|
||||||
return transactionIdMarshaller.ReadCommand(dataIn);
|
|
||||||
|
|
||||||
|
|
||||||
case Response.ID_Response:
|
case Response.ID_Response:
|
||||||
return responseMarshaller.ReadCommand(dataIn);
|
responseMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ActiveMQObjectMessage.ID_ActiveMQObjectMessage:
|
case ActiveMQObjectMessage.ID_ActiveMQObjectMessage:
|
||||||
return activeMQObjectMessageMarshaller.ReadCommand(dataIn);
|
activeMQObjectMessageMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ConsumerInfo.ID_ConsumerInfo:
|
case ConsumerInfo.ID_ConsumerInfo:
|
||||||
return consumerInfoMarshaller.ReadCommand(dataIn);
|
consumerInfoMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ConnectionId.ID_ConnectionId:
|
case ConnectionId.ID_ConnectionId:
|
||||||
return connectionIdMarshaller.ReadCommand(dataIn);
|
connectionIdMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ActiveMQTempTopic.ID_ActiveMQTempTopic:
|
case ActiveMQTempTopic.ID_ActiveMQTempTopic:
|
||||||
return activeMQTempTopicMarshaller.ReadCommand(dataIn);
|
activeMQTempTopicMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
case DiscoveryEvent.ID_DiscoveryEvent:
|
||||||
|
discoveryEventMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ConnectionInfo.ID_ConnectionInfo:
|
case ConnectionInfo.ID_ConnectionInfo:
|
||||||
return connectionInfoMarshaller.ReadCommand(dataIn);
|
connectionInfoMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case KeepAliveInfo.ID_KeepAliveInfo:
|
case KeepAliveInfo.ID_KeepAliveInfo:
|
||||||
return keepAliveInfoMarshaller.ReadCommand(dataIn);
|
keepAliveInfoMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
case Message.ID_Message:
|
|
||||||
return messageMarshaller.ReadCommand(dataIn);
|
|
||||||
|
|
||||||
|
|
||||||
case BaseCommand.ID_BaseCommand:
|
|
||||||
return baseCommandMarshaller.ReadCommand(dataIn);
|
|
||||||
|
|
||||||
|
|
||||||
case XATransactionId.ID_XATransactionId:
|
case XATransactionId.ID_XATransactionId:
|
||||||
return xATransactionIdMarshaller.ReadCommand(dataIn);
|
xATransactionIdMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case JournalTrace.ID_JournalTrace:
|
case JournalTrace.ID_JournalTrace:
|
||||||
return journalTraceMarshaller.ReadCommand(dataIn);
|
journalTraceMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case FlushCommand.ID_FlushCommand:
|
case FlushCommand.ID_FlushCommand:
|
||||||
return flushCommandMarshaller.ReadCommand(dataIn);
|
flushCommandMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
case ActiveMQTempDestination.ID_ActiveMQTempDestination:
|
|
||||||
return activeMQTempDestinationMarshaller.ReadCommand(dataIn);
|
|
||||||
|
|
||||||
|
|
||||||
case ConsumerId.ID_ConsumerId:
|
case ConsumerId.ID_ConsumerId:
|
||||||
return consumerIdMarshaller.ReadCommand(dataIn);
|
consumerIdMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case JournalTopicAck.ID_JournalTopicAck:
|
case JournalTopicAck.ID_JournalTopicAck:
|
||||||
return journalTopicAckMarshaller.ReadCommand(dataIn);
|
journalTopicAckMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ActiveMQTextMessage.ID_ActiveMQTextMessage:
|
case ActiveMQTextMessage.ID_ActiveMQTextMessage:
|
||||||
return activeMQTextMessageMarshaller.ReadCommand(dataIn);
|
activeMQTextMessageMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case BrokerId.ID_BrokerId:
|
case BrokerId.ID_BrokerId:
|
||||||
return brokerIdMarshaller.ReadCommand(dataIn);
|
brokerIdMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case MessageDispatch.ID_MessageDispatch:
|
case MessageDispatch.ID_MessageDispatch:
|
||||||
return messageDispatchMarshaller.ReadCommand(dataIn);
|
messageDispatchMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ProducerInfo.ID_ProducerInfo:
|
case ProducerInfo.ID_ProducerInfo:
|
||||||
return producerInfoMarshaller.ReadCommand(dataIn);
|
producerInfoMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case SubscriptionInfo.ID_SubscriptionInfo:
|
case SubscriptionInfo.ID_SubscriptionInfo:
|
||||||
return subscriptionInfoMarshaller.ReadCommand(dataIn);
|
subscriptionInfoMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ActiveMQMapMessage.ID_ActiveMQMapMessage:
|
case ActiveMQMapMessage.ID_ActiveMQMapMessage:
|
||||||
return activeMQMapMessageMarshaller.ReadCommand(dataIn);
|
activeMQMapMessageMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case SessionInfo.ID_SessionInfo:
|
case SessionInfo.ID_SessionInfo:
|
||||||
return sessionInfoMarshaller.ReadCommand(dataIn);
|
sessionInfoMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ActiveMQMessage.ID_ActiveMQMessage:
|
case ActiveMQMessage.ID_ActiveMQMessage:
|
||||||
return activeMQMessageMarshaller.ReadCommand(dataIn);
|
activeMQMessageMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case TransactionInfo.ID_TransactionInfo:
|
case TransactionInfo.ID_TransactionInfo:
|
||||||
return transactionInfoMarshaller.ReadCommand(dataIn);
|
transactionInfoMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ActiveMQStreamMessage.ID_ActiveMQStreamMessage:
|
case ActiveMQStreamMessage.ID_ActiveMQStreamMessage:
|
||||||
return activeMQStreamMessageMarshaller.ReadCommand(dataIn);
|
activeMQStreamMessageMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case MessageAck.ID_MessageAck:
|
case MessageAck.ID_MessageAck:
|
||||||
return messageAckMarshaller.ReadCommand(dataIn);
|
messageAckMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ProducerId.ID_ProducerId:
|
case ProducerId.ID_ProducerId:
|
||||||
return producerIdMarshaller.ReadCommand(dataIn);
|
producerIdMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ActiveMQTopic.ID_ActiveMQTopic:
|
case ActiveMQTopic.ID_ActiveMQTopic:
|
||||||
return activeMQTopicMarshaller.ReadCommand(dataIn);
|
activeMQTopicMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case JournalTransaction.ID_JournalTransaction:
|
case JournalTransaction.ID_JournalTransaction:
|
||||||
return journalTransactionMarshaller.ReadCommand(dataIn);
|
journalTransactionMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case RemoveInfo.ID_RemoveInfo:
|
case RemoveInfo.ID_RemoveInfo:
|
||||||
return removeInfoMarshaller.ReadCommand(dataIn);
|
removeInfoMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ControlCommand.ID_ControlCommand:
|
case ControlCommand.ID_ControlCommand:
|
||||||
return controlCommandMarshaller.ReadCommand(dataIn);
|
controlCommandMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
case ExceptionResponse.ID_ExceptionResponse:
|
case ExceptionResponse.ID_ExceptionResponse:
|
||||||
return exceptionResponseMarshaller.ReadCommand(dataIn);
|
exceptionResponseMarshaller.WriteCommand(command, dataOut);
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -611,18 +632,6 @@ namespace OpenWire.Core.IO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static TransactionIdMarshaller transactionIdMarshaller = new TransactionIdMarshaller();
|
|
||||||
|
|
||||||
public static TransactionIdMarshaller TransactionIdMarshaller
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return transactionIdMarshaller;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static ResponseMarshaller responseMarshaller = new ResponseMarshaller();
|
private static ResponseMarshaller responseMarshaller = new ResponseMarshaller();
|
||||||
|
|
||||||
public static ResponseMarshaller ResponseMarshaller
|
public static ResponseMarshaller ResponseMarshaller
|
||||||
|
@ -683,6 +692,18 @@ namespace OpenWire.Core.IO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private static DiscoveryEventMarshaller discoveryEventMarshaller = new DiscoveryEventMarshaller();
|
||||||
|
|
||||||
|
public static DiscoveryEventMarshaller DiscoveryEventMarshaller
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return discoveryEventMarshaller;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static ConnectionInfoMarshaller connectionInfoMarshaller = new ConnectionInfoMarshaller();
|
private static ConnectionInfoMarshaller connectionInfoMarshaller = new ConnectionInfoMarshaller();
|
||||||
|
|
||||||
public static ConnectionInfoMarshaller ConnectionInfoMarshaller
|
public static ConnectionInfoMarshaller ConnectionInfoMarshaller
|
||||||
|
@ -707,30 +728,6 @@ namespace OpenWire.Core.IO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static MessageMarshaller messageMarshaller = new MessageMarshaller();
|
|
||||||
|
|
||||||
public static MessageMarshaller MessageMarshaller
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return messageMarshaller;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static BaseCommandMarshaller baseCommandMarshaller = new BaseCommandMarshaller();
|
|
||||||
|
|
||||||
public static BaseCommandMarshaller BaseCommandMarshaller
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return baseCommandMarshaller;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static XATransactionIdMarshaller xATransactionIdMarshaller = new XATransactionIdMarshaller();
|
private static XATransactionIdMarshaller xATransactionIdMarshaller = new XATransactionIdMarshaller();
|
||||||
|
|
||||||
public static XATransactionIdMarshaller XATransactionIdMarshaller
|
public static XATransactionIdMarshaller XATransactionIdMarshaller
|
||||||
|
@ -767,18 +764,6 @@ namespace OpenWire.Core.IO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static ActiveMQTempDestinationMarshaller activeMQTempDestinationMarshaller = new ActiveMQTempDestinationMarshaller();
|
|
||||||
|
|
||||||
public static ActiveMQTempDestinationMarshaller ActiveMQTempDestinationMarshaller
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return activeMQTempDestinationMarshaller;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static ConsumerIdMarshaller consumerIdMarshaller = new ConsumerIdMarshaller();
|
private static ConsumerIdMarshaller consumerIdMarshaller = new ConsumerIdMarshaller();
|
||||||
|
|
||||||
public static ConsumerIdMarshaller ConsumerIdMarshaller
|
public static ConsumerIdMarshaller ConsumerIdMarshaller
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
|
||||||
base.BuildCommand(command, dataIn);
|
base.BuildCommand(command, dataIn);
|
||||||
|
|
||||||
DataResponse info = (DataResponse) command;
|
DataResponse info = (DataResponse) command;
|
||||||
info.Data = (DataStructure) CommandMarshallerRegistry.DataStructureMarshaller.ReadCommand(dataIn);
|
info.Data = CommandMarshallerRegistry.ReadCommand(dataIn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ namespace OpenWire.Core.IO
|
||||||
base.WriteCommand(command, dataOut);
|
base.WriteCommand(command, dataOut);
|
||||||
|
|
||||||
DataResponse info = (DataResponse) command;
|
DataResponse info = (DataResponse) command;
|
||||||
CommandMarshallerRegistry.DataStructureMarshaller.WriteCommand(info.Data, dataOut);
|
CommandMarshallerRegistry.WriteCommand((Command) info.Data, dataOut);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
|
||||||
base.BuildCommand(command, dataIn);
|
base.BuildCommand(command, dataIn);
|
||||||
|
|
||||||
ExceptionResponse info = (ExceptionResponse) command;
|
ExceptionResponse info = (ExceptionResponse) command;
|
||||||
info.Exception = (Throwable) CommandMarshallerRegistry.ThrowableMarshaller.ReadCommand(dataIn);
|
info.Exception = ReadBytes(dataIn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ namespace OpenWire.Core.IO
|
||||||
base.WriteCommand(command, dataOut);
|
base.WriteCommand(command, dataOut);
|
||||||
|
|
||||||
ExceptionResponse info = (ExceptionResponse) command;
|
ExceptionResponse info = (ExceptionResponse) command;
|
||||||
CommandMarshallerRegistry.ThrowableMarshaller.WriteCommand(info.Exception, dataOut);
|
WriteBytes(info.Exception, dataOut);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ namespace OpenWire.Core.IO
|
||||||
info.MessageSequenceId = dataIn.ReadInt64();
|
info.MessageSequenceId = dataIn.ReadInt64();
|
||||||
info.SubscritionName = dataIn.ReadString();
|
info.SubscritionName = dataIn.ReadString();
|
||||||
info.ClientId = dataIn.ReadString();
|
info.ClientId = dataIn.ReadString();
|
||||||
info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
|
info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ namespace OpenWire.Core.IO
|
||||||
dataOut.Write(info.MessageSequenceId);
|
dataOut.Write(info.MessageSequenceId);
|
||||||
dataOut.Write(info.SubscritionName);
|
dataOut.Write(info.SubscritionName);
|
||||||
dataOut.Write(info.ClientId);
|
dataOut.Write(info.ClientId);
|
||||||
CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId, dataOut);
|
CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
|
||||||
base.BuildCommand(command, dataIn);
|
base.BuildCommand(command, dataIn);
|
||||||
|
|
||||||
JournalTransaction info = (JournalTransaction) command;
|
JournalTransaction info = (JournalTransaction) command;
|
||||||
info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
|
info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn);
|
||||||
info.Type = dataIn.ReadByte();
|
info.Type = dataIn.ReadByte();
|
||||||
info.WasPrepared = dataIn.ReadBoolean();
|
info.WasPrepared = dataIn.ReadBoolean();
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ namespace OpenWire.Core.IO
|
||||||
base.WriteCommand(command, dataOut);
|
base.WriteCommand(command, dataOut);
|
||||||
|
|
||||||
JournalTransaction info = (JournalTransaction) command;
|
JournalTransaction info = (JournalTransaction) command;
|
||||||
CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId, dataOut);
|
CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut);
|
||||||
dataOut.Write(info.Type);
|
dataOut.Write(info.Type);
|
||||||
dataOut.Write(info.WasPrepared);
|
dataOut.Write(info.WasPrepared);
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace OpenWire.Core.IO
|
||||||
|
|
||||||
MessageAck info = (MessageAck) command;
|
MessageAck info = (MessageAck) command;
|
||||||
info.Destination = ReadDestination(dataIn);
|
info.Destination = ReadDestination(dataIn);
|
||||||
info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
|
info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn);
|
||||||
info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn);
|
info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn);
|
||||||
info.AckType = dataIn.ReadByte();
|
info.AckType = dataIn.ReadByte();
|
||||||
info.FirstMessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn);
|
info.FirstMessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn);
|
||||||
|
@ -44,7 +44,7 @@ namespace OpenWire.Core.IO
|
||||||
|
|
||||||
MessageAck info = (MessageAck) command;
|
MessageAck info = (MessageAck) command;
|
||||||
WriteDestination(info.Destination, dataOut);
|
WriteDestination(info.Destination, dataOut);
|
||||||
CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId, dataOut);
|
CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut);
|
||||||
CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId, dataOut);
|
CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId, dataOut);
|
||||||
dataOut.Write(info.AckType);
|
dataOut.Write(info.AckType);
|
||||||
CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.FirstMessageId, dataOut);
|
CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.FirstMessageId, dataOut);
|
||||||
|
|
|
@ -31,7 +31,7 @@ namespace OpenWire.Core.IO
|
||||||
MessageDispatch info = (MessageDispatch) command;
|
MessageDispatch info = (MessageDispatch) command;
|
||||||
info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn);
|
info.ConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn);
|
||||||
info.Destination = ReadDestination(dataIn);
|
info.Destination = ReadDestination(dataIn);
|
||||||
info.Message = (Message) CommandMarshallerRegistry.MessageMarshaller.ReadCommand(dataIn);
|
info.Message = (Message) CommandMarshallerRegistry.ReadCommand(dataIn);
|
||||||
info.RedeliveryCounter = dataIn.ReadInt32();
|
info.RedeliveryCounter = dataIn.ReadInt32();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ namespace OpenWire.Core.IO
|
||||||
MessageDispatch info = (MessageDispatch) command;
|
MessageDispatch info = (MessageDispatch) command;
|
||||||
CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId, dataOut);
|
CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.ConsumerId, dataOut);
|
||||||
WriteDestination(info.Destination, dataOut);
|
WriteDestination(info.Destination, dataOut);
|
||||||
CommandMarshallerRegistry.MessageMarshaller.WriteCommand(info.Message, dataOut);
|
CommandMarshallerRegistry.WriteCommand(info.Message, dataOut);
|
||||||
dataOut.Write(info.RedeliveryCounter);
|
dataOut.Write(info.RedeliveryCounter);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,24 +17,20 @@ using OpenWire.Core.IO;
|
||||||
|
|
||||||
namespace OpenWire.Core.IO
|
namespace OpenWire.Core.IO
|
||||||
{
|
{
|
||||||
public class MessageMarshaller : AbstractCommandMarshaller
|
public abstract class MessageMarshaller : AbstractCommandMarshaller
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public override Command CreateCommand() {
|
|
||||||
return new Message();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void BuildCommand(Command command, BinaryReader dataIn) {
|
public override void BuildCommand(Command command, BinaryReader dataIn) {
|
||||||
base.BuildCommand(command, dataIn);
|
base.BuildCommand(command, dataIn);
|
||||||
|
|
||||||
Message info = (Message) command;
|
Message info = (Message) command;
|
||||||
info.ProducerId = (ProducerId) CommandMarshallerRegistry.ProducerIdMarshaller.ReadCommand(dataIn);
|
info.ProducerId = (ProducerId) CommandMarshallerRegistry.ProducerIdMarshaller.ReadCommand(dataIn);
|
||||||
info.Destination = ReadDestination(dataIn);
|
info.Destination = ReadDestination(dataIn);
|
||||||
info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
|
info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn);
|
||||||
info.OriginalDestination = ReadDestination(dataIn);
|
info.OriginalDestination = ReadDestination(dataIn);
|
||||||
info.MessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn);
|
info.MessageId = (MessageId) CommandMarshallerRegistry.MessageIdMarshaller.ReadCommand(dataIn);
|
||||||
info.OriginalTransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
|
info.OriginalTransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn);
|
||||||
info.GroupID = dataIn.ReadString();
|
info.GroupID = dataIn.ReadString();
|
||||||
info.GroupSequence = dataIn.ReadInt32();
|
info.GroupSequence = dataIn.ReadInt32();
|
||||||
info.CorrelationId = dataIn.ReadString();
|
info.CorrelationId = dataIn.ReadString();
|
||||||
|
@ -44,9 +40,9 @@ namespace OpenWire.Core.IO
|
||||||
info.ReplyTo = ReadDestination(dataIn);
|
info.ReplyTo = ReadDestination(dataIn);
|
||||||
info.Timestamp = dataIn.ReadInt64();
|
info.Timestamp = dataIn.ReadInt64();
|
||||||
info.Type = dataIn.ReadString();
|
info.Type = dataIn.ReadString();
|
||||||
info.Content = (ByteSequence) CommandMarshallerRegistry.ByteSequenceMarshaller.ReadCommand(dataIn);
|
info.Content = ReadBytes(dataIn);
|
||||||
info.MarshalledProperties = (ByteSequence) CommandMarshallerRegistry.ByteSequenceMarshaller.ReadCommand(dataIn);
|
info.MarshalledProperties = ReadBytes(dataIn);
|
||||||
info.DataStructure = (DataStructure) CommandMarshallerRegistry.DataStructureMarshaller.ReadCommand(dataIn);
|
info.DataStructure = CommandMarshallerRegistry.ReadCommand(dataIn);
|
||||||
info.TargetConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn);
|
info.TargetConsumerId = (ConsumerId) CommandMarshallerRegistry.ConsumerIdMarshaller.ReadCommand(dataIn);
|
||||||
info.Compressed = dataIn.ReadBoolean();
|
info.Compressed = dataIn.ReadBoolean();
|
||||||
info.RedeliveryCounter = dataIn.ReadInt32();
|
info.RedeliveryCounter = dataIn.ReadInt32();
|
||||||
|
@ -63,10 +59,10 @@ namespace OpenWire.Core.IO
|
||||||
Message info = (Message) command;
|
Message info = (Message) command;
|
||||||
CommandMarshallerRegistry.ProducerIdMarshaller.WriteCommand(info.ProducerId, dataOut);
|
CommandMarshallerRegistry.ProducerIdMarshaller.WriteCommand(info.ProducerId, dataOut);
|
||||||
WriteDestination(info.Destination, dataOut);
|
WriteDestination(info.Destination, dataOut);
|
||||||
CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId, dataOut);
|
CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut);
|
||||||
WriteDestination(info.OriginalDestination, dataOut);
|
WriteDestination(info.OriginalDestination, dataOut);
|
||||||
CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.MessageId, dataOut);
|
CommandMarshallerRegistry.MessageIdMarshaller.WriteCommand(info.MessageId, dataOut);
|
||||||
CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.OriginalTransactionId, dataOut);
|
CommandMarshallerRegistry.WriteCommand(info.OriginalTransactionId, dataOut);
|
||||||
dataOut.Write(info.GroupID);
|
dataOut.Write(info.GroupID);
|
||||||
dataOut.Write(info.GroupSequence);
|
dataOut.Write(info.GroupSequence);
|
||||||
dataOut.Write(info.CorrelationId);
|
dataOut.Write(info.CorrelationId);
|
||||||
|
@ -76,9 +72,9 @@ namespace OpenWire.Core.IO
|
||||||
WriteDestination(info.ReplyTo, dataOut);
|
WriteDestination(info.ReplyTo, dataOut);
|
||||||
dataOut.Write(info.Timestamp);
|
dataOut.Write(info.Timestamp);
|
||||||
dataOut.Write(info.Type);
|
dataOut.Write(info.Type);
|
||||||
CommandMarshallerRegistry.ByteSequenceMarshaller.WriteCommand(info.Content, dataOut);
|
WriteBytes(info.Content, dataOut);
|
||||||
CommandMarshallerRegistry.ByteSequenceMarshaller.WriteCommand(info.MarshalledProperties, dataOut);
|
WriteBytes(info.MarshalledProperties, dataOut);
|
||||||
CommandMarshallerRegistry.DataStructureMarshaller.WriteCommand(info.DataStructure, dataOut);
|
CommandMarshallerRegistry.WriteCommand((Command) info.DataStructure, dataOut);
|
||||||
CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.TargetConsumerId, dataOut);
|
CommandMarshallerRegistry.ConsumerIdMarshaller.WriteCommand(info.TargetConsumerId, dataOut);
|
||||||
dataOut.Write(info.Compressed);
|
dataOut.Write(info.Compressed);
|
||||||
dataOut.Write(info.RedeliveryCounter);
|
dataOut.Write(info.RedeliveryCounter);
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace OpenWire.Core.IO
|
||||||
base.BuildCommand(command, dataIn);
|
base.BuildCommand(command, dataIn);
|
||||||
|
|
||||||
RemoveInfo info = (RemoveInfo) command;
|
RemoveInfo info = (RemoveInfo) command;
|
||||||
info.ObjectId = (DataStructure) CommandMarshallerRegistry.DataStructureMarshaller.ReadCommand(dataIn);
|
info.ObjectId = CommandMarshallerRegistry.ReadCommand(dataIn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ namespace OpenWire.Core.IO
|
||||||
base.WriteCommand(command, dataOut);
|
base.WriteCommand(command, dataOut);
|
||||||
|
|
||||||
RemoveInfo info = (RemoveInfo) command;
|
RemoveInfo info = (RemoveInfo) command;
|
||||||
CommandMarshallerRegistry.DataStructureMarshaller.WriteCommand(info.ObjectId, dataOut);
|
CommandMarshallerRegistry.WriteCommand((Command) info.ObjectId, dataOut);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,14 +17,10 @@ using OpenWire.Core.IO;
|
||||||
|
|
||||||
namespace OpenWire.Core.IO
|
namespace OpenWire.Core.IO
|
||||||
{
|
{
|
||||||
public class TransactionIdMarshaller : AbstractCommandMarshaller
|
public abstract class TransactionIdMarshaller : AbstractCommandMarshaller
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public override Command CreateCommand() {
|
|
||||||
return new TransactionId();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void BuildCommand(Command command, BinaryReader dataIn) {
|
public override void BuildCommand(Command command, BinaryReader dataIn) {
|
||||||
base.BuildCommand(command, dataIn);
|
base.BuildCommand(command, dataIn);
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace OpenWire.Core.IO
|
||||||
|
|
||||||
TransactionInfo info = (TransactionInfo) command;
|
TransactionInfo info = (TransactionInfo) command;
|
||||||
info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn);
|
info.ConnectionId = (ConnectionId) CommandMarshallerRegistry.ConnectionIdMarshaller.ReadCommand(dataIn);
|
||||||
info.TransactionId = (TransactionId) CommandMarshallerRegistry.TransactionIdMarshaller.ReadCommand(dataIn);
|
info.TransactionId = (TransactionId) CommandMarshallerRegistry.ReadCommand(dataIn);
|
||||||
info.Type = dataIn.ReadByte();
|
info.Type = dataIn.ReadByte();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@ namespace OpenWire.Core.IO
|
||||||
|
|
||||||
TransactionInfo info = (TransactionInfo) command;
|
TransactionInfo info = (TransactionInfo) command;
|
||||||
CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut);
|
CommandMarshallerRegistry.ConnectionIdMarshaller.WriteCommand(info.ConnectionId, dataOut);
|
||||||
CommandMarshallerRegistry.TransactionIdMarshaller.WriteCommand(info.TransactionId, dataOut);
|
CommandMarshallerRegistry.WriteCommand(info.TransactionId, dataOut);
|
||||||
dataOut.Write(info.Type);
|
dataOut.Write(info.Type);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,20 +6,11 @@ namespace OpenWire.Core
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Summary description for Queue.
|
/// Summary description for Queue.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Queue : Destination {
|
public interface Queue : Destination {
|
||||||
public Queue() : base(){}
|
|
||||||
public Queue(String name) : base(name){}
|
|
||||||
|
|
||||||
public String GetQueueName() {
|
|
||||||
return base.GetPhysicalName();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override int GetDestinationType() {
|
|
||||||
return ACTIVEMQ_QUEUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override ActiveMQDestination CreateDestination(String name) {
|
String QueueName
|
||||||
return new ActiveMQQueue(name);
|
{
|
||||||
|
get;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
using System;
|
||||||
|
using OpenWire.Core.Commands;
|
||||||
|
|
||||||
|
namespace OpenWire.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Summary description for TemporaryTopic.
|
||||||
|
/// </summary>
|
||||||
|
public interface TemporaryTopic : Destination
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,25 +6,12 @@ namespace OpenWire.Core
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Summary description for Topic.
|
/// Summary description for Topic.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Topic : Destination
|
public interface Topic : Destination
|
||||||
{
|
{
|
||||||
public Topic(): base() {}
|
|
||||||
public Topic(String name):base(name){}
|
|
||||||
|
|
||||||
public String GetTopicName()
|
|
||||||
{
|
|
||||||
return super.GetPhysicalName();
|
|
||||||
}
|
|
||||||
public override int GetDestinationType()
|
|
||||||
{
|
|
||||||
return ACTIVEMQ_TOPIC;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
String TopicName
|
||||||
public override ActiveMQDestination CreateDestination(String name)
|
|
||||||
{
|
{
|
||||||
return new ActiveMQTopic(name);
|
get;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue