Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches
Process.h
1// Copyright (c) ZeroC, Inc.
2
3// slice2cpp version 3.8.0-alpha.0
4// <auto-generated>Generated from Slice file 'Process.ice'.</auto-generated>
5// clang-format off
6
7#ifndef Ice_Process_h_
8#define Ice_Process_h_
9
11#include <Ice/Ice.h>
12#include "LocatorRegistry.h"
13
14#ifndef ICE_DISABLE_VERSION
15# if ICE_INT_VERSION != 30850
16# error Ice version mismatch: an exact match is required for beta generated code
17# endif
18#endif
19
20// NOLINTBEGIN(modernize-concat-nested-namespaces)
21
22namespace Ice
23{
24 class ProcessPrx;
25}
26
27namespace Ice
28{
29 /// A server application managed by a locator implementation such as IceGrid hosts a Process object and registers a
30 /// proxy to this object with the locator registry. See LocatorRegistryPrx::setServerProcessProxy.
31 /// @remarks The Slice compiler generated this proxy class from Slice interface `::Ice::Process`.
32 /// @headerfile Ice/Ice.h
33 class ICE_API ProcessPrx : public Ice::Proxy<ProcessPrx, Ice::ObjectPrx>
34 {
35 public:
36 /// Constructs a proxy from a Communicator and a proxy string.
37 /// @param communicator The communicator of the new proxy.
38 /// @param proxyString The proxy string to parse.
39 ProcessPrx(const Ice::CommunicatorPtr& communicator, std::string_view proxyString) : Ice::ObjectPrx{communicator, proxyString} {} // NOLINT(modernize-use-equals-default)
40
41 /// Copy constructor. Constructs with a copy of the contents of @p other.
42 /// @param other The proxy to copy from.
43 ProcessPrx(const ProcessPrx& other) noexcept : Ice::ObjectPrx{other} {} // NOLINT(modernize-use-equals-default)
44
45 /// Move constructor. Constructs a proxy with the contents of @p other using move semantics.
46 /// @param other The proxy to move from.
47 ProcessPrx(ProcessPrx&& other) noexcept : Ice::ObjectPrx{std::move(other)} {} // NOLINT(modernize-use-equals-default)
48
49 ~ProcessPrx() override;
50
51 /// Copy assignment operator. Replaces the contents of this proxy with a copy of the contents of @p rhs.
52 /// @param rhs The proxy to copy from.
53 /// @return A reference to this proxy.
54 ProcessPrx& operator=(const ProcessPrx& rhs) noexcept
55 {
56 if (this != &rhs)
57 {
59 }
60 return *this;
61 }
62
63 /// Move assignment operator. Replaces the contents of this proxy with the contents of @p rhs using move semantics.
64 /// @param rhs The proxy to move from.
66 {
67 if (this != &rhs)
68 {
69 Ice::ObjectPrx::operator=(std::move(rhs));
70 }
71 return *this;
72 }
73
74 /// Initiates a graceful shutdown of the server application.
75 /// @param context The request context.
76 void shutdown(const Ice::Context& context = Ice::noExplicitContext) const;
77
78 /// Initiates a graceful shutdown of the server application.
79 /// @param context The request context.
80 /// @return A future that becomes available when the invocation completes.
81 [[nodiscard]] std::future<void> shutdownAsync(const Ice::Context& context = Ice::noExplicitContext) const;
82
83 /// Initiates a graceful shutdown of the server application.
84 /// @param response The response callback.
85 /// @param exception The exception callback.
86 /// @param sent The sent callback.
87 /// @param context The request context.
88 /// @return A function that can be called to cancel the invocation locally.
89 // NOLINTNEXTLINE(modernize-use-nodiscard)
90 std::function<void()> shutdownAsync(std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
91
92 /// @private
93 void _iceI_shutdown(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, const Ice::Context&) const;
94
95 /// Writes a message on the server application's stdout or stderr.
96 /// @param message The message to write.
97 /// @param fd 1 for stdout, 2 for stderr.
98 /// @param context The request context.
99 void writeMessage(std::string_view message, std::int32_t fd, const Ice::Context& context = Ice::noExplicitContext) const;
100
101 /// Writes a message on the server application's stdout or stderr.
102 /// @param message The message to write.
103 /// @param fd 1 for stdout, 2 for stderr.
104 /// @param context The request context.
105 /// @return A future that becomes available when the invocation completes.
106 [[nodiscard]] std::future<void> writeMessageAsync(std::string_view message, std::int32_t fd, const Ice::Context& context = Ice::noExplicitContext) const;
107
108 /// Writes a message on the server application's stdout or stderr.
109 /// @param message The message to write.
110 /// @param fd 1 for stdout, 2 for stderr.
111 /// @param response The response callback.
112 /// @param exception The exception callback.
113 /// @param sent The sent callback.
114 /// @param context The request context.
115 /// @return A function that can be called to cancel the invocation locally.
116 // NOLINTNEXTLINE(modernize-use-nodiscard)
117 std::function<void()> writeMessageAsync(std::string_view message, std::int32_t fd, std::function<void()> response, std::function<void(std::exception_ptr)> exception = nullptr, std::function<void(bool)> sent = nullptr, const Ice::Context& context = Ice::noExplicitContext) const;
118
119 /// @private
120 void _iceI_writeMessage(const std::shared_ptr<IceInternal::OutgoingAsyncT<void>>&, std::string_view, std::int32_t, const Ice::Context&) const;
121
122 /// Gets the type ID of the associated Slice interface.
123 /// @return The string `"::Ice::Process"`.
124 static const char* ice_staticId() noexcept;
125
126 /// @private
127 static ProcessPrx _fromReference(IceInternal::ReferencePtr ref) { return ProcessPrx{std::move(ref)}; }
128
129 protected:
130 /// @private
131 ProcessPrx() = default;
132
133 /// @private
134 explicit ProcessPrx(IceInternal::ReferencePtr&& ref) : Ice::ObjectPrx{std::move(ref)}
135 {
136 }
137 };
138}
139
140namespace Ice
141{
142 /// A server application managed by a locator implementation such as IceGrid hosts a Process object and registers a
143 /// proxy to this object with the locator registry. See LocatorRegistryPrx::setServerProcessProxy.
144 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::Process`.
145 /// @headerfile Ice/Ice.h
146 class ICE_API Process : public virtual Ice::Object
147 {
148 public:
149 /// The associated proxy type.
150 using ProxyType = ProcessPrx;
151
152 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
153 /// @param request The incoming request.
154 /// @param sendResponse The callback to send the response.
155 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
156
157 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
158
159 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
160
161 /// Initiates a graceful shutdown of the server application.
162 /// @param current The Current object of the incoming request.
163 virtual void shutdown(const Ice::Current& current) = 0;
164
165 /// @private
166 void _iceD_shutdown(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
167
168 /// Writes a message on the server application's stdout or stderr.
169 /// @param message The message to write.
170 /// @param fd 1 for stdout, 2 for stderr.
171 /// @param current The Current object of the incoming request.
172 virtual void writeMessage(std::string message, std::int32_t fd, const Ice::Current& current) = 0;
173
174 /// @private
175 void _iceD_writeMessage(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
176
177 /// Gets the type ID of the associated Slice interface.
178 /// @return The string `"::Ice::Process"`.
179 static const char* ice_staticId() noexcept;
180 };
181
182 /// A shared pointer to a Process.
183 using ProcessPtr = std::shared_ptr<Process>;
184}
185
186namespace Ice
187{
188 /// A server application managed by a locator implementation such as IceGrid hosts a Process object and registers a
189 /// proxy to this object with the locator registry. See LocatorRegistryPrx::setServerProcessProxy.
190 /// @remarks The Slice compiler generated this skeleton class from Slice interface `::Ice::Process`.
191 /// @headerfile Ice/Ice.h
192 class ICE_API AsyncProcess : public virtual Ice::Object
193 {
194 public:
195 /// The associated proxy type.
197
198 /// Dispatches an incoming request to one of the member functions of this generated class, based on the operation name carried by the request.
199 /// @param request The incoming request.
200 /// @param sendResponse The callback to send the response.
201 void dispatch(IncomingRequest& request, std::function<void(OutgoingResponse)> sendResponse) override;
202
203 [[nodiscard]] std::vector<std::string> ice_ids(const Ice::Current& current) const override;
204
205 [[nodiscard]] std::string ice_id(const Ice::Current& current) const override;
206
207 /// Initiates a graceful shutdown of the server application.
208 /// @param response The response callback.
209 /// @param exception The exception callback.
210 /// @param current The Current object of the incoming request.
211 virtual void shutdownAsync(std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
212
213 /// @private
214 void _iceD_shutdown(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
215
216 /// Writes a message on the server application's stdout or stderr.
217 /// @param message The message to write.
218 /// @param fd 1 for stdout, 2 for stderr.
219 /// @param response The response callback.
220 /// @param exception The exception callback.
221 /// @param current The Current object of the incoming request.
222 virtual void writeMessageAsync(std::string message, std::int32_t fd, std::function<void()> response, std::function<void(std::exception_ptr)> exception, const Ice::Current& current) = 0;
223
224 /// @private
225 void _iceD_writeMessage(Ice::IncomingRequest&, std::function<void(Ice::OutgoingResponse)>);
226
227 /// Gets the type ID of the associated Slice interface.
228 /// @return The string `"::Ice::Process"`.
229 static const char* ice_staticId() noexcept;
230 };
231
232 /// A shared pointer to an AsyncProcess.
233 using AsyncProcessPtr = std::shared_ptr<AsyncProcess>;
234}
235
236// NOLINTEND(modernize-concat-nested-namespaces)
237
238#include <Ice/PopDisableWarnings.h>
239#endif
std::string ice_id(const Ice::Current &current) const override
Gets the type ID of the most-derived Slice interface supported by this object.
virtual void writeMessageAsync(std::string message, std::int32_t fd, std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Writes a message on the server application's stdout or stderr.
virtual void shutdownAsync(std::function< void()> response, std::function< void(std::exception_ptr)> exception, const Ice::Current &current)=0
Initiates a graceful shutdown of the server application.
ProcessPrx ProxyType
The associated proxy type.
Definition Process.h:196
void dispatch(IncomingRequest &request, std::function< void(OutgoingResponse)> sendResponse) override
Dispatches an incoming request to one of the member functions of this generated class,...
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
std::vector< std::string > ice_ids(const Ice::Current &current) const override
Gets the Slice interfaces supported by this object as a list of Slice type IDs.
A server application managed by a locator implementation such as IceGrid hosts a Process object and r...
Definition Process.h:193
Represents a request received by a connection.
ObjectPrx & operator=(const ObjectPrx &rhs) noexcept=default
Copy assignment operator.
The base class for all Ice proxies.
Definition Proxy.h:232
The base class for servants.
Definition Object.h:21
Represents the response to an incoming request.
std::future< void > writeMessageAsync(std::string_view message, std::int32_t fd, const Ice::Context &context=Ice::noExplicitContext) const
Writes a message on the server application's stdout or stderr.
std::function< void()> shutdownAsync(std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Initiates a graceful shutdown of the server application.
ProcessPrx(const ProcessPrx &other) noexcept
Copy constructor.
Definition Process.h:43
ProcessPrx & operator=(ProcessPrx &&rhs) noexcept
Move assignment operator.
Definition Process.h:65
std::function< void()> writeMessageAsync(std::string_view message, std::int32_t fd, std::function< void()> response, std::function< void(std::exception_ptr)> exception=nullptr, std::function< void(bool)> sent=nullptr, const Ice::Context &context=Ice::noExplicitContext) const
Writes a message on the server application's stdout or stderr.
void writeMessage(std::string_view message, std::int32_t fd, const Ice::Context &context=Ice::noExplicitContext) const
Writes a message on the server application's stdout or stderr.
ProcessPrx(ProcessPrx &&other) noexcept
Move constructor.
Definition Process.h:47
static const char * ice_staticId() noexcept
Gets the type ID of the associated Slice interface.
void shutdown(const Ice::Context &context=Ice::noExplicitContext) const
Initiates a graceful shutdown of the server application.
ProcessPrx(const Ice::CommunicatorPtr &communicator, std::string_view proxyString)
Constructs a proxy from a Communicator and a proxy string.
Definition Process.h:39
ProcessPrx & operator=(const ProcessPrx &rhs) noexcept
Copy assignment operator.
Definition Process.h:54
std::future< void > shutdownAsync(const Ice::Context &context=Ice::noExplicitContext) const
Initiates a graceful shutdown of the server application.
A server application managed by a locator implementation such as IceGrid hosts a Process object and r...
Definition Process.h:34
Provides typed proxy functions.
Definition Proxy.h:45
std::shared_ptr< Communicator > CommunicatorPtr
A shared pointer to a Communicator.
const Context noExplicitContext
Marker value used to indicate that no explicit request context was passed to a proxy invocation.
std::shared_ptr< Process > ProcessPtr
A shared pointer to a Process.
Definition Process.h:183
std::shared_ptr< AsyncProcess > AsyncProcessPtr
A shared pointer to an AsyncProcess.
Definition Process.h:233
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:60
Provides information about an incoming request being dispatched.
Definition Current.h:18