RequestProcessingStrategyAOMOnlyFactoryImpl.cpp

Go to the documentation of this file.
00001 // $Id: RequestProcessingStrategyAOMOnlyFactoryImpl.cpp 76551 2007-01-24 13:42:44Z johnnyw $
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 76551 2007-01-24 13:42:44Z johnnyw $")
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       )
00047     {
00048       strategy->strategy_cleanup ();
00049 
00050       delete strategy;
00051     }
00052   }
00053 }
00054 
00055 TAO_END_VERSIONED_NAMESPACE_DECL
00056 
00057 ACE_STATIC_SVC_DEFINE (
00058   RequestProcessingStrategyAOMOnlyFactoryImpl,
00059   ACE_TEXT ("RequestProcessingStrategyAOMOnlyFactory"),
00060   ACE_SVC_OBJ_T,
00061   &ACE_SVC_NAME (RequestProcessingStrategyAOMOnlyFactoryImpl),
00062   ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
00063   0)
00064 
00065 ACE_FACTORY_NAMESPACE_DEFINE (
00066   ACE_Local_Service,
00067   RequestProcessingStrategyAOMOnlyFactoryImpl,
00068   TAO::Portable_Server::RequestProcessingStrategyAOMOnlyFactoryImpl)

Generated on Tue Feb 2 17:40:54 2010 for TAO_PortableServer by  doxygen 1.4.7