GatewayServer server = new GatewayServer();
Connector connector = new SelectChannelConnector();
connector.setLowResourceMaxIdleTime(connector.getMaxIdleTime());
connector.setPort(port);
server.addConnector(connector);
server.setTargetIdRetriever(new StandardTargetIdRetriever());
server.start();
server.getServer().dumpStdErr();
Runtime.getRuntime().addShutdownHook(new Shutdown(server));
}