summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/FtRtEvent/EventChannel/UpdateableHandler.h
blob: 14bb614b20d42eb32a17e2ded8f457357440e5d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// -*- C++ -*-

//=============================================================================
/**
 *  @file   UpdateableHandler.h
 *
 *  $Id$
 *
 *  @author Huang-Ming Huang <hh1@cse.wustl.edu>
 */
//=============================================================================

#ifndef UPDATEABLEHANDLER_H
#define UPDATEABLEHANDLER_H
#include "orbsvcs/FTRTS.h"

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

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

class AMI_Primary_Replication_Strategy;
class Update_Manager;

class UpdateableHandler : public  POA_FTRT::AMI_UpdateableHandler
{
public:
    UpdateableHandler(AMI_Primary_Replication_Strategy* strategy);
    ~UpdateableHandler();

    FTRT::AMI_UpdateableHandler_ptr activate(
      Update_Manager* mgr, int id,
      PortableServer::ObjectId& oid);
    typedef void (Update_Manager::*Handler)(int);

    void dispatch(Handler handler) ;

    virtual void set_update (
      )
      ACE_THROW_SPEC ((
        CORBA::SystemException
        ));
    virtual void set_update_excep (
        ::Messaging::ExceptionHolder * excep_holder
      )
      ACE_THROW_SPEC ((
        CORBA::SystemException
      ));

private:
  AMI_Primary_Replication_Strategy* strategy_;
};

TAO_END_VERSIONED_NAMESPACE_DECL

#endif