Package org.mockserver.exception
Class ExceptionHandling
- java.lang.Object
-
- org.mockserver.exception.ExceptionHandling
-
public class ExceptionHandling extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceExceptionHandling.ThrowingConsumer<T>static interfaceExceptionHandling.ThrowingRunnable
-
Constructor Summary
Constructors Constructor Description ExceptionHandling()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcloseOnFlush(io.netty.channel.Channel ch)Closes the specified channel after all queued write requests are flushed.static booleanconnectionClosedException(Throwable throwable)returns true is the exception was caused by the connection being closedstatic booleanconnectionException(Throwable throwable)static <T> ThandleThrowable(Callable<T> callable)static <T> ThandleThrowable(CompletableFuture<T> future, long timeout, TimeUnit unit)static booleansslHandshakeException(Throwable throwable)static voidswallowThrowable(ExceptionHandling.ThrowingRunnable runnable)
-
-
-
Method Detail
-
handleThrowable
public static <T> T handleThrowable(CompletableFuture<T> future, long timeout, TimeUnit unit)
-
handleThrowable
public static <T> T handleThrowable(Callable<T> callable)
-
swallowThrowable
public static void swallowThrowable(ExceptionHandling.ThrowingRunnable runnable)
-
closeOnFlush
public static void closeOnFlush(io.netty.channel.Channel ch)
Closes the specified channel after all queued write requests are flushed.
-
connectionClosedException
public static boolean connectionClosedException(Throwable throwable)
returns true is the exception was caused by the connection being closed
-
sslHandshakeException
public static boolean sslHandshakeException(Throwable throwable)
-
connectionException
public static boolean connectionException(Throwable throwable)
-
-