Class ListResponseWriter<T extends ScimResource>

    • 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
      void itemsPerPage​(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.
      void resource​(T scimResource)
      Write the result resource to the output stream immediately.
      void startIndex​(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.
      void totalResults​(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.