Go to the documentation of this file.00001
00002
00003 #include "tao/PortableServer/RequestProcessingStrategyAOMOnlyFactoryImpl.h"
00004 #include "tao/PortableServer/RequestProcessingStrategy.h"
00005 #include "tao/PortableServer/RequestProcessingStrategyAOMOnly.h"
00006 #include "ace/Dynamic_Service.h"
00007 #include "ace/Log_Msg.h"
00008
00009 ACE_RCSID (PortableServer,
00010 RequestProcessingStrategyAOMOnlyFactoryImpl,
00011 "$Id: RequestProcessingStrategyAOMOnlyFactoryImpl.cpp 84281 2009-01-30 15:01:17Z wotte $")
00012
00013 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00014
00015 namespace TAO
00016 {
00017 namespace Portable_Server
00018 {
00019 RequestProcessingStrategy*
00020 RequestProcessingStrategyAOMOnlyFactoryImpl::create (
00021 ::PortableServer::RequestProcessingPolicyValue value,
00022 ::PortableServer::ServantRetentionPolicyValue )
00023 {
00024 RequestProcessingStrategy* strategy = 0;
00025
00026 switch (value)
00027 {
00028 case ::PortableServer::USE_ACTIVE_OBJECT_MAP_ONLY :
00029 {
00030 ACE_NEW_RETURN (strategy, RequestProcessingStrategyAOMOnly, 0);
00031 break;
00032 }
00033 default :
00034 {
00035 ACE_ERROR ((LM_ERROR, "Incorrect type in RequestProcessingStrategyAOMOnlyFactoryImpl"));
00036 break;
00037 }
00038 }
00039
00040 return strategy;
00041 }
00042
00043 void
00044 RequestProcessingStrategyAOMOnlyFactoryImpl::destroy (
00045 RequestProcessingStrategy *strategy
00046 )
00047 {
00048 strategy->strategy_cleanup ();
00049
00050 delete strategy;
00051 }
00052 }
00053 }
00054
00055
00056 ACE_STATIC_SVC_DEFINE (
00057 RequestProcessingStrategyAOMOnlyFactoryImpl,
00058 ACE_TEXT ("RequestProcessingStrategyAOMOnlyFactory"),
00059 ACE_SVC_OBJ_T,
00060 &ACE_SVC_NAME (RequestProcessingStrategyAOMOnlyFactoryImpl),
00061 ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
00062 0)
00063
00064 ACE_FACTORY_NAMESPACE_DEFINE (
00065 ACE_Local_Service,
00066 RequestProcessingStrategyAOMOnlyFactoryImpl,
00067 TAO::Portable_Server::RequestProcessingStrategyAOMOnlyFactoryImpl)
00068 TAO_END_VERSIONED_NAMESPACE_DECL