summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorjxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-02-27 10:48:13 +0000
committerjxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-02-27 10:48:13 +0000
commit0cceba113e3cd868cd3aae01ca9a847f557552b2 (patch)
treea26ab4fe0337f9cc9843b121cbcafc393c52223e /apps
parentfd8f08ac2bcfba50aafd6d8049f50d2c3fa0c9e1 (diff)
downloadATCD-0cceba113e3cd868cd3aae01ca9a847f557552b2.tar.gz
Initial add.
Diffstat (limited to 'apps')
-rw-r--r--apps/JAWS/server/PROTOTYPE/HTTP_10.cpp68
-rw-r--r--apps/JAWS/server/PROTOTYPE/HTTP_10.h38
-rw-r--r--apps/JAWS/server/PROTOTYPE/JAWS/Concurrency.cpp80
-rw-r--r--apps/JAWS/server/PROTOTYPE/JAWS/Concurrency.h96
-rw-r--r--apps/JAWS/server/PROTOTYPE/JAWS/IO.cpp421
-rw-r--r--apps/JAWS/server/PROTOTYPE/JAWS/IO.h244
-rw-r--r--apps/JAWS/server/PROTOTYPE/JAWS/IO_Acceptor.cpp75
-rw-r--r--apps/JAWS/server/PROTOTYPE/JAWS/IO_Acceptor.h112
-rw-r--r--apps/JAWS/server/PROTOTYPE/JAWS/Makefile405
-rw-r--r--apps/JAWS/server/PROTOTYPE/JAWS/Pipeline.cpp27
-rw-r--r--apps/JAWS/server/PROTOTYPE/JAWS/Pipeline.h31
-rw-r--r--apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.cpp24
-rw-r--r--apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.h29
13 files changed, 1650 insertions, 0 deletions
diff --git a/apps/JAWS/server/PROTOTYPE/HTTP_10.cpp b/apps/JAWS/server/PROTOTYPE/HTTP_10.cpp
new file mode 100644
index 00000000000..3b80f871a8d
--- /dev/null
+++ b/apps/JAWS/server/PROTOTYPE/HTTP_10.cpp
@@ -0,0 +1,68 @@
+// $Id$
+
+#include "JAWS/HTTP_10.h"
+
+JAWS_HTTP_IO_Handler::JAWS_HTTP_IO_Handler (JAWS_IO *io)
+ : io_(io)
+{
+}
+
+JAWS_HTTP_IO_Handler::~JAWS_HTTP_IO_Handler (void)
+{
+}
+
+void
+JAWS_HTTP_IO_Handler::accept_complete (void)
+{
+}
+
+void
+JAWS_HTTP_IO_Handler::accept_error (void)
+{
+}
+
+void
+JAWS_HTTP_IO_Handler::read_complete (ACE_Message_Block &data)
+{
+}
+
+void
+JAWS_HTTP_IO_Handler::read_error (void)
+{
+}
+
+void
+JAWS_HTTP_IO_Handler::transmit_file_complete (void)
+{
+}
+
+void
+JAWS_HTTP_IO_Handler::transmit_file_error (int result)
+{
+}
+
+void
+JAWS_HTTP_IO_Handler::receive_file_complete (void)
+{
+}
+
+void
+JAWS_HTTP_IO_Handler::receive_file_error (int result)
+{
+}
+
+void
+JAWS_HTTP_IO_Handler::write_error (void)
+{
+}
+
+void
+JAWS_HTTP_IO_Handler::confirmation_message_complete (void)
+{
+}
+
+void
+JAWS_HTTP_IO_Handler::error_message_complete (void)
+{
+}
+
diff --git a/apps/JAWS/server/PROTOTYPE/HTTP_10.h b/apps/JAWS/server/PROTOTYPE/HTTP_10.h
new file mode 100644
index 00000000000..9e5b300be0a
--- /dev/null
+++ b/apps/JAWS/server/PROTOTYPE/HTTP_10.h
@@ -0,0 +1,38 @@
+/* -*- c++ -*- */
+
+#if !defined (JAWS_HTTP_10_H)
+#define JAWS_HTTP_10_H
+
+#include "JAWS/IO.h"
+
+class JAWS_HTTP_IO_Handler : protected JAWS_IO_Handler
+{
+public:
+ JAWS_HTTP_IO_Handler (JAWS_IO *io);
+ ~JAWS_HTTP_IO_Handler (void);
+
+protected:
+ // The following methods are inherited from JAWS_IO_Handler
+
+ virtual void accept_complete (void);
+ virtual void accept_error (void);
+ virtual void read_complete (ACE_Message_Block &data);
+ virtual void read_error (void);
+ virtual void transmit_file_complete (void);
+ virtual void transmit_file_error (int result);
+ virtual void receive_file_complete (void);
+ virtual void receive_file_error (int result);
+ virtual void write_error (void);
+ virtual void confirmation_message_complete (void);
+ virtual void error_message_complete (void);
+
+private:
+ JAWS_IO *io_;
+ // The reference to our IO interface (synch vs. asynch)
+
+ void *state_;
+ // This maintains the state so that we can short circuit the stream calls
+};
+
+
+#endif /* !defined (JAWS_HTTP_10_H) */
diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Concurrency.cpp b/apps/JAWS/server/PROTOTYPE/JAWS/Concurrency.cpp
new file mode 100644
index 00000000000..2737fe4c887
--- /dev/null
+++ b/apps/JAWS/server/PROTOTYPE/JAWS/Concurrency.cpp
@@ -0,0 +1,80 @@
+// $Id$
+
+#include "JAWS/Concurrency.h"
+
+JAWS_Concurrency_Base::JAWS_Concurrency_Base (void)
+{
+}
+
+int
+JAWS_Concurrency_Base::put (ACE_Message_Block *mb, ACE_Time_Value *tv)
+{
+ return this->putq (mb, tv);
+}
+
+int
+JAWS_Concurrency_Base::svc (void)
+{
+ int result = 0;
+
+ for (;;)
+ {
+ ACE_Message_Block *mb;
+
+ // At this point we could set a timeout value so that the
+ // threading strategy can delete a thread if there is nothing to
+ // do. Carefully think how to implement it so you don't leave
+ // yourself with 0 threads.
+
+ result = this->getq (mb);
+ if (result == -1 || mb == 0)
+ break;
+
+ this->put_next (mb);
+ }
+ return 0;
+}
+
+JAWS_Dispatch_Policy::JAWS_Dispatch_Policy (void)
+{
+}
+
+JAWS_Dispatch_Policy::~JAWS_Dispatch_Policy (void)
+{
+}
+
+JAWS_Dispatcher::JAWS_Dispatcher (JAWS_Dispatch_Policy *policy)
+ : policy_(policy)
+{
+}
+
+JAWS_Thread_Pool_Task::JAWS_Thread_Pool_Task (long flags,
+ int nthreads,
+ int maxthreads)
+ : nthreads_ (nthreads),
+ maxthreads_ (maxthreads)
+{
+ if (this->activate (flags, nthreads) == -1)
+ ACE_ERROR ((LM_ERROR, "%p\n", "JAWS_Thread_Pool_Task::activate"));
+}
+
+JAWS_Thread_Per_Task::JAWS_Thread_Per_Task (long flags, int maxthreads)
+ : flags_ (flags),
+ maxthreads_ (maxthreads)
+{
+}
+
+int
+JAWS_Thread_Per_Task::put (ACE_Message_Block *mb, ACE_Time_Value *tv)
+{
+ const int force_active = 1;
+ const int nthreads = 1;
+
+ if (this->activate (this->flags_, nthreads, force_active) == -1)
+ ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "JAWS_Thread_Pool_Task::activate"),
+ -1);
+
+ this->putq (mb, tv);
+
+ return 0;
+}
diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Concurrency.h b/apps/JAWS/server/PROTOTYPE/JAWS/Concurrency.h
new file mode 100644
index 00000000000..7c718e148ff
--- /dev/null
+++ b/apps/JAWS/server/PROTOTYPE/JAWS/Concurrency.h
@@ -0,0 +1,96 @@
+/* -*- c++ -*- */
+// $Id$
+
+#if !defined (JAWS_CONCURRENCY_H)
+#define JAWS_CONCURRENCY_H
+
+#include "ace/Synch.h"
+#include "ace/Task.h"
+#include "JAWS/IO.h"
+
+class JAWS_Concurrency_Base : public ACE_Task<ACE_MT_SYNCH>
+ // = TITLE
+ // Base class for different concurrency models
+ //
+ // = DESCRIPTION
+ // Provides a default implementaion of the virtual put() method
+ // which calls putq(), but can be overloaded to do something
+ // synchronously, such as call put_next().
+
+{
+public:
+ JAWS_Concurrency_Base (void);
+ virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv = 0);
+ virtual int svc (void);
+};
+
+class JAWS_Dispatch_Policy
+ // = TITLE
+ // Policy mechanism for choosing different concurrency models.
+ //
+ // = DESCRIPTION
+ // Given some (unspecified) state, decides what the concurrency
+ // model should be. (For now, we always return the same model.)
+{
+public:
+ JAWS_Dispatch_Policy (void);
+ virtual ~JAWS_Dispatch_Policy (void);
+ virtual JAWS_Concurrency_Base * update (void *state = 0) = 0;
+};
+
+class JAWS_Dispatcher
+ // = TITLE
+ // The class that is responsible to delivering events to the
+ // appropriate concurrency mechanism.
+ //
+ // = DESCRIPTION
+ // JAWS_IO_Handler calls into the dispatcher so that the completed
+ // IO can find a thread to take care of it.
+{
+public:
+ JAWS_Dispatcher (JAWS_Dispatch_Policy *policy);
+
+ int dispatch (JAWS_IO_Handler *ioh);
+
+private:
+ JAWS_Dispatch_Policy *policy_;
+};
+
+class JAWS_Thread_Pool_Task : public JAWS_Concurrency_Base
+ // = TITLE
+ // Used to implement Thread Pool Concurrency Strategy
+ //
+ // = DESCRIPTION
+ // This task is created to hold a pool of threads that receive
+ // requests through the message queue.
+{
+public:
+ JAWS_Thread_Pool_Task (long flags = THR_NEW_LWP,
+ int nthreads = 5,
+ int maxthreads = 20);
+
+private:
+ int nthreads_;
+ int maxthreads_;
+};
+
+class JAWS_Thread_Per_Task : public JAWS_Concurrency_Base
+ // = TITLE
+ // Used to implement Thread Per Request Concurrency Strategy
+ //
+ // = DESCRIPTION
+ // As each new message arrives from the queue, a new thread is
+ // spawned to handle it. This is done by overloading put to call
+ // activate.
+{
+public:
+ JAWS_Thread_Per_Task (long flags = THR_NEW_LWP, int maxthreads = 20);
+
+ virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv = 0);
+
+private:
+ long flags_;
+ int maxthreads_;
+};
+
+#endif /* !defined (JAWS_CONCURRENCY_H) */
diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/IO.cpp b/apps/JAWS/server/PROTOTYPE/JAWS/IO.cpp
new file mode 100644
index 00000000000..fc0144a9fe1
--- /dev/null
+++ b/apps/JAWS/server/PROTOTYPE/JAWS/IO.cpp
@@ -0,0 +1,421 @@
+// $Id$
+
+#include "JAWS/IO.h"
+#include "JAWS/IO_Acceptor.h"
+// #include "HTTP_Helpers.h"
+#include "ace/Message_Block.h"
+#include "ace/SOCK_Stream.h"
+#include "ace/Filecache.h"
+
+JAWS_IO::JAWS_IO (void)
+ : handle_ (ACE_INVALID_HANDLE),
+ handler_ (0)
+{
+}
+
+JAWS_IO::~JAWS_IO (void)
+{
+}
+
+ACE_HANDLE
+JAWS_IO::handle (void)
+{
+ return this->handle_;
+}
+
+void
+JAWS_IO::handle (ACE_HANDLE handle)
+{
+ this->handle_ = handle;
+}
+
+void
+JAWS_IO::handler (JAWS_IO_Handler *handler)
+{
+ this->handler_ = handler;
+}
+
+JAWS_Synch_IO::JAWS_Synch_IO (void)
+{
+}
+
+JAWS_Synch_IO::~JAWS_Synch_IO (void)
+{
+ ACE_OS::closesocket (this->handle_);
+}
+
+void
+JAWS_Synch_IO::accept (ACE_SOCK_Stream &new_stream)
+{
+ if (this->acceptor_->accept (new_stream) == -1)
+ this->handler_->accept_error ();
+ else
+ this->handler_->accept_complete ();
+}
+
+void
+JAWS_Synch_IO::read (ACE_Message_Block &mb,
+ int size)
+{
+ ACE_SOCK_Stream stream;
+ stream.set_handle (this->handle_);
+ int result = stream.recv (mb.wr_ptr (), size);
+
+ if (result <= 0)
+ this->handler_->read_error ();
+ else
+ {
+ mb.wr_ptr (result);
+ this->handler_->read_complete (mb);
+ }
+}
+
+void
+JAWS_Synch_IO::receive_file (const char *filename,
+ void *initial_data,
+ int initial_data_length,
+ int entire_length)
+{
+ ACE_Filecache_Handle handle (filename, entire_length);
+
+ int result = handle.error ();
+
+ if (result == ACE_Filecache_Handle::SUCCESS)
+ {
+ ACE_SOCK_Stream stream;
+ stream.set_handle (this->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,
+ bytes_to_read);
+ if (bytes == bytes_to_read)
+ this->handler_->receive_file_complete ();
+ else
+ result = -1;
+ }
+
+ if (result != ACE_Filecache_Handle::SUCCESS)
+ this->handler_->receive_file_error (result);
+}
+
+void
+JAWS_Synch_IO::transmit_file (const char *filename,
+ const char *header,
+ int header_size,
+ const char *trailer,
+ int trailer_size)
+{
+ ACE_Filecache_Handle handle (filename);
+
+ int result = handle.error ();
+
+ if (result == ACE_Filecache_Handle::SUCCESS)
+ {
+#if defined (ACE_JAWS_BASELINE)
+ ACE_SOCK_Stream stream;
+ stream.set_handle (this->handle_);
+
+ if ((stream.send_n (header, header_size) == header_size)
+ && ((u_long) stream.send_n (handle.address (), handle.size ())
+ == handle.size ())
+ && (stream.send_n (trailer, trailer_size) == trailer_size))
+ this->handler_->transmit_file_complete ();
+ else
+ result = -1;
+#else
+ // Attempting to use writev
+ // Is this faster?
+ struct iovec iov[3];
+ int iovcnt = 0;
+ if (header_size > 0)
+ {
+ iov[iovcnt].iov_base = (char *) header;
+ iov[iovcnt].iov_len = header_size;
+ iovcnt++;
+ }
+ if (handle.size () > 0)
+ {
+ iov[iovcnt].iov_base = (char *) handle.address ();
+ iov[iovcnt].iov_len = handle.size ();
+ iovcnt++;
+ }
+ if (trailer_size > 0)
+ {
+ iov[iovcnt].iov_base = (char *) trailer;
+ iov[iovcnt].iov_len = trailer_size;
+ iovcnt++;
+ }
+ if (ACE_OS::writev (this->handle_, iov, iovcnt) < 0)
+ result = -1;
+ else
+ this->handler_->transmit_file_complete ();
+#endif /* ACE_JAWS_BASELINE */
+ }
+
+ if (result != ACE_Filecache_Handle::SUCCESS)
+ this->handler_->transmit_file_error (result);
+}
+
+void
+JAWS_Synch_IO::send_confirmation_message (const char *buffer,
+ int length)
+{
+ this->send_message (buffer, length);
+ this->handler_->confirmation_message_complete ();
+}
+
+void
+JAWS_Synch_IO::send_error_message (const char *buffer,
+ int length)
+{
+ this->send_message (buffer, length);
+ this->handler_->error_message_complete ();
+}
+
+void
+JAWS_Synch_IO::send_message (const char *buffer,
+ int length)
+{
+ ACE_SOCK_Stream stream;
+ stream.set_handle (this->handle_);
+ stream.send_n (buffer, length);
+}
+
+// This only works on Win32
+#if defined (ACE_WIN32)
+
+JAWS_Asynch_IO::JAWS_Asynch_IO (void)
+{
+}
+
+JAWS_Asynch_IO::~JAWS_Asynch_IO (void)
+{
+ ACE_OS::closesocket (this->handle_);
+}
+
+void
+JAWS_Asynch_IO::read (ACE_Message_Block& mb,
+ int size)
+{
+ ACE_Asynch_Read_Stream ar;
+
+ if (ar.open (*this, this->handle_) == -1
+ || ar.read (mb, size) == -1)
+ this->handler_->read_error ();
+}
+
+// This method will be called when an asynchronous read completes on a
+// stream.
+
+void
+JAWS_Asynch_IO::handle_read_stream (const ACE_Asynch_Read_Stream::Result &result)
+{
+ // This callback is for this->receive_file()
+ if (result.act () != 0)
+ {
+ int code = 0;
+ if (result.success () && result.bytes_transferred () != 0)
+ {
+ if (result.message_block ().length () == result.message_block ().size ())
+ code = ACE_Filecache_Handle::SUCCESS;
+ else
+ {
+ ACE_Asynch_Read_Stream ar;
+ if (ar.open (*this, this->handle_) == -1
+ || ar.read (result.message_block (),
+ result.message_block ().size () - result.message_block ().length (),
+ result.act ()) == -1)
+ code = -1;
+ else
+ return;
+ }
+ }
+ else
+ code = -1;
+
+ if (code == ACE_Filecache_Handle::SUCCESS)
+ this->handler_->receive_file_complete ();
+ else
+ this->handler_->receive_file_error (code);
+
+ delete &result.message_block ();
+ delete (ACE_Filecache_Handle *) result.act ();
+ }
+ else
+ {
+ // This callback is for this->read()
+ if (result.success ()
+ && result.bytes_transferred () != 0)
+ this->handler_->read_complete (result.message_block ());
+ else
+ this->handler_->read_error ();
+ }
+}
+
+void
+JAWS_Asynch_IO::receive_file (const char *filename,
+ void *initial_data,
+ int initial_data_length,
+ int entire_length)
+{
+ ACE_Message_Block *mb = 0;
+ ACE_Filecache_Handle *handle;
+
+ ACE_NEW (handle, ACE_Filecache_Handle (filename, entire_length, NOMAP));
+
+ int result = handle->error ();
+
+ if (result == ACE_Filecache_Handle::SUCCESS)
+ {
+ ACE_OS::memcpy (handle->address (),
+ initial_data,
+ initial_data_length);
+
+ int bytes_to_read = entire_length - initial_data_length;
+
+ ACE_NEW (mb, ACE_Message_Block ((char *)handle->address ()
+ + initial_data_length, bytes_to_read));
+
+ if (mb == 0)
+ {
+ errno = ENOMEM;
+ result = -1;
+ }
+ else
+ {
+ ACE_Asynch_Read_Stream ar;
+
+ if (ar.open (*this, this->handle_) == -1
+ || ar.read (*mb, mb->size () - mb->length (), handle) == -1)
+ result = -1;
+ }
+ }
+
+ if (result != ACE_Filecache_Handle::SUCCESS)
+ {
+ this->handler_->receive_file_error (result);
+ delete mb;
+ delete handle;
+ }
+}
+
+void
+JAWS_Asynch_IO::transmit_file (const char *filename,
+ const char *header,
+ int header_size,
+ const char *trailer,
+ int trailer_size)
+{
+ ACE_Asynch_Transmit_File::Header_And_Trailer *header_and_trailer = 0;
+ ACE_Filecache_Handle *handle = new ACE_Filecache_Handle (filename, NOMAP);
+
+ int result = handle->error ();
+
+ if (result == ACE_Filecache_Handle::SUCCESS)
+ {
+ ACE_Message_Block header_mb (header, header_size);
+ ACE_Message_Block trailer_mb (trailer, trailer_size);
+
+ header_and_trailer = new ACE_Asynch_Transmit_File::Header_And_Trailer
+ (&header_mb, header_size, &trailer_mb, trailer_size);
+
+ ACE_Asynch_Transmit_File tf;
+
+ if (tf.open (*this, this->handle_) == -1
+ || tf.transmit_file (handle->handle (), // file handle
+ header_and_trailer, // header and trailer data
+ 0, // bytes_to_write
+ 0, // offset
+ 0, // offset_high
+ 0, // bytes_per_send
+ 0, // flags
+ handle // act
+ ) == -1)
+ result = -1;
+ }
+
+ if (result != ACE_Filecache_Handle::SUCCESS)
+ {
+ this->handler_->transmit_file_error (result);
+ delete header_and_trailer;
+ delete handle;
+ }
+}
+
+
+// This method will be called when an asynchronous transmit file completes.
+void
+JAWS_Asynch_IO::handle_transmit_file (const ACE_Asynch_Transmit_File::Result &result)
+{
+ if (result.success ())
+ this->handler_->transmit_file_complete ();
+ else
+ this->handler_->transmit_file_error (-1);
+
+ delete result.header_and_trailer ();
+ delete (ACE_Filecache_Handle *) result.act ();
+}
+
+void
+JAWS_Asynch_IO::send_confirmation_message (const char *buffer,
+ int length)
+{
+ this->send_message (buffer, length, CONFORMATION);
+}
+
+void
+JAWS_Asynch_IO::send_error_message (const char *buffer,
+ int length)
+{
+ this->send_message (buffer, length, ERROR_MESSAGE);
+}
+
+void
+JAWS_Asynch_IO::send_message (const char *buffer,
+ int length,
+ int act)
+{
+ ACE_Message_Block *mb;
+ ACE_NEW (mb, ACE_Message_Block (buffer, length));
+
+ if (mb == 0)
+ {
+ this->handler_->error_message_complete ();
+ return;
+ }
+
+ ACE_Asynch_Write_Stream aw;
+ if (aw.open (*this, this->handle_) == -1
+ || aw.write (*mb, length, (void *) act) == -1)
+ {
+ mb->release ();
+
+ if (act == CONFORMATION)
+ this->handler_->confirmation_message_complete ();
+ else
+ this->handler_->error_message_complete ();
+ }
+}
+
+void
+JAWS_Asynch_IO::handle_write_stream (const ACE_Asynch_Write_Stream::Result &result)
+{
+ result.message_block ().release ();
+
+ if (result.act () == (void *) CONFORMATION)
+ this->handler_->confirmation_message_complete ();
+ else
+ this->handler_->error_message_complete ();
+}
+
+#endif /* ACE_WIN32 */
+
+// #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
+// template class ACE_Singleton<JAWS_VFS, ACE_SYNCH_MUTEX>;
+// #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
+// #pragma instantiate ACE_Singleton<JAWS_VFS, 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
new file mode 100644
index 00000000000..41fdd57a8bc
--- /dev/null
+++ b/apps/JAWS/server/PROTOTYPE/JAWS/IO.h
@@ -0,0 +1,244 @@
+/* -*- c++ -*- */
+// Hey, Emacs! This is a C++ file!
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// jaws
+//
+// = FILENAME
+// IO.h
+//
+// = AUTHOR
+// James Hu
+//
+// ============================================================================
+
+#if !defined (JAWS_IO_H)
+#define JAWS_IO_H
+
+class ACE_Message_Block;
+class JAWS_IO_Handler;
+class JAWS_IO_Acceptor;
+
+#include "ace/ACE.h"
+#include "ace/Asynch_IO.h"
+#include "ace/SOCK_Stream.h"
+
+class JAWS_IO
+ // = TITLE
+ //
+ // This class defines the abstract interface for an I/O class in
+ // the context of Web-likes servers
+ //
+ // = DESCRIPTION
+ //
+ // An I/O class should have the following interface. Derived
+ // classes will define the exactly how the I/O will take place
+ // (Asynchronous, Synchronous, Reactive)
+{
+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);
+
+ // James, please add documentation here.
+
+ virtual void accept (ACE_SOCK_Stream &new_stream) = 0;
+ // accept a passive connection
+
+ virtual void read (ACE_Message_Block& mb, int size) = 0;
+ // read from the handle size bytes into the message block.
+
+ virtual void transmit_file (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,
+ 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;
+ // send a confirmation message to the handle.
+
+ virtual void send_error_message (const char *buffer, int length) = 0;
+ // send an error message to the handle.
+
+protected:
+ ACE_HANDLE handle_;
+ JAWS_IO_Handler *handler_;
+ JAWS_IO_Acceptor *acceptor_;
+};
+
+class JAWS_IO_Handler
+ // = TITLE
+ //
+ // This class defines the abstract interface for an I/O handler class in
+ // the context of Web-likes servers
+ //
+ // = DESCRIPTION
+{
+public:
+ virtual void accept_complete (void) {};
+ // This method is called by the IO class when new passive connection has
+ // been established.
+
+ virtual void accept_error (void) {};
+ // This method is called by the IO class when new passive connection has
+ // been established.
+
+#if 0
+ virtual void connect_complete (ACE_Message_Block &) {};
+ // This method is called by the IO class when new active connection has
+ // been established.
+
+ virtual void connect_error (ACE_Message_Block &) {};
+ // This method is called by the IO class when new active connection has
+ // been established.
+#endif
+
+ virtual void read_complete (ACE_Message_Block &data) = 0;
+ // This method is called by the IO class when new client data shows
+ // up.
+
+ virtual void read_error (void) = 0;
+ // This method is called by the IO class when there was an error in
+ // reading new data from the client.
+
+ virtual void transmit_file_complete (void) = 0;
+ // This method is called by the IO class when the requested file has
+ // been successfully transmitted to the client.
+
+ virtual void transmit_file_error (int result) = 0;
+ // This method is called by the IO class when there was an error in
+ // transmitting the requested file to the client.
+
+ virtual void receive_file_complete (void) = 0;
+ // This method is called by the IO class when the requested file has
+ // been successfully received from the client.
+
+ virtual void receive_file_error (int result) = 0;
+ // This method is called by the IO class when there was an error in
+ // receiving the requested file from the client.
+
+ virtual void write_error (void) = 0;
+ // This method is called by the IO class when there was an error in
+ // writing data to the client.
+
+ virtual void confirmation_message_complete (void) = 0;
+ // This method is called by the IO class when the confirmation
+ // message has been delivered to the client.
+
+ virtual void error_message_complete (void) = 0;
+ // This method is called by the IO class when the error message has
+ // been delivered to the client.
+
+};
+
+class JAWS_Synch_IO : public JAWS_IO
+ // = TITLE
+ //
+ // This class defines the interface for a Synchronous I/O class.
+ //
+ // = DESCRIPTION
+{
+public:
+ JAWS_Synch_IO (void);
+
+ ~JAWS_Synch_IO (void);
+
+ virtual void accept (ACE_SOCK_Stream &new_stream);
+
+ void read (ACE_Message_Block& mb, int size);
+
+ void transmit_file (const char *filename,
+ const char *header,
+ int header_size,
+ const char *trailer,
+ int trailer_size);
+
+ void receive_file (const char *filename,
+ void *initial_data,
+ int initial_data_length,
+ int entire_length);
+
+ void send_confirmation_message (const char *buffer,
+ int length);
+
+ void send_error_message (const char *buffer,
+ int length);
+
+protected:
+ virtual void send_message (const char *buffer,
+ int length);
+};
+
+// This only works on Win32
+#if defined (ACE_WIN32)
+
+class JAWS_Asynch_IO : public JAWS_IO, public ACE_Handler
+ // = TITLE
+ //
+ // This class defines the interface for a Asynchronous I/O class.
+ //
+ // = DESCRIPTION
+{
+public:
+ JAWS_Asynch_IO (void);
+
+ ~JAWS_Asynch_IO (void);
+
+ void read (ACE_Message_Block& mb, int size);
+
+ void transmit_file (const char *filename,
+ const char *header,
+ int header_size,
+ const char *trailer,
+ int trailer_size);
+
+ void receive_file (const char *filename,
+ void *initial_data,
+ int initial_data_length,
+ int entire_length);
+
+ void send_confirmation_message (const char *buffer,
+ int length);
+
+ void send_error_message (const char *buffer,
+ int length);
+
+protected:
+ enum Message_Types
+ {
+ CONFORMATION,
+ ERROR_MESSAGE
+ };
+
+ virtual void send_message (const char *buffer,
+ int length,
+ int act);
+
+ virtual void handle_read_stream (const ACE_Asynch_Read_Stream::Result &result);
+ // This method will be called when an asynchronous read completes on
+ // a stream.
+
+ virtual void handle_write_stream (const ACE_Asynch_Write_Stream::Result &result);
+ // This method will be called when an asynchronous write completes
+ // on a stream.
+
+ virtual void handle_transmit_file (const ACE_Asynch_Transmit_File::Result &result);
+ // This method will be called when an asynchronous transmit file
+ // completes.
+};
+
+#endif /* ACE_WIN32 */
+#endif /* JAWS_IO_H */
diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/IO_Acceptor.cpp b/apps/JAWS/server/PROTOTYPE/JAWS/IO_Acceptor.cpp
new file mode 100644
index 00000000000..454f31019a4
--- /dev/null
+++ b/apps/JAWS/server/PROTOTYPE/JAWS/IO_Acceptor.cpp
@@ -0,0 +1,75 @@
+// $Id$
+
+#include "JAWS/IO_Acceptor.h"
+
+int
+JAWS_IO_Acceptor::open (const ACE_Addr &, int, int, int, int)
+{
+ return -1;
+}
+
+int
+JAWS_IO_Acceptor::accept (ACE_SOCK_Stream &, ACE_Addr *, ACE_Time_Value *,
+ int, int) const
+{
+ return -1;
+}
+
+int
+JAWS_IO_Acceptor::open (const ACE_INET_Addr &, size_t, int, int, int,
+ ACE_Proactor *)
+{
+ return -1;
+}
+
+int
+JAWS_IO_Acceptor::accept (size_t)
+{
+ return -1;
+}
+
+int
+JAWS_IO_Synch_Acceptor::open (const ACE_Addr &local_sap,
+ int reuse_addr,
+ int protocol_family,
+ int backlog,
+ int protocol)
+{
+ return this->acceptor_->open (local_sap, reuse_addr, protocol_family,
+ backlog, protocol);
+}
+
+int
+JAWS_IO_Synch_Acceptor::accept (ACE_SOCK_Stream &new_stream,
+ ACE_Addr *remote_addr,
+ ACE_Time_Value *timeout,
+ int restart,
+ int reset_new_handle) const
+{
+ return this->acceptor_->accept (new_stream, remote_addr, timeout,
+ restart, reset_new_handle);
+}
+
+
+#if defined (ACE_WIN32)
+// This only works on Win32 platforms
+
+int
+JAWS_IO_Asynch_Acceptor::open (const ACE_INET_Addr &address,
+ size_t bytes_to_read,
+ int pass_addresses,
+ int backlog,
+ int reuse_addr,
+ ACE_Proactor *proactor)
+{
+ return this->acceptor_->open (address, bytes_to_read, pass_address,
+ backlog, reuse_addr, proactor);
+}
+
+int
+JAWS_IO_Asynch_Acceptor::accept (size_t bytes_to_read)
+{
+ return this->acceptor_->accept (bytes_to_read);
+}
+
+#endif /* defined (ACE_WIN32) */
diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/IO_Acceptor.h b/apps/JAWS/server/PROTOTYPE/JAWS/IO_Acceptor.h
new file mode 100644
index 00000000000..8f2ef413ed2
--- /dev/null
+++ b/apps/JAWS/server/PROTOTYPE/JAWS/IO_Acceptor.h
@@ -0,0 +1,112 @@
+/* -*- c++ -*- */
+// $Id$
+
+#if !defined (JAWS_IO_ACCEPTOR_H)
+#define JAWS_IO_ACCEPTOR_H
+
+// Use the Adapter pattern to encapsulate either a LOCK_SOCK_Acceptor or
+// an ACE_Asynch_Acceptor
+
+#include "ace/Asynch_Acceptor.h"
+#include "ace/LOCK_SOCK_Acceptor.h"
+
+#include "JAWS/IO.h"
+
+// Forward declaration.
+class ACE_Proactor;
+class ACE_Reactor;
+
+#if defined (ACE_HAS_THREAD_SAFE_ACCEPT)
+typedef ACE_LOCK_SOCK_Acceptor<ACE_SYNCH_NULL_MUTEX> JAWS_IO_SOCK_Acceptor;
+#else
+typedef ACE_LOCK_SOCK_Acceptor<ACE_SYNCH_MUTEX> JAWS_IO_SOCK_Acceptor;
+#endif /* ACE_HAS_THREAD_SAFE_ACCEPT */
+
+class JAWS_IO_Acceptor
+{
+public:
+
+ JAWS_IO_Acceptor (void);
+ virtual ~JAWS_IO_Acceptor (void);
+
+ virtual int open (const ACE_Addr &local_sap,
+ int reuse_addr = 0,
+ int protocol_family = PF_INET,
+ int backlog = 5,
+ int protocol = 0) = 0;
+ // Initiate a synchronous passive mode socket.
+
+ virtual int accept (ACE_SOCK_Stream &new_stream,
+ ACE_Addr *remote_addr = 0,
+ ACE_Time_Value *timeout = 0,
+ int restart = 1,
+ int reset_new_handle = 0) const = 0;
+ // Synchronously accept the connection
+
+ virtual int open (const ACE_INET_Addr &address,
+ size_t bytes_to_read = 0,
+ int pass_addresses = 0,
+ int backlog = 5,
+ int reuse_addr = 1,
+ ACE_Proactor *proactor = 0) = 0;
+ // Initiate an asynchronous passive connection
+
+ virtual int accept (size_t bytes_to_read = 0) = 0;
+ // This initiates a new asynchronous accept through the AcceptEx call.
+
+ enum { ASYNC = 0, SYNCH = 1 };
+ // identify if this is being used for aynchronous or synchronous
+ // accept calls
+
+private:
+
+};
+
+class JAWS_IO_Synch_Acceptor : public JAWS_IO_Acceptor
+{
+public:
+
+ virtual int open (const ACE_Addr &local_sap,
+ int reuse_addr = 0,
+ int protocol_family = PF_INET,
+ int backlog = 5,
+ int protocol = 0);
+ // Initiate a passive mode socket.
+
+ virtual int accept (ACE_SOCK_Stream &new_stream,
+ ACE_Addr *remote_addr = 0,
+ ACE_Time_Value *timeout = 0,
+ int restart = 1,
+ int reset_new_handle = 0) const;
+ // Accept the connection
+
+private:
+ JAWS_IO_SOCK_Acceptor *acceptor_;
+};
+
+
+#if defined (ACE_WIN32)
+// This only works on Win32 platforms
+
+class JAWS_IO_Asynch_Acceptor : public JAWS_IO_Acceptor
+{
+public:
+
+ virtual int open (const ACE_INET_Addr &address,
+ size_t bytes_to_read = 0,
+ int pass_addresses = 0,
+ int backlog = 5,
+ int reuse_addr = 1,
+ ACE_Proactor *proactor = 0);
+ // Initiate an asynchronous passive connection
+
+ virtual int accept (size_t bytes_to_read = 0);
+ // This initiates a new asynchronous accept through the AcceptEx call.
+
+private:
+ ACE_Asynch_Acceptor<JAWS_IO_Handler> *acceptor_;
+};
+
+#endif /* defined (ACE_WIN32) */
+
+#endif /* !defined (JAWS_IO_ACCEPTOR_H) */
diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Makefile b/apps/JAWS/server/PROTOTYPE/JAWS/Makefile
new file mode 100644
index 00000000000..0c490eb4d68
--- /dev/null
+++ b/apps/JAWS/server/PROTOTYPE/JAWS/Makefile
@@ -0,0 +1,405 @@
+#----------------------------------------------------------------------------
+# $Id$
+#
+# Makefile for the ACE Adapter Web Server (JAWS)
+#----------------------------------------------------------------------------
+
+#----------------------------------------------------------------------------
+# Local macros
+#----------------------------------------------------------------------------
+
+#BIN = main
+
+LIB = libJAWS.a
+
+MYFILES = \
+ Pipeline \
+ Concurrency \
+ IO_Acceptor \
+ IO
+
+LSRC = $(addsuffix .cpp,$(MYFILES))
+LOBJ = $(addsuffix .o,$(MYFILES))
+
+#CFLAGS += -I$(ACE_ROOT)/apps/JAWS/server/PROTOTYPE
+
+VLDLIBS = $(LDLIBS:%=%$(VAR))
+
+#LDLIBS = -lJAWS
+
+BUILD = $(VOBJS) $(VLIB) #$(VBIN)
+
+#----------------------------------------------------------------------------
+# Include macros and targets
+#----------------------------------------------------------------------------
+
+include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
+include $(ACE_ROOT)/include/makeinclude/macros.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
+include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
+# The contents of rules.bin.GNU are expanded in Local targets, below.
+# include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
+# include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
+
+#----------------------------------------------------------------------------
+# Local targets
+#----------------------------------------------------------------------------
+
+# Expand rules.bin.GNU, but without the $(VOBJS) dependencies.
+VBIN = $(BIN:%=%$(VAR))
+
+$(BIN): %: $(VDIR)%.o
+ $(LINK.cc) -o $@ $^ $(LDFLAGS) $(VLDLIBS) $(POSTLINK)
+include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
+
+#----------------------------------------------------------------------------
+# Dependencies
+#----------------------------------------------------------------------------
+# DO NOT DELETE THIS LINE -- g++dep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
+
+.obj/Pipeline.o .obj/Pipeline.so .shobj/Pipeline.o .shobj/Pipeline.so: Pipeline.cpp JAWS/Pipeline.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/Log_Priority.h \
+ $(ACE_ROOT)/ace/Log_Record.i \
+ $(ACE_ROOT)/ace/Version.h \
+ $(ACE_ROOT)/ace/ACE.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/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/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 \
+ $(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_Types.h \
+ $(ACE_ROOT)/ace/Service_Types.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/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/Concurrency.o .obj/Concurrency.so .shobj/Concurrency.o .shobj/Concurrency.so: Concurrency.cpp JAWS/Concurrency.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/Log_Priority.h \
+ $(ACE_ROOT)/ace/Log_Record.i \
+ $(ACE_ROOT)/ace/Version.h \
+ $(ACE_ROOT)/ace/ACE.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/Task.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/Thread_Manager.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/Signal.h \
+ $(ACE_ROOT)/ace/Signal.i \
+ $(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 \
+ $(ACE_ROOT)/ace/Mem_Map.h \
+ $(ACE_ROOT)/ace/Mem_Map.i \
+ $(ACE_ROOT)/ace/Memory_Pool.i \
+ $(ACE_ROOT)/ace/Thread_Manager.i \
+ $(ACE_ROOT)/ace/Task.i \
+ $(ACE_ROOT)/ace/Task_T.h \
+ $(ACE_ROOT)/ace/Message_Queue.h \
+ $(ACE_ROOT)/ace/Message_Block.h \
+ $(ACE_ROOT)/ace/Message_Block.i \
+ $(ACE_ROOT)/ace/IO_Cntl_Msg.h \
+ $(ACE_ROOT)/ace/Strategies.h \
+ $(ACE_ROOT)/ace/Strategies_T.h \
+ $(ACE_ROOT)/ace/Service_Config.h \
+ $(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/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_Types.h \
+ $(ACE_ROOT)/ace/Service_Types.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_T.i \
+ $(ACE_ROOT)/ace/Task_T.cpp \
+ $(ACE_ROOT)/ace/Module.h \
+ $(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 \
+ JAWS/JAWS/IO.h $(ACE_ROOT)/ace/Asynch_IO.h
+.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 \
+ $(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/ACE.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/LOCK_SOCK_Acceptor.h \
+ $(ACE_ROOT)/ace/SOCK_Acceptor.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 \
+ $(ACE_ROOT)/ace/Time_Value.h \
+ $(ACE_ROOT)/ace/SOCK_Acceptor.i \
+ $(ACE_ROOT)/ace/LOCK_SOCK_Acceptor.cpp \
+ $(ACE_ROOT)/ace/Synch.h \
+ $(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 JAWS/JAWS/IO.h \
+ $(ACE_ROOT)/ace/Asynch_IO.h
+.obj/IO.o .obj/IO.so .shobj/IO.o .shobj/IO.so: IO.cpp JAWS/IO.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/Log_Priority.h \
+ $(ACE_ROOT)/ace/Log_Record.i \
+ $(ACE_ROOT)/ace/Version.h \
+ $(ACE_ROOT)/ace/ACE.i \
+ $(ACE_ROOT)/ace/Asynch_IO.h \
+ $(ACE_ROOT)/ace/Message_Block.h \
+ $(ACE_ROOT)/ace/Malloc.h \
+ $(ACE_ROOT)/ace/Malloc.i \
+ $(ACE_ROOT)/ace/Malloc_T.h \
+ $(ACE_ROOT)/ace/Synch.h \
+ $(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/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/Signal.h \
+ $(ACE_ROOT)/ace/Containers.h \
+ $(ACE_ROOT)/ace/Containers.i \
+ $(ACE_ROOT)/ace/Containers.cpp \
+ $(ACE_ROOT)/ace/Signal.i \
+ $(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 \
+ $(ACE_ROOT)/ace/Mem_Map.h \
+ $(ACE_ROOT)/ace/Mem_Map.i \
+ $(ACE_ROOT)/ace/Memory_Pool.i \
+ $(ACE_ROOT)/ace/Message_Block.i \
+ $(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 \
+ $(ACE_ROOT)/ace/Filecache.h \
+ $(ACE_ROOT)/ace/Hash_Map_Manager.h \
+ $(ACE_ROOT)/ace/Hash_Map_Manager.cpp \
+ $(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/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/SString.h \
+ $(ACE_ROOT)/ace/SString.i
+
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline.cpp b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline.cpp
new file mode 100644
index 00000000000..5c8c7464882
--- /dev/null
+++ b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline.cpp
@@ -0,0 +1,27 @@
+// $Id$
+
+#include "JAWS/Pipeline.h"
+
+JAWS_Pipeline::JAWS_Pipeline (void)
+{
+}
+
+int
+JAWS_Pipeline::open (void *)
+{
+ // Simply call into the virtual svc() method.
+ if (this->svc () == -1)
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "%p\n",
+ "JAWS_Pipeline::svc"),
+ -1);
+ return 0;
+}
+
+int
+JAWS_Pipeline::close (u_long)
+{
+ return 0;
+}
+
+#include "JAWS/Pipeline_Handler.cpp"
diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline.h b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline.h
new file mode 100644
index 00000000000..747e0469af8
--- /dev/null
+++ b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline.h
@@ -0,0 +1,31 @@
+/* -*- c++ -*- */
+// $Id$
+
+#if !defined (JAWS_PIPELINE_H)
+#define JAWS_PIPELINE_H
+
+#include "ace/Synch.h"
+#include "ace/Service_Config.h"
+#include "ace/Stream.h"
+#include "ace/Module.h"
+#include "ace/Task.h"
+
+typedef ACE_Stream<ACE_NULL_SYNCH> JAWS_Pipeline_Stream;
+typedef ACE_Module<ACE_NULL_SYNCH> JAWS_Pipeline_Module;
+typedef ACE_Task<ACE_NULL_SYNCH> JAWS_Pipeline_Task;
+
+class JAWS_Pipeline : public JAWS_Pipeline_Task
+ // = TITLE
+ // Methods that are common to pipeline components
+{
+public:
+ JAWS_Pipeline (void);
+ // ACE_Task hooks
+
+ virtual int open (void * = 0);
+ virtual int close (u_long = 0);
+};
+
+#include "JAWS/Pipeline_Handler.h"
+
+#endif /* !defined (JAWS_PIPELINE_H) */
diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.cpp b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.cpp
new file mode 100644
index 00000000000..63a0c95414f
--- /dev/null
+++ b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.cpp
@@ -0,0 +1,24 @@
+// $Id$
+
+#if !defined (JAWS_PIPELINE_HANDLER_CPP)
+#define JAWS_PIPELINE_HANDLER_CPP
+
+#include "JAWS/Pipeline_Handler.h"
+
+template <class TYPE>
+JAWS_Pipeline_Handler<TYPE>::JAWS_Pipeline_Handler (void)
+{
+}
+
+template <class TYPE> int
+JAWS_Pipeline_Handler<TYPE>::put (ACE_Message_Block *mb, ACE_Time_Value *tv)
+{
+ TYPE *data = ACE_dynamic_cast (TYPE *,
+ mb->data_block ());
+
+ status = this->handle_input (data, tv);
+
+ return (status != -1) ? this->put_next (mb, tv) : -1;
+}
+
+#endif /* !defined (JAWS_PIPELINE_HANDLER_CPP) */
diff --git a/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.h b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.h
new file mode 100644
index 00000000000..db4786814f6
--- /dev/null
+++ b/apps/JAWS/server/PROTOTYPE/JAWS/Pipeline_Handler.h
@@ -0,0 +1,29 @@
+/* -*- c++ -*- */
+// $Id$
+
+#if !defined (JAWS_PIPELINE_HANDLER_H)
+#define JAWS_PIPELINE_HANDLER_H
+
+#include "JAWS/Pipeline.h"
+
+template <class TYPE>
+class JAWS_Pipeline_Handler : public JAWS_Pipeline_Task
+ // = TITLE
+ // Methods that are common to pipeline components
+{
+public:
+ JAWS_Pipeline_Handler (void);
+ // ACE_Task hooks
+
+ virtual int put (ACE_Message_Block *mb, ACE_Time_Value *tv = 0);
+ // inherited from ACE_Task
+
+ virtual int handle_put (TYPE *data, ACE_Time_Value *tv) = 0;
+ // Callback hook for specialized data processing
+};
+
+#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
+#include "JAWS/Pipeline_Handler.cpp"
+#endif
+
+#endif /* !defined (JAWS_PIPELINE_HANDLER_H) */