org.infinispan.client.rest.RestRawClient Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of infinispan-client-rest-jakarta Show documentation
Show all versions of infinispan-client-rest-jakarta Show documentation
Infinispan REST Client Jakarta
package org.infinispan.client.rest;
import java.io.Closeable;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletionStage;
/**
* Client to execute arbitrary requests on the server.
* The URL to be called is the scheme, host and port configured in the {@link org.infinispan.client.rest.configuration.RestClientConfigurationBuilder}
* plus the 'path' that should be supplied to the methods of this class.
*
* @author Tristan Tarrant <[email protected]>
* @since 10.0
**/
public interface RestRawClient {
CompletionStage postForm(String path, Map headers, Map> formParameters);
default CompletionStage post(String path) {
return post(path, Collections.emptyMap());
}
CompletionStage postMultipartForm(String url, Map headers, Map> formParameters);
CompletionStage post(String path, String body, String bodyMediaType);
CompletionStage post(String path, Map headers);
CompletionStage post(String path, Map headers, String body, String bodyMediaType);
CompletionStage putValue(String path, Map headers, String body, String bodyMediaType);
default CompletionStage get(String path) {
return get(path, Collections.emptyMap());
}
CompletionStage get(String path, Map headers);
default CompletionStage put(String path) {
return put(path, Collections.emptyMap());
}
CompletionStage put(String path, Map headers);
default CompletionStage delete(String path) {
return delete(path, Collections.emptyMap());
}
CompletionStage delete(String path, Map headers);
CompletionStage options(String path, Map headers);
CompletionStage head(String path, Map headers);
Closeable listen(String url, Map headers, RestEventListener listener);
}