-
Notifications
You must be signed in to change notification settings - Fork 241
/
com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.yml
99 lines (99 loc) · 10 KB
/
com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
### YamlMime:JavaType
uid: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient"
fullName: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient"
name: "ServiceBusRuleManagerAsyncClient"
nameWithType: "ServiceBusRuleManagerAsyncClient"
summary: "An **asynchronous** rule manager responsible for managing rules for a specific topic subscription."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public class **ServiceBusRuleManagerAsyncClient**</br> implements <a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html\">AutoCloseable</a>"
methods:
- uid: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.close()"
fullName: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.close()"
name: "close()"
nameWithType: "ServiceBusRuleManagerAsyncClient.close()"
summary: "Disposes of the <xref uid=\"com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusRuleManagerAsyncClient\"></xref>."
syntax: "public void close()"
desc: "Disposes of the <xref uid=\"com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusRuleManagerAsyncClient\"></xref>. If the client has a dedicated connection, the underlying connection is also closed."
- uid: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.createRule(java.lang.String,com.azure.messaging.servicebus.administration.models.CreateRuleOptions)"
fullName: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.createRule(String ruleName, CreateRuleOptions options)"
name: "createRule(String ruleName, CreateRuleOptions options)"
nameWithType: "ServiceBusRuleManagerAsyncClient.createRule(String ruleName, CreateRuleOptions options)"
summary: "Creates a rule to the current subscription to filter the messages reaching from topic to the subscription."
parameters:
- description: "Name of rule."
name: "ruleName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The options for the rule to add."
name: "options"
type: "<xref href=\"com.azure.messaging.servicebus.administration.models.CreateRuleOptions?alt=com.azure.messaging.servicebus.administration.models.CreateRuleOptions&text=CreateRuleOptions\" data-throw-if-not-resolved=\"False\" />"
syntax: "public Mono<Void> createRule(String ruleName, CreateRuleOptions options)"
desc: "Creates a rule to the current subscription to filter the messages reaching from topic to the subscription."
returns:
description: "A Mono that completes when the rule is created."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.deleteRule(java.lang.String)"
fullName: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.deleteRule(String ruleName)"
name: "deleteRule(String ruleName)"
nameWithType: "ServiceBusRuleManagerAsyncClient.deleteRule(String ruleName)"
summary: "Removes the rule on the subscription identified by `ruleName`."
parameters:
- description: "Name of rule to delete."
name: "ruleName"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public Mono<Void> deleteRule(String ruleName)"
desc: "Removes the rule on the subscription identified by `ruleName`."
returns:
description: "A Mono that completes when the rule is deleted."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Mono.html\">Mono</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
- uid: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.getEntityPath()"
fullName: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.getEntityPath()"
name: "getEntityPath()"
nameWithType: "ServiceBusRuleManagerAsyncClient.getEntityPath()"
summary: "Gets the name of the Service Bus resource."
syntax: "public String getEntityPath()"
desc: "Gets the name of the Service Bus resource."
returns:
description: "The name of the Service Bus resource."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.getFullyQualifiedNamespace()"
fullName: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.getFullyQualifiedNamespace()"
name: "getFullyQualifiedNamespace()"
nameWithType: "ServiceBusRuleManagerAsyncClient.getFullyQualifiedNamespace()"
summary: "Gets the fully qualified namespace."
syntax: "public String getFullyQualifiedNamespace()"
desc: "Gets the fully qualified namespace."
returns:
description: "The fully qualified namespace."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.listRules()"
fullName: "com.azure.messaging.servicebus.ServiceBusRuleManagerAsyncClient.listRules()"
name: "listRules()"
nameWithType: "ServiceBusRuleManagerAsyncClient.listRules()"
summary: "Fetches all rules associated with the topic and subscription."
syntax: "public Flux<RuleProperties> listRules()"
desc: "Fetches all rules associated with the topic and subscription."
returns:
description: "A list of rules associated with the topic and subscription."
type: "<a href=\"https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Flux.html\">Flux</a><<xref href=\"com.azure.messaging.servicebus.administration.models.RuleProperties?alt=com.azure.messaging.servicebus.administration.models.RuleProperties&text=RuleProperties\" data-throw-if-not-resolved=\"False\" />>"
type: "class"
desc: "An **asynchronous** rule manager responsible for managing rules for a specific topic subscription. The rule manager requires only Listen claims, whereas the <xref uid=\"com.azure.messaging.servicebus.administration.ServiceBusAdministrationAsyncClient\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusAdministrationAsyncClient\"></xref> requires Manage claims.\n\n**Create an instance of rule manager**\n\n```java\n// The required parameters is connectionString, a way to authenticate with Service Bus using credentials.\n // The connectionString/queueName must be set by the application. The 'connectionString' format is shown below.\n // \"Endpoint={fully-qualified-namespace};SharedAccessKeyName={policy-name};SharedAccessKey={key}\"\n TokenCredential credential = new DefaultAzureCredentialBuilder().build();\n\n // 'fullyQualifiedNamespace' will look similar to \"{your-namespace}.servicebus.windows.net\"\n ServiceBusRuleManagerAsyncClient ruleManager = new ServiceBusClientBuilder()\n .credential(fullyQualifiedNamespace, credential)\n .ruleManager()\n .topicName(topicName)\n .subscriptionName(subscriptionName)\n .buildAsyncClient();\n```\n\n**Create a rule to a Service Bus subscription**\n\n```java\nRuleFilter trueRuleFilter = new TrueRuleFilter();\n CreateRuleOptions options = new CreateRuleOptions(trueRuleFilter);\n\n // `subscribe` is a non-blocking call. After setting up the create rule operation, it will move onto the next\n // line of code to execute.\n // Consider using Mono.usingWhen to scope the creation, usage, and cleanup of the rule manager.\n ruleManager.createRule(\"new-rule\", options).subscribe(\n unused -> {\n },\n err -> System.err.println(\"Error occurred when create a rule, err: \" + err),\n () -> System.out.println(\"Create complete.\")\n );\n\n // Finally dispose of the rule manager when done using it.\n ruleManager.close();\n```\n\n**Fetch all rules.**\n\n```java\n// `subscribe` is a non-blocking call. After setting up the list rules operation, it will move onto the next\n // line of code to execute.\n ruleManager.listRules().subscribe(ruleProperties -> System.out.println(ruleProperties.getName()));\n```\n\n**Delete a rule.**\n\n```java\n// `subscribe` is a non-blocking call. After setting up the delete rule operation, it will move onto the next\n // line of code to execute.\n ruleManager.deleteRule(\"exist-rule\").subscribe(\n unused -> { },\n err -> System.err.println(\"Error occurred when delete rule, err: \" + err),\n () -> System.out.println(\"Delete complete.\")\n );\n```"
implements:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html\">AutoCloseable</a>"
metadata: {}
package: "com.azure.messaging.servicebus"
artifact: com.azure:azure-messaging-servicebus:7.17.3