クラス TestingUtilities

java.lang.ObjectSE
org.springframework.integration.ip.util.TestingUtilities

public final class TestingUtilities extends ObjectSE
IP コンポーネントをテストするためのメソッドを提供するコンビニエンスクラス。メインのブランチで提供されるため、ユーザーのテストコードやサンプルなどで使用できます。
導入:
2.2
作成者:
Gary Russell
  • メソッドの詳細

    • waitListening

      public static void waitListening(AbstractServerConnectionFactory serverConnectionFactory, @Nullable LongSE delayArg) throws IllegalStateExceptionSE
      テストを開始する前に、サーバー接続ファクトリが実際にリッスンを開始するのを待ちます。デフォルトでは最大 10 秒待機します。
      パラメーター:
      serverConnectionFactory - サーバー接続ファクトリ。
      delayArg - ミリ秒単位で待機する時間。null の場合、デフォルトの 10000 (10 秒)。
      例外:
      IllegalStateExceptionSE - サーバーが時間内にリッスンを開始しない場合。
    • waitListening

      public static void waitListening(AbstractInternetProtocolReceivingChannelAdapter adapter, @Nullable LongSE delayArg) throws IllegalStateExceptionSE
      テストを開始する前に、サーバー接続ファクトリが実際にリッスンを開始するのを待ちます。デフォルトでは最大 10 秒待機します。
      パラメーター:
      adapter - サーバー接続ファクトリ。
      delayArg - ミリ秒単位で待機する時間。null の場合、デフォルトの 10000 (10 秒)。
      例外:
      IllegalStateExceptionSE - サーバーが時間内にリッスンを開始しない場合。
    • waitStopListening

      public static void waitStopListening(AbstractServerConnectionFactory serverConnectionFactory, @Nullable LongSE delayArg) throws IllegalStateExceptionSE
      サーバー接続ファクトリがリスニングを停止するのを待ちます。デフォルトでは最大 10 秒待機します。
      パラメーター:
      serverConnectionFactory - サーバー接続ファクトリ。
      delayArg - ミリ秒単位で待機する時間。null の場合、デフォルトの 10000 (10 秒)。
      例外:
      IllegalStateExceptionSE - サーバーが時間内にリッスンを停止しない場合。
    • waitUntilFactoryHasThisNumberOfConnections

      public static void waitUntilFactoryHasThisNumberOfConnections(AbstractConnectionFactory factory, int n) throws InterruptedExceptionSE
      接続ファクトリが指定された数の接続を確立するまで、最大 10 秒待ちます。
      パラメーター:
      factory - ファクトリ。
      n - 必要な接続数。
      例外:
      InterruptedExceptionSE - 中断された場合。
      IllegalStateExceptionSE - カウントが一致しない場合。