Package com.vonage.client.common
Class Webhook.Builder
java.lang.Object
com.vonage.client.common.Webhook.Builder
- Enclosing class:
Webhook
Builder for configuring Webhook object.
- Since:
- 7.7.0
-
Method Summary
Modifier and TypeMethodDescription(REQUIRED) The webhook's URL.build()Builds the Webhook object.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.method(HttpMethod method) (REQUIRED) The HTTP request method for this webhook.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.
-
Method Details
-
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
(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
(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
Builds the Webhook object.- Returns:
- A new Webhook instance with this builder's properties.
-