/** * This Class implements a Capitalization Service * @version 1.0 * @author Tim Stefanini */ import java.io.*; import java.net.*; public class CapService extends GenericService implements PortInterface { //++ Public Methods public void StartUp() { super.StartUp(); ClassPort = miPort; } public void serviceRequest() throws IOException { try { System.out.println("in serviceRequest for server " + getClass().getName() + "\n"); String foo = null; while ( (foo = clientInput.readLine()) != null) clientOutput.print("server: " + foo.toUpperCase() + " :server\r\n"); clientOutput.flush(); } //end try catch (Exception e) { e.printStackTrace(); }//end catch }//end serviceRequest() public static int GetPort() { return ClassPort; }//end getPort(); //++ Protected Methods //++ Private Methods //++ Data Members private static int ClassPort = -1; }//end class CapService