/** * Creates a new result for a status code. * * @param status The status code indicating the outcome of the request. * @param <T> The type of the payload conveyed in the result. * @return The result. */ public static <T> TenantResult<T> from(final int status) { return new TenantResult<>(status, null, null); }
/** * Creates a new result for a status code. * * @param status The status code indicating the outcome of the request. * @param <T> The type of the payload conveyed in the result. * @return The result. */ public static <T> TenantResult<T> from(final int status) { return new TenantResult<>(status, null, null); }
/** * Creates a new result for a status code and payload. * * @param status The status code indicating the outcome of the request. * @param payload The payload to convey to the sender of the request. * @param <T> The type of the payload conveyed in the result. * @return The result. */ public static <T> TenantResult<T> from(final int status, final T payload) { return new TenantResult<>(status, payload, null); }
/** * Creates a new result for a status code and payload. * * @param status The status code indicating the outcome of the request. * @param payload The payload to convey to the sender of the request. * @param <T> The type of the payload conveyed in the result. * @return The result. */ public static <T> TenantResult<T> from(final int status, final T payload) { return new TenantResult<>(status, payload, null); }
/** * Creates a new result for a status code and payload. * * @param status The status code indicating the outcome of the request. * @param payload The payload to convey to the sender of the request. * @param <T> The type of the payload conveyed in the result. * @param cacheDirective Restrictions regarding the caching of the payload. * @return The result. */ public static <T> TenantResult<T> from(final int status, final T payload, final CacheDirective cacheDirective) { return new TenantResult<>(status, payload, cacheDirective); } }
/** * Creates a new result for a status code and payload. * * @param status The status code indicating the outcome of the request. * @param payload The payload to convey to the sender of the request. * @param <T> The type of the payload conveyed in the result. * @param cacheDirective Restrictions regarding the caching of the payload. * @return The result. */ public static <T> TenantResult<T> from(final int status, final T payload, final CacheDirective cacheDirective) { return new TenantResult<>(status, payload, cacheDirective); } }