public static class ConnectAction.Builder extends java.lang.Object
| Constructor and Description |
|---|
Builder(java.util.Collection<Endpoint> endpoint) |
Builder(Endpoint... endpoint) |
| Modifier and Type | Method and Description |
|---|---|
ConnectAction |
build() |
ConnectAction.Builder |
endpoint(java.util.Collection<Endpoint> endpoint) |
ConnectAction.Builder |
endpoint(Endpoint... endpoint) |
ConnectAction.Builder |
eventMethod(EventMethod eventMethod) |
ConnectAction.Builder |
eventType(EventType eventType) |
ConnectAction.Builder |
eventUrl(java.util.Collection<java.lang.String> eventUrl) |
ConnectAction.Builder |
eventUrl(java.lang.String... eventUrl) |
ConnectAction.Builder |
from(java.lang.String from) |
ConnectAction.Builder |
limit(java.lang.Integer limit) |
ConnectAction.Builder |
machineDetection(MachineDetection machineDetection) |
ConnectAction.Builder |
timeOut(java.lang.Integer timeOut) |
public Builder(java.util.Collection<Endpoint> endpoint)
endpoint - Connect the call to a specific #Endpoint.public ConnectAction.Builder endpoint(java.util.Collection<Endpoint> endpoint)
endpoint - Connect the call to a specific #Endpoint.ConnectAction.Builder to keep building.public ConnectAction.Builder endpoint(Endpoint... endpoint)
endpoint - Connect the call to a specific #Endpoint.ConnectAction.Builder to keep building.public ConnectAction.Builder from(java.lang.String from)
from - A number in E.164 format that identifies the caller.
This must be one of your Nexmo virtual numbers, another value will result in the caller ID being unknown.
ConnectAction.Builder to keep building.public ConnectAction.Builder eventType(EventType eventType)
eventType - Set to EventType.SYNCHRONOUS to:
ConnectAction.Builder to keep building.public ConnectAction.Builder timeOut(java.lang.Integer timeOut)
timeOut - If the call is unanswered, set the number in seconds before Nexmo stops ringing endpoint.
The default value is 60.ConnectAction.Builder to keep building.public ConnectAction.Builder limit(java.lang.Integer limit)
limit - Maximum length of the call in seconds. The default and maximum value is 7200 seconds (2 hours).ConnectAction.Builder to keep building.public ConnectAction.Builder machineDetection(MachineDetection machineDetection)
machineDetection - Configure the behavior when Nexmo detects that a destination is an answerphone.
Set to either:
MachineDetection.CONTINUE Nexmo sends an HTTP request to event_url with the Call event machine
MachineDetection.HANGUP to end the Call
ConnectAction.Builder to keep building.public ConnectAction.Builder eventUrl(java.util.Collection<java.lang.String> eventUrl)
eventUrl - Set the webhook endpoint that Nexmo calls asynchronously on each of the possible Call States.
If eventType is set to synchronous the eventUrl can return an NCCO that overrides the current
NCCO when a timeout occurs.ConnectAction.Builder to keep building.public ConnectAction.Builder eventUrl(java.lang.String... eventUrl)
eventUrl - Set the webhook endpoint that Nexmo calls asynchronously on each of the possible Call States.
If eventType is set to synchronous the eventUrl can return an NCCO that overrides the current
NCCO when a timeout occurs.ConnectAction.Builder to keep building.public ConnectAction.Builder eventMethod(EventMethod eventMethod)
eventMethod - The HTTP method Nexmo uses to make the request to eventUrl. The default value is POST.ConnectAction.Builder to keep building.public ConnectAction build()
ConnectAction object from the stored builder options.