activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r430504 [13/13] - in /incubator/activemq/trunk: activemq-dotnet/src/main/csharp/ActiveMQ/Commands/ activemq-dotnet/src/main/csharp/ActiveMQ/OpenWire/V2/ openwire-c/src/libopenwire/ openwire-cpp/src/main/cpp/activemq/command/ openwire-cpp/sr...
Date Thu, 10 Aug 2006 19:52:05 GMT
Added: incubator/activemq/trunk/openwire-cpp/src/marshal/TransactionInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/marshal/TransactionInfoMarshaller.cpp?rev=430504&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/TransactionInfoMarshaller.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/TransactionInfoMarshaller.cpp Thu Aug
10 12:51:56 2006
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "marshal/TransactionInfoMarshaller.hpp"
+
+using namespace apache::activemq::client::marshal;
+
+/*
+ *  Marshalling code for Open Wire Format for TransactionInfo
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ *        if you need to make a change, please see the Groovy scripts in the
+ *        activemq-core module
+ */
+
+TransactionInfoMarshaller::TransactionInfoMarshaller()
+{
+    // no-op
+}
+
+TransactionInfoMarshaller::~TransactionInfoMarshaller()
+{
+    // no-op
+}
+
+
+
+IDataStructure* TransactionInfoMarshaller::createObject() 
+{
+    return new TransactionInfo();
+}
+
+char TransactionInfoMarshaller::getDataStructureType() 
+{
+    return TransactionInfo.ID_TransactionInfo;
+}
+
+    /* 
+     * Un-marshal an object instance from the data input stream
+     */ 
+void TransactionInfoMarshaller::unmarshal(ProtocolFormat& wireFormat, Object o, BinaryReader&
dataIn, BooleanStream& bs) 
+{
+    base.unmarshal(wireFormat, o, dataIn, bs);
+
+    TransactionInfo& info = (TransactionInfo&) o;
+        info.setConnectionId((org.apache.activemq.command.ConnectionId) tightUnmarsalCachedObject(wireFormat,
dataIn, bs));
+        info.setTransactionId((org.apache.activemq.command.TransactionId) tightUnmarsalCachedObject(wireFormat,
dataIn, bs));
+        info.setType(dataIn.readByte());
+
+}
+
+
+/*
+ * Write the booleans that this object uses to a BooleanStream
+ */
+int TransactionInfoMarshaller::marshal1(ProtocolFormat& wireFormat, Object& o, BooleanStream&
bs) {
+    TransactionInfo& info = (TransactionInfo&) o;
+
+    int rc = base.marshal1(wireFormat, info, bs);
+    rc += marshal1CachedObject(wireFormat, info.getConnectionId(), bs);
+    rc += marshal1CachedObject(wireFormat, info.getTransactionId(), bs);
+    
+    return rc + 1;
+}
+
+/* 
+ * Write a object instance to data output stream
+ */
+void TransactionInfoMarshaller::marshal2(ProtocolFormat& wireFormat, Object& o, BinaryWriter&
dataOut, BooleanStream& bs) {
+    base.marshal2(wireFormat, o, dataOut, bs);
+
+    TransactionInfo& info = (TransactionInfo&) o;
+    marshal2CachedObject(wireFormat, info.getConnectionId(), dataOut, bs);
+    marshal2CachedObject(wireFormat, info.getTransactionId(), dataOut, bs);
+    DataStreamMarshaller.writeByte(info.getType(), dataOut);
+
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/TransactionInfoMarshaller.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/TransactionInfoMarshaller.cpp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: incubator/activemq/trunk/openwire-cpp/src/marshal/TransactionInfoMarshaller.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/marshal/TransactionInfoMarshaller.hpp?rev=430504&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/TransactionInfoMarshaller.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/TransactionInfoMarshaller.hpp Thu Aug
10 12:51:56 2006
@@ -0,0 +1 @@
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license
agreements.  See the NOTICE file distributed with
* this work for additional information regarding
copyright ownership.
* The ASF licenses this file to You under the Apache License, Version
2.0
* (the "License"); you may not use this file except in compliance with
* the License.
 You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
*
Unless required by applicable law or agreed to in writing, software
* distributed under the
License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied.
* See the License for the specific language governing permissions
and
* limitations under the License.
*/
#ifndef TransactionInfoMarshaller_hpp_
#define TransactionInfoMarshaller_hpp_

#include
<string>

#include "command/IDataStructure.hpp"

/* we could cut this down  - for now
include all possible headers
  */
#include "command/BrokerId.hpp"
#include "command/ConnectionId.hpp"
#include "command/ConsumerId.hpp"
#include
"command/ProducerId.hpp"
#include "command/SessionId.hpp"

#include "io/BinaryReader.hpp"
#include
"io/BinaryWriter.hpp"

#include "command/BaseCommandMarshaller.hpp"
#include "util/ifr/p.hpp"

#include
"protocol/ProtocolFormat.hpp"

namespace apache
{
  namespace activemq
  {
    namespace client
   {
      namespace marshal
      {
        using namespace ifr ;
        using namespace
apache::activemq::client::command;
        using namespace apache::activemq::client::io;
       using namespace apache::activemq::client::protocol;

/*
 *
 */
class TransactionInfoMarshaller
: public BaseCommandMarshaller
{
public:
    TransactionInfoMarshaller() ;
    virtual ~TransactionInfoMarshaller()
;

    virtual IDataStructure* createCommand() ;
    virtual char getDataStructureType() ;
   
    virtual void unmarshal(ProtocolFormat& wireFormat, Object o, BinaryReader&

 dataIn, BooleanStream& bs) ;
    virtual int marshal1(ProtocolFormat& wireFormat,
Object& o, BooleanStream& bs) ;
    virtual void marshal2(ProtocolFormat& wireFormat,
Object& o, BinaryWriter& dataOut, BooleanStream& bs) ;
} ;

/* namespace */
 
   }
    }
  }
}
#endif /*TransactionInfoMarshaller_hpp_*/
\ No newline at end of file

Added: incubator/activemq/trunk/openwire-cpp/src/marshal/WireFormatInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/marshal/WireFormatInfoMarshaller.cpp?rev=430504&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/WireFormatInfoMarshaller.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/WireFormatInfoMarshaller.cpp Thu Aug
10 12:51:56 2006
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "marshal/WireFormatInfoMarshaller.hpp"
+
+using namespace apache::activemq::client::marshal;
+
+/*
+ *  Marshalling code for Open Wire Format for WireFormatInfo
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ *        if you need to make a change, please see the Groovy scripts in the
+ *        activemq-core module
+ */
+
+WireFormatInfoMarshaller::WireFormatInfoMarshaller()
+{
+    // no-op
+}
+
+WireFormatInfoMarshaller::~WireFormatInfoMarshaller()
+{
+    // no-op
+}
+
+
+
+IDataStructure* WireFormatInfoMarshaller::createObject() 
+{
+    return new WireFormatInfo();
+}
+
+char WireFormatInfoMarshaller::getDataStructureType() 
+{
+    return WireFormatInfo.ID_WireFormatInfo;
+}
+
+    /* 
+     * Un-marshal an object instance from the data input stream
+     */ 
+void WireFormatInfoMarshaller::unmarshal(ProtocolFormat& wireFormat, Object o, BinaryReader&
dataIn, BooleanStream& bs) 
+{
+    base.unmarshal(wireFormat, o, dataIn, bs);
+
+    WireFormatInfo& info = (WireFormatInfo&) o;
+
+    info.beforeUnmarshall(wireFormat);
+        
+        info.setMagic(tightUnmarshalConstByteArray(dataIn, bs, 8));
+        info.setVersion(dataIn.readInt());
+        info.setMarshalledProperties(tightUnmarshalByteSequence(dataIn, bs));
+
+    info.afterUnmarshall(wireFormat);
+
+}
+
+
+/*
+ * Write the booleans that this object uses to a BooleanStream
+ */
+int WireFormatInfoMarshaller::marshal1(ProtocolFormat& wireFormat, Object& o, BooleanStream&
bs) {
+    WireFormatInfo& info = (WireFormatInfo&) o;
+
+    info.beforeMarshall(wireFormat);
+
+    int rc = base.marshal1(wireFormat, info, bs);
+            bs.writeBoolean(info.getMarshalledProperties()!=null);
+    rc += info.getMarshalledProperties()==null ? 0 : info.getMarshalledProperties().Length+4;
+
+    return rc + 9;
+}
+
+/* 
+ * Write a object instance to data output stream
+ */
+void WireFormatInfoMarshaller::marshal2(ProtocolFormat& wireFormat, Object& o, BinaryWriter&
dataOut, BooleanStream& bs) {
+    base.marshal2(wireFormat, o, dataOut, bs);
+
+    WireFormatInfo& info = (WireFormatInfo&) o;
+    dataOut.write(info.getMagic(), 0, 8);
+    DataStreamMarshaller.writeInt(info.getVersion(), dataOut);
+    if(bs.readBoolean()) {
+       DataStreamMarshaller.writeInt(info.getMarshalledProperties().Length, dataOut);
+       dataOut.write(info.getMarshalledProperties());
+    }
+
+    info.afterMarshall(wireFormat);
+
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/WireFormatInfoMarshaller.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/WireFormatInfoMarshaller.cpp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: incubator/activemq/trunk/openwire-cpp/src/marshal/WireFormatInfoMarshaller.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/marshal/WireFormatInfoMarshaller.hpp?rev=430504&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/WireFormatInfoMarshaller.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/WireFormatInfoMarshaller.hpp Thu Aug
10 12:51:56 2006
@@ -0,0 +1 @@
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license
agreements.  See the NOTICE file distributed with
* this work for additional information regarding
copyright ownership.
* The ASF licenses this file to You under the Apache License, Version
2.0
* (the "License"); you may not use this file except in compliance with
* the License.
 You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
*
Unless required by applicable law or agreed to in writing, software
* distributed under the
License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied.
* See the License for the specific language governing permissions
and
* limitations under the License.
*/
#ifndef WireFormatInfoMarshaller_hpp_
#define WireFormatInfoMarshaller_hpp_

#include
<string>

#include "command/IDataStructure.hpp"

/* we could cut this down  - for now
include all possible headers *
 /
#include "command/BrokerId.hpp"
#include "command/ConnectionId.hpp"
#include "command/ConsumerId.hpp"
#include
"command/ProducerId.hpp"
#include "command/SessionId.hpp"

#include "io/BinaryReader.hpp"
#include
"io/BinaryWriter.hpp"

#include "command/BaseDataStreamMarshaller.hpp"
#include "util/ifr/p.hpp"

#include
"protocol/ProtocolFormat.hpp"

namespace apache
{
  namespace activemq
  {
    namespace client
   {
      namespace marshal
      {
        using namespace ifr ;
        using namespace
apache::activemq::client::command;
        using namespace apache::activemq::client::io;
       using namespace apache::activemq::client::protocol;

/*
 *
 */
class WireFormatInfoMarshaller
: public BaseDataStreamMarshaller
{
public:
    WireFormatInfoMarshaller() ;
    virtual ~WireFormatInfoMarshaller()
;

    virtual IDataStructure* createCommand() ;
    virtual char getDataStructureType() ;
   
    virtual void unmarshal(ProtocolFormat& wireFormat, Object o, BinaryReader&
  dataIn, BooleanStream& bs) ;
    virtual int marshal1(ProtocolFormat& wireFormat,
Object& o, BooleanStream& bs) ;
    virtual void marshal2(ProtocolFormat& wireFormat,
Object& o, BinaryWriter& dataOut, BooleanStream& bs) ;
} ;

/* namespace */
 
   }
    }
  }
}
#endif /*WireFormatInfoMarshaller_hpp_*/
\ No newline at end of file

