Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
ConnectionAsync.h
Go to the documentation of this file.
1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4
5#ifndef ICE_CONNECTION_ASYNC_H
6#define ICE_CONNECTION_ASYNC_H
7
8#ifndef ICE_CPP11_MAPPING
9
10#include <Ice/Connection.h>
11#include <Ice/Proxy.h>
12
13namespace Ice
14{
15
22template<class T>
24 public ::IceInternal::OnewayCallbackNC<T>
25{
26public:
27
29
30 typedef void (T::*Exception)(const ::Ice::Exception&);
31 typedef void (T::*Sent)(bool);
32
34 : ::IceInternal::OnewayCallbackNC<T>(obj, 0, excb, sentcb)
35 {
36 }
37
39 virtual void completed(const ::Ice::AsyncResultPtr& result) const
40 {
41 ::Ice::ConnectionPtr connection = result->getConnection();
42 assert(connection);
43 try
44 {
45 connection->end_flushBatchRequests(result);
46 assert(false);
47 }
48 catch(const ::Ice::Exception& ex)
49 {
50 ::IceInternal::CallbackNC<T>::exception(result, ex);
51 }
52 }
54};
55
66 void (T::*excb)(const ::Ice::Exception&),
67 void (T::*sentcb)(bool) = 0)
68{
69 return new CallbackNC_Connection_flushBatchRequests<T>(instance, excb, sentcb);
70}
71
81newCallback_Connection_flushBatchRequests(T* instance, void (T::*excb)(const ::Ice::Exception&),
82 void (T::*sentcb)(bool) = 0)
83{
84 return new CallbackNC_Connection_flushBatchRequests<T>(instance, excb, sentcb);
85}
86
93template<class T, typename CT>
95 public ::IceInternal::OnewayCallback<T, CT>
96{
97public:
98
100
101 typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
102 typedef void (T::*Sent)(bool , const CT&);
103
105 : ::IceInternal::OnewayCallback<T, CT>(obj, 0, excb, sentcb)
106 {
107 }
108
110 virtual void completed(const ::Ice::AsyncResultPtr& result) const
111 {
112 ::Ice::ConnectionPtr connection = result->getConnection();
113 assert(connection);
114 try
115 {
116 connection->end_flushBatchRequests(result);
117 assert(false);
118 }
119 catch(const ::Ice::Exception& ex)
120 {
121 ::IceInternal::Callback<T, CT>::exception(result, ex);
122 }
123 }
125};
126
135template<class T, typename CT> Callback_Connection_flushBatchRequestsPtr
137 void (T::*excb)(const ::Ice::Exception&, const CT&),
138 void (T::*sentcb)(bool, const CT&) = 0)
139{
140 return new Callback_Connection_flushBatchRequests<T, CT>(instance, excb, sentcb);
141}
142
151template<class T, typename CT> Callback_Connection_flushBatchRequestsPtr
152newCallback_Connection_flushBatchRequests(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&),
153 void (T::*sentcb)(bool, const CT&) = 0)
154{
155 return new Callback_Connection_flushBatchRequests<T, CT>(instance, excb, sentcb);
156}
157
164template<class T>
166 public ::IceInternal::OnewayCallbackNC<T>
167{
168public:
169
171
172 typedef void (T::*Exception)(const ::Ice::Exception&);
173 typedef void (T::*Sent)(bool);
174
176 : ::IceInternal::OnewayCallbackNC<T>(obj, 0, excb, sentcb)
177 {
178 }
179
181 virtual void completed(const ::Ice::AsyncResultPtr& __result) const
182 {
183 ::Ice::ConnectionPtr __con = __result->getConnection();
184 assert(__con);
185 try
186 {
187 __con->end_heartbeat(__result);
188 assert(false);
189 }
190 catch(const ::Ice::Exception& ex)
191 {
192 ::IceInternal::CallbackNC<T>::exception(__result, ex);
193 }
194 }
196};
197
206template<class T> Callback_Connection_heartbeatPtr
208 void (T::*excb)(const ::Ice::Exception&),
209 void (T::*sentcb)(bool) = 0)
210{
211 return new CallbackNC_Connection_heartbeat<T>(instance, excb, sentcb);
212}
213
222template<class T> Callback_Connection_heartbeatPtr
223newCallback_Connection_heartbeat(T* instance, void (T::*excb)(const ::Ice::Exception&), void (T::*sentcb)(bool) = 0)
224{
225 return new CallbackNC_Connection_heartbeat<T>(instance, excb, sentcb);
226}
227
234template<class T, typename CT>
236 public ::IceInternal::OnewayCallback<T, CT>
237{
238public:
239
241
242 typedef void (T::*Exception)(const ::Ice::Exception& , const CT&);
243 typedef void (T::*Sent)(bool , const CT&);
244
246 : ::IceInternal::OnewayCallback<T, CT>(obj, 0, excb, sentcb)
247 {
248 }
249
251 virtual void completed(const ::Ice::AsyncResultPtr& __result) const
252 {
253 ::Ice::ConnectionPtr __con = __result->getConnection();
254 assert(__con);
255 try
256 {
257 __con->end_heartbeat(__result);
258 assert(false);
259 }
260 catch(const ::Ice::Exception& ex)
261 {
262 ::IceInternal::Callback<T, CT>::exception(__result, ex);
263 }
264 }
266};
267
276template<class T, typename CT> Callback_Connection_heartbeatPtr
278 void (T::*excb)(const ::Ice::Exception&, const CT&),
279 void (T::*sentcb)(bool, const CT&) = 0)
280{
281 return new Callback_Connection_heartbeat<T, CT>(instance, excb, sentcb);
282}
283
292template<class T, typename CT> Callback_Connection_heartbeatPtr
293newCallback_Connection_heartbeat(T* instance, void (T::*excb)(const ::Ice::Exception&, const CT&),
294 void (T::*sentcb)(bool, const CT&) = 0)
295{
296 return new Callback_Connection_heartbeat<T, CT>(instance, excb, sentcb);
297}
298
299}
300
301#endif
302#endif
Definition Handle.h:143
Type-safe asynchronous callback wrapper class used for calls to Ice::Connection::begin_flushBatchRequ...
Definition ConnectionAsync.h:25
void(T::* Exception)(const ::Ice::Exception &)
Definition ConnectionAsync.h:30
IceUtil::Handle< T > TPtr
Definition ConnectionAsync.h:28
void(T::* Sent)(bool)
Definition ConnectionAsync.h:31
CallbackNC_Connection_flushBatchRequests(const TPtr &obj, Exception excb, Sent sentcb)
Definition ConnectionAsync.h:33
Type-safe asynchronous callback wrapper class used for calls to Ice::Connection::begin_heartbeat.
Definition ConnectionAsync.h:167
void(T::* Exception)(const ::Ice::Exception &)
Definition ConnectionAsync.h:172
void(T::* Sent)(bool)
Definition ConnectionAsync.h:173
IceUtil::Handle< T > TPtr
Definition ConnectionAsync.h:170
CallbackNC_Connection_heartbeat(const TPtr &obj, Exception excb, Sent sentcb)
Definition ConnectionAsync.h:175
Base class for asynchronous callback wrapper classes used for calls to IceProxy::Ice::Connection::beg...
Definition Connection.h:1009
Type-safe asynchronous callback wrapper class used for calls to Ice::Connection::begin_flushBatchRequ...
Definition ConnectionAsync.h:96
void(T::* Sent)(bool, const CT &)
Definition ConnectionAsync.h:102
void(T::* Exception)(const ::Ice::Exception &, const CT &)
Definition ConnectionAsync.h:101
Callback_Connection_flushBatchRequests(const TPtr &obj, Exception excb, Sent sentcb)
Definition ConnectionAsync.h:104
IceUtil::Handle< T > TPtr
Definition ConnectionAsync.h:99
Base class for asynchronous callback wrapper classes used for calls to IceProxy::Ice::Connection::beg...
Definition Connection.h:1017
Type-safe asynchronous callback wrapper class used for calls to Ice::Connection::begin_heartbeat.
Definition ConnectionAsync.h:237
Callback_Connection_heartbeat(const TPtr &obj, Exception excb, Sent sentcb)
Definition ConnectionAsync.h:245
void(T::* Sent)(bool, const CT &)
Definition ConnectionAsync.h:243
void(T::* Exception)(const ::Ice::Exception &, const CT &)
Definition ConnectionAsync.h:242
IceUtil::Handle< T > TPtr
Definition ConnectionAsync.h:240
Definition BuiltinSequences.h:113
::IceInternal::Handle< Connection > ConnectionPtr
Definition Connection.h:767
Callback_Connection_heartbeatPtr newCallback_Connection_heartbeat(const IceUtil::Handle< T > &instance, void(T::*excb)(const ::Ice::Exception &), void(T::*sentcb)(bool)=0)
Creates a callback wrapper instance that delegates to your object.
Definition ConnectionAsync.h:207
::IceUtil::Handle< Callback_Connection_flushBatchRequests_Base > Callback_Connection_flushBatchRequestsPtr
Definition Connection.h:1010
Callback_Connection_flushBatchRequestsPtr newCallback_Connection_flushBatchRequests(const IceUtil::Handle< T > &instance, void(T::*excb)(const ::Ice::Exception &), void(T::*sentcb)(bool)=0)
Creates a callback wrapper instance that delegates to your object.
Definition ConnectionAsync.h:65
::IceUtil::Handle< Callback_Connection_heartbeat_Base > Callback_Connection_heartbeatPtr
Definition Connection.h:1018