Search code examples
javaazureazure-sdk

Closing a connection made to Azure file share with Java SDK


I am working on developing a file system manager client that connects and do file handling with Azure file share using Java.

By referring Azure docs I could see how a connection is made with the connection string and how the file manipulation is done. But there is no such thing as a connection close step.

I wonder if for Azure, created connections automatically get closed or is the doc missing something? As far as I know, if a connection is made, that needs to be closed after the tasks related with are done.

Help me clarify this.


Solution

  • Considering the SDK is simply a wrapper over HTTP REST API, the moment the operation is complete (i.e. response is received), the connection automatically closes. You don't have to do anything special to close the connection.