Package com.unboundid.scim2.server
Class ListResponseWriter<T extends ScimResource>
- java.lang.Object
-
- com.unboundid.scim2.server.ListResponseWriter<T>
-
public class ListResponseWriter<T extends ScimResource> extends Object
An interface for writing list/query results using the SCIM ListResponse container to an OutputStream.
-
-
Constructor Summary
Constructors Constructor Description ListResponseWriter(OutputStream outputStream)Create a new ListResponseOutputStream that will write to the provided output stream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiditemsPerPage(int itemsPerPage)Write the itemsPerPage to the output stream immediately if no resources have been streamed, otherwise it will be written after the resources array.voidresource(T scimResource)Write the result resource to the output stream immediately.voidstartIndex(int startIndex)Write the startIndex to the output stream immediately if no resources have been streamed, otherwise it will be written after the resources array.voidtotalResults(int totalResults)Write the totalResults to the output stream immediately if no resources have been streamed, otherwise it will be written after the resources array.
-
-
-
Constructor Detail
-
ListResponseWriter
public ListResponseWriter(@NotNull OutputStream outputStream) throws IOException
Create a new ListResponseOutputStream that will write to the provided output stream.- Parameters:
outputStream- The output stream to write to.- Throws:
IOException- If an exception occurs while writing to the output stream.
-
-
Method Detail
-
startIndex
public void startIndex(int startIndex) throws IOException
Write the startIndex to the output stream immediately if no resources have been streamed, otherwise it will be written after the resources array.- Parameters:
startIndex- The startIndex to write.- Throws:
IOException- If an exception occurs while writing to the output stream.
-
itemsPerPage
public void itemsPerPage(int itemsPerPage) throws IOException
Write the itemsPerPage to the output stream immediately if no resources have been streamed, otherwise it will be written after the resources array.- Parameters:
itemsPerPage- The itemsPerPage to write.- Throws:
IOException- If an exception occurs while writing to the output stream.
-
totalResults
public void totalResults(int totalResults) throws IOException
Write the totalResults to the output stream immediately if no resources have been streamed, otherwise it will be written after the resources array.- Parameters:
totalResults- The totalResults to write.- Throws:
IOException- If an exception occurs while writing to the output stream.
-
resource
public void resource(@Nullable T scimResource) throws IOException
Write the result resource to the output stream immediately.- Parameters:
scimResource- The resource to write.- Throws:
IOException- If an exception occurs while writing to the output stream.
-
-