⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 request_context_repository.h

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 H
字号:
// -*- C++ -*-

//=============================================================================
/**
 *  @file   Request_Context_Repository.h
 *
 *  Request_Context_Repository.h,v 1.3 2003/10/17 06:36:28 huangming Exp
 *
 *  @author Huang-Ming Huang <hh1@cse.wustl.edu>
 */
//=============================================================================

#ifndef REQUEST_CONTEXT_REPOSITORY_H
#define REQUEST_CONTEXT_REPOSITORY_H

#include "orbsvcs/FtRtecEventChannelAdminC.h"
#include "tao/PortableInterceptorC.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

class TAO_FTEC_Event_Channel_Impl;


/**
 * @class Request_Context_Repository
 *
 * @brief This class is used to transfer the information between thread context
 *        information and the request context in the portable interceptors. It
 *        encapulates the PICurrent to provide a type safe way for the transfer of
 *        FTEC specific information inside and outside protable interceptors.
 */
class Request_Context_Repository
{
public:

  void init(CORBA::ORB_ptr orb);

  /**
   * Used by ORBInitializer to allocate required slots for
   * FTEC.
   */
  void allocate_slots(PortableInterceptor::ORBInitInfo_ptr info
            ACE_ENV_ARG_DECL);


  void generate_object_id(FtRtecEventChannelAdmin::ObjectId& object_id
                          ACE_ENV_ARG_DECL);
  void set_object_id(const FtRtecEventChannelAdmin::ObjectId& object_id
                     ACE_ENV_ARG_DECL);
  FtRtecEventChannelAdmin::ObjectId_var get_object_id(ACE_ENV_SINGLE_ARG_DECL);
  FtRtecEventChannelAdmin::ObjectId_var
    get_object_id(PortableInterceptor::ServerRequestInfo_ptr ri
                  ACE_ENV_ARG_DECL);

  void set_cached_result(PortableInterceptor::ServerRequestInfo_ptr ri,
                         const CORBA::Any& result
                         ACE_ENV_ARG_DECL);

  CORBA::Any_ptr get_cached_result(ACE_ENV_SINGLE_ARG_DECL);
  bool is_executed_request();

  void set_sequence_number(PortableInterceptor::ServerRequestInfo_ptr ri,
                           FTRT::SequenceNumber
                           ACE_ENV_ARG_DECL);

  void set_sequence_number(FTRT::SequenceNumber
                           ACE_ENV_ARG_DECL);
  FTRT::SequenceNumber get_sequence_number(PortableInterceptor::ClientRequestInfo_ptr ri
                           ACE_ENV_ARG_DECL);

  FTRT::SequenceNumber get_sequence_number(ACE_ENV_SINGLE_ARG_DECL);

  void set_ft_request_service_context(
    PortableInterceptor::ServerRequestInfo_ptr ri,
    IOP::ServiceContext_var service_context
    ACE_ENV_ARG_DECL);

  CORBA::Any_var get_ft_request_service_context(
      PortableInterceptor::ClientRequestInfo_ptr ri
      ACE_ENV_ARG_DECL);

  void set_transaction_depth(
    PortableInterceptor::ServerRequestInfo_ptr ri,
    FTRT::TransactionDepth depth
    ACE_ENV_ARG_DECL);

 void set_transaction_depth(
    FTRT::TransactionDepth depth
    ACE_ENV_ARG_DECL);

 FTRT::TransactionDepth get_transaction_depth(
    ACE_ENV_SINGLE_ARG_DECL);

 FTRT::TransactionDepth get_transaction_depth(
    PortableInterceptor::ClientRequestInfo_ptr
    ACE_ENV_ARG_DECL);
};

#endif /// REQUEST_CONTEXT_REPOSITORY_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -