TcpConnectionReplaceTask.h

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef OPENDDS_TCPCONNECTIONREPLACETASK_H
00009 #define OPENDDS_TCPCONNECTIONREPLACETASK_H
00010 
00011 #include /**/ "ace/pre.h"
00012 
00013 #include "TcpConnection_rch.h"
00014 #include "dds/DCPS/transport/framework/QueueTaskBase_T.h"
00015 
00016 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00017 # pragma once
00018 #endif /* ACE_LACKS_PRAGMA_ONCE */
00019 
00020 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
00021 
00022 namespace OpenDDS {
00023 namespace DCPS {
00024 
00025 class TcpTransport;
00026 
00027 /**
00028  * @class TcpConnectionReplaceTask
00029  *
00030  * @brief Active Object managing a queue of connection info objects.
00031  *
00032  *  This task is dedicated to check if the incoming connections are re-established
00033  *  connection from the remote. This would resolve the deadlock problem between the
00034  *  reactor thread (calling TcpTransport::passive_connection()) and the orb
00035  *  thread (calling TcpTransport::make_passive_connection()). The reactor
00036  *  thread will enqueue the new connection to this task and let this task dequeue
00037  *  and check the connection. This task handles all connections associated with
00038  *  a TransportImpl object.
00039  */
00040 class TcpConnectionReplaceTask : public QueueTaskBase <TcpConnection_rch> {
00041 public:
00042   TcpConnectionReplaceTask(TcpTransport* trans);
00043 
00044   virtual ~TcpConnectionReplaceTask();
00045 
00046   /// Handle the request.
00047   virtual void execute(TcpConnection_rch& con);
00048 
00049 private:
00050 
00051   TcpTransport* trans_;
00052 };
00053 
00054 } // namespace DCPS
00055 } // namespace OpenDDS
00056 
00057 OPENDDS_END_VERSIONED_NAMESPACE_DECL
00058 
00059 #include /**/ "ace/post.h"
00060 
00061 #endif /* OPENDDS_TCPCONNECTIONREPLACETASK_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1