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 forCleanupTaskwith 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 StringdescriptorA string that meaningfully describes this task when used for logging etc.protected LoggerloggerThe logger for messages and/or problems, e. g.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractCleanupTask()Constructs 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDescriptor()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.AbstractCleanupTaskwith a default descriptor andCleanup's default logger.
-
AbstractCleanupTask
protected AbstractCleanupTask(String descriptor)
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
protected AbstractCleanupTask(Logger logger)
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
protected AbstractCleanupTask(String descriptor, Logger logger)
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 Detail
-
getDescriptor
public String 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.
-
-