package JACE.netsvcs.Time; import java.io.*; import java.net.*; import java.util.*; import JACE.OS.*; import JACE.Misc.*; import JACE.Connection.*; import JACE.Reactor.*; import JACE.ASX.TimeValue; import JACE.Concurrency.ThreadManager; import JACE.netsvcs.Server; /** * Server for the time service. Creates TSServerHandlers as necessary * to handle the requests. *
* Valid command line arguments: *
* -p (port) Port to listen on for clients"); * -d Enable debugging messages"); * -a (class name) Specify ActivateStrategy"); * (Default is multi-threaded"); ** */ public class TSServerAcceptor extends Server { public TSServerAcceptor () { // Set the name in case we're not using the service configurator name ("Time Service"); } /** * Simple main program for running the logging service without the * service configurator. * *@param args command line arguments */ public static void main (String [] args) { // Simple main program to get things rolling TSServerAcceptor ta = new TSServerAcceptor(); ta.init (args); } /** * Creates a new TSServerHandler instance. */ protected SvcHandler makeSvcHandler () { return new TSServerHandler (); } /** * Prints out the valid command line arguments. See the class * description for more information. Called by Server.init when * parseArgs returns -1. */ protected void printUsage () { ACE.ERROR ("Valid options:\n"); ACE.ERROR ("-p