Public Member Functions

TAO::Portable_Server::LifespanStrategyFactoryImpl Class Reference

#include <LifespanStrategyFactoryImpl.h>

Inheritance diagram for TAO::Portable_Server::LifespanStrategyFactoryImpl:
Inheritance graph
[legend]
Collaboration diagram for TAO::Portable_Server::LifespanStrategyFactoryImpl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual LifespanStrategycreate (::PortableServer::LifespanPolicyValue value)
 Create a new servant retention strategy.
virtual void destroy (LifespanStrategy *strategy)
 Cleanup the given strategy instance.

Detailed Description

Definition at line 32 of file LifespanStrategyFactoryImpl.h.


Member Function Documentation

LifespanStrategy * TAO::Portable_Server::LifespanStrategyFactoryImpl::create ( ::PortableServer::LifespanPolicyValue  value  )  [virtual]

Create a new servant retention strategy.

Implements TAO::Portable_Server::LifespanStrategyFactory.

Definition at line 6 of file LifespanStrategyFactoryImpl.cpp.

               : LifespanStrategyFactoryImpl.cpp 84281 2009-01-30 15:01:17Z wotte $")

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

namespace TAO
{
  namespace Portable_Server
  {
    LifespanStrategy*
    LifespanStrategyFactoryImpl::create (
      ::PortableServer::LifespanPolicyValue value)
    {
      LifespanStrategy *strategy = 0;
      const char *strategy_name = 0;

      switch (value)
      {
        case ::PortableServer::PERSISTENT :
        {
          strategy_name = "LifespanStrategyPersistentFactory";
          break;
        }
        case ::PortableServer::TRANSIENT :
        {
          strategy_name = "LifespanStrategyTransientFactory";
          break;
        }
      }

      LifespanStrategyFactory *strategy_factory =

void TAO::Portable_Server::LifespanStrategyFactoryImpl::destroy ( LifespanStrategy strategy  )  [virtual]

Cleanup the given strategy instance.

Implements TAO::Portable_Server::LifespanStrategyFactory.

Definition at line 41 of file LifespanStrategyFactoryImpl.cpp.

    {
      switch (strategy->type ())
      {
        case ::PortableServer::PERSISTENT :
        {
          LifespanStrategyFactory *strategy_factory =
            ACE_Dynamic_Service<LifespanStrategyFactory>::instance ("LifespanStrategyPersistentFactory");

          if (strategy_factory != 0)
            {
              strategy_factory->destroy (strategy);
            }
          break;
        }
        case ::PortableServer::TRANSIENT :


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines