public class AsyncUtils extends Object
|Constructor and Description
|Modifier and Type
|Method and Description
Builds the PreResponse that stores the error message.
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 user
public 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 stored
Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.