Package io.dapr.client
Interface DaprPreviewClient
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DaprClientGrpc
,DaprClientHttp
public interface DaprPreviewClient extends AutoCloseable
Generic client interface for preview or alpha APIs in Dapr, regardless of GRPC or HTTP.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description reactor.core.publisher.Mono<Map<String,ConfigurationItem>>
getConfiguration(GetConfigurationRequest request)
Retrieve Map of configurations based on a provided configuration request object.reactor.core.publisher.Mono<ConfigurationItem>
getConfiguration(String storeName, String key)
Retrieve a configuration based on a provided key.reactor.core.publisher.Mono<Map<String,ConfigurationItem>>
getConfiguration(String storeName, String... keys)
Retrieve Map of configurations based on a provided variable number of keys.reactor.core.publisher.Mono<ConfigurationItem>
getConfiguration(String storeName, String key, Map<String,String> metadata)
Retrieve a configuration based on a provided key.reactor.core.publisher.Mono<Map<String,ConfigurationItem>>
getConfiguration(String storeName, List<String> keys, Map<String,String> metadata)
Retrieve Map of configurations based on a provided variable number of keys.<T> reactor.core.publisher.Mono<BulkPublishResponse<T>>
publishEvents(BulkPublishRequest<T> request)
Publish multiple events to Dapr in a single request.<T> reactor.core.publisher.Mono<BulkPublishResponse<T>>
publishEvents(String pubsubName, String topicName, String contentType, List<T> events)
Publish multiple events to Dapr in a single request.<T> reactor.core.publisher.Mono<BulkPublishResponse<T>>
publishEvents(String pubsubName, String topicName, String contentType, Map<String,String> requestMetadata, List<T> events)
Publish multiple events to Dapr in a single request.<T> reactor.core.publisher.Mono<BulkPublishResponse<T>>
publishEvents(String pubsubName, String topicName, String contentType, Map<String,String> requestMetadata, T... events)
Publish multiple events to Dapr in a single request.<T> reactor.core.publisher.Mono<BulkPublishResponse<T>>
publishEvents(String pubsubName, String topicName, String contentType, T... events)
Publish multiple events to Dapr in a single request.<T> reactor.core.publisher.Mono<QueryStateResponse<T>>
queryState(QueryStateRequest request, TypeRef<T> type)
Query for states using a query request.<T> reactor.core.publisher.Mono<QueryStateResponse<T>>
queryState(QueryStateRequest request, Class<T> clazz)
Query for states using a query request.<T> reactor.core.publisher.Mono<QueryStateResponse<T>>
queryState(String storeName, Query query, TypeRef<T> type)
Query for states using a query domain object.<T> reactor.core.publisher.Mono<QueryStateResponse<T>>
queryState(String storeName, Query query, Class<T> clazz)
Query for states using a query domain object.<T> reactor.core.publisher.Mono<QueryStateResponse<T>>
queryState(String storeName, Query query, Map<String,String> metadata, TypeRef<T> type)
Query for states using a query domain object.<T> reactor.core.publisher.Mono<QueryStateResponse<T>>
queryState(String storeName, Query query, Map<String,String> metadata, Class<T> clazz)
Query for states using a query domain object.<T> reactor.core.publisher.Mono<QueryStateResponse<T>>
queryState(String storeName, String query, TypeRef<T> type)
Query for states using a query string.<T> reactor.core.publisher.Mono<QueryStateResponse<T>>
queryState(String storeName, String query, Class<T> clazz)
Query for states using a query string.<T> reactor.core.publisher.Mono<QueryStateResponse<T>>
queryState(String storeName, String query, Map<String,String> metadata, TypeRef<T> type)
Query for states using a query string.<T> reactor.core.publisher.Mono<QueryStateResponse<T>>
queryState(String storeName, String query, Map<String,String> metadata, Class<T> clazz)
Query for states using a query string.reactor.core.publisher.Flux<SubscribeConfigurationResponse>
subscribeConfiguration(SubscribeConfigurationRequest request)
Subscribe to the keys for any change.reactor.core.publisher.Flux<SubscribeConfigurationResponse>
subscribeConfiguration(String storeName, String... keys)
Subscribe to the keys for any change.reactor.core.publisher.Flux<SubscribeConfigurationResponse>
subscribeConfiguration(String storeName, List<String> keys, Map<String,String> metadata)
Subscribe to the keys for any change.reactor.core.publisher.Mono<UnsubscribeConfigurationResponse>
unsubscribeConfiguration(UnsubscribeConfigurationRequest request)
Subscribe to the keys for any change.reactor.core.publisher.Mono<UnsubscribeConfigurationResponse>
unsubscribeConfiguration(String id, String storeName)
Subscribe to the keys for any change.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
getConfiguration
reactor.core.publisher.Mono<ConfigurationItem> getConfiguration(String storeName, String key)
Retrieve a configuration based on a provided key.- Parameters:
storeName
- Name of the configuration storekey
- key of the configuration item which is to be retrieved- Returns:
- Mono of the Configuration Item
-
getConfiguration
reactor.core.publisher.Mono<ConfigurationItem> getConfiguration(String storeName, String key, Map<String,String> metadata)
Retrieve a configuration based on a provided key.- Parameters:
storeName
- Name of the configuration storekey
- key of the configuration item which is to be retrievedmetadata
- optional metadata- Returns:
- Mono of the Configuration Item
-
getConfiguration
reactor.core.publisher.Mono<Map<String,ConfigurationItem>> getConfiguration(String storeName, String... keys)
Retrieve Map of configurations based on a provided variable number of keys.- Parameters:
storeName
- Name of the configuration storekeys
- keys of the configurations which are to be retrieved- Returns:
- Mono of Map of ConfigurationItems
-
getConfiguration
reactor.core.publisher.Mono<Map<String,ConfigurationItem>> getConfiguration(String storeName, List<String> keys, Map<String,String> metadata)
Retrieve Map of configurations based on a provided variable number of keys.- Parameters:
storeName
- Name of the configuration storekeys
- keys of the configurations which are to be retrievedmetadata
- optional metadata- Returns:
- Mono of Map of ConfigurationItems
-
getConfiguration
reactor.core.publisher.Mono<Map<String,ConfigurationItem>> getConfiguration(GetConfigurationRequest request)
Retrieve Map of configurations based on a provided configuration request object.- Parameters:
request
- request for retrieving Configurations for a list keys- Returns:
- Mono of Map of ConfigurationItems
-
subscribeConfiguration
reactor.core.publisher.Flux<SubscribeConfigurationResponse> subscribeConfiguration(String storeName, String... keys)
Subscribe to the keys for any change.- Parameters:
storeName
- Name of the configuration storekeys
- keys of the configurations which are to be subscribed- Returns:
- Flux of
SubscribeConfigurationResponse
instance
-
subscribeConfiguration
reactor.core.publisher.Flux<SubscribeConfigurationResponse> subscribeConfiguration(String storeName, List<String> keys, Map<String,String> metadata)
Subscribe to the keys for any change.- Parameters:
storeName
- Name of the configuration storekeys
- keys of the configurations which are to be subscribedmetadata
- optional metadata- Returns:
- Flux of
SubscribeConfigurationResponse
instance
-
subscribeConfiguration
reactor.core.publisher.Flux<SubscribeConfigurationResponse> subscribeConfiguration(SubscribeConfigurationRequest request)
Subscribe to the keys for any change.- Parameters:
request
- request for subscribing to any change for the given keys in request- Returns:
- Flux of
SubscribeConfigurationResponse
instance
-
unsubscribeConfiguration
reactor.core.publisher.Mono<UnsubscribeConfigurationResponse> unsubscribeConfiguration(String id, String storeName)
Subscribe to the keys for any change.- Parameters:
id
- subscription id returned by subscribeConfiguration API.storeName
- Name of the configuration store.- Returns:
- Mono of
UnsubscribeConfigurationResponse
instance.
-
unsubscribeConfiguration
reactor.core.publisher.Mono<UnsubscribeConfigurationResponse> unsubscribeConfiguration(UnsubscribeConfigurationRequest request)
Subscribe to the keys for any change.- Parameters:
request
- request for unsubscribing to any change for the given subscription id in request- Returns:
- Mono of
UnsubscribeConfigurationResponse
instance.
-
queryState
<T> reactor.core.publisher.Mono<QueryStateResponse<T>> queryState(String storeName, String query, Map<String,String> metadata, Class<T> clazz)
Query for states using a query string.- Type Parameters:
T
- The Type of the return, use byte[] to skip serialization.- Parameters:
storeName
- Name of the state store to query.query
- String value of the query.metadata
- Optional metadata passed to the state store.clazz
- The type needed as return for the call.- Returns:
- A Mono of QueryStateResponse of type T.
-
queryState
<T> reactor.core.publisher.Mono<QueryStateResponse<T>> queryState(String storeName, String query, Map<String,String> metadata, TypeRef<T> type)
Query for states using a query string.- Type Parameters:
T
- The Type of the return, use byte[] to skip serialization.- Parameters:
storeName
- Name of the state store to query.query
- String value of the query.metadata
- Optional metadata passed to the state store.type
- The type needed as return for the call.- Returns:
- A Mono of QueryStateResponse of type T.
-
queryState
<T> reactor.core.publisher.Mono<QueryStateResponse<T>> queryState(String storeName, String query, Class<T> clazz)
Query for states using a query string.- Type Parameters:
T
- The Type of the return, use byte[] to skip serialization.- Parameters:
storeName
- Name of the state store to query.query
- String value of the query.clazz
- The type needed as return for the call.- Returns:
- A Mono of QueryStateResponse of type T.
-
queryState
<T> reactor.core.publisher.Mono<QueryStateResponse<T>> queryState(String storeName, String query, TypeRef<T> type)
Query for states using a query string.- Type Parameters:
T
- The Type of the return, use byte[] to skip serialization.- Parameters:
storeName
- Name of the state store to query.query
- String value of the query.type
- The type needed as return for the call.- Returns:
- A Mono of QueryStateResponse of type T.
-
queryState
<T> reactor.core.publisher.Mono<QueryStateResponse<T>> queryState(String storeName, Query query, Map<String,String> metadata, Class<T> clazz)
Query for states using a query domain object.- Type Parameters:
T
- The Type of the return, use byte[] to skip serialization.- Parameters:
storeName
- Name of the state store to query.query
- Query value domain object.metadata
- Optional metadata passed to the state store.clazz
- The type needed as return for the call.- Returns:
- A Mono of QueryStateResponse of type T.
-
queryState
<T> reactor.core.publisher.Mono<QueryStateResponse<T>> queryState(String storeName, Query query, Map<String,String> metadata, TypeRef<T> type)
Query for states using a query domain object.- Type Parameters:
T
- The Type of the return, use byte[] to skip serialization.- Parameters:
storeName
- Name of the state store to query.query
- Query value domain object.metadata
- Optional metadata passed to the state store.type
- The type needed as return for the call.- Returns:
- A Mono of QueryStateResponse of type T.
-
queryState
<T> reactor.core.publisher.Mono<QueryStateResponse<T>> queryState(String storeName, Query query, Class<T> clazz)
Query for states using a query domain object.- Type Parameters:
T
- The Type of the return, use byte[] to skip serialization.- Parameters:
storeName
- Name of the state store to query.query
- Query value domain object.clazz
- The type needed as return for the call.- Returns:
- A Mono of QueryStateResponse of type T.
-
queryState
<T> reactor.core.publisher.Mono<QueryStateResponse<T>> queryState(String storeName, Query query, TypeRef<T> type)
Query for states using a query domain object.- Type Parameters:
T
- The Type of the return, use byte[] to skip serialization.- Parameters:
storeName
- Name of the state store to query.query
- Query value domain object.type
- The type needed as return for the call.- Returns:
- A Mono of QueryStateResponse of type T.
-
queryState
<T> reactor.core.publisher.Mono<QueryStateResponse<T>> queryState(QueryStateRequest request, Class<T> clazz)
Query for states using a query request.- Type Parameters:
T
- The Type of the return, use byte[] to skip serialization.- Parameters:
request
- Query request object.clazz
- The type needed as return for the call.- Returns:
- A Mono of QueryStateResponse of type T.
-
queryState
<T> reactor.core.publisher.Mono<QueryStateResponse<T>> queryState(QueryStateRequest request, TypeRef<T> type)
Query for states using a query request.- Type Parameters:
T
- The Type of the return, use byte[] to skip serialization.- Parameters:
request
- Query request object.type
- The type needed as return for the call.- Returns:
- A Mono of QueryStateResponse of type T.
-
publishEvents
<T> reactor.core.publisher.Mono<BulkPublishResponse<T>> publishEvents(BulkPublishRequest<T> request)
Publish multiple events to Dapr in a single request.- Type Parameters:
T
- The type of events to publish in the call.- Parameters:
request
-BulkPublishRequest
object.- Returns:
- A Mono of
BulkPublishResponse
object.
-
publishEvents
<T> reactor.core.publisher.Mono<BulkPublishResponse<T>> publishEvents(String pubsubName, String topicName, String contentType, List<T> events)
Publish multiple events to Dapr in a single request.- Type Parameters:
T
- The type of the events to publish in the call.- Parameters:
pubsubName
- the pubsub name we will publish the event to.topicName
- the topicName where the event will be published.events
- theList
of events to be published.contentType
- the content type of the event. Use Mime based types.- Returns:
- the
BulkPublishResponse
containing publish status of each event. The "entryID" field inBulkPublishEntry
inBulkPublishResponseFailedEntry
will be generated based on the order of events in theList
.
-
publishEvents
<T> reactor.core.publisher.Mono<BulkPublishResponse<T>> publishEvents(String pubsubName, String topicName, String contentType, T... events)
Publish multiple events to Dapr in a single request.- Type Parameters:
T
- The type of the events to publish in the call.- Parameters:
pubsubName
- the pubsub name we will publish the event to.topicName
- the topicName where the event will be published.events
- the varargs of events to be published.contentType
- the content type of the event. Use Mime based types.- Returns:
- the
BulkPublishResponse
containing publish status of each event. The "entryID" field inBulkPublishEntry
inBulkPublishResponseFailedEntry
will be generated based on the order of events in theList
.
-
publishEvents
<T> reactor.core.publisher.Mono<BulkPublishResponse<T>> publishEvents(String pubsubName, String topicName, String contentType, Map<String,String> requestMetadata, List<T> events)
Publish multiple events to Dapr in a single request.- Type Parameters:
T
- The type of the events to publish in the call.- Parameters:
pubsubName
- the pubsub name we will publish the event to.topicName
- the topicName where the event will be published.events
- theList
of events to be published.contentType
- the content type of the event. Use Mime based types.requestMetadata
- the metadata to be set at the request level for theBulkPublishRequest
.- Returns:
- the
BulkPublishResponse
containing publish status of each event. The "entryID" field inBulkPublishEntry
inBulkPublishResponseFailedEntry
will be generated based on the order of events in theList
.
-
publishEvents
<T> reactor.core.publisher.Mono<BulkPublishResponse<T>> publishEvents(String pubsubName, String topicName, String contentType, Map<String,String> requestMetadata, T... events)
Publish multiple events to Dapr in a single request.- Type Parameters:
T
- The type of the events to publish in the call.- Parameters:
pubsubName
- the pubsub name we will publish the event to.topicName
- the topicName where the event will be published.events
- the varargs of events to be published.contentType
- the content type of the event. Use Mime based types.requestMetadata
- the metadata to be set at the request level for theBulkPublishRequest
.- Returns:
- the
BulkPublishResponse
containing publish status of each event. The "entryID" field inBulkPublishEntry
inBulkPublishResponseFailedEntry
will be generated based on the order of events in theList
.
-
-