Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / examples / ASX / UPIPE_Event_Server / Consumer_Router.h
blobd8767e07d255bb9140a48f10322329c7c03e540c
1 /* -*- C++ -*- */
2 // The interface between one or more consumers and an Event Server
3 // ACE_Stream.
5 #ifndef _CONSUMER_ROUTER_H
6 #define _CONSUMER_ROUTER_H
8 #include "ace/Thread_Manager.h"
10 #if !defined (ACE_LACKS_PRAGMA_ONCE)
11 # 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>
30 public:
31 Consumer_Handler (ACE_Thread_Manager *tm = 0);
32 virtual int open (void *);
35 class Consumer_Router : public CONSUMER_ROUTER
37 public:
38 Consumer_Router (ACE_Thread_Manager *thr_manager);
40 protected:
41 // ACE_Task hooks..
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);
45 virtual int svc ();
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 */