You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@etch.apache.org by ve...@apache.org on 2012/08/02 17:36:58 UTC

svn commit: r1368546 [3/3] - in /incubator/etch/trunk/binding-cpp/runtime: include/common/ include/serialization/ include/support/ include/transport/ src/main/common/ src/main/serialization/ src/main/support/ src/main/transport/ src/main/util/ src/test...

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchDefaultDeliveryServiceTest.cpp Thu Aug  2 15:36:55 2012
@@ -134,7 +134,7 @@ TEST(EtchDeliveryServiceTest, beginCallT
   EtchValidatorLong::Get(0, val);
 
   factory->types.get("add", type);
-  type->putValidator(EtchDefaultValueFactory::_mf__messageId, val);
+  type->putValidator(EtchDefaultValueFactory::_mf__messageId(), val);
 
   //create message of type
   capu::SmartPointer<EtchMessage> message = new EtchMessage(type, factory->factory);
@@ -153,7 +153,7 @@ TEST(EtchDeliveryServiceTest, beginCallT
   MockSession1* session = new MockSession1(deliveryService);
 
   //put the stack up
-  mailboxManager->sessionNotify(new EtchString(EtchSession::UP));
+  mailboxManager->sessionNotify(new EtchString(EtchSession::UP()));
 
   //test begincall
   EtchMailbox *mail = NULL;
@@ -166,7 +166,7 @@ TEST(EtchDeliveryServiceTest, beginCallT
   message->clear();
 
   //put the stack down
-  mailboxManager->sessionNotify(new EtchString(EtchSession::DOWN));
+  mailboxManager->sessionNotify(new EtchString(EtchSession::DOWN()));
 
   delete session;
   delete factory;
@@ -187,11 +187,11 @@ TEST(EtchDeliveryServiceTest, endCallTes
 
   factory->types.get("add_result", replyType);
   factory->types.get("add", type);
-  type->putValidator(EtchDefaultValueFactory::_mf__messageId, val);
-  replyType->putValidator(EtchDefaultValueFactory::_mf__inReplyTo, val);
-  replyType->putValidator(EtchDefaultValueFactory::_mf__messageId, val);
-  replyType->putValidator(EtchDefaultValueFactory::_mf_result, val);
-  replyType->setResponseField(EtchDefaultValueFactory::_mf_result);
+  type->putValidator(EtchDefaultValueFactory::_mf__messageId(), val);
+  replyType->putValidator(EtchDefaultValueFactory::_mf__inReplyTo(), val);
+  replyType->putValidator(EtchDefaultValueFactory::_mf__messageId(), val);
+  replyType->putValidator(EtchDefaultValueFactory::_mf_result(), val);
+  replyType->setResponseField(EtchDefaultValueFactory::_mf_result());
 
   //Create messsage that will be sent
   capu::SmartPointer<EtchMessage> message = new EtchMessage(type, factory->factory);
@@ -209,7 +209,7 @@ TEST(EtchDeliveryServiceTest, endCallTes
   MockSession1* session = new MockSession1(deliveryService);
 
   //put the stack up
-  mailboxManager->sessionNotify(new EtchString(EtchSession::UP));
+  mailboxManager->sessionNotify(new EtchString(EtchSession::UP()));
 
   //performed the call
   EtchMailbox *mail;

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchMessagizerTest.cpp Thu Aug  2 15:36:55 2012
@@ -90,7 +90,7 @@ TEST(EtchMessagizerTest, constructorTest
   EtchURL u("tcp://127.0.0.1:4001");
   EtchResources r;
   EtchObject *out;
-  r.put((EtchString &) EtchTransport<EtchSessionMessage>::VALUE_FACTORY, factory, out);
+  r.put(EtchTransport<EtchSessionMessage>::VALUE_FACTORY(), factory, out);
   EtchTransportData* conn = new EtchTcpConnection(NULL, NULL, &u);
   EtchTransportPacket* pac = new EtchPacketizer(conn, &u);
   EtchSessionPacket* mes = new EtchMessagizer(pac, &u, &r);
@@ -112,7 +112,7 @@ TEST(EtchMessagizerTest, TransportContro
   EtchURL u("tcp://127.0.0.1:4001");
   EtchResources r;
   EtchObject *out;
-  r.put((EtchString &) EtchTransport<EtchSessionMessage>::VALUE_FACTORY, factory, out);
+  r.put(EtchTransport<EtchSessionMessage>::VALUE_FACTORY(), factory, out);
   EtchTransportData* conn = new EtchTcpConnection(NULL, NULL, &u);
   EtchPacketizer* pac = new EtchPacketizer(conn, &u);
   EtchMessagizer* mess = new EtchMessagizer(pac, &u, &r);
@@ -121,13 +121,13 @@ TEST(EtchMessagizerTest, TransportContro
   EtchTcpListener* transport = new EtchTcpListener(&u);
   EtchSessionListener<EtchSocket>* mSessionListener = new MockListener11(transport);
 
-  transport->transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP), new EtchInt32(1000));
+  transport->transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP()), new EtchInt32(1000));
   
-  mess->transportControl(new EtchString(EtchPacketizer::START_AND_WAIT_UP), new EtchInt32(1000));
+  mess->transportControl(new EtchString(EtchPacketizer::START_AND_WAIT_UP()), new EtchInt32(1000));
   //test transport commands
-  mess->transportControl(new EtchString(EtchPacketizer::STOP_AND_WAIT_DOWN), new EtchInt32(1000));
+  mess->transportControl(new EtchString(EtchPacketizer::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));
 
-  transport->transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN), new EtchInt32(1000));
+  transport->transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));
 
   delete mSessionListener;
   delete mess;
