ResultObject — object tracking status of a remote call, destination of call results.
class ResultObject : public Object { public: enum State; public: PEnum< State > state; PPointer< Throwable > exception; public: void cancel() const; std::auto_ptr< MethodPacket > create_results() const; }; |
ResultObject is returned by asynchronous call stub when the RPC_RESULTS flag is set using the param() method. It can be used to monitor the call state and inspect its results.
![]() | Note |
---|---|
ResultObject is used internally to implement the SRPC and offers more methods and data for that purpose. You should use only features described in this documentation. |
The state field of an ResultObject may contain one of the following values:
Name | Description |
---|---|
STATE_UNKNOWN | Waiting for a reply to the call request. |
STATE_SUCCESS | The call has succeeded. Use the create_results() method to retrieve the results. |
STATE_DELIVERY_FAILED | Failed to deliver the request to the callee object. |
STATE_UNSUPPORTED_INTERFACE | The callee object does not implement the requested interface. Check Section 8.4.2.2, “Exceptions Thrown By The Core”, description of IllegalPointerConversionException, to see when this may happen. |
STATE_EXCEPTION | An exception has been thrown on the callee node. The exception filed of ResultObject will point to the exception. The exception was either thrown by the callee method, or generated by the Core. See Section 8.4.2.1, “Exceptions Thrown By Callee” for information about user exception remapping. |
STATE_CANCELLED | The call has been cancelled, either by the cancel() method or by the Core. |
Initial value of state is STATE_UNKNOWN. When information about call results is delivered back to the ResultObject, the state will change to a different value. Its value will never change afterwards.
![]() | Note |
---|---|
The enumeration type State is member of the ResultObject class, so the fully-qualified name of STATE_SUCCESS is Massiv::Core::ResultObject::STATE_SUCCESS for example. |