#include <mw/messagingbus/acknowledgement.h>
Link against: messagingbus.lib
class Acknowledgement : public RequestId, public RequestId |
Acknowledgement notification is a general response to sent requests and it contains the enumerations for all known errors. Acknowledgement inherits RequestID and is received from Session::sent().
Public Member Enumerations | |
---|---|
enum | Type { None, NotRegistered, InvalidUserID, InvalidApplicationPath, ..., QueueFull } |
Public Member Functions | |
---|---|
Acknowledgement() | |
Acknowledgement(const Acknowledgement &) | |
virtual | ~Acknowledgement() |
Type | errorType() |
bool | isError() |
Acknowledgement & | operator=(const Acknowledgement &) |
ErrorResponse | serverError() |
Protected Member Functions | |
---|---|
void | setErrorType(Type) |
void | setServerError(const ErrorResponse &) |
Inherited Functions | |
---|---|
RequestId::RequestId() | |
RequestId::RequestId(const RequestId &) | |
RequestId::id()const | |
RequestId::operator=(const RequestId &) | |
RequestId::setId(const QString &) | |
RequestId::~RequestId() |
MB aknowledgement error types
None Message was sent successfully. NotRegistered Application has not registered correctly. Registration needed. InvalidUserID Incorrect user id used as a parameter. InvalidApplicationPath Invalid file path given as a wakeup parameter. MissingCredentials JID missing MissingParameters The xml cannot be formed ResponseTimeOut Response for message not received from MB server MessageNotFound The requested message is not found in the queue ServerError Server responded with error. Acknowledgement::serverError() returns the specific error details. NotSupported Unsupported feature tries to be used NotAuthenticated Application is trying to send when authentication is not valid anymore. Needs to reauthenticate. InvalidFormat Parameter in a method call contains characters tha are not allowed. InvalidValue Parameter in a method call contains value that is out of range. QueueFull Queue has reached it's limit. No more messages are accepted until there is more space.
Enumerator | Value | Description |
---|---|---|
None | 0 | |
NotRegistered | 1 | |
InvalidUserID | 2 | |
InvalidApplicationPath | 3 | |
MissingCredentials | 4 | |
MissingParameters | 5 | |
ResponseTimeOut | 6 | |
MessageNotFound | 7 | |
ServerError | 8 | |
NotSupported | 9 | |
NotAuthenticated | 10 | |
InvalidFormat | 11 | |
InvalidValue | 12 | |
QueueFull | 13 |
Acknowledgement | ( | const Acknowledgement & | other | ) |
Copy Constructor.
other - Acknowledgement& class type parameter
Type | errorType | ( | ) | const |
Returns an Acknowledgement::Type type regarding different situations.
bool | isError | ( | ) | const |
Returns a bool type.If return value is true message has been sent succesfully, else return value is false meaning an error occured.
Acknowledgement & | operator= | ( | const Acknowledgement & | other | ) |
Operator =, protect against self-assignment.
ErrorResponse | serverError | ( | ) | const |
Returns an Error object containing error description.
void | setErrorType | ( | Type | type | ) | [protected] |
Method used for setting error type using an Acknowledgement::Type type paramater. Error type is added to logtxt.
type - Acknowledgement::Type object type paramater
See also: errorType()
void | setServerError | ( | const ErrorResponse & | error | ) | [protected] |
Method used for setting server error.
error - ErrorResponse& object type parameter.