Package com.mastfrog.acteur
Class Closables
java.lang.Object
com.mastfrog.acteur.Closables
A registry of resources (for example, streams or JDBC objects) which should
be closed if the connection terminates while a response is being processed.
It is common to, say, open a result set, and then drizzle it out one row at a
time; if the client closes the connection, registering the object with the
Closables instance tied to this request guarantees it is closed if the
channel is.
- Author:
- Tim Boudreau
-
Method Summary
Modifier and TypeMethodDescriptionfinal Closablesfinal <T,R extends CompletionStage<T>>
Radd(R fut) final <T extends AutoCloseable>
Tadd(T closable) booleanisClosed()toString()