EventHandler Class

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

public final class 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.

List<String> systemEvents()

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

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.

systemEvents

public List<String> systemEvents()

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

Returns:

the systemEvents value.

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