feisty meow concerns codebase 2.140
octopi::identity_tentacle Class Reference

Supports an early step in using octopus services: getting an identity. More...

#include <identity_tentacle.h>

Inheritance diagram for octopi::identity_tentacle:
Collaboration diagram for octopi::identity_tentacle:

Public Member Functions

 identity_tentacle (octopus &parent)
 the "parent" will provide the real identity services.
 
virtual ~identity_tentacle ()
 
 DEFINE_CLASS_NAME ("identity_tentacle")
 
virtual basis::outcome reconstitute (const structures::string_array &classifier, basis::byte_array &packed_form, infoton *&reformed)
 reinflates an infoton given that we know the type in "classifier".
 
virtual basis::outcome consume (infoton &to_chow, const octopus_request_id &item_id, basis::byte_array &transformed)
 chews on the "to_chow" infoton to perform the requested action.
 
- Public Member Functions inherited from octopi::tentacle_helper< identity_infoton >
 tentacle_helper (const structures::string_array &classifier, bool backgrounded, int motivational_rate=tentacle::DEFAULT_RATE)
 
virtual ~tentacle_helper ()
 force a virtual destructor.
 
virtual basis::outcome consume (infoton &formal(to_chow), const octopus_request_id &formal(item_id), basis::byte_array &transformed)
 consume is not really provided here. remember to implement for servers!
 
virtual void expunge (const octopus_entity &formal(to_remove))
 no general actions for expunge; they are all class-specific.
 
- Public Member Functions inherited from octopi::tentacle
 tentacle (const structures::string_array &group_name, bool backgrounded, int motivational_rate=tentacle::DEFAULT_RATE)
 constructs a tentacle that handles infotons with the "group_name".
 
virtual ~tentacle ()
 
 DEFINE_CLASS_NAME ("tentacle")
 
const structures::string_arraygroup () const
 returns the name of the group that this tentacle services.
 
bool backgrounding () const
 reports on whether this tentacle supports background operation or not.
 
int motivational_rate () const
 returns the background processing rate this was constructed with.
 
virtual void expunge (const octopus_entity &to_remove)=0
 called to remove traces of the entity "to_remove".
 
basis::outcome enqueue (infoton *to_chow, const octopus_request_id &item_id)
 holds onto infotons coming from the octopus for backgrounding.
 
infotonnext_request (octopus_request_id &item_id)
 pops out the next queued request for processing.
 
bool store_product (infoton *product, const octopus_request_id &original_id)
 used by tentacles to store the objects they produce from infotons.
 
void attach_storage (entity_data_bin &storage)
 used when a tentacle is being integrated with an octopus.
 
void detach_storage ()
 unhooks the storage bin from this tentacle.
 
entity_data_binget_storage ()
 returns the current pointer, which might be nil.
 
void propel_arm ()
 invoked by our thread to cause requests to be processed.
 

Additional Inherited Members

- Public Types inherited from octopi::tentacle
enum  constants { DEFAULT_RATE = 40 }
 
enum  outcomes {
  OKAY = basis::common::OKAY , NOT_FOUND = basis::common::NOT_FOUND , ALREADY_EXISTS = basis::common::EXISTING , BAD_INPUT = basis::common::BAD_INPUT ,
  NO_SPACE = basis::common::NO_SPACE , GARBAGE = basis::common::GARBAGE , DISALLOWED = basis::common::DISALLOWED , NO_HANDLER = basis::common::NO_HANDLER ,
  PARTIAL = basis::common::PARTIAL , ENCRYPTION_MISMATCH = basis::common::ENCRYPTION_MISMATCH
}
 
- Static Public Member Functions inherited from octopi::tentacle
static const char * outcome_name (const basis::outcome &to_name)
 returns the textual form of the outcome "to_name".
 

Detailed Description

Supports an early step in using octopus services: getting an identity.

Definition at line 29 of file identity_tentacle.h.

Constructor & Destructor Documentation

◆ identity_tentacle()

octopi::identity_tentacle::identity_tentacle ( octopus parent)

the "parent" will provide the real identity services.

Definition at line 36 of file identity_tentacle.cpp.

◆ ~identity_tentacle()

octopi::identity_tentacle::~identity_tentacle ( )
virtual

Definition at line 42 of file identity_tentacle.cpp.

Member Function Documentation

◆ consume()

outcome octopi::identity_tentacle::consume ( infoton to_chow,
const octopus_request_id item_id,
basis::byte_array transformed 
)
virtual

chews on the "to_chow" infoton to perform the requested action.

if it's an identity_infoton, then a new identity is provided. otherwise, the identity is given rudimentary checks for validity and the infoton is passed along.

Implements octopi::tentacle.

Definition at line 54 of file identity_tentacle.cpp.

References octopi::identity_infoton::_new_name, octopi::identity_infoton::clone(), octopi::tentacle::DISALLOWED, FUNCDEF, octopi::octopus::issue_identity(), LOG, octopi::octopus_entity::mangled_form(), octopi::octopus_request_id::mangled_form(), octopi::tentacle::NO_SPACE, octopi::tentacle::OKAY, octopi::tentacle::PARTIAL, basis::array< contents >::reset(), and octopi::tentacle::store_product().

◆ DEFINE_CLASS_NAME()

octopi::identity_tentacle::DEFINE_CLASS_NAME ( "identity_tentacle"  )

◆ reconstitute()

outcome octopi::identity_tentacle::reconstitute ( const structures::string_array classifier,
basis::byte_array packed_form,
infoton *&  reformed 
)
virtual

reinflates an infoton given that we know the type in "classifier".

recreates a "reformed" infoton from the "classifier" and packed infoton data in "packed_form". this will only succeed if the classifier's first name is understood here.

Reimplemented from octopi::tentacle_helper< identity_infoton >.

Definition at line 44 of file identity_tentacle.cpp.

References octopi::identity_infoton::identity_classifier(), octopi::tentacle::NO_HANDLER, NULL_POINTER, and octopi::reconstituter().


The documentation for this class was generated from the following files: