Class EventGridSenderAsyncClient
java.lang.Object
com.azure.messaging.eventgrid.namespaces.EventGridSenderAsyncClient
Initializes a new instance of the asynchronous EventGridSenderClient type.
-
Method Summary
Modifier and TypeMethodDescriptionGets the topicName for this client.send(com.azure.core.models.CloudEvent event) Publish a single Cloud Event to a namespace topic.Publish a batch of Cloud Events to a namespace topic.sendWithResponse(com.azure.core.models.CloudEvent event, com.azure.core.http.rest.RequestOptions requestOptions) Publish a single Cloud Event to a namespace topic.sendWithResponse(List<com.azure.core.models.CloudEvent> events, com.azure.core.http.rest.RequestOptions requestOptions) Publish a batch of Cloud Events to a namespace topic.
-
Method Details
-
send
Publish a single Cloud Event to a namespace topic.- Parameters:
event- Single Cloud Event being published.- Returns:
- the result of the Publish operation on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
sendWithResponse
public Mono<com.azure.core.http.rest.Response<Void>> sendWithResponse(com.azure.core.models.CloudEvent event, com.azure.core.http.rest.RequestOptions requestOptions) Publish a single Cloud Event to a namespace topic.- Parameters:
event- Single Cloud Event being published.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the result of the Publish operation on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
send
Publish a batch of Cloud Events to a namespace topic.- Parameters:
events- Array of Cloud Events being published.- Returns:
- the result of the Publish operation on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
sendWithResponse
public Mono<com.azure.core.http.rest.Response<Void>> sendWithResponse(List<com.azure.core.models.CloudEvent> events, com.azure.core.http.rest.RequestOptions requestOptions) Publish a batch of Cloud Events to a namespace topic.- Parameters:
events- Array of Cloud Events being published.requestOptions- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the result of the Publish operation on successful completion of
Mono. - Throws:
IllegalArgumentException- thrown if parameters fail the validation.com.azure.core.exception.HttpResponseException- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException- thrown if the request is rejected by server on status code 409.RuntimeException- all other wrapped checked exceptions if the request fails to be sent.
-
getTopicName
Gets the topicName for this client.- Returns:
- the topic name.
-