[OGUI-1709] Implement token rejection event#2990
Merged
Merged
Conversation
…sending connections in ConnectionManager
…liceO2Group/WebUi into feature/TKN/OGUI-1703/basic-typescript-interfaces
…liceO2Group/WebUi into feature/TKN/OGUI-1703/basic-typescript-interfaces
…ithub.com:AliceO2Group/WebUi into feature/TKN/OGUI-1704/data-serialization-utils
…ub.com:AliceO2Group/WebUi into feature/TKN/OGUI-1705/client-central-basic-stream
…ithub.com:AliceO2Group/WebUi into feature/TKN/OGUI-1703/basic-typescript-interfaces
…ithub.com:AliceO2Group/WebUi into feature/TKN/OGUI-1705/client-central-basic-stream
…ithub.com:AliceO2Group/WebUi into feature/TKN/OGUI-1708/basic-connection-class
….com:AliceO2Group/WebUi into feature/TKN/OGUI-1709/handle-rejecting-token
…OGUI-1709/handle-rejecting-token
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have JIRA issue created
In the scope of this PR I have additionally refactored code structure for command design pattern. I believe it will be the best choice for such duplex communication as:
Connection <- ConnectionManager <- CentralConnection <- central system
Connection -> ConnectionManager -> CentralConnection -> central system
Without it, we could use event emitters, but they would be bad for eventual queues (if needed) and for testing. Moreover, we could merge handlers and commands into one class, but in my opinion it was okay to separate business logic from handler (same as controller/service in http).
Sample flow of connecting and revoking token:

You can see all peer2peer (hardcoded) defined connections and their: target address + direction + status