クラス UnicastReceivingChannelAdapter
java.lang.ObjectSE
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.ip.udp.inbound.AbstractInternetProtocolReceivingChannelAdapter
org.springframework.integration.ip.udp.inbound.UnicastReceivingChannelAdapter
- 実装されているすべてのインターフェース:
RunnableSE、Aware、BeanFactoryAware、BeanNameAware、DisposableBean、InitializingBean、SmartInitializingSingleton、ApplicationContextAware、ApplicationEventPublisherAware、Lifecycle、Phased、SmartLifecycle、ComponentSourceAware、ExpressionCapable、MessageProducer、IntegrationPattern、CommonSocketOptions、NamedComponent、IntegrationInboundManagement、IntegrationManagement、ManageableLifecycle、ManageableSmartLifecycle、TrackableComponent、SchedulingAwareRunnable
受信 UDP パケットを受信するチャネルアダプター。オプションで、すべてのデータが受信されたことを検証するために使用される 4 バイト長のフィールドをパケットの前に付けることができます。パケットには、確認応答を送信する必要があることを示す情報も含まれる場合があります。
- 導入:
- 2.0
- 作成者:
- Gary Russell, Artem Bilan, Christian Tzolov
ネストされたクラスの要約
インターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverridesフィールドのサマリー
フィールドクラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたフィールド
lifecycleLockクラス org.springframework.integration.context.IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, loggerインターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEインターフェース org.springframework.context.SmartLifecycle から継承されたフィールド
DEFAULT_PHASEコンストラクターの概要
コンストラクターコンストラクター説明UnicastReceivingChannelAdapter(int port) 指定されたポートをリッスンする UnicastReceivingChannelAdapter を構築します。UnicastReceivingChannelAdapter(int port, boolean lengthCheck) 指定されたポートでパケットをリッスンする UnicastReceivingChannelAdapter を構築します。メソッドのサマリー
修飾子と型メソッド説明protected booleanasyncSendMessage(DatagramPacketSE packet) protected voiddoSend(DatagramPacketSE packet) protected voiddoStop()デフォルトでは何もしません。intgetPort()protected @Nullable DatagramSocketSEbooleanprotected voidonInit()サブクラスは、初期化ロジック用にこれを実装できます。protected DatagramPacketSEreceive()voidrun()protected voidvoidsetLengthCheck(boolean lengthCheck) voidsetLookupHost(boolean lookupHost) voidsetSocket(DatagramSocketSE socket) protected voidsetSocketAttributes(DatagramSocketSE socket) タイムアウトと受信バッファサイズを設定し、ソケットカスタマイザを呼び出します。voidsetSocketCustomizer(SocketCustomizer socketCustomizer) 作成後にソケットをさらに構成するようにカスタマイザーを設定します。voidsetSoSendBufferSize(int soSendBufferSize) クラス org.springframework.integration.ip.udp.inbound.AbstractInternetProtocolReceivingChannelAdapter から継承されたメソッド
checkTaskExecutor, doStart, getApplicationEventPublisher, getLocalAddress, getReceiveBufferSize, getSoReceiveBufferSize, getSoTimeout, getTaskExecutor, isListening, setApplicationEventPublisher, setListening, setLocalAddress, setPoolSize, setReceiveBufferSize, setSoReceiveBufferSize, setSoTimeout, setTaskExecutorクラス org.springframework.integration.endpoint.MessageProducerSupport から継承されたメソッド
afterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getErrorMessageStrategy, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, getRequiredOutputChannel, isObserved, registerObservationRegistry, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setObservationConvention, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisherクラス org.springframework.integration.endpoint.AbstractEndpoint から継承されたメソッド
destroy, doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopクラス 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, toStringクラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSEインターフェース org.springframework.integration.support.management.IntegrationManagement から継承されたメソッド
destroy, getManagedName, getManagedType, getOverrides, getThisAs, isLoggingEnabled, registerMetricsCaptor, setLoggingEnabled, setManagedName, setManagedTypeインターフェース org.springframework.integration.support.context.NamedComponent から継承されたメソッド
getBeanName, getComponentNameインターフェース org.springframework.scheduling.SchedulingAwareRunnable から継承されたメソッド
getQualifierインターフェース org.springframework.context.SmartLifecycle から継承されたメソッド
isPauseable
フィールドの詳細
lock
コンストラクターの詳細
UnicastReceivingChannelAdapter
public UnicastReceivingChannelAdapter(int port) 指定されたポートをリッスンする UnicastReceivingChannelAdapter を構築します。- パラメーター:
port- ポート。
UnicastReceivingChannelAdapter
public UnicastReceivingChannelAdapter(int port, boolean lengthCheck) 指定されたポートでパケットをリッスンする UnicastReceivingChannelAdapter を構築します。lengthCheck オプションの設定を有効にします。このオプションでは、受信パケットの前に長さが付加されます。- パラメーター:
port- ポート。lengthCheck- true の場合、lengthCheck オプションが有効になります。
メソッドの詳細
setLengthCheck
public void setLengthCheck(boolean lengthCheck) - パラメーター:
lengthCheck- true の場合、受信パケットには 4 バイトのバイナリ長ヘッダーが含まれることが期待されます。- 導入:
- 5.0
setSocketCustomizer
作成後にソケットをさらに構成するようにカスタマイザーを設定します。- パラメーター:
socketCustomizer- カスタマイザー。- 導入:
- 5.3.3
isLongLived
public boolean isLongLived()getPort
public int getPort()- オーバーライド:
- クラス
AbstractInternetProtocolReceivingChannelAdapterのgetPort - 戻り値:
- このレシーバーがリッスンしているポート。
onInit
protected void onInit()クラスからコピーされた説明:IntegrationObjectSupportサブクラスは、初期化ロジック用にこれを実装できます。- オーバーライド:
- クラス
MessageProducerSupportのonInit
run
public void run()sendAck
asyncSendMessage
doSend
receive
setSocket
- パラメーター:
socket- 設定するソケット
getTheSocket
getSocket
setSocketAttributes
タイムアウトと受信バッファサイズを設定し、ソケットカスタマイザを呼び出します。- パラメーター:
socket- ソケット。- 例外:
SocketExceptionSE- ソケット例外。
setSoSendBufferSize
public void setSoSendBufferSize(int soSendBufferSize) - パラメーター:
soSendBufferSize- 送信バッファサイズ。- 関連事項:
setLookupHost
public void setLookupHost(boolean lookupHost) getComponentType
- 次で指定:
- インターフェース
NamedComponentのgetComponentType - オーバーライド:
- クラス
MessageProducerSupportのgetComponentType
doStop
protected void doStop()クラスからコピーされた説明:MessageProducerSupportデフォルトでは何もしません。サブクラスは、ライフサイクル管理の動作が必要な場合、これをオーバーライドできます。- オーバーライド:
- クラス
AbstractInternetProtocolReceivingChannelAdapterのdoStop