Skip to content

Commit 44d6dfe

Browse files
committed
Make Java component inherit from AutoCloseable
1 parent d146c4d commit 44d6dfe

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

detection/java-component-api/src/main/java/org/mitre/mpf/component/api/MPFComponentInterface.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@
3232
* that all types of components must follow. Currently, the only supported type of component is "DETECTION", so all
3333
* components must implement the
3434
* {@link org.mitre.mpf.component.api.detection.MPFDetectionComponentInterface MPFDetectionComponentInterface}.
35+
* <p>
36+
* Extends {@link AutoCloseable} so that Spring will automatically call {@link #close} on the
37+
* component.
3538
*/
36-
public interface MPFComponentInterface {
39+
public interface MPFComponentInterface extends AutoCloseable {
3740

3841
/**
3942
* Returns the type of component this is.

0 commit comments

Comments
 (0)