@@ -148,7 +148,7 @@ TEST(EtchMessagizerTest, TransportMessag
   EtchResources r;
   EtchObject *out;
   //add to the resource
-  r.put((EtchString &) EtchTransport<EtchSessionMessage>::VALUE_FACTORY, factory, out);
+  r.put(EtchTransport<EtchSessionMessage>::VALUE_FACTORY(), factory, out);
   EtchTransportData* conn = new EtchTcpConnection(NULL, NULL, &u);
   EtchPacketizer* pac = new EtchPacketizer(conn, &u);
   EtchMessagizer* mess = new EtchMessagizer(pac, &u, &r);
@@ -200,7 +200,7 @@ TEST(EtchMessagizerTest, SessionDataTest
   EtchResources r;
   EtchObject *out;
   //add the value factory to the resources
-  r.put((EtchString &) EtchTransport<EtchSessionMessage>::VALUE_FACTORY, factory, out);
+  r.put(EtchTransport<EtchSessionMessage>::VALUE_FACTORY(), factory, out);
   //create stack
   EtchTransportData* conn = new EtchTcpConnection(NULL, NULL, &u);
   EtchPacketizer* pac = new EtchPacketizer(conn, &u);

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPacketizerTest.cpp Thu Aug  2 15:36:55 2012
@@ -95,12 +95,12 @@ TEST(EtchPacketizer, TransportControlTes
   EtchSessionListener<EtchSocket>* listener = new MockListener3(transport);
 
   //Start the mock listener
-  transport->transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP), new EtchInt32(1000));
+  transport->transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP()), new EtchInt32(1000));
 
-  packetizer->transportControl(new EtchString(EtchPacketizer::START_AND_WAIT_UP), new EtchInt32(1000));
-  packetizer->transportControl(new EtchString(EtchPacketizer::STOP_AND_WAIT_DOWN), new EtchInt32(1000));
+  packetizer->transportControl(new EtchString(EtchPacketizer::START_AND_WAIT_UP()), new EtchInt32(1000));
+  packetizer->transportControl(new EtchString(EtchPacketizer::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));
 
-  transport->transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN), new EtchInt32(1000));
+  transport->transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));
 
   delete packetizer;
   delete listener;
