Class Webhook

java.lang.Object
org.iplass.mtp.webhook.Webhook

public class Webhook extends Object
Representing the Webhook to be dispatched.
  • Constructor Details

    • Webhook

      public Webhook()
  • Method Details

    • getHeaders

      public List<WebhookHeader> getHeaders()
      Get the custom headers.
    • setHeaders

      public void setHeaders(List<WebhookHeader> headers)
      Set the custom headers.
      Parameters:
      headers - List of WebhookHeader
    • addHeader

      public void addHeader(WebhookHeader header)
      Add additional custom headers.
      Parameters:
      headers - WebhookHeader object
    • getHttpMethod

      public String getHttpMethod()
      Get the name of the HTTP connection method in use.
    • setHttpMethod

      public void setHttpMethod(String httpMethod)
      Specify the HTTP connection method, if undefined, POST will be used.
      Parameters:
      httpMethod - Method name in uppercase. i.e. POST,GET
    • getContentType

      public String getContentType()
      Get the content Type.
    • setContentType

      public void setContentType(String contentType)
      Set the content Type of the dispatched content.
      Parameters:
      contentType - The value for Content-Type Header
    • getPathAndQuery

      public String getPathAndQuery()
      Get the path and query.
    • setPathAndQuery

      public void setPathAndQuery(String pathAndQuery)
      Set the pathAndQuery. Beware to put "?" appropriately.
      Parameters:
      pathAndQuery - Query content
    • getResponseHandler

      public WebhookResponseHandler getResponseHandler()
      Get the response handler object.
    • setResponseHandler

      public void setResponseHandler(WebhookResponseHandler responseHandler)
      Set the response handler object.
      Parameters:
      responseHandler - WebhookResponseHandler object
    • getPayloadContent

      public String getPayloadContent()
      Get the payload content.
    • setPayloadContent

      public void setPayloadContent(String payloadContent)
      Set the payload content.
      Parameters:
      payloadContent - The payload with the format indicated in Content-Type
    • getEndpoint

      public WebhookEndpoint getEndpoint()
      Get the Destination class WebhookEndpoint object.
    • setEndpoint

      public void setEndpoint(WebhookEndpoint endpoint)
      Set the Destination.
      Parameters:
      endpoint - WebhookEndpoint object