close

open override fun close()

Closes all open resources that are associated with the Xenos Client. After this operation, this instance of the Xenos Client may no longer be used, as all connections are no longer usable. This method is idempotent and can therefore be called any number of times without changing its behaviour. It is guaranteed, that after this call all open connections and allocated resources will be closed or released. Although not all implementations have such resources, the method should still always be called (for example, within a Try-With-Resources block or a use method) to cleanly terminate resource usage.

Implementation Note: Closing the open connections and releasing the allocated resources must happen blocking so that the main thread can be safely shut down after this method was called. The difference of this method to AutoCloseable.close is, that it is not permitted to trigger any exceptions within this method.