GIOP_Fragmentation_Strategy.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    GIOP_Fragmentation_Strategy.h
00006  *
00007  *  GIOP_Fragmentation_Strategy.h,v 1.2 2006/04/20 12:37:17 jwillemsen Exp
00008  *
00009  *  @author  Ossama Othman <ossama@dre.vanderbilt.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_GIOP_FRAGMENTATION_STRATEGY_H
00014 #define TAO_GIOP_FRAGMENTATION_STRATEGY_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "tao/TAO_Export.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "tao/orbconf.h"
00025 #include "ace/CDR_Base.h"
00026 
00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00028 
00029 class TAO_OutputCDR;
00030 
00031 /**
00032  * @class TAO_GIOP_Fragmenation_Strategy
00033  *
00034  * @brief Abstract base class that defines TAO fragmentation strategy
00035  *        interface.
00036  *
00037  * GIOP message fragmentation is deferred to a fragmentation strategy
00038  */
00039 class TAO_Export TAO_GIOP_Fragmentation_Strategy
00040 {
00041 public:
00042 
00043   /// Constructor
00044   TAO_GIOP_Fragmentation_Strategy (void) {}
00045 
00046   /// Destructor.
00047   virtual ~TAO_GIOP_Fragmentation_Strategy (void);
00048 
00049   /// Fragment the (potentially partially) encoded GIOP message.
00050   /**
00051    * Fragmentation the contents of the CDR output stream @a cdr into
00052    * smaller chunks of data of size that fits within the configured
00053    * ORB fragmentation threshold, and send each fragment "over the
00054    * wire."
00055    *
00056    * @note Fragmentation will only occur if the CDR stream length will
00057    *       surpass the configured fragmentation threshold when
00058    *       marshaling the pending set of data.
00059    *
00060    * @param cdr               Output CDR stream.
00061    * @param pending_alignment Size of alignment boundary for next data
00062    *                          to be marshaled (e.g. 4 for a
00063    *                          CORBA::ULong).
00064    * @param pending_length    Size of next data to be marshaled (e.g. 2
00065    *                          for a CORBA::UShort).
00066    *
00067    * @return Zero on success.
00068    */
00069   virtual int fragment (TAO_OutputCDR & cdr,
00070                         ACE_CDR::ULong pending_alignment,
00071                         ACE_CDR::ULong pending_length) = 0;
00072 
00073 private:
00074 
00075   // Disallow copying and assignment.
00076   TAO_GIOP_Fragmentation_Strategy (TAO_GIOP_Fragmentation_Strategy const &);
00077   void operator= (TAO_GIOP_Fragmentation_Strategy const &);
00078 
00079 };
00080 
00081 TAO_END_VERSIONED_NAMESPACE_DECL
00082 
00083 #include /**/ "ace/post.h"
00084 
00085 #endif  /* TAO_GIOP_FRAGMENTATION_STRATEGY_H */

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