code: public ConnectionFactoryBuilder setProtocol(Protocol prot) {
      switch (prot) {
      case TEXT:
        opFact = new AsciiOperationFactory();
        break;
      case BINARY:
        opFact = new BinaryOperationFactory();
        break;
      default:
        assert false : "Unhandled protocol: " + prot;
      }
      return this;
    }
docs: Convenience method to specify the protocol to use.