2 // The interface between one or more consumers and an Event Server
5 #ifndef _CONSUMER_ROUTER_H
6 #define _CONSUMER_ROUTER_H
8 #include "ace/Thread_Manager.h"
10 #if !defined (ACE_LACKS_PRAGMA_ONCE)
12 #endif /* ACE_LACKS_PRAGMA_ONCE */
14 #include "ace/UPIPE_Acceptor.h"
15 #include "ace/UPIPE_Addr.h"
16 #include "ace/Svc_Handler.h"
17 #include "Peer_Router.h"
19 #if defined (ACE_HAS_THREADS)
21 class Consumer_Handler
; // Forward declaration....
23 typedef ACE_HANDLE CONSUMER_KEY
;
25 typedef Peer_Router
<Consumer_Handler
, CONSUMER_KEY
> CONSUMER_ROUTER
;
27 class Consumer_Handler
28 : public Peer_Handler
<CONSUMER_ROUTER
, CONSUMER_KEY
>
31 Consumer_Handler (ACE_Thread_Manager
*tm
= 0);
32 virtual int open (void *);
35 class Consumer_Router
: public CONSUMER_ROUTER
38 Consumer_Router (ACE_Thread_Manager
*thr_manager
);
42 virtual int open (void *a
= 0);
43 virtual int close (u_long flags
= 0);
44 virtual int put (ACE_Message_Block
*msg
, ACE_Time_Value
* = 0);
47 // Dynamic linking hooks.
48 virtual int info (ACE_TCHAR
**info_string
, size_t length
) const;
50 #endif /* ACE_HAS_THREADS */
51 #endif /* _CONSUMER_ROUTER_H */