code: protected void compareTransferParams(Session other) throws ClientException {
          if (!this.authorized || !other.authorized)
              throw new ClientException(ClientException.NOT_AUTHORIZED,
                      "Need to perform authorization first");
  
          // synchronize protection buffer size
          if (this.protectionBufferSize != other.protectionBufferSize) {
              throw new ClientException(ClientException.PBSZ_DIFFER);
          }
          // synchronize type
          if (this.transferType != other.transferType) {
              throw new ClientException(ClientException.TRANSFER_TYPE_DIFFER);
          }
          // synchronize type
          if (this.transferMode != other.transferMode) {
              throw new ClientException(ClientException.TRANSFER_MODE_DIFFER);
          }
      }
docs: defines how to compare parameters: authorized, PBSZ, MODE, TYPE