dmlite::StackInstance Class Reference

#include <dmlite.h>

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

List of all members.

Public Member Functions

 StackInstance (PluginManager *pm) throw (DmException)
 Constructor.
 ~StackInstance ()
 Destructor.
void set (const std::string &key, const boost::any &value) throw (DmException)
boost::any get (const std::string &key) const throw (DmException)
void erase (const std::string &key) throw (DmException)
void eraseAll (void) throw ()
 Erase all the values set previously.
bool contains (const std::string &key) throw ()
PluginManagergetPluginManager () throw (DmException)
 Get the plugin manager.
void setSecurityCredentials (const SecurityCredentials &cred) throw (DmException)
 Set the security credentials.
void setSecurityContext (const SecurityContext &ctx) throw (DmException)
 Set the security context.
const SecurityContextgetSecurityContext (void) const throw ()
 Return the security context.
AuthngetAuthn () throw (DmException)
 Get the UsersDb interface.
INodegetINode () throw (DmException)
 Get the INode.
CataloggetCatalog () throw (DmException)
 Get the catalog.
bool isTherePoolManager () throw ()
PoolManagergetPoolManager () throw (DmException)
 Get the PoolManager.
PoolDrivergetPoolDriver (const std::string &poolType) throw (DmException)
 Get a pool driver.
IODrivergetIODriver () throw (DmException)
 Get the IO driver.

Private Member Functions

void setSecurityContextImpl_ (void)

Private Attributes

PluginManagerpluginManager_
Authnauthn_
INodeinode_
Catalogcatalog_
PoolManagerpoolManager_
IODriverioDriver_
SecurityContextsecCtx_
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

dmlite::StackInstance::StackInstance ( PluginManager pm  )  throw (DmException)

Constructor.

dmlite::StackInstance::~StackInstance (  ) 

Destructor.


Member Function Documentation

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

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

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

Erase a key,value pair from.

Parameters:
key The key of the pair to be erased.
void dmlite::StackInstance::eraseAll ( void   )  throw ()

Erase all the values set previously.

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

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

Parameters:
key The key parameter.
Authn* dmlite::StackInstance::getAuthn (  )  throw (DmException)

Get the UsersDb interface.

Catalog* dmlite::StackInstance::getCatalog (  )  throw (DmException)

Get the catalog.

INode* dmlite::StackInstance::getINode (  )  throw (DmException)

Get the INode.

IODriver* dmlite::StackInstance::getIODriver (  )  throw (DmException)

Get the IO driver.

PluginManager* dmlite::StackInstance::getPluginManager (  )  throw (DmException)

Get the plugin manager.

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

Get a pool driver.

PoolManager* dmlite::StackInstance::getPoolManager (  )  throw (DmException)

Get the PoolManager.

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

Return the security context.

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

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

Parameters:
key The key.
value The value.
void dmlite::StackInstance::setSecurityContext ( const SecurityContext ctx  )  throw (DmException)

Set the security context.

void dmlite::StackInstance::setSecurityContextImpl_ ( void   )  [private]
void dmlite::StackInstance::setSecurityCredentials ( const SecurityCredentials cred  )  throw (DmException)

Set the security credentials.


Member Data Documentation

std::map<std::string, PoolDriver*> dmlite::StackInstance::poolDrivers_ [private]
std::map<std::string, boost::any> dmlite::StackInstance::stackMsg_ [private]

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

Generated on 18 Nov 2014 for dmlite by  doxygen 1.6.1