Code format (#1957)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -215,7 +215,8 @@ public class RestConfiguration {
|
||||
* @return the entity to be responded containing the exception information as entity.
|
||||
*/
|
||||
@ExceptionHandler(ConstraintViolationException.class)
|
||||
public ResponseEntity<ExceptionInfo> handleConstraintViolationException(final HttpServletRequest request, final ConstraintViolationException ex) {
|
||||
public ResponseEntity<ExceptionInfo> handleConstraintViolationException(final HttpServletRequest request,
|
||||
final ConstraintViolationException ex) {
|
||||
logRequest(request, ex);
|
||||
|
||||
final ExceptionInfo response = new ExceptionInfo();
|
||||
|
||||
@@ -367,6 +367,22 @@ public final class FileStreamingUtil {
|
||||
return total;
|
||||
}
|
||||
|
||||
/**
|
||||
* Listener for progress on artifact file streaming.
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface FileStreamingProgressListener {
|
||||
|
||||
/**
|
||||
* Called multiple times during streaming.
|
||||
*
|
||||
* @param requestedBytes requested bytes of the request
|
||||
* @param shippedBytesSinceLast since the last report
|
||||
* @param shippedBytesOverall during the request
|
||||
*/
|
||||
void progress(long requestedBytes, long shippedBytesSinceLast, long shippedBytesOverall);
|
||||
}
|
||||
|
||||
private static final class ByteRange {
|
||||
|
||||
private static final String MULTIPART_BOUNDARY = "THIS_STRING_SEPARATES_MULTIPART";
|
||||
@@ -442,20 +458,4 @@ public final class FileStreamingUtil {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Listener for progress on artifact file streaming.
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface FileStreamingProgressListener {
|
||||
|
||||
/**
|
||||
* Called multiple times during streaming.
|
||||
*
|
||||
* @param requestedBytes requested bytes of the request
|
||||
* @param shippedBytesSinceLast since the last report
|
||||
* @param shippedBytesOverall during the request
|
||||
*/
|
||||
void progress(long requestedBytes, long shippedBytesSinceLast, long shippedBytesOverall);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user