Request Contexts
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
2 min read
A request context is a dictionary of string keys and values that Ice sends with an invocation. It lets a client send additional information with a request without adding a parameter to the operation. The implementation of the operation reads the context from the ctx field of its Current parameter.
A middleware is a typical consumer of request contexts: it sees every request the object adapter dispatches and reads the context through the current of the incoming request.
A client supplies a context in the following ways:
- An explicit context applies to one invocation.
- A per-proxy context applies to the invocations made through a proxy.
- An implicit context applies to the invocations made through the proxies of a communicator.
- An explicit context applies to one invocation.
- A per-proxy context applies to the invocations made through a proxy.
Context keys that begin with an underscore are reserved for Ice.
Combining Request Contexts
An explicit context, even an empty one, replaces the other contexts: Ice sends only the explicit context with the invocation.
Without an explicit context, Ice sends the entries of both the per-proxy and the implicit contexts. When both contain the same key, Ice sends the value of the per-proxy context.