Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Examples

rdaReplyHandler Class Reference

This class defines an interface for receiving results of subscriptions and asynchronous device calls, and serves as a base class for user defined callback objects. More...

List of all members.

Public Member Functions

virtual void handleReply (const rdaRequest &request, const rdaData &value)
 Invoked on receipt of a reply containing the requested property value.

virtual void done (const rdaRequest &request)
 Invoked when a set call completes successfully in the device server.

virtual void disconnected (const rdaRequest &request)
 Invoked if a subscription has been suspended because of a lost connection to a remote device; for example, because the device server is down.

virtual void reconnected (const rdaRequest &request)
 Invoked when a suspended subscription has been resumed.

virtual void cancelled (const rdaRequest &request)
 Invoked when a subscription has been cancelled by the monitorOff call.

virtual void handleException (const rdaRequest &request, const rdaBadParameter &exception)
 Invoked on receipt of a reply containing the specified exception.

virtual void handleException (const rdaRequest &request, const rdaTimeOut &exception)
 Invoked if no reply to the request has been received within a certain time limit.

virtual void handleException (const rdaRequest &request, const rdaNoConnection &exception)
 Invoked if the connection to the device server has been lost while waiting for the reply.

virtual void handleException (const rdaRequest &request, const rdaIOError &exception)
 Invoked on receipt of a reply containing the specified exception.

virtual void handleException (const rdaRequest &request, const rdaInternalException &exception)
 Invoked on receipt of a reply containing the specified exception.

virtual void handleException (const rdaRequest &request, const rdaAccessDenied &exception)
 Invoked if the access is not authorized for specified operation.

virtual void handleException (const rdaRequest &request, const rdaBadToken &exception)
 Invoked if token is malformed or its signature is incorrect.

virtual void handleException (const rdaRequest &request, const rdaTokenExpired &exception)
 Invoked if token is expired.

virtual void handleError (const rdaRequest &request, const rdaException &exception)
 Exists as a convinience for handling error replies.


Detailed Description

This class defines an interface for receiving results of subscriptions and asynchronous device calls, and serves as a base class for user defined callback objects.

This class provides simple default implementations for all its methods, so users can only re-implement methods for the kinds of callbacks they care about (see "related device calls" in the methods documentation).

Examples:

GetAsync.cpp, and Monitor.cpp.


Member Function Documentation

virtual void rdaReplyHandler::cancelled const rdaRequest request  )  [virtual]
 

Invoked when a subscription has been cancelled by the monitorOff call.

Default implementation: empty.

virtual void rdaReplyHandler::disconnected const rdaRequest request  )  [virtual]
 

Invoked if a subscription has been suspended because of a lost connection to a remote device; for example, because the device server is down.

Note that this is not a fatal error: connection will be automatically reestablished when the server is up again.

Related device calls:

Default implementation: empty.

See also:
rdaReplyHandler::reconnected

virtual void rdaReplyHandler::done const rdaRequest request  )  [virtual]
 

Invoked when a set call completes successfully in the device server.

Related device calls:

Default implementation: empty.

virtual void rdaReplyHandler::handleError const rdaRequest request,
const rdaException exception
[virtual]
 

Exists as a convinience for handling error replies.

By default, all calls to the overloaded handleException methods are delegated to this method.

Default implementation: empty

virtual void rdaReplyHandler::handleException const rdaRequest request,
const rdaTokenExpired exception
[virtual]
 

Invoked if token is expired.

Related device calls:

Default implementation: invokes handleError with the arguments to this call.

virtual void rdaReplyHandler::handleException const rdaRequest request,
const rdaBadToken exception
[virtual]
 

Invoked if token is malformed or its signature is incorrect.

Related device calls:

Default implementation: invokes handleError with the arguments to this call.

virtual void rdaReplyHandler::handleException const rdaRequest request,
const rdaAccessDenied exception
[virtual]
 

Invoked if the access is not authorized for specified operation.

Related device calls:

Default implementation: invokes handleError with the arguments to this call.

virtual void rdaReplyHandler::handleException const rdaRequest request,
const rdaInternalException exception
[virtual]
 

Invoked on receipt of a reply containing the specified exception.

Related device calls:

Default implementation: invokes handleError with the arguments to this call.

virtual void rdaReplyHandler::handleException const rdaRequest request,
const rdaIOError exception
[virtual]
 

Invoked on receipt of a reply containing the specified exception.

Related device calls:

Default implementation: invokes handleError with the arguments to this call.

virtual void rdaReplyHandler::handleException const rdaRequest request,
const rdaNoConnection exception
[virtual]
 

Invoked if the connection to the device server has been lost while waiting for the reply.

Related device calls:

Default implementation: invokes handleError with the arguments to this call.

virtual void rdaReplyHandler::handleException const rdaRequest request,
const rdaTimeOut exception
[virtual]
 

Invoked if no reply to the request has been received within a certain time limit.

Related device calls:

Default implementation: invokes handleError with the arguments to this call.

virtual void rdaReplyHandler::handleException const rdaRequest request,
const rdaBadParameter exception
[virtual]
 

Invoked on receipt of a reply containing the specified exception.

Related device calls:

Default implementation: invokes handleError with the arguments to this call.

virtual void rdaReplyHandler::handleReply const rdaRequest request,
const rdaData value
[virtual]
 

Invoked on receipt of a reply containing the requested property value.

The value data object may change after the call returns: make a copy if you need to store it in your application.

Related device calls:

Default implementation: empty.

virtual void rdaReplyHandler::reconnected const rdaRequest request  )  [virtual]
 

Invoked when a suspended subscription has been resumed.

Related device calls:

Default implementation: empty.

See also:
rdaReplyHandler::disconnected


The documentation for this class was generated from the following file:
RDA-2.3 documentation - 27 Jun 2007 - N.Trofimov