クラス TcpSendingMessageHandler

実装済みのインターフェース一覧:
org.reactivestreams.Subscriber<Message<?>>, Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, ApplicationContextAware, Lifecycle, Ordered, ComponentSourceAware, ExpressionCapable, Orderable, IntegrationPattern, ClientModeCapable, TcpSender, NamedComponent, IntegrationManagement, ManageableLifecycle, TrackableComponent, MessageHandler, reactor.core.CoreSubscriber<Message<?>>

public class TcpSendingMessageHandler extends AbstractMessageHandler implements TcpSender, ManageableLifecycle, ClientModeCapable
TcpConnection を使用してデータを送信する Tcp 送信チャネルアダプター - 接続ファクトリがサーバーファクトリである場合、TcpListener が接続を所有します。クライアントファクトリの場合、このオブジェクトが接続を所有します。
導入:
2.0
作成者:
Gary Russell, Artem Bilan, Christian Tzolov
  • フィールドの詳細

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

    • TcpSendingMessageHandler

      public TcpSendingMessageHandler()
  • 方法の詳細

    • obtainConnection

      protected TcpConnection obtainConnection(Message<?> message)
    • handleMessageInternal

      public void handleMessageInternal(Message<?> message)
      指定されたメッセージ形式を使用して、基になるソケットにメッセージペイロードを書き込みます。
      次で指定:
      クラス AbstractMessageHandlerhandleMessageInternal 
      関連事項:
    • doWrite

      protected TcpConnection doWrite(Message<?> message)
      実際に書き込みを行うメソッド。
      パラメーター:
      message - 書くメッセージ。
      戻り値:
      接続。
    • setConnectionFactory

      public void setConnectionFactory(AbstractConnectionFactory connectionFactory)
      クライアントまたはサーバー接続ファクトリを設定します。この場合(送信アダプター)、ファクトリがサーバー接続ファクトリである場合、ソケットは受信チャネルアダプターによって所有され、このアダプターは応答の送信に使用されます。
      パラメーター:
      connectionFactory - 設定する connectionFactory
    • addNewConnection

      public void addNewConnection(TcpConnection connection)
      インターフェースからコピーされた説明: TcpSender
      TcpListener が所有するソケットを使用している場合、このメソッドは新しい接続が確立されるたびに呼び出されます。
      次で指定:
      インターフェース TcpSender 内の addNewConnection 
      パラメーター:
      connection - 接続。
    • removeDeadConnection

      public void removeDeadConnection(TcpConnection connection)
      インターフェースからコピーされた説明: TcpSender
      TcpListener が所有するソケットを使用している場合、このメソッドは接続が閉じられるたびに呼び出されます。
      次で指定:
      インターフェース TcpSender 内の removeDeadConnection 
      パラメーター:
      connection - 接続。
    • getComponentType

      public StringSE getComponentType()
      次で指定:
      インターフェース NamedComponent 内の getComponentType 
      オーバーライド:
      クラス MessageHandlerSupportgetComponentType 
    • onInit

      protected void onInit()
      クラスからコピーされた説明: IntegrationObjectSupport
      サブクラスは、初期化ロジック用にこれを実装できます。
      オーバーライド:
      クラス IntegrationObjectSupportonInit 
    • start

      public void start()
      次で指定:
      インターフェース Lifecycle 内の start 
      次で指定:
      インターフェース ManageableLifecycle 内の start 
    • stop

      public void stop()
      次で指定:
      インターフェース Lifecycle 内の stop 
      次で指定:
      インターフェース ManageableLifecycle 内の stop 
    • isRunning

      public boolean isRunning()
      次で指定:
      インターフェース Lifecycle 内の isRunning 
      次で指定:
      インターフェース ManageableLifecycle 内の isRunning 
    • getClientConnectionFactory

      protected @Nullable ConnectionFactory getClientConnectionFactory()
      戻り値:
      clientConnectionFactory
    • getServerConnectionFactory

      protected @Nullable ConnectionFactory getServerConnectionFactory()
      戻り値:
      serverConnectionFactory
    • getConnections

      protected MapSE<StringSE, TcpConnection> getConnections()
      戻り値:
      接続
    • isClientMode

      public boolean isClientMode()
      次で指定:
      インターフェース ClientModeCapable 内の isClientMode 
      戻り値:
      isClientMode
    • setClientMode

      public void setClientMode(boolean isClientMode)
      パラメーター:
      isClientMode - 設定する isClientMode
    • getRetryInterval

      public long getRetryInterval()
      戻り値:
      retryInterval
    • setRetryInterval

      public void setRetryInterval(long retryInterval)
      パラメーター:
      retryInterval - 設定する retryInterval
    • isClientModeConnected

      public boolean isClientModeConnected()
      次で指定:
      インターフェース ClientModeCapable 内の isClientModeConnected 
      戻り値:
      エンドポイントがクライアントモードで実行されている場合は true。
    • retryConnection

      public void retryConnection()
      インターフェースからコピーされた説明: ClientModeCapable
      すぐに接続の確立を試みてください。
      次で指定:
      インターフェース ClientModeCapable 内の retryConnection