public final class RequestResponseUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Request |
getDeserializeRequest(String skillRequestPayload)
Deserialize the incoming request payload into type
Request . |
static FailureResponse |
getLocalDebugFailureResponse(Request localDebugRequest,
Exception ex)
Builds a failure response for runtime exception encountered when invoking skill code.
|
static SuccessResponse |
getLocalDebugSuccessResponse(Request localDebugRequest,
String skillSuccessResponse)
Builds a success response for response payload obtained when invoking skill code.
|
static String |
getSkillResponse(Request localDebugRequest,
SkillInvokerConfiguration skillInvokerConfiguration)
Invokes skill code with skill request payload.
|
public static FailureResponse getLocalDebugFailureResponse(Request localDebugRequest, Exception ex)
localDebugRequest
- - skill request parameter of type Request
.ex
- - exception object available when skill invocation results in an error.FailureResponse
.public static SuccessResponse getLocalDebugSuccessResponse(Request localDebugRequest, String skillSuccessResponse)
skillSuccessResponse
- - skill response.localDebugRequest
- - skill request parameter of type Request
.SuccessResponse
.public static String getSkillResponse(Request localDebugRequest, SkillInvokerConfiguration skillInvokerConfiguration)
localDebugRequest
- - skill request parameter of type Request
.skillInvokerConfiguration
- - Reflection configuration to invoke skill code.Copyright © 2023. All rights reserved.