Closeablethat are required to be closed.
This interface may be injected onto server-side components using
The service may be used within the scope of a request to add instances
Closeable that are to be closed when the request goes out
of scope, more specifically after the request has been processed and the
response has been returned.
- Marek Potociar, Paul Sandoz
(Closeable c)Register a new instance of
Closeablethat is to be closed when the request goes out of scope.
close()has been called, this method will not accept any new instance registrations and will return
c- the instance of
trueif the closeable service has not been closed yet and the closeable instance was successfully registered with the service,
Closeable#close()method on all instances of
Closeableadded by the
#add(Closeable)method. Subsequent calls of this method should not do anything.