Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Portable_Interceptors / PICurrent / ServerRequestInterceptor.h
blob8be04ba5395aaf134def9d18d75fa29155ebbaea
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file ServerRequestInterceptor.h
7 * Implementation header for the server request interceptor for the
8 * PortableInterceptor::Current test.
10 * @author Ossama Othman <ossama@uci.edu>
12 //=============================================================================
14 #ifndef SERVER_REQUEST_INTERCEPTOR_H
15 #define SERVER_REQUEST_INTERCEPTOR_H
17 #include "ace/config-all.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "tao/PI_Server/PI_Server.h"
24 #include "tao/PI/PI.h"
25 #include "tao/PortableInterceptorC.h"
26 #include "tao/LocalObject.h"
28 #if defined(_MSC_VER)
29 #pragma warning(push)
30 #pragma warning(disable:4250)
31 #endif /* _MSC_VER */
33 /**
34 * @class ServerRequestInterceptor
36 * @brief Simple concrete server request interceptor.
38 * This server request interceptor
40 class ServerRequestInterceptor
41 : public virtual PortableInterceptor::ServerRequestInterceptor,
42 public virtual ::CORBA::LocalObject
44 public:
46 /// Constructor.
47 ServerRequestInterceptor (PortableInterceptor::SlotId id,
48 PortableInterceptor::Current_ptr pi_current);
50 /**
51 * @name Methods Required by the Server Request Interceptor
52 * Interface
54 * These are methods that must be implemented since they are pure
55 * virtual in the abstract base class. They are the canonical
56 * methods required for all server request interceptors.
58 //@{
59 /// Return the name of this ServerRequestinterceptor.
60 virtual char * name (void);
62 virtual void destroy (void);
64 virtual void receive_request_service_contexts (
65 PortableInterceptor::ServerRequestInfo_ptr ri);
67 virtual void receive_request (
68 PortableInterceptor::ServerRequestInfo_ptr ri);
70 virtual void send_reply (
71 PortableInterceptor::ServerRequestInfo_ptr ri);
73 virtual void send_exception (
74 PortableInterceptor::ServerRequestInfo_ptr ri);
76 virtual void send_other (
77 PortableInterceptor::ServerRequestInfo_ptr ri);
78 //@}
80 private:
82 /// The PICurrent slot ID allocated to this application during ORB
83 /// initialization.
84 PortableInterceptor::SlotId slot_id_;
86 /// Reference to the PICurrent object.
87 PortableInterceptor::Current_var pi_current_;
91 #if defined(_MSC_VER)
92 #pragma warning(pop)
93 #endif /* _MSC_VER */
95 #endif /* SERVER_REQUEST_INTERCEPTOR_H */