Class SolidSyncClient


  • public class SolidSyncClient
    extends Object
    A high-level synchronous client for interacting with Solid resources.
    • Method Detail

      • session

        public SolidSyncClient session​(Session session)
        Create a session-scoped client.
        Parameters:
        session - the session
        Returns:
        a session-scoped client
      • send

        public <T> Response<T> send​(Request request,
                                    Response.BodyHandler<T> responseBodyHandler)
        Perform a low-level HTTP request.
        Type Parameters:
        T - the response handler type
        Parameters:
        request - the request
        responseBodyHandler - the body handler
        Returns:
        the response
      • read

        public <T extends Resource> T read​(URI identifier,
                                           Class<T> clazz)
        Read a Solid Resource into a particular defined type.
        Type Parameters:
        T - the resource type
        Parameters:
        identifier - the identifier
        clazz - the desired resource type
        Returns:
        the resource
      • create

        public <T extends Resource> T create​(T resource)
        Create a new Solid Resource.
        Type Parameters:
        T - the resource type
        Parameters:
        resource - the resource
        Returns:
        the created resource
      • update

        public <T extends Resource> T update​(T resource)
        Update an existing Solid Resource.
        Type Parameters:
        T - the resource type
        Parameters:
        resource - the resource
        Returns:
        the updated resource
      • delete

        public void delete​(URI resource)
        Delete an existing Solid Resource.
        Parameters:
        resource - the resource URI
      • delete

        public <T extends Resource> void delete​(T resource)
        Delete an existing Solid Resource.
        Type Parameters:
        T - the resource type
        Parameters:
        resource - the resource