diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
commit | 3df4acfa816441fc28a95dee6d0191a927145d95 (patch) | |
tree | b5ae7ca44662cfd8e5c95f1826e4406021a606f5 /java/JACE/Connection/AcceptStrategy.java | |
parent | 60a5612b83d856fc0adc52b9f39fac9960ec9818 (diff) | |
download | ATCD-pre-subset.tar.gz |
This commit was manufactured by cvs2svn to create tag 'pre-subset'.pre-subset
Diffstat (limited to 'java/JACE/Connection/AcceptStrategy.java')
-rw-r--r-- | java/JACE/Connection/AcceptStrategy.java | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/java/JACE/Connection/AcceptStrategy.java b/java/JACE/Connection/AcceptStrategy.java deleted file mode 100644 index 3af87865c79..00000000000 --- a/java/JACE/Connection/AcceptStrategy.java +++ /dev/null @@ -1,87 +0,0 @@ -/************************************************* - * - * = PACKAGE - * JACE.Connection - * - * = FILENAME - * AcceptStrategy.java - * - *@author Prashant Jain - *@author Everett Anderson - * - *************************************************/ -package JACE.Connection; - -import java.io.*; -import java.net.*; -import JACE.SOCK_SAP.*; - -/** - * Interface for specifying a passive connection - * acceptance strategy for a - * <a href="ACE.Connection.SvcHandler.html"><tt>SvcHandler</tt></a> - * . - * <P> - * This class provides a strategy that manages passive - * connection setup for an application, and can be extended - * to define new strategies. - * <P> - * - * The default implementation delegates to a generic Acceptor. - * - *@see SvcHandler - *@see Acceptor - */ -public class AcceptStrategy -{ - /** - * Create an instance of AcceptStrategy that delegates to the given - * Acceptor. - *@param port port number where the server will listen for connections - *@param peer Acceptor instance to delegate to - */ - AcceptStrategy (int port, Acceptor peer) throws IOException - { - this.acceptor_ = peer; - this.open (port); - } - - /** - * Create an instance of Accept Strategy that delegates to Acceptor. - *@param port port number where the server will listen for connections - *@exception IOException couldn't open port - */ - AcceptStrategy (int port) throws IOException - { - this.acceptor_ = new Acceptor (); - 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 - { - this.acceptor_.open (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 Socket error - *@exception IOException Socket error - *@return 0 - */ - public int acceptSvcHandler (SvcHandler sh) throws - SocketException, IOException - { - return this.acceptor_.acceptSvcHandler (sh); - } - - // The Acceptor we delegate to (if any) - private Acceptor acceptor_; -} |