Class ApiResponse
- java.lang.Object
-
- io.helidon.integrations.common.rest.ApiJsonParser
-
- io.helidon.integrations.common.rest.ApiResponse
-
- Direct Known Subclasses:
ApiEntityResponse
,ApiOptionalResponse
,ConfigureK8s.Response
,CreateAppRole.Response
,CreateCubbyhole.Response
,CreateKey.Response
,CreateKv1.Response
,CreateKv2.Response
,CreatePolicy.Response
,CreateRole.Response
,CreateTokenRole.Response
,DbConfigure.Response
,DbCreateRole.Response
,DbDelete.Response
,DbDeleteRole.Response
,DeleteAllKv2.Response
,DeleteAppRole.Response
,DeleteCubbyhole.Response
,DeleteKey.Response
,DeleteKv1.Response
,DeleteKv2.Response
,DeleteObject.Response
,DeletePolicy.Response
,DeleteRole.Response
,DeleteSecret.Response
,DeleteTokenRole.Response
,DestroyKv2.Response
,DestroySecretId.Response
,DisableAuth.Response
,DisableEngine.Response
,EnableAuth.Response
,EnableEngine.Response
,GenerateSelfSignedRoot.Response
,PkiRole.Response
,PutObject.Response
,RenameObject.Response
,RevokeAndOrphanToken.Response
,RevokeToken.Response
,UndeleteKv2.Response
,UpdateCubbyhole.Response
,UpdateKeyConfig.Response
,UpdateKv1.Response
public abstract class ApiResponse extends ApiJsonParser
A base for responses without an entity. For responses that may have an entity, useApiOptionalResponse
, for responses that must have an entity, useApiEntityResponse
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ApiResponse.Builder<B extends ApiResponse.Builder<B,T>,T extends ApiResponse>
Abstract fluent API builder to build subclasses ofApiResponse
.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ApiResponse(ApiResponse.Builder<?,?> builder)
Create a new rest response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Headers
headers()
HTTP headers returned in the response.String
requestId()
Request ID that was used.Http.ResponseStatus
status()
HTTP status returned.-
Methods inherited from class io.helidon.integrations.common.rest.ApiJsonParser
isPresent, stringValue, toBoolean, toBytesBase64, toDouble, toInstant, toInt, toList, toLong, toMap, toObject, toString
-
-
-
-
Constructor Detail
-
ApiResponse
protected ApiResponse(ApiResponse.Builder<?,?> builder)
Create a new rest response.- Parameters:
builder
- subclass of builder
-
-
Method Detail
-
headers
public Headers headers()
HTTP headers returned in the response.- Returns:
- HTTP headers
-
status
public Http.ResponseStatus status()
HTTP status returned. In most cases for successful invocation, this should be one of statuses in the200
family. In case the invocation resulted in an error, an exception is thrown instead of returning a response.- Returns:
- status of the response (only if successful)
-
requestId
public String requestId()
Request ID that was used. As this ID may be generated during request, this is the only way to obtain it.- Returns:
- request ID used when invoking the integrated system
-
-