Represents a "queue-able", one-way, collocated, CORBA request with a "Synch Scope" policy of SYNC_WITH_SERVER. More...
#include <CSD_TP_Collocated_Synch_With_Server_Request.h>


Public Member Functions | |
| TP_Collocated_Synch_With_Server_Request (TAO_ServerRequest &server_request, const PortableServer::ObjectId &object_id, PortableServer::POA_ptr poa, const char *operation, PortableServer::Servant servant, TP_Servant_State *servant_state) | |
| Constructor. | |
| virtual | ~TP_Collocated_Synch_With_Server_Request () |
| Virtual Destructor. | |
| bool | wait (void) |
Protected Member Functions | |
| virtual void | prepare_for_queue_i () |
| virtual void | dispatch_i () |
| Dispatch the request to the servant. | |
| virtual void | cancel_i () |
| Cancel the request. | |
Private Attributes | |
| TP_Synch_Helper | synch_helper_ |
Represents a "queue-able", one-way, collocated, CORBA request with a "Synch Scope" policy of SYNC_WITH_SERVER.
This kind of request is one-way request with the SYNC_WITH_SERVER policy applied. It is cloned before enqueuing and the "enqueuing" thread will block until it is signalled by the TP_Task thread that will happen just before the request is dispatched or the request is cancelled.
Definition at line 51 of file CSD_TP_Collocated_Synch_With_Server_Request.h.
| TAO::CSD::TP_Collocated_Synch_With_Server_Request::TP_Collocated_Synch_With_Server_Request | ( | TAO_ServerRequest & | server_request, | |
| const PortableServer::ObjectId & | object_id, | |||
| PortableServer::POA_ptr | poa, | |||
| const char * | operation, | |||
| PortableServer::Servant | servant, | |||
| TP_Servant_State * | servant_state | |||
| ) |
Constructor.
Definition at line 9 of file CSD_TP_Collocated_Synch_With_Server_Request.inl.
: TP_Corba_Request(object_id, poa, operation, servant, servant_state, server_request) { }
| TAO::CSD::TP_Collocated_Synch_With_Server_Request::~TP_Collocated_Synch_With_Server_Request | ( | ) | [virtual] |
Virtual Destructor.
Definition at line 17 of file CSD_TP_Collocated_Synch_With_Server_Request.cpp.
{
}
| void TAO::CSD::TP_Collocated_Synch_With_Server_Request::cancel_i | ( | ) | [protected, virtual] |
Cancel the request.
Implements TAO::CSD::TP_Request.
Definition at line 62 of file CSD_TP_Collocated_Synch_With_Server_Request.cpp.
{
this->synch_helper_.cancelled();
}
| void TAO::CSD::TP_Collocated_Synch_With_Server_Request::dispatch_i | ( | ) | [protected, virtual] |
Dispatch the request to the servant.
Implements TAO::CSD::TP_Request.
Definition at line 38 of file CSD_TP_Collocated_Synch_With_Server_Request.cpp.
{
// This is done *before* we do_dispatch().
this->synch_helper_.dispatched();
try
{
this->do_dispatch();
}
catch (const ::CORBA::Exception&)
{
// Eat these. We probably should log these, but since we have already
// unblocked the requesting thread there is no point in saving it or
// doing anything with it.
}
catch (...)
{
// Eat these. We probably should log these, but since we have already
// unblocked the requesting thread there is no point in saving it or
// doing anything with it.
}
}
| void TAO::CSD::TP_Collocated_Synch_With_Server_Request::prepare_for_queue_i | ( | ) | [protected, virtual] |
Prepare this TP_Collocated_Synch_With_Server_Request object to be placed into the request queue. This will cause the underlying TAO_ServerRequest object to be cloned.
Reimplemented from TAO::CSD::TP_Request.
Definition at line 23 of file CSD_TP_Collocated_Synch_With_Server_Request.cpp.
{
// NOTE: We *NEED* clone the TAO_ServerRequest for a collocated,
// one-way SYNC_WITH_SERVER request. This is because the
// calling thread is signalled just *before* the request is
// dispatched. It's (very) possible that the calling thread
// will destroy the underlying TAO_ServerRequest object while
// the request is dispatching to servant. This is why we make
// a clone - so that we have our own copy that won't be destroyed
// while we are using it.
this->do_clone();
}
| bool TAO::CSD::TP_Collocated_Synch_With_Server_Request::wait | ( | void | ) |
Wait until the request has been dispatched (but not completed), or until it has been cancelled. Note that this will wait until just before* the request is dispatched by a worker thread. This is different than the TP_Collocated_Synch_Request which waits until just *after* the request is dispatched by a worker thread. Returns true if the request has been dispatched, and returns false if the request has been cancelled.
Definition at line 27 of file CSD_TP_Collocated_Synch_With_Server_Request.inl.
{
return this->synch_helper_.wait_while_pending();
}
TP_Synch_Helper TAO::CSD::TP_Collocated_Synch_With_Server_Request::synch_helper_ [private] |
Helper used to block and unblock the thread that invokes our wait() method.
Definition at line 96 of file CSD_TP_Collocated_Synch_With_Server_Request.h.
1.7.0