RequestProcessingStrategyServantActivatorFI.cpp

Go to the documentation of this file.
00001 // $Id: RequestProcessingStrategyServantActivatorFI.cpp 76551 2007-01-24 13:42:44Z johnnyw $
00002 
00003 #include "tao/orbconf.h"
00004 
00005 ACE_RCSID (PortableServer,
00006            RequestProcessingStrategyServantActivatorFactoryImpl,
00007            "$Id: RequestProcessingStrategyServantActivatorFI.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/RequestProcessingStrategyServantActivatorFI.h"
00012 #include "tao/PortableServer/RequestProcessingStrategy.h"
00013 #include "tao/PortableServer/RequestProcessingStrategyServantActivator.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     RequestProcessingStrategyServantActivatorFactoryImpl::create (
00025       ::PortableServer::RequestProcessingPolicyValue value,
00026       ::PortableServer::ServantRetentionPolicyValue srvalue)
00027     {
00028       RequestProcessingStrategy* strategy = 0;
00029 
00030       switch (value)
00031       {
00032         case ::PortableServer::USE_SERVANT_MANAGER :
00033         {
00034           switch (srvalue)
00035           {
00036             case ::PortableServer::RETAIN :
00037             {
00038               ACE_NEW_RETURN (strategy, RequestProcessingStrategyServantActivator, 0);
00039               break;
00040             }
00041             case ::PortableServer::NON_RETAIN :
00042             {
00043               ACE_ERROR ((LM_ERROR, "Incorrect type in RequestProcessingStrategyServantActivatorFactoryImpl"));
00044               break;
00045             }
00046           }
00047           break;
00048         }
00049         default :
00050         {
00051           ACE_ERROR ((LM_ERROR, "Incorrect type in RequestProcessingStrategyServantActivatorFactoryImpl"));
00052           break;
00053         }
00054       }
00055 
00056       return strategy;
00057     }
00058 
00059     void
00060     RequestProcessingStrategyServantActivatorFactoryImpl::destroy (
00061       RequestProcessingStrategy *strategy
00062       )
00063     {
00064       strategy->strategy_cleanup ();
00065 
00066       delete strategy;
00067     }
00068   }
00069 }
00070 
00071 TAO_END_VERSIONED_NAMESPACE_DECL
00072 
00073 ACE_STATIC_SVC_DEFINE (
00074   RequestProcessingStrategyServantActivatorFactoryImpl,
00075   ACE_TEXT ("RequestProcessingStrategyServantActivatorFactory"),
00076   ACE_SVC_OBJ_T,
00077   &ACE_SVC_NAME (RequestProcessingStrategyServantActivatorFactoryImpl),
00078   ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
00079   0)
00080 
00081 ACE_FACTORY_NAMESPACE_DEFINE (
00082   ACE_Local_Service,
00083   RequestProcessingStrategyServantActivatorFactoryImpl,
00084   TAO::Portable_Server::RequestProcessingStrategyServantActivatorFactoryImpl)
00085 
00086 
00087 #endif /* TAO_HAS_MINIMUM_POA == 0 */

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