Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
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
18namespace Ice
19{
20
26{
27public:
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 };
140
141 virtual void _scheduleCallback(const CallbackPtr&) = 0;
143
144protected:
145
147 static void check(const AsyncResultPtr&, const ::std::string&);
149};
150
151}
152
153#endif
154
155#endif
#define ICE_API
Definition Config.h:197
Definition Handle.h:143
Definition Shared.h:78
Definition Config.h:313
Represents the result of an asynchronous invocation using the C++98 mapping.
Definition AsyncResult.h:26
virtual ConnectionPtr getConnection() const =0
Obtains the connection that was used for the invocation.
virtual void throwLocalException() const =0
Throws the local exception that caused the invocation to fail.
virtual CommunicatorPtr getCommunicator() const =0
Obtains the communicator that sent the invocation.
virtual bool isSent() const =0
Obtains the sent status of the invocation.
virtual ~AsyncResult()
virtual void waitForSent()=0
Blocks the calling thread until a request has been written to the client-side transport,...
virtual bool isCompleted() const =0
Obtains the completion status of the invocation.
virtual void cancel()=0
Prevents a queued invocation from being sent or, if the invocation has already been sent,...
virtual void waitForCompleted()=0
Blocks the caller until the result of an invocation becomes available.
virtual bool sentSynchronously() const =0
Determines whether the request was sent synchronously.
virtual const std::string & getOperation() const =0
Obtains the name of the operation.
virtual Int getHash() const =0
Allows you to create ordered or hashed collections of pending asynchronous invocations.
virtual LocalObjectPtr getCookie() const =0
Obtains the cookie that was passed to the begin_ method.
virtual ObjectPrxPtr getProxy() const =0
Obtains the proxy that was used to call the begin_ method, or nil if the AsyncResult object was not o...
The central object in Ice.
Definition Communicator.h:684
The user-level interface to a connection.
Definition Connection.h:1179
Interface for input streams used to extract Slice types from a sequence of bytes.
Definition InputStream.h:50
Base class for local Slice classes and interfaces.
Definition LocalObject.h:25
Definition BuiltinSequences.h:113
int Int
The mapping for the Slice int type.
Definition Config.h:54
IceUtil::Handle< ::IceInternal::GenericCallbackBase > CallbackPtr
Definition OutgoingAsync.h:822
::IceInternal::Handle< Connection > ConnectionPtr
Definition Connection.h:767
IceInternal::Handle< LocalObject > LocalObjectPtr
Definition LocalObjectF.h:17
IceInternal::Handle< AsyncResult > AsyncResultPtr
Definition AsyncResultF.h:18
::IceInternal::Handle< Communicator > CommunicatorPtr
Definition Communicator.h:608
ObjectPrx ObjectPrxPtr
Definition ProxyF.h:48