RequestProcessingStrategyAOMOnlyFactoryImpl.cpp

Go to the documentation of this file.
00001 // RequestProcessingStrategyAOMOnlyFactoryImpl.cpp,v 1.8 2006/03/10 07:19:15 jtc Exp
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            "RequestProcessingStrategyAOMOnlyFactoryImpl.cpp,v 1.8 2006/03/10 07:19:15 jtc Exp")
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 /*srvalue*/)
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       ACE_ENV_ARG_DECL)
00047     {
00048       strategy->strategy_cleanup (ACE_ENV_SINGLE_ARG_PARAMETER);
00049       ACE_CHECK;
00050 
00051       delete strategy;
00052     }
00053   }
00054 }
00055 
00056 TAO_END_VERSIONED_NAMESPACE_DECL
00057 
00058 ACE_STATIC_SVC_DEFINE (
00059   RequestProcessingStrategyAOMOnlyFactoryImpl,
00060   ACE_TEXT ("RequestProcessingStrategyAOMOnlyFactory"),
00061   ACE_SVC_OBJ_T,
00062   &ACE_SVC_NAME (RequestProcessingStrategyAOMOnlyFactoryImpl),
00063   ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
00064   0)
00065 
00066 ACE_FACTORY_NAMESPACE_DEFINE (
00067   ACE_Local_Service,
00068   RequestProcessingStrategyAOMOnlyFactoryImpl,
00069   TAO::Portable_Server::RequestProcessingStrategyAOMOnlyFactoryImpl)

Generated on Thu Nov 9 12:40:40 2006 for TAO_PortableServer by doxygen 1.3.6