クラス TcpOutboundGatewaySpec

実装されたすべてのインターフェース:
DisposableBeanFactoryBean<TcpOutboundGateway>InitializingBeanLifecyclePhasedSmartLifecycleComponentsRegistration

public class TcpOutboundGatewaySpec extends MessageHandlerSpec<TcpOutboundGatewaySpec,TcpOutboundGateway> implements ComponentsRegistration
導入:
5.0
作成者:
Gary Russell, Artem Bilan
  • フィールドの詳細

  • コンストラクターの詳細

    • TcpOutboundGatewaySpec

      public TcpOutboundGatewaySpec(AbstractClientConnectionFactory connectionFactoryBean)
      既存の spring-managed 接続ファクトリを使用してインスタンスを構築します。
      パラメーター:
      connectionFactoryBean - spring-managed Bean。
    • TcpOutboundGatewaySpec

      public TcpOutboundGatewaySpec(TcpClientConnectionFactorySpec<?,?> connectionFactorySpec)
      提供された接続ファクトリ仕様を使用してインスタンスを構成します。
      パラメーター:
      connectionFactorySpec - スペック。
  • メソッドの詳細

    • remoteTimeout

      public TcpOutboundGatewaySpec remoteTimeout(long remoteTimeout)
      パラメーター:
      remoteTimeout - 設定するリモートタイムアウト。
      戻り値:
      スペック。
      関連事項:
    • remoteTimeout

      public <P> TcpOutboundGatewaySpec remoteTimeout(FunctionSE<Message<P>,?> remoteTimeoutFunction)
      実行時に呼び出される FunctionSE を構成して、メッセージの送信先を決定します。通常、Java 8 ラムダ式で使用されます。
       
       .remoteTimeout(m -> m.getHeaders().get('rto'))
       
       
      型パラメーター:
      P - メッセージのペイロード型。
      パラメーター:
      remoteTimeoutFunction - 関数。
      戻り値:
      スペック。
      関連事項:
    • closeStreamAfterSend

      public TcpOutboundGatewaySpec closeStreamAfterSend(boolean closeStreamAfterSend)
      接続を閉じずに送信後に接続出力ストリームを閉じるには、true に設定します。ByteArrayRawSerializer を使用する場合など、サーバーに EOF を通知するために使用します。使い捨て接続ファクトリが必要です。
      パラメーター:
      closeStreamAfterSend - 閉じます。
      戻り値:
      スペック。
      導入:
      5.2
    • async

      public TcpOutboundGatewaySpec async(boolean async)
      true に設定すると、送信スレッドが解放され、非同期で応答を受信します。
      パラメーター:
      async - 非同期のリクエスト / 応答の場合は true。
      戻り値:
      スペック。
      導入:
      5.3
    • unsolicitedMessageChannelName

      public TcpOutboundGatewaySpec unsolicitedMessageChannelName(StringSE channelName)
      迷惑メッセージのチャネル名を設定します。
      パラメーター:
      channelName - 名前。
      戻り値:
      スペック。
      導入:
      6.1
    • unsolicitedMessageChannel

      public TcpOutboundGatewaySpec unsolicitedMessageChannel(MessageChannel channel)
      迷惑メッセージチャネルを設定します。
      パラメーター:
      channel - チャンネル。
      戻り値:
      スペック。
      導入:
      6.1
    • getComponentsToRegister

      public MapSE<ObjectSE,StringSE> getComponentsToRegister()
      次で指定:
      インターフェース ComponentsRegistrationgetComponentsToRegister