Package com.storedobject.common
Interface ResourceOwner
- All Known Implementing Classes:
BlockComboField,EditableObjectListProvider,FileBuffer,IdBuffer,ItemComboField,LocationField,ObjectComboField,ObjectForestProvider,ObjectListField,ObjectListProvider,ObjectTreeProvider,RawSQL,ReferenceLinkListProvider,ResourceHolder
public interface ResourceOwner
Defines an object that owns an auto-closeable resource. Such "resource owners" can be statically registered with the
ResourceDisposal.register(ResourceOwner) method so that the "resource" will be automatically closed when
the owner is garbage-collected. The "resource" should not have any reference to the "owner". Otherwise, the "owner"
will never get garbage-collected.-
Method Summary
Modifier and TypeMethodDescriptionGet the "resource" owned by this "resource owner".
-
Method Details
-
getResource
AutoCloseable getResource()Get the "resource" owned by this "resource owner".- Returns:
- The "resource" owned by this "resource owner".
-