3 //=============================================================================
5 * @file GIOP_Fragmentation_Strategy.h
7 * @author Ossama Othman <ossama@dre.vanderbilt.edu>
9 //=============================================================================
11 #ifndef TAO_GIOP_FRAGMENTATION_STRATEGY_H
12 #define TAO_GIOP_FRAGMENTATION_STRATEGY_H
14 #include /**/ "ace/pre.h"
16 #include /**/ "tao/TAO_Export.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #include "tao/orbconf.h"
23 #include "ace/CDR_Base.h"
25 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
30 * @class TAO_GIOP_Fragmenation_Strategy
32 * @brief Abstract base class that defines TAO fragmentation strategy
35 * GIOP message fragmentation is deferred to a fragmentation strategy
37 class TAO_Export TAO_GIOP_Fragmentation_Strategy
41 TAO_GIOP_Fragmentation_Strategy () {}
44 virtual ~TAO_GIOP_Fragmentation_Strategy ();
46 /// Fragment the (potentially partially) encoded GIOP message.
48 * Fragmentation the contents of the CDR output stream @a cdr into
49 * smaller chunks of data of size that fits within the configured
50 * ORB fragmentation threshold, and send each fragment "over the
53 * @note Fragmentation will only occur if the CDR stream length will
54 * surpass the configured fragmentation threshold when
55 * marshaling the pending set of data.
57 * @param cdr Output CDR stream.
58 * @param pending_alignment Size of alignment boundary for next data
59 * to be marshaled (e.g. 4 for a
61 * @param pending_length Size of next data to be marshaled (e.g. 2
62 * for a CORBA::UShort).
64 * @return Zero on success.
66 virtual int fragment (TAO_OutputCDR
& cdr
,
67 ACE_CDR::ULong pending_alignment
,
68 ACE_CDR::ULong pending_length
) = 0;
71 TAO_GIOP_Fragmentation_Strategy (TAO_GIOP_Fragmentation_Strategy
const &) = delete;
72 void operator= (TAO_GIOP_Fragmentation_Strategy
const &) = delete;
73 TAO_GIOP_Fragmentation_Strategy (TAO_GIOP_Fragmentation_Strategy
&&) = delete;
74 void operator= (TAO_GIOP_Fragmentation_Strategy
&&) = delete;
77 TAO_END_VERSIONED_NAMESPACE_DECL
79 #include /**/ "ace/post.h"
81 #endif /* TAO_GIOP_FRAGMENTATION_STRATEGY_H */