Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / apps / JAWS3 / jaws3 / Protocol_Handler.h
blobe4892744fcd7ef56fc5d811d234a550b4f7bfa13
1 #ifndef JAWS_PROTOCOL_HANDLER_H
2 #define JAWS_PROTOCOL_HANDLER_H
4 #include "ace/Message_Block.h"
6 #include "jaws3/Export.h"
7 #include "jaws3/Event_Completer.h"
10 class JAWS_Export JAWS_Protocol_State
12 friend class JAWS_Protocol_Handler;
14 public:
15 virtual ~JAWS_Protocol_State ();
17 protected:
18 virtual int service (JAWS_Event_Completer *, void *data) = 0;
20 virtual JAWS_Protocol_State * transition ( const JAWS_Event_Result &
21 , void *data
22 , void *act
23 ) = 0;
26 class JAWS_Export JAWS_Protocol_Handler
27 : public JAWS_Event_Completer
28 // = TITLE
29 // Abstraction that interacts with concurrency dispatching.
31 friend class JAWS_TPOOL_Concurrency;
32 friend class JAWS_TPR_Concurrency;
33 friend class JAWS_THYBRID_Concurrency;
35 public:
36 JAWS_Protocol_Handler (JAWS_Protocol_State *state = 0, void *data = 0);
38 virtual int service ();
40 virtual void dismiss ()
42 delete this;
45 protected:
46 virtual ~JAWS_Protocol_Handler ();
47 // Try to guarantee this class will be created dynamically.
49 protected:
50 void event_complete (const JAWS_Event_Result &result, void *act);
51 // The event completion routine that triggers the transition
52 // to the next Protocol State.
54 void default_complete (const JAWS_Event_Result &result, void *act)
56 this->event_complete (result, act);
59 private:
60 JAWS_Protocol_State *state_;
62 void *data_;
64 ACE_Data_Block db_;
65 ACE_Message_Block mb_;
69 #endif /* JAWS_PROTOCOL_HANDLER_H */