クラス 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
ネストされたクラスの概要
クラス AbstractConnectionFactory から継承されたネストクラス / インターフェース
AbstractConnectionFactory.PendingIOフィールド概要
クラス AbstractConnectionFactory から継承されたフィールド
connections, connectionsMonitor, DEFAULT_REPLY_TIMEOUT, lifecycleMonitorクラス IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, loggerコンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明intスケジューラー、エグゼキューターなどの通常のシャットダウンの後、シャットダウン遅延が経過した後、残りのアクティブなスケジューラー / エグゼキュータースレッドの強制シャットダウンの前に呼び出されます。オプションで、まだ処理中のアクティブなメッセージの数を返すことができます。intシャットダウンが始まる前に呼び出されます。intサーバー接続バックログ内のソケットの数。ファクトリで複数の接続を管理しており、この方法では識別できないため、サポートされていません。@Nullable StringSEprotected voidinitializeConnection(TcpConnectionSupport connection, SocketSE socket) (デ)シリアライザー、マッパーなどの属性を新しい接続に転送します。booleanbooleanprotected booleanprotected voidpostProcessServerSocket(ServerSocketSE serverSocket) protected voidprotected voidpublishServerListeningEvent(int port) voidsetBacklog(int backlog) 接続バックログ内のソケットの数。protected voidsetListening(boolean listening) voidsetLocalAddress(StringSE localAddress) マルチホームシステムで使用され、サーバーがすべてのネットワークアダプターではなく特定のネットワークアドレスでリッスンするように強制します。voidstart()クラス AbstractConnectionFactory から継承されたメソッド
addConnection, checkActive, closeConnection, delayRead, doAccept, getApplicationEventPublisher, getComponentType, 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クラス IntegrationObjectSupport から継承されたメソッド
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentDescription, getComponentName, getComponentSource, getConversionService, getExpression, getIntegrationProperties, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentDescription, setComponentName, setComponentSource, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskSchedulerクラス ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSEインターフェース RunnableSE から継承されたメソッド
runインターフェース SchedulingAwareRunnable から継承されたメソッド
getQualifierインターフェース TcpServerConnectionFactory から継承されたメソッド
getPort, getServerSocketAddress
コンストラクターの詳細
AbstractServerConnectionFactory
public AbstractServerConnectionFactory(int port) ファクトリがリッスンするポート。- パラメーター:
port- ポート。
方法の詳細
isLongLived
public boolean isLongLived()- 次で指定:
- インターフェース
SchedulingAwareRunnable内のisLongLived
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
- 戻り値:
- localAddress
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)