Package com.microsoft.azure.relay
Class HybridConnectionClient
java.lang.Object
com.microsoft.azure.relay.HybridConnectionClient
- All Implemented Interfaces:
RelayTraceSource
-
Constructor Summary
ConstructorsConstructorDescriptionHybridConnectionClient(String connectionString) Create a new HybridConnectionClient instance for initiating HybridConnections.HybridConnectionClient(String connectionString, String path) Create a new HybridConnectionListener instance for initiating HybridConnections.HybridConnectionClient(URI address) Create a new HybridConnectionClient instance for initiating HybridConnections where no client authentication is required.HybridConnectionClient(URI address, TokenProvider tokenProvider) Create a new HybridConnectionClient instance for initiating HybridConnections with client authentication. -
Method Summary
Modifier and TypeMethodDescriptionEstablishes a new send-side HybridConnection and returns the websocket with established connections.createConnectionAsync(Map<String, List<String>> customHeaders) Establishes a new send-side HybridConnection and returns the websocket with established connections.The address on which this HybridConnection will connect to.voidsetOperationTimeout(Duration operationTimeout) toString()
-
Constructor Details
-
HybridConnectionClient
Create a new HybridConnectionClient instance for initiating HybridConnections where no client authentication is required.- Parameters:
address- The address on which to listen for HybridConnections. This address should be of the format "sb://contoso.servicebus.windows.net/yourhybridconnection".
-
HybridConnectionClient
Create a new HybridConnectionClient instance for initiating HybridConnections with client authentication.- Parameters:
address- The address on which to listen for HybridConnections. This address should be of the format "sb://contoso.servicebus.windows.net/yourhybridconnection".tokenProvider- The TokenProvider for authenticating this HybridConnection client.
-
HybridConnectionClient
Create a new HybridConnectionClient instance for initiating HybridConnections.- Parameters:
connectionString- The connection string to use. This connection string must include the EntityPath property.- Throws:
URISyntaxException- Thrown when the format of the connectionSring is incorrect
-
HybridConnectionClient
Create a new HybridConnectionListener instance for initiating HybridConnections.- Parameters:
connectionString- The connection string to use. This connection string must include the EntityPath property.path- The path to the HybridConnection.- Throws:
URISyntaxException- Thrown when the format of the connectionSring is incorrect
-
-
Method Details
-
getAddress
The address on which this HybridConnection will connect to. This address should be of the format "sb://contoso.servicebus.windows.net/yourhybridconnection". -
getTokenProvider
- Returns:
- Get the TokenProvider for authenticating this HybridConnection listener.
-
getOperationTimeout
- Returns:
- The default timeout for connecting a HybridConnection. Default value is 70 seconds.
-
setOperationTimeout
-
getTrackingContext
- Specified by:
getTrackingContextin interfaceRelayTraceSource
-
toString
- Specified by:
toStringin interfaceRelayTraceSource- Overrides:
toStringin classObject
-
createConnectionAsync
Establishes a new send-side HybridConnection and returns the websocket with established connections.- Returns:
- A CompletableFuture which returns the ClientWebSocket instance when its connection established with the remote endpoint.
-
createConnectionAsync
public CompletableFuture<HybridConnectionChannel> createConnectionAsync(Map<String, List<String>> customHeaders) Establishes a new send-side HybridConnection and returns the websocket with established connections.- Parameters:
customHeaders- Headers to add to the connection HTTP request.- Returns:
- A CompletableFuture which returns the ClientWebSocket instance when its connection established with the remote endpoint.
-