public class TcpSendingMessageHandler extends AbstractMessageHandler implements TcpSender, ManageableLifecycle, ClientModeCapable
IntegrationManagement.ManagementOverrides
修飾子と型 | フィールドと説明 |
---|---|
static long | DEFAULT_RETRY_INTERVAL ClientModeConnectionManager 再スケジュールのデフォルトの再試行間隔。 |
protected ObjectSE | lifecycleMonitor |
EXPRESSION_PARSER, logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAME
コンストラクターと説明 |
---|
TcpSendingMessageHandler() |
修飾子と型 | メソッドと説明 |
---|---|
void | addNewConnection(TcpConnection connection) TcpListener が所有するソケットを使用している場合、このメソッドは新しい接続が確立されるたびに呼び出されます。 |
protected TcpConnection | doWrite(Message<?> message) 実際に書き込みを行うメソッド。 |
protected ConnectionFactory | getClientConnectionFactory() |
StringSE | getComponentType() サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。 |
protected MapSE<StringSE, TcpConnection> | getConnections() |
long | getRetryInterval() |
protected ConnectionFactory | getServerConnectionFactory() |
void | handleMessageInternal(Message<?> message) 指定されたメッセージ形式を使用して、基になるソケットにメッセージペイロードを書き込みます。 |
boolean | isClientMode() |
boolean | isClientModeConnected() |
boolean | isRunning() |
protected TcpConnection | obtainConnection(Message<?> message) |
protected void | onInit() サブクラスは、初期化ロジック用にこれを実装できます。 |
void | removeDeadConnection(TcpConnection connection) TcpListener が所有するソケットを使用している場合、このメソッドは接続が閉じられるたびに呼び出されます。 |
void | retryConnection() すぐに接続の確立を試みてください。 |
void | setClientMode(boolean isClientMode) |
void | setConnectionFactory(AbstractConnectionFactory connectionFactory) クライアントまたはサーバー接続ファクトリを設定します。この場合(送信アダプター)、ファクトリがサーバー接続ファクトリである場合、ソケットは受信チャネルアダプターによって所有され、このアダプターは応答の送信に使用されます。 |
void | setRetryInterval(long retryInterval) |
void | start() |
void | stop() |
handleMessage, onComplete, onError, onNext, onSubscribe
buildSendTimer, destroy, getIntegrationPatternType, getManagedName, getManagedType, getMetricsCaptor, getOrder, getOverrides, isLoggingEnabled, registerMetricsCaptor, sendTimer, setLoggingEnabled, setManagedName, setManagedType, setOrder, setShouldTrack, shouldTrack
afterPropertiesSet, 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, toString
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
getThisAs
getBeanName, getComponentName
public static final long DEFAULT_RETRY_INTERVAL
ClientModeConnectionManager
再スケジュールのデフォルトの再試行間隔。protected final ObjectSE lifecycleMonitor
protected TcpConnection obtainConnection(Message<?> message)
public void handleMessageInternal(Message<?> message)
protected TcpConnection doWrite(Message<?> message)
message
- 書くメッセージ。public void setConnectionFactory(AbstractConnectionFactory connectionFactory)
connectionFactory
- 設定する connectionFactorypublic void addNewConnection(TcpConnection connection)
TcpSender
TcpListener
が所有するソケットを使用している場合、このメソッドは新しい接続が確立されるたびに呼び出されます。TcpSender
の addNewConnection
connection
- 接続。public void removeDeadConnection(TcpConnection connection)
TcpSender
TcpListener
が所有するソケットを使用している場合、このメソッドは接続が閉じられるたびに呼び出されます。TcpSender
の removeDeadConnection
connection
- 接続。public StringSE getComponentType()
IntegrationObjectSupport
NamedComponent
の getComponentType
MessageHandlerSupport
の getComponentType
protected void onInit()
IntegrationObjectSupport
IntegrationObjectSupport
の onInit
public void start()
Lifecycle
の start
ManageableLifecycle
の start
public void stop()
Lifecycle
の stop
ManageableLifecycle
の stop
public boolean isRunning()
Lifecycle
の isRunning
ManageableLifecycle
の isRunning
protected ConnectionFactory getClientConnectionFactory()
protected ConnectionFactory getServerConnectionFactory()
protected MapSE<StringSE,TcpConnection> getConnections()
public boolean isClientMode()
ClientModeCapable
の isClientMode
public void setClientMode(boolean isClientMode)
isClientMode
- 設定する isClientModepublic long getRetryInterval()
public void setRetryInterval(long retryInterval)
retryInterval
- 設定する retryIntervalpublic boolean isClientModeConnected()
ClientModeCapable
の isClientModeConnected
public void retryConnection()
ClientModeCapable
ClientModeCapable
の retryConnection