ServiceBusRuleManagerClient クラス
- java.
lang. Object - com.
azure. messaging. servicebus. ServiceBusRuleManagerClient
- com.
実装
public class ServiceBusRuleManagerClient
implements AutoCloseable
特定のトピック サブスクリプションのルールを管理する 同期 ルール マネージャー。 ルール マネージャーではリッスン要求のみが必要ですが、 には要求の管理が ServiceBusAdministrationAsyncClient 必要です。
Service Bus サブスクリプションに対するルールを作成する
TokenCredential credential = new DefaultAzureCredentialBuilder().build();
// 'fullyQualifiedNamespace' will look similar to "{your-namespace}.servicebus.windows.net"
ServiceBusRuleManagerClient ruleManager = new ServiceBusClientBuilder()
.credential(fullyQualifiedNamespace, credential)
.ruleManager()
.topicName(topicName)
.subscriptionName(subscriptionName)
.buildClient();
RuleFilter trueRuleFilter = new TrueRuleFilter();
CreateRuleOptions options = new CreateRuleOptions(trueRuleFilter);
ruleManager.createRule("new-rule", options);
// Dispose of the ruleManager when finished using it.
ruleManager.close();
メソッドの概要
修飾子と型 | メソッドと説明 |
---|---|
void |
close()
を破棄します ServiceBusRuleManagerClient。 |
void |
createRule(String ruleName, CreateRuleOptions options)
現在のサブスクリプションに対して、トピックからサブスクリプションに到達するメッセージをフィルター処理するルールを作成します。 |
void |
deleteRule(String ruleName)
によって識別されるサブスクリプションの規則を |
String |
getEntityPath()
Service Bus リソースの名前を取得します。 |
String |
getFullyQualifiedNamespace()
完全修飾名前空間を取得します。 |
Iterable |
listRules()
トピックとサブスクリプションに関連付けられているすべてのルールをフェッチします。 |
メソッドの継承元: java.lang.Object
メソッドの詳細
close
public void close()
を破棄します ServiceBusRuleManagerClient。 クライアントに専用接続がある場合は、基になる接続も閉じられます。
createRule
public void createRule(String ruleName, CreateRuleOptions options)
現在のサブスクリプションに対して、トピックからサブスクリプションに到達するメッセージをフィルター処理するルールを作成します。
Parameters:
deleteRule
public void deleteRule(String ruleName)
によって識別されるサブスクリプションの規則を ruleName
削除します。
Parameters:
getEntityPath
public String getEntityPath()
Service Bus リソースの名前を取得します。
Returns:
getFullyQualifiedNamespace
public String getFullyQualifiedNamespace()
完全修飾名前空間を取得します。
Returns:
listRules
public IterableStream
トピックとサブスクリプションに関連付けられているすべてのルールをフェッチします。
Returns:
適用対象
Azure SDK for Java
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示