diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-01-01 08:00:34 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-01-01 08:00:34 +0000 |
commit | d9661aebab28abc0ec4fb1e716170d347d56c168 (patch) | |
tree | ecb671ab4b8e299bf5cbb8b2dfeed8a49b65fc06 /java/src/AcceptStrategy.java | |
parent | ea0d28240863caf437a18071bfd03e7b146c5ade (diff) | |
download | ATCD-unlabeled-4.3.2.tar.gz |
This commit was manufactured by cvs2svn to create branchunlabeled-4.3.2
'unlabeled-4.3.2'.
Diffstat (limited to 'java/src/AcceptStrategy.java')
-rw-r--r-- | java/src/AcceptStrategy.java | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/java/src/AcceptStrategy.java b/java/src/AcceptStrategy.java deleted file mode 100644 index cf35c4fb460..00000000000 --- a/java/src/AcceptStrategy.java +++ /dev/null @@ -1,89 +0,0 @@ -/************************************************* - * - * = PACKAGE - * ACE.Connection - * - * = FILENAME - * AcceptStrategy.java - * - *@author Prashant Jain - * - *************************************************/ -package ACE.Connection; - -import java.io.*; -import java.net.*; -import ACE.SOCK_SAP.*; - -/** - * <hr> - * <h2>SYNOPSIS</h2> - *<blockquote> - * Interface for specifying a passive connection - * acceptance strategy for a - * <a href="ACE.Connection.SvcHandler.html"><tt>SvcHandler</tt></a> - * . - *</blockquote> - * - * <h2>DESCRIPTION</h2> - * - *<blockquote> - * This class provides a strategy that manages passive - * connection setup for an application, and can be extended - * to define new strategies. - *</blockquote> - * - * @see SvcHandler - * @see Acceptor - */ - -public class AcceptStrategy -{ - /** - * Create an instance of Accept Strategy. - *@param port port number where the server will listen for connections - *@exception IOException couldn't open port - */ - AcceptStrategy (int port) throws IOException - { - this.open (port); - } - - /** - * Initialize AcceptStrategy. - *@param port port number where the server will listen for connections - *@exception IOException couldn't open port - */ - public void open (int port) throws IOException - { - // Create a new SOCK_Acceptor to accept client connections - this.sockAcceptor_ = new SOCKAcceptor (port); - } - - /** - * Accept connections into the SvcHandler. Note that subclasses - * should overwrite this method to provide a different accept - * strategy. - *@param sh Svc Handler in which to accept the connection - *@exception SocketException - *@exception IOException - *@return 0 - */ - public int acceptSvcHandler (SvcHandler sh) throws - SocketException, IOException - { - // Create a new stream - SOCKStream sockStream = new SOCKStream (); - - // Block in accept. Returns when a connection shows up - this.sockAcceptor_.accept (sockStream); - - // Set the streams for the new handler - sh.setHandle (sockStream); - return 0; - } - - // Our connection acceptance factory - private SOCKAcceptor sockAcceptor_; - -} |