HttpHubConnectionBuilder Class


A builder for configuring HubConnection instances.

public class HttpHubConnectionBuilder

Inherited Members

java.lang.Object.clone() java.lang.Object.equals(java.lang.Object) java.lang.Object.finalize() java.lang.Object.getClass() java.lang.Object.hashCode() java.lang.Object.notify() java.lang.Object.notifyAll() java.lang.Object.toString() java.lang.Object.wait() java.lang.Object.wait(long) java.lang.Object.wait(long,int)



Builds a new instance of HubConnection.

setHttpClientBuilderCallback(Action1<OkHttpClient.Builder> configureBuilder)

Sets a method that will be called when constructing the HttpClient to allow customization such as certificate validation, proxies, and cookies. By default the client will have a cookie jar added and a read timeout for LongPolling.

shouldSkipNegotiate(boolean skipNegotiate)

Indicates to the HubConnection that it should skip the negotiate process. Note: This option only works with the Websockets transport and the Azure SignalR Service require the negotiate step.

withAccessTokenProvider(Single<String> accessTokenProvider)

Sets the access token provider for the HubConnection.

withHandshakeResponseTimeout(long timeoutInMilliseconds)

Sets the duration the HubConnection should wait for a Handshake Response from the server.

withHeader(String name, String value)

Sets a single header for the HubConnection to send.

withHeaders(Map<String,String> headers)

Sets a collection of Headers for the HubConnection to send with every Http request.

withHubProtocol(HubProtocol protocol)

Sets the HubProtocol to be used by the HubConnection.

withTransport(TransportEnum transportEnum)

Sets the transport type to indicate which transport to be used by the HubConnection.

Applies to