use of com.github.dreamhead.moco.parser.model.SessionSetting in project moco by dreamhead.
the class SocketServerParser method createServer.
@Override
protected SocketServer createServer(final ImmutableList<SessionSetting> sessionSettings, final Optional<Integer> port, final MocoConfig... configs) {
SocketServer server = ActualSocketServer.createLogServer(port);
for (SessionSetting session : sessionSettings) {
logger.debug("Parse session: {}", session);
session.bindTo(server);
}
return server;
}
use of com.github.dreamhead.moco.parser.model.SessionSetting in project moco by dreamhead.
the class HttpServerParser method createServer.
@Override
protected HttpServer createServer(final ImmutableList<SessionSetting> sessionSettings, final Optional<Integer> port, final MocoConfig... configs) {
ActualHttpServer targetServer = ActualHttpServer.createLogServer(port, configs);
for (SessionSetting session : sessionSettings) {
logger.debug("Parse session: {}", session);
targetServer = targetServer.mergeServer(session.newHttpServer(port, configs));
}
return targetServer;
}
Aggregations