c.setPort(port);
c.setServer(server);
// attempt to start listening. This will throw an exception if
// the given port is already in use.
c.start();
// if the connection started successfully, add it to the
// server and record the port in our data structures.
server.addConnector(c);
this.port = port;