package clientserver; import java.io.IOException; import java.net.Socket; public class SquareServer extends AbstractServer { public SquareServer(int portNumber) throws IOException { super(portNumber); } protected Communicator createClientHandler(Socket socket) throws IOException { return new Communicator(socket) { void messageReceived(Double d) { send(d*d); } }; } public static void main(String[] args) throws IOException { (new SquareServer(10450)).start(); } }