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 String
getBoundary()
List<BatchResponseItem>
getItems()
Parses the latest Response received into a list ofBatchResponseItem
s.static List<BatchResponseItem>
getItems(javax.ws.rs.core.Response response)
Parses the given Response into a list ofBatchResponseItem
s.URI
getMonitor()
javax.ws.rs.core.Response
getResponse()
Gives the last Response received from the Batch service.javax.ws.rs.core.Response
poll()
If asynchronous processing was requested, queries the monitor URI.static javax.ws.rs.core.Response
poll(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 ofBatchResponseItem
s.- Parameters:
response
- response to extract items from- Returns:
- the Batch Response parsed as list of
BatchResponseItem
s - 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 ofBatchResponseItem
s.- Returns:
- the Batch Response parsed as list of
BatchResponseItem
s - Throws:
IOException
- if there are issues when reading the response body
-
-