use of com.github.dreamhead.moco.rest.ActualRestServer in project moco by dreamhead.
the class SessionSetting method newHttpServer.
public ActualHttpServer newHttpServer(final Optional<Integer> port, final MocoConfig[] configs) {
if (isResource()) {
ActualRestServer server = new ActualRestServer(port, Optional.<HttpsCertificate>absent(), log(), configs);
RestSetting[] settings = resource.getSettings();
server.resource(resource.getName(), head(settings), tail(settings));
return server;
}
ActualHttpServer server = ActualHttpServer.createLogServer(port, configs);
bindTo(server);
return server;
}
use of com.github.dreamhead.moco.rest.ActualRestServer in project moco by dreamhead.
the class MocoRest method restServer.
public static RestServer restServer(final int port, final MocoConfig... configs) {
checkArgument(port > 0, "Port must be greater than zero");
checkNotNull(configs, "Config should not be null");
return new ActualRestServer(of(port), Optional.<HttpsCertificate>absent(), new QuietMonitor(), configs);
}
Aggregations