Package org.codehaus.groovy.control
Class Janitor
java.lang.Object
org.codehaus.groovy.control.Janitor
- All Implemented Interfaces:
HasCleanup
An agent that can be used to defer cleanup operations to
a later time. Users much implement the HasCleanup interface.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Invokes cleanup on all registered participants and clears the registry.voidregister(HasCleanup object) Registers a cleanup participant to be closed later.
-
Constructor Details
-
Janitor
public Janitor()
-
-
Method Details
-
register
Registers a cleanup participant to be closed later.- Parameters:
object- the cleanup participant to register
-
cleanup
public void cleanup()Invokes cleanup on all registered participants and clears the registry.- Specified by:
cleanupin interfaceHasCleanup
-