RequestProcessingStrategyServantManager.cpp

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 #include "tao/orbconf.h"
00004 
00005 ACE_RCSID (PortableServer,
00006            Request_Processing,
00007            "$Id: RequestProcessingStrategyServantManager.cpp 76995 2007-02-11 12:51:42Z johnnyw $")
00008 
00009 #if (TAO_HAS_MINIMUM_POA == 0) && !defined (CORBA_E_COMPACT) && !defined (CORBA_E_MICRO)
00010 
00011 #include "tao/PortableServer/RequestProcessingStrategyServantManager.h"
00012 #include "tao/PortableServer/ServantManagerC.h"
00013 #include "tao/PortableServer/Root_POA.h"
00014 #include "tao/ORB_Constants.h"
00015 
00016 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00017 
00018 namespace TAO
00019 {
00020   namespace Portable_Server
00021   {
00022     RequestProcessingStrategyServantManager::RequestProcessingStrategyServantManager (void)
00023     {
00024     }
00025 
00026     PortableServer::Servant
00027     RequestProcessingStrategyServantManager::get_servant (void)
00028     {
00029       throw PortableServer::POA::WrongPolicy ();
00030     }
00031 
00032     void
00033     RequestProcessingStrategyServantManager::set_servant (
00034       PortableServer::Servant)
00035     {
00036       throw PortableServer::POA::WrongPolicy ();
00037     }
00038 
00039     void
00040     RequestProcessingStrategyServantManager::validate_servant_manager (
00041       PortableServer::ServantManager_ptr servant_manager)
00042     {
00043       // When no servant manager is set, give an exception with minor code 4,
00044       // see 11.3.8.6 of the corba spec
00045       if (CORBA::is_nil (servant_manager))
00046         {
00047           throw ::CORBA::OBJ_ADAPTER (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
00048         }
00049     }
00050 
00051     PortableServer::Servant
00052     RequestProcessingStrategyServantManager::system_id_to_servant (
00053       const PortableServer::ObjectId &system_id)
00054     {
00055       return this->poa_->find_servant (system_id);
00056     }
00057 
00058     PortableServer::ObjectId *
00059     RequestProcessingStrategyServantManager::servant_to_id (
00060       PortableServer::Servant servant)
00061     {
00062       return this->poa_->servant_to_user_id (servant);
00063     }
00064 
00065     PortableServer::Servant
00066     RequestProcessingStrategyServantManager::id_to_servant (
00067       const PortableServer::ObjectId &id)
00068     {
00069       return this->poa_->user_id_to_servant_i (id);
00070     }
00071 
00072     ::PortableServer::RequestProcessingPolicyValue
00073     RequestProcessingStrategyServantManager::type() const
00074     {
00075       return ::PortableServer::USE_SERVANT_MANAGER;
00076     }
00077   }
00078 }
00079 
00080 TAO_END_VERSIONED_NAMESPACE_DECL
00081 
00082 #endif /* TAO_HAS_MINIMUM_POA == 0 */
00083 

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