Package org.opennms.plugins.cloud.grpc
Class CloseUtil
- java.lang.Object
-
- org.opennms.plugins.cloud.grpc.CloseUtil
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class CloseUtil extends java.lang.Object implements java.lang.AutoCloseableConvenient way to collect closables and close them at once. Handles Exceptions and null objects.
-
-
Constructor Summary
Constructors Constructor Description CloseUtil()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CloseUtiladd(java.lang.AutoCloseable closeable)voidclose()static voidclose(java.lang.AutoCloseable closable)
-
-
-
Method Detail
-
add
public CloseUtil add(java.lang.AutoCloseable closeable)
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
close
public static void close(java.lang.AutoCloseable closable)
-
-