@@ -130,7 +130,7 @@ TEST(EtchPacketizer, SessionDataTest) {
   capu::SmartPointer<EtchFlexBuffer> buffer = new EtchFlexBuffer();
   //A packet is created
   capu::int32_t pktsize = 4;
-  buffer->putInt(packetizer->SIG);
+  buffer->putInt(packetizer->SIG());
   buffer->putInt(pktsize);
   buffer->put((capu::int8_t *)"test", pktsize);
   buffer->setIndex(0);
@@ -146,4 +146,4 @@ TEST(EtchPacketizer, SessionDataTest) {
   packetizer->setSession(NULL);
   delete mSessionPacker;
   delete packetizer;
-}
\ No newline at end of file
+}

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchPlainMailboxManagerTest.cpp Thu Aug  2 15:36:55 2012
@@ -118,7 +118,7 @@ TEST(EtchPlainMailboxManager, transportM
   EtchValidatorLong::Get(0, val);
 
   factory->types.get("add", type);
-  type->putValidator(EtchDefaultValueFactory::_mf__messageId, val);
+  type->putValidator(EtchDefaultValueFactory::_mf__messageId(), val);
   capu::SmartPointer<EtchMessage> message = new EtchMessage(type, factory->factory);
 
   capu::int64_t id;
@@ -157,8 +157,8 @@ TEST(EtchPlainMailboxManager, transportR
   EtchValidatorLong::Get(0, val);
 
   factory->types.get("add_result", type);
-  type->putValidator(EtchDefaultValueFactory::_mf__messageId, val);
-  type->putValidator(EtchDefaultValueFactory::_mf__inReplyTo, val);
+  type->putValidator(EtchDefaultValueFactory::_mf__messageId(), val);
+  type->putValidator(EtchDefaultValueFactory::_mf__inReplyTo(), val);
   capu::SmartPointer<EtchMessage> message = new EtchMessage(type, factory->factory);
 
   capu::int64_t id;
@@ -199,7 +199,7 @@ TEST(EtchPlainMailboxManager, transportC
   EtchValidatorLong::Get(0, val);
 
   factory->types.get("add", type);
-  type->putValidator(EtchDefaultValueFactory::_mf__messageId, val);
+  type->putValidator(EtchDefaultValueFactory::_mf__messageId(), val);
   capu::SmartPointer<EtchMessage> message = new EtchMessage(type, factory->factory);
 
   capu::int64_t id;
@@ -215,7 +215,7 @@ TEST(EtchPlainMailboxManager, transportC
 
   manager->setSession(&session);
   //in order to notify upper layers that the connection is open
-  manager->sessionNotify(new EtchString(EtchSession::UP));
+  manager->sessionNotify(new EtchString(EtchSession::UP()));
 
   EtchMailbox *mail;
   EXPECT_TRUE(ETCH_OK == manager->transportCall(NULL, message, mail));
@@ -240,7 +240,7 @@ TEST(EtchPlainMailboxManager, replicated
   EtchValidatorLong::Get(0, val);
 
   factory->types.get("add", type);
-  type->putValidator(EtchDefaultValueFactory::_mf__messageId, val);
+  type->putValidator(EtchDefaultValueFactory::_mf__messageId(), val);
   capu::SmartPointer<EtchMessage> message = new EtchMessage(type, factory->factory);
 
   capu::int64_t id;
@@ -259,7 +259,7 @@ TEST(EtchPlainMailboxManager, replicated
 
   manager->setSession(&session);
   //in order to notify upper layers that the connection is open
-  manager->sessionNotify(new EtchString(EtchSession::UP));
+  manager->sessionNotify(new EtchString(EtchSession::UP()));
 
   EtchMailbox *mail;
   EXPECT_TRUE(ETCH_ERROR == manager->transportCall(NULL, message, mail));
@@ -287,9 +287,9 @@ TEST(EtchPlainMailboxManager, sessionMes
 
   factory->types.get("add_result", replyType);
   factory->types.get("add", type);
-  type->putValidator(EtchDefaultValueFactory::_mf__messageId, val);
-  replyType->putValidator(EtchDefaultValueFactory::_mf__inReplyTo, val);
-  replyType->putValidator(EtchDefaultValueFactory::_mf__messageId, val);
+  type->putValidator(EtchDefaultValueFactory::_mf__messageId(), val);
+  replyType->putValidator(EtchDefaultValueFactory::_mf__inReplyTo(), val);
+  replyType->putValidator(EtchDefaultValueFactory::_mf__messageId(), val);
   capu::SmartPointer<EtchMessage> message = new EtchMessage(type, factory->factory);
 
   capu::int64_t id;
@@ -305,7 +305,7 @@ TEST(EtchPlainMailboxManager, sessionMes
 
   manager->setSession(&session);
   //in order to notify upper layers that the connection is open
-  manager->sessionNotify(new EtchString(EtchSession::UP));
+  manager->sessionNotify(new EtchString(EtchSession::UP()));
 
   //perform the call
   EtchMailbox *mail;

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpConnectionTest.cpp Thu Aug  2 15:36:55 2012
@@ -91,15 +91,15 @@ TEST(EtchTcpConnection, isStartedTest) {
   EtchSessionData* mPacketizer = new MockPacketizer();
   //START THE LISTENER
   listener->setSession(mSessionListener);
-  listener->transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP), new EtchInt32(1000));
+  listener->transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP()), new EtchInt32(1000));
   //START THE TRANSPORT
   conn->setSession(mPacketizer);
-  conn->transportControl(new EtchString(EtchTcpConnection::START_AND_WAIT_UP), new EtchInt32(1000));
+  conn->transportControl(new EtchString(EtchTcpConnection::START_AND_WAIT_UP()), new EtchInt32(1000));
   EXPECT_TRUE(conn->isStarted());
   //STOP THE TRANSPORT
-  conn->transportControl(new EtchString(EtchTcpConnection::STOP_AND_WAIT_DOWN), new EtchInt32(1000));
+  conn->transportControl(new EtchString(EtchTcpConnection::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));
   //STOP THE LISTENER
-  listener->transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN), new EtchInt32(1000));
+  listener->transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));
   EXPECT_FALSE(conn->isStarted());
   conn->setSession(NULL);
 
@@ -118,15 +118,15 @@ TEST(EtchTcpConnectionAndListener, Sessi
 
   //START THE LISTENER
   listener->setSession(mSessionListener);
-  listener->transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP), new EtchInt32(1000));
+  listener->transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP()), new EtchInt32(1000));
 
   //START THE TRANSPORT
   conn->setSession(mPacketizer);
