org.springframework.integration.ip.udp
Class MulticastReceivingChannelAdapter

java.lang.Object
  extended by org.springframework.integration.context.IntegrationObjectSupport
      extended by org.springframework.integration.endpoint.AbstractEndpoint
          extended by org.springframework.integration.endpoint.MessageProducerSupport
              extended by org.springframework.integration.ip.AbstractInternetProtocolReceivingChannelAdapter
                  extended by org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter
                      extended by org.springframework.integration.ip.udp.MulticastReceivingChannelAdapter
All Implemented Interfaces:
java.lang.Runnable, BeanFactoryAware, BeanNameAware, InitializingBean, Lifecycle, Phased, SmartLifecycle, NamedComponent, MessageProducer, TrackableComponent, CommonSocketOptions

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

Field Summary
protected  java.lang.String group
           
 
Fields inherited from class org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter
mapper, socket, soSendBufferSize
 
Fields inherited from class org.springframework.integration.ip.AbstractInternetProtocolReceivingChannelAdapter
active, listening, localAddress, poolSize, port, receiveBufferSize, soReceiveBufferSize, soTimeout, taskExecutor
 
Fields inherited from class org.springframework.integration.context.IntegrationObjectSupport
logger
 
Constructor Summary
MulticastReceivingChannelAdapter(java.lang.String group, int port)
          Constructs a MulticastReceivingChannelAdapter that listens for packets on the specified multichannel address (group) and port.
MulticastReceivingChannelAdapter(java.lang.String group, int port, boolean lengthCheck)
          Constructs a MulticastReceivingChannelAdapter that listens for packets on the specified multichannel address (group) and port.
 
Method Summary
protected  java.net.DatagramSocket getSocket()
           
 
Methods inherited from class org.springframework.integration.ip.udp.UnicastReceivingChannelAdapter
asyncSendMessage, doStop, getComponentType, receive, run, sendAck, setLookupHost, setSoSendBufferSize
 
Methods inherited from class org.springframework.integration.ip.AbstractInternetProtocolReceivingChannelAdapter
checkTaskExecutor, doStart, getLocalAddress, getPort, isListening, setLocalAddress, setPoolSize, setReceiveBufferSize, setSoReceiveBufferSize, setSoTimeout, setTaskExecutor
 
Methods inherited from class org.springframework.integration.endpoint.MessageProducerSupport
onInit, sendMessage, setErrorChannel, setOutputChannel, setSendTimeout, setShouldTrack
 
Methods inherited from class org.springframework.integration.endpoint.AbstractEndpoint
getPhase, isAutoStartup, isRunning, setAutoStartup, setPhase, setTaskScheduler, start, stop, stop
 
Methods inherited from class org.springframework.integration.context.IntegrationObjectSupport
afterPropertiesSet, getBeanFactory, getComponentName, getConversionService, getTaskScheduler, setBeanFactory, setBeanName, setComponentName, setConversionService, 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.context.NamedComponent
getComponentName
 

Field Detail

group

protected java.lang.String group
Constructor Detail

MulticastReceivingChannelAdapter

public MulticastReceivingChannelAdapter(java.lang.String group,
                                        int port)
Constructs a MulticastReceivingChannelAdapter that listens for packets on the specified multichannel address (group) and port.

Parameters:
group - The multichannel address.
port - The port.

MulticastReceivingChannelAdapter

public MulticastReceivingChannelAdapter(java.lang.String group,
                                        int port,
                                        boolean lengthCheck)
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 Detail

getSocket

protected java.net.DatagramSocket getSocket()
Overrides:
getSocket in class UnicastReceivingChannelAdapter