dmlite 0.6
Public Member Functions | Private Member Functions | Private Attributes | List of all members
dmlite::StackInstance Class Reference

#include <dmlite.h>

Collaboration diagram for dmlite::StackInstance:
Collaboration graph
[legend]

Public Member Functions

 StackInstance (PluginManager *pm)
 Constructor.
 
 ~StackInstance ()
 Destructor.
 
void set (const std::string &key, const boost::any &value)
 
boost::any get (const std::string &key) const
 
void erase (const std::string &key)
 
void eraseAll (void) throw ()
 Erase all the values set previously.
 
bool contains (const std::string &key) throw ()
 
PluginManager * getPluginManager ()
 Get the plugin manager.
 
void setSecurityCredentials (const SecurityCredentials &cred)
 Set the security credentials.
 
void setSecurityContext (const SecurityContext &ctx)
 Set the security context.
 
const SecurityContext * getSecurityContext (void) const
 Return the security context.
 
Authn * getAuthn ()
 Get the UsersDb interface.
 
INode * getINode ()
 Get the INode.
 
Catalog * getCatalog ()
 Get the catalog.
 
bool isTherePoolManager () throw ()
 
PoolManager * getPoolManager ()
 Get the PoolManager.
 
PoolDriver * getPoolDriver (const std::string &poolType)
 Get a pool driver.
 
IODriver * getIODriver ()
 Get the IO driver.
 

Private Member Functions

void setSecurityContextImpl_ (void)
 

Private Attributes

PluginManager * pluginManager_
 
Authn * authn_
 
INode * inode_
 
Catalog * catalog_
 
PoolManager * poolManager_
 
IODriver * ioDriver_
 
SecurityContext * secCtx_
 
std::map< std::string, PoolDriver * > poolDrivers_
 
std::map< std::string, boost::any > stackMsg_
 

Detailed Description

We need to have something that allows one plugin stack to access another plugin stack, so this represents a instantiation of each plugin stack. It also keeps common state: user credentials, security context, and run-time parameters (see set)

Note
Assume a StackInstance (and every instantiated interface under it) is NOT thread-safe. This means, a StackInstance must be used by only one thread at the same time.

Constructor & Destructor Documentation

◆ StackInstance()

dmlite::StackInstance::StackInstance ( PluginManager *  pm)

Constructor.

◆ ~StackInstance()

dmlite::StackInstance::~StackInstance ( )

Destructor.

Member Function Documentation

◆ contains()

bool dmlite::StackInstance::contains ( const std::string &  key)
throw (
)

Checks if the stack instance contains a value associated with the given key.

◆ erase()

void dmlite::StackInstance::erase ( const std::string &  key)

Erase a key,value pair from.

Parameters
keyThe key of the pair to be erased.

◆ eraseAll()

void dmlite::StackInstance::eraseAll ( void  )
throw (
)

Erase all the values set previously.

◆ get()

boost::any dmlite::StackInstance::get ( const std::string &  key) const

Get a value associated to a key. This can be used to pass advanced parameters to and from the plugins.

Parameters
keyThe key parameter.

◆ getAuthn()

Authn * dmlite::StackInstance::getAuthn ( )

Get the UsersDb interface.

◆ getCatalog()

Catalog * dmlite::StackInstance::getCatalog ( )

Get the catalog.

◆ getINode()

INode * dmlite::StackInstance::getINode ( )

Get the INode.

◆ getIODriver()

IODriver * dmlite::StackInstance::getIODriver ( )

Get the IO driver.

◆ getPluginManager()

PluginManager * dmlite::StackInstance::getPluginManager ( )

Get the plugin manager.

◆ getPoolDriver()

PoolDriver * dmlite::StackInstance::getPoolDriver ( const std::string &  poolType)

Get a pool driver.

◆ getPoolManager()

PoolManager * dmlite::StackInstance::getPoolManager ( )

Get the PoolManager.

◆ getSecurityContext()

const SecurityContext * dmlite::StackInstance::getSecurityContext ( void  ) const

Return the security context.

◆ isTherePoolManager()

bool dmlite::StackInstance::isTherePoolManager ( )
throw (
)

◆ set()

void dmlite::StackInstance::set ( const std::string &  key,
const boost::any &  value 
)

Set a key-value pair associated with this context. This can be used to pass advanced parameters to and from the plugins.

Parameters
keyThe key.
valueThe value.

◆ setSecurityContext()

void dmlite::StackInstance::setSecurityContext ( const SecurityContext &  ctx)

Set the security context.

◆ setSecurityContextImpl_()

void dmlite::StackInstance::setSecurityContextImpl_ ( void  )
private

◆ setSecurityCredentials()

void dmlite::StackInstance::setSecurityCredentials ( const SecurityCredentials &  cred)

Set the security credentials.

Member Data Documentation

◆ authn_

Authn* dmlite::StackInstance::authn_
private

◆ catalog_

Catalog* dmlite::StackInstance::catalog_
private

◆ inode_

INode* dmlite::StackInstance::inode_
private

◆ ioDriver_

IODriver* dmlite::StackInstance::ioDriver_
private

◆ pluginManager_

PluginManager* dmlite::StackInstance::pluginManager_
private

◆ poolDrivers_

std::map<std::string, PoolDriver*> dmlite::StackInstance::poolDrivers_
private

◆ poolManager_

PoolManager* dmlite::StackInstance::poolManager_
private

◆ secCtx_

SecurityContext* dmlite::StackInstance::secCtx_
private

◆ stackMsg_

std::map<std::string, boost::any> dmlite::StackInstance::stackMsg_
private

The documentation for this class was generated from the following file: