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;
     }
   }
 }
 
 
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    close(String correlationId)
    Closes component and frees used resources.
  • Method Details

    • close

      void close(String correlationId) throws ApplicationException
      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.