public final class ServiceUtils extends Object
| Constructor and Description |
|---|
ServiceUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
error(io.cdap.cdap.api.service.http.HttpServiceResponder responder,
int status,
String message)
Sends the error response back to client.
|
static void |
notFound(io.cdap.cdap.api.service.http.HttpServiceResponder responder,
String message)
Sends the error response back to client for not Found.
|
static void |
sendJson(io.cdap.cdap.api.service.http.HttpServiceResponder responder,
int status,
String body)
Returns a Json response back to client.
|
static void |
success(io.cdap.cdap.api.service.http.HttpServiceResponder responder,
String message)
Sends the success response back to client.
|
public static final void error(io.cdap.cdap.api.service.http.HttpServiceResponder responder,
int status,
String message)
responder - to respond to the service request.message - to be included as part of the errorpublic static final void notFound(io.cdap.cdap.api.service.http.HttpServiceResponder responder,
String message)
responder - to respond to the service request.message - to be included as part of the errorpublic static final void sendJson(io.cdap.cdap.api.service.http.HttpServiceResponder responder,
int status,
String body)
responder - to respond to the service request.status - code to be returned to client.body - to be sent back to client.public static final void success(io.cdap.cdap.api.service.http.HttpServiceResponder responder,
String message)
responder - to respond to the service request.message - to be included as part of the errorCopyright © 2020 CDAP Licensed under the Apache License, Version 2.0.