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
;
15 virtual ~JAWS_Protocol_State ();
18 virtual int service (JAWS_Event_Completer
*, void *data
) = 0;
20 virtual JAWS_Protocol_State
* transition ( const JAWS_Event_Result
&
26 class JAWS_Export JAWS_Protocol_Handler
27 : public JAWS_Event_Completer
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
;
36 JAWS_Protocol_Handler (JAWS_Protocol_State
*state
= 0, void *data
= 0);
38 virtual int service ();
40 virtual void dismiss ()
46 virtual ~JAWS_Protocol_Handler ();
47 // Try to guarantee this class will be created dynamically.
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
);
60 JAWS_Protocol_State
*state_
;
65 ACE_Message_Block mb_
;
69 #endif /* JAWS_PROTOCOL_HANDLER_H */