Top Description Fields Constructors Methods
org.glassfish.tyrus.core

public Class ErrorCollector

extends Object
Class Inheritance
Imports
java.util.ArrayList, .List, java.util.logging.Level, .Logger, jakarta.websocket.DeploymentException

Used to collect deployment errors to present these to the user together.
Author
Stepan Kopriva

Field Summary

Modifier and TypeField and Description
private final List<Exception>
private static final Logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addException(Exception
to be collected.
exception
)

Add Exception to the collector.

public DeploymentException

Returns:

comprehensive exception.
composeComprehensiveException
()

Create DeploymentException with message concatenated from collected exceptions.

public boolean

Returns:

true iff no exception was logged, false otherwise.
isEmpty
()

Checks whether any exception has been logged.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

exceptionsToPublishback to summary
private final List<Exception> exceptionsToPublish
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

ErrorCollectorback to summary
public ErrorCollector()

Method Detail

addExceptionback to summary
public void addException(Exception exception)

Add Exception to the collector.

Parameters
exception:Exception

to be collected.

composeComprehensiveExceptionback to summary
public DeploymentException composeComprehensiveException()

Create DeploymentException with message concatenated from collected exceptions.

Returns:DeploymentException

comprehensive exception.

isEmptyback to summary
public boolean isEmpty()

Checks whether any exception has been logged.

Returns:boolean

true iff no exception was logged, false otherwise.