withDataPlaneUrl method

RudderConfigBuilder withDataPlaneUrl(
  1. String dataPlaneUrl
)

Sets the data plane URL for sending events.

The data plane URL is the endpoint where all events will be sent. If the URL is empty, null, or malformed, it will fallback to the default URL.

dataPlaneUrl - The data plane URL to use. Returns this RudderConfigBuilder instance for method chaining.

Implementation

RudderConfigBuilder withDataPlaneUrl(String dataPlaneUrl) {
  if (Utils.isEmpty(dataPlaneUrl)) {
    RudderLogger.logError(
        "endPointUri can not be null or empty. Set to default");
    return this;
  }
  if (!Utils.isValidUrl(dataPlaneUrl)) {
    RudderLogger.logError("Malformed endPointUri. Set to default");
    return this;
  }
  __dataPlaneUrl = dataPlaneUrl;
  return this;
}