Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Current.h
1// Copyright (c) ZeroC, Inc.
2
3#ifndef ICE_CURRENT_H
4#define ICE_CURRENT_H
5
6#include "ConnectionF.h"
7#include "Ice/Context.h"
8#include "Ice/Identity.h"
9#include "Ice/OperationMode.h"
10#include "Ice/Version.h"
11#include "ObjectAdapterF.h"
12
13namespace Ice
14{
15 /// Provides information about an incoming request being dispatched.
16 /// @headerfile Ice/Ice.h
17 struct Current
18 {
19 /// The object adapter. This value is never nullptr when this Current is provided by an object adapter.
21
22 /// The connection that received the request. It's nullptr for collocation-optimized dispatches.
24
25 /// The identity of the target Ice object.
27
28 /// The facet of the target Ice object.
29 std::string facet;
30
31 /// The operation name.
32 std::string operation;
33
34 /// The mode of the operation (see ::Ice::checkNonIdempotent).
36
37 /// The request context.
39
40 /// The request ID. `0` means the request is one-way.
42
43 /// The Slice encoding version used to marshal the payload of the request.
45 };
46
47 /// A default-initialized Current instance.
48 [[deprecated("Avoid calling generated functions with a trailing Current parameter.")]]
49 ICE_API extern const Current emptyCurrent;
50
51 /// Makes sure the operation mode of an incoming request is not idempotent.
52 /// @param current The Current object of the incoming request to check.
53 /// @throws MarshalException Thrown when the request's operation mode is OperationMode::Idempotent or
54 /// OperationMode::Nonmutating.
55 /// @remark The generated code calls this function to ensure that when an operation's mode is not idempotent
56 /// (locally), the incoming request's operation mode is not idempotent.
57 ICE_API void checkNonIdempotent(const Current& current);
58}
59
60#endif
std::shared_ptr< ObjectAdapter > ObjectAdapterPtr
A shared pointer to an ObjectAdapter.
OperationMode
Specifies if an operation is idempotent, which affects the retry behavior of the Ice client runtime.
ICE_API void checkNonIdempotent(const Current &current)
Makes sure the operation mode of an incoming request is not idempotent.
std::shared_ptr< Connection > ConnectionPtr
A shared pointer to a Connection.
Definition ConnectionF.h:18
ICE_API const Current emptyCurrent
A default-initialized Current instance.
std::map< std::string, std::string, std::less<> > Context
Represents additional information carried by an Ice request.
Definition Context.h:28
The Ice RPC framework.
Definition SampleEvent.h:59
OperationMode mode
The mode of the operation (see Ice::checkNonIdempotent).
Definition Current.h:35
EncodingVersion encoding
The Slice encoding version used to marshal the payload of the request.
Definition Current.h:44
Context ctx
The request context.
Definition Current.h:38
ObjectAdapterPtr adapter
The object adapter. This value is never nullptr when this Current is provided by an object adapter.
Definition Current.h:20
ConnectionPtr con
The connection that received the request. It's nullptr for collocation-optimized dispatches.
Definition Current.h:23
int requestId
The request ID. 0 means the request is one-way.
Definition Current.h:41
Identity id
The identity of the target Ice object.
Definition Current.h:26
std::string facet
The facet of the target Ice object.
Definition Current.h:29
std::string operation
The operation name.
Definition Current.h:32
Provides information about an incoming request being dispatched.
Definition Current.h:18
Represents a version of the Slice encoding.
Definition Version.h:65
Represents the identity of an Ice object.
Definition Identity.h:40