Horus Doc || Corba Reference || Corba   Client Server   Stubs C++   Stubs Java   Servant Generator  

HxObjectUsageServant Class Reference

Servant for the ObjectUsage interface. More...

#include <HxConfigureServant.h>

Inheritance diagram for HxObjectUsageServant::

POA_HxCorba::ObjectUsage List of all members.

Public Methods

 HxObjectUsageServant (HxDataObjectManager *mgr)
virtual ~HxObjectUsageServant ()
virtual CORBA::Long getUsed (const char *unit) throw (CORBA::SystemException)
virtual CORBA::Long getTotalLimit (const char *unit) throw (CORBA::SystemException)
virtual void setTotalLimit (const char *unit, CORBA::Long limit) throw (CORBA::SystemException)
virtual CORBA::Long getObjectLimit (const char *unit) throw (CORBA::SystemException)
virtual void setObjectLimit (const char *unit, CORBA::Long limit) throw (CORBA::SystemException)
virtual HxCorba::StringSeqlistUnits () throw (CORBA::SystemException)
virtual void close () throw (CORBA::SystemException)

Detailed Description

Servant for the ObjectUsage interface.


Constructor & Destructor Documentation

HxObjectUsageServant::HxObjectUsageServant HxDataObjectManager   mgr
 

00018     : _mgr(mgr)
00019 {
00020 }

HxObjectUsageServant::~HxObjectUsageServant   [virtual]
 

00023 {
00024     std::cout << "~HxObjectUsageServant" << std::endl;
00025 }


Member Function Documentation

CORBA::Long HxObjectUsageServant::getUsed const char *    unit throw (CORBA::SystemException) [virtual]
 

00030 {
00031     return _mgr->getUsed(unit);
00032 }

CORBA::Long HxObjectUsageServant::getTotalLimit const char *    unit throw (CORBA::SystemException) [virtual]
 

00037 {
00038     return _mgr->getTotalLimit(unit);
00039 }

void HxObjectUsageServant::setTotalLimit const char *    unit,
CORBA::Long    limit
throw (CORBA::SystemException) [virtual]
 

00044 {
00045     _mgr->setTotalLimit(unit, limit);
00046 }

CORBA::Long HxObjectUsageServant::getObjectLimit const char *    unit throw (CORBA::SystemException) [virtual]
 

00051 {
00052     return _mgr->getObjectLimit(unit);
00053 }

void HxObjectUsageServant::setObjectLimit const char *    unit,
CORBA::Long    limit
throw (CORBA::SystemException) [virtual]
 

00058 {
00059     _mgr->setObjectLimit(unit, limit);
00060 }

HxCorba::StringSeq * HxObjectUsageServant::listUnits   throw (CORBA::SystemException) [virtual]
 

Reimplemented from POA_HxCorba::ObjectUsage.

00065 {
00066     HxStringList unitList;
00067     _mgr->getUnitList(std::back_inserter(unitList));
00068 
00069     HxCorba::StringSeq_var seq = new HxCorba::StringSeq();
00070     seq->length(unitList.size());
00071 
00072     HxStringList::const_iterator it = unitList.begin();
00073     for(int i=0; it != unitList.end(); i++, it++)
00074         seq[i] = it->c_str();
00075 
00076     return seq._retn();
00077 }

void HxObjectUsageServant::close   throw (CORBA::SystemException) [virtual]
 

Reimplemented from POA_HxCorba::ObjectUsage.

00083 {
00084     PortableServer::POA_var rootPOA = HxServer::instance()->getRootPOA();
00085     PortableServer::ObjectId_var oid = rootPOA->servant_to_id(this);
00086     rootPOA->deactivate_object(oid);
00087 }


The documentation for this class was generated from the following files:
Generated on Tue Feb 3 14:20:16 2004 for CorbaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001