Package de.aristaflow.adept2.util
Class Cleanup.Builder
- java.lang.Object
- 
- de.aristaflow.adept2.util.Cleanup.Builder
 
- 
- 
Constructor SummaryConstructors Constructor Description Builder()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Cleanup.Buildercleaner(Cleaner cleaner)Sets a specific cleaner to be used.Cleanup.Builderdescriptor(String descriptor)Sets the designated string that meaningfully describes this task when used for logging etc.Cleanup.Builderlogger(Logger logger)Sets the logger for messages and/or problems, e. g.Cleanup<RuntimeException>register(Object object)Finishes creating aCleanupfor the given object using the other provided information.<EX extends Exception>
 Cleanup<EX>register(Object object, Class<EX> checkedExceptionType)Finishes creating aCleanupfor the given object using the other provided information.
 
- 
- 
- 
Method Detail- 
cleanerpublic Cleanup.Builder cleaner(Cleaner cleaner) Sets a specific cleaner to be used. Otherwise the default cleaner will be used.- Parameters:
- cleaner- The custom cleaner to be used for clean-up.
- Returns:
- This builder.
 
 - 
descriptorpublic Cleanup.Builder descriptor(String descriptor) Sets the designated string that meaningfully describes this task when used for logging etc. Otherwise the class name of the registered object will be used.- Parameters:
- descriptor- The custom descriptor to be used for logging.
- Returns:
- This builder.
 
 - 
loggerpublic Cleanup.Builder logger(Logger logger) Sets the logger for messages and/or problems, e. g. unexpected exceptions. Otherwise the default logger will be used.- Parameters:
- logger- The custom logger to be used for logging.
- Returns:
- This builder.
 
 - 
registerpublic Cleanup<RuntimeException> register(Object object) Finishes creating aCleanupfor the given object using the other provided information. There will be no transparent pass-through for a checked exception inCleanup.clean().- Parameters:
- object- The object for which to register post-mortem clean-up.
- Returns:
- A new Cleanupallowing to perform post-mortem clean-up.
 
 - 
registerpublic <EX extends Exception> Cleanup<EX> register(Object object, Class<EX> checkedExceptionType) Finishes creating aCleanupfor the given object using the other provided information. There will be transparent pass-through for the provided checked exception type inCleanup.clean().- Parameters:
- object- The object for which to register post-mortem clean-up.
- checkedExceptionType- The exception that is expected by the clean-up. This will be forwarded when manually triggering clean-up.
- Returns:
- A new Cleanupallowing to perform post-mortem clean-up.
 
 
- 
 
-