man Module () - Modules are used for protocol modules and detached threads used to service key Bayonne protocols and interfaces. Module interface class.

NAME

Module - Modules are used for protocol modules and detached threads used to service key Bayonne protocols and interfaces. Module interface class.

SYNOPSIS



#include <bayonne.h>

Public Member Functions

Module * getNext (void)

virtual char * getName (void)=0

Get the 'name' identifer of this module. virtual char * dispatch (Trunk *trunk)

Execute the script request. trunkdata_t * getData (Trunk *trunk)

Fetch the data pointer of a trunk. virtual void commit (Trunk *trunk)

Post execute commit for modules that schedule delay. virtual unsigned sleep (Trunk *trunk)

This is used to determine if a timeout/sleep should occur or if script advance is immediate. virtual void detach (Trunk *trunk)

Notify for detach. virtual void attach (Trunk *trunk)

Notify for attach. virtual void reload (void)

reload provisioning interface for fifos. virtual bool command (char **argv, std::ostream *out)

fifo command extension.

Protected Member Functions

Module * getFirst (void)

bool executePrior (Trunk *trunk)

virtual void import (const char *token)

Preprocessor import directives... virtual const char * getExtension (void)

Get alternate script extensions. virtual Script::Symbol * getSymbol (Trunk *trk, const char *map, unsigned size)

Get a global symbol space for this module. virtual modtype_t getType (void)=0

Get the 'type' identifer of this module. void addSymbols (void)

Add a symbol space for this module. void addSession (void)

Add as a session handling module. void addCommand (void)

Add fifo command handling module. void addPrompts (void)

Add module as url processing. void addNetwork (void)

Add module for net processing. void addRequest (void)

Add request handler back-end. void setThread (Trunk *trunk, Service *svc)

Set service thread in trunk object. virtual char * getPrompt (const char *original)

Parse a url/prompt file into a fixed file path. virtual void expires (Request *request)

Notify an expired request. virtual void running (Request *request)

Notify a running request. virtual void cancelled (Request *request)

Notify a cancelled request. virtual int accept (char *buffer, socklen_t len, statnode_t *node)

Notify when a module network packet has been received and offer reply possibility. virtual void failover (statnode_t *node)

Notify when a heartbeat dies... virtual void broadcast (void)

Network synchronization to broadcast messages from a module thread.

Static Protected Attributes

Module * modImport

Friends

void broadcast (char *msgbuf, unsigned msglen)

void cancel (TrunkGroup *grp, const char *tag)

Module * getModule (modtype_t mod, const char *name=NULL)

void detachModules (Trunk *trunk)

void attachModules (Trunk *trunk)

Detailed Description

Modules are used for protocol modules and detached threads used to service key Bayonne protocols and interfaces. Module interface class.

These are done as loadable modules and may be replaced with application specific interfaces.

Author: David Sugar <dyfet@ostel.com>

Member Function Documentation

virtual int Module::accept (char * buffer, socklen_t len, statnode_t * node) [inline, protected, virtual]

Notify when a module network packet has been received and offer reply possibility.

Returns: != 0 to claim packet, >0 if reply.

Parameters: packet buffer.

packet length.

node entity.

void Module::addCommand (void) [protected]

Add fifo command handling module.

void Module::addNetwork (void) [protected]

Add module for net processing.

void Module::addPrompts (void) [protected]

Add module as url processing.

void Module::addRequest (void) [protected]

Add request handler back-end.

void Module::addSession (void) [protected]

Add as a session handling module.

void Module::addSymbols (void) [protected]

Add a symbol space for this module.

virtual void Module::attach (Trunk * trunk) [inline, virtual]

Notify for attach.

This can be used to set constants in the trunks symbol space for this module's use at call setup.

Parameters: trunk to attach to.

virtual void Module::broadcast (void) [inline, protected, virtual]

Network synchronization to broadcast messages from a module thread.

virtual void Module::cancelled (Request * request) [inline, protected, virtual]

Notify a cancelled request.

virtual bool Module::command (char ** argv, std::ostream * out) [inline, virtual]

fifo command extension.

virtual void Module::commit (Trunk * trunk) [inline, virtual]

Post execute commit for modules that schedule delay.

Parameters: trunk object to reference.

virtual void Module::detach (Trunk * trunk) [inline, virtual]

Notify for detach.

As each call is detached, this will get called.

Parameters: trunk to detach from.

virtual char* Module::dispatch (Trunk * trunk) [inline, virtual]

Execute the script request.

Usually this involves creating a detached service thread.

Returns: error message or NULL.

Parameters: trunk object to reference.

virtual void Module::expires (Request * request) [inline, protected, virtual]

Notify an expired request.

virtual void Module::failover (statnode_t * node) [inline, protected, virtual]

Notify when a heartbeat dies...

Parameters: node that heartbeat died on.

trunkdata_t* Module::getData (Trunk * trunk) [inline]

Fetch the data pointer of a trunk.

virtual const char* Module::getExtension (void) [inline, protected, virtual]

Get alternate script extensions.

Returns: extension if used.

virtual char* Module::getName (void) [pure virtual]

Get the 'name' identifer of this module.

Returns: name string.

virtual char* Module::getPrompt (const char * original) [inline, protected, virtual]

Parse a url/prompt file into a fixed file path.

virtual Script::Symbol* Module::getSymbol (Trunk * trk, const char * map, unsigned size) [inline, protected, virtual]

Get a global symbol space for this module.

Returns: global symbol space if used.

virtual modtype_t Module::getType (void) [protected, pure virtual]

Get the 'type' identifer of this module.

Returns: type id.

virtual void Module::import (const char * token) [inline, protected, virtual]

Preprocessor import directives...

Parameters: token .RE

virtual void Module::reload (void) [inline, virtual]

reload provisioning interface for fifos.

virtual void Module::running (Request * request) [inline, protected, virtual]

Notify a running request.

void Module::setThread (Trunk * trunk, Service * svc) [protected]

Set service thread in trunk object.

Parameters: trunk .br service object

virtual unsigned Module::sleep (Trunk * trunk) [inline, virtual]

This is used to determine if a timeout/sleep should occur or if script advance is immediate.

Returns: number of seconds in sleep state.

Parameters: trunk object to reference.

Author

Generated automatically by Doxygen for Bayonne from the source code.