#include <unhandled_request.h>
Inheritance diagram for unhandled_request:


Public Member Functions | |
| unhandled_request (const octopus_request_id &id=octopus_request_id(), const string_array &original_classifier=string_array(), const outcome &reason=common::NO_HANDLER) | |
| IMPLEMENT_CLASS_NAME ("unhandled_request") | |
| virtual void | pack (byte_array &packed_form) const |
| stuffs the data in the infoton into the "packed_form". | |
| virtual bool | unpack (byte_array &packed_form) |
| restores an infoton from a packed form. | |
| virtual clonable * | clone () const |
| must be provided to allow creation of a copy of this object. | |
| virtual int | packed_size () const |
| reports how large the infoton will be when packed. | |
Static Public Member Functions | |
| static string_array | the_classifier () |
| the classifier for unknown infotons makes unhandled requests unique. | |
Public Attributes | |
| octopus_request_id | _original_id |
| the failed request's identifier. | |
| string_array | _original_classifier |
| the original name of the request. | |
| outcome | _reason |
| the reason why this request was provided. | |
The accompanying octopus_request_id specifies the particular request that failed. The classifier of the original request is also included for reference. This allows the client to get an immediate response from the server when we have no idea what they are asking for, rather than the client needing to timeout on the failed request. Note: this is a heavy-weight header that should not be included in other headers.
Definition at line 35 of file unhandled_request.h.
| unhandled_request::unhandled_request | ( | const octopus_request_id & | id = octopus_request_id(), |
|
| const string_array & | original_classifier = string_array(), |
|||
| const outcome & | reason = common::NO_HANDLER | |||
| ) |
| unhandled_request::IMPLEMENT_CLASS_NAME | ( | "unhandled_request" | ) |
| string_array unhandled_request::the_classifier | ( | ) | [static] |
the classifier for unknown infotons makes unhandled requests unique.
__Unhandled__ is now a reserved word for classifiers. That's the classifier for all unhandled_request objects as returned by the_classifier().
Definition at line 39 of file unhandled_request.cpp.
References initter, and string_array().
| void unhandled_request::pack | ( | byte_array & | packed_form | ) | const [virtual] |
stuffs the data in the infoton into the "packed_form".
the derived method must know how to pack this particular type of infoton.
Implements infoton.
Definition at line 42 of file unhandled_request.cpp.
References _original_classifier, _original_id, _reason, outcome::pack(), string_array::pack(), and octopus_request_id::pack().
| bool unhandled_request::unpack | ( | byte_array & | packed_form | ) | [virtual] |
restores an infoton from a packed form.
the unpack() method will be utilized by tentacles that support this type of object.
Implements infoton.
Definition at line 49 of file unhandled_request.cpp.
References _original_classifier, _original_id, _reason, outcome::unpack(), string_array::unpack(), and octopus_request_id::unpack().
| clonable * unhandled_request::clone | ( | ) | const [virtual] |
must be provided to allow creation of a copy of this object.
Implements infoton.
Definition at line 28 of file unhandled_request.cpp.
References _original_classifier, _original_id, _reason, and unhandled_request().
| int unhandled_request::packed_size | ( | ) | const [virtual] |
reports how large the infoton will be when packed.
must be overridden by derived classes to provide a guess at how large the packed size of this will be. this is important to estimate accurately.
Implements infoton.
Definition at line 31 of file unhandled_request.cpp.
References _original_classifier, _original_id, _reason, outcome::packed_size(), string_array::packed_size(), and octopus_request_id::packed_size().
the failed request's identifier.
Definition at line 39 of file unhandled_request.h.
Referenced by clone(), pack(), packed_size(), and unpack().
the original name of the request.
Definition at line 40 of file unhandled_request.h.
Referenced by clone(), pack(), packed_size(), and unpack().
the reason why this request was provided.
Definition at line 41 of file unhandled_request.h.
Referenced by cromp_client::acquire(), clone(), cromp_client::login(), pack(), packed_size(), and unpack().
1.5.1