EventHubEndpoint Class

public final class EventHubEndpoint
extends EventListenerEndpoint

An Event Hub endpoint. The managed identity of Web PubSub service must be enabled, and the identity should have the "Azure Event Hubs Data sender" role to access Event Hub.

Constructor Summary

Constructor Description
EventHubEndpoint()

Creates an instance of EventHubEndpoint class.

Method Summary

Modifier and Type Method and Description
String eventHubName()

Get the eventHubName property: The name of the Event Hub.

static EventHubEndpoint fromJson(JsonReader jsonReader)

Reads an instance of EventHubEndpoint from the JsonReader.

String fullyQualifiedNamespace()

Get the fullyQualifiedNamespace property: The fully qualified namespace name of the Event Hub resource.

JsonWriter toJson(JsonWriter jsonWriter)
EventListenerEndpointDiscriminator type()

Get the type property: The type property.

void validate()

Validates the instance.

EventHubEndpoint withEventHubName(String eventHubName)

Set the eventHubName property: The name of the Event Hub.

EventHubEndpoint withFullyQualifiedNamespace(String fullyQualifiedNamespace)

Set the fullyQualifiedNamespace property: The fully qualified namespace name of the Event Hub resource.

Methods inherited from EventListenerEndpoint

Methods inherited from java.lang.Object

Constructor Details

EventHubEndpoint

public EventHubEndpoint()

Creates an instance of EventHubEndpoint class.

Method Details

eventHubName

public String eventHubName()

Get the eventHubName property: The name of the Event Hub.

Returns:

the eventHubName value.

fromJson

public static EventHubEndpoint fromJson(JsonReader jsonReader)

Reads an instance of EventHubEndpoint from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of EventHubEndpoint if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

fullyQualifiedNamespace

public String fullyQualifiedNamespace()

Get the fullyQualifiedNamespace property: The fully qualified namespace name of the Event Hub resource. For example, "example.servicebus.windows.net".

Returns:

the fullyQualifiedNamespace value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

EventHubEndpoint.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public EventListenerEndpointDiscriminator type()

Get the type property: The type property.

Overrides:

EventHubEndpoint.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

EventHubEndpoint.validate()

withEventHubName

public EventHubEndpoint withEventHubName(String eventHubName)

Set the eventHubName property: The name of the Event Hub.

Parameters:

eventHubName - the eventHubName value to set.

Returns:

the EventHubEndpoint object itself.

withFullyQualifiedNamespace

public EventHubEndpoint withFullyQualifiedNamespace(String fullyQualifiedNamespace)

Set the fullyQualifiedNamespace property: The fully qualified namespace name of the Event Hub resource. For example, "example.servicebus.windows.net".

Parameters:

fullyQualifiedNamespace - the fullyQualifiedNamespace value to set.

Returns:

the EventHubEndpoint object itself.

Applies to