Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / apps / JAWS2 / JAWS / Policy.cpp
blob7c350fb7a7ce33a61f6f00840a6364968835399a
1 #include "JAWS/Policy.h"
2 #include "JAWS/Concurrency.h"
3 #include "JAWS/IO_Handler.h"
4 #include "JAWS/IO_Acceptor.h"
7 JAWS_Dispatch_Policy::JAWS_Dispatch_Policy ()
11 JAWS_Dispatch_Policy::~JAWS_Dispatch_Policy ()
15 JAWS_Default_Dispatch_Policy::JAWS_Default_Dispatch_Policy ()
16 : ratio_ (1),
17 concurrency_ (JAWS_Thread_Pool_Singleton::instance ()),
18 ioh_factory_ (JAWS_Synch_IO_Handler_Factory_Singleton::instance ()),
19 acceptor_ (JAWS_IO_Synch_Acceptor_Singleton::instance ()),
20 io_ (JAWS_Synch_IO_Singleton::instance ())
24 JAWS_Default_Dispatch_Policy::~JAWS_Default_Dispatch_Policy ()
28 int
29 JAWS_Default_Dispatch_Policy::ratio ()
31 return this->ratio_;
34 JAWS_IO *
35 JAWS_Default_Dispatch_Policy::io ()
37 return this->io_;
40 JAWS_IO_Handler_Factory *
41 JAWS_Default_Dispatch_Policy::ioh_factory ()
43 return this->ioh_factory_;
46 JAWS_IO_Acceptor *
47 JAWS_Default_Dispatch_Policy::acceptor ()
49 return this->acceptor_;
52 JAWS_Concurrency_Base *
53 JAWS_Default_Dispatch_Policy::concurrency ()
55 return this->concurrency_;
58 void
59 JAWS_Default_Dispatch_Policy::ratio (int r)
61 this->ratio_ = r;
64 void
65 JAWS_Default_Dispatch_Policy::io (JAWS_IO *io)
67 this->io_ = io;
70 void
71 JAWS_Default_Dispatch_Policy::ioh_factory (JAWS_IO_Handler_Factory *iohf)
73 this->ioh_factory_ = iohf;
76 void
77 JAWS_Default_Dispatch_Policy::acceptor (JAWS_IO_Acceptor *acceptor)
79 this->acceptor_ = acceptor;
82 void
83 JAWS_Default_Dispatch_Policy::concurrency (JAWS_Concurrency_Base *concp)
85 this->concurrency_ = concp;