Package com.inrupt.client.solid
Class SolidClient
java.lang.Object
com.inrupt.client.solid.SolidClient
A high-level client for interacting with Solid resources.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription<T extends Resource>
CompletionStage<T>create(T resource) Create a new Solid Resource.<T extends Resource>
CompletionStage<T>Create a new Solid Resource.Delete an existing Solid Resource.Delete an existing Solid Resource.<T extends Resource>
CompletionStage<Void>delete(T resource) Delete an existing Solid Resource.<T extends Resource>
CompletionStage<Void>Delete an existing Solid Resource.static SolidClientGet theSolidClientfor the current application.static SolidClient.BuilderGet aSolidClient.Builderfor the current application.<T extends Resource>
CompletionStage<T>Read a Solid Resource into a particular defined type.<T extends Resource>
CompletionStage<T>Read a Solid Resource into a particular defined type.<T> CompletionStage<Response<T>>send(Request request, Response.BodyHandler<T> responseBodyHandler) Perform a low-level HTTP request.Create a session-scoped client.<T extends Resource>
CompletionStage<T>update(T resource) Update an existing Solid Resource.<T extends Resource>
CompletionStage<T>Update an existing Solid Resource.
-
Method Details
-
session
Create a session-scoped client.- Parameters:
session- the session- Returns:
- a session-scoped client
-
send
public <T> CompletionStage<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 requestresponseBodyHandler- the body handler- Returns:
- the response
-
read
Read a Solid Resource into a particular defined type.- Type Parameters:
T- the resource type- Parameters:
identifier- the identifierclazz- the desired resource type- Returns:
- the next stage of completion, including the new resource
-
read
public <T extends Resource> CompletionStage<T> read(URI identifier, Headers headers, Class<T> clazz) Read a Solid Resource into a particular defined type.- Type Parameters:
T- the resource type- Parameters:
identifier- the identifierheaders- headers to add to this requestclazz- the desired resource type- Returns:
- the next stage of completion, including the new resource
-
create
Create a new Solid Resource.- Type Parameters:
T- the resource type- Parameters:
resource- the resource- Returns:
- the next stage of completion
-
create
Create a new Solid Resource.- Type Parameters:
T- the resource type- Parameters:
resource- the resourceheaders- headers to add to this request- Returns:
- the next stage of completion
-
update
Update an existing Solid Resource.- Type Parameters:
T- the resource type- Parameters:
resource- the resource- Returns:
- the next stage of completion
-
update
Update an existing Solid Resource.- Type Parameters:
T- the resource type- Parameters:
resource- the resourceheaders- headers to add to this request- Returns:
- the next stage of completion
-
delete
Delete an existing Solid Resource.- Parameters:
resource- the resource URI- Returns:
- the next stage of completion
-
delete
Delete an existing Solid Resource.- Parameters:
resource- the resource URIheaders- headers to add to this request- Returns:
- the next stage of completion
-
delete
Delete an existing Solid Resource.- Type Parameters:
T- the resource type- Parameters:
resource- the resource- Returns:
- the next stage of completion
-
delete
Delete an existing Solid Resource.- Type Parameters:
T- the resource type- Parameters:
resource- the resourceheaders- headers to add to this request- Returns:
- the next stage of completion
-
getClient
Get theSolidClientfor the current application.- Returns:
- the client instance
-
getClientBuilder
Get aSolidClient.Builderfor the current application.- Returns:
- a client builder
-