Ice 3.7 Slice API Reference
Operations | List of all members
Ice::ImplicitContext Local Interface Reference

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

defined in <Ice/ImplicitContext.ice>

local interface ImplicitContext { ... }

Operations

bool containsKey (string key)
 Check if this key has an associated value in the underlying context. More...
 
string get (string key)
 Get the value associated with the given key in the underlying context. More...
 
Context getContext ()
 Get a copy of the underlying context. More...
 
string put (string key, string \value)
 Create or update a key/value entry in the underlying context. More...
 
string remove (string key)
 Remove the entry for the given key in the underlying context. More...
 
void setContext (Context newContext)
 Set the underlying context. More...
 

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.

Operation Documentation

◆ containsKey()

["cpp:const","swift:noexcept"]
bool containsKey ( string  key)

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()

["cpp:const","swift:noexcept"]
string get ( string  key)

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()

["cpp:const","swift:noexcept"]
Context getContext ( )

Get a copy of the underlying context.

Returns
A copy of the underlying context.

◆ put()

["swift:noexcept"]
string put ( string  key,
string \  value 
)

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()

["swift:noexcept"]
string remove ( string  key)

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

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

◆ setContext()

["swift:noexcept"]
void setContext ( Context  newContext)

Set the underlying context.

Parameters
newContextThe new context.

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