3 //=============================================================================
5 * @file On_Demand_Fragmentation_Strategy.h
7 * @author Ossama Othman <ossama@dre.vanderbilt.edu>
9 //=============================================================================
11 #ifndef TAO_ONDEMAND_FRAGMENTATION_STRATEGY_H
12 #define TAO_ONDEMAND_FRAGMENTATION_STRATEGY_H
14 #include /**/ "ace/pre.h"
16 #include "tao/GIOP_Fragmentation_Strategy.h"
17 #include "ace/CDR_Base.h"
18 #include "ace/Copy_Disabled.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
31 * @class TAO_On_Demand_Fragmenation_Strategy
33 * @brief On Demand GIOP message fragmentation strategy.
35 * GIOP message fragmentation strategy that performs fragmentation
36 * when the size of the CDR stream will exceed the user configured
37 * threshold when marshaling the next/pending set of data.
39 * @see TAO_GIOP_Fragmentation_Strategy
41 class TAO_On_Demand_Fragmentation_Strategy
42 : public TAO_GIOP_Fragmentation_Strategy
46 TAO_On_Demand_Fragmentation_Strategy (TAO_Transport
* transport
,
47 ACE_CDR::ULong max_message_size
);
49 virtual ~TAO_On_Demand_Fragmentation_Strategy ();
50 virtual int fragment (TAO_OutputCDR
& cdr
,
51 ACE_CDR::ULong pending_alignment
,
52 ACE_CDR::ULong pending_length
);
55 TAO_On_Demand_Fragmentation_Strategy (TAO_On_Demand_Fragmentation_Strategy
const &) = delete;
56 void operator= (TAO_On_Demand_Fragmentation_Strategy
const &) = delete;
57 TAO_On_Demand_Fragmentation_Strategy (TAO_On_Demand_Fragmentation_Strategy
&&) = delete;
58 void operator= (TAO_On_Demand_Fragmentation_Strategy
&&) = delete;
61 /// Pointer to the underlying transport object.
62 TAO_Transport
* const transport_
;
64 /// Size of GIOP message at which fragmentation will occur.
65 ACE_CDR::ULong
const max_message_size_
;
68 TAO_END_VERSIONED_NAMESPACE_DECL
70 #include /**/ "ace/post.h"
72 #endif /* TAO_ONDEMAND_FRAGMENTATION_STRATEGY_H */