2 #include "tao/CSD_Framework/CSD_Strategy_Proxy.h"
3 #include "tao/TAO_Server_Request.h"
6 #if !defined (__ACE_INLINE__)
7 # include "tao/CSD_Framework/CSD_Strategy_Proxy.inl"
8 #endif /* ! __ACE_INLINE__ */
10 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
13 TAO::CSD::Strategy_Proxy::custom_strategy
14 (CSD_Framework::Strategy_ptr strategy
)
16 if (this->strategy_impl_
)
18 if (TAO_debug_level
> 0)
19 TAOLIB_ERROR((LM_ERROR
,
20 ACE_TEXT("(%P|%t) Error - TAO::CSD::Strategy_Proxy ")
21 ACE_TEXT("object already has a custom strategy.\n")));
26 if (CORBA::is_nil(strategy
))
28 if (TAO_debug_level
> 0)
29 TAOLIB_ERROR((LM_ERROR
,
30 ACE_TEXT("(%P|%t) Error - TAO::CSD::Strategy_Proxy ")
31 ACE_TEXT("supplied with a NIL custom strategy.\n")));
36 // We need to bump up the reference count of the strategy before saving
37 // it off into our handle (smart pointer) data member.
38 this->strategy_
= CSD_Framework::Strategy::_duplicate(strategy
);
39 this->strategy_impl_
= dynamic_cast <TAO::CSD::Strategy_Base
*> (strategy
);
44 TAO_END_VERSIONED_NAMESPACE_DECL