Package org.pipservices3.commons.run
Interface IClosable
- All Known Subinterfaces:
IOpenable
- All Known Implementing Classes:
FixedRateTimer
public interface IClosable
Interface for components that require explicit closure.
For components that require opening as well as closing
use IOpenable
interface instead.
### Example ###
class MyConnector implements ICloseable {
private Object _client = null;
... // The _client can be lazy created
public void close(String correlationId) {
if (this._client != null) {
this._client.close();
this._client = null;
}
}
}
-
Method Summary
-
Method Details
-
close
Closes component and frees used resources.- Parameters:
correlationId
- (optional) transaction id to trace execution through call chain.- Throws:
ApplicationException
- when error or null no errors occured.
-