All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.microsoft.signalr.HubConnectionBuilder Maven / Gradle / Ivy

There is a newer version: 9.0.0-preview.7.24406.2
Show newest version
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

package com.microsoft.signalr;

/**
 * A builder for configuring {@link HubConnection} instances.
 */
public abstract class HubConnectionBuilder {
    /**
     * Creates a new instance of {@link HttpHubConnectionBuilder}.
     *
     * @param url The URL of the SignalR hub to connect to.
     * @return An instance of {@link HttpHubConnectionBuilder}.
     */
    public static HttpHubConnectionBuilder create(String url) {
        if (url == null || url.isEmpty()) {
            throw new IllegalArgumentException("A valid url is required.");
        }
        return new HttpHubConnectionBuilder(url);
    }

    /**
     * Builds a new instance of {@link HubConnection}.
     *
     * @return A new instance of {@link HubConnection}.
     */
    public abstract HubConnection build();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy