diff options
author | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-11-12 01:17:57 +0000 |
---|---|---|
committer | pradeep <pradeep@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-11-12 01:17:57 +0000 |
commit | 38b9c5540092225386e44e1e6c6323565cbbed3b (patch) | |
tree | 2efb9aecae08be85c871afc3cdc5a1448fdea2cf /TAO/orbsvcs/orbsvcs/Notify/Method_Request_Updates.cpp | |
parent | 6e88876b221cc28f52e7a00d48c6d0f7b3537851 (diff) | |
download | ATCD-38b9c5540092225386e44e1e6c6323565cbbed3b.tar.gz |
Mon Nov 11 20:11:56 2002 Pradeep Gore <pradeep@oomworks.com>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/Method_Request_Updates.cpp')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/Method_Request_Updates.cpp | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Updates.cpp b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Updates.cpp new file mode 100644 index 00000000000..60049cf0bef --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/Method_Request_Updates.cpp @@ -0,0 +1,55 @@ +// $Id$ + +#include "Method_Request_Updates.h" + +#if ! defined (__ACE_INLINE__) +#include "Method_Request_Updates.inl" +#endif /* __ACE_INLINE__ */ + +ACE_RCSID(Notify, TAO_NS_Method_Request_Updates, "$id$") + +#include "tao/debug.h" +#include "Proxy.h" +#include "Peer.h" + +TAO_NS_Method_Request_Updates::TAO_NS_Method_Request_Updates (const TAO_NS_EventTypeSeq& added, const TAO_NS_EventTypeSeq& removed, TAO_NS_Proxy* proxy) + :added_ (added), removed_ (removed), proxy_ (proxy), refcountable_guard_ (*proxy) +{ +} + +TAO_NS_Method_Request_Updates::~TAO_NS_Method_Request_Updates () +{ +} + +TAO_NS_Method_Request* +TAO_NS_Method_Request_Updates::copy (void) +{ + /// @@use factory + return new TAO_NS_Method_Request_Updates (this->added_, this->removed_, this->proxy_); +} + +int +TAO_NS_Method_Request_Updates::execute (ACE_ENV_SINGLE_ARG_DECL) +{ + if (this->proxy_->has_shutdown ()) + return 0; // If we were shutdown while waiting in the queue, return with no action. + + ACE_TRY + { + TAO_NS_Peer* peer = this->proxy_->peer(); + + if (peer != 0) + { + peer->dispatch_updates (this->added_, this->removed_ ACE_ENV_ARG_PARAMETER); + ACE_TRY_CHECK; + } + } + ACE_CATCHANY + { + if (TAO_debug_level > 0) + ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, "TAO_NS_Method_Request_Updates::execute error sending updates\n "); + } + ACE_ENDTRY; + + return 0; +} |