クラス 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
フィールド概要
クラス TcpConnectionSupport から継承されたフィールド
loggerコンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明voidaddNewConnection(TcpConnection connection) TcpListenerが所有するソケットを使用している場合、このメソッドは新しい接続が確立されるたびに呼び出されます。voidclose()この接続を閉じます。Deserializer<?> @Nullable ObjectSE@Nullable TcpListener@Nullable ObjectSEデシリアライザーを使用して、接続の入力ストリームからメッセージペイロードを取得します。intgetPort()@Nullable TcpSender送信者のリストを返します。Serializer<?> @Nullable SocketInfoSocketSE プロパティに getter を提供します。@Nullable SSLSessionSE基になる接続(または次のインターセプター)を返します。protected booleanlongbooleanisOpen()booleanisServer()void新しいメッセージが到着したときに TCPConnection によって呼び出されます。voidregisterListener(@Nullable TcpListener listener) 受信メッセージを受信するリスナーを設定します。voidregisterSender(@Nullable TcpSender sender) 送信者を登録します。voidregisterSenders(ListSE<TcpSender> sendersToRegister) 送信者を登録します。voidremoveDeadConnection(TcpConnection connection) TcpListenerが所有するソケットを使用している場合、このメソッドは接続が閉じられるたびに呼び出されます。voidrun()voidメッセージを変換して送信します。voidsetDeserializer(Deserializer<?> deserializer) voidsetMapper(TcpMessageMapper mapper) voidsetSerializer(Serializer<?> serializer) voidsetTheConnection(TcpConnectionSupport theConnection) 基になる接続(または次のインターセプター)を設定します。クラス TcpConnectionSupport から継承されたメソッド
closeConnection, enableManualListenerRegistration, getMapper, isNoReadErrorOnClose, publishConnectionCloseEvent, publishConnectionExceptionEvent, publishConnectionOpenEvent, publishEvent, registerTestListener, sendExceptionToListener, setNeedsTest, setNoReadErrorOnClose, setWrapped, setWrapper, toStringクラス ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSEインターフェース TcpConnection から継承されたメソッド
shutdownInput, shutdownOutput
コンストラクターの詳細
TcpConnectionInterceptorSupport
public TcpConnectionInterceptorSupport()TcpConnectionInterceptorSupport
方法の詳細
close
public void close()クラスからコピーされた説明:TcpConnectionSupportこの接続を閉じます。- 次で指定:
- インターフェース
TcpConnection内のclose - オーバーライド:
- クラス
TcpConnectionSupportのclose
isOpen
public boolean isOpen()- 次で指定:
- インターフェース
TcpConnection内のisOpen - 戻り値:
- 接続が開いている場合は true。
getPayload
インターフェースからコピーされた説明:TcpConnectionデシリアライザーを使用して、接続の入力ストリームからメッセージペイロードを取得します。- 次で指定:
- インターフェース
TcpConnection内のgetPayload - 戻り値:
- ペイロード。
getHostName
- 次で指定:
- インターフェース
TcpConnection内のgetHostName - オーバーライド:
- クラス
TcpConnectionSupportのgetHostName - 戻り値:
- ホスト名
getHostAddress
- 次で指定:
- インターフェース
TcpConnection内のgetHostAddress - オーバーライド:
- クラス
TcpConnectionSupportのgetHostAddress - 戻り値:
- ホストアドレス
getPort
public int getPort()- 次で指定:
- インターフェース
TcpConnection内のgetPort - 戻り値:
- 港
getDeserializerStateKey
- 次で指定:
- インターフェース
TcpConnection内のgetDeserializerStateKey - 戻り値:
- この接続の状態を維持する
Deserializerの状態を参照するために使用できるキー。現在、これは接続に関連付けられている InputStream ですが、オブジェクトは不透明として扱われ、キーとしてのみ使用される必要があります。
registerListener
クラスからコピーされた説明:TcpConnectionSupport受信メッセージを受信するリスナーを設定します。- オーバーライド:
- クラス
TcpConnectionSupportのregisterListener - パラメーター:
listener- リスナー。
registerSender
クラスからコピーされた説明:TcpConnectionSupport送信者を登録します。送信者が応答を送信する接続を決定できるように、サーバー側の接続で使用されます。- オーバーライド:
- クラス
TcpConnectionSupportのregisterSender - パラメーター:
sender- 送り主。
registerSenders
クラスからコピーされた説明:TcpConnectionSupport送信者を登録します。送信者が応答を送信する接続を決定できるように、サーバー側の接続で使用されます。- オーバーライド:
- クラス
TcpConnectionSupportのregisterSenders - パラメーター:
sendersToRegister- 送り主。
getConnectionId
IMPORTANT: インターセプトされた接続がサーバー接続ファクトリによって作成されている場合は、インターセプターの実装でこのメソッドをオーバーライドしないでください。任意の送信メッセージングが使用されている場合、基になる接続の接続 ID がルーティングに使用されるためです。クライアント側のインターセプターは課題なくオーバーライドできるため、このメソッドは最終的なものではありません。
- 次で指定:
- インターフェース
TcpConnection内のgetConnectionId - オーバーライド:
- クラス
TcpConnectionSupportのgetConnectionId - 戻り値:
- 接続を一意に表す文字列。
getSocketInfo
インターフェースからコピーされた説明:TcpConnectionSocketSE プロパティに getter を提供します。- 次で指定:
- インターフェース
TcpConnection内のgetSocketInfo - オーバーライド:
- クラス
TcpConnectionSupportのgetSocketInfo - 戻り値:
- socketInfo - たとえばインターセプターでは null になる場合があります。インターセプターはオーバーライドして実際の TcpConnection に委譲する必要があります。
getConnectionFactoryName
- オーバーライド:
- クラス
TcpConnectionSupportのgetConnectionFactoryName
run
public void run()- 次で指定:
- インターフェース
RunnableSE内のrun
setMapper
- オーバーライド:
- クラス
TcpConnectionSupportのsetMapper - パラメーター:
mapper- 設定するマッパー
getDeserializer
- 次で指定:
- インターフェース
TcpConnection内のgetDeserializer - オーバーライド:
- クラス
TcpConnectionSupportのgetDeserializer - 戻り値:
- デシリアライザー
setDeserializer
- オーバーライド:
- クラス
TcpConnectionSupportのsetDeserializer - パラメーター:
deserializer- 設定するデシリアライザー
getSerializer
- 次で指定:
- インターフェース
TcpConnection内のgetSerializer - オーバーライド:
- クラス
TcpConnectionSupportのgetSerializer - 戻り値:
- シリアライザー
setSerializer
- オーバーライド:
- クラス
TcpConnectionSupportのsetSerializer - パラメーター:
serializer- 設定するシリアライザー
isServer
public boolean isServer()- 次で指定:
- インターフェース
TcpConnection内のisServer - オーバーライド:
- クラス
TcpConnectionSupportのisServer - 戻り値:
- 接続が 1 回使用される場合は true。
getSslSession
- 次で指定:
- インターフェース
TcpConnection内のgetSslSession - 戻り値:
- SSL が使用されている場合、この接続に関連付けられている
SSLSessionSE。そうでない場合は null
onMessage
インターフェースからコピーされた説明:TcpListener新しいメッセージが到着したときに TCPConnection によって呼び出されます。- 次で指定:
- インターフェース
TcpListener内のonMessage - パラメーター:
message- メッセージ。
send
インターフェースからコピーされた説明:TcpConnectionメッセージを変換して送信します。- 次で指定:
- インターフェース
TcpConnection内のsend - パラメーター:
message- メッセージ
getTheConnection
setTheConnection
基になる接続(または次のインターセプター)を設定します。- パラメーター:
theConnection- 接続
getListener
- 次で指定:
- インターフェース
TcpConnection内のgetListener - オーバーライド:
- クラス
TcpConnectionSupportのgetListener - 戻り値:
- リスナー
addNewConnection
インターフェースからコピーされた説明:TcpSenderTcpListenerが所有するソケットを使用している場合、このメソッドは新しい接続が確立されるたびに呼び出されます。- 次で指定:
- インターフェース
TcpSender内のaddNewConnection - パラメーター:
connection- 接続。
removeDeadConnection
インターフェースからコピーされた説明:TcpSenderTcpListenerが所有するソケットを使用している場合、このメソッドは接続が閉じられるたびに呼び出されます。- 次で指定:
- インターフェース
TcpSender内のremoveDeadConnection - パラメーター:
connection- 接続。
incrementAndGetConnectionSequence
public long incrementAndGetConnectionSequence()- 次で指定:
- インターフェース
TcpConnection内のincrementAndGetConnectionSequence - オーバーライド:
- クラス
TcpConnectionSupportのincrementAndGetConnectionSequence - 戻り値:
- このソケットで受信したメッセージの次のシーケンス番号
getSender
- オーバーライド:
- クラス
TcpConnectionSupportのgetSender - 戻り値:
- 存在する場合、最初の送信者。
getSenders
クラスからコピーされた説明:TcpConnectionSupport送信者のリストを返します。- オーバーライド:
- クラス
TcpConnectionSupportのgetSenders - 戻り値:
- 送信者。
hasRealSender
protected boolean hasRealSender()