Package kos.api
Class SerializableResponse<T>
java.lang.Object
kos.api.AbstractResponse
kos.api.SerializableResponse<T>
- All Implemented Interfaces:
Response
-
Field Summary
FieldsFields inherited from class kos.api.AbstractResponse
headers, statusCodeFields inherited from interface kos.api.Response
ACCEPTED, BAD_GATEWAY, BAD_REQUEST, CONFLICT, CREATED, FORBIDDEN, GATEWAY_TIMEOUT, GONE, METHOD_NOT_ALLOWED, NO_CONTENT, NOT_ACCEPTABLE, NOT_FOUND, NOT_IMPLEMENTED, SERVICE_UNAVAILABLE, TOO_MANY_REQUESTS, UNAUTHORIZED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSerializableResponse(int statusCode, @NonNull Map<CharSequence, CharSequence> headers, T payload) SerializableResponse(T payload) -
Method Summary
Modifier and TypeMethodDescriptionaddHeader(CharSequence key, CharSequence value) voidsend(KosContext kosContext, io.vertx.core.http.HttpServerResponse response) Methods inherited from class kos.api.AbstractResponse
sendStatusAndHeaderMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface kos.api.Response
headers, headers, statusCode, statusCode
-
Field Details
-
payload
-
-
Constructor Details
-
SerializableResponse
-
SerializableResponse
private SerializableResponse(int statusCode, @NonNull @NonNull Map<CharSequence, CharSequence> headers, T payload)
-
-
Method Details
-
addHeader
-
send
- Specified by:
sendin interfaceResponse- Overrides:
sendin classAbstractResponse
-