Conscience Core
Public Member Functions | List of all members
conscience_core::core_objects::entities::CscRealEntitiesCollectorMessagingHandler Class Reference
Inheritance diagram for conscience_core::core_objects::entities::CscRealEntitiesCollectorMessagingHandler:
conscience_core::communication::CscMessageHandler

Public Member Functions

 CscRealEntitiesCollectorMessagingHandler (function< void(CscNetworkEntityData *)> listener)
 
optional< CscMessageHandlerResulthandleMessage (const string &messageSubject, const vector< string > &args, optional< int > knowledgeId, ptr< CscMessagingRequestContext > context) override
 
optional< string > handleLowLevelMessage (const string &message) override
 
void changeListener (function< void(CscNetworkEntityData *)> listener)
 
- Public Member Functions inherited from conscience_core::communication::CscMessageHandler
 CscMessageHandler ()
 
virtual ~CscMessageHandler ()
 

Constructor & Destructor Documentation

◆ CscRealEntitiesCollectorMessagingHandler()

conscience_core::core_objects::entities::CscRealEntitiesCollectorMessagingHandler::CscRealEntitiesCollectorMessagingHandler ( function< void(CscNetworkEntityData *)>  listener)
inline

Member Function Documentation

◆ changeListener()

void conscience_core::core_objects::entities::CscRealEntitiesCollectorMessagingHandler::changeListener ( function< void(CscNetworkEntityData *)>  listener)

◆ handleLowLevelMessage()

optional< string > conscience_core::core_objects::entities::CscRealEntitiesCollectorMessagingHandler::handleLowLevelMessage ( const string &  message)
overridevirtual

Handle a low level message. Low level means it is interpreted early in the message processing cycle. Typically it will be processed before encryption, placeholders interpolation or chunks reconstitution. It's useful to answer a simple, non sensitive, unencrypted message, for instance before communication is being secured.

Returns
a string if message has been handled (can be empty string). Return empty optional to declare message as not handled.

Implements conscience_core::communication::CscMessageHandler.

◆ handleMessage()

optional< CscMessageHandlerResult > conscience_core::core_objects::entities::CscRealEntitiesCollectorMessagingHandler::handleMessage ( const string &  messageSubject,
const vector< string > &  args,
optional< int >  knowledgeId,
ptr< CscMessagingRequestContext context 
)
overridevirtual

Implement this method to handle Conscience messages received by the CscMessagingManager.

Parameters
messageSubjectaction / verb for this message, it is typically something like: GET_SCENE_OBJECTS
argsmessage's arguments
knowledgeIdmessage can optionally take a knowledgeId argument, which is a contextual information
contextinformation about the context of the message, contains the originator, and allows to respond
Note
MessageHandler implementation can just delegate most of the messages to Conscience Command API (please see processKnowledgeItemCommand)
See also
CscMessagingManager::sendBack(const string &response, ptr<CscMessagingRequestContext>)

Implements conscience_core::communication::CscMessageHandler.


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