octopi::unhandled_request Class Reference

Informs the caller that a request type was unknown to the server octopus. More...

#include <unhandled_request.h>

Inheritance diagram for octopi::unhandled_request:
Inheritance graph
[legend]
Collaboration diagram for octopi::unhandled_request:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 unhandled_request (const octopus_request_id &id=octopus_request_id(), const structures::string_array &original_classifier=structures::string_array(), const basis::outcome &reason=basis::common::NO_HANDLER)
 DEFINE_CLASS_NAME ("unhandled_request")
virtual void text_form (basis::base_string &fill) const
 requires derived infotons to be able to show their state as a string.
virtual void pack (basis::byte_array &packed_form) const
 stuffs the data in the infoton into the "packed_form".
virtual bool unpack (basis::byte_array &packed_form)
 restores an infoton from a packed form.
virtual clonableclone () 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 structures::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.
structures::string_array _original_classifier
 the original name of the request.
basis::outcome _reason
 the reason why this request was provided.

Detailed Description

Informs the caller that a request type was unknown to the server octopus.

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 39 of file unhandled_request.h.


Constructor & Destructor Documentation

octopi::unhandled_request::unhandled_request ( const octopus_request_id id = octopus_request_id(),
const structures::string_array original_classifier = structures::string_array(),
const basis::outcome reason = basis::common::NO_HANDLER 
)

Definition at line 22 of file unhandled_request.cpp.

Referenced by clone().


Member Function Documentation

clonable * octopi::unhandled_request::clone (  )  const [virtual]

must be provided to allow creation of a copy of this object.

Implements octopi::infoton.

Definition at line 30 of file unhandled_request.cpp.

References _original_classifier, _original_id, _reason, and unhandled_request().

octopi::unhandled_request::DEFINE_CLASS_NAME ( "unhandled_request"   ) 
void octopi::unhandled_request::pack ( basis::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 octopi::infoton.

Definition at line 51 of file unhandled_request.cpp.

References _original_classifier, _original_id, _reason, basis::attach(), structures::string_array::pack(), octopi::octopus_request_id::pack(), and basis::outcome::value().

int octopi::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 octopi::infoton.

Definition at line 33 of file unhandled_request.cpp.

References _original_classifier, _original_id, _reason, basis::outcome::packed_size(), structures::string_array::packed_size(), and octopi::octopus_request_id::packed_size().

void octopi::unhandled_request::text_form ( basis::base_string state_fill  )  const [virtual]

requires derived infotons to be able to show their state as a string.

Implements octopi::infoton.

Definition at line 39 of file unhandled_request.cpp.

References _original_id, _reason, basis::base_string::assign(), octopi::octopus_request_id::text_form(), octopi::infoton::text_form(), the_classifier(), and basis::outcome::value().

string_array octopi::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 48 of file unhandled_request.cpp.

References octopi::initter.

Referenced by text_form().

bool octopi::unhandled_request::unpack ( basis::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 octopi::infoton.

Definition at line 58 of file unhandled_request.cpp.

References _original_classifier, _original_id, _reason, basis::detach(), structures::string_array::unpack(), and octopi::octopus_request_id::unpack().


Member Data Documentation

the original name of the request.

Definition at line 44 of file unhandled_request.h.

Referenced by clone(), pack(), packed_size(), and unpack().

the failed request's identifier.

Definition at line 43 of file unhandled_request.h.

Referenced by clone(), pack(), packed_size(), text_form(), and unpack().

the reason why this request was provided.

Definition at line 45 of file unhandled_request.h.

Referenced by cromp::cromp_client::acquire(), cromp::cromp_client::acquire_any(), clone(), cromp::cromp_client::login(), pack(), packed_size(), text_form(), and unpack().


The documentation for this class was generated from the following files:
Generated on Sat Jan 28 04:25:46 2012 for hoople2 project by  doxygen 1.6.3