Class EventGridSenderClient

java.lang.Object
com.azure.messaging.eventgrid.namespaces.EventGridSenderClient

public final class EventGridSenderClient extends Object
Initializes a new instance of the synchronous EventGridSenderClient type.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the topicName for this client.
    void
    send(com.azure.core.models.CloudEvent event)
    Publish a single Cloud Event to a namespace topic.
    void
    send(List<com.azure.core.models.CloudEvent> events)
    Publish a batch of Cloud Events to a namespace topic.
    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.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • send

      public void send(com.azure.core.models.CloudEvent event)
      Publish a single Cloud Event to a namespace topic.
      Parameters:
      event - Single Cloud Event being published.
      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 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 - Array of Cloud Events being published.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      The Response of the send operation.
      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

      public void send(List<com.azure.core.models.CloudEvent> events)
      Publish a batch of Cloud Events to a namespace topic.
      Parameters:
      events - Array of Cloud Events being published.
      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 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 Response of the send operation.
      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

      public String getTopicName()
      Gets the topicName for this client.
      Returns:
      the topic name.