Added: incubator/activemq/trunk/openwire-cpp/src/marshal/XATransactionIdMarshaller.cpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/marshal/XATransactionIdMarshaller.cpp?rev=430504&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/XATransactionIdMarshaller.cpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/XATransactionIdMarshaller.cpp Thu Aug
10 12:51:56 2006
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "marshal/XATransactionIdMarshaller.hpp"
+
+using namespace apache::activemq::client::marshal;
+
+/*
+ *  Marshalling code for Open Wire Format for XATransactionId
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ *        if you need to make a change, please see the Groovy scripts in the
+ *        activemq-core module
+ */
+
+XATransactionIdMarshaller::XATransactionIdMarshaller()
+{
+    // no-op
+}
+
+XATransactionIdMarshaller::~XATransactionIdMarshaller()
+{
+    // no-op
+}
+
+
+
+IDataStructure* XATransactionIdMarshaller::createObject() 
+{
+    return new XATransactionId();
+}
+
+char XATransactionIdMarshaller::getDataStructureType() 
+{
+    return XATransactionId.ID_XATransactionId;
+}
+
+    /* 
+     * Un-marshal an object instance from the data input stream
+     */ 
+void XATransactionIdMarshaller::unmarshal(ProtocolFormat& wireFormat, Object o, BinaryReader&
dataIn, BooleanStream& bs) 
+{
+    base.unmarshal(wireFormat, o, dataIn, bs);
+
+    XATransactionId& info = (XATransactionId&) o;
+        info.setFormatId(dataIn.readInt());
+        info.setGlobalTransactionId(tightUnmarshalByteArray(dataIn, bs));
+        info.setBranchQualifier(tightUnmarshalByteArray(dataIn, bs));
+
+}
+
+
+/*
+ * Write the booleans that this object uses to a BooleanStream
+ */
+int XATransactionIdMarshaller::marshal1(ProtocolFormat& wireFormat, Object& o, BooleanStream&
bs) {
+    XATransactionId& info = (XATransactionId&) o;
+
+    int rc = base.marshal1(wireFormat, info, bs);
+        bs.writeBoolean(info.getGlobalTransactionId()!=null);
+    rc += info.getGlobalTransactionId()==null ? 0 : info.getGlobalTransactionId().Length+4;
+    bs.writeBoolean(info.getBranchQualifier()!=null);
+    rc += info.getBranchQualifier()==null ? 0 : info.getBranchQualifier().Length+4;
+
+    return rc + 1;
+}
+
+/* 
+ * Write a object instance to data output stream
+ */
+void XATransactionIdMarshaller::marshal2(ProtocolFormat& wireFormat, Object& o, BinaryWriter&
dataOut, BooleanStream& bs) {
+    base.marshal2(wireFormat, o, dataOut, bs);
+
+    XATransactionId& info = (XATransactionId&) o;
+    DataStreamMarshaller.writeInt(info.getFormatId(), dataOut);
+    if(bs.readBoolean()) {
+       DataStreamMarshaller.writeInt(info.getGlobalTransactionId().Length, dataOut);
+       dataOut.write(info.getGlobalTransactionId());
+    }
+    if(bs.readBoolean()) {
+       DataStreamMarshaller.writeInt(info.getBranchQualifier().Length, dataOut);
+       dataOut.write(info.getBranchQualifier());
+    }
+
+}

Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/XATransactionIdMarshaller.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/activemq/trunk/openwire-cpp/src/marshal/XATransactionIdMarshaller.cpp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: incubator/activemq/trunk/openwire-cpp/src/marshal/XATransactionIdMarshaller.hpp
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/openwire-cpp/src/marshal/XATransactionIdMarshaller.hpp?rev=430504&view=auto
==============================================================================
--- incubator/activemq/trunk/openwire-cpp/src/marshal/XATransactionIdMarshaller.hpp (added)
+++ incubator/activemq/trunk/openwire-cpp/src/marshal/XATransactionIdMarshaller.hpp Thu Aug
10 12:51:56 2006
@@ -0,0 +1 @@
+/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license
agreements.  See the NOTICE file distributed with
* this work for additional information regarding
copyright ownership.
* The ASF licenses this file to You under the Apache License, Version
2.0
* (the "License"); you may not use this file except in compliance with
* the License.
 You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
*
Unless required by applicable law or agreed to in writing, software
* distributed under the
License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied.
* See the License for the specific language governing permissions
and
* limitations under the License.
*/
#ifndef XATransactionIdMarshaller_hpp_
#define XATransactionIdMarshaller_hpp_

#include
<string>

#include "command/IDataStructure.hpp"

/* we could cut this down  - for now
include all possible headers
  */
#include "command/BrokerId.hpp"
#include "command/ConnectionId.hpp"
#include "command/ConsumerId.hpp"
#include
"command/ProducerId.hpp"
#include "command/SessionId.hpp"

#include "io/BinaryReader.hpp"
#include
"io/BinaryWriter.hpp"

#include "command/TransactionIdMarshaller.hpp"
#include "util/ifr/p.hpp"

#include
"protocol/ProtocolFormat.hpp"

namespace apache
{
  namespace activemq
  {
    namespace client
   {
      namespace marshal
      {
        using namespace ifr ;
        using namespace
apache::activemq::client::command;
        using namespace apache::activemq::client::io;
       using namespace apache::activemq::client::protocol;

/*
 *
 */
class XATransactionIdMarshaller
: public TransactionIdMarshaller
{
public:
    XATransactionIdMarshaller() ;
    virtual ~XATransactionIdMarshaller()
;

    virtual IDataStructure* createCommand() ;
    virtual char getDataStructureType() ;
   
    virtual void unmarshal(ProtocolFormat& wireFormat, Object o, BinaryRead
 er& dataIn, BooleanStream& bs) ;
    virtual int marshal1(ProtocolFormat& wireFormat,
Object& o, BooleanStream& bs) ;
    virtual void marshal2(ProtocolFormat& wireFormat,
Object& o, BinaryWriter& dataOut, BooleanStream& bs) ;
} ;

/* namespace */
 
   }
    }
  }
}
#endif /*XATransactionIdMarshaller_hpp_*/
\ No newline at end of file



Mime
View raw message