public class LocalizedQueueConnectionFactory extends ObjectSE implements ConnectionFactory, RoutingConnectionFactory, DisposableBean
RoutingConnectionFactory。RabbitMQ 管理プラグインが REST 経由で呼び出されてノードが決定され、そのノードに対応するアドレスが接続ファクトリに挿入されます。各接続ファクトリの 1 つのインスタンスがキャッシュに保持されます。場所を判別できない場合は、デフォルトの接続ファクトリが返されます。通常、この接続ファクトリは、フェイルオーバーモードですべてのサーバーに接続するように構成されます。getTargetConnectionFactory(Object) は、接続を確立するときに、'[queueName]' 形式の検索キーを使用して SimpleMessageListenerContainer によって呼び出されます。
すべての ConnectionFactory メソッドはデフォルトに委譲されます
| コンストラクターと説明 |
|---|
LocalizedQueueConnectionFactory(ConnectionFactory defaultConnectionFactory, MapSE<StringSE, StringSE> nodeToAddress, StringSE[] adminUris, StringSE vhost, StringSE username, StringSE password, boolean useSSL, Resource sslPropertiesLocation) |
LocalizedQueueConnectionFactory(ConnectionFactory defaultConnectionFactory, MapSE<StringSE, StringSE> nodeToAddress, StringSE[] adminUris, StringSE vhost, StringSE username, StringSE password, boolean useSSL, StringSE keyStore, StringSE trustStore, StringSE keyStorePassPhrase, StringSE trustStorePassPhrase) |
LocalizedQueueConnectionFactory(ConnectionFactory defaultConnectionFactory, StringSE[] addresses, StringSE[] adminUris, StringSE[] nodes, StringSE vhost, StringSE username, StringSE password, boolean useSSL, Resource sslPropertiesLocation) |
LocalizedQueueConnectionFactory(ConnectionFactory defaultConnectionFactory, StringSE[] addresses, StringSE[] adminUris, StringSE[] nodes, StringSE vhost, StringSE username, StringSE password, boolean useSSL, StringSE keyStore, StringSE trustStore, StringSE keyStorePassPhrase, StringSE trustStorePassPhrase) |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | addConnectionListener(ConnectionListener listener) |
void | clearConnectionListeners() |
protected com.rabbitmq.http.client.Client | createClient(StringSE adminUri, StringSE username, StringSE password) クライアントインスタンスを作成します。 |
Connection | createConnection() |
protected ConnectionFactory | createConnectionFactory(StringSE address, StringSE node) アドレス専用の接続ファクトリを作成します。 |
void | destroy() |
StringSE | getHost() |
int | getPort() |
ConnectionFactory | getTargetConnectionFactory(ObjectSE key) 指定されたルックアップキーにバインドされた ConnectionFactory を返します。存在しない場合は null を返します。 |
StringSE | getUsername() |
StringSE | getVirtualHost() |
boolean | removeConnectionListener(ConnectionListener listener) |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSEgetPublisherConnectionFactory, isPublisherConfirms, isPublisherReturns, isSimplePublisherConfirmspublic LocalizedQueueConnectionFactory(ConnectionFactory defaultConnectionFactory, MapSE<StringSE,StringSE> nodeToAddress, StringSE[] adminUris, StringSE vhost, StringSE username, StringSE password, boolean useSSL, Resource sslPropertiesLocation)
defaultConnectionFactory - キューが見つからない場合に使用するフォールバック接続ファクトリ。nodeToAddress - アドレスへのノードのマップ: (うさぎ @ サーバー 1: サーバー 1:5672)adminUris - rabbitmq 管理アドレス (https://host:port,...) は、アドレスと同じ長さでなければなりません。vhost - 仮想ホスト。username - ユーザー名。password - パスワード。useSSL - SSL を使用する。sslPropertiesLocation - SSL プロパティの場所。public LocalizedQueueConnectionFactory(ConnectionFactory defaultConnectionFactory, MapSE<StringSE,StringSE> nodeToAddress, StringSE[] adminUris, StringSE vhost, StringSE username, StringSE password, boolean useSSL, StringSE keyStore, StringSE trustStore, StringSE keyStorePassPhrase, StringSE trustStorePassPhrase)
defaultConnectionFactory - キューが見つからない場合に使用するフォールバック接続ファクトリ。nodeToAddress - アドレスへのノードのマップ: (うさぎ @ サーバー 1: サーバー 1:5672)adminUris - rabbitmq 管理アドレス (https://host:port,...) は、アドレスと同じ長さでなければなりません。vhost - 仮想ホスト。username - ユーザー名。password - パスワード。useSSL - SSL を使用する。keyStore - キーストアリソース (例: "file:/foo/keystore")。trustStore - トラストストアリソース (例: "file:/foo/truststore")。keyStorePassPhrase - キーストアのパスフレーズ。trustStorePassPhrase - トラストストアのパスフレーズ。public LocalizedQueueConnectionFactory(ConnectionFactory defaultConnectionFactory, StringSE[] addresses, StringSE[] adminUris, StringSE[] nodes, StringSE vhost, StringSE username, StringSE password, boolean useSSL, @Nullable Resource sslPropertiesLocation)
defaultConnectionFactory - キューが見つからない場合に使用するフォールバック接続ファクトリ。addresses - rabbitmq サーバーのアドレス (ホスト: ポートなど)。adminUris - rabbitmq 管理アドレス (https://host:port,...)nodes - アドレス (rabbit@server1,...) に対応する Rabbitmq ノードは、アドレスと同じ長さでなければなりません。vhost - 仮想ホスト。username - ユーザー名。password - パスワード。useSSL - SSL を使用する。sslPropertiesLocation - SSL プロパティの場所。public LocalizedQueueConnectionFactory(ConnectionFactory defaultConnectionFactory, StringSE[] addresses, StringSE[] adminUris, StringSE[] nodes, StringSE vhost, StringSE username, StringSE password, boolean useSSL, StringSE keyStore, StringSE trustStore, StringSE keyStorePassPhrase, StringSE trustStorePassPhrase)
defaultConnectionFactory - キューが見つからない場合に使用するフォールバック接続ファクトリ。addresses - rabbitmq サーバーのアドレス (ホスト: ポートなど)。adminUris - rabbitmq 管理アドレス (https://host:port,...)。nodes - アドレス (rabbit@server1,...) に対応する Rabbitmq ノードは、アドレスと同じ長さでなければなりません。vhost - 仮想ホスト。username - ユーザー名。password - パスワード。useSSL - SSL を使用する。keyStore - キーストアリソース (例: "file:/foo/keystore")。trustStore - トラストストアリソース (例: "file:/foo/truststore")。keyStorePassPhrase - キーストアのパスフレーズ。trustStorePassPhrase - トラストストアのパスフレーズ。public Connection createConnection() throws AmqpException
ConnectionFactory 内の createConnection AmqpExceptionpublic StringSE getHost()
ConnectionFactory 内の getHost public int getPort()
ConnectionFactory 内の getPort public StringSE getVirtualHost()
ConnectionFactory 内の getVirtualHost public StringSE getUsername()
ConnectionFactory 内の getUsername public void addConnectionListener(ConnectionListener listener)
ConnectionFactory 内の addConnectionListener public boolean removeConnectionListener(ConnectionListener listener)
ConnectionFactory 内の removeConnectionListener public void clearConnectionListeners()
ConnectionFactory 内の clearConnectionListeners public ConnectionFactory getTargetConnectionFactory(ObjectSE key)
RoutingConnectionFactoryConnectionFactory を返します。存在しない場合は null を返します。RoutingConnectionFactory 内の getTargetConnectionFactory key - ConnectionFactory がバインドされている検索キー ConnectionFactory、または存在しない場合は nullprotected com.rabbitmq.http.client.Client createClient(StringSE adminUri, StringSE username, StringSE password) throws MalformedURLExceptionSE, URISyntaxExceptionSE
adminUri - 管理 URI。username - ユーザー名 password - パスワード。MalformedURLExceptionSE - URL の形式が正しくない場合 URISyntaxExceptionSE - 構文エラーがある場合。protected ConnectionFactory createConnectionFactory(StringSE address, StringSE node)
address - ファクトリが接続するアドレス。node - ノード。public void destroy()
DisposableBean 内の destroy