Class MulticastReceivingChannelAdapter
java.lang.Object
org.springframework.integration.context.IntegrationObjectSupport
org.springframework.integration.endpoint.AbstractEndpoint
org.springframework.integration.endpoint.MessageProducerSupport
org.springframework.integration.ip.AbstractInternetProtocolReceivingChannelAdapter
org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter
org.springframework.integration.ip.udp.MulticastReceivingChannelAdapter
- All Implemented Interfaces:
Runnable
,Aware
,BeanFactoryAware
,BeanNameAware
,DisposableBean
,InitializingBean
,SmartInitializingSingleton
,ApplicationContextAware
,ApplicationEventPublisherAware
,Lifecycle
,Phased
,SmartLifecycle
,ExpressionCapable
,MessageProducer
,IntegrationPattern
,CommonSocketOptions
,NamedComponent
,ManageableLifecycle
,ManageableSmartLifecycle
,TrackableComponent
,SchedulingAwareRunnable
public class MulticastReceivingChannelAdapter extends UnicastReceivingChannelAdapter
Channel adapter that joins a multicast group and receives incoming packets and
sends them to an output channel.
- Since:
- 2.0
- Author:
- Gary Russell, Marcin Pilaczynski, Artem Bilan
-
Field Summary
Fields inherited from class org.springframework.integration.endpoint.AbstractEndpoint
lifecycleCondition, lifecycleLock
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
EXPRESSION_PARSER, logger
-
Constructor Summary
Constructors Constructor Description MulticastReceivingChannelAdapter(String group, int port)
Constructs a MulticastReceivingChannelAdapter that listens for packets on the specified multichannel address (group) and port.MulticastReceivingChannelAdapter(String group, int port, boolean lengthCheck)
Constructs a MulticastReceivingChannelAdapter that listens for packets on the specified multichannel address (group) and port. -
Method Summary
Modifier and Type Method Description DatagramSocket
getSocket()
Methods inherited from class org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter
asyncSendMessage, doSend, doStop, getComponentType, getPort, getTheSocket, isLongLived, onInit, receive, run, sendAck, setLengthCheck, setLookupHost, setSocket, setSocketAttributes, setSocketCustomizer, setSoSendBufferSize
Methods inherited from class org.springframework.integration.ip.AbstractInternetProtocolReceivingChannelAdapter
checkTaskExecutor, doStart, getApplicationEventPublisher, getLocalAddress, getReceiveBufferSize, getSoReceiveBufferSize, getSoTimeout, getTaskExecutor, isListening, setApplicationEventPublisher, setListening, setLocalAddress, setPoolSize, setReceiveBufferSize, setSoReceiveBufferSize, setSoTimeout, setTaskExecutor
Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
afterSingletonsInstantiated, buildErrorMessage, getErrorChannel, getErrorMessageAttributes, getIntegrationPatternType, getMessagingTemplate, getOutputChannel, sendErrorMessageIfNecessary, sendMessage, setErrorChannel, setErrorChannelName, setErrorMessageStrategy, setOutputChannel, setOutputChannelName, setSendTimeout, setShouldTrack, subscribeToPublisher
Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
destroy, doStop, getPhase, getRole, isActive, isAutoStartup, isRunning, setAutoStartup, setPhase, setRole, start, stop, stop
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, extractTypeIfPossible, generateId, getApplicationContext, getApplicationContextId, getBeanDescription, getBeanFactory, getBeanName, getChannelResolver, getComponentName, getConversionService, getExpression, getIntegrationProperties, getIntegrationProperty, getMessageBuilderFactory, getTaskScheduler, isInitialized, setApplicationContext, setBeanFactory, setBeanName, setChannelResolver, setComponentName, setConversionService, setMessageBuilderFactory, setPrimaryExpression, setTaskScheduler, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.integration.support.context.NamedComponent
getBeanName, getComponentName
-
Constructor Details
-
MulticastReceivingChannelAdapter
Constructs a MulticastReceivingChannelAdapter that listens for packets on the specified multichannel address (group) and port.- Parameters:
group
- The multichannel address.port
- The port.
-
MulticastReceivingChannelAdapter
Constructs a MulticastReceivingChannelAdapter that listens for packets on the specified multichannel address (group) and port. Enables setting the lengthCheck option, which expects a length to precede the incoming packets.- Parameters:
group
- The multichannel address.port
- The port.lengthCheck
- If true, enables the lengthCheck Option.
-
-
Method Details
-
getSocket
- Overrides:
getSocket
in classUnicastReceivingChannelAdapter
-