クラス 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
- 既知の直属サブクラス
MulticastReceivingChannelAdapter
受信 UDP パケットを受信するチャネルアダプター。オプションで、すべてのデータが受信されたことを検証するために使用される 4 バイト長のフィールドをパケットの前に付けることができます。パケットには、確認応答を送信する必要があることを示す情報も含まれる場合があります。
- 導入:
- 2.0
- 作成者:
- Gary Russell, Artem Bilan, Christian Tzolov, Glenn Renfro
ネストされたクラスの概要
インターフェース IntegrationManagement から継承されたネストクラス / インターフェース
IntegrationManagement.ManagementOverridesフィールド概要
フィールドクラス AbstractEndpoint から継承されたフィールド
lifecycleLockクラス IntegrationObjectSupport から継承されたフィールド
EXPRESSION_PARSER, loggerインターフェース IntegrationManagement から継承されたフィールド
METER_PREFIX, RECEIVE_COUNTER_NAME, SEND_TIMER_NAMEインターフェース 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) voidsetTrustedAckAddresses(StringSE... trustedAckAddresses) Set patterns for trusted acknowledgment addresses.クラス AbstractInternetProtocolReceivingChannelAdapter から継承されたメソッド
checkTaskExecutor, doStart, getApplicationEventPublisher, getLocalAddress, getReceiveBufferSize, getSoReceiveBufferSize, getSoTimeout, getTaskExecutor, isListening, setApplicationEventPublisher, setListening, setLocalAddress, setPoolSize, setReceiveBufferSize, setSoReceiveBufferSize, setSoTimeout, setTaskExecutorクラス MessageProducerSupport から継承されたメソッド
afterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getErrorMessageStrategy, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, getOutputChannelName, getRequiredOutputChannel, isObserved, registerObservationRegistry, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setObservationConvention, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisherクラス AbstractEndpoint から継承されたメソッド
destroy, doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stopクラス 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クラス ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, wait, waitSE, waitSEインターフェース IntegrationManagement から継承されたメソッド
destroy, getManagedName, getManagedType, getOverrides, getThisAs, isLoggingEnabled, registerMetricsCaptor, setLoggingEnabled, setManagedName, setManagedTypeインターフェース NamedComponent から継承されたメソッド
getBeanName, getComponentNameインターフェース SchedulingAwareRunnable から継承されたメソッド
getQualifierインターフェース 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
setTrustedAckAddresses
Set patterns for trusted acknowledgment addresses. Only packets whoseIpHeaders.ACK_ADDRESSheader matches one of these patterns will trigger an acknowledgment. Patterns support*wildcards viaPatternMatchUtils.simpleMatch(String, String). The address format ishost:port, matching the format set byUnicastSendingMessageHandler. By default, no patterns are set. Setting trustedAckAddresses implies acknowledgments will be sent. Packets from non-matching addresses will not receive an acknowledgment, and aMessagingExceptionis thrown.- パラメーター:
trustedAckAddresses- the patterns to trust.- 導入:
- 5.5.22
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