Allow Handlers to implement Closeable or AutoCloseable for cleanup