public DiscoveryRestServer(int port, IDiscoveryController controller) {
    this.port = port;

    this.component = new Component();
    final Server server = new Server(Protocol.HTTP, this.port);
    server.setContext(OtsoRestletUtils.createContext());
    this.component.getServers().add(server);

    this.application = new OtsopackHttpDiscoveryApplication();
    this.application.setController(controller);
    this.component.getDefaultHost().attach(this.application);
  }