Class RequestHook

java.lang.Object
com.easypost.hooks.RequestHook

public class RequestHook extends Object
  • Constructor Details

    • RequestHook

      public RequestHook()
  • Method Details

    • addEventHandler

      public void addEventHandler(Function<RequestHookResponses,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<RequestHookResponses,Object> handler)
      Remove a function to the list of event handlers.
      Parameters:
      handler - The event handler function to be removed.
    • executeEventHandler

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