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 Summary
Constructors Constructor Description BatchResponse(String boundary, String jwt, TLSClientParameters tlsClientParameters, javax.ws.rs.core.Response response)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBoundary()List<BatchResponseItem>getItems()Parses the latest Response received into a list ofBatchResponseItems.static List<BatchResponseItem>getItems(javax.ws.rs.core.Response response)Parses the given Response into a list ofBatchResponseItems.URIgetMonitor()javax.ws.rs.core.ResponsegetResponse()Gives the last Response received from the Batch service.javax.ws.rs.core.Responsepoll()If asynchronous processing was requested, queries the monitor URI.static javax.ws.rs.core.Responsepoll(URI monitor, String jwt, String boundary, TLSClientParameters tlsClientParameters)If asynchronous processing was requested, queries the monitor URI.
-
-
-
Constructor Detail
-
BatchResponse
public BatchResponse(String boundary, String jwt, TLSClientParameters tlsClientParameters, javax.ws.rs.core.Response response)
-
-
Method Detail
-
poll
public static javax.ws.rs.core.Response poll(URI monitor, String jwt, String boundary, TLSClientParameters tlsClientParameters)
If asynchronous processing was requested, queries the monitor URI.- Parameters:
monitor- monitor URIjwt- authorization JWTboundary- mutipart / mixed boundarytlsClientParameters- (optional) TLS client parameters- Returns:
- the last Response received from the Batch service
-
getItems
public static List<BatchResponseItem> getItems(javax.ws.rs.core.Response response) throws IOException
Parses the given Response into a list ofBatchResponseItems.- 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 javax.ws.rs.core.Response getResponse()
Gives the last Response received from the Batch service.- Returns:
- the last Response received from the Batch service
-
poll
public javax.ws.rs.core.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 ofBatchResponseItems.- Returns:
- the Batch Response parsed as list of
BatchResponseItems - Throws:
IOException- if there are issues when reading the response body
-
-