Class BatchResponse

java.lang.Object
org.apache.syncope.client.lib.batch.BatchResponse

public class BatchResponse extends Object
Encapsulates the Batch response management via CXF Proxy Client.
  • Constructor Details

  • Method Details

    • poll

      public static Response poll(URI monitor, String jwt, String boundary, TLSClientParameters tlsClientParameters)
      If asynchronous processing was requested, queries the monitor URI.
      Parameters:
      monitor - monitor URI
      jwt - authorization JWT
      boundary - mutipart / mixed boundary
      tlsClientParameters - (optional) TLS client parameters
      Returns:
      the last Response received from the Batch service
    • getItems

      public static List<BatchResponseItem> getItems(Response response) throws IOException
      Parses the given Response into a list of BatchResponseItems.
      Parameters:
      response - response to extract items from
      Returns:
      the Batch Response parsed as list of BatchResponseItems
      Throws:
      IOException - if there are issues when reading the response body
    • getBoundary

      public String getBoundary()
    • getMonitor

      public URI getMonitor()
    • getResponse

      public Response getResponse()
      Gives the last Response received from the Batch service.
      Returns:
      the last Response received from the Batch service
    • poll

      public Response poll()
      If asynchronous processing was requested, queries the monitor URI.
      Returns:
      the last Response received from the Batch service
    • getItems

      public List<BatchResponseItem> getItems() throws IOException
      Parses the latest Response received into a list of BatchResponseItems.
      Returns:
      the Batch Response parsed as list of BatchResponseItems
      Throws:
      IOException - if there are issues when reading the response body