HttpHubConnectionBuilder Class
- java.
lang. Object - com.
microsoft. signalr. HttpHubConnectionBuilder
- com.
public class HttpHubConnectionBuilder
A builder for configuring HubConnection instances.
Method Summary
Inherited Members
Method Details
build
public HubConnection build()
Builds a new instance of HubConnection.
Returns:
setHttpClientBuilderCallback
public HttpHubConnectionBuilder setHttpClientBuilderCallback(Action1
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.
Parameters:
Returns:
shouldSkipNegotiate
public HttpHubConnectionBuilder 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.
Parameters:
Returns:
withAccessTokenProvider
public HttpHubConnectionBuilder withAccessTokenProvider(Single
Sets the access token provider for the HubConnection.
Parameters:
Returns:
withHandshakeResponseTimeout
public HttpHubConnectionBuilder withHandshakeResponseTimeout(long timeoutInMilliseconds)
Sets the duration the HubConnection should wait for a Handshake Response from the server.
Parameters:
Returns:
withHeader
public HttpHubConnectionBuilder withHeader(String name, String value)
Sets a single header for the HubConnection to send.
Parameters:
Returns:
withHeaders
public HttpHubConnectionBuilder withHeaders(Map
Sets a collection of Headers for the HubConnection to send with every Http request.
Parameters:
Returns:
withHubProtocol
public HttpHubConnectionBuilder withHubProtocol(HubProtocol protocol)
Sets the HubProtocol to be used by the HubConnection.
Parameters:
Returns:
withTransport
public HttpHubConnectionBuilder withTransport(TransportEnum transportEnum)
Sets the transport type to indicate which transport to be used by the HubConnection.
Parameters:
Returns: