-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EdgeHub: Allow multiplexing client connections over AMQP (#587)
* Add AMQP Downstream Multiplexing support * Amqp Mux changes * Fix link handlers * Cleanup * Get product code to build * Cleanup * Fix tests * Fix tests * Format and cleanup * Fix merge * fix inheritance * Update edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Amqp/CbsNode.cs Co-Authored-By: varunpuranik <[email protected]> * Update edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Amqp/CbsNode.cs Co-Authored-By: varunpuranik <[email protected]> * Remove commented members * Add C2D subscription if not module identity * Fix tests
- Loading branch information
1 parent
c33eaee
commit 93be534
Showing
36 changed files
with
562 additions
and
525 deletions.
There are no files selected for viewing
22 changes: 0 additions & 22 deletions
22
edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Amqp/AmqpAuthentication.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Amqp/ClientConnectionsHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
|
||
namespace Microsoft.Azure.Devices.Edge.Hub.Amqp | ||
{ | ||
using System.Collections.Concurrent; | ||
using Microsoft.Azure.Devices.Edge.Hub.Core; | ||
using Microsoft.Azure.Devices.Edge.Hub.Core.Identity; | ||
using Microsoft.Azure.Devices.Edge.Util; | ||
|
||
class ClientConnectionsHandler : IClientConnectionsHandler | ||
{ | ||
readonly ConcurrentDictionary<string, ClientConnectionHandler> connectionHandlers = new ConcurrentDictionary<string, ClientConnectionHandler>(); | ||
readonly IConnectionProvider connectionProvider; | ||
|
||
public ClientConnectionsHandler(IConnectionProvider connectionProvider) | ||
{ | ||
this.connectionProvider = Preconditions.CheckNotNull(connectionProvider, nameof(connectionProvider)); | ||
} | ||
|
||
public IConnectionHandler GetConnectionHandler(IIdentity identity) => | ||
this.connectionHandlers.GetOrAdd(identity.Id, i => new ClientConnectionHandler(identity, this.connectionProvider)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Amqp/IAmqpAuthenticator.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Amqp/IClientConnectionsHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Copyright (c) Microsoft. All rights reserved. | ||
|
||
namespace Microsoft.Azure.Devices.Edge.Hub.Amqp | ||
{ | ||
using Microsoft.Azure.Devices.Edge.Hub.Core.Identity; | ||
|
||
public interface IClientConnectionsHandler | ||
{ | ||
IConnectionHandler GetConnectionHandler(IIdentity identity); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.