65 lines
1.7 KiB
C++
65 lines
1.7 KiB
C++
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (C) Intel Corporation, 2006 - 2010.
|
|
//
|
|
// File: SoapServerHandler.h
|
|
//
|
|
// Contents: Handles SOAP connection
|
|
//
|
|
// Notes:
|
|
//----------------------------------------------------------------------------
|
|
|
|
#ifndef SOAP_SERVER_HANDLER
|
|
#define SOAP_SERVER_HANDLER
|
|
|
|
#include "ace/ACE.h"
|
|
#if !defined (ACE_LACKS_PRAGMA_ONCE)
|
|
# pragma once
|
|
#endif /* ACE_LACKS_PRAGMA_ONCE */
|
|
|
|
#include "ace/Svc_Handler.h"
|
|
#include "ace/SOCK_Stream.h"
|
|
#include "MPSSoapServer.h"
|
|
#include "global.h"
|
|
|
|
|
|
// ============================================================================
|
|
// = TITLE
|
|
// Handles request of a SOAP client.
|
|
//
|
|
// = DESCRIPTION
|
|
// Handles one slave socket request/response from a SOAP client.
|
|
// Calls GSOAP function soap_serve() to receive the request from the socket
|
|
// and send the response
|
|
// ============================================================================
|
|
class SOAP_Server_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_MT_SYNCH>
|
|
{
|
|
|
|
public:
|
|
// = Initialization method.
|
|
SOAP_Server_Handler (void);
|
|
|
|
// = Destruction
|
|
virtual ~SOAP_Server_Handler(void);
|
|
|
|
|
|
|
|
// Handle reactor calls.
|
|
// virtual from ACE_Svc_Handler<>
|
|
virtual int handle_input (ACE_HANDLE = ACE_INVALID_HANDLE);
|
|
virtual int handle_output (ACE_HANDLE = ACE_INVALID_HANDLE);
|
|
virtual int handle_close (ACE_HANDLE = ACE_INVALID_HANDLE,
|
|
ACE_Reactor_Mask close_mask =
|
|
ACE_Event_Handler::ALL_EVENTS_MASK);
|
|
virtual int open (void * pVoid);
|
|
|
|
|
|
protected:
|
|
STATUS initiate_io (ACE_Reactor_Mask mask);
|
|
|
|
private:
|
|
int flg_mask_; // Mask that registers with the reactor
|
|
MPSSoapServer SoapServer;
|
|
};
|
|
|
|
#endif // SOAP_SERVER_HANDLER
|