RequestProcessingStrategyDefaultServantFI.cpp

Go to the documentation of this file.
00001 // $Id: RequestProcessingStrategyDefaultServantFI.cpp 76551 2007-01-24 13:42:44Z johnnyw $
00002 
00003 #include "tao/orbconf.h"
00004 
00005 ACE_RCSID (PortableServer,
00006            RequestProcessingStrategyDefaultServantFI,
00007            "$Id: RequestProcessingStrategyDefaultServantFI.cpp 76551 2007-01-24 13:42:44Z johnnyw $")
00008 
00009 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00010 
00011 #include "tao/PortableServer/RequestProcessingStrategyDefaultServantFI.h"
00012 #include "tao/PortableServer/RequestProcessingStrategy.h"
00013 #include "tao/PortableServer/RequestProcessingStrategyDefaultServant.h"
00014 #include "ace/Dynamic_Service.h"
00015 #include "ace/Log_Msg.h"
00016 
00017 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00018 
00019 namespace TAO
00020 {
00021   namespace Portable_Server
00022   {
00023     RequestProcessingStrategy*
00024     RequestProcessingStrategyDefaultServantFactoryImpl::create (
00025       ::PortableServer::RequestProcessingPolicyValue value,
00026       ::PortableServer::ServantRetentionPolicyValue /*srvalue*/)
00027     {
00028       RequestProcessingStrategy* strategy = 0;
00029 
00030       switch (value)
00031       {
00032         case ::PortableServer::USE_DEFAULT_SERVANT :
00033         {
00034           ACE_NEW_RETURN (strategy, RequestProcessingStrategyDefaultServant, 0);
00035           break;
00036         }
00037         default :
00038         {
00039           ACE_ERROR ((LM_ERROR, "Incorrect type in RequestProcessingStrategyDefaultServantFactoryImpl"));
00040           break;
00041         }
00042       }
00043 
00044       return strategy;
00045     }
00046 
00047     void
00048     RequestProcessingStrategyDefaultServantFactoryImpl::destroy (
00049       RequestProcessingStrategy *strategy
00050       )
00051     {
00052       strategy->strategy_cleanup ();
00053 
00054       delete strategy;
00055     }
00056   }
00057 }
00058 
00059 TAO_END_VERSIONED_NAMESPACE_DECL
00060 
00061 ACE_STATIC_SVC_DEFINE (
00062   RequestProcessingStrategyDefaultServantFactoryImpl,
00063   ACE_TEXT ("RequestProcessingStrategyDefaultServantFactory"),
00064   ACE_SVC_OBJ_T,
00065   &ACE_SVC_NAME (RequestProcessingStrategyDefaultServantFactoryImpl),
00066   ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
00067   0)
00068 
00069 ACE_FACTORY_NAMESPACE_DEFINE (
00070   ACE_Local_Service,
00071   RequestProcessingStrategyDefaultServantFactoryImpl,
00072   TAO::Portable_Server::RequestProcessingStrategyDefaultServantFactoryImpl)
00073 
00074 
00075 #endif /* TAO_HAS_MINIMUM_POA == 0 */
00076 

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