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.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 forCleanupTask
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 Modifier and Type Field Description protected String
descriptor
A string that meaningfully describes this task when used for logging etc. ornull
.protected Logger
logger
The logger for messages and/or problems, e. g. unexpected exceptions.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractCleanupTask()
Constructs a newCleanupTask.AbstractCleanupTask
with a default descriptor andCleanup's default logger
.protected
AbstractCleanupTask(String descriptor)
Constructs a newCleanupTask.AbstractCleanupTask
with the given custom descriptor andCleanup's default logger
.protected
AbstractCleanupTask(String descriptor, Logger logger)
Constructs a newCleanupTask.AbstractCleanupTask
with the given descriptor and the given logger.protected
AbstractCleanupTask(Logger logger)
Constructs a newCleanupTask.AbstractCleanupTask
with a default descriptor and the given logger.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescriptor()
Gets 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, wait
-
Methods inherited from interface de.aristaflow.adept2.util.CleanupTask
cleanup
-
-
-
-
Constructor Detail
-
AbstractCleanupTask
protected AbstractCleanupTask()
Constructs a newCleanupTask.AbstractCleanupTask
with a default descriptor andCleanup's default logger
.
-
AbstractCleanupTask
protected AbstractCleanupTask(String descriptor)
Constructs a newCleanupTask.AbstractCleanupTask
with the given custom descriptor andCleanup's default logger
.- Parameters:
descriptor
- A string that meaningfully describes this task when used for logging etc. ornull
.
-
AbstractCleanupTask
protected AbstractCleanupTask(Logger logger)
Constructs a newCleanupTask.AbstractCleanupTask
with a default descriptor and the given logger.- Parameters:
logger
- The logger for messages and/or problems, e. g. unexpected exceptions.
-
AbstractCleanupTask
protected AbstractCleanupTask(String descriptor, Logger logger)
Constructs a newCleanupTask.AbstractCleanupTask
with 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 Detail
-
getDescriptor
public String getDescriptor()
Description copied from interface:CleanupTask
Gets a string that meaningfully describes or identifies this task when used in log message etc. Whennull
is returned a descriptor will be automatically determined using#toString()
.- Specified by:
getDescriptor
in interfaceCleanupTask<EX extends Exception>
- Returns:
- A string that meaningfully describes this task when used for logging etc. or
null
.
-
-