#include <HxDataObjectInterceptor.h>
Public Methods | |
| HxDataObjectInterceptor (const char *poaName) | |
| Construct an interceptor that will only watch request on the given POA. More... | |
| virtual | ~HxDataObjectInterceptor () |
| virtual char * | name () |
| virtual void | destroy () |
| virtual void | receive_request_service_contexts (PortableInterceptor::ServerRequestInfo_ptr) |
| virtual void | receive_request (PortableInterceptor::ServerRequestInfo_ptr) |
| virtual void | send_reply (PortableInterceptor::ServerRequestInfo_ptr) |
| virtual void | send_exception (PortableInterceptor::ServerRequestInfo_ptr) |
| virtual void | send_other (PortableInterceptor::ServerRequestInfo_ptr) |
|
|
Construct an interceptor that will only watch request on the given POA.
00018 : _poaName(poaName), _lastReqId(0), _lastMgr(NULL)
00019 {
00020 }
|
|
|
00023 {
00024 }
|
|
|
00028 {
00029 return CORBA::string_dup("HxDataObjectInterceptor");
00030 }
|
|
|
00034 {
00035 }
|
|
|
00040 {
00041 }
|
|
|
00046 {
00047 try
00048 {
00049 _lastReqId = info->request_id();
00050 _lastMgr = NULL;
00051
00052 PortableServer::POA_var poa = HxServer::instance()->getCurrentPOA();
00053 if(strcmp(poa->the_name(), _poaName) == 0) {
00054 CORBA::RepositoryId rep_id = info->target_most_derived_interface();
00055 _lastMgr = HxDataObjectManager::get(rep_id);
00056 _lastOID = HxServer::instance()->getCurrentObjectId();
00057
00058 _lastMgr->objectAccessed(_lastOID);
00059 }
00060 }
00061 catch(const CORBA::BAD_INV_ORDER&)
00062 {
00063 // Operation not supported in this context
00064 std::cout << "receive_request BAD_INV_ORDER" << std::endl;
00065 }
00066 }
|
|
|
00071 {
00072 try
00073 {
00074 //CORBA::OctetSeq_var obj_id = info->object_id();
00075 if((info->request_id() == _lastReqId) && _lastMgr)
00076 _lastMgr->objectUsed(_lastOID);
00077 }
00078 catch(const CORBA::BAD_INV_ORDER&)
00079 {
00080 // Operation not supported in this context
00081 std::cout << "send_reply BAD_INV_ORDER" << std::endl;
00082 }
00083 }
|
|
|
00088 {
00089 try
00090 {
00091 if((info->request_id() == _lastReqId) && _lastMgr)
00092 _lastMgr->objectUsed(_lastOID);
00093 }
00094 catch(const CORBA::BAD_INV_ORDER&)
00095 {
00096 // Operation not supported in this context
00097 std::cout << "send_exception BAD_INV_ORDER" << std::endl;
00098 }
00099 }
|
|
|
00104 {
00105 try
00106 {
00107 if((info->request_id() == _lastReqId) && _lastMgr)
00108 _lastMgr->objectUsed(_lastOID);
00109 }
00110 catch(const CORBA::BAD_INV_ORDER&)
00111 {
00112 // Operation not supported in this context
00113 std::cout << "send_other BAD_INV_ORDER" << std::endl;
00114 }
00115 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001