diff options
author | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-09 22:22:25 +0000 |
---|---|---|
committer | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-04-09 22:22:25 +0000 |
commit | f217fdd1470a5d987afbc82347c034bc0445d853 (patch) | |
tree | c66128374e336317c7fa3d446128d8f44306e97f | |
parent | 6f424ae3412735aaaa983686afd6ae8a42b6af95 (diff) | |
download | ATCD-f217fdd1470a5d987afbc82347c034bc0445d853.tar.gz |
Continue to flush out functionality of the server.
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/Concurrency.cpp | 1 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/Data_Block.cpp | 23 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/Data_Block.h | 18 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/IO.cpp | 75 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/IO.h | 51 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/IO_Handler.cpp | 25 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/IO_Handler.h | 29 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/Makefile | 211 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.cpp | 7 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.h | 2 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Tasks.cpp | 60 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Tasks.h | 25 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/Policy.cpp | 38 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/Policy.h | 21 | ||||
-rw-r--r-- | apps/JAWS/server/PROTOTYPE/JAWS/Server.cpp | 7 |
15 files changed, 455 insertions, 138 deletions
diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Concurrency.cpp b/apps/JAWS/server/PROTOTYPE/JAWS/Concurrency.cpp index 1b46d54929e..107ce4a68dc 100644 --- a/apps/JAWS/server/PROTOTYPE/JAWS/Concurrency.cpp +++ b/apps/JAWS/server/PROTOTYPE/JAWS/Concurrency.cpp @@ -39,7 +39,6 @@ JAWS_Concurrency_Base::svc (void) do { JAWS_Data_Block *db; - JAWS_IO_Handler *ioh; JAWS_Pipeline_Task *task; db = ACE_dynamic_cast (JAWS_Data_Block *, mb->data_block ()); diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Data_Block.cpp b/apps/JAWS/server/PROTOTYPE/JAWS/Data_Block.cpp index 2ab673fc2f0..4225659b5c0 100644 --- a/apps/JAWS/server/PROTOTYPE/JAWS/Data_Block.cpp +++ b/apps/JAWS/server/PROTOTYPE/JAWS/Data_Block.cpp @@ -10,9 +10,9 @@ JAWS_Data_Block::task (void) } JAWS_IO_Handler * -JAWS_Data_Block::handler (void) +JAWS_Data_Block::io_handler (void) { - return this->handler_; + return this->io_handler_; } JAWS_Dispatch_Policy * @@ -28,9 +28,9 @@ JAWS_Data_Block::task (JAWS_Pipeline_Handler *taskp) } void -JAWS_Data_Block::handler (JAWS_IO_Handler *handlerp) +JAWS_Data_Block::io_handler (JAWS_IO_Handler *handlerp) { - this->handler_ = handlerp; + this->io_handler_ = handlerp; } void @@ -39,21 +39,6 @@ JAWS_Data_Block::policy (JAWS_Dispatch_Policy *policyp) this->policy_ = policyp; } -int -JAWS_Pipeline_Accept_Task::handle_put (JAWS_Data_Block *data, - ACE_Time_Value *) -{ - /* JAWS_Data_Block should contain an INET_Addr and an IO */ - // JAWS_IO_Handler *handler = data->handler (); - JAWS_Dispatch_Policy *policy = data->policy (); - - // data->policy ()->update (handler); - - JAWS_IO *io = policy->io (); - // io->accept (data->addr ()); - return 0; -} - #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class JAWS_Pipeline_Abstract_Handler<JAWS_Data_Block>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Data_Block.h b/apps/JAWS/server/PROTOTYPE/JAWS/Data_Block.h index d9ba54761fa..62dcdf0a66b 100644 --- a/apps/JAWS/server/PROTOTYPE/JAWS/Data_Block.h +++ b/apps/JAWS/server/PROTOTYPE/JAWS/Data_Block.h @@ -5,7 +5,6 @@ #define JAWS_DATA_BLOCK_H #include "ace/Singleton.h" - #include "JAWS/Pipeline.h" class JAWS_IO_Handler; @@ -21,28 +20,17 @@ class JAWS_Data_Block : public ACE_Data_Block { public: JAWS_Pipeline_Handler *task (void); - JAWS_IO_Handler *handler (void); + JAWS_IO_Handler *io_handler (void); JAWS_Dispatch_Policy *policy (void); void task (JAWS_Pipeline_Handler *taskp); - void handler (JAWS_IO_Handler * handlerp); + void io_handler (JAWS_IO_Handler * handlerp); void policy (JAWS_Dispatch_Policy * policyp); private: - JAWS_IO_Handler *handler_; + JAWS_IO_Handler *io_handler_; JAWS_Dispatch_Policy *policy_; JAWS_Pipeline_Handler *task_; }; -class JAWS_Pipeline_Accept_Task : public JAWS_Pipeline_Handler -{ -public: - virtual int handle_put (JAWS_Data_Block *data, ACE_Time_Value *tv); - -private: -}; - -typedef ACE_Singleton<JAWS_Pipeline_Accept_Task, ACE_SYNCH_MUTEX> - JAWS_Pipeline_Accept_Task_Singleton; - #endif /* !defined (JAWS_DATA_BLOCK_H) */ diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/IO.cpp b/apps/JAWS/server/PROTOTYPE/JAWS/IO.cpp index 81027e0b8b6..b499e459448 100644 --- a/apps/JAWS/server/PROTOTYPE/JAWS/IO.cpp +++ b/apps/JAWS/server/PROTOTYPE/JAWS/IO.cpp @@ -22,6 +22,7 @@ JAWS_IO::~JAWS_IO (void) { } +#if 0 ACE_HANDLE JAWS_IO::handle (void) { @@ -40,8 +41,16 @@ JAWS_IO::handler (JAWS_IO_Handler *handler) this->handler_ = handler; } +void +JAWS_IO::acceptor (JAWS_IO_Acceptor *acceptor) +{ + this->acceptor_ = acceptor; +} +#endif /* 0 */ + JAWS_Synch_IO::JAWS_Synch_IO (void) { + this->acceptor_ = JAWS_IO_Synch_Acceptor_Singleton::instance (); } JAWS_Synch_IO::~JAWS_Synch_IO (void) @@ -50,36 +59,37 @@ JAWS_Synch_IO::~JAWS_Synch_IO (void) } void -JAWS_Synch_IO::accept (ACE_INET_Addr *addr) +JAWS_Synch_IO::accept (JAWS_IO_Handler *ioh) { - // HACK - ACE_UNUSED_ARG (addr); ACE_SOCK_Stream new_stream; if (this->acceptor_->accept (new_stream) == -1) - this->handler_->accept_error (); + ioh->accept_error (); else - this->handler_->accept_complete (); + ioh->accept_complete (new_stream.get_handle ()); } void -JAWS_Synch_IO::read (ACE_Message_Block &mb, +JAWS_Synch_IO::read (JAWS_IO_Handler *ioh, + ACE_Message_Block &mb, int size) { ACE_SOCK_Stream stream; - stream.set_handle (this->handle_); + + stream.set_handle (ioh->handle ()); int result = stream.recv (mb.wr_ptr (), size); if (result <= 0) - this->handler_->read_error (); + ioh->read_error (); else { mb.wr_ptr (result); - this->handler_->read_complete (mb); + ioh->read_complete (mb); } } void -JAWS_Synch_IO::receive_file (const char *filename, +JAWS_Synch_IO::receive_file (JAWS_IO_Handler *ioh, + const char *filename, void *initial_data, int initial_data_length, int entire_length) @@ -91,27 +101,29 @@ JAWS_Synch_IO::receive_file (const char *filename, if (result == ACE_Filecache_Handle::SUCCESS) { ACE_SOCK_Stream stream; - stream.set_handle (this->handle_); + stream.set_handle (ioh->handle ()); int bytes_to_memcpy = ACE_MIN (entire_length, initial_data_length); ACE_OS::memcpy (handle.address (), initial_data, bytes_to_memcpy); int bytes_to_read = entire_length - bytes_to_memcpy; - int bytes = stream.recv_n ((char *) handle.address () + initial_data_length, + int bytes = stream.recv_n ((char *) + handle.address () + initial_data_length, bytes_to_read); if (bytes == bytes_to_read) - this->handler_->receive_file_complete (); + ioh->receive_file_complete (); else result = -1; } if (result != ACE_Filecache_Handle::SUCCESS) - this->handler_->receive_file_error (result); + ioh->receive_file_error (result); } void -JAWS_Synch_IO::transmit_file (const char *filename, +JAWS_Synch_IO::transmit_file (JAWS_IO_Handler *ioh, + const char *filename, const char *header, int header_size, const char *trailer, @@ -125,7 +137,7 @@ JAWS_Synch_IO::transmit_file (const char *filename, { #if defined (ACE_JAWS_BASELINE) ACE_SOCK_Stream stream; - stream.set_handle (this->handle_); + stream.set_handle (ioh->handle ()); if ((stream.send_n (header, header_size) == header_size) && ((u_long) stream.send_n (handle.address (), handle.size ()) @@ -157,39 +169,42 @@ JAWS_Synch_IO::transmit_file (const char *filename, iov[iovcnt].iov_len = trailer_size; iovcnt++; } - if (ACE_OS::writev (this->handle_, iov, iovcnt) < 0) + if (ACE_OS::writev (ioh->handle (), iov, iovcnt) < 0) result = -1; else - this->handler_->transmit_file_complete (); + ioh->transmit_file_complete (); #endif /* ACE_JAWS_BASELINE */ } if (result != ACE_Filecache_Handle::SUCCESS) - this->handler_->transmit_file_error (result); + ioh->transmit_file_error (result); } void -JAWS_Synch_IO::send_confirmation_message (const char *buffer, +JAWS_Synch_IO::send_confirmation_message (JAWS_IO_Handler *ioh, + const char *buffer, int length) { - this->send_message (buffer, length); - this->handler_->confirmation_message_complete (); + this->send_message (ioh, buffer, length); + ioh->confirmation_message_complete (); } void -JAWS_Synch_IO::send_error_message (const char *buffer, +JAWS_Synch_IO::send_error_message (JAWS_IO_Handler *ioh, + const char *buffer, int length) { - this->send_message (buffer, length); - this->handler_->error_message_complete (); + this->send_message (ioh, buffer, length); + ioh->error_message_complete (); } void -JAWS_Synch_IO::send_message (const char *buffer, +JAWS_Synch_IO::send_message (JAWS_IO_Handler *ioh, + const char *buffer, int length) { ACE_SOCK_Stream stream; - stream.set_handle (this->handle_); + stream.set_handle (ioh->handle ()); stream.send_n (buffer, length); } @@ -427,3 +442,9 @@ JAWS_Asynch_IO::handle_write_stream (const ACE_Asynch_Write_Stream::Result &resu // #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) // #pragma instantiate ACE_Singleton<JAWS_VFS, ACE_SYNCH_MUTEX> // #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_Singleton<JAWS_Synch_IO, ACE_SYNCH_MUTEX>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_Singleton<JAWS_Synch_IO, ACE_SYNCH_MUTEX> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/IO.h b/apps/JAWS/server/PROTOTYPE/JAWS/IO.h index fd440944109..e25d29a07ee 100644 --- a/apps/JAWS/server/PROTOTYPE/JAWS/IO.h +++ b/apps/JAWS/server/PROTOTYPE/JAWS/IO.h @@ -25,6 +25,7 @@ class JAWS_IO_Acceptor; #include "ace/ACE.h" #include "ace/Asynch_IO.h" #include "ace/SOCK_Stream.h" +#include "ace/Singleton.h" class JAWS_IO // = TITLE @@ -41,36 +42,45 @@ class JAWS_IO public: JAWS_IO (void); virtual ~JAWS_IO (void); - void handler (JAWS_IO_Handler *handler); - // void acceptor (JAWS_IO_Acceptor *acceptor); - void handle (ACE_HANDLE h); - ACE_HANDLE handle (void); + + // void acceptor (JAWS_IO_Acceptor *acceptor); + // void handler (JAWS_IO_Handler *handler); + // void handle (ACE_HANDLE h); + // ACE_HANDLE handle (void); // James, please add documentation here. - virtual void accept (ACE_INET_Addr *addr) = 0; + virtual void accept (JAWS_IO_Handler *ioh) = 0; // accept a passive connection - virtual void read (ACE_Message_Block& mb, int size) = 0; + virtual void read (JAWS_IO_Handler *ioh, + ACE_Message_Block& mb, + int size) = 0; // read from the handle size bytes into the message block. - virtual void transmit_file (const char *filename, + virtual void transmit_file (JAWS_IO_Handler *ioh, + const char *filename, const char *header, int header_size, const char *trailer, int trailer_size) = 0; // send header, filename, trailer to the handle. - virtual void receive_file (const char *filename, + virtual void receive_file (JAWS_IO_Handler *ioh, + const char *filename, void *initial_data, int initial_data_length, int entire_length) = 0; // read data from the handle and store in filename. - virtual void send_confirmation_message (const char *buffer, int length) = 0; + virtual void send_confirmation_message (JAWS_IO_Handler *ioh, + const char *buffer, + int length) = 0; // send a confirmation message to the handle. - virtual void send_error_message (const char *buffer, int length) = 0; + virtual void send_error_message (JAWS_IO_Handler *ioh, + const char *buffer, + int length) = 0; // send an error message to the handle. protected: @@ -92,32 +102,39 @@ public: ~JAWS_Synch_IO (void); - virtual void accept (ACE_INET_Addr *addr); + virtual void accept (JAWS_IO_Handler *ioh); - void read (ACE_Message_Block& mb, int size); + void read (JAWS_IO_Handler *ioh, ACE_Message_Block& mb, int size); - void transmit_file (const char *filename, + void transmit_file (JAWS_IO_Handler *ioh, + const char *filename, const char *header, int header_size, const char *trailer, int trailer_size); - void receive_file (const char *filename, + void receive_file (JAWS_IO_Handler *ioh, + const char *filename, void *initial_data, int initial_data_length, int entire_length); - void send_confirmation_message (const char *buffer, + void send_confirmation_message (JAWS_IO_Handler *ioh, + const char *buffer, int length); - void send_error_message (const char *buffer, + void send_error_message (JAWS_IO_Handler *ioh, + const char *buffer, int length); protected: - virtual void send_message (const char *buffer, + virtual void send_message (JAWS_IO_Handler *ioh, + const char *buffer, int length); }; +typedef ACE_Singleton<JAWS_Synch_IO, ACE_SYNCH_MUTEX> + JAWS_Synch_IO_Singleton; // This only works on Win32 #if defined (ACE_WIN32) diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/IO_Handler.cpp b/apps/JAWS/server/PROTOTYPE/JAWS/IO_Handler.cpp index ac7c9a5e1f5..8dfca3ca02b 100644 --- a/apps/JAWS/server/PROTOTYPE/JAWS/IO_Handler.cpp +++ b/apps/JAWS/server/PROTOTYPE/JAWS/IO_Handler.cpp @@ -9,7 +9,9 @@ JAWS_IO_Handler_Factory::~JAWS_IO_Handler_Factory (void) } JAWS_Synch_IO_Handler::JAWS_Synch_IO_Handler (JAWS_IO_Handler_Factory *factory) - : mb_ (0), + : status_ (0), + mb_ (0), + handle_ (ACE_INVALID_HANDLE), task_ (0), factory_ (factory) { @@ -24,9 +26,10 @@ JAWS_Synch_IO_Handler::~JAWS_Synch_IO_Handler (void) } void -JAWS_Synch_IO_Handler::accept_complete (void) +JAWS_Synch_IO_Handler::accept_complete (ACE_HANDLE handle) { // callback into pipeline task, notify that the accept has completed + this->handle_ = handle; } void @@ -97,12 +100,24 @@ JAWS_Synch_IO_Handler::factory (void) return this->factory_; } +ACE_HANDLE +JAWS_Synch_IO_Handler::handle (void) +{ + return this->handle_; +} + void JAWS_Synch_IO_Handler::done (void) { this->factory ()->destroy_io_handler (this); } +int +JAWS_Synch_IO_Handler::status (void) +{ + return this->status_; +} + JAWS_IO_Handler * JAWS_Synch_IO_Handler_Factory::create_io_handler (void) { @@ -123,3 +138,9 @@ JAWS_Synch_IO_Handler_Factory::destroy_io_handler (JAWS_IO_Handler *handler) { delete handler; } + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class ACE_Singleton<JAWS_Synch_IO_Handler_Factory, ACE_SYNCH_MUTEX>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate ACE_Singleton<JAWS_Synch_IO_Handler_Factory, ACE_SYNCH_MUTEX> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/IO_Handler.h b/apps/JAWS/server/PROTOTYPE/JAWS/IO_Handler.h index 3a3dc3a1e35..6b22e88609a 100644 --- a/apps/JAWS/server/PROTOTYPE/JAWS/IO_Handler.h +++ b/apps/JAWS/server/PROTOTYPE/JAWS/IO_Handler.h @@ -19,6 +19,7 @@ #define JAWS_IO_HANDLER_H #include "ace/Asynch_IO.h" +#include "ace/Singleton.h" // #include "JAWS/IO.h" class JAWS_IO; @@ -45,7 +46,7 @@ class JAWS_IO_Handler // = DESCRIPTION { public: - virtual void accept_complete (void) = 0; + virtual void accept_complete (ACE_HANDLE handle) = 0; // This method is called by the IO class when new passive connection has // been established. @@ -101,6 +102,18 @@ public: virtual JAWS_IO_Handler_Factory *factory (void) = 0; // Returns the factory for this IO handler + + virtual ACE_HANDLE handle (void) = 0; + // Returns the socket handle for this handler + + virtual int status (void) = 0; + + enum { IDLE = 0, + ACCEPT_OK, ACCEPT_ERROR, + READ_OK, READ_ERROR, + WRITE_OK, WRITE_ERROR, + TRANSMIT_OK, TRANSMIT_ERROR, + RECEIVE_OK, RECEIVE_ERROR }; }; class JAWS_IO_Handler_Factory @@ -133,7 +146,7 @@ public: protected: // Inherited from JAWS_IO_Handler - virtual void accept_complete (void); + virtual void accept_complete (ACE_HANDLE handle); virtual void accept_error (void); virtual void read_complete (ACE_Message_Block &data); virtual void read_error (void); @@ -144,14 +157,23 @@ protected: virtual void write_error (void); virtual void confirmation_message_complete (void); virtual void error_message_complete (void); + virtual JAWS_IO_Handler_Factory *factory (void); + virtual ACE_HANDLE handle (void); virtual void done (void); + virtual int status (void); private: + int status_; + // The state of the handler. + ACE_Message_Block *mb_; // This maintains the state of the request. + ACE_HANDLE handle_; + // The socket handle returned from accept. + JAWS_Pipeline_Handler *task_; // This is a reference to the next stage of the pipeline when the IO // request completes. @@ -171,6 +193,9 @@ public: // the protocol }; +typedef ACE_Singleton<JAWS_Synch_IO_Handler_Factory, ACE_SYNCH_MUTEX> + JAWS_Synch_IO_Handler_Factory_Singleton; + // This only works on Win32 #if defined (ACE_WIN32) diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Makefile b/apps/JAWS/server/PROTOTYPE/JAWS/Makefile index e3e1dff5d5d..5bb95561f9f 100644 --- a/apps/JAWS/server/PROTOTYPE/JAWS/Makefile +++ b/apps/JAWS/server/PROTOTYPE/JAWS/Makefile @@ -14,6 +14,7 @@ LIB = libJAWS.a MYFILES = \ Pipeline \ + Pipeline_Tasks \ Data_Block \ Policy \ Concurrency \ @@ -77,10 +78,10 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Trace.h \ $(ACE_ROOT)/ace/Log_Msg.h \ $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/Version.h \ $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ @@ -146,8 +147,10 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Hash_Map_Manager.h \ $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ $(ACE_ROOT)/ace/Service_Types.h \ $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ $(ACE_ROOT)/ace/Thread_Manager.h \ $(ACE_ROOT)/ace/Thread_Manager.i \ $(ACE_ROOT)/ace/WFMO_Reactor.h \ @@ -168,7 +171,7 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU JAWS/JAWS/Pipeline_Handler.h JAWS/JAWS/JAWS/Pipeline.h \ JAWS/JAWS/JAWS/Pipeline_Handler.cpp \ JAWS/JAWS/JAWS/JAWS/Pipeline_Handler.h JAWS/Pipeline_Handler.cpp -.obj/Data_Block.o .obj/Data_Block.so .shobj/Data_Block.o .shobj/Data_Block.so: Data_Block.cpp JAWS/Data_Block.h \ +.obj/Pipeline_Tasks.o .obj/Pipeline_Tasks.so .shobj/Pipeline_Tasks.o .shobj/Pipeline_Tasks.so: Pipeline_Tasks.cpp JAWS/Pipeline_Tasks.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/ACE.h \ @@ -183,10 +186,136 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Trace.h \ $(ACE_ROOT)/ace/Log_Msg.h \ $(ACE_ROOT)/ace/Log_Record.h \ + $(ACE_ROOT)/ace/Version.h \ + $(ACE_ROOT)/ace/ACE.i \ $(ACE_ROOT)/ace/Log_Priority.h \ $(ACE_ROOT)/ace/Log_Record.i \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ + $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ + $(ACE_ROOT)/ace/SV_Semaphore_Complex.i \ + $(ACE_ROOT)/ace/Synch.i \ + $(ACE_ROOT)/ace/Synch_T.h \ + $(ACE_ROOT)/ace/Event_Handler.h \ + $(ACE_ROOT)/ace/Event_Handler.i \ + $(ACE_ROOT)/ace/Synch_T.i \ + $(ACE_ROOT)/ace/Thread.h \ + $(ACE_ROOT)/ace/Thread.i \ + $(ACE_ROOT)/ace/Atomic_Op.i \ + $(ACE_ROOT)/ace/Synch_T.cpp \ + $(ACE_ROOT)/ace/Singleton.i \ + $(ACE_ROOT)/ace/Singleton.cpp \ + $(ACE_ROOT)/ace/Object_Manager.h \ + $(ACE_ROOT)/ace/Object_Manager.i \ + $(ACE_ROOT)/ace/Managed_Object.h \ + $(ACE_ROOT)/ace/Managed_Object.i \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + JAWS/JAWS/Data_Block.h JAWS/JAWS/JAWS/Pipeline.h \ + $(ACE_ROOT)/ace/Service_Config.h \ + $(ACE_ROOT)/ace/Service_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.h \ + $(ACE_ROOT)/ace/Shared_Object.i \ + $(ACE_ROOT)/ace/Service_Object.i \ + $(ACE_ROOT)/ace/Signal.h \ + $(ACE_ROOT)/ace/Containers.h \ + $(ACE_ROOT)/ace/Containers.i \ + $(ACE_ROOT)/ace/Containers.cpp \ + $(ACE_ROOT)/ace/Malloc.h \ + $(ACE_ROOT)/ace/Malloc.i \ + $(ACE_ROOT)/ace/Malloc_T.h \ + $(ACE_ROOT)/ace/Free_List.h \ + $(ACE_ROOT)/ace/Free_List.i \ + $(ACE_ROOT)/ace/Free_List.cpp \ + $(ACE_ROOT)/ace/Malloc_T.i \ + $(ACE_ROOT)/ace/Malloc_T.cpp \ + $(ACE_ROOT)/ace/Memory_Pool.h \ + $(ACE_ROOT)/ace/Mem_Map.h \ + $(ACE_ROOT)/ace/Mem_Map.i \ + $(ACE_ROOT)/ace/Memory_Pool.i \ + $(ACE_ROOT)/ace/Signal.i \ + $(ACE_ROOT)/ace/Service_Config.i \ + $(ACE_ROOT)/ace/Reactor.h \ + $(ACE_ROOT)/ace/Handle_Set.h \ + $(ACE_ROOT)/ace/Handle_Set.i \ + $(ACE_ROOT)/ace/Timer_Queue.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.h \ + $(ACE_ROOT)/ace/Timer_Queue_T.i \ + $(ACE_ROOT)/ace/Timer_Queue_T.cpp \ + $(ACE_ROOT)/ace/Reactor.i \ + $(ACE_ROOT)/ace/Reactor_Impl.h \ + $(ACE_ROOT)/ace/Svc_Conf_Tokens.h \ + $(ACE_ROOT)/ace/Stream.h \ + $(ACE_ROOT)/ace/IO_Cntl_Msg.h \ + $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Message_Block.i \ + $(ACE_ROOT)/ace/Time_Value.h \ + $(ACE_ROOT)/ace/Module.h \ + $(ACE_ROOT)/ace/Task_T.h \ + $(ACE_ROOT)/ace/Message_Queue.h \ + $(ACE_ROOT)/ace/Strategies.h \ + $(ACE_ROOT)/ace/Strategies_T.h \ + $(ACE_ROOT)/ace/Synch_Options.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager.h \ + $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ + $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ + $(ACE_ROOT)/ace/Service_Types.h \ + $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ + $(ACE_ROOT)/ace/Thread_Manager.h \ + $(ACE_ROOT)/ace/Thread_Manager.i \ + $(ACE_ROOT)/ace/WFMO_Reactor.h \ + $(ACE_ROOT)/ace/WFMO_Reactor.i \ + $(ACE_ROOT)/ace/Message_Queue.i \ + $(ACE_ROOT)/ace/Message_Queue.cpp \ + $(ACE_ROOT)/ace/Task.h \ + $(ACE_ROOT)/ace/Task.i \ + $(ACE_ROOT)/ace/Task_T.i \ + $(ACE_ROOT)/ace/Task_T.cpp \ + $(ACE_ROOT)/ace/Module.i \ + $(ACE_ROOT)/ace/Module.cpp \ + $(ACE_ROOT)/ace/Stream_Modules.h \ + $(ACE_ROOT)/ace/Stream_Modules.i \ + $(ACE_ROOT)/ace/Stream_Modules.cpp \ + $(ACE_ROOT)/ace/Stream.i \ + $(ACE_ROOT)/ace/Stream.cpp \ + JAWS/JAWS/JAWS/JAWS/Pipeline_Handler.h \ + JAWS/JAWS/JAWS/JAWS/JAWS/Pipeline.h \ + JAWS/JAWS/JAWS/JAWS/JAWS/Pipeline_Handler.cpp \ + JAWS/JAWS/JAWS/JAWS/JAWS/JAWS/Pipeline_Handler.h JAWS/JAWS/Pipeline.h \ + JAWS/Data_Block.h JAWS/Policy.h JAWS/JAWS/Concurrency.h \ + JAWS/JAWS/JAWS/IO.h $(ACE_ROOT)/ace/Asynch_IO.h \ + $(ACE_ROOT)/ace/SOCK_Stream.h \ + $(ACE_ROOT)/ace/SOCK_IO.h \ + $(ACE_ROOT)/ace/SOCK.h \ + $(ACE_ROOT)/ace/Addr.h \ + $(ACE_ROOT)/ace/Addr.i \ + $(ACE_ROOT)/ace/IPC_SAP.h \ + $(ACE_ROOT)/ace/IPC_SAP.i \ + $(ACE_ROOT)/ace/SOCK.i \ + $(ACE_ROOT)/ace/SOCK_IO.i \ + $(ACE_ROOT)/ace/INET_Addr.h \ + $(ACE_ROOT)/ace/INET_Addr.i \ + $(ACE_ROOT)/ace/SOCK_Stream.i +.obj/Data_Block.o .obj/Data_Block.so .shobj/Data_Block.o .shobj/Data_Block.so: Data_Block.cpp JAWS/Data_Block.h \ + $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/Synch.h \ + $(ACE_ROOT)/ace/ACE.h \ + $(ACE_ROOT)/ace/OS.h \ + $(ACE_ROOT)/ace/inc_user_config.h \ + $(ACE_ROOT)/ace/config.h \ + $(ACE_ROOT)/ace/config-g++-common.h \ + $(ACE_ROOT)/ace/streams.h \ + $(ACE_ROOT)/ace/Basic_Types.h \ + $(ACE_ROOT)/ace/Basic_Types.i \ + $(ACE_ROOT)/ace/OS.i \ + $(ACE_ROOT)/ace/Trace.h \ + $(ACE_ROOT)/ace/Log_Msg.h \ + $(ACE_ROOT)/ace/Log_Record.h \ $(ACE_ROOT)/ace/Version.h \ $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ @@ -255,8 +384,10 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Hash_Map_Manager.h \ $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ $(ACE_ROOT)/ace/Service_Types.h \ $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ $(ACE_ROOT)/ace/Thread_Manager.h \ $(ACE_ROOT)/ace/Thread_Manager.i \ $(ACE_ROOT)/ace/WFMO_Reactor.h \ @@ -306,10 +437,10 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Trace.h \ $(ACE_ROOT)/ace/Log_Msg.h \ $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/Version.h \ $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ @@ -378,8 +509,10 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Hash_Map_Manager.h \ $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ $(ACE_ROOT)/ace/Service_Types.h \ $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ $(ACE_ROOT)/ace/WFMO_Reactor.h \ $(ACE_ROOT)/ace/WFMO_Reactor.i \ $(ACE_ROOT)/ace/Message_Queue.i \ @@ -404,7 +537,15 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/SOCK_IO.i \ $(ACE_ROOT)/ace/INET_Addr.h \ $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i + $(ACE_ROOT)/ace/SOCK_Stream.i JAWS/Concurrency.h \ + JAWS/IO_Handler.h JAWS/IO_Acceptor.h \ + $(ACE_ROOT)/ace/Asynch_Acceptor.h \ + $(ACE_ROOT)/ace/LOCK_SOCK_Acceptor.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.h \ + $(ACE_ROOT)/ace/Time_Value.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.i \ + $(ACE_ROOT)/ace/LOCK_SOCK_Acceptor.cpp \ + JAWS/JAWS/IO.h .obj/Concurrency.o .obj/Concurrency.so .shobj/Concurrency.o .shobj/Concurrency.so: Concurrency.cpp JAWS/Concurrency.h \ $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ @@ -420,10 +561,10 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Trace.h \ $(ACE_ROOT)/ace/Log_Msg.h \ $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/Version.h \ $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ $(ACE_ROOT)/ace/SV_Semaphore_Simple.i \ @@ -492,8 +633,10 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Hash_Map_Manager.h \ $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ $(ACE_ROOT)/ace/Service_Types.h \ $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ $(ACE_ROOT)/ace/WFMO_Reactor.h \ $(ACE_ROOT)/ace/WFMO_Reactor.i \ $(ACE_ROOT)/ace/Message_Queue.i \ @@ -540,10 +683,10 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Trace.h \ $(ACE_ROOT)/ace/Log_Msg.h \ $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/Version.h \ $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/Get_Opt.i JAWS/Server.h \ JAWS/JAWS/Data_Block.h $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ @@ -615,8 +758,10 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Hash_Map_Manager.h \ $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ $(ACE_ROOT)/ace/Service_Types.h \ $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ $(ACE_ROOT)/ace/Thread_Manager.h \ $(ACE_ROOT)/ace/Thread_Manager.i \ $(ACE_ROOT)/ace/WFMO_Reactor.h \ @@ -651,7 +796,13 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/SOCK_IO.i \ $(ACE_ROOT)/ace/INET_Addr.h \ $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i JAWS/IO_Handler.h + $(ACE_ROOT)/ace/SOCK_Stream.i JAWS/IO_Handler.h \ + JAWS/IO_Acceptor.h \ + $(ACE_ROOT)/ace/Asynch_Acceptor.h \ + $(ACE_ROOT)/ace/LOCK_SOCK_Acceptor.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.i \ + $(ACE_ROOT)/ace/LOCK_SOCK_Acceptor.cpp .obj/IO_Acceptor.o .obj/IO_Acceptor.so .shobj/IO_Acceptor.o .shobj/IO_Acceptor.so: IO_Acceptor.cpp JAWS/IO_Acceptor.h \ $(ACE_ROOT)/ace/Asynch_Acceptor.h \ $(ACE_ROOT)/ace/OS.h \ @@ -723,10 +874,10 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Trace.h \ $(ACE_ROOT)/ace/Log_Msg.h \ $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/Version.h \ $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/Asynch_IO.h \ $(ACE_ROOT)/ace/SOCK_Stream.h \ $(ACE_ROOT)/ace/SOCK_IO.h \ @@ -739,8 +890,8 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/SOCK_IO.i \ $(ACE_ROOT)/ace/INET_Addr.h \ $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i JAWS/IO_Handler.h \ - JAWS/Data_Block.h $(ACE_ROOT)/ace/Singleton.h \ + $(ACE_ROOT)/ace/SOCK_Stream.i \ + $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ @@ -762,7 +913,7 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Managed_Object.h \ $(ACE_ROOT)/ace/Managed_Object.i \ $(ACE_ROOT)/ace/Managed_Object.cpp \ - JAWS/JAWS/Pipeline.h \ + JAWS/IO_Handler.h JAWS/Data_Block.h JAWS/JAWS/Pipeline.h \ $(ACE_ROOT)/ace/Service_Config.h \ $(ACE_ROOT)/ace/Service_Object.h \ $(ACE_ROOT)/ace/Shared_Object.h \ @@ -810,8 +961,10 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Hash_Map_Manager.h \ $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \ $(ACE_ROOT)/ace/Strategies_T.cpp \ + $(ACE_ROOT)/ace/Service_Repository.h \ $(ACE_ROOT)/ace/Service_Types.h \ $(ACE_ROOT)/ace/Service_Types.i \ + $(ACE_ROOT)/ace/Service_Repository.i \ $(ACE_ROOT)/ace/Thread_Manager.h \ $(ACE_ROOT)/ace/Thread_Manager.i \ $(ACE_ROOT)/ace/WFMO_Reactor.h \ @@ -844,10 +997,10 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Trace.h \ $(ACE_ROOT)/ace/Log_Msg.h \ $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/Version.h \ $(ACE_ROOT)/ace/ACE.i \ + $(ACE_ROOT)/ace/Log_Priority.h \ + $(ACE_ROOT)/ace/Log_Record.i \ $(ACE_ROOT)/ace/Asynch_IO.h \ $(ACE_ROOT)/ace/SOCK_Stream.h \ $(ACE_ROOT)/ace/SOCK_IO.h \ @@ -860,14 +1013,8 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/SOCK_IO.i \ $(ACE_ROOT)/ace/INET_Addr.h \ $(ACE_ROOT)/ace/INET_Addr.i \ - $(ACE_ROOT)/ace/SOCK_Stream.i JAWS/IO_Handler.h \ - JAWS/IO_Acceptor.h \ - $(ACE_ROOT)/ace/Asynch_Acceptor.h \ - $(ACE_ROOT)/ace/LOCK_SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.h \ - $(ACE_ROOT)/ace/Time_Value.h \ - $(ACE_ROOT)/ace/SOCK_Acceptor.i \ - $(ACE_ROOT)/ace/LOCK_SOCK_Acceptor.cpp \ + $(ACE_ROOT)/ace/SOCK_Stream.i \ + $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Synch.h \ $(ACE_ROOT)/ace/SV_Semaphore_Complex.h \ $(ACE_ROOT)/ace/SV_Semaphore_Simple.h \ @@ -882,15 +1029,21 @@ include $(ACE_ROOT)/include/makeinclude/rules.local.GNU $(ACE_ROOT)/ace/Thread.i \ $(ACE_ROOT)/ace/Atomic_Op.i \ $(ACE_ROOT)/ace/Synch_T.cpp \ - $(ACE_ROOT)/ace/Singleton.h \ $(ACE_ROOT)/ace/Singleton.i \ $(ACE_ROOT)/ace/Singleton.cpp \ $(ACE_ROOT)/ace/Object_Manager.h \ $(ACE_ROOT)/ace/Object_Manager.i \ $(ACE_ROOT)/ace/Managed_Object.h \ $(ACE_ROOT)/ace/Managed_Object.i \ - $(ACE_ROOT)/ace/Managed_Object.cpp JAWS/JAWS/IO.h \ - $(ACE_ROOT)/ace/Message_Block.h \ + $(ACE_ROOT)/ace/Managed_Object.cpp \ + JAWS/IO_Handler.h JAWS/IO_Acceptor.h \ + $(ACE_ROOT)/ace/Asynch_Acceptor.h \ + $(ACE_ROOT)/ace/LOCK_SOCK_Acceptor.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.h \ + $(ACE_ROOT)/ace/Time_Value.h \ + $(ACE_ROOT)/ace/SOCK_Acceptor.i \ + $(ACE_ROOT)/ace/LOCK_SOCK_Acceptor.cpp \ + JAWS/JAWS/IO.h $(ACE_ROOT)/ace/Message_Block.h \ $(ACE_ROOT)/ace/Malloc.h \ $(ACE_ROOT)/ace/Malloc.i \ $(ACE_ROOT)/ace/Malloc_T.h \ diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.cpp b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.cpp index 1774d459022..64c904c3f96 100644 --- a/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.cpp +++ b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.cpp @@ -10,6 +10,11 @@ JAWS_Pipeline_Abstract_Handler<TYPE>::JAWS_Pipeline_Abstract_Handler (void) { } +template <class TYPE> +JAWS_Pipeline_Abstract_Handler<TYPE>::~JAWS_Pipeline_Abstract_Handler (void) +{ +} + template <class TYPE> int JAWS_Pipeline_Abstract_Handler<TYPE>::put (ACE_Message_Block *mb, ACE_Time_Value *tv) @@ -19,6 +24,8 @@ JAWS_Pipeline_Abstract_Handler<TYPE>::put (ACE_Message_Block *mb, int status = this->handle_put (data, tv); + // If handle_put() is successful, we continue to the next stage of the + // pipeline. Otherwise, we return. return (status != -1) ? this->put_next (mb, tv) : -1; } diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.h b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.h index 92eb39cd10d..fb68d07f107 100644 --- a/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.h +++ b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.h @@ -13,6 +13,7 @@ class JAWS_Pipeline_Abstract_Handler : public JAWS_Pipeline_Task { public: JAWS_Pipeline_Abstract_Handler (void); + virtual ~JAWS_Pipeline_Abstract_Handler (void); // ACE_Task hooks virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv = 0); @@ -20,6 +21,7 @@ public: virtual int handle_put (TYPE *data, ACE_Time_Value *tv) = 0; // Callback hook for specialized data processing + }; #if defined (ACE_TEMPLATES_REQUIRE_SOURCE) diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Tasks.cpp b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Tasks.cpp new file mode 100644 index 00000000000..57bae126682 --- /dev/null +++ b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Tasks.cpp @@ -0,0 +1,60 @@ +// $Id$ + +#include "JAWS/Pipeline_Tasks.h" +#include "JAWS/Data_Block.h" +#include "JAWS/IO_Handler.h" +#include "JAWS/Policy.h" + +int +JAWS_Pipeline_Accept_Task::handle_put (JAWS_Data_Block *data, + ACE_Time_Value *) +{ + int result = -1; + + // JAWS_Data_Block should contain an INET_Addr and an IO + JAWS_IO_Handler *handler = data->io_handler (); + JAWS_Dispatch_Policy *policy = data->policy (); + + // data->policy ()->update (handler); + + JAWS_IO *io = policy->io (); + io->accept (handler); + + // When accept returns, the resulting handle should be stored into + // the JAWS_DATA_BLOCK somewhere. + + // Check the handler for status of the io call + switch (handler->status ()) + { + case JAWS_IO_Handler::ACCEPT_OK: + result = 0; + // At this point need to move to the next task in the pipeline! + // The framework will automatically call the next stage. + break; + case JAWS_IO_Handler::ACCEPT_ERROR: + result = -1; + // Should recycle the thread + break; + default: + result = -1; + // Should mean that the IO is asynchronous, and the word isn't out + // yet + break; + } + + // In asynchronous and synchronous models, we can -- + // have the io_handler set the new task in the data_block + + // In asynchronous model, we can -- + // insert a wait task into the task queue + + return result; +} + +#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) +template class JAWS_Pipeline_Abstract_Handler<JAWS_Data_Block>; +template class ACE_Singleton<JAWS_Pipeline_Accept_Task, ACE_SYNCH_MUTEX>; +#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) +#pragma instantiate JAWS_Pipeline_Abstract_Handler<JAWS_Data_Block> +#pragma instantiate ACE_Singleton<JAWS_Pipeline_Accept_Task, ACE_SYNCH_MUTEX> +#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Tasks.h b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Tasks.h new file mode 100644 index 00000000000..200ab5eadc0 --- /dev/null +++ b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Tasks.h @@ -0,0 +1,25 @@ +/* -*- c++ -*- */ +// $Id$ + +#if !defined (JAWS_PIPELINE_TASKS_H) +#define JAWS_PIPELINE_TASKS_H + +#include "ace/Singleton.h" + +#include "JAWS/Pipeline.h" + +class JAWS_Data_Block; + +typedef JAWS_Pipeline_Abstract_Handler<JAWS_Data_Block> + JAWS_Pipeline_Handler; + +class JAWS_Pipeline_Accept_Task : public JAWS_Pipeline_Handler +{ +public: + virtual int handle_put (JAWS_Data_Block *data, ACE_Time_Value *tv); +}; + +typedef ACE_Singleton<JAWS_Pipeline_Accept_Task, ACE_SYNCH_MUTEX> + JAWS_Pipeline_Accept_Task_Singleton; + +#endif /* !defined (JAWS_DATA_BLOCK_H) */ diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Policy.cpp b/apps/JAWS/server/PROTOTYPE/JAWS/Policy.cpp index 7a5075cf416..c4263b86b8e 100644 --- a/apps/JAWS/server/PROTOTYPE/JAWS/Policy.cpp +++ b/apps/JAWS/server/PROTOTYPE/JAWS/Policy.cpp @@ -1,6 +1,9 @@ // $Id$ #include "JAWS/Policy.h" +#include "JAWS/Concurrency.h" +#include "JAWS/IO_Handler.h" +#include "JAWS/IO_Acceptor.h" JAWS_Dispatch_Policy::JAWS_Dispatch_Policy (void) { @@ -10,50 +13,59 @@ JAWS_Dispatch_Policy::~JAWS_Dispatch_Policy (void) { } -ACE_INET_Addr * -JAWS_Synch_Dispatch_Policy::addr (void) +JAWS_Default_Dispatch_Policy::JAWS_Default_Dispatch_Policy (void) + : concurrency_ (JAWS_Thread_Pool_Singleton::instance ()), + ioh_factory_ (JAWS_Synch_IO_Handler_Factory_Singleton::instance ()), + acceptor_ (JAWS_IO_Synch_Acceptor_Singleton::instance ()), + io_ (JAWS_Synch_IO_Singleton::instance ()) +{ +} + +JAWS_Default_Dispatch_Policy::~JAWS_Default_Dispatch_Policy (void) { - return this->addr_; } JAWS_IO * -JAWS_Synch_Dispatch_Policy::io (void) +JAWS_Default_Dispatch_Policy::io (void) { return this->io_; } +JAWS_IO_Handler_Factory * +JAWS_Default_Dispatch_Policy::ioh_factory (void) +{ + return this->ioh_factory_; +} + JAWS_IO_Acceptor * -JAWS_Synch_Dispatch_Policy::acceptor (void) +JAWS_Default_Dispatch_Policy::acceptor (void) { return this->acceptor_; } JAWS_Concurrency_Base * -JAWS_Synch_Dispatch_Policy::concurrency (void) +JAWS_Default_Dispatch_Policy::concurrency (void) { return this->concurrency_; } void -JAWS_Synch_Dispatch_Policy::addr (ACE_INET_Addr *addrp) +JAWS_Default_Dispatch_Policy::io (JAWS_IO *) { - this->addr_ = addrp; } void -JAWS_Synch_Dispatch_Policy::io (JAWS_IO *iop) +JAWS_Default_Dispatch_Policy::ioh_factory (JAWS_IO_Handler_Factory *) { - this->io_ = iop; } void -JAWS_Synch_Dispatch_Policy::acceptor (JAWS_IO_Acceptor *acceptorp) +JAWS_Default_Dispatch_Policy::acceptor (JAWS_IO_Acceptor *) { - this->acceptor_ = acceptorp; } void -JAWS_Synch_Dispatch_Policy::concurrency (JAWS_Concurrency_Base *concp) +JAWS_Default_Dispatch_Policy::concurrency (JAWS_Concurrency_Base *concp) { this->concurrency_ = concp; } diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Policy.h b/apps/JAWS/server/PROTOTYPE/JAWS/Policy.h index 3a40513e1d7..e4556169a6b 100644 --- a/apps/JAWS/server/PROTOTYPE/JAWS/Policy.h +++ b/apps/JAWS/server/PROTOTYPE/JAWS/Policy.h @@ -22,39 +22,38 @@ public: JAWS_Dispatch_Policy (void); virtual ~JAWS_Dispatch_Policy (void); - virtual ACE_INET_Addr *addr (void); virtual JAWS_IO * io (void) = 0; + virtual JAWS_IO_Handler_Factory *ioh_factory (void) = 0; virtual JAWS_IO_Acceptor *acceptor (void) = 0; virtual JAWS_Concurrency_Base * concurrency (void) = 0; - virtual void addr (ACE_INET_Addr *addrp) = 0; virtual void io (JAWS_IO *iop) = 0; + virtual void ioh_factory (JAWS_IO_Handler_Factory *factoryp) = 0; virtual void acceptor (JAWS_IO_Acceptor *acceptorp) = 0; virtual void concurrency (JAWS_Concurrency_Base *concp) = 0; }; -class JAWS_Synch_Dispatch_Policy : public JAWS_Dispatch_Policy +class JAWS_Default_Dispatch_Policy : public JAWS_Dispatch_Policy { public: - virtual ACE_INET_Addr *addr (void); + JAWS_Default_Dispatch_Policy (void); + virtual ~JAWS_Default_Dispatch_Policy (void); + virtual JAWS_IO *io (void); + virtual JAWS_IO_Handler_Factory *ioh_factory (void); virtual JAWS_IO_Acceptor *acceptor (void); virtual JAWS_Concurrency_Base *concurrency (void); - virtual void addr (ACE_INET_Addr *addrp); virtual void io (JAWS_IO *iop); + virtual void ioh_factory (JAWS_IO_Handler_Factory *factoryp); virtual void acceptor (JAWS_IO_Acceptor *acceptorp); virtual void concurrency (JAWS_Concurrency_Base *concp); private: - ACE_INET_Addr *addr_; - + JAWS_Concurrency_Base *concurrency_; + JAWS_IO_Handler_Factory *ioh_factory_; JAWS_IO_Acceptor *acceptor_; - JAWS_IO_Handler_Factory *factory_; - JAWS_IO_Handler *ioh_; JAWS_IO *io_; - - JAWS_Concurrency_Base *concurrency_; }; #endif /* !defined (JAWS_POLICY_H) */ diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Server.cpp b/apps/JAWS/server/PROTOTYPE/JAWS/Server.cpp index 2065a4d5d25..1aa003f5c7c 100644 --- a/apps/JAWS/server/PROTOTYPE/JAWS/Server.cpp +++ b/apps/JAWS/server/PROTOTYPE/JAWS/Server.cpp @@ -6,6 +6,8 @@ #include "JAWS/Data_Block.h" #include "JAWS/Concurrency.h" #include "JAWS/IO_Handler.h" +#include "JAWS/IO_Acceptor.h" +#include "JAWS/Pipeline_Tasks.h" JAWS_Server::JAWS_Server (void) : port_ (5432), @@ -57,6 +59,8 @@ JAWS_Server::open (JAWS_Pipeline_Handler *protocol) JAWS_Data_Block *db; ACE_INET_Addr inet_addr (this->port_); + JAWS_IO_Synch_Acceptor_Singleton::instance ()->open (inet_addr); + JAWS_IO_Asynch_Acceptor_Singleton::instance ()->open (inet_addr); // initialize an IO_Handler factory = (this->dispatch_ == 0) ? &synch_factory : &asynch_factory; @@ -78,8 +82,7 @@ JAWS_Server::open (JAWS_Pipeline_Handler *protocol) return -1; } - // db->addr (&inet_addr); - db->handler (handler); + db->io_handler (handler); db->task (JAWS_Pipeline_Accept_Task_Singleton::instance ()); // The message block should contain an INET_Addr, and call the |