Package com.fauna.client
Class ScopedFaunaClient
- java.lang.Object
-
- com.fauna.client.FaunaClient
-
- com.fauna.client.ScopedFaunaClient
-
public final class ScopedFaunaClient extends FaunaClient
ScopedFaunaClient is a subclass of FaunaClient that applies a scope to the client, limiting the actions and requests to the specified scope.
-
-
Field Summary
-
Fields inherited from class com.fauna.client.FaunaClient
DEFAULT_RETRY_STRATEGY, NO_RETRY_STRATEGY
-
-
Constructor Summary
Constructors Constructor Description ScopedFaunaClient(FaunaClient client, FaunaScope scope)
Constructs a new ScopedFaunaClient using the provided FaunaClient and FaunaScope.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestBuilder
getFeedRequestBuilder()
Gets the RequestBuilder for feed requests.java.net.http.HttpClient
getHttpClient()
Gets the HttpClient used by the scoped client.RequestBuilder
getRequestBuilder()
Gets the RequestBuilder for the scoped client.RetryStrategy
getRetryStrategy()
Gets the retry strategy for the scoped client.RequestBuilder
getStreamRequestBuilder()
Gets the RequestBuilder for streaming requests.-
Methods inherited from class com.fauna.client.FaunaClient
asyncFeed, asyncQuery, asyncQuery, asyncQuery, asyncQuery, asyncQuery, asyncQueryPage, asyncStream, asyncStream, feed, feed, getFaunaSecret, getLastTransactionTs, getLogger, getStatsCollector, paginate, paginate, paginate, paginate, poll, query, query, query, query, query, queryPage, stream, stream
-
-
-
-
Constructor Detail
-
ScopedFaunaClient
public ScopedFaunaClient(FaunaClient client, FaunaScope scope)
Constructs a new ScopedFaunaClient using the provided FaunaClient and FaunaScope.- Parameters:
client
- The FaunaClient instance to base the scoped client on.scope
- The FaunaScope defining the scope for this client.
-
-
Method Detail
-
getRetryStrategy
public RetryStrategy getRetryStrategy()
Gets the retry strategy for the scoped client.- Returns:
- The retry strategy used by the client.
-
getHttpClient
public java.net.http.HttpClient getHttpClient()
Gets the HttpClient used by the scoped client.- Returns:
- The HttpClient used for making HTTP requests.
-
getRequestBuilder
public RequestBuilder getRequestBuilder()
Gets the RequestBuilder for the scoped client.- Returns:
- The RequestBuilder used for constructing HTTP requests.
-
getStreamRequestBuilder
public RequestBuilder getStreamRequestBuilder()
Gets the RequestBuilder for streaming requests.- Returns:
- The RequestBuilder used for constructing streaming HTTP requests.
-
getFeedRequestBuilder
public RequestBuilder getFeedRequestBuilder()
Gets the RequestBuilder for feed requests.- Returns:
- The RequestBuilder used for constructing feed HTTP requests.
-
-