code: public void disconnect(final ComposableBody msg) throws BOSHException {
          if (msg == null) {
              throw(new IllegalArgumentException(
                      "Message body may not be null"));
          }
  
          Builder builder = msg.rebuild();
          builder.setAttribute(Attributes.TYPE, TERMINATE);
          send(builder.build());
      }
docs: End the BOSH session by disconnecting from the remote BOSH connection
  manager, sending the provided content in the final connection
  termination message.
  
  @param msg final message to send
  @throws BOSHException when termination message cannot be sent