EventHandler Class

  • java.lang.Object
    • com.azure.resourcemanager.webpubsub.models.EventHandler

Implements

public final class EventHandler
implements JsonSerializable<EventHandler>

Properties of event handler.

Constructor Summary

Constructor Description
EventHandler()

Creates an instance of EventHandler class.

Method Summary

Modifier and Type Method and Description
UpstreamAuthSettings auth()

Get the auth property: Upstream auth settings.

static EventHandler fromJson(JsonReader jsonReader)

Reads an instance of EventHandler from the JsonReader.

List<String> systemEvents()

Get the systemEvents property: Gets or sets the list of system events.

JsonWriter toJson(JsonWriter jsonWriter)
String urlTemplate()

Get the urlTemplate property: Gets or sets the EventHandler URL template.

String userEventPattern()

Get the userEventPattern property: Gets or sets the matching pattern for event names.

void validate()

Validates the instance.

EventHandler withAuth(UpstreamAuthSettings auth)

Set the auth property: Upstream auth settings.

EventHandler withSystemEvents(List<String> systemEvents)

Set the systemEvents property: Gets or sets the list of system events.

EventHandler withUrlTemplate(String urlTemplate)

Set the urlTemplate property: Gets or sets the EventHandler URL template.

EventHandler withUserEventPattern(String userEventPattern)

Set the userEventPattern property: Gets or sets the matching pattern for event names.

Methods inherited from java.lang.Object

Constructor Details

EventHandler

public EventHandler()

Creates an instance of EventHandler class.

Method Details

auth

public UpstreamAuthSettings auth()

Get the auth property: Upstream auth settings. If not set, no auth is used for upstream messages.

Returns:

the auth value.

fromJson

public static EventHandler fromJson(JsonReader jsonReader)

Reads an instance of EventHandler from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of EventHandler 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.

systemEvents

public List<String> systemEvents()

Get the systemEvents property: Gets or sets the list of system events.

Returns:

the systemEvents value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

urlTemplate

public String urlTemplate()

Get the urlTemplate property: Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the template, the value of the EventHandler URL is dynamically calculated when the client request comes in. For example, UrlTemplate can be `http://example.com/api/{hub}/{event}`. The host part can't contains parameters.

Returns:

the urlTemplate value.

userEventPattern

public String userEventPattern()

Get the userEventPattern property: Gets or sets the matching pattern for event names. There are 3 kinds of patterns supported: 1. "*", it matches any event name 2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2" 3. A single event name, for example, "event1", it matches "event1".

Returns:

the userEventPattern value.

validate

public void validate()

Validates the instance.

withAuth

public EventHandler withAuth(UpstreamAuthSettings auth)

Set the auth property: Upstream auth settings. If not set, no auth is used for upstream messages.

Parameters:

auth - the auth value to set.

Returns:

the EventHandler object itself.

withSystemEvents

public EventHandler withSystemEvents(List<String> systemEvents)

Set the systemEvents property: Gets or sets the list of system events.

Parameters:

systemEvents - the systemEvents value to set.

Returns:

the EventHandler object itself.

withUrlTemplate

public EventHandler withUrlTemplate(String urlTemplate)

Set the urlTemplate property: Gets or sets the EventHandler URL template. You can use a predefined parameter {hub} and {event} inside the template, the value of the EventHandler URL is dynamically calculated when the client request comes in. For example, UrlTemplate can be `http://example.com/api/{hub}/{event}`. The host part can't contains parameters.

Parameters:

urlTemplate - the urlTemplate value to set.

Returns:

the EventHandler object itself.

withUserEventPattern

public EventHandler withUserEventPattern(String userEventPattern)

Set the userEventPattern property: Gets or sets the matching pattern for event names. There are 3 kinds of patterns supported: 1. "*", it matches any event name 2. Combine multiple events with ",", for example "event1,event2", it matches event "event1" and "event2" 3. A single event name, for example, "event1", it matches "event1".

Parameters:

userEventPattern - the userEventPattern value to set.

Returns:

the EventHandler object itself.

Applies to