public class AsyncUtils extends Object
Constructor and Description |
---|
AsyncUtils() |
Modifier and Type | Method and Description |
---|---|
static PreResponse |
buildErrorPreResponse(Throwable throwable)
Builds the PreResponse that stores the error message.
|
static javax.ws.rs.core.Response |
makeJobMetadataResponse(String jobMetadata)
Given a String containing the metadata of an asynchronous job, returns a Response with that metadata as payload.
|
public static javax.ws.rs.core.Response makeJobMetadataResponse(String jobMetadata)
jobMetadata
- The metadata to ship back to the userpublic static PreResponse buildErrorPreResponse(Throwable throwable)
A PreResponse containing just an error has an empty ResultSet, a Schema that uses the AllGranularity as a placeholder granularity, and contains in the ResponseContext the status code for the error response, and an error message.
throwable
- The error that needs to be storedCopyright © 2016–2018 Yahoo! Inc.. All rights reserved.