-
Notifications
You must be signed in to change notification settings - Fork 2.2k
azure-core-amqp: Consolidate getEndpointStates and naming changes. #6523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
3851f19
AmqpConnection implements AutoCloseable. Add getEndpointStates().
conniey 0c6c6a9
AmqpConnection/Link/Session. implements AutoCloseable. Add getEndpoin…
conniey 278ae19
CBSNode implements AutoCloseable.
conniey d299eb3
Delete EndpointStateNotifier. Add ShutdownSignals to Connection.
conniey d71e863
Delete EndpointStateNotifierBase.
conniey 6a4ccce
Update parameter name for MessageConstant.fromValue
conniey c813b11
Move AmqpExceptionHandler into implementation class.
conniey 91bca87
Update documentation in AmqpReceiveLink.
conniey 39633d1
Update CBS -> Cbs.
conniey d6e3a0b
Fix CBSChannel.
conniey 9dfae9c
Add AmqpEndpointStateUtil.
conniey b6ed6c0
Fix ReactorConnection.
conniey a3e203a
Fix errors in updated sender and receiver.
conniey c3cf06d
Fix test errors.
conniey 815c789
Fix close build issue.
conniey 15b2dde
Fix try/catch IOException.
conniey 0bd64d1
Fixing test breaks.
conniey 6de70bd
Fix assertions in test.
conniey 59ebdef
Fixing test issue.
conniey 08837ea
Closing ReactorReceiver on errors or closures in link.
conniey 868a2db
Fix test failures.
conniey 7911c72
Fixing checkstyle issue.
conniey dc5d2e2
Merge branch 'master' of https://github.com/azure/azure-sdk-for-java …
conniey 45fc100
Fixing tests.
conniey b244790
rename connectionStates -> endpointStates
conniey 7b54ace
Fix problem with sends.
conniey 66c5736
Add timeouts to test.
conniey 00c51a7
Fix event position test.
conniey 5297688
Fix tests.
conniey d797d21
Fixing checkstyle issues.
conniey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
40 changes: 0 additions & 40 deletions
40
sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/EndpointStateNotifier.java
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
...ure-core-amqp/src/main/java/com/azure/core/amqp/implementation/AmqpEndpointStateUtil.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| package com.azure.core.amqp.implementation; | ||
|
|
||
| import com.azure.core.amqp.AmqpEndpointState; | ||
| import org.apache.qpid.proton.engine.EndpointState; | ||
|
|
||
| /** | ||
| * Helper class for managing endpoint states from proton-j. | ||
| */ | ||
| class AmqpEndpointStateUtil { | ||
| /** | ||
| * Translates proton-j endpoint states into an AMQP endpoint state. | ||
| * @param state proton-j endpoint state. | ||
| * @return The corresponding {@link AmqpEndpointState}. | ||
| * @throws IllegalArgumentException if {@code state} is not a supported {@link AmqpEndpointState}. | ||
| */ | ||
| static AmqpEndpointState getConnectionState(EndpointState state) { | ||
| switch (state) { | ||
| case ACTIVE: | ||
| return AmqpEndpointState.ACTIVE; | ||
| case UNINITIALIZED: | ||
| return AmqpEndpointState.UNINITIALIZED; | ||
| case CLOSED: | ||
| return AmqpEndpointState.CLOSED; | ||
| default: | ||
| throw new IllegalArgumentException("This endpoint state is not supported. State:" + state); | ||
| } | ||
| } | ||
| } |
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to expand CBS here just like we have done for other types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CbsAuthorizationType is used in the ClaimsBasedSecurityNode class, I thought it would be overkill.