summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/messaging
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/messaging')
-rw-r--r--cpp/src/qpid/messaging/Receiver.cpp2
-rw-r--r--cpp/src/qpid/messaging/ReceiverImpl.h1
-rw-r--r--cpp/src/qpid/messaging/Sender.cpp1
-rw-r--r--cpp/src/qpid/messaging/SenderImpl.h1
-rw-r--r--cpp/src/qpid/messaging/Session.cpp11
-rw-r--r--cpp/src/qpid/messaging/SessionImpl.h2
6 files changed, 17 insertions, 1 deletions
diff --git a/cpp/src/qpid/messaging/Receiver.cpp b/cpp/src/qpid/messaging/Receiver.cpp
index ac5d93319f..17bad6baed 100644
--- a/cpp/src/qpid/messaging/Receiver.cpp
+++ b/cpp/src/qpid/messaging/Receiver.cpp
@@ -47,5 +47,5 @@ uint32_t Receiver::getCapacity() { return impl->getCapacity(); }
uint32_t Receiver::available() { return impl->available(); }
uint32_t Receiver::pendingAck() { return impl->pendingAck(); }
void Receiver::cancel() { impl->cancel(); }
-
+const std::string& Receiver::getName() const { return impl->getName(); }
}} // namespace qpid::messaging
diff --git a/cpp/src/qpid/messaging/ReceiverImpl.h b/cpp/src/qpid/messaging/ReceiverImpl.h
index 5a057ba34e..3d60437aba 100644
--- a/cpp/src/qpid/messaging/ReceiverImpl.h
+++ b/cpp/src/qpid/messaging/ReceiverImpl.h
@@ -46,6 +46,7 @@ class ReceiverImpl : public virtual qpid::RefCounted
virtual uint32_t available() = 0;
virtual uint32_t pendingAck() = 0;
virtual void cancel() = 0;
+ virtual const std::string& getName() const = 0;
};
}} // namespace qpid::messaging
diff --git a/cpp/src/qpid/messaging/Sender.cpp b/cpp/src/qpid/messaging/Sender.cpp
index 62b2944701..6087af3514 100644
--- a/cpp/src/qpid/messaging/Sender.cpp
+++ b/cpp/src/qpid/messaging/Sender.cpp
@@ -43,5 +43,6 @@ void Sender::cancel() { impl->cancel(); }
void Sender::setCapacity(uint32_t c) { impl->setCapacity(c); }
uint32_t Sender::getCapacity() { return impl->getCapacity(); }
uint32_t Sender::pending() { return impl->pending(); }
+const std::string& Sender::getName() const { return impl->getName(); }
}} // namespace qpid::messaging
diff --git a/cpp/src/qpid/messaging/SenderImpl.h b/cpp/src/qpid/messaging/SenderImpl.h
index fa3794ca4e..058ecf96f8 100644
--- a/cpp/src/qpid/messaging/SenderImpl.h
+++ b/cpp/src/qpid/messaging/SenderImpl.h
@@ -40,6 +40,7 @@ class SenderImpl : public virtual qpid::RefCounted
virtual void setCapacity(uint32_t) = 0;
virtual uint32_t getCapacity() = 0;
virtual uint32_t pending() = 0;
+ virtual const std::string& getName() const = 0;
private:
};
}} // namespace qpid::messaging
diff --git a/cpp/src/qpid/messaging/Session.cpp b/cpp/src/qpid/messaging/Session.cpp
index 53e85d53b1..5c702051d7 100644
--- a/cpp/src/qpid/messaging/Session.cpp
+++ b/cpp/src/qpid/messaging/Session.cpp
@@ -89,4 +89,15 @@ Receiver Session::nextReceiver(qpid::sys::Duration timeout)
uint32_t Session::available() { return impl->available(); }
uint32_t Session::pendingAck() { return impl->pendingAck(); }
+Sender Session::getSender(const std::string& name) const
+{
+ return impl->getSender(name);
+}
+Receiver Session::getReceiver(const std::string& name) const
+{
+ return impl->getReceiver(name);
+}
+
+KeyError::KeyError(const std::string& msg) : Exception(msg) {}
+
}} // namespace qpid::messaging
diff --git a/cpp/src/qpid/messaging/SessionImpl.h b/cpp/src/qpid/messaging/SessionImpl.h
index b68baf821c..c4139a27ea 100644
--- a/cpp/src/qpid/messaging/SessionImpl.h
+++ b/cpp/src/qpid/messaging/SessionImpl.h
@@ -54,6 +54,8 @@ class SessionImpl : public virtual qpid::RefCounted
virtual Receiver nextReceiver(qpid::sys::Duration timeout) = 0;
virtual uint32_t available() = 0;
virtual uint32_t pendingAck() = 0;
+ virtual Sender getSender(const std::string& name) const = 0;
+ virtual Receiver getReceiver(const std::string& name) const = 0;
private:
};
}} // namespace qpid::messaging