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 ()
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 ()
29 JAWS_Default_Dispatch_Policy::ratio ()
35 JAWS_Default_Dispatch_Policy::io ()
40 JAWS_IO_Handler_Factory
*
41 JAWS_Default_Dispatch_Policy::ioh_factory ()
43 return this->ioh_factory_
;
47 JAWS_Default_Dispatch_Policy::acceptor ()
49 return this->acceptor_
;
52 JAWS_Concurrency_Base
*
53 JAWS_Default_Dispatch_Policy::concurrency ()
55 return this->concurrency_
;
59 JAWS_Default_Dispatch_Policy::ratio (int r
)
65 JAWS_Default_Dispatch_Policy::io (JAWS_IO
*io
)
71 JAWS_Default_Dispatch_Policy::ioh_factory (JAWS_IO_Handler_Factory
*iohf
)
73 this->ioh_factory_
= iohf
;
77 JAWS_Default_Dispatch_Policy::acceptor (JAWS_IO_Acceptor
*acceptor
)
79 this->acceptor_
= acceptor
;
83 JAWS_Default_Dispatch_Policy::concurrency (JAWS_Concurrency_Base
*concp
)
85 this->concurrency_
= concp
;