2 #ifndef JAWS_CONCURRENCY_H
3 #define JAWS_CONCURRENCY_H
6 #include "ace/Singleton.h"
7 #include "ace/Synch_Traits.h"
9 #include "jaws3/Export.h"
10 #include "jaws3/Protocol_Handler.h"
13 typedef ACE_Task
<ACE_SYNCH
> JAWS_CONCURRENCY_TASK
;
15 class JAWS_Export JAWS_Concurrency_Impl
: public JAWS_CONCURRENCY_TASK
18 virtual ~JAWS_Concurrency_Impl () {};
20 virtual int putq (JAWS_Protocol_Handler
*ph
) = 0;
22 virtual int getq (JAWS_Protocol_Handler
*&ph
) = 0;
28 // Include the templates here.
29 #include "jaws3/Concurrency_T.h"
33 class JAWS_Export JAWS_Concurrency_Bridge
<JAWS_Concurrency_Impl
>
36 JAWS_Concurrency_Bridge (JAWS_Concurrency_Impl
*impl
= 0);
38 int putq (JAWS_Protocol_Handler
*ph
);
39 int getq (JAWS_Protocol_Handler
*&ph
);
44 JAWS_Concurrency_Impl
*impl_
;
48 #ifndef JAWS_CONCURRENCY_CONCRETE_IMPL
49 #define JAWS_CONCURRENCY_CONCRETE_IMPL JAWS_Concurrency_Impl
50 #endif /* JAWS_CONCURRENCY_CONCRETE_IMPL */
53 class JAWS_Export JAWS_Concurrency
54 : public JAWS_Concurrency_Bridge
<JAWS_CONCURRENCY_CONCRETE_IMPL
>
57 static JAWS_Concurrency
* instance ()
59 return ACE_Singleton
<JAWS_Concurrency
, ACE_SYNCH_MUTEX
>::instance ();
64 #endif /* JAWS_CONCURRENCY_H */