Class EventHandler
java.lang.Object
com.azure.communication.callautomation.EventHandler
Event handler for taking care of event related tasks.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CallAutomationEventBase
parseEvent
(String requestBody) Returns the first(or the only) event of request's body.static List<CallAutomationEventBase>
parseEventList
(String requestBody) Returns a list of events from request's body.
-
Constructor Details
-
EventHandler
public EventHandler()
-
-
Method Details
-
parseEventList
Returns a list of events from request's body.- Parameters:
requestBody
- Body of the event request.- Returns:
- a list of CallAutomationEventBase
- Throws:
RuntimeException
- Any exceptions occurs at runtime.
-
parseEvent
Returns the first(or the only) event of request's body.- Parameters:
requestBody
- Body of the event request.- Returns:
- the first(or the only) event if request is not empty, otherwise null is returned.
- Throws:
RuntimeException
- Any exceptions occurs at runtime.
-