summaryrefslogtreecommitdiff
path: root/cpp/src/qpid
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2010-01-27 10:42:19 +0000
committerGordon Sim <gsim@apache.org>2010-01-27 10:42:19 +0000
commitf13dceb97198486cd9bd9574babac6b39d05b1a6 (patch)
tree3e875358e2ba2a49fb7a27815c22a675e4f2e45b /cpp/src/qpid
parentc5f105c31896a42c4a192b9585016aa92285e6ff (diff)
downloadqpid-python-f13dceb97198486cd9bd9574babac6b39d05b1a6.tar.gz
QPID-664: change cancel() to close() for consistency
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@903599 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
-rw-r--r--cpp/src/qpid/client/amqp0_10/ReceiverImpl.cpp6
-rw-r--r--cpp/src/qpid/client/amqp0_10/ReceiverImpl.h10
-rw-r--r--cpp/src/qpid/client/amqp0_10/SenderImpl.cpp6
-rw-r--r--cpp/src/qpid/client/amqp0_10/SenderImpl.h10
-rw-r--r--cpp/src/qpid/client/amqp0_10/SessionImpl.cpp6
-rw-r--r--cpp/src/qpid/messaging/Receiver.cpp2
-rw-r--r--cpp/src/qpid/messaging/ReceiverImpl.h2
-rw-r--r--cpp/src/qpid/messaging/Sender.cpp2
-rw-r--r--cpp/src/qpid/messaging/SenderImpl.h2
9 files changed, 23 insertions, 23 deletions
diff --git a/cpp/src/qpid/client/amqp0_10/ReceiverImpl.cpp b/cpp/src/qpid/client/amqp0_10/ReceiverImpl.cpp
index bc5c53fde6..1f5c3162e5 100644
--- a/cpp/src/qpid/client/amqp0_10/ReceiverImpl.cpp
+++ b/cpp/src/qpid/client/amqp0_10/ReceiverImpl.cpp
@@ -68,9 +68,9 @@ bool ReceiverImpl::fetch(qpid::messaging::Message& message, qpid::sys::Duration
return f.result;
}
-void ReceiverImpl::cancel()
+void ReceiverImpl::close()
{
- execute<Cancel>();
+ execute<Close>();
}
void ReceiverImpl::start()
@@ -167,7 +167,7 @@ bool ReceiverImpl::fetchImpl(qpid::messaging::Message& message, qpid::sys::Durat
}
}
-void ReceiverImpl::cancelImpl()
+void ReceiverImpl::closeImpl()
{
if (state != CANCELLED) {
state = CANCELLED;
diff --git a/cpp/src/qpid/client/amqp0_10/ReceiverImpl.h b/cpp/src/qpid/client/amqp0_10/ReceiverImpl.h
index d40aac4058..0dcca3ac07 100644
--- a/cpp/src/qpid/client/amqp0_10/ReceiverImpl.h
+++ b/cpp/src/qpid/client/amqp0_10/ReceiverImpl.h
@@ -54,7 +54,7 @@ class ReceiverImpl : public qpid::messaging::ReceiverImpl
qpid::messaging::Message get(qpid::sys::Duration timeout);
bool fetch(qpid::messaging::Message& message, qpid::sys::Duration timeout);
qpid::messaging::Message fetch(qpid::sys::Duration timeout);
- void cancel();
+ void close();
void start();
void stop();
const std::string& getName() const;
@@ -81,7 +81,7 @@ class ReceiverImpl : public qpid::messaging::ReceiverImpl
//implementation of public facing methods
bool fetchImpl(qpid::messaging::Message& message, qpid::sys::Duration timeout);
bool getImpl(qpid::messaging::Message& message, qpid::sys::Duration timeout);
- void cancelImpl();
+ void closeImpl();
void setCapacityImpl(uint32_t);
//functors for public facing methods (allows locking and retry
@@ -115,10 +115,10 @@ class ReceiverImpl : public qpid::messaging::ReceiverImpl
void operator()() { result = impl.fetchImpl(message, timeout); }
};
- struct Cancel : Command
+ struct Close : Command
{
- Cancel(ReceiverImpl& i) : Command(i) {}
- void operator()() { impl.cancelImpl(); }
+ Close(ReceiverImpl& i) : Command(i) {}
+ void operator()() { impl.closeImpl(); }
};
struct SetCapacity : Command
diff --git a/cpp/src/qpid/client/amqp0_10/SenderImpl.cpp b/cpp/src/qpid/client/amqp0_10/SenderImpl.cpp
index 4d6b9869e6..b8dd299571 100644
--- a/cpp/src/qpid/client/amqp0_10/SenderImpl.cpp
+++ b/cpp/src/qpid/client/amqp0_10/SenderImpl.cpp
@@ -40,9 +40,9 @@ void SenderImpl::send(const qpid::messaging::Message& message)
while (f.repeat) parent.execute(f);
}
-void SenderImpl::cancel()
+void SenderImpl::close()
{
- execute<Cancel>();
+ execute<Close>();
}
void SenderImpl::setCapacity(uint32_t c)
@@ -124,7 +124,7 @@ uint32_t SenderImpl::checkPendingSends(bool flush)
return outgoing.size();
}
-void SenderImpl::cancelImpl()
+void SenderImpl::closeImpl()
{
state = CANCELLED;
sink->cancel(session, name);
diff --git a/cpp/src/qpid/client/amqp0_10/SenderImpl.h b/cpp/src/qpid/client/amqp0_10/SenderImpl.h
index 80d9843d9e..881f3c754c 100644
--- a/cpp/src/qpid/client/amqp0_10/SenderImpl.h
+++ b/cpp/src/qpid/client/amqp0_10/SenderImpl.h
@@ -49,7 +49,7 @@ class SenderImpl : public qpid::messaging::SenderImpl
SenderImpl(SessionImpl& parent, const std::string& name,
const qpid::messaging::Address& address);
void send(const qpid::messaging::Message&);
- void cancel();
+ void close();
void setCapacity(uint32_t);
uint32_t getCapacity();
uint32_t pending();
@@ -80,7 +80,7 @@ class SenderImpl : public qpid::messaging::SenderImpl
//logic for application visible methods:
void sendImpl(const qpid::messaging::Message&);
- void cancelImpl();
+ void closeImpl();
//functors for application visible methods (allowing locking and
@@ -108,10 +108,10 @@ class SenderImpl : public qpid::messaging::SenderImpl
}
};
- struct Cancel : Command
+ struct Close : Command
{
- Cancel(SenderImpl& i) : Command(i) {}
- void operator()() { impl.cancelImpl(); }
+ Close(SenderImpl& i) : Command(i) {}
+ void operator()() { impl.closeImpl(); }
};
struct CheckPendingSends : Command
diff --git a/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp b/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
index 1343305174..62af6394b0 100644
--- a/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
+++ b/cpp/src/qpid/client/amqp0_10/SessionImpl.cpp
@@ -94,7 +94,7 @@ void SessionImpl::reject(qpid::messaging::Message& m)
void SessionImpl::close()
{
- //cancel all the senders and receivers (get copy of names and then
+ //close all the senders and receivers (get copy of names and then
//make the calls to avoid modifying maps while iterating over
//them):
std::vector<std::string> s;
@@ -104,8 +104,8 @@ void SessionImpl::close()
for (Senders::const_iterator i = senders.begin(); i != senders.end(); ++i) s.push_back(i->first);
for (Receivers::const_iterator i = receivers.begin(); i != receivers.end(); ++i) r.push_back(i->first);
}
- for (std::vector<std::string>::const_iterator i = s.begin(); i != s.end(); ++i) getSender(*i).cancel();
- for (std::vector<std::string>::const_iterator i = r.begin(); i != r.end(); ++i) getReceiver(*i).cancel();
+ for (std::vector<std::string>::const_iterator i = s.begin(); i != s.end(); ++i) getSender(*i).close();
+ for (std::vector<std::string>::const_iterator i = r.begin(); i != r.end(); ++i) getReceiver(*i).close();
connection.closed(*this);
diff --git a/cpp/src/qpid/messaging/Receiver.cpp b/cpp/src/qpid/messaging/Receiver.cpp
index bf9c056db8..478228e0fb 100644
--- a/cpp/src/qpid/messaging/Receiver.cpp
+++ b/cpp/src/qpid/messaging/Receiver.cpp
@@ -47,7 +47,7 @@ void Receiver::setCapacity(uint32_t c) { impl->setCapacity(c); }
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(); }
+void Receiver::close() { impl->close(); }
const std::string& Receiver::getName() const { return impl->getName(); }
Session Receiver::getSession() const { return impl->getSession(); }
}} // namespace qpid::messaging
diff --git a/cpp/src/qpid/messaging/ReceiverImpl.h b/cpp/src/qpid/messaging/ReceiverImpl.h
index 447a505518..2076de5d56 100644
--- a/cpp/src/qpid/messaging/ReceiverImpl.h
+++ b/cpp/src/qpid/messaging/ReceiverImpl.h
@@ -46,7 +46,7 @@ class ReceiverImpl : public virtual qpid::RefCounted
virtual uint32_t getCapacity() = 0;
virtual uint32_t available() = 0;
virtual uint32_t pendingAck() = 0;
- virtual void cancel() = 0;
+ virtual void close() = 0;
virtual const std::string& getName() const = 0;
virtual Session getSession() const = 0;
};
diff --git a/cpp/src/qpid/messaging/Sender.cpp b/cpp/src/qpid/messaging/Sender.cpp
index f2303f4126..5e18db1d7c 100644
--- a/cpp/src/qpid/messaging/Sender.cpp
+++ b/cpp/src/qpid/messaging/Sender.cpp
@@ -40,7 +40,7 @@ Sender::Sender(const Sender& s) : qpid::client::Handle<SenderImpl>() { PI::copy(
Sender::~Sender() { PI::dtor(*this); }
Sender& Sender::operator=(const Sender& s) { return PI::assign(*this, s); }
void Sender::send(const Message& message) { impl->send(message); }
-void Sender::cancel() { impl->cancel(); }
+void Sender::close() { impl->close(); }
void Sender::setCapacity(uint32_t c) { impl->setCapacity(c); }
uint32_t Sender::getCapacity() { return impl->getCapacity(); }
uint32_t Sender::pending() { return impl->pending(); }
diff --git a/cpp/src/qpid/messaging/SenderImpl.h b/cpp/src/qpid/messaging/SenderImpl.h
index 5f30417f6a..0294688771 100644
--- a/cpp/src/qpid/messaging/SenderImpl.h
+++ b/cpp/src/qpid/messaging/SenderImpl.h
@@ -37,7 +37,7 @@ class SenderImpl : public virtual qpid::RefCounted
public:
virtual ~SenderImpl() {}
virtual void send(const Message& message) = 0;
- virtual void cancel() = 0;
+ virtual void close() = 0;
virtual void setCapacity(uint32_t) = 0;
virtual uint32_t getCapacity() = 0;
virtual uint32_t pending() = 0;