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