/**
   * Encodes this TransportConfiguration into a buffer.
   *
   * <p>Note that this is only used internally ActiveMQ Artemis.
   *
   * @param buffer the buffer to encode into
   */
  public void encode(final ActiveMQBuffer buffer) {
    buffer.writeString(name);
    buffer.writeString(factoryClassName);

    buffer.writeInt(params == null ? 0 : params.size());

    if (params != null) {
      encodeMap(buffer, params);
    }
    if (extraProps != null) {
      encodeMap(buffer, extraProps);
    }
  }