Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
Ice::ImplicitContext Class Referenceabstract

An interface to associate implict contexts with communicators. More...

#include <Ice/Ice.h>

Inheritance diagram for Ice::ImplicitContext:
Collaboration diagram for Ice::ImplicitContext:

Public Types

typedef ImplicitContextPtr PointerType

Public Member Functions

virtual bool containsKey (const ::std::string &key) const =0
 Check if this key has an associated value in the underlying context.
virtual::std::string get (const ::std::string &key) const =0
 Get the value associated with the given key in the underlying context.
virtual Context getContext () const =0
 Get a copy of the underlying context.
virtual::std::string put (const ::std::string &key, const ::std::string &value)=0
 Create or update a key/value entry in the underlying context.
virtual::std::string remove (const ::std::string &key)=0
 Remove the entry for the given key in the underlying context.
virtual void setContext (const Context &newContext)=0
 Set the underlying context.
virtual ~ImplicitContext ()
Public Member Functions inherited from Ice::LocalObject
virtual bool operator< (const LocalObject &) const
virtual bool operator== (const LocalObject &) const
Public Member Functions inherited from IceUtil::Shared
void __clearFlag (unsigned char flag)
virtual void __decRef ()
virtual int __getRef () const
bool __hasFlag (unsigned char flag)
virtual void __incRef ()
void __setFlag (unsigned char flag)
virtual void __setNoDelete (bool)
Sharedoperator= (const Shared &)
 Shared ()
 Shared (const Shared &)
virtual ~Shared ()

Additional Inherited Members

Static Public Attributes inherited from IceUtil::Shared
static const unsigned char NoDelete
Protected Attributes inherited from IceUtil::Shared
unsigned char _flags
IceUtilInternal::Atomic _ref

Detailed Description

An interface to associate implict contexts with communicators.

When you make a remote invocation without an explicit context parameter, Ice uses the per-proxy context (if any) combined with the ImplicitContext associated with the communicator.

Ice provides several implementations of ImplicitContext. The implementation used depends on the value of the Ice.ImplicitContext property.

None (default)
No implicit context at all.
PerThread
The implementation maintains a context per thread.
Shared
The implementation maintains a single context shared by all threads.

ImplicitContext also provides a number of operations to create, update or retrieve an entry in the underlying context without first retrieving a copy of the entire context. These operations correspond to a subset of the java.util.Map methods, with java.lang.Object replaced by string and null replaced by the empty-string.

Member Typedef Documentation

◆ PointerType

Constructor & Destructor Documentation

◆ ~ImplicitContext()

virtual Ice::ImplicitContext::~ImplicitContext ( )
virtual

Member Function Documentation

◆ containsKey()

virtual bool Ice::ImplicitContext::containsKey ( const ::std::string & key) const
pure virtual

Check if this key has an associated value in the underlying context.

Parameters
keyThe key.
Returns
True if the key has an associated value, False otherwise.

◆ get()

virtual::std::string Ice::ImplicitContext::get ( const ::std::string & key) const
pure virtual

Get the value associated with the given key in the underlying context.

Returns an empty string if no value is associated with the key. containsKey allows you to distinguish between an empty-string value and no value at all.

Parameters
keyThe key.
Returns
The value associated with the key.

◆ getContext()

virtual Context Ice::ImplicitContext::getContext ( ) const
pure virtual

Get a copy of the underlying context.

Returns
A copy of the underlying context.

◆ put()

virtual::std::string Ice::ImplicitContext::put ( const ::std::string & key,
const ::std::string & value )
pure virtual

Create or update a key/value entry in the underlying context.

Parameters
keyThe key.
valueThe value.
Returns
The previous value associated with the key, if any.

◆ remove()

virtual::std::string Ice::ImplicitContext::remove ( const ::std::string & key)
pure virtual

Remove the entry for the given key in the underlying context.

Parameters
keyThe key.
Returns
The value associated with the key, if any.

◆ setContext()

virtual void Ice::ImplicitContext::setContext ( const Context & newContext)
pure virtual

Set the underlying context.

Parameters
newContextThe new context.

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