-
Notifications
You must be signed in to change notification settings - Fork 2k
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
API review feedback fixes for RuleManager Client #32174
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
import com.azure.messaging.servicebus.administration.ServiceBusAdministrationAsyncClient; | ||
import com.azure.messaging.servicebus.administration.models.CorrelationRuleFilter; | ||
import com.azure.messaging.servicebus.administration.models.CreateRuleOptions; | ||
import com.azure.messaging.servicebus.administration.models.RuleFilter; | ||
import com.azure.messaging.servicebus.administration.models.RuleProperties; | ||
import com.azure.messaging.servicebus.administration.models.SqlRuleAction; | ||
import com.azure.messaging.servicebus.administration.models.SqlRuleFilter; | ||
|
@@ -143,24 +142,6 @@ public Mono<Void> createRule(String ruleName, CreateRuleOptions options) { | |
return createRuleInternal(ruleName, options); | ||
} | ||
|
||
/** | ||
* Creates a rule to the current subscription to filter the messages reaching from topic to the subscription. | ||
* | ||
* @param ruleName Name of rule. | ||
* @param filter The filter expression against which messages will be matched. | ||
* @return A Mono that completes when the rule is created. | ||
* | ||
* @throws NullPointerException if {@code filter}, {@code ruleName} is null. | ||
* @throws IllegalStateException if client is disposed. | ||
* @throws IllegalArgumentException if ruleName is empty string, {@code filter} is not instanceof {@link SqlRuleFilter} or | ||
* {@link CorrelationRuleFilter}. | ||
* @throws ServiceBusException if filter matches {@code ruleName} is already created in subscription. | ||
*/ | ||
public Mono<Void> createRule(String ruleName, RuleFilter filter) { | ||
CreateRuleOptions options = new CreateRuleOptions(filter); | ||
return createRuleInternal(ruleName, options); | ||
} | ||
|
||
/** | ||
* Fetches all rules associated with the topic and subscription. | ||
* | ||
|
@@ -169,7 +150,7 @@ public Mono<Void> createRule(String ruleName, RuleFilter filter) { | |
* @throws IllegalStateException if client is disposed. | ||
* @throws UnsupportedOperationException if client cannot support filter with descriptor in message body. | ||
*/ | ||
public Flux<RuleProperties> getRules() { | ||
public Flux<RuleProperties> listRules() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. when I do this code, refer to .NET SDK, for consistent, I use |
||
if (isDisposed.get()) { | ||
return fluxError(LOGGER, new IllegalStateException( | ||
String.format(INVALID_OPERATION_DISPOSED_RULE_MANAGER, "getRules") | ||
|
@@ -178,7 +159,7 @@ public Flux<RuleProperties> getRules() { | |
|
||
return connectionProcessor | ||
.flatMap(connection -> connection.getManagementNode(entityPath, entityType)) | ||
.flatMapMany(ServiceBusManagementNode::getRules); | ||
.flatMapMany(ServiceBusManagementNode::listRules); | ||
} | ||
|
||
/** | ||
|
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
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
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
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.
Have we shipped this yet? If so, this is a breaking change. Otherwise, it's fine. Same with the rename.
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.
Nope this hasn't been shipped yet. Ww should be good here to make these changes
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.
I only refer to the .NET SDK, it has this overload, I added it as well.