Coverage Summary for Class: Response (it.polimi.ingsw.Server.Messages.ServerResponses)
Class |
Class, %
|
Method, %
|
Line, %
|
Response |
0%
(0/1)
|
0%
(0/2)
|
0%
(0/3)
|
1 package it.polimi.ingsw.Server.Messages.ServerResponses;
2
3 import it.polimi.ingsw.Server.Messages.Message;
4 import it.polimi.ingsw.Server.Messages.ServerResponses.SupportStructures.StatusCode;
5
6 import java.io.Serial;
7
8 /**
9 * Any message sent by the {@link it.polimi.ingsw.Server.WelcomeServer} or {@link it.polimi.ingsw.Server.LobbyServer} will
10 * inherit this class.
11 */
12 public abstract class Response extends Message {
13 @Serial
14 private static final long serialVersionUID = 301L;
15 private final StatusCode statusCode;
16
17 /**
18 * Construct the response
19 *
20 * @param statusCode the status code of the response
21 */
22 public Response(StatusCode statusCode) {
23 this.statusCode = statusCode;
24 }
25
26 /**
27 * Get the status code of the response
28 *
29 * @return true if the response is positive, false otherwise
30 */
31 public StatusCode getStatusCode() {
32 return statusCode;
33 }
34 }