-  conn->transportControl(new EtchString(EtchTcpConnection::START_AND_WAIT_UP), new EtchInt32(1000));
+  conn->transportControl(new EtchString(EtchTcpConnection::START_AND_WAIT_UP()), new EtchInt32(1000));
 
-  conn->transportControl(new EtchString(EtchTcpConnection::STOP_AND_WAIT_DOWN), new EtchInt32(1000));
+  conn->transportControl(new EtchString(EtchTcpConnection::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));
   //STOP THE LISTENER
-  listener->transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN), new EtchInt32(1000));
+  listener->transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));
   conn->setSession(NULL);
 
   delete conn;

Modified: incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpListenerTest.cpp
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpListenerTest.cpp?rev=1368546&r1=1368545&r2=1368546&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpListenerTest.cpp (original)
+++ incubator/etch/trunk/binding-cpp/runtime/src/test/transport/EtchTcpListenerTest.cpp Thu Aug  2 15:36:55 2012
@@ -81,9 +81,9 @@ TEST(EtchTcpListener, transportControlTe
   EtchURL url("tcp://127.0.0.1:4001");
   EtchTcpListener * tcpListener = new EtchTcpListener(&url);
   tcpListener->setSession(&mock);
-  tcpListener->transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP), new EtchInt32(1000));
+  tcpListener->transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP()), new EtchInt32(1000));
   EXPECT_TRUE(tcpListener->isStarted());
-  tcpListener->transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN), new EtchInt32(1000));
+  tcpListener->transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));
   delete tcpListener;
 }
 
@@ -96,15 +96,15 @@ TEST(EtchTcpListener, isStartedTest) {
   EXPECT_FALSE(listener->isStarted());
   //START THE LISTENER
   listener->setSession(mSessionListener);
-  listener->transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP), new EtchInt32(1000));
+  listener->transportControl(new EtchString(EtchTcpListener::START_AND_WAIT_UP()), new EtchInt32(1000));
   //START THE TRANSPORT
   conn->setSession(mPacketizer);
-  conn->transportControl(new EtchString(EtchTcpConnection::START_AND_WAIT_UP), new EtchInt32(1000));
+  conn->transportControl(new EtchString(EtchTcpConnection::START_AND_WAIT_UP()), new EtchInt32(1000));
   EXPECT_TRUE(listener->isStarted());
   //STOP THE TRANSPORT
-  conn->transportControl(new EtchString(EtchTcpConnection::STOP_AND_WAIT_DOWN), new EtchInt32(1000));
+  conn->transportControl(new EtchString(EtchTcpConnection::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));
   //STOP THE LISTENER
-  listener->transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN), new EtchInt32(1000));
+  listener->transportControl(new EtchString(EtchTcpListener::STOP_AND_WAIT_DOWN()), new EtchInt32(1000));
   EXPECT_FALSE(listener->isStarted());
   listener->setSession(NULL);
   conn->setSession(NULL);
@@ -113,4 +113,4 @@ TEST(EtchTcpListener, isStartedTest) {
   delete mPacketizer;
   delete listener;
   delete conn;
-}
\ No newline at end of file
+}