version 1.9, 2006/08/09 21:13:05
|
version 1.10, 2006/11/14 18:34:59
|
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Mike Day (mdday@us.ibm.com) |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
|
|
#ifndef Pegasus_BinaryMessageHandler_h | #ifndef Pegasus_BinaryMessageHandler_h |
#define Pegasus_BinaryMessageHandler_h | #define Pegasus_BinaryMessageHandler_h |
|
|
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/AsyncOpNode.h> | #include <Pegasus/Common/AsyncOpNode.h> |
#include <Pegasus/Common/AsyncQueue.h> | #include <Pegasus/Common/AsyncQueue.h> |
|
|
/** This class provides an in-process binary client interface, | /** This class provides an in-process binary client interface, |
both for requests and responses. | both for requests and responses. |
*/ | */ |
|
|
class PEGASUS_SERVER_LINKAGE BinaryMessageHandler : public MessageQueueService | class PEGASUS_SERVER_LINKAGE BinaryMessageHandler : public MessageQueueService |
{ | { |
public: | public: |
|
|
~BinaryMessageHandler(); | ~BinaryMessageHandler(); |
| |
virtual Boolean messageOK(const Message * message); | virtual Boolean messageOK(const Message * message); |
virtual void handleEnqueue(void); |
virtual void handleEnqueue(); |
virtual void handleEnqueue(Message * message); | virtual void handleEnqueue(Message * message); |
virtual void _handle_async_request(AsyncRequest * request); | virtual void _handle_async_request(AsyncRequest * request); |
|
|
protected: | protected: |
static ThreadReturnType PEGASUS_THREAD_CDECL handle_binary_message(void *); | static ThreadReturnType PEGASUS_THREAD_CDECL handle_binary_message(void *); |
| |
|
|
CIMInvokeMethodResponseMessage *) throw(); | CIMInvokeMethodResponseMessage *) throw(); |
| |
private: | private: |
BinaryMessageHandler(void); |
BinaryMessageHandler(); |
BinaryMessageHandler & operator = (const BinaryMessageHandler & ) const; | BinaryMessageHandler & operator = (const BinaryMessageHandler & ) const; |
void _handleRequest(AsyncOpNode *, Message *) throw(); | void _handleRequest(AsyncOpNode *, Message *) throw(); |
void _handleResponse(AsyncOpNode *, Message *) throw(); | void _handleResponse(AsyncOpNode *, Message *) throw(); |
| |
|
|
MessageQueueService* _outputQueue; | MessageQueueService* _outputQueue; |
| |
// Flag to indicate whether or not the CIMServer is shutting down. | // Flag to indicate whether or not the CIMServer is shutting down. |
AsyncQueue<AsyncOpNode> _msg_q; | AsyncQueue<AsyncOpNode> _msg_q; |
|
|
}; | }; |
| |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
#endif // Pegasus_BinaryMessageHandler_h | #endif // Pegasus_BinaryMessageHandler_h |