Package de.aristaflow.adept2.util
Class CleanupTask.AbstractCleanupTask<EX extends Exception>
java.lang.Object
de.aristaflow.adept2.util.CleanupTask.AbstractCleanupTask<EX>
- Type Parameters:
EX- The checked exception type for transparent pass-through orRuntimeException.
- All Implemented Interfaces:
CleanupTask<EX>
- Direct Known Subclasses:
AbstractHTMLContext.HtmlContextCleanupTask,BufferedRereadableContent.BrcCleanup,CachingIncWorklistUpdate.CachingIncWorklistUpdateCloseTask,CachingRemoteIterator.CachingRemoteIteratorCloseTask,Cleanup.CollCloseTask,Cleanup.CollectionCloseTask,CleanupTask.CloseAndResetTask,LoggingFuture.IgnoredResultLogger,MemoryResultSetImpl.MrsiCleanup,RereadableContent.RrcCleanup,RereadableContentBuilder.RcbCleanup,ResultSetRemoteIterator.ResultSetRemoteIteratorCloseTask,SwtHtmlContext.BrowserCloseTask,SwtUrlContext.BrowserCloseTask,TransformingRemoteIterator.TransformingRemoteIteratorCloseTask
- Enclosing interface:
- CleanupTask<EX extends Exception>
public abstract static class CleanupTask.AbstractCleanupTask<EX extends Exception>
extends Object
implements CleanupTask<EX>
Convenient base class for
CleanupTask with the option to provide a custom descriptor
for the clean-up task and/or a logger.-
Nested Class Summary
Nested classes/interfaces inherited from interface de.aristaflow.adept2.util.CleanupTask
CleanupTask.AbstractCleanupTask<EX extends Exception>, CleanupTask.AtomicCloseTask, CleanupTask.CloseAndResetTask, CleanupTask.MutableCloseTask -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a newCleanupTask.AbstractCleanupTaskwith a default descriptor andCleanup's default logger.protectedAbstractCleanupTask(String descriptor) Constructs a newCleanupTask.AbstractCleanupTaskwith the given custom descriptor andCleanup's default logger.protectedAbstractCleanupTask(String descriptor, Logger logger) Constructs a newCleanupTask.AbstractCleanupTaskwith the given descriptor and the given logger.protectedAbstractCleanupTask(Logger logger) Constructs a newCleanupTask.AbstractCleanupTaskwith a default descriptor and the given logger. -
Method Summary
Modifier and TypeMethodDescriptionGets a string that meaningfully describes or identifies this task when used in log message etc.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.aristaflow.adept2.util.CleanupTask
cleanup
-
Field Details
-
descriptor
A string that meaningfully describes this task when used for logging etc. ornull. -
logger
The logger for messages and/or problems, e. g. unexpected exceptions.
-
-
Constructor Details
-
AbstractCleanupTask
protected AbstractCleanupTask()Constructs a newCleanupTask.AbstractCleanupTaskwith a default descriptor andCleanup's default logger. -
AbstractCleanupTask
Constructs a newCleanupTask.AbstractCleanupTaskwith the given custom descriptor andCleanup's default logger.- Parameters:
descriptor- A string that meaningfully describes this task when used for logging etc. ornull.
-
AbstractCleanupTask
Constructs a newCleanupTask.AbstractCleanupTaskwith a default descriptor and the given logger.- Parameters:
logger- The logger for messages and/or problems, e. g. unexpected exceptions.
-
AbstractCleanupTask
Constructs a newCleanupTask.AbstractCleanupTaskwith the given descriptor and the given logger.- Parameters:
descriptor- A string that meaningfully describes this task when used for logging etc. ornull.logger- The logger for messages and/or problems, e. g. unexpected exceptions.
-
-
Method Details
-
getDescriptor
Description copied from interface:CleanupTaskGets a string that meaningfully describes or identifies this task when used in log message etc. Whennullis returned a descriptor will be automatically determined using#toString().- Specified by:
getDescriptorin interfaceCleanupTask<EX extends Exception>- Returns:
- A string that meaningfully describes this task when used for logging etc. or
null.
-