Class Webhook.Builder

java.lang.Object
com.vonage.client.common.Webhook.Builder
Enclosing class:
Webhook

public static class Webhook.Builder extends Object
Builder for configuring Webhook object.
Since:
7.7.0
  • Method Details

    • address

      public Webhook.Builder address(String address)
      (REQUIRED) The webhook's URL.
      Parameters:
      address - The address as a string.
      Returns:
      This builder.
    • method

      (REQUIRED) The HTTP request method for this webhook.
      Parameters:
      method - The HTTP method as an enum.
      Returns:
      This builder.
    • connectionTimeout

      public Webhook.Builder connectionTimeout(int connectionTimeout)
      (OPTIONAL) If Vonage can't connect to the webhook URL for this specified amount of time, then Vonage makes one additional attempt to connect to the webhook endpoint. This is an integer value specified in milliseconds. The minimum is 300, maximum 1000 and default is 1000.
      Parameters:
      connectionTimeout - The connection timeout in milliseconds.
      Returns:
      This builder.
    • socketTimeout

      public Webhook.Builder socketTimeout(int socketTimeout)
      (OPTIONAL) If a response from the webhook URL can't be read for this specified amount of time, then Vonage makes one additional attempt to read the webhook endpoint. This is an integer value specified in milliseconds. The minimum is 1000, maximum 5000 and default is 5000.
      Parameters:
      socketTimeout - The socket timeout in milliseconds.
      Returns:
      This builder.
    • build

      public Webhook build()
      Builds the Webhook object.
      Returns:
      A new Webhook instance with this builder's properties.