From 12521f45cd85d2e89125c532bdb0df62409bf164 Mon Sep 17 00:00:00 2001 From: nobody Date: Thu, 14 Jan 1999 08:34:01 +0000 Subject: This commit was manufactured by cvs2svn to create tag 'ACE-4_6_13'. --- java/netsvcs/Time/TSServerAcceptor.java | 100 -------------------------------- 1 file changed, 100 deletions(-) delete mode 100755 java/netsvcs/Time/TSServerAcceptor.java (limited to 'java/netsvcs/Time/TSServerAcceptor.java') diff --git a/java/netsvcs/Time/TSServerAcceptor.java b/java/netsvcs/Time/TSServerAcceptor.java deleted file mode 100755 index 2d54f7b740b..00000000000 --- a/java/netsvcs/Time/TSServerAcceptor.java +++ /dev/null @@ -1,100 +0,0 @@ -/************************************************* - * - * = PACKAGE - * netsvcs.Time - * - * = FILENAME - * TS_Server_Acceptor.java - * - *@author Prashant Jain - * - *************************************************/ -package netsvcs.Time; - -import java.io.*; -import java.net.*; -import java.util.*; -import JACE.OS.*; -import JACE.Misc.*; -import JACE.Connection.*; -import JACE.Reactor.*; - -/** - *
- *

DESCRIPTION

- * - * Acceptor: listens to a port and launches TSServerHandlers - * when connections are made. - * - * @see netsvcs.Time.TSServerHandler, JACE.Connection.Acceptor - */ -public class TSServerAcceptor extends Acceptor implements Runnable -{ - // Run this in its own thread - public int init (String [] args) - { - // Parse arguments - this.parseArgs (args); - - // Run in own thread of control so that we don't block the caller - new Thread (this).start (); - return 0; - } - - // Create a TSServerHandler for each client that wants to connect - public void run () - { - try - { - this.setHandlerFactory (Class.forName ("netsvcs.Time.TSServerHandler")); - this.open (this.port_); - while (true) - this.accept (); - } - catch (ClassNotFoundException e) - { - ACE.ERROR (e); - } - catch (SocketException e) - { - ACE.ERROR ("Socket Exception: " + e); - } - catch (InstantiationException e) - { - ACE.ERROR (e); - } - catch (IllegalAccessException e) - { - ACE.ERROR (e); - } - catch (IOException e) - { - ACE.ERROR (e); - } - - System.err.println("Stopped accepting"); - } - - // Process the command line - protected void parseArgs (String args[]) - { - String s; - GetOpt opt = new GetOpt (args, "p:"); - for (int c; (c = opt.next ()) != -1; ) - { - switch (c) - { - case 'p': - s = opt.optarg (); - this.port_ = (new Integer (s)).intValue (); - break; - default: - ACE.ERROR ("Unknown argument: " + c); - break; - } - } - } - - private int port_ = 7989; -} - -- cgit v1.2.1