Package com.microsoft.azure.eventgrid
Interface EventGridClient
-
- All Known Implementing Classes:
EventGridClientImpl
public interface EventGridClientThe interface for EventGridClient class.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringacceptLanguage()Gets Gets or sets the preferred language for the response..StringapiVersion()Gets Version of the API to be used with the client request..booleangenerateClientRequestId()Gets When set to true a unique x-ms-client-request-id value is generated and included in each request.com.microsoft.azure.AzureClientgetAzureClient()Gets theAzureClientused for long running operations.intlongRunningOperationRetryTimeout()Gets Gets or sets the retry timeout in seconds for Long Running Operations.voidpublishEvents(String topicHostname, List<EventGridEvent> events)Publishes a batch of events to an Azure Event Grid topic.rx.Observable<Void>publishEventsAsync(String topicHostname, List<EventGridEvent> events)Publishes a batch of events to an Azure Event Grid topic.com.microsoft.rest.ServiceFuture<Void>publishEventsAsync(String topicHostname, List<EventGridEvent> events, com.microsoft.rest.ServiceCallback<Void> serviceCallback)Publishes a batch of events to an Azure Event Grid topic.rx.Observable<com.microsoft.rest.ServiceResponse<Void>>publishEventsWithServiceResponseAsync(String topicHostname, List<EventGridEvent> events)Publishes a batch of events to an Azure Event Grid topic.com.microsoft.rest.RestClientrestClient()Gets the REST client.StringuserAgent()Gets the User-Agent header for the client.EventGridClientwithAcceptLanguage(String acceptLanguage)Sets Gets or sets the preferred language for the response..EventGridClientwithGenerateClientRequestId(boolean generateClientRequestId)Sets When set to true a unique x-ms-client-request-id value is generated and included in each request.EventGridClientwithLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout)Sets Gets or sets the retry timeout in seconds for Long Running Operations.
-
-
-
Method Detail
-
restClient
com.microsoft.rest.RestClient restClient()
Gets the REST client.- Returns:
- the
RestClientobject.
-
getAzureClient
com.microsoft.azure.AzureClient getAzureClient()
Gets theAzureClientused for long running operations.- Returns:
- the azure client;
-
userAgent
String userAgent()
Gets the User-Agent header for the client.- Returns:
- the user agent string.
-
apiVersion
String apiVersion()
Gets Version of the API to be used with the client request..- Returns:
- the apiVersion value.
-
acceptLanguage
String acceptLanguage()
Gets Gets or sets the preferred language for the response..- Returns:
- the acceptLanguage value.
-
withAcceptLanguage
EventGridClient withAcceptLanguage(String acceptLanguage)
Sets Gets or sets the preferred language for the response..- Parameters:
acceptLanguage- the acceptLanguage value.- Returns:
- the service client itself
-
longRunningOperationRetryTimeout
int longRunningOperationRetryTimeout()
Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30..- Returns:
- the longRunningOperationRetryTimeout value.
-
withLongRunningOperationRetryTimeout
EventGridClient withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout)
Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30..- Parameters:
longRunningOperationRetryTimeout- the longRunningOperationRetryTimeout value.- Returns:
- the service client itself
-
generateClientRequestId
boolean generateClientRequestId()
Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true..- Returns:
- the generateClientRequestId value.
-
withGenerateClientRequestId
EventGridClient withGenerateClientRequestId(boolean generateClientRequestId)
Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true..- Parameters:
generateClientRequestId- the generateClientRequestId value.- Returns:
- the service client itself
-
publishEvents
void publishEvents(String topicHostname, List<EventGridEvent> events)
Publishes a batch of events to an Azure Event Grid topic.- Parameters:
topicHostname- The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.netevents- An array of events to be published to Event Grid.- Throws:
IllegalArgumentException- thrown if parameters fail the validationcom.microsoft.azure.CloudException- thrown if the request is rejected by serverRuntimeException- all other wrapped checked exceptions if the request fails to be sent
-
publishEventsAsync
com.microsoft.rest.ServiceFuture<Void> publishEventsAsync(String topicHostname, List<EventGridEvent> events, com.microsoft.rest.ServiceCallback<Void> serviceCallback)
Publishes a batch of events to an Azure Event Grid topic.- Parameters:
topicHostname- The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.netevents- An array of events to be published to Event Grid.serviceCallback- the async ServiceCallback to handle successful and failed responses.- Returns:
- the
ServiceFutureobject - Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
publishEventsAsync
rx.Observable<Void> publishEventsAsync(String topicHostname, List<EventGridEvent> events)
Publishes a batch of events to an Azure Event Grid topic.- Parameters:
topicHostname- The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.netevents- An array of events to be published to Event Grid.- Returns:
- the
ServiceResponseobject if successful. - Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
publishEventsWithServiceResponseAsync
rx.Observable<com.microsoft.rest.ServiceResponse<Void>> publishEventsWithServiceResponseAsync(String topicHostname, List<EventGridEvent> events)
Publishes a batch of events to an Azure Event Grid topic.- Parameters:
topicHostname- The host name of the topic, e.g. topic1.westus2-1.eventgrid.azure.netevents- An array of events to be published to Event Grid.- Returns:
- the
ServiceResponseobject if successful. - Throws:
IllegalArgumentException- thrown if parameters fail the validation
-
-