Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / orbsvcs / FT_ReplicationManager / FT_FaultAnalyzer.h
blob882af564e021b8736b13423bcb5c602a3175d5fa
1 /* -*- C++ -*- */
2 //=============================================================================
3 /**
4 * @file FT_FaultAnalyzer.h
6 * This file is part of TAO's implementation of Fault Tolerant CORBA.
8 * @author Steve Totten <totten_s@ociweb.com>
9 */
10 //=============================================================================
13 #ifndef FT_FAULT_ANALYZER_H_
14 #define FT_FAULT_ANALYZER_H_
16 #include /**/ "ace/pre.h"
17 #include <ace/ACE.h>
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "FT_ReplicationManagerLib_export.h"
24 #include "orbsvcs/CosNotifyCommC.h"
26 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
28 namespace TAO
30 /**
31 * Abstract base class for application-defined fault analyzers.
34 class TAO_ReplicationManagerLib_Export FT_FaultAnalyzer
36 public:
37 /**
38 * Default constructor.
40 FT_FaultAnalyzer ();
42 /**
43 * Destructor.
45 virtual ~FT_FaultAnalyzer ();
47 public:
48 /**
49 * Validate event type to make sure it is one we can handle.
50 * @param event The structured fault event, as from the Fault Notifier.
51 * @return 0 if it is a valid event type, -1 otherwise.
53 virtual int validate_event_type (
54 const CosNotification::StructuredEvent & event) = 0;
56 /**
57 * Analyze a fault event.
58 * @param event The structured fault event, as from the Fault Notifier.
59 * @return 0 on success, -1 on failure.
61 virtual int analyze_fault_event (
62 const CosNotification::StructuredEvent & event) = 0;
64 ////////////////////
65 // Forbidden methods
66 private:
67 /// Copy constructor.
68 FT_FaultAnalyzer (const FT_FaultAnalyzer & rhs);
69 /// Assignment operator.
70 FT_FaultAnalyzer & operator = (const FT_FaultAnalyzer & rhs);
72 ///////////////
73 // Data Members
74 private:
76 } // namespace TAO
78 TAO_END_VERSIONED_NAMESPACE_DECL
80 #include /**/ "ace/post.h"
82 #endif /* FT_FAULT_ANALYZER_H_ */