クラス TcpConnectionInterceptorSupport

java.lang.ObjectSE
org.springframework.integration.ip.tcp.connection.TcpConnectionSupport
org.springframework.integration.ip.tcp.connection.TcpConnectionInterceptorSupport
実装済みのインターフェース一覧:
RunnableSE, TcpConnection, TcpConnectionInterceptor, TcpListener, TcpSender

public abstract class TcpConnectionInterceptorSupport extends TcpConnectionSupport implements TcpConnectionInterceptor
TcpConnectionInterceptor の基本クラス。すべてのメソッド呼び出しを基になる TcpConnection に渡します。
導入:
2.0
作成者:
Gary Russell, Kazuki Shimizu, Christian Tzolov, Ngoc Nhan
  • コンストラクターの詳細

    • TcpConnectionInterceptorSupport

      public TcpConnectionInterceptorSupport()
    • TcpConnectionInterceptorSupport

      public TcpConnectionInterceptorSupport(ApplicationEventPublisher applicationEventPublisher)
  • 方法の詳細

    • close

      public void close()
      クラスからコピーされた説明: TcpConnectionSupport
      この接続を閉じます。
      次で指定:
      インターフェース TcpConnection 内の close 
      オーバーライド:
      クラス TcpConnectionSupportclose 
    • isOpen

      public boolean isOpen()
      次で指定:
      インターフェース TcpConnection 内の isOpen 
      戻り値:
      接続が開いている場合は true。
    • getPayload

      public @Nullable ObjectSE getPayload()
      インターフェースからコピーされた説明: TcpConnection
      デシリアライザーを使用して、接続の入力ストリームからメッセージペイロードを取得します。
      次で指定:
      インターフェース TcpConnection 内の getPayload 
      戻り値:
      ペイロード。
    • getHostName

      public StringSE getHostName()
      次で指定:
      インターフェース TcpConnection 内の getHostName 
      オーバーライド:
      クラス TcpConnectionSupportgetHostName 
      戻り値:
      ホスト名
    • getHostAddress

      public StringSE getHostAddress()
      次で指定:
      インターフェース TcpConnection 内の getHostAddress 
      オーバーライド:
      クラス TcpConnectionSupportgetHostAddress 
      戻り値:
      ホストアドレス
    • getPort

      public int getPort()
      次で指定:
      インターフェース TcpConnection 内の getPort 
      戻り値:
    • getDeserializerStateKey

      public @Nullable ObjectSE getDeserializerStateKey()
      次で指定:
      インターフェース TcpConnection 内の getDeserializerStateKey 
      戻り値:
      この接続の状態を維持する Deserializer の状態を参照するために使用できるキー。現在、これは接続に関連付けられている InputStream ですが、オブジェクトは不透明として扱われ、キーとしてのみ使用される必要があります。
    • registerListener

      public void registerListener(@Nullable TcpListener listener)
      クラスからコピーされた説明: TcpConnectionSupport
      受信メッセージを受信するリスナーを設定します。
      オーバーライド:
      クラス TcpConnectionSupportregisterListener 
      パラメーター:
      listener - リスナー。
    • registerSender

      public void registerSender(@Nullable TcpSender sender)
      クラスからコピーされた説明: TcpConnectionSupport
      送信者を登録します。送信者が応答を送信する接続を決定できるように、サーバー側の接続で使用されます。
      オーバーライド:
      クラス TcpConnectionSupportregisterSender 
      パラメーター:
      sender - 送り主。
    • registerSenders

      public void registerSenders(ListSE<TcpSender> sendersToRegister)
      クラスからコピーされた説明: TcpConnectionSupport
      送信者を登録します。送信者が応答を送信する接続を決定できるように、サーバー側の接続で使用されます。
      オーバーライド:
      クラス TcpConnectionSupportregisterSenders 
      パラメーター:
      sendersToRegister - 送り主。
    • getConnectionId

      public StringSE getConnectionId()

      IMPORTANT: インターセプトされた接続がサーバー接続ファクトリによって作成されている場合は、インターセプターの実装でこのメソッドをオーバーライドしないでください。任意の送信メッセージングが使用されている場合、基になる接続の接続 ID がルーティングに使用されるためです。クライアント側のインターセプターは課題なくオーバーライドできるため、このメソッドは最終的なものではありません。

      次で指定:
      インターフェース TcpConnection 内の getConnectionId 
      オーバーライド:
      クラス TcpConnectionSupportgetConnectionId 
      戻り値:
      接続を一意に表す文字列。
    • getSocketInfo

      public @Nullable SocketInfo getSocketInfo()
      インターフェースからコピーされた説明: TcpConnection
      SocketSE プロパティに getter を提供します。
      次で指定:
      インターフェース TcpConnection 内の getSocketInfo 
      オーバーライド:
      クラス TcpConnectionSupportgetSocketInfo 
      戻り値:
      socketInfo - たとえばインターセプターでは null になる場合があります。インターセプターはオーバーライドして実際の TcpConnection に委譲する必要があります。
    • getConnectionFactoryName

      public StringSE getConnectionFactoryName()
      オーバーライド:
      クラス TcpConnectionSupportgetConnectionFactoryName 
    • run

      public void run()
      次で指定:
      インターフェース RunnableSE 内の run 
    • setMapper

      public void setMapper(TcpMessageMapper mapper)
      オーバーライド:
      クラス TcpConnectionSupportsetMapper 
      パラメーター:
      mapper - 設定するマッパー
    • getDeserializer

      public Deserializer<?> getDeserializer()
      次で指定:
      インターフェース TcpConnection 内の getDeserializer 
      オーバーライド:
      クラス TcpConnectionSupportgetDeserializer 
      戻り値:
      デシリアライザー
    • setDeserializer

      public void setDeserializer(Deserializer<?> deserializer)
      オーバーライド:
      クラス TcpConnectionSupportsetDeserializer 
      パラメーター:
      deserializer - 設定するデシリアライザー
    • getSerializer

      public Serializer<?> getSerializer()
      次で指定:
      インターフェース TcpConnection 内の getSerializer 
      オーバーライド:
      クラス TcpConnectionSupportgetSerializer 
      戻り値:
      シリアライザー
    • setSerializer

      public void setSerializer(Serializer<?> serializer)
      オーバーライド:
      クラス TcpConnectionSupportsetSerializer 
      パラメーター:
      serializer - 設定するシリアライザー
    • isServer

      public boolean isServer()
      次で指定:
      インターフェース TcpConnection 内の isServer 
      オーバーライド:
      クラス TcpConnectionSupportisServer 
      戻り値:
      接続が 1 回使用される場合は true。
    • getSslSession

      public @Nullable SSLSessionSE getSslSession()
      次で指定:
      インターフェース TcpConnection 内の getSslSession 
      戻り値:
      SSL が使用されている場合、この接続に関連付けられている SSLSessionSE。そうでない場合は null
    • onMessage

      public void onMessage(Message<?> message)
      インターフェースからコピーされた説明: TcpListener
      新しいメッセージが到着したときに TCPConnection によって呼び出されます。
      次で指定:
      インターフェース TcpListener 内の onMessage 
      パラメーター:
      message - メッセージ。
    • send

      public void send(Message<?> message)
      インターフェースからコピーされた説明: TcpConnection
      メッセージを変換して送信します。
      次で指定:
      インターフェース TcpConnection 内の send 
      パラメーター:
      message - メッセージ
    • getTheConnection

      public TcpConnectionSupport getTheConnection()
      基になる接続(または次のインターセプター)を返します。
      戻り値:
      接続
    • setTheConnection

      public void setTheConnection(TcpConnectionSupport theConnection)
      基になる接続(または次のインターセプター)を設定します。
      パラメーター:
      theConnection - 接続
    • getListener

      public @Nullable TcpListener getListener()
      次で指定:
      インターフェース TcpConnection 内の getListener 
      オーバーライド:
      クラス TcpConnectionSupportgetListener 
      戻り値:
      リスナー
    • addNewConnection

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

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

      public long incrementAndGetConnectionSequence()
      次で指定:
      インターフェース TcpConnection 内の incrementAndGetConnectionSequence 
      オーバーライド:
      クラス TcpConnectionSupportincrementAndGetConnectionSequence 
      戻り値:
      このソケットで受信したメッセージの次のシーケンス番号
    • getSender

      public @Nullable TcpSender getSender()
      オーバーライド:
      クラス TcpConnectionSupportgetSender 
      戻り値:
      存在する場合、最初の送信者。
    • getSenders

      public ListSE<TcpSender> getSenders()
      クラスからコピーされた説明: TcpConnectionSupport
      送信者のリストを返します。
      オーバーライド:
      クラス TcpConnectionSupportgetSenders 
      戻り値:
      送信者。
    • hasRealSender

      protected boolean hasRealSender()