summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ObserverI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-09-06 18:37:10 +0200
committerBenoit Foucher <benoit@zeroc.com>2012-09-06 18:37:10 +0200
commitbe9faf978df7819d37f873b6e3d241ceb35b08ad (patch)
tree7e9b91b05f5b0e2e7fcb4aeb8238bbc7c87db1eb /cpp/src/Ice/ObserverI.cpp
parentPerformance improvments (diff)
downloadice-be9faf978df7819d37f873b6e3d241ceb35b08ad.tar.bz2
ice-be9faf978df7819d37f873b6e3d241ceb35b08ad.tar.xz
ice-be9faf978df7819d37f873b6e3d241ceb35b08ad.zip
Fix
Diffstat (limited to 'cpp/src/Ice/ObserverI.cpp')
-rw-r--r--cpp/src/Ice/ObserverI.cpp36
1 files changed, 30 insertions, 6 deletions
diff --git a/cpp/src/Ice/ObserverI.cpp b/cpp/src/Ice/ObserverI.cpp
index 5ec9296bbc3..715b6a180f0 100644
--- a/cpp/src/Ice/ObserverI.cpp
+++ b/cpp/src/Ice/ObserverI.cpp
@@ -696,13 +696,21 @@ CommunicatorObserverI::setObserverUpdater(const ObserverUpdaterPtr& updater)
ObserverPtr
CommunicatorObserverI::getConnectionEstablishmentObserver(const EndpointInfoPtr& endpt, const string& connector)
{
- return _connects.getObserver(EndpointHelper(endpt, connector));
+ if(_connects.isEnabled())
+ {
+ return _connects.getObserver(EndpointHelper(endpt, connector));
+ }
+ return 0;
}
ObserverPtr
CommunicatorObserverI::getEndpointLookupObserver(const EndpointInfoPtr& endpt, const string& endpoint)
{
- return _endpointLookups.getObserver(EndpointHelper(endpt, endpoint));
+ if(_endpointLookups.isEnabled())
+ {
+ return _endpointLookups.getObserver(EndpointHelper(endpt, endpoint));
+ }
+ return 0;
}
ConnectionObserverPtr
@@ -711,7 +719,11 @@ CommunicatorObserverI::getConnectionObserver(const ConnectionInfoPtr& con,
ConnectionState state,
const ConnectionObserverPtr& observer)
{
- return _connections.getObserver(ConnectionHelper(con, endpt, state), observer);
+ if(_connections.isEnabled())
+ {
+ return _connections.getObserver(ConnectionHelper(con, endpt, state), observer);
+ }
+ return 0;
}
ThreadObserverPtr
@@ -720,7 +732,11 @@ CommunicatorObserverI::getThreadObserver(const string& parent,
ThreadState state,
const ThreadObserverPtr& observer)
{
- return _threads.getObserver(ThreadHelper(parent, id, state), observer);
+ if(_threads.isEnabled())
+ {
+ return _threads.getObserver(ThreadHelper(parent, id, state), observer);
+ }
+ return 0;
}
InvocationObserverPtr
@@ -736,13 +752,21 @@ CommunicatorObserverI::getInvocationObserver(const ObjectPrx& proxy, const strin
InvocationObserverPtr
CommunicatorObserverI::getInvocationObserverWithContext(const ObjectPrx& proxy, const string& op, const Context& ctx)
{
- return _invocations.getObserver(InvocationHelper(proxy, op, ctx));
+ if(_invocations.isEnabled())
+ {
+ return _invocations.getObserver(InvocationHelper(proxy, op, ctx));
+ }
+ return 0;
}
ObserverPtr
CommunicatorObserverI::getDispatchObserver(const Current& current)
{
- return _dispatch.getObserver(DispatchHelper(current));
+ if(_dispatch.isEnabled())
+ {
+ return _dispatch.getObserver(DispatchHelper(current));
+ }
+ return 0;
}
void