/** * Creates a new result for a status code and payload. * * @param status The status code. * @param contentType A media type describing the payload or {@code null} if unknown. * @param payload The payload to include in the result. * @return The result. */ public static BufferResult from(final int status, final String contentType, final Buffer payload) { return new BufferResult(status, contentType, payload); }
/** * Creates a new result for a status code. * * @param status The status code. * @return The result. */ public static BufferResult from(final int status) { return new BufferResult(status, null, null); }
/** * Creates a new result for a status code and a payload. * * @param status The status code. * @param payload The payload to include in the result. * @return The result. */ public static BufferResult from(final int status, final Buffer payload) { return new BufferResult(status, null, payload); }
/** * Creates a new result for a status code and payload. * * @param status The status code. * @param contentType A media type describing the payload or {@code null} if unknown. * @param payload The payload to include in the result. * @return The result. */ public static BufferResult from(final int status, final String contentType, final Buffer payload) { return new BufferResult(status, contentType, payload); }
/** * Creates a new result for a status code. * * @param status The status code. * @return The result. */ public static BufferResult from(final int status) { return new BufferResult(status, null, null); }
/** * Creates a new result for a status code and a payload. * * @param status The status code. * @param payload The payload to include in the result. * @return The result. */ public static BufferResult from(final int status, final Buffer payload) { return new BufferResult(status, null, payload); }