Rename all occurrences of "labyrinth" to maze and update dependencies.
This commit is contained in:
		
							parent
							
								
									d9613b03ca
								
							
						
					
					
						commit
						ca8f2bfec7
					
				
					 18 changed files with 129 additions and 129 deletions
				
			
		|  | @ -1,4 +1,4 @@ | |||
| package ch.fritteli.labyrinth.server; | ||||
| package ch.fritteli.maze.server; | ||||
| 
 | ||||
| import org.jetbrains.annotations.Nullable; | ||||
| 
 | ||||
|  | @ -1,4 +1,4 @@ | |||
| package ch.fritteli.labyrinth.server; | ||||
| package ch.fritteli.maze.server; | ||||
| 
 | ||||
| import lombok.experimental.UtilityClass; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
|  | @ -8,7 +8,7 @@ import lombok.extern.slf4j.Slf4j; | |||
| public class Main { | ||||
| 
 | ||||
|     public static void main(String[] args) { | ||||
|         LabyrinthServer.createAndStartServer() | ||||
|         MazeServer.createAndStartServer() | ||||
|                 .onFailure(e -> log.error("Failed to create server. Stopping.", e)); | ||||
|     } | ||||
| } | ||||
|  | @ -1,8 +1,8 @@ | |||
| package ch.fritteli.labyrinth.server; | ||||
| package ch.fritteli.maze.server; | ||||
| 
 | ||||
| import ch.fritteli.labyrinth.server.handler.CreateHandler; | ||||
| import ch.fritteli.labyrinth.server.handler.RenderV1Handler; | ||||
| import ch.fritteli.labyrinth.server.handler.RenderV2Handler; | ||||
| import ch.fritteli.maze.server.handler.CreateHandler; | ||||
| import ch.fritteli.maze.server.handler.RenderV1Handler; | ||||
| import ch.fritteli.maze.server.handler.RenderV2Handler; | ||||
| import io.undertow.Undertow; | ||||
| import io.undertow.server.RoutingHandler; | ||||
| import io.vavr.control.Try; | ||||
|  | @ -11,12 +11,12 @@ import lombok.NonNull; | |||
| import lombok.extern.slf4j.Slf4j; | ||||
| 
 | ||||
| @Slf4j | ||||
| public class LabyrinthServer { | ||||
| public class MazeServer { | ||||
| 
 | ||||
|     @NonNull | ||||
|     private final Undertow undertow; | ||||
| 
 | ||||
|     private LabyrinthServer(@NonNull final ServerConfig config) { | ||||
|     private MazeServer(@NonNull final ServerConfig config) { | ||||
|         final String hostAddress = config.getAddress().getHostAddress(); | ||||
|         final int port = config.getPort(); | ||||
|         log.info("Starting Server at http://{}:{}/", hostAddress, port); | ||||
|  | @ -32,15 +32,15 @@ public class LabyrinthServer { | |||
|     } | ||||
| 
 | ||||
|     @NonNull | ||||
|     public static Try<LabyrinthServer> createAndStartServer() { | ||||
|     public static Try<MazeServer> createAndStartServer() { | ||||
|         return Try.of(ServerConfig::init) | ||||
|                 .flatMapTry(LabyrinthServer::createAndStartServer); | ||||
|                 .flatMapTry(MazeServer::createAndStartServer); | ||||
|     } | ||||
| 
 | ||||
|     @NonNull | ||||
|     public static Try<LabyrinthServer> createAndStartServer(@NonNull final ServerConfig config) { | ||||
|         return Try.of(() -> new LabyrinthServer(config)) | ||||
|                 .peek(LabyrinthServer::start); | ||||
|     public static Try<MazeServer> createAndStartServer(@NonNull final ServerConfig config) { | ||||
|         return Try.of(() -> new MazeServer(config)) | ||||
|                 .peek(MazeServer::start); | ||||
|     } | ||||
| 
 | ||||
|     private void start() { | ||||
|  | @ -1,12 +1,12 @@ | |||
| package ch.fritteli.labyrinth.server; | ||||
| package ch.fritteli.maze.server; | ||||
| 
 | ||||
| import ch.fritteli.labyrinth.generator.model.Labyrinth; | ||||
| import ch.fritteli.labyrinth.generator.renderer.html.HTMLRenderer; | ||||
| import ch.fritteli.labyrinth.generator.renderer.json.JsonRenderer; | ||||
| import ch.fritteli.labyrinth.generator.renderer.pdf.PDFRenderer; | ||||
| import ch.fritteli.labyrinth.generator.renderer.text.TextRenderer; | ||||
| import ch.fritteli.labyrinth.generator.serialization.v1.SerializerDeserializerV1; | ||||
| import ch.fritteli.labyrinth.generator.serialization.v2.SerializerDeserializerV2; | ||||
| import ch.fritteli.maze.generator.renderer.html.HTMLRenderer; | ||||
| import ch.fritteli.maze.generator.renderer.json.JsonRenderer; | ||||
| import ch.fritteli.maze.generator.renderer.pdf.PDFRenderer; | ||||
| import ch.fritteli.maze.generator.renderer.text.TextRenderer; | ||||
| import ch.fritteli.maze.generator.serialization.v1.SerializerDeserializerV1; | ||||
| import ch.fritteli.maze.generator.serialization.v2.SerializerDeserializerV2; | ||||
| import ch.fritteli.maze.generator.model.Maze; | ||||
| import io.vavr.collection.List; | ||||
| import io.vavr.collection.Stream; | ||||
| import io.vavr.control.Option; | ||||
|  | @ -20,37 +20,37 @@ import java.util.function.Function; | |||
| public enum OutputType { | ||||
|     TEXT_PLAIN("text/plain; charset=UTF-8", | ||||
|             "txt", | ||||
|             labyrinth -> TextRenderer.newInstance().render(labyrinth).getBytes(StandardCharsets.UTF_8), | ||||
|             maze -> TextRenderer.newInstance().render(maze).getBytes(StandardCharsets.UTF_8), | ||||
|             false, | ||||
|             "t", | ||||
|             "text"), | ||||
|     HTML("text/html", | ||||
|             "html", | ||||
|             labyrinth -> HTMLRenderer.newInstance().render(labyrinth).getBytes(StandardCharsets.UTF_8), | ||||
|             maze -> HTMLRenderer.newInstance().render(maze).getBytes(StandardCharsets.UTF_8), | ||||
|             false, | ||||
|             "h", | ||||
|             "html"), | ||||
|     JSON("application/json", | ||||
|             "json", | ||||
|             labyrinth -> JsonRenderer.newInstance().render(labyrinth).getBytes(StandardCharsets.UTF_8), | ||||
|             maze -> JsonRenderer.newInstance().render(maze).getBytes(StandardCharsets.UTF_8), | ||||
|             false, | ||||
|             "j", | ||||
|             "json"), | ||||
|     JSONFILE("application/json", | ||||
|             "json", | ||||
|             labyrinth -> JsonRenderer.newInstance().render(labyrinth).getBytes(StandardCharsets.UTF_8), | ||||
|             maze -> JsonRenderer.newInstance().render(maze).getBytes(StandardCharsets.UTF_8), | ||||
|             true, | ||||
|             "s", | ||||
|             "jsonfile"), | ||||
|     PDF("application/pdf", | ||||
|             "pdf", | ||||
|             labyrinth -> PDFRenderer.newInstance().render(labyrinth).toByteArray(), | ||||
|             maze -> PDFRenderer.newInstance().render(maze).toByteArray(), | ||||
|             false, | ||||
|             "p", | ||||
|             "pdf"), | ||||
|     PDFFILE("application/pdf", | ||||
|             "pdf", | ||||
|             labyrinth -> PDFRenderer.newInstance().render(labyrinth).toByteArray(), | ||||
|             maze -> PDFRenderer.newInstance().render(maze).toByteArray(), | ||||
|             true, | ||||
|             "f", | ||||
|             "pdffile"), | ||||
|  | @ -61,7 +61,7 @@ public enum OutputType { | |||
|             "b", | ||||
|             "binary"), | ||||
|     BINARY_V2("application/octet-stream", | ||||
|             "lab2", | ||||
|             "maze", | ||||
|             SerializerDeserializerV2::serialize, | ||||
|             true, | ||||
|             "v", | ||||
|  | @ -73,7 +73,7 @@ public enum OutputType { | |||
|     @NonNull | ||||
|     private final String fileExtension; | ||||
|     @NonNull | ||||
|     private final Function<Labyrinth, byte[]> render; | ||||
|     private final Function<Maze, byte[]> render; | ||||
|     @Getter | ||||
|     private final boolean attachment; | ||||
|     @Getter | ||||
|  | @ -82,7 +82,7 @@ public enum OutputType { | |||
| 
 | ||||
|     OutputType(@NonNull final String contentType, | ||||
|                @NonNull final String fileExtension, | ||||
|                @NonNull final Function<Labyrinth, byte[]> render, | ||||
|                @NonNull final Function<Maze, byte[]> render, | ||||
|                final boolean attachment, | ||||
|                @NonNull final String... names) { | ||||
|         this.contentType = contentType; | ||||
|  | @ -108,7 +108,7 @@ public enum OutputType { | |||
|     } | ||||
| 
 | ||||
|     @NonNull | ||||
|     public byte[] render(@NonNull final Labyrinth labyrinth) { | ||||
|         return this.render.apply(labyrinth); | ||||
|     public byte[] render(@NonNull final Maze maze) { | ||||
|         return this.render.apply(maze); | ||||
|     } | ||||
| } | ||||
|  | @ -1,4 +1,4 @@ | |||
| package ch.fritteli.labyrinth.server; | ||||
| package ch.fritteli.maze.server; | ||||
| 
 | ||||
| import io.vavr.control.Try; | ||||
| import lombok.AccessLevel; | ||||
|  | @ -14,8 +14,8 @@ import java.net.InetAddress; | |||
| @Slf4j | ||||
| @Value | ||||
| public class ServerConfig { | ||||
|     public static final String SYSPROP_HOST = "fritteli.labyrinth.server.host"; | ||||
|     public static final String SYSPROP_PORT = "fritteli.labyrinth.server.port"; | ||||
|     public static final String SYSPROP_HOST = "fritteli.maze.server.host"; | ||||
|     public static final String SYSPROP_PORT = "fritteli.maze.server.port"; | ||||
| 
 | ||||
|     @NonNull | ||||
|     InetAddress address; | ||||
|  | @ -1,4 +1,4 @@ | |||
| package ch.fritteli.labyrinth.server.handler; | ||||
| package ch.fritteli.maze.server.handler; | ||||
| 
 | ||||
| import io.undertow.server.HttpHandler; | ||||
| import io.undertow.server.HttpServerExchange; | ||||
|  | @ -1,7 +1,7 @@ | |||
| package ch.fritteli.labyrinth.server.handler; | ||||
| package ch.fritteli.maze.server.handler; | ||||
| 
 | ||||
| import ch.fritteli.labyrinth.generator.model.Labyrinth; | ||||
| import ch.fritteli.labyrinth.server.OutputType; | ||||
| import ch.fritteli.maze.server.OutputType; | ||||
| import ch.fritteli.maze.generator.model.Maze; | ||||
| import io.undertow.server.HttpServerExchange; | ||||
| import io.undertow.util.Headers; | ||||
| import io.undertow.util.HttpString; | ||||
|  | @ -26,9 +26,9 @@ public class CreateHandler extends AbstractHttpHandler { | |||
|     protected void handle(@NonNull final HttpServerExchange exchange) { | ||||
|         final Instant start = Instant.now(); | ||||
|         log.debug("Handling create request"); | ||||
|         this.createLabyrinthFromRequestParameters(exchange.getQueryParameters()) | ||||
|         this.createMazeFromRequestParameters(exchange.getQueryParameters()) | ||||
|                 .onFailure(e -> { | ||||
|                     log.error("Error creating Labyrinth from request", e); | ||||
|                     log.error("Error creating maze from request", e); | ||||
|                     exchange.setStatusCode(StatusCodes.INTERNAL_SERVER_ERROR) | ||||
|                             .setReasonPhrase(StatusCodes.INTERNAL_SERVER_ERROR_STRING) | ||||
|                             .getResponseSender() | ||||
|  | @ -36,31 +36,33 @@ public class CreateHandler extends AbstractHttpHandler { | |||
|                 }) | ||||
|                 .forEach(tuple -> { | ||||
|                     final OutputType outputType = tuple._1(); | ||||
|                     final Labyrinth labyrinth = tuple._2(); | ||||
|                     final Maze maze = tuple._2(); | ||||
|                     final byte[] bytes; | ||||
|                     try { | ||||
|                         bytes = outputType.render(labyrinth); | ||||
|                         bytes = outputType.render(maze); | ||||
|                     } catch (@NonNull final Exception e) { | ||||
|                         log.error("Error rendering Labyrinth", e); | ||||
|                         log.error("Error rendering Maze", e); | ||||
|                         exchange.setStatusCode(StatusCodes.INTERNAL_SERVER_ERROR) | ||||
|                                 .setReasonPhrase(StatusCodes.INTERNAL_SERVER_ERROR_STRING) | ||||
|                                 .getResponseSender() | ||||
|                                 .send("Error creating the Labyrinth. Please contact the administrator. Request id=%s".formatted(MDC.get("correlationId"))); | ||||
|                                 .send("Error creating the maze. Please contact the administrator. Request id=%s".formatted(MDC.get("correlationId"))); | ||||
|                         return; | ||||
|                     } | ||||
|                     final long durationMillis = start.until(Instant.now(), ChronoUnit.MILLIS); | ||||
|                     exchange.getResponseHeaders() | ||||
|                             .put(Headers.CONTENT_TYPE, outputType.getContentType()) | ||||
|                             .put(HttpString.tryFromString("X-Labyrinth-ID"), String.valueOf(labyrinth.getRandomSeed())) | ||||
|                             .put(HttpString.tryFromString("X-Labyrinth-Width"), String.valueOf(labyrinth.getWidth())) | ||||
|                             .put(HttpString.tryFromString("X-Labyrinth-Height"), String.valueOf(labyrinth.getHeight())) | ||||
|                             .put(HttpString.tryFromString("X-Labyrinth-Generation-Duration-millis"), String.valueOf(durationMillis)); | ||||
|                             .put(HttpString.tryFromString("X-Maze-ID"), String.valueOf(maze.getRandomSeed())) | ||||
|                             .put(HttpString.tryFromString("X-Maze-Width"), String.valueOf(maze.getWidth())) | ||||
|                             .put(HttpString.tryFromString("X-Maze-Height"), String.valueOf(maze.getHeight())) | ||||
|                             // TODO read the algorithm from the maze once this is supported. | ||||
|                             .put(HttpString.tryFromString("X-Maze-Algorithm"), "RandomDepthFirst") | ||||
|                             .put(HttpString.tryFromString("X-Maze-Generation-Duration-millis"), String.valueOf(durationMillis)); | ||||
|                     if (outputType.isAttachment()) { | ||||
|                         exchange.getResponseHeaders() | ||||
|                                 .put(Headers.CONTENT_DISPOSITION, "attachment; filename=\"labyrinth-%dx%d-%d.%s\"".formatted( | ||||
|                                         labyrinth.getWidth(), | ||||
|                                         labyrinth.getHeight(), | ||||
|                                         labyrinth.getRandomSeed(), | ||||
|                                 .put(Headers.CONTENT_DISPOSITION, "attachment; filename=\"maze-%dx%d-%d.%s\"".formatted( | ||||
|                                         maze.getWidth(), | ||||
|                                         maze.getHeight(), | ||||
|                                         maze.getRandomSeed(), | ||||
|                                         outputType.getFileExtension() | ||||
|                                 )); | ||||
|                     } | ||||
|  | @ -70,7 +72,7 @@ public class CreateHandler extends AbstractHttpHandler { | |||
|     } | ||||
| 
 | ||||
|     @NonNull | ||||
|     private Try<Tuple2<OutputType, Labyrinth>> createLabyrinthFromRequestParameters(final Map<String, Deque<String>> queryParameters) { | ||||
|         return new ParametersToLabyrinthExtractor(queryParameters).createLabyrinth(); | ||||
|     private Try<Tuple2<OutputType, Maze>> createMazeFromRequestParameters(final Map<String, Deque<String>> queryParameters) { | ||||
|         return new ParametersToMazeExtractor(queryParameters).createMaze(); | ||||
|     } | ||||
| } | ||||
|  | @ -1,28 +1,29 @@ | |||
| package ch.fritteli.labyrinth.server.handler; | ||||
| package ch.fritteli.maze.server.handler; | ||||
| 
 | ||||
| import ch.fritteli.labyrinth.generator.Generator; | ||||
| import ch.fritteli.labyrinth.generator.model.Labyrinth; | ||||
| import ch.fritteli.labyrinth.generator.model.Position; | ||||
| import ch.fritteli.labyrinth.server.OutputType; | ||||
| import ch.fritteli.maze.server.OutputType; | ||||
| import ch.fritteli.maze.generator.algorithm.RandomDepthFirst; | ||||
| import ch.fritteli.maze.generator.model.Maze; | ||||
| import ch.fritteli.maze.generator.model.Position; | ||||
| import io.vavr.Tuple; | ||||
| import io.vavr.Tuple2; | ||||
| import io.vavr.collection.Stream; | ||||
| import io.vavr.control.Option; | ||||
| import io.vavr.control.Try; | ||||
| import java.util.Deque; | ||||
| import java.util.Map; | ||||
| import java.util.Random; | ||||
| import lombok.NonNull; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| 
 | ||||
| import java.util.Deque; | ||||
| import java.util.Map; | ||||
| import java.util.Random; | ||||
| 
 | ||||
| @RequiredArgsConstructor | ||||
| class ParametersToLabyrinthExtractor { | ||||
| class ParametersToMazeExtractor { | ||||
| 
 | ||||
|     @NonNull | ||||
|     private final Map<String, Deque<String>> queryParameters; | ||||
| 
 | ||||
|     @NonNull | ||||
|     Try<Tuple2<OutputType, Labyrinth>> createLabyrinth() { | ||||
|     Try<Tuple2<OutputType, Maze>> createMaze() { | ||||
|         final Option<OutputType> output = getParameterValue(RequestParameter.OUTPUT); | ||||
|         final Option<Integer> width = getParameterValue(RequestParameter.WIDTH); | ||||
|         final Option<Integer> height = getParameterValue(RequestParameter.HEIGHT); | ||||
|  | @ -50,14 +51,14 @@ class ParametersToLabyrinthExtractor { | |||
|         } | ||||
| 
 | ||||
|         return Try.of(() -> { | ||||
|             final Labyrinth labyrinth; | ||||
|             final Maze maze; | ||||
|             if (start.isDefined() && end.isDefined()) { | ||||
|                 labyrinth = new Labyrinth(width.get(), height.get(), id.getOrElse(() -> new Random().nextLong()), start.get(), end.get()); | ||||
|                 maze = new Maze(width.get(), height.get(), id.getOrElse(() -> new Random().nextLong()), start.get(), end.get()); | ||||
|             } else { | ||||
|                 labyrinth = new Labyrinth(width.get(), height.get(), id.getOrElse(() -> new Random().nextLong())); | ||||
|                 maze = new Maze(width.get(), height.get(), id.getOrElse(() -> new Random().nextLong())); | ||||
|             } | ||||
|             new Generator(labyrinth).run(); | ||||
|             return Tuple.of(output.get(), labyrinth); | ||||
|             new RandomDepthFirst(maze).run(); | ||||
|             return Tuple.of(output.get(), maze); | ||||
|         }); | ||||
|     } | ||||
| 
 | ||||
|  | @ -1,16 +1,17 @@ | |||
| package ch.fritteli.labyrinth.server.handler; | ||||
| package ch.fritteli.maze.server.handler; | ||||
| 
 | ||||
| import ch.fritteli.labyrinth.generator.model.Labyrinth; | ||||
| import ch.fritteli.labyrinth.generator.serialization.v1.SerializerDeserializerV1; | ||||
| import ch.fritteli.labyrinth.server.OutputType; | ||||
| import ch.fritteli.maze.server.OutputType; | ||||
| import ch.fritteli.maze.generator.model.Maze; | ||||
| import ch.fritteli.maze.generator.serialization.v1.SerializerDeserializerV1; | ||||
| import io.undertow.server.HttpServerExchange; | ||||
| import io.undertow.util.HeaderValues; | ||||
| import io.undertow.util.Headers; | ||||
| import io.undertow.util.StatusCodes; | ||||
| import java.nio.ByteBuffer; | ||||
| import lombok.NonNull; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| 
 | ||||
| import java.nio.ByteBuffer; | ||||
| 
 | ||||
| @Slf4j | ||||
| public class RenderV1Handler extends AbstractHttpHandler { | ||||
| 
 | ||||
|  | @ -28,13 +29,13 @@ public class RenderV1Handler extends AbstractHttpHandler { | |||
|             final OutputType output = this.getOutputType(httpServerExchange); | ||||
|             final byte[] render; | ||||
|             try { | ||||
|                 final Labyrinth labyrinth = SerializerDeserializerV1.deserialize(bytes); | ||||
|                 render = output.render(labyrinth); | ||||
|                 final Maze maze = SerializerDeserializerV1.deserialize(bytes); | ||||
|                 render = output.render(maze); | ||||
|             } catch (final Exception e) { | ||||
|                 log.error("Error rendering binary labyrinth data", e); | ||||
|                 log.error("Error rendering binary maze data", e); | ||||
|                 httpServerExchange.setStatusCode(StatusCodes.INTERNAL_SERVER_ERROR) | ||||
|                         .getResponseSender() | ||||
|                         .send("Error rendering labyrinth: %s".formatted(e.getMessage())); | ||||
|                         .send("Error rendering maze: %s".formatted(e.getMessage())); | ||||
|                 return; | ||||
|             } | ||||
|             httpServerExchange | ||||
|  | @ -1,16 +1,17 @@ | |||
| package ch.fritteli.labyrinth.server.handler; | ||||
| package ch.fritteli.maze.server.handler; | ||||
| 
 | ||||
| import ch.fritteli.labyrinth.generator.model.Labyrinth; | ||||
| import ch.fritteli.labyrinth.generator.serialization.v2.SerializerDeserializerV2; | ||||
| import ch.fritteli.labyrinth.server.OutputType; | ||||
| import ch.fritteli.maze.server.OutputType; | ||||
| import ch.fritteli.maze.generator.model.Maze; | ||||
| import ch.fritteli.maze.generator.serialization.v2.SerializerDeserializerV2; | ||||
| import io.undertow.server.HttpServerExchange; | ||||
| import io.undertow.util.HeaderValues; | ||||
| import io.undertow.util.Headers; | ||||
| import io.undertow.util.StatusCodes; | ||||
| import java.nio.ByteBuffer; | ||||
| import lombok.NonNull; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| 
 | ||||
| import java.nio.ByteBuffer; | ||||
| 
 | ||||
| @Slf4j | ||||
| public class RenderV2Handler extends AbstractHttpHandler { | ||||
| 
 | ||||
|  | @ -28,13 +29,13 @@ public class RenderV2Handler extends AbstractHttpHandler { | |||
|             final OutputType output = this.getOutputType(httpServerExchange); | ||||
|             final byte[] render; | ||||
|             try { | ||||
|                 final Labyrinth labyrinth = SerializerDeserializerV2.deserialize(bytes); | ||||
|                 render = output.render(labyrinth); | ||||
|                 final Maze maze = SerializerDeserializerV2.deserialize(bytes); | ||||
|                 render = output.render(maze); | ||||
|             } catch (final Exception e) { | ||||
|                 log.error("Error rendering binary labyrinth data", e); | ||||
|                 log.error("Error rendering binary maze data", e); | ||||
|                 httpServerExchange.setStatusCode(StatusCodes.INTERNAL_SERVER_ERROR) | ||||
|                         .getResponseSender() | ||||
|                         .send("Error rendering labyrinth: %s".formatted(e.getMessage())); | ||||
|                         .send("Error rendering maze: %s".formatted(e.getMessage())); | ||||
|                 return; | ||||
|             } | ||||
|             httpServerExchange | ||||
|  | @ -1,20 +1,21 @@ | |||
| package ch.fritteli.labyrinth.server.handler; | ||||
| package ch.fritteli.maze.server.handler; | ||||
| 
 | ||||
| import ch.fritteli.labyrinth.generator.model.Position; | ||||
| import ch.fritteli.labyrinth.server.OutputType; | ||||
| import ch.fritteli.maze.server.OutputType; | ||||
| import ch.fritteli.maze.generator.model.Position; | ||||
| import io.vavr.Tuple2; | ||||
| import io.vavr.collection.HashMap; | ||||
| import io.vavr.collection.HashSet; | ||||
| import io.vavr.collection.Set; | ||||
| import io.vavr.control.Option; | ||||
| import io.vavr.control.Try; | ||||
| import java.util.Deque; | ||||
| import java.util.Map; | ||||
| import java.util.function.Function; | ||||
| import lombok.Getter; | ||||
| import lombok.NonNull; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| 
 | ||||
| import java.util.Deque; | ||||
| import java.util.Map; | ||||
| import java.util.function.Function; | ||||
| 
 | ||||
| @Slf4j | ||||
| enum RequestParameter { | ||||
|     WIDTH(p -> Try.of(() -> Integer.parseInt(p)) | ||||
|  | @ -13,5 +13,5 @@ | |||
|     <root level="info"> | ||||
|         <appender-ref ref="STDOUT"/> | ||||
|     </root> | ||||
|     <logger name="ch.fritteli.labyrinth.*" level="debug"/> | ||||
|     <logger name="ch.fritteli.maze.*" level="debug"/> | ||||
| </configuration> | ||||
|  |  | |||
|  | @ -1,4 +1,4 @@ | |||
| package ch.fritteli.labyrinth.server; | ||||
| package ch.fritteli.maze.server; | ||||
| 
 | ||||
| import org.junit.jupiter.api.BeforeEach; | ||||
| import org.junit.jupiter.api.Test; | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue