Class ResponseHook

java.lang.Object
com.easypost.hooks.ResponseHook

public class ResponseHook extends Object
  • Constructor Details

    • ResponseHook

      public ResponseHook()
  • Method Details

    • addEventHandler

      public void addEventHandler(Function<ResponseHookResponses,Object> handler)
      Add a function to the list of event handlers.
      Parameters:
      handler - The event handler function to be added.
    • removeEventHandler

      public void removeEventHandler(Function<ResponseHookResponses,Object> handler)
      Remove a function to the list of event handlers.
      Parameters:
      handler - The event handler function to be removed.
    • executeEventHandler

      public void executeEventHandler(ResponseHookResponses datas)
      Execute all the functions from the event handlers.
      Parameters:
      datas - The datas from the hooks.