Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / apps / JAWS3 / jaws3 / Concurrency.h
blob3b303b6a3129519a9f26ad965d571a8f60492917
1 // -*- C++ -*-
2 #ifndef JAWS_CONCURRENCY_H
3 #define JAWS_CONCURRENCY_H
5 #include "ace/Task.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
17 public:
18 virtual ~JAWS_Concurrency_Impl () {};
20 virtual int putq (JAWS_Protocol_Handler *ph) = 0;
22 virtual int getq (JAWS_Protocol_Handler *&ph) = 0;
24 int svc ();
28 // Include the templates here.
29 #include "jaws3/Concurrency_T.h"
32 template<>
33 class JAWS_Export JAWS_Concurrency_Bridge<JAWS_Concurrency_Impl>
35 public:
36 JAWS_Concurrency_Bridge (JAWS_Concurrency_Impl *impl = 0);
38 int putq (JAWS_Protocol_Handler *ph);
39 int getq (JAWS_Protocol_Handler *&ph);
41 void shutdown ();
43 protected:
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>
56 public:
57 static JAWS_Concurrency * instance ()
59 return ACE_Singleton<JAWS_Concurrency, ACE_SYNCH_MUTEX>::instance ();
64 #endif /* JAWS_CONCURRENCY_H */