From 77165f2277f40dc9729bfe0e539d31f6692d1bb1 Mon Sep 17 00:00:00 2001 From: mjpt777 Date: Wed, 14 Oct 2020 15:20:46 +0100 Subject: [PATCH] [Java] Javadoc. --- .../io/aeron/exceptions/AeronException.java | 2 +- .../io/aeron/exceptions/TimeoutException.java | 50 +++++++++++++++++-- .../security/AuthenticationException.java | 36 +++++++++++-- 3 files changed, 79 insertions(+), 9 deletions(-) diff --git a/aeron-client/src/main/java/io/aeron/exceptions/AeronException.java b/aeron-client/src/main/java/io/aeron/exceptions/AeronException.java index f8e16c7551..02d8222dd4 100644 --- a/aeron-client/src/main/java/io/aeron/exceptions/AeronException.java +++ b/aeron-client/src/main/java/io/aeron/exceptions/AeronException.java @@ -77,7 +77,7 @@ public AeronException(final String message) /** * Aeron exception with provided cause and {@link Category#ERROR}. * - * @param cause of the error. + * @param cause of the error. */ public AeronException(final Throwable cause) { diff --git a/aeron-client/src/main/java/io/aeron/exceptions/TimeoutException.java b/aeron-client/src/main/java/io/aeron/exceptions/TimeoutException.java index 0c47aa59e0..c08e12fba9 100644 --- a/aeron-client/src/main/java/io/aeron/exceptions/TimeoutException.java +++ b/aeron-client/src/main/java/io/aeron/exceptions/TimeoutException.java @@ -20,35 +20,77 @@ */ public class TimeoutException extends AeronException { + /** + * Default timeout exception of {@link Category#ERROR}. + */ public TimeoutException() { } + /** + * Timeout exception with provided message and {@link Category#ERROR}. + * + * @param message to detail the exception. + */ public TimeoutException(final String message) { super(message); } + /** + * Timeout Aeron exception with provided {@link Category}. + * + * @param category of this exception. + */ public TimeoutException(final Category category) { super(category); } + /** + * Timeout exception with a detailed message and provided {@link Category}. + * + * @param message providing detail on the error. + * @param category of the exception. + */ public TimeoutException(final String message, final Category category) { super(message, category); } - public TimeoutException(final String message, final Throwable cause, final Category category) + /** + * AerTimeouton exception with cause and provided {@link Category}. + * + * @param cause of the error. + * @param category of the exception. + */ + public TimeoutException(final Throwable cause, final Category category) { - super(message, cause, category); + super(cause, category); } - public TimeoutException(final Throwable cause, final Category category) + /** + * Timeout exception with a detailed message, cause, and {@link Category}. + * + * @param message providing detail on the error. + * @param cause of the error. + * @param category of the exception. + */ + public TimeoutException(final String message, final Throwable cause, final Category category) { - super(cause, category); + super(message, cause, category); } + /** + * Constructs a new timeout exception with the a detail message, cause, suppression enabled or disabled, + * writable stack trace enabled or disabled, an {@link Category}. + * + * @param message providing detail on the error. + * @param cause of the error. + * @param enableSuppression is suppression enabled or not. + * @param writableStackTrace is the stack trace writable or not. + * @param category of the exception. + */ protected TimeoutException( final String message, final Throwable cause, diff --git a/aeron-client/src/main/java/io/aeron/security/AuthenticationException.java b/aeron-client/src/main/java/io/aeron/security/AuthenticationException.java index fa550e3fbc..83973bb663 100644 --- a/aeron-client/src/main/java/io/aeron/security/AuthenticationException.java +++ b/aeron-client/src/main/java/io/aeron/security/AuthenticationException.java @@ -22,26 +22,54 @@ */ public class AuthenticationException extends AeronException { + /** + * Default exception of {@link Category#ERROR}. + */ public AuthenticationException() { super(); } + /** + * Authentication exception with provided message and {@link Category#ERROR}. + * + * @param message to detail the exception. + */ public AuthenticationException(final String message) { super(message); } - public AuthenticationException(final String message, final Throwable cause) + /** + * Authentication exception with provided cause and {@link Category#ERROR}. + * + * @param cause of the error. + */ + public AuthenticationException(final Throwable cause) { - super(message, cause); + super(cause); } - public AuthenticationException(final Throwable cause) + /** + * Authentication exception with a detailed message and cause. + * + * @param message providing detail on the error. + * @param cause of the error. + */ + public AuthenticationException(final String message, final Throwable cause) { - super(cause); + super(message, cause); } + /** + * Constructs a new Authentication exception with the a detail message, cause, suppression enabled or disabled, + * and writable stack trace enabled or disabled, in the category {@link Category#ERROR}. + * + * @param message providing detail on the error. + * @param cause of the error. + * @param enableSuppression is suppression enabled or not. + * @param writableStackTrace is the stack trace writable or not. + */ protected AuthenticationException( final String message, final Throwable cause, final boolean enableSuppression, final boolean writableStackTrace) {