summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/sys/Dispatcher.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2008-07-24 05:31:07 +0000
committerAndrew Stitcher <astitcher@apache.org>2008-07-24 05:31:07 +0000
commitdfc598af62ccb812ebd53d5d8532f61b01b18245 (patch)
tree771265e5c3bc9b06dbb4aa30095495eada0275c3 /cpp/src/qpid/sys/Dispatcher.cpp
parent3e0f90a2ac7d708ef693a255a9ed4feafffb2131 (diff)
downloadqpid-python-dfc598af62ccb812ebd53d5d8532f61b01b18245.tar.gz
Refactored so that Dispatcher is now independent from DispatchHandle
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@679276 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/sys/Dispatcher.cpp')
-rw-r--r--cpp/src/qpid/sys/Dispatcher.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/cpp/src/qpid/sys/Dispatcher.cpp b/cpp/src/qpid/sys/Dispatcher.cpp
index 1df88ce0ae..3f901737fd 100644
--- a/cpp/src/qpid/sys/Dispatcher.cpp
+++ b/cpp/src/qpid/sys/Dispatcher.cpp
@@ -38,12 +38,10 @@ Dispatcher::~Dispatcher() {
void Dispatcher::run() {
do {
Poller::Event event = poller->wait();
- DispatchHandle* h =
- boost::polymorphic_downcast<DispatchHandle*>(event.handle);
// If can read/write then dispatch appropriate callbacks
- if (h) {
- h->dispatchCallbacks(event.type);
+ if (event.handle) {
+ event.process();
} else {
// Handle shutdown
switch (event.type) {
@@ -344,7 +342,7 @@ void DispatchHandle::doDelete() {
deferDelete();
}
-void DispatchHandle::dispatchCallbacks(Poller::EventType type) {
+void DispatchHandle::processEvent(Poller::EventType type) {
// Note that we are now doing the callbacks
{
ScopedLock<Mutex> lock(stateLock);