Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / ACE / examples / ASX / UPIPE_Event_Server / Supplier_Router.h
blobf14ee7098b33169e4acaf00356e17a592e9b9521
1 /* -*- C++ -*- */
2 // The interface between a supplier and an Event Service ACE_Stream.
4 #ifndef _SUPPLIER_ROUTER_H
5 #define _SUPPLIER_ROUTER_H
7 #include "ace/UPIPE_Addr.h"
9 #if !defined (ACE_LACKS_PRAGMA_ONCE)
10 # pragma once
11 #endif /* ACE_LACKS_PRAGMA_ONCE */
13 #include "ace/UPIPE_Acceptor.h"
14 #include "ace/Map_Manager.h"
15 #include "ace/Svc_Handler.h"
16 #include "Peer_Router.h"
18 #if defined (ACE_HAS_THREADS)
20 // Forward declaration.
21 class Supplier_Handler;
23 // Type of search key for SUPPLIER_MAP.
24 typedef ACE_HANDLE SUPPLIER_KEY;
26 // Instantiated type for routing messages to suppliers.
28 typedef Peer_Router<Supplier_Handler, SUPPLIER_KEY> SUPPLIER_ROUTER;
30 class Supplier_Handler
31 : public Peer_Handler<SUPPLIER_ROUTER, SUPPLIER_KEY>
33 public:
34 Supplier_Handler (ACE_Thread_Manager *tm = 0);
35 virtual int open (void *);
38 class Supplier_Router : public SUPPLIER_ROUTER
40 public:
41 Supplier_Router (ACE_Thread_Manager *);
43 protected:
44 // ACE_Task hooks..
45 virtual int open (void *a = 0);
46 virtual int close (u_long flags = 0);
47 virtual int put (ACE_Message_Block *msg, ACE_Time_Value * = 0);
48 virtual int svc ();
50 // Dynamic linking hooks inherited from Peer_Router.
51 virtual int info (ACE_TCHAR **info_string, size_t length) const;
54 #endif /* ACE_HAS_THREADS */
55 #endif /* _SUPPLIER_ROUTER_H */