feisty meow concerns codebase 2.140
octopi::login_tentacle Class Reference

Provides rudimentary login services. More...

#include <login_tentacle.h>

Inheritance diagram for octopi::login_tentacle:
Collaboration diagram for octopi::login_tentacle:

Public Member Functions

 login_tentacle (entity_registry &security, int dormancy_period=7 *basis::MINUTE_ms)
 constructs a login manager based on "security".
 
virtual ~login_tentacle ()
 
 DEFINE_CLASS_NAME ("login_tentacle")
 
virtual basis::outcome reconstitute (const structures::string_array &classifier, basis::byte_array &packed_form, infoton *&reformed)
 recreates a "reformed" infoton from the packed data.
 
virtual basis::outcome consume (infoton &to_chow, const octopus_request_id &item_id, basis::byte_array &transformed)
 the base login_tentacle allows anyone to log in.
 
virtual void expunge (const octopus_entity &to_remove)
 trashes the records we were keeping for the entity.
 
- Public Member Functions inherited from octopi::tentacle_helper< security_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.
 
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

Provides rudimentary login services.

This is a way for entities to become logged into an octopus system, should that be required by the application.

Definition at line 34 of file login_tentacle.h.

Constructor & Destructor Documentation

◆ login_tentacle()

octopi::login_tentacle::login_tentacle ( entity_registry security,
int  dormancy_period = 7 * basis::MINUTE_ms 
)

constructs a login manager based on "security".

this will allow an entity to persist for "dormancy_period" milliseconds without a refresh. after that time, the entities we haven't heard from are whacked. the "security" object will provide our login checking.

Definition at line 35 of file login_tentacle.cpp.

◆ ~login_tentacle()

octopi::login_tentacle::~login_tentacle ( )
virtual

Definition at line 42 of file login_tentacle.cpp.

Member Function Documentation

◆ consume()

◆ DEFINE_CLASS_NAME()

octopi::login_tentacle::DEFINE_CLASS_NAME ( "login_tentacle"  )

◆ expunge()

void octopi::login_tentacle::expunge ( const octopus_entity to_remove)
virtual

trashes the records we were keeping for the entity.

Implements octopi::tentacle.

Definition at line 54 of file login_tentacle.cpp.

References octopi::entity_registry::zap_entity().

◆ reconstitute()

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

recreates a "reformed" infoton from the packed data.

this uses 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< security_infoton >.

Definition at line 44 of file login_tentacle.cpp.

References octopi::tentacle::NO_HANDLER, NULL_POINTER, octopi::reconstituter(), and octopi::security_infoton::security_classifier().


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