Add RequestContext to simplify creation of Request which requires SessionId and RequestId #201

Merged
lars.winzer merged 7 commits from feat/request-context-record into main 2026-03-24 18:29:28 +01:00
Showing only changes of commit d1510ddf8e - Show all commits
@@ -2,4 +2,13 @@ package ch.unibas.dmi.dbis.cs108.casono.server.network.parser;
import ch.unibas.dmi.dbis.cs108.casono.server.network.sessions.SessionId; import ch.unibas.dmi.dbis.cs108.casono.server.network.sessions.SessionId;
/**
* Immutable context for a network request.
*
* <p>Contains the originating session's identifier and the request's id. Later used to create
* response.
*
* @param sessionId the identifier of the session that initiated the request
* @param requestId the request's numeric id within the session
*/
public record RequestContext(SessionId sessionId, int requestId) {} public record RequestContext(SessionId sessionId, int requestId) {}