code: void close()
      {
          doFlush();
  
          // Close all clients created in this session
          if (!clientMap.isEmpty())
          {
              for (Client client : clientMap.values())
              {
                  client.close();
              }
              clientMap.clear();
          }
  
          onClearProxy();
  
          // TODO: Move all nodes tied to this EM into detached state, need to
          // discuss with Amresh.
  
          closed = true;
      }
docs: Close.