Class ResponseHook
java.lang.Object
com.easypost.hooks.ResponseHook
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEventHandler
(Function<ResponseHookResponses, Object> handler) Add a function to the list of event handlers.void
Execute all the functions from the event handlers.void
Remove a function to the list of event handlers.
-
Constructor Details
-
ResponseHook
public ResponseHook()
-
-
Method Details
-
addEventHandler
Add a function to the list of event handlers.- Parameters:
handler
- The event handler function to be added.
-
removeEventHandler
Remove a function to the list of event handlers.- Parameters:
handler
- The event handler function to be removed.
-
executeEventHandler
Execute all the functions from the event handlers.- Parameters:
datas
- The datas from the hooks.
-