Ice 3.7 C++11 API Reference
AsyncResult.h
Go to the documentation of this file.
1 //
2 // Copyright (c) ZeroC, Inc. All rights reserved.
3 //
4 
5 #ifndef ICE_ASYNC_RESULT_H
6 #define ICE_ASYNC_RESULT_H
7 
8 #ifndef ICE_CPP11_MAPPING
9 
10 #include <IceUtil/Monitor.h>
11 #include <IceUtil/Mutex.h>
12 #include <Ice/LocalObject.h>
13 #include <Ice/CommunicatorF.h>
14 #include <Ice/ConnectionF.h>
15 #include <Ice/ProxyF.h>
16 #include <Ice/AsyncResultF.h>
17 
18 namespace Ice
19 {
20 
25 class ICE_API AsyncResult : private IceUtil::noncopyable, public Ice::LocalObject
26 {
27 public:
28 
29  virtual ~AsyncResult();
30 
37  virtual void cancel() = 0;
38 
43  virtual Int getHash() const = 0;
44 
49  virtual CommunicatorPtr getCommunicator() const = 0;
50 
59  virtual ConnectionPtr getConnection() const = 0;
60 
66  virtual ObjectPrxPtr getProxy() const = 0;
67 
74  virtual bool isCompleted() const = 0;
75 
79  virtual void waitForCompleted() = 0;
80 
87  virtual bool isSent() const = 0;
88 
93  virtual void waitForSent() = 0;
94 
99  virtual void throwLocalException() const = 0;
100 
107  virtual bool sentSynchronously() const = 0;
108 
113  virtual LocalObjectPtr getCookie() const = 0;
114 
119  virtual const std::string& getOperation() const = 0;
120 
122  virtual bool _waitForResponse() = 0;
123  virtual Ice::InputStream* _startReadParams() = 0;
124  virtual void _endReadParams() = 0;
125  virtual void _readEmptyParams() = 0;
126  virtual void _readParamEncaps(const ::Ice::Byte*&, ::Ice::Int&) = 0;
127  virtual void _throwUserException() = 0;
128 
129  static void _check(const AsyncResultPtr&, const ::IceProxy::Ice::Object*, const ::std::string&);
130  static void _check(const AsyncResultPtr&, const Connection*, const ::std::string&);
131  static void _check(const AsyncResultPtr&, const Communicator*, const ::std::string&);
132 
133  class Callback : public IceUtil::Shared
134  {
135  public:
136 
137  virtual void run() = 0;
138  };
139  typedef IceUtil::Handle<Callback> CallbackPtr;
140 
141  virtual void _scheduleCallback(const CallbackPtr&) = 0;
143 
144 protected:
145 
147  static void check(const AsyncResultPtr&, const ::std::string&);
149 };
150 
151 }
152 
153 #endif
154 
155 #endif
CommunicatorF.h
Ice::LocalObjectPtr
IceInternal::Handle< LocalObject > LocalObjectPtr
Definition: LocalObjectF.h:17
Ice::InputStream
Interface for input streams used to extract Slice types from a sequence of bytes.
Definition: InputStream.h:50
ConnectionF.h
ICE_API
#define ICE_API
Definition: Config.h:197
Ice::Byte
unsigned char Byte
The mapping for the Slice byte type.
Definition: Config.h:50
LocalObject.h
ProxyF.h
IceUtil::noncopyable
Definition: Config.h:313
Mutex.h
Ice
Definition: BuiltinSequences.h:56
IceUtil::Handle
Definition: Handle.h:143
Ice::Int
int Int
The mapping for the Slice int type.
Definition: Config.h:54
IceUtil::Shared
Definition: Shared.h:78
Monitor.h
AsyncResultF.h