Vault  4.1
Public Member Functions | Protected Member Functions
VBentoMessageInputThread Class Reference

VBentoMessageInputThread is a VMessageInputThread that can automatically handle no-such-handler or uncaught message dispatch exceptions, and in response send a Bento-based error reply back to the sender. More...

#include <vmessageinputthread.h>

Inheritance diagram for VBentoMessageInputThread:
VMessageInputThread VSocketThread VThread

List of all members.

Public Member Functions

 VBentoMessageInputThread (const VString &threadBaseName, VSocket *socket, VListenerThread *ownerThread, VServer *server, const VMessageFactory *messageFactory)

Protected Member Functions

virtual void _handleNoMessageHandler (VMessagePtr message)
 This method is called by _dispatchMessage if it cannot find the handler for the message being handled.
virtual void _callProcessMessage (VMessageHandler *handler)
 This method is where we actually call the message handler to process the message it was constructed with.

Detailed Description

VBentoMessageInputThread is a VMessageInputThread that can automatically handle no-such-handler or uncaught message dispatch exceptions, and in response send a Bento-based error reply back to the sender.

Definition at line 134 of file vmessageinputthread.h.


Member Function Documentation

void VBentoMessageInputThread::_handleNoMessageHandler ( VMessagePtr  ) [protected, virtual]

This method is called by _dispatchMessage if it cannot find the handler for the message being handled.

How to handle this is protocol-specific, but a subclass could send an error response back to the sender if the protocol allows that. The implementation must NOT release the message, and the message WILL be released by _dispatchMessage() upon return.

Reimplemented from VMessageInputThread.

Definition at line 176 of file vmessageinputthread.cpp.

References VBentoNode::addInt(), VBentoNode::addString(), VString::chars(), VMessageFactory::instantiateNewMessage(), VThread::mLoggerName, VMessageInputThread::mMessageFactory, VThread::mName, VMessageInputThread::mSocketStream, VBentoNode::writeToBentoTextString(), and VBentoNode::writeToStream().

void VBentoMessageInputThread::_callProcessMessage ( VMessageHandler handler) [protected, virtual]

This method is where we actually call the message handler to process the message it was constructed with.

A subclass might override this to wrap the call to super in a try/catch block if it wants to take action other than logging in response to an exception.

Reimplemented from VMessageInputThread.

Definition at line 191 of file vmessageinputthread.cpp.

References VBentoNode::addInt(), VBentoNode::addString(), VString::chars(), VMessageFactory::instantiateNewMessage(), VThread::mLoggerName, VMessageInputThread::mMessageFactory, VThread::mName, VMessageInputThread::mSocketStream, VBentoNode::writeToBentoTextString(), and VBentoNode::writeToStream().


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

Copyright ©1997-2014 Trygve Isaacson. All rights reserved. This documentation was generated with Doxygen.