public class TcpInboundGateway extends MessagingGatewaySupport implements TcpListener, TcpSender, ClientModeCapable, OrderlyShutdownCapable
TcpOutboundGateway の場合、多重化は使用されませんが、接続ファクトリがシングルユース接続を使用する場合は、複数の同時接続を使用できます。真の非同期双方向通信には、受信 / 送信チャネルアダプターのペアを使用する必要があります。IntegrationManagement.ManagementOverrides| 修飾子と型 | フィールドと説明 |
|---|---|
static long | DEFAULT_RETRY_INTERVAL ミリ秒単位のデフォルトの再試行間隔 -60000L。 |
messagingTemplatelifecycleCondition, lifecycleLockEXPRESSION_PARSER, loggerMETER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEDEFAULT_PHASE| コンストラクターと説明 |
|---|
TcpInboundGateway() |
| 修飾子と型 | メソッドと説明 |
|---|---|
void | addNewConnection(TcpConnection connection)TcpListener が所有するソケットを使用している場合、このメソッドは新しい接続が確立されるたびに呼び出されます。 |
int | afterShutdown() スケジューラー、エグゼキューターなどの通常のシャットダウンの後、シャットダウン遅延が経過した後、残りのアクティブなスケジューラー / エグゼキュータースレッドの強制シャットダウンの前に呼び出されます。オプションで、まだ処理中のアクティブなメッセージの数を返すことができます。 |
int | beforeShutdown() シャットダウンが始まる前に呼び出されます。 |
protected void | doStart() サブクラスは、開始動作でこのメソッドを実装する必要があります。 |
protected void | doStop() サブクラスは、停止動作でこのメソッドを実装する必要があります。 |
StringSE | getComponentType() サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。 |
long | getRetryInterval() |
boolean | isClientMode() |
boolean | isClientModeConnected() |
boolean | isListening() |
protected void | onInit() サブクラスは、初期化ロジック用にこれを実装できます。 |
boolean | onMessage(Message<?> message) 新しいメッセージが到着したときに TCPConnection によって呼び出されます。 |
void | removeDeadConnection(TcpConnection connection)TcpListener が所有するソケットを使用している場合、このメソッドは接続が閉じられるたびに呼び出されます。 |
void | retryConnection() すぐに接続の確立を試みてください。 |
void | setClientMode(boolean isClientMode) |
void | setConnectionFactory(AbstractConnectionFactory connectionFactory)AbstractClientConnectionFactory または AbstractServerConnectionFactory である必要があります。 |
void | setRetryInterval(long retryInterval) 再試行間隔を構成します。 |
buildErrorMessage, buildSendTimer, destroy, getErrorChannel, getErrorMessageAttributes, getIntegrationPatternType, getManagedName, getManagedType, getOverrides, getReplyChannel, getRequestChannel, isLoggingEnabled, receive, receive, receiveMessage, receiveMessage, registerMetricsCaptor, registerReplyMessageCorrelatorIfNecessary, send, sendAndReceive, sendAndReceiveMessage, sendAndReceiveMessageReactive, sendTimer, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setErrorOnTimeout, setLoggingEnabled, setManagedName, setManagedType, setReplyChannel, setReplyChannelName, setReplyMapper, setReplyTimeout, setRequestChannel, setRequestChannelName, setRequestMapper, setRequestTimeout, setShouldTrackdoStop, getPhase, getRole, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopafterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toStringcloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSEgetThisAsgetBeanName, getComponentNamepublic static final long DEFAULT_RETRY_INTERVAL
public boolean onMessage(Message<?> message)
TcpListenerTcpListener の onMessage message - メッセージ。public boolean isListening()
public void setConnectionFactory(AbstractConnectionFactory connectionFactory)
AbstractClientConnectionFactory または AbstractServerConnectionFactory である必要があります。connectionFactory - 接続ファクトリ public void addNewConnection(TcpConnection connection)
TcpSenderTcpListener が所有するソケットを使用している場合、このメソッドは新しい接続が確立されるたびに呼び出されます。TcpSender の addNewConnection connection - 接続。public void removeDeadConnection(TcpConnection connection)
TcpSenderTcpListener が所有するソケットを使用している場合、このメソッドは接続が閉じられるたびに呼び出されます。TcpSender の removeDeadConnection connection - 接続。public StringSE getComponentType()
IntegrationObjectSupportNamedComponent の getComponentType MessagingGatewaySupport の getComponentType protected void onInit()
IntegrationObjectSupportMessagingGatewaySupport の onInit protected void doStart()
AbstractEndpointAbstractEndpoint.lifecycleLock を保持しているときに呼び出されます。MessagingGatewaySupport の doStart protected void doStop()
AbstractEndpointAbstractEndpoint.lifecycleLock を保持しているときに呼び出されます。MessagingGatewaySupport の doStop public boolean isClientMode()
ClientModeCapable の isClientMode public void setClientMode(boolean isClientMode)
isClientMode - 設定する isClientModepublic long getRetryInterval()
public void setRetryInterval(long retryInterval)
DEFAULT_RETRY_INTERVAL です。retryInterval - 設定する retryIntervalpublic boolean isClientModeConnected()
ClientModeCapable の isClientModeConnected public void retryConnection()
ClientModeCapableClientModeCapable の retryConnection public int beforeShutdown()
OrderlyShutdownCapableOrderlyShutdownCapable の beforeShutdown public int afterShutdown()
OrderlyShutdownCapableOrderlyShutdownCapable の afterShutdown