クラス 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 から継承されたフィールド
connections, connectionsMonitor, DEFAULT_REPLY_TIMEOUT, lifecycleMonitor
クラス org.springframework.integration.context.IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, logger
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明protected ServerSocketSE
createServerSocket
(int port, int backlog, InetAddressSE whichNic) 新しいServerSocket
SE を作成します。サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。int
getPort()
このサーバーがリッスンしているポートを返します。protected ServerSocketSE
基になるServerSocket
がバインドされているSocketAddress
SE を返します。protected TcpSocketFactorySupport
void
run()
リスナーが登録されていない場合は、終了します。void
setTcpNetConnectionSupport
(TcpNetConnectionSupport connectionSupport) 接続オブジェクトの作成に使用するTcpNetConnectionSupport
を設定します。void
setTcpSocketFactorySupport
(TcpSocketFactorySupport tcpSocketFactorySupport) サーバーソケットの作成に使用されるTcpSocketFactorySupport
を設定します。void
stop()
サーバーの停止。クラス 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
クラスからコピーされた説明:IntegrationObjectSupport
サブクラスはこのメソッドを実装して、コンポーネント型情報を提供できます。- 次で指定:
- インターフェース
NamedComponent
のgetComponentType
- オーバーライド:
- クラス
IntegrationObjectSupport
のgetComponentType
getPort
public int getPort()インターフェースからコピーされた説明:TcpServerConnectionFactory
このサーバーがリッスンしているポートを返します。ファクトリがランダムポート (0) でリッスンするように構成されている場合、ファクトリの起動後に実際のポートが返されます。ファクトリが停止すると、以前の値を返す場合があります。- 次で指定:
- インターフェース
TcpServerConnectionFactory
のgetPort
- オーバーライド:
- クラス
AbstractConnectionFactory
のgetPort
- 戻り値:
- 港
getServerSocketAddress
インターフェースからコピーされた説明:TcpServerConnectionFactory
基になるServerSocket
がバインドされているSocketAddress
SE を返します。- 次で指定:
- インターフェース
TcpServerConnectionFactory
のgetServerSocketAddress
- オーバーライド:
- クラス
AbstractServerConnectionFactory
のgetServerSocketAddress
- 戻り値:
- ソケットアドレス。
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 新しいServerSocket
SE を作成します。このデフォルトの実装では、デフォルトのServerSocketFactory
SE を使用します。オーバーライドして他のメカニズムを使用する- パラメーター:
port
- ポート。backlog
- サーバーソケットのバックログ。whichNic
- 特定のネットワークインターフェースにバインドする場合は InetAddress。すべてのインターフェースにバインドするように構成されている場合は、null に設定します。- 戻り値:
- サーバーソケット。
- 例外:
IOExceptionSE
- IOException。
stop
public void stop()クラスからコピーされた説明:AbstractConnectionFactory
サーバーの停止。- 次で指定:
- インターフェース
Lifecycle
のstop
- 次で指定:
- インターフェース
ManageableLifecycle
のstop
- オーバーライド:
- クラス
AbstractConnectionFactory
のstop
getServerSocket
- 戻り値:
- serverSocket
getTcpSocketFactorySupport