クラス AbstractServerConnectionFactory
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory
org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory
- 実装されているすべてのインターフェース:
RunnableSE
、Aware
、BeanFactoryAware
、BeanNameAware
、InitializingBean
、ApplicationContextAware
、ApplicationEventPublisherAware
、Lifecycle
、ComponentSourceAware
、ExpressionCapable
、OrderlyShutdownCapable
、ConnectionFactory
、TcpServerConnectionFactory
、NamedComponent
、ManageableLifecycle
、SchedulingAwareRunnable
public abstract class AbstractServerConnectionFactory
extends AbstractConnectionFactory
implements TcpServerConnectionFactory, SchedulingAwareRunnable, OrderlyShutdownCapable
すべてのサーバー接続ファクトリの基本クラス。サーバー接続ファクトリは、ポートで受信接続をリッスンし、新しい接続ごとに新しい TcpConnection オブジェクトを作成します。
- 導入:
- 2.0
- 作成者:
- Gary Russell, Artem Bilan, Christian Tzolov
フィールドのサマリー
クラス org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory から継承されたフィールド
connections, connectionsMonitor, DEFAULT_REPLY_TIMEOUT, lifecycleMonitor
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, logger
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明int
スケジューラー、エグゼキューターなどの通常のシャットダウンの後、シャットダウン遅延が経過した後、残りのアクティブなスケジューラー / エグゼキュータースレッドの強制シャットダウンの前に呼び出されます。オプションで、まだ処理中のアクティブなメッセージの数を返すことができます。int
シャットダウンが始まる前に呼び出されます。int
サーバー接続バックログ内のソケットの数。ファクトリで複数の接続を管理しており、この方法では識別できないため、サポートされていません。基になるServerSocket
がバインドされているSocketAddress
SE を返します。protected void
initializeConnection
(TcpConnectionSupport connection, SocketSE socket) (デ)シリアライザー、マッパーなどの属性を新しい接続に転送します。boolean
boolean
protected boolean
protected void
postProcessServerSocket
(ServerSocketSE serverSocket) protected void
protected void
publishServerListeningEvent
(int port) void
setBacklog
(int backlog) 接続バックログ内のソケットの数。protected void
setListening
(boolean listening) void
setLocalAddress
(StringSE localAddress) マルチホームシステムで使用され、サーバーがすべてのネットワークアダプターではなく特定のネットワークアドレスでリッスンするように強制します。void
start()
クラス org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory から継承されたメソッド
addConnection, checkActive, closeConnection, delayRead, doAccept, getApplicationEventPublisher, getDelayedReads, getDeserializer, getHost, getLifecycleMonitor, getListener, getMapper, getOpenConnectionIds, getPort, getReadDelay, getSender, getSenders, getSerializer, getSoLinger, getSoReceiveBufferSize, getSoSendBufferSize, getSoTimeout, getSoTrafficClass, getSslHandshakeTimeout, getTaskExecutor, getTcpSocketSupport, harvestClosedConnections, isActive, isLookupHost, isRunning, isSingleUse, isSoKeepAlive, isSoTcpNoDelay, onInit, processNioSelections, registerListener, registerSender, setActive, setApplicationEventPublisher, setDeserializer, setHost, setInterceptorFactoryChain, setLeaveOpen, setLookupHost, setMapper, setNioHarvestInterval, setPort, setReadDelay, setSerializer, setSingleUse, setSocketAttributes, setSoKeepAlive, setSoLinger, setSoReceiveBufferSize, setSoSendBufferSize, setSoTcpNoDelay, setSoTimeout, setSoTrafficClass, setSslHandshakeTimeout, setTaskExecutor, setTcpSocketSupport, stop, toString, unregisterSender, wrapConnection
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたメソッド
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getComponentType, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler
クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSE
インターフェース java.lang.RunnableSE から継承されたメソッド
run
インターフェース org.springframework.scheduling.SchedulingAwareRunnable から継承されたメソッド
getQualifier
インターフェース org.springframework.integration.ip.tcp.connection.TcpServerConnectionFactory から継承されたメソッド
getPort
コンストラクターの詳細
AbstractServerConnectionFactory
public AbstractServerConnectionFactory(int port) ファクトリがリッスンするポート。- パラメーター:
port
- ポート。
メソッドの詳細
isLongLived
public boolean isLongLived()- 次で指定:
- インターフェース
SchedulingAwareRunnable
のisLongLived
getServerSocketAddress
インターフェースからコピーされた説明:TcpServerConnectionFactory
基になるServerSocket
がバインドされているSocketAddress
SE を返します。- 次で指定:
- インターフェース
TcpServerConnectionFactory
のgetServerSocketAddress
- 戻り値:
- ソケットアドレス。
start
public void start()- 次で指定:
- インターフェース
Lifecycle
のstart
- 次で指定:
- インターフェース
ManageableLifecycle
のstart
- オーバーライド:
- クラス
AbstractConnectionFactory
のstart
getConnection
ファクトリで複数の接続を管理しており、この方法では識別できないため、サポートされていません。- 次で指定:
- インターフェース
ConnectionFactory
のgetConnection
setListening
protected void setListening(boolean listening) - パラメーター:
listening
- セットを聞く
isListening
public boolean isListening()- 戻り値:
- サーバーがポートでリッスンしている場合は true。
isShuttingDown
protected boolean isShuttingDown()initializeConnection
(デ)シリアライザー、マッパーなどの属性を新しい接続に転送します。シングルユースソケットの場合、DoS 攻撃を防ぐために、ソケットタイムアウト(デフォルトは 10 秒)を適用します。- パラメーター:
connection
- 新しい接続。socket
- 新しいソケット。
postProcessServerSocket
getLocalAddress
setLocalAddress
マルチホームシステムで使用され、サーバーがすべてのネットワークアダプターではなく特定のネットワークアドレスでリッスンするように強制します。- パラメーター:
localAddress
- 必要なアダプターの IP アドレス。
getBacklog
public int getBacklog()サーバー接続バックログ内のソケットの数。- 戻り値:
- バックログ。
setBacklog
public void setBacklog(int backlog) 接続バックログ内のソケットの数。デフォルト 5; 高い接続率が予想される場合は増加します。- パラメーター:
backlog
- 設定するバックログ。
beforeShutdown
public int beforeShutdown()インターフェースからコピーされた説明:OrderlyShutdownCapable
シャットダウンが始まる前に呼び出されます。実装は、新しいメッセージの受け入れを停止する必要があります。オプションで、処理中のアクティブなメッセージの数を返すことができます。- 次で指定:
- インターフェース
OrderlyShutdownCapable
のbeforeShutdown
- 戻り値:
- 使用可能な場合、アクティブなメッセージの数。
afterShutdown
public int afterShutdown()インターフェースからコピーされた説明:OrderlyShutdownCapable
スケジューラー、エグゼキューターなどの通常のシャットダウンの後、シャットダウン遅延が経過した後、残りのアクティブなスケジューラー / エグゼキュータースレッドの強制シャットダウンの前に呼び出されます。オプションで、まだ処理中のアクティブなメッセージの数を返すことができます。- 次で指定:
- インターフェース
OrderlyShutdownCapable
のafterShutdown
- 戻り値:
- 使用可能な場合、アクティブなメッセージの数。
publishServerExceptionEvent
publishServerListeningEvent
protected void publishServerListeningEvent(int port)