クラス TcpNetServerConnectionFactory
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory
org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory
org.springframework.integration.ip.tcp.connection.TcpNetServerConnectionFactory
- 実装済みのインターフェース一覧:
RunnableSE、Aware、BeanFactoryAware、BeanNameAware、InitializingBean、ApplicationContextAware、ApplicationEventPublisherAware、Lifecycle、ComponentSourceAware、ExpressionCapable、OrderlyShutdownCapable、ConnectionFactory、TcpServerConnectionFactory、NamedComponent、ManageableLifecycle、SchedulingAwareRunnable
- 導入:
- 2.0
- 作成者:
- Gary Russell, Artem Bilan, M á rio Dias
ネストされたクラスの概要
クラス org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory から継承されたネストクラス / インターフェース
AbstractConnectionFactory.PendingIOフィールド概要
クラス org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory から継承されたフィールド
connections, connectionsMonitor, DEFAULT_REPLY_TIMEOUT, lifecycleMonitorクラス org.springframework.integration.context.IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, loggerコンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明protected ServerSocketSEcreateServerSocket(int port, int backlog, @Nullable InetAddressSE whichNic) 新しいServerSocketSE を作成します。intgetPort()このサーバーがリッスンしているポートを返します。protected @Nullable ServerSocketSE@Nullable SocketAddressSE基になるServerSocketがバインドされているSocketAddressSE を返します。protected TcpSocketFactorySupportvoidrun()リスナーが登録されていない場合は、終了します。voidsetTcpNetConnectionSupport(TcpNetConnectionSupport connectionSupport) 接続オブジェクトの作成に使用するTcpNetConnectionSupportを設定します。voidsetTcpSocketFactorySupport(TcpSocketFactorySupport tcpSocketFactorySupport) サーバーソケットの作成に使用されるTcpSocketFactorySupportを設定します。voidstop()サーバーの停止。クラス org.springframework.integration.ip.tcp.connection.AbstractServerConnectionFactory から継承されたメソッド
afterShutdown, beforeShutdown, getBacklog, getConnection, getLocalAddress, initializeConnection, isListening, isLongLived, isShuttingDown, postProcessServerSocket, publishServerExceptionEvent, publishServerListeningEvent, setBacklog, setListening, setLocalAddress, startクラス org.springframework.integration.ip.tcp.connection.AbstractConnectionFactory から継承されたメソッド
addConnection, checkActive, closeConnection, delayRead, doAccept, getApplicationEventPublisher, getDelayedReads, getDeserializer, getHost, getLifecycleMonitor, getListener, getMapper, getOpenConnectionIds, 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, toString, unregisterSender, wrapConnectionクラス org.springframework.integration.context.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クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSEインターフェース org.springframework.scheduling.SchedulingAwareRunnable から継承されたメソッド
getQualifier
コンストラクターの詳細
TcpNetServerConnectionFactory
public TcpNetServerConnectionFactory(int port) ポートの受信接続を待機します。- パラメーター:
port- ポート。
方法の詳細
getComponentType
- 次で指定:
- インターフェース
NamedComponent内のgetComponentType - オーバーライド:
- クラス
AbstractConnectionFactoryのgetComponentType
getPort
public int getPort()インターフェースからコピーされた説明:TcpServerConnectionFactoryこのサーバーがリッスンしているポートを返します。ファクトリがランダムポート (0) でリッスンするように構成されている場合、ファクトリの起動後に実際のポートが返されます。ファクトリが停止すると、以前の値を返す場合があります。- 次で指定:
- インターフェース
TcpServerConnectionFactory内のgetPort - オーバーライド:
- クラス
AbstractConnectionFactoryのgetPort - 戻り値:
- 港
getServerSocketAddress
インターフェースからコピーされた説明:TcpServerConnectionFactory基になるServerSocketがバインドされているSocketAddressSE を返します。- 戻り値:
- ソケットアドレス。
setTcpSocketFactorySupport
サーバーソケットの作成に使用されるTcpSocketFactorySupportを設定します。- パラメーター:
tcpSocketFactorySupport-TcpSocketFactorySupport
setTcpNetConnectionSupport
接続オブジェクトの作成に使用するTcpNetConnectionSupportを設定します。- パラメーター:
connectionSupport- 接続サポート。- 導入:
- 5.0
run
public void run()リスナーが登録されていない場合は、終了します。受信接続を受け入れ、新しい接続ごとに TcpConnections を作成します。{AbstractServerConnectionFactory.initializeConnection(TcpConnectionSupport, Socket)を呼び出し、タスクエグゼキュータを使用して接続Runnable.run()を実行します。サーバーソケット / チャネルの I/O エラーがログに記録され、ファクトリが停止します。createServerSocket
protected ServerSocketSE createServerSocket(int port, int backlog, @Nullable InetAddressSE whichNic) throws IOExceptionSE 新しいServerSocketSE を作成します。このデフォルトの実装では、デフォルトのServerSocketFactorySE を使用します。オーバーライドして他のメカニズムを使用する- パラメーター:
port- ポート。backlog- サーバーソケットのバックログ。whichNic- 特定のネットワークインターフェースにバインドする場合は InetAddress。すべてのインターフェースにバインドするように構成されている場合は、null に設定します。- 戻り値:
- サーバーソケット。
- 例外:
IOExceptionSE- IOException。
stop
public void stop()クラスからコピーされた説明:AbstractConnectionFactoryサーバーの停止。- 次で指定:
- インターフェース
Lifecycle内のstop - 次で指定:
- インターフェース
ManageableLifecycle内のstop - オーバーライド:
- クラス
AbstractConnectionFactoryのstop
getServerSocket
- 戻り値:
- serverSocket
getTcpSocketFactorySupport