WebPubSubHubProperties Class

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

Implements

public final class WebPubSubHubProperties
implements JsonSerializable<WebPubSubHubProperties>

Properties of a hub.

Constructor Summary

Constructor Description
WebPubSubHubProperties()

Creates an instance of WebPubSubHubProperties class.

Method Summary

Modifier and Type Method and Description
String anonymousConnectPolicy()

Get the anonymousConnectPolicy property: The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny".

List<EventHandler> eventHandlers()

Get the eventHandlers property: Event handler of a hub.

List<EventListener> eventListeners()

Get the eventListeners property: Event listener settings for forwarding your client events to listeners.

static WebPubSubHubProperties fromJson(JsonReader jsonReader)

Reads an instance of WebPubSubHubProperties from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Integer webSocketKeepAliveIntervalInSeconds()

Get the webSocketKeepAliveIntervalInSeconds property: The settings for configuring the WebSocket ping-pong interval in seconds for all clients in the hub.

WebPubSubHubProperties withAnonymousConnectPolicy(String anonymousConnectPolicy)

Set the anonymousConnectPolicy property: The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny".

WebPubSubHubProperties withEventHandlers(List<EventHandler> eventHandlers)

Set the eventHandlers property: Event handler of a hub.

WebPubSubHubProperties withEventListeners(List<EventListener> eventListeners)

Set the eventListeners property: Event listener settings for forwarding your client events to listeners.

WebPubSubHubProperties withWebSocketKeepAliveIntervalInSeconds(Integer webSocketKeepAliveIntervalInSeconds)

Set the webSocketKeepAliveIntervalInSeconds property: The settings for configuring the WebSocket ping-pong interval in seconds for all clients in the hub.

Methods inherited from java.lang.Object

Constructor Details

WebPubSubHubProperties

public WebPubSubHubProperties()

Creates an instance of WebPubSubHubProperties class.

Method Details

anonymousConnectPolicy

public String anonymousConnectPolicy()

Get the anonymousConnectPolicy property: The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny". Default to "deny".

Returns:

the anonymousConnectPolicy value.

eventHandlers

public List<EventHandler> eventHandlers()

Get the eventHandlers property: Event handler of a hub.

Returns:

the eventHandlers value.

eventListeners

public List<EventListener> eventListeners()

Get the eventListeners property: Event listener settings for forwarding your client events to listeners. Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the lifetime of clients. One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of the array elements doesn't matter. Maximum count of event listeners among all hubs is 10.

Returns:

the eventListeners value.

fromJson

public static WebPubSubHubProperties fromJson(JsonReader jsonReader)

Reads an instance of WebPubSubHubProperties from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the WebPubSubHubProperties.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

webSocketKeepAliveIntervalInSeconds

public Integer webSocketKeepAliveIntervalInSeconds()

Get the webSocketKeepAliveIntervalInSeconds property: The settings for configuring the WebSocket ping-pong interval in seconds for all clients in the hub. Valid range: 1 to 120. Default to 20 seconds.

Returns:

the webSocketKeepAliveIntervalInSeconds value.

withAnonymousConnectPolicy

public WebPubSubHubProperties withAnonymousConnectPolicy(String anonymousConnectPolicy)

Set the anonymousConnectPolicy property: The settings for configuring if anonymous connections are allowed for this hub: "allow" or "deny". Default to "deny".

Parameters:

anonymousConnectPolicy - the anonymousConnectPolicy value to set.

Returns:

the WebPubSubHubProperties object itself.

withEventHandlers

public WebPubSubHubProperties withEventHandlers(List<EventHandler> eventHandlers)

Set the eventHandlers property: Event handler of a hub.

Parameters:

eventHandlers - the eventHandlers value to set.

Returns:

the WebPubSubHubProperties object itself.

withEventListeners

public WebPubSubHubProperties withEventListeners(List<EventListener> eventListeners)

Set the eventListeners property: Event listener settings for forwarding your client events to listeners. Event listener is transparent to Web PubSub clients, and it doesn't return any result to clients nor interrupt the lifetime of clients. One event can be sent to multiple listeners, as long as it matches the filters in those listeners. The order of the array elements doesn't matter. Maximum count of event listeners among all hubs is 10.

Parameters:

eventListeners - the eventListeners value to set.

Returns:

the WebPubSubHubProperties object itself.

withWebSocketKeepAliveIntervalInSeconds

public WebPubSubHubProperties withWebSocketKeepAliveIntervalInSeconds(Integer webSocketKeepAliveIntervalInSeconds)

Set the webSocketKeepAliveIntervalInSeconds property: The settings for configuring the WebSocket ping-pong interval in seconds for all clients in the hub. Valid range: 1 to 120. Default to 20 seconds.

Parameters:

webSocketKeepAliveIntervalInSeconds - the webSocketKeepAliveIntervalInSeconds value to set.

Returns:

the WebPubSubHubProperties object itself.

Applies to