summaryrefslogtreecommitdiff
path: root/cpp/tests/echo_service.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-02-22 23:23:52 +0000
committerAlan Conway <aconway@apache.org>2007-02-22 23:23:52 +0000
commit067f367d27bef7500410ea27c000d0ca275c748a (patch)
treeb20d2f526860870c22dbcffa3570ed347f8979ba /cpp/tests/echo_service.cpp
parent20a442ea00c82b7fd9b6b7a560916f69f3155f56 (diff)
downloadqpid-python-067f367d27bef7500410ea27c000d0ca275c748a.tar.gz
* cpp/lib/client/Basic.*, ClientChannel.*: Extracted Basic functionality
from Channel into separate Basic class. * cpp/lib/client/*, cpp/test/*: Adjusted for new Channel::getBasic() API. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@510705 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/tests/echo_service.cpp')
-rw-r--r--cpp/tests/echo_service.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/tests/echo_service.cpp b/cpp/tests/echo_service.cpp
index ff11a336fe..412ffbeb58 100644
--- a/cpp/tests/echo_service.cpp
+++ b/cpp/tests/echo_service.cpp
@@ -116,7 +116,7 @@ int main(int argc, char** argv){
//Consume from the response queue, logging all echoed message to console:
LoggingListener listener;
std::string tag;
- channel.consume(response, tag, &listener);
+ channel.getBasic().consume(response, tag, &listener);
//Process incoming requests on a new thread
channel.start();
@@ -129,7 +129,7 @@ int main(int argc, char** argv){
Message msg;
msg.getHeaders().setString("RESPONSE_QUEUE", response.getName());
msg.setData(text);
- channel.publish(msg, Exchange::STANDARD_DIRECT_EXCHANGE, echo_service);
+ channel.getBasic().publish(msg, Exchange::STANDARD_DIRECT_EXCHANGE, echo_service);
std::cout << "Enter text to send:" << std::endl;
}
@@ -158,10 +158,10 @@ int main(int argc, char** argv){
//Consume from the request queue, echoing back all messages received to the client that sent them
EchoServer server(&channel);
std::string tag = "server_tag";
- channel.consume(request, tag, &server);
+ channel.getBasic().consume(request, tag, &server);
//Process incoming requests on the main thread
- channel.run();
+ channel.getBasic().run();
connection.close();
} catch(qpid::QpidError error) {
@@ -184,7 +184,7 @@ void EchoServer::received(Message& message)
std::cout << "Echoing " << message.getData() << " back to " << name << std::endl;
//'echo' the message back:
- channel->publish(message, Exchange::STANDARD_DIRECT_EXCHANGE, name);
+ channel->getBasic().publish(message, Exchange::STANDARD_DIRECT_EXCHANGE, name);
}
}