Refactor response classes to use RequestContext instead of SessionId + request id #220
+1
-2
@@ -8,8 +8,7 @@ public class ErrorResponse extends Response {
|
||||
/**
|
||||
* Construct an error response with a code and message.
|
||||
*
|
||||
* @param sessionId the target session id
|
||||
* @param requestId the originating request id
|
||||
* @param context the RequestContext of the request
|
||||
* @param errorCode a short error code identifying the failure
|
||||
* @param errorMessage a human readable error message
|
||||
*/
|
||||
|
||||
+1
-2
@@ -12,8 +12,7 @@ public class OkResponse extends SuccessResponse {
|
||||
/**
|
||||
* Create a minimal successful response (no body content).
|
||||
*
|
||||
* @param sessionId the target session id
|
||||
* @param requestId the originating request id
|
||||
* @param context the RequestContext of the request
|
||||
*/
|
||||
public OkResponse(RequestContext context) {
|
||||
super(context, ResponseBody.builder().build());
|
||||
|
||||
+1
-2
@@ -12,8 +12,7 @@ public abstract class Response {
|
||||
/**
|
||||
* Create a new {@code Response}.
|
||||
*
|
||||
* @param sessionId the id of the session this response targets
|
||||
* @param requestId the request identifier this response corresponds to
|
||||
* @param context the RequestContext of the request
|
||||
* @param body the structured response body
|
||||
*/
|
||||
protected Response(RequestContext context, ResponseBody body) {
|
||||
|
||||
+1
-2
@@ -13,8 +13,7 @@ public abstract class SuccessResponse extends Response {
|
||||
/**
|
||||
* Create a successful response with the provided body.
|
||||
*
|
||||
* @param sessionId the session id this response targets
|
||||
* @param requestId the originating request id
|
||||
* @param context the RequestContext of the request
|
||||
* @param body the response body
|
||||
*/
|
||||
protected SuccessResponse(RequestContext context, ResponseBody body) {
|
||||
|
||||
Reference in New Issue
Block a user