クラス RabbitAmqpAdmin
java.lang.ObjectSE
org.springframework.amqp.rabbitmq.client.RabbitAmqpAdmin
- 実装されているすべてのインターフェース:
AmqpAdmin、Aware、BeanNameAware、ApplicationContextAware、ApplicationEventPublisherAware、Lifecycle、Phased、SmartLifecycle
@ManagedResource(description="Admin Tasks")
public class RabbitAmqpAdmin
extends ObjectSE
implements AmqpAdmin, ApplicationContextAware, ApplicationEventPublisherAware, BeanNameAware, SmartLifecycle
RabbitMQ AMQP 1.0 クライアント用の
AmqpAdmin 実装。- 導入:
- 4.0
- 作成者:
- Artem Bilan
フィールドのサマリー
フィールドインターフェース org.springframework.context.SmartLifecycle から継承されたフィールド
DEFAULT_PHASEコンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明voiddeclareBinding(Binding binding) 交換へのキューのバインディングを宣言します。voiddeclareExchange(Exchange exchange) 交換を宣言します。@Nullable Queue名前が自動的に付けられるキューを宣言します。@Nullable StringSEdeclareQueue(Queue queue) 指定されたキューを宣言します。booleandeleteExchange(StringSE exchangeName) 交換を削除します。booleandeleteQueue(StringSE queueName) 使用中かメッセージがあるかに関係なく、キューを削除します。voiddeleteQueue(StringSE queueName, boolean unused, boolean empty) キューを削除します。@Nullable DeclarationExceptionEventintgetPhase()@Nullable QueueInformationgetQueueInfo(StringSE queueName) キューが存在する場合は、キューに関する情報を返します。@Nullable PropertiesSEgetQueueProperties(StringSE queueName) 4 つのプロパティRabbitAdmin.QUEUE_NAME、RabbitAdmin.QUEUE_MESSAGE_COUNT、RabbitAdmin.QUEUE_CONSUMER_COUNT、QUEUE_TYPEを返します。キューが存在しない場合は null を返します。void含まれているアプリケーションコンテキスト内のすべての交換、キュー、バインディングを宣言します (存在する場合)。booleanbooleanintpurgeQueue(StringSE queueName) 指定されたキューの内容をパージします。voidpurgeQueue(StringSE queueName, boolean noWait) 指定されたキューの内容をパージします。voidremoveBinding(Binding binding) エクスチェンジへのキューのバインドを削除します。voidsetApplicationContext(ApplicationContext applicationContext) voidsetApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) voidsetAutoStartup(boolean autoStartup) voidsetBeanName(StringSE name) voidsetExplicitDeclarationsOnly(boolean explicitDeclarationsOnly) この管理者によって宣言されるように明示的に構成されているDeclarableBean のみを宣言するには、true に設定します。voidsetIgnoreDeclarationExceptions(boolean ignoreDeclarationExceptions) voidsetTaskExecutor(TaskExecutor taskExecutor) 非同期操作に使用するタスクエグゼキュータを設定します。voidstart()voidstop()クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSEインターフェース org.springframework.amqp.core.AmqpAdmin から継承されたメソッド
getManualDeclarableSetインターフェース org.springframework.context.SmartLifecycle から継承されたメソッド
isPauseable, stop
フィールドの詳細
QUEUE_TYPE
- 関連事項:
コンストラクターの詳細
RabbitAmqpAdmin
メソッドの詳細
setApplicationContext
- 次で指定:
- インターフェース
ApplicationContextAwareのsetApplicationContext
setApplicationEventPublisher
- 次で指定:
- インターフェース
ApplicationEventPublisherAwareのsetApplicationEventPublisher
setBeanName
- 次で指定:
- インターフェース
BeanNameAwareのsetBeanName
setIgnoreDeclarationExceptions
public void setIgnoreDeclarationExceptions(boolean ignoreDeclarationExceptions) setTaskExecutor
非同期操作に使用するタスクエグゼキュータを設定します。現在、purgeQueue(String, boolean)でのみ使用されています。- パラメーター:
taskExecutor- 使用するエグゼキュータ。
setExplicitDeclarationsOnly
public void setExplicitDeclarationsOnly(boolean explicitDeclarationsOnly) この管理者によって宣言されるように明示的に構成されているDeclarableBean のみを宣言するには、true に設定します。- パラメーター:
explicitDeclarationsOnly- admin 宣言構成のない Bean を無視する場合は true。
getLastDeclarationExceptionEvent
- 戻り値:
- この管理者で検出された最後の
DeclarationExceptionEvent。
isAutoStartup
public boolean isAutoStartup()- 次で指定:
- インターフェース
SmartLifecycleのisAutoStartup
setAutoStartup
public void setAutoStartup(boolean autoStartup) getPhase
public int getPhase()- 次で指定:
- インターフェース
PhasedのgetPhase - 次で指定:
- インターフェース
SmartLifecycleのgetPhase
start
stop
isRunning
initialize
public void initialize()含まれているアプリケーションコンテキスト内のすべての交換、キュー、バインディングを宣言します (存在する場合)。このメソッドを複数回呼び出しても安全です (ただし不要です)。- 次で指定:
- インターフェース
AmqpAdminのinitialize
declareExchange
インターフェースからコピーされた説明:AmqpAdmin交換を宣言します。- 次で指定:
- インターフェース
AmqpAdminのdeclareExchange - パラメーター:
exchange- 宣言する交換。
deleteExchange
@ManagedOperation(description="Delete an exchange from the broker") public boolean deleteExchange(StringSE exchangeName) インターフェースからコピーされた説明:AmqpAdmin交換を削除します。実装固有の動作については、実装固有のサブクラスを参照してください。たとえば、RabbitMQ の場合、使用中かどうかに関係なく交換が削除されます。- 次で指定:
- インターフェース
AmqpAdminのdeleteExchange - パラメーター:
exchangeName- 取引所の名前- 戻り値:
- 交換が存在し、削除された場合は true
declareQueue
インターフェースからコピーされた説明:AmqpAdmin名前が自動的に付けられるキューを宣言します。これは、exclusive = true、autoDelete = true、durable = false で作成されます。- 次で指定:
- インターフェース
AmqpAdminのdeclareQueue - 戻り値:
- 待ち行列。
declareQueue
インターフェースからコピーされた説明:AmqpAdmin指定されたキューを宣言します。- 次で指定:
- インターフェース
AmqpAdminのdeclareQueue - パラメーター:
queue- 宣言するキュー。- 戻り値:
- キューの名前。
deleteQueue
@ManagedOperation(description="Delete a queue from the broker") public boolean deleteQueue(StringSE queueName) インターフェースからコピーされた説明:AmqpAdmin使用中かメッセージがあるかに関係なく、キューを削除します。- 次で指定:
- インターフェース
AmqpAdminのdeleteQueue - パラメーター:
queueName- キューの名前。- 戻り値:
- キューが存在し、削除された場合は true。
deleteQueue
@ManagedOperation(description="Delete a queue from the broker if unused and empty (when corresponding arguments are true") public void deleteQueue(StringSE queueName, boolean unused, boolean empty) インターフェースからコピーされた説明:AmqpAdminキューを削除します。- 次で指定:
- インターフェース
AmqpAdminのdeleteQueue - パラメーター:
queueName- キューの名前。unused- 使用されていない場合にのみキューを削除する必要がある場合は true。empty- 空の場合にのみキューを削除する場合は true。
purgeQueue
@ManagedOperation(description="Purge a queue and optionally don't wait for the purge to occur") public void purgeQueue(StringSE queueName, boolean noWait) インターフェースからコピーされた説明:AmqpAdmin指定されたキューの内容をパージします。- 次で指定:
- インターフェース
AmqpAdminのpurgeQueue - パラメーター:
queueName- キューの名前。noWait- パージの完了を待たない場合は true。
purgeQueue
@ManagedOperation(description="Purge a queue and return the number of messages purged") public int purgeQueue(StringSE queueName) インターフェースからコピーされた説明:AmqpAdmin指定されたキューの内容をパージします。- 次で指定:
- インターフェース
AmqpAdminのpurgeQueue - パラメーター:
queueName- キューの名前。- 戻り値:
- パージされたメッセージの数。
declareBinding
インターフェースからコピーされた説明:AmqpAdmin交換へのキューのバインディングを宣言します。- 次で指定:
- インターフェース
AmqpAdminのdeclareBinding - パラメーター:
binding- 宣言するバインディングの説明。
removeBinding
インターフェースからコピーされた説明:AmqpAdminキューの交換へのバインディングを削除します。unbindQueue/removeBinding は仕様の 0.9 まで導入されなかったことに注意してください。- 次で指定:
- インターフェース
AmqpAdminのremoveBinding - パラメーター:
binding- 削除するバインディングの説明。
getQueueProperties
@ManagedOperation(description="Get queue name, message count and consumer count") public @Nullable PropertiesSE getQueueProperties(StringSE queueName) 4 つのプロパティRabbitAdmin.QUEUE_NAME、RabbitAdmin.QUEUE_MESSAGE_COUNT、RabbitAdmin.QUEUE_CONSUMER_COUNT、QUEUE_TYPEを返します。キューが存在しない場合は null を返します。- 次で指定:
- インターフェース
AmqpAdminのgetQueueProperties - パラメーター:
queueName- キューの名前。- 戻り値:
- プロパティ、またはキューが存在しない場合は null。
getQueueInfo
インターフェースからコピーされた説明:AmqpAdminキューが存在する場合は、キューに関する情報を返します。- 次で指定:
- インターフェース
AmqpAdminのgetQueueInfo - パラメーター:
queueName- キューの名前。- 戻り値:
- 情報、またはキューが存在しない場合は null。