On_Demand_Fragmentation_Strategy.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    On_Demand_Fragmentation_Strategy.h
00006  *
00007  *  On_Demand_Fragmentation_Strategy.h,v 1.3 2006/04/20 14:01:25 jwillemsen Exp
00008  *
00009  *  @author  Ossama Othman <ossama@dre.vanderbilt.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_ONDEMAND_FRAGMENTATION_STRATEGY_H
00014 #define TAO_ONDEMAND_FRAGMENTATION_STRATEGY_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "tao/GIOP_Fragmentation_Strategy.h"
00019 #include "ace/CDR_Base.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 class TAO_OutputCDR;
00029 class TAO_Transport;
00030 
00031 
00032 /**
00033  * @class TAO_On_Demand_Fragmenation_Strategy
00034  *
00035  * @brief On Demand GIOP message fragmentation strategy.
00036  *
00037  * GIOP message fragmentation strategy that performs fragmentation
00038  * when the size of the CDR stream will exceed the user configured
00039  * threshold when marshaling the next/pending set of data.
00040  *
00041  * @see TAO_GIOP_Fragmentation_Strategy
00042  */
00043 class TAO_On_Demand_Fragmentation_Strategy
00044   : public TAO_GIOP_Fragmentation_Strategy
00045 {
00046 public:
00047 
00048   /// Constructor.
00049   TAO_On_Demand_Fragmentation_Strategy (TAO_Transport * transport,
00050                                         ACE_CDR::ULong max_message_size);
00051 
00052   virtual ~TAO_On_Demand_Fragmentation_Strategy (void);
00053   virtual int fragment (TAO_OutputCDR & cdr,
00054                         ACE_CDR::ULong pending_alignment,
00055                         ACE_CDR::ULong pending_length);
00056 
00057 private:
00058 
00059   // Disallow copying and assignment.
00060   TAO_On_Demand_Fragmentation_Strategy (TAO_On_Demand_Fragmentation_Strategy const &);
00061   void operator= (TAO_On_Demand_Fragmentation_Strategy const &);
00062 
00063 private:
00064 
00065   /// Pointer to the underlying transport object.
00066   TAO_Transport * const transport_;
00067 
00068   /// Size of GIOP message at which fragmentation will occur.
00069   ACE_CDR::ULong const max_message_size_;
00070 
00071 };
00072 
00073 TAO_END_VERSIONED_NAMESPACE_DECL
00074 
00075 #include /**/ "ace/post.h"
00076 
00077 #endif  /* TAO_ONDEMAND_FRAGMENTATION_STRATEGY_H */

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