3 //=============================================================================
5 * @file IIOP_Server_Request_Interceptor.h
7 * Implementation header for the server request interceptor for the
10 * @author Iliyan Jeliazkov <iliyan@ociweb.com>
11 * @author Ciju John <johnc@ociweb.com>
13 //=============================================================================
15 #ifndef ISERVER_REQUEST_INTERCEPTOR_H
16 #define ISERVER_REQUEST_INTERCEPTOR_H
18 #include "ace/config-all.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #include "tao/TransportCurrent/IIOP_Transport_Current.h"
26 #include "Server_Request_Interceptor.h"
30 class IIOP_Server_Request_Interceptor
31 : public virtual Test::Server_Request_Interceptor
32 , public virtual ::CORBA::LocalObject
36 IIOP_Server_Request_Interceptor (const char* orbid
, TEST test
);
39 virtual ~IIOP_Server_Request_Interceptor () = default;
41 /// queries the status of the test
42 virtual bool self_test ();
45 * @name Methods Required by the Server Request Interceptor
48 * These are methods that must be implemented since they are pure
49 * virtual in the abstract base class. They are the canonical
50 * methods required for all server request interceptors.
53 /// Return the name of this ServerRequestinterceptor.
54 virtual char * name ();
56 /// incomming interception point
57 virtual void receive_request_service_contexts (PortableInterceptor::ServerRequestInfo_ptr
);
59 /// outgoing interception point
60 virtual void send_reply (PortableInterceptor::ServerRequestInfo_ptr ri
);
62 /// outgoing interception point
63 virtual void send_exception (PortableInterceptor::ServerRequestInfo_ptr ri
);
65 /// outgoing interception point
66 virtual void send_other (PortableInterceptor::ServerRequestInfo_ptr ri
);
70 /// process incomming requests context
71 void inbound_process_context
72 (PortableInterceptor::ServerRequestInfo_ptr ri
);
74 /// process outgoing requests context
75 void outbound_process_context
76 (PortableInterceptor::ServerRequestInfo_ptr ri
);
78 /// saves the incomming request info
79 void push_request_info (size_t requestID
);
81 /// clears the outgoing request info
82 void pop_request_info (size_t requestID
);
84 TAO::Transport::IIOP::Current_ptr
resolve_iiop_transport_current (const char* orbid
);
87 /// transport ID dtata structure
90 CORBA::String_var host_
;
97 EP (CORBA::UShort port
, const char* host
)
102 bool operator== (const struct EP
&ep
) const
104 return (this->port_
== ep
.port_
) &&
105 (strcmp (this->host_
.in (), ep
.host_
.in ()) == 0);
107 bool operator!= (const struct EP
&ep
) const
109 return !(this->operator== (ep
));
114 /// IIOPTraits test status
115 bool iiop_test_successful_
;
117 /// Endpoints hash table
118 EndPoint endPoints_
[1001];
122 #endif /* ISERVER_REQUEST_INTERCEPTOR_H */