Package org.pipservices3.commons.run
Class Closer
java.lang.Object
org.pipservices3.commons.run.Closer
Helper class that closes previously opened components.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Closer
public Closer()
-
-
Method Details
-
closeOne
Closes specific component.To be closed components must implement ICloseable interface. If they don't the call to this method has no effect.
- Parameters:
correlationId
- (optional) transaction id to trace execution through call chain.component
- the component that is to be closed.- Throws:
ApplicationException
- when error or null no errors occured.- See Also:
-
close
public static void close(String correlationId, Iterable<Object> components) throws ApplicationException Closes multiple components.To be closed components must implement ICloseable interface. If they don't the call to this method has no effect.
- Parameters:
correlationId
- (optional) transaction id to trace execution through call chain.components
- the list of components that are to be closed.- Throws:
ApplicationException
- when error or null no errors occured.- See Also:
-