Wait_On_LF_No_Upcall.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Wait_On_LF_No_Upcall.h
00006  *
00007  *  Wait_On_LF_No_Upcall.h,v 1.6 2005/11/02 11:03:27 ossama Exp
00008  *
00009  *  @author  Chris Cleeland <cleeland@ociweb.com>
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_WAIT_ON_LF_NO_UPCALL_H
00015 #define TAO_WAIT_ON_LF_NO_UPCALL_H
00016 
00017 #include /**/ "ace/pre.h"
00018 
00019 #include "tao/Wait_On_Leader_Follower.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00026 
00027 namespace TAO
00028 {
00029   /**
00030    * @class TAO_Wait_On_LF_No_Upcall
00031    *
00032    * @brief Wait according to the Leader-Follower model (like
00033    * TAO_Wait_On_Leader_Follower), but do not allow nested upcalls.
00034    *
00035    * This implementation sets a thread-specific flag on entering wait()
00036    * that indicates that the thread is unavailable to service upcalls.
00037    * Connection handler that are acting in a server role cooperate by
00038    * checking this flag in their handle_input, and returning if they're
00039    * in a thread that is currently suspending upcalls.  The flag gets
00040    * reset once the reply is received.
00041    */
00042 
00043   class Wait_On_LF_No_Upcall : public TAO_Wait_On_Leader_Follower
00044   {
00045   public:
00046 
00047     typedef TAO_Wait_On_Leader_Follower base;
00048 
00049     Wait_On_LF_No_Upcall (TAO_Transport *t);
00050 
00051     virtual ~Wait_On_LF_No_Upcall (void);
00052 
00053     virtual int wait (ACE_Time_Value *max_wait_time,
00054                       TAO_Synch_Reply_Dispatcher &rd);
00055 
00056     virtual bool can_process_upcalls (void) const;
00057   };
00058 }
00059 
00060 TAO_END_VERSIONED_NAMESPACE_DECL
00061 
00062 #include /**/ "ace/post.h"
00063 
00064 #endif /* TAO_WAIT_ON_LF_NO_UPCALL_H */

Generated on Thu Nov 9 11:54:28 2006 for TAO by doxygen 1.3.6