クラス SingleAmqpConnectionFactory

java.lang.ObjectSE
org.springframework.amqp.client.SingleAmqpConnectionFactory
実装済みのインターフェース一覧:
AmqpConnectionFactoryDisposableBean

public class SingleAmqpConnectionFactory extends ObjectSE implements AmqpConnectionFactory, DisposableBean
AmqpConnectionFactory の実装では、単一の共有 Connection インスタンスを保持します。Client なしでインスタンスが作成された場合、内部的に default client が使用されます。
導入:
4.1
作成者:
Artem Bilan
  • コンストラクターの詳細

    • SingleAmqpConnectionFactory

      public SingleAmqpConnectionFactory()
      default client をベースにインスタンスを作成します。
    • SingleAmqpConnectionFactory

      public SingleAmqpConnectionFactory(org.apache.qpid.protonj2.client.Client protonClient)
      提供された Client に基づいてインスタンスを作成します。
      パラメーター:
      protonClient - 使用するクライアント。
  • 方法の詳細

    • setHost

      public SingleAmqpConnectionFactory setHost(StringSE host)
    • setPort

      public SingleAmqpConnectionFactory setPort(int port)
    • setUsername

      public SingleAmqpConnectionFactory setUsername(StringSE username)
      AMQP 接続のユーザー名を設定します。これは ConnectionOptions の便利な最上位プロパティです。ConnectionOptions が指定されている場合は、そちらでユーザー名を設定する必要があります。
      パラメーター:
      username - 使用するユーザー名。
      戻り値:
      ファクトリインスタンス。
    • setPassword

      public SingleAmqpConnectionFactory setPassword(StringSE password)
      AMQP 接続のパスワードを設定します。これは ConnectionOptions の便利な最上位プロパティです。ConnectionOptions が指定されている場合は、そちらでパスワードを設定する必要があります。
      パラメーター:
      password - 使用するパスワード。
      戻り値:
      ファクトリインスタンス。
    • setReconnectOptions

      public SingleAmqpConnectionFactory setReconnectOptions(org.apache.qpid.protonj2.client.ReconnectOptions reconnectOptions)
      AMQP 接続用に ReconnectOptions を設定します。ConnectionOptions.reconnectOptions() には便利なトップレベルプロパティが用意されています。ConnectionOptions が明示的に指定されている場合は、ReconnectOptions をそちらに設定する必要があります。
      パラメーター:
      reconnectOptions - 使用する ReconnectOptions
      戻り値:
      ファクトリインスタンス。
      関連事項:
    • setConnectionOptions

      public SingleAmqpConnectionFactory setConnectionOptions(org.apache.qpid.protonj2.client.ConnectionOptions connectionOptions)
      ConnectionOptions インスタンスを設定します。setUsername(String) および setPassword(String) とは排他的です。
      パラメーター:
      connectionOptions - 使用します。
      戻り値:
      ファクトリインスタンス。
    • getConnection

      public org.apache.qpid.protonj2.client.Connection getConnection()
      次で指定:
      インターフェース AmqpConnectionFactory 内の getConnection 
    • destroy

      public void destroy()
      次で指定:
      インターフェース DisposableBean 内